@react-navigation/native 8.0.0-alpha.4 → 8.0.0-alpha.41

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 (474) hide show
  1. package/android/build.gradle +4 -6
  2. package/android/src/main/java/org/reactnavigation/MaterialSymbolModule.kt +20 -9
  3. package/android/src/main/java/org/reactnavigation/MaterialSymbolTypeface.kt +61 -18
  4. package/android/src/main/java/org/reactnavigation/MaterialSymbolView.kt +39 -14
  5. package/android/src/main/java/org/reactnavigation/MaterialSymbolViewManager.kt +14 -7
  6. package/android/src/main/java/org/reactnavigation/ReactNavigationPackage.kt +3 -1
  7. package/assets/fonts/MaterialSymbolsOutlined.codepoints +190 -24
  8. package/assets/fonts/MaterialSymbolsOutlined_100.ttf +0 -0
  9. package/assets/fonts/MaterialSymbolsOutlined_200.ttf +0 -0
  10. package/assets/fonts/MaterialSymbolsOutlined_300.ttf +0 -0
  11. package/assets/fonts/MaterialSymbolsOutlined_400.ttf +0 -0
  12. package/assets/fonts/MaterialSymbolsOutlined_500.ttf +0 -0
  13. package/assets/fonts/MaterialSymbolsOutlined_600.ttf +0 -0
  14. package/assets/fonts/MaterialSymbolsOutlined_700.ttf +0 -0
  15. package/assets/fonts/MaterialSymbolsRounded.codepoints +190 -24
  16. package/assets/fonts/MaterialSymbolsRounded_100.ttf +0 -0
  17. package/assets/fonts/MaterialSymbolsRounded_200.ttf +0 -0
  18. package/assets/fonts/MaterialSymbolsRounded_300.ttf +0 -0
  19. package/assets/fonts/MaterialSymbolsRounded_400.ttf +0 -0
  20. package/assets/fonts/MaterialSymbolsRounded_500.ttf +0 -0
  21. package/assets/fonts/MaterialSymbolsRounded_600.ttf +0 -0
  22. package/assets/fonts/MaterialSymbolsRounded_700.ttf +0 -0
  23. package/assets/fonts/MaterialSymbolsSharp.codepoints +190 -24
  24. package/assets/fonts/MaterialSymbolsSharp_100.ttf +0 -0
  25. package/assets/fonts/MaterialSymbolsSharp_200.ttf +0 -0
  26. package/assets/fonts/MaterialSymbolsSharp_300.ttf +0 -0
  27. package/assets/fonts/MaterialSymbolsSharp_400.ttf +0 -0
  28. package/assets/fonts/MaterialSymbolsSharp_500.ttf +0 -0
  29. package/assets/fonts/MaterialSymbolsSharp_600.ttf +0 -0
  30. package/assets/fonts/MaterialSymbolsSharp_700.ttf +0 -0
  31. package/ios/ReactNavigationCornerInsetView.h +14 -0
  32. package/ios/ReactNavigationCornerInsetView.mm +182 -0
  33. package/ios/ReactNavigationCornerInsetView.swift +193 -0
  34. package/ios/ReactNavigationCornerInsetViewComponentDescriptor.h +23 -0
  35. package/ios/ReactNavigationCornerInsetViewShadowNode.h +27 -0
  36. package/ios/ReactNavigationCornerInsetViewShadowNode.mm +42 -0
  37. package/ios/ReactNavigationCornerInsetViewState.h +19 -0
  38. package/ios/ReactNavigationSFSymbolView.mm +22 -9
  39. package/ios/ReactNavigationSFSymbolView.swift +355 -65
  40. package/lib/module/Link.js +80 -24
  41. package/lib/module/Link.js.map +1 -1
  42. package/lib/module/Link.native.js +72 -0
  43. package/lib/module/Link.native.js.map +1 -0
  44. package/lib/module/NavigationContainer.js +77 -33
  45. package/lib/module/NavigationContainer.js.map +1 -1
  46. package/lib/module/__stubs__/createStackNavigator.js +10 -4
  47. package/lib/module/__stubs__/createStackNavigator.js.map +1 -1
  48. package/lib/module/checkSerializable.js +180 -0
  49. package/lib/module/checkSerializable.js.map +1 -0
  50. package/lib/module/constants.js +5 -0
  51. package/lib/module/constants.js.map +1 -0
  52. package/lib/module/constants.native.js +6 -0
  53. package/lib/module/constants.native.js.map +1 -0
  54. package/lib/module/createMemoryHistory.js +23 -7
  55. package/lib/module/createMemoryHistory.js.map +1 -1
  56. package/lib/module/createStandardNavigationFactories.js +99 -0
  57. package/lib/module/createStandardNavigationFactories.js.map +1 -0
  58. package/lib/module/createStaticNavigation.js +5 -4
  59. package/lib/module/createStaticNavigation.js.map +1 -1
  60. package/lib/module/extractPathFromURL.js +2 -2
  61. package/lib/module/extractPathFromURL.js.map +1 -1
  62. package/lib/module/getStateBreadcrumb.js +37 -0
  63. package/lib/module/getStateBreadcrumb.js.map +1 -0
  64. package/lib/module/getStateFromHref.js +2 -2
  65. package/lib/module/getStateFromHref.js.map +1 -1
  66. package/lib/module/index.js +5 -3
  67. package/lib/module/index.js.map +1 -1
  68. package/lib/module/native/CornerInset.ios.js +69 -0
  69. package/lib/module/native/CornerInset.ios.js.map +1 -0
  70. package/lib/module/native/CornerInset.js +12 -0
  71. package/lib/module/native/CornerInset.js.map +1 -0
  72. package/lib/module/native/MaterialSymbol.android.js +7 -16
  73. package/lib/module/native/MaterialSymbol.android.js.map +1 -1
  74. package/lib/module/native/MaterialSymbol.js.map +1 -1
  75. package/lib/module/native/MaterialSymbolViewNativeComponent.ts +7 -4
  76. package/lib/module/native/ReactNavigationCornerInsetViewNativeComponent.ts +31 -0
  77. package/lib/module/native/SFSymbol.ios.js +37 -18
  78. package/lib/module/native/SFSymbol.ios.js.map +1 -1
  79. package/lib/module/native/SFSymbol.js.map +1 -1
  80. package/lib/module/native/SFSymbolViewNativeComponent.ts +31 -15
  81. package/lib/module/server/ServerContext.js.map +1 -0
  82. package/lib/module/server/index.js +21 -0
  83. package/lib/module/server/index.js.map +1 -0
  84. package/lib/module/theming/DarkTheme.js +5 -5
  85. package/lib/module/theming/DarkTheme.js.map +1 -1
  86. package/lib/module/theming/LightTheme.js +16 -0
  87. package/lib/module/theming/LightTheme.js.map +1 -0
  88. package/lib/module/theming/MaterialFallbackTheme.js +28 -0
  89. package/lib/module/theming/MaterialFallbackTheme.js.map +1 -0
  90. package/lib/module/theming/MaterialTheme.android.js +33 -0
  91. package/lib/module/theming/MaterialTheme.android.js.map +1 -0
  92. package/lib/module/theming/MaterialTheme.js +4 -0
  93. package/lib/module/theming/MaterialTheme.js.map +1 -0
  94. package/lib/module/theming/fonts.js +15 -54
  95. package/lib/module/theming/fonts.js.map +1 -1
  96. package/lib/module/theming/fonts.native.js +42 -0
  97. package/lib/module/theming/fonts.native.js.map +1 -0
  98. package/lib/module/useBackButton.js.map +1 -1
  99. package/lib/module/useBackButton.native.js +4 -1
  100. package/lib/module/useBackButton.native.js.map +1 -1
  101. package/lib/module/useDeepStableValue.js +12 -0
  102. package/lib/module/useDeepStableValue.js.map +1 -0
  103. package/lib/module/useDocumentTitle.js.map +1 -1
  104. package/lib/module/useLinkBuilder.js +8 -15
  105. package/lib/module/useLinkBuilder.js.map +1 -1
  106. package/lib/module/useLinkProps.js +150 -68
  107. package/lib/module/useLinkProps.js.map +1 -1
  108. package/lib/module/useLinkTo.js +1 -1
  109. package/lib/module/useLinkTo.js.map +1 -1
  110. package/lib/module/useLinking.js +203 -32
  111. package/lib/module/useLinking.js.map +1 -1
  112. package/lib/module/useLinking.native.js +25 -8
  113. package/lib/module/useLinking.native.js.map +1 -1
  114. package/lib/module/useLocale.js +1 -1
  115. package/lib/module/useLocale.js.map +1 -1
  116. package/lib/module/useMemoArray.js +25 -0
  117. package/lib/module/useMemoArray.js.map +1 -0
  118. package/lib/module/useRoutePath.js +1 -1
  119. package/lib/module/useRoutePath.js.map +1 -1
  120. package/lib/module/useScrollToTop.js +3 -8
  121. package/lib/module/useScrollToTop.js.map +1 -1
  122. package/lib/module/useThenable.js +8 -6
  123. package/lib/module/useThenable.js.map +1 -1
  124. package/lib/typescript/src/Link.d.ts +17 -9
  125. package/lib/typescript/src/Link.d.ts.map +1 -1
  126. package/lib/typescript/src/Link.native.d.ts +4 -0
  127. package/lib/typescript/src/Link.native.d.ts.map +1 -0
  128. package/lib/typescript/src/LinkingContext.d.ts +1 -1
  129. package/lib/typescript/src/LinkingContext.d.ts.map +1 -1
  130. package/lib/typescript/src/LocaleDirContext.d.ts +1 -1
  131. package/lib/typescript/src/LocaleDirContext.d.ts.map +1 -1
  132. package/lib/typescript/src/NavigationContainer.d.ts +19 -8
  133. package/lib/typescript/src/NavigationContainer.d.ts.map +1 -1
  134. package/lib/typescript/src/__stubs__/createStackNavigator.d.ts +6 -9
  135. package/lib/typescript/src/__stubs__/createStackNavigator.d.ts.map +1 -1
  136. package/lib/typescript/src/checkSerializable.d.ts +12 -0
  137. package/lib/typescript/src/checkSerializable.d.ts.map +1 -0
  138. package/lib/typescript/src/constants.d.ts +4 -0
  139. package/lib/typescript/src/constants.d.ts.map +1 -0
  140. package/lib/typescript/src/constants.native.d.ts +4 -0
  141. package/lib/typescript/src/constants.native.d.ts.map +1 -0
  142. package/lib/typescript/src/createMemoryHistory.d.ts +1 -1
  143. package/lib/typescript/src/createMemoryHistory.d.ts.map +1 -1
  144. package/lib/typescript/src/createStandardNavigationFactories.d.ts +33 -0
  145. package/lib/typescript/src/createStandardNavigationFactories.d.ts.map +1 -0
  146. package/lib/typescript/src/createStaticNavigation.d.ts +7 -7
  147. package/lib/typescript/src/createStaticNavigation.d.ts.map +1 -1
  148. package/lib/typescript/src/extractPathFromURL.d.ts +1 -1
  149. package/lib/typescript/src/extractPathFromURL.d.ts.map +1 -1
  150. package/lib/typescript/src/getStateBreadcrumb.d.ts +3 -0
  151. package/lib/typescript/src/getStateBreadcrumb.d.ts.map +1 -0
  152. package/lib/typescript/src/getStateFromHref.d.ts +3 -3
  153. package/lib/typescript/src/getStateFromHref.d.ts.map +1 -1
  154. package/lib/typescript/src/index.d.ts +16 -14
  155. package/lib/typescript/src/index.d.ts.map +1 -1
  156. package/lib/typescript/src/native/CornerInset.d.ts +32 -0
  157. package/lib/typescript/src/native/CornerInset.d.ts.map +1 -0
  158. package/lib/typescript/src/native/CornerInset.ios.d.ts +8 -0
  159. package/lib/typescript/src/native/CornerInset.ios.d.ts.map +1 -0
  160. package/lib/typescript/src/native/MaterialSymbol.android.d.ts +9 -4
  161. package/lib/typescript/src/native/MaterialSymbol.android.d.ts.map +1 -1
  162. package/lib/typescript/src/native/MaterialSymbol.d.ts +8 -3
  163. package/lib/typescript/src/native/MaterialSymbol.d.ts.map +1 -1
  164. package/lib/typescript/src/native/MaterialSymbolData.d.ts +1 -1
  165. package/lib/typescript/src/native/MaterialSymbolData.d.ts.map +1 -1
  166. package/lib/typescript/src/native/MaterialSymbolViewNativeComponent.d.ts +3 -3
  167. package/lib/typescript/src/native/MaterialSymbolViewNativeComponent.d.ts.map +1 -1
  168. package/lib/typescript/src/native/ReactNavigationCornerInsetViewNativeComponent.d.ts +14 -0
  169. package/lib/typescript/src/native/ReactNavigationCornerInsetViewNativeComponent.d.ts.map +1 -0
  170. package/lib/typescript/src/native/SFSymbol.d.ts +8 -3
  171. package/lib/typescript/src/native/SFSymbol.d.ts.map +1 -1
  172. package/lib/typescript/src/native/SFSymbol.ios.d.ts +9 -4
  173. package/lib/typescript/src/native/SFSymbol.ios.d.ts.map +1 -1
  174. package/lib/typescript/src/native/SFSymbolViewNativeComponent.d.ts +27 -14
  175. package/lib/typescript/src/native/SFSymbolViewNativeComponent.d.ts.map +1 -1
  176. package/lib/typescript/src/native/types.d.ts +241 -45
  177. package/lib/typescript/src/native/types.d.ts.map +1 -1
  178. package/lib/typescript/src/{ServerContext.d.ts → server/ServerContext.d.ts} +1 -4
  179. package/lib/typescript/src/server/ServerContext.d.ts.map +1 -0
  180. package/lib/typescript/src/server/index.d.ts +10 -0
  181. package/lib/typescript/src/server/index.d.ts.map +1 -0
  182. package/lib/typescript/src/theming/DarkTheme.d.ts +4 -38
  183. package/lib/typescript/src/theming/DarkTheme.d.ts.map +1 -1
  184. package/lib/typescript/src/theming/LightTheme.d.ts +30 -0
  185. package/lib/typescript/src/theming/LightTheme.d.ts.map +1 -0
  186. package/lib/typescript/src/theming/{DefaultTheme.d.ts → MaterialFallbackTheme.d.ts} +25 -30
  187. package/lib/typescript/src/theming/MaterialFallbackTheme.d.ts.map +1 -0
  188. package/lib/typescript/src/theming/MaterialTheme.android.d.ts +115 -0
  189. package/lib/typescript/src/theming/MaterialTheme.android.d.ts.map +1 -0
  190. package/lib/typescript/src/theming/MaterialTheme.d.ts +2 -0
  191. package/lib/typescript/src/theming/MaterialTheme.d.ts.map +1 -0
  192. package/lib/typescript/src/theming/fonts.d.ts +0 -34
  193. package/lib/typescript/src/theming/fonts.d.ts.map +1 -1
  194. package/lib/typescript/src/theming/fonts.native.d.ts +36 -0
  195. package/lib/typescript/src/theming/fonts.native.d.ts.map +1 -0
  196. package/lib/typescript/src/types.d.ts +27 -21
  197. package/lib/typescript/src/types.d.ts.map +1 -1
  198. package/lib/typescript/src/useBackButton.d.ts +1 -1
  199. package/lib/typescript/src/useBackButton.d.ts.map +1 -1
  200. package/lib/typescript/src/useBackButton.native.d.ts.map +1 -1
  201. package/lib/typescript/src/useDeepStableValue.d.ts +2 -0
  202. package/lib/typescript/src/useDeepStableValue.d.ts.map +1 -0
  203. package/lib/typescript/src/useDocumentTitle.d.ts +2 -2
  204. package/lib/typescript/src/useDocumentTitle.d.ts.map +1 -1
  205. package/lib/typescript/src/useLinkBuilder.d.ts +56 -68
  206. package/lib/typescript/src/useLinkBuilder.d.ts.map +1 -1
  207. package/lib/typescript/src/useLinkProps.d.ts +36 -12
  208. package/lib/typescript/src/useLinkProps.d.ts.map +1 -1
  209. package/lib/typescript/src/useLinking.d.ts +7 -45
  210. package/lib/typescript/src/useLinking.d.ts.map +1 -1
  211. package/lib/typescript/src/useLinking.native.d.ts +9 -83
  212. package/lib/typescript/src/useLinking.native.d.ts.map +1 -1
  213. package/lib/typescript/src/useLocale.d.ts +1 -1
  214. package/lib/typescript/src/useMemoArray.d.ts +2 -0
  215. package/lib/typescript/src/useMemoArray.d.ts.map +1 -0
  216. package/lib/typescript/src/useScrollToTop.d.ts +0 -2
  217. package/lib/typescript/src/useScrollToTop.d.ts.map +1 -1
  218. package/lib/typescript/src/useThenable.d.ts +1 -1
  219. package/lib/typescript/src/useThenable.d.ts.map +1 -1
  220. package/package.json +48 -23
  221. package/src/Link.native.tsx +69 -0
  222. package/src/Link.tsx +126 -37
  223. package/src/NavigationContainer.tsx +134 -64
  224. package/src/__stubs__/createStackNavigator.tsx +19 -17
  225. package/src/checkSerializable.tsx +246 -0
  226. package/src/constants.native.tsx +10 -0
  227. package/src/constants.tsx +5 -0
  228. package/src/createMemoryHistory.tsx +28 -7
  229. package/src/createStandardNavigationFactories.tsx +219 -0
  230. package/src/createStaticNavigation.tsx +13 -17
  231. package/src/extractPathFromURL.tsx +5 -3
  232. package/src/getStateBreadcrumb.tsx +44 -0
  233. package/src/getStateFromHref.tsx +8 -3
  234. package/src/index.tsx +11 -2
  235. package/src/native/CornerInset.ios.tsx +87 -0
  236. package/src/native/CornerInset.tsx +44 -0
  237. package/src/native/MaterialSymbol.android.tsx +11 -22
  238. package/src/native/MaterialSymbol.tsx +7 -2
  239. package/src/native/MaterialSymbolData.tsx +166 -0
  240. package/src/native/MaterialSymbolViewNativeComponent.ts +7 -4
  241. package/src/native/ReactNavigationCornerInsetViewNativeComponent.ts +31 -0
  242. package/src/native/SFSymbol.ios.tsx +80 -18
  243. package/src/native/SFSymbol.tsx +7 -2
  244. package/src/native/SFSymbolViewNativeComponent.ts +31 -15
  245. package/src/native/types.tsx +297 -47
  246. package/src/{ServerContext.tsx → server/ServerContext.tsx} +1 -4
  247. package/src/server/index.tsx +19 -0
  248. package/src/theming/DarkTheme.tsx +4 -4
  249. package/src/theming/{DefaultTheme.tsx → LightTheme.tsx} +4 -4
  250. package/src/theming/MaterialFallbackTheme.tsx +29 -0
  251. package/src/theming/MaterialTheme.android.tsx +45 -0
  252. package/src/theming/MaterialTheme.tsx +4 -0
  253. package/src/theming/fonts.native.tsx +41 -0
  254. package/src/theming/fonts.tsx +15 -54
  255. package/src/types.tsx +52 -45
  256. package/src/useBackButton.native.tsx +2 -0
  257. package/src/useBackButton.tsx +2 -2
  258. package/src/useDeepStableValue.tsx +12 -0
  259. package/src/useDocumentTitle.tsx +2 -2
  260. package/src/useLinkBuilder.tsx +16 -23
  261. package/src/useLinkProps.tsx +379 -126
  262. package/src/useLinkTo.tsx +1 -1
  263. package/src/useLinking.native.tsx +64 -35
  264. package/src/useLinking.tsx +323 -47
  265. package/src/useLocale.tsx +1 -1
  266. package/src/useMemoArray.tsx +41 -0
  267. package/src/useRoutePath.tsx +1 -1
  268. package/src/useScrollToTop.tsx +3 -9
  269. package/src/useThenable.tsx +9 -7
  270. package/android/build/.transforms/586a73aab4c351d3f13dc604ca6964e8/results.bin +0 -1
  271. package/android/build/.transforms/586a73aab4c351d3f13dc604ca6964e8/transformed/classes/classes_dex/classes.dex +0 -0
  272. package/android/build/.transforms/fb9c4b42fa16b6541a5819cb4bf06272/results.bin +0 -1
  273. package/android/build/.transforms/fb9c4b42fa16b6541a5819cb4bf06272/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/facebook/fbreact/specs/NativeMaterialSymbolModuleSpec.dex +0 -0
  274. package/android/build/.transforms/fb9c4b42fa16b6541a5819cb4bf06272/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/facebook/react/viewmanagers/ReactNavigationMaterialSymbolViewManagerDelegate.dex +0 -0
  275. package/android/build/.transforms/fb9c4b42fa16b6541a5819cb4bf06272/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/facebook/react/viewmanagers/ReactNavigationMaterialSymbolViewManagerInterface.dex +0 -0
  276. package/android/build/.transforms/fb9c4b42fa16b6541a5819cb4bf06272/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/facebook/react/viewmanagers/ReactNavigationSFSymbolViewManagerDelegate.dex +0 -0
  277. package/android/build/.transforms/fb9c4b42fa16b6541a5819cb4bf06272/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/facebook/react/viewmanagers/ReactNavigationSFSymbolViewManagerInterface.dex +0 -0
  278. package/android/build/.transforms/fb9c4b42fa16b6541a5819cb4bf06272/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/org/reactnavigation/BuildConfig.dex +0 -0
  279. package/android/build/.transforms/fb9c4b42fa16b6541a5819cb4bf06272/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/org/reactnavigation/MaterialSymbolModule$Companion.dex +0 -0
  280. package/android/build/.transforms/fb9c4b42fa16b6541a5819cb4bf06272/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/org/reactnavigation/MaterialSymbolModule$WhenMappings.dex +0 -0
  281. package/android/build/.transforms/fb9c4b42fa16b6541a5819cb4bf06272/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/org/reactnavigation/MaterialSymbolModule$getImageSource$1.dex +0 -0
  282. package/android/build/.transforms/fb9c4b42fa16b6541a5819cb4bf06272/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/org/reactnavigation/MaterialSymbolModule.dex +0 -0
  283. package/android/build/.transforms/fb9c4b42fa16b6541a5819cb4bf06272/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/org/reactnavigation/MaterialSymbolTypeface.dex +0 -0
  284. package/android/build/.transforms/fb9c4b42fa16b6541a5819cb4bf06272/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/org/reactnavigation/MaterialSymbolTypefaceResult.dex +0 -0
  285. package/android/build/.transforms/fb9c4b42fa16b6541a5819cb4bf06272/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/org/reactnavigation/MaterialSymbolView.dex +0 -0
  286. package/android/build/.transforms/fb9c4b42fa16b6541a5819cb4bf06272/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/org/reactnavigation/MaterialSymbolViewManager$Companion.dex +0 -0
  287. package/android/build/.transforms/fb9c4b42fa16b6541a5819cb4bf06272/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/org/reactnavigation/MaterialSymbolViewManager.dex +0 -0
  288. package/android/build/.transforms/fb9c4b42fa16b6541a5819cb4bf06272/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/org/reactnavigation/ReactNavigationPackage.dex +0 -0
  289. package/android/build/.transforms/fb9c4b42fa16b6541a5819cb4bf06272/transformed/bundleLibRuntimeToDirDebug/desugar_graph.bin +0 -0
  290. package/android/build/generated/source/buildConfig/debug/org/reactnavigation/BuildConfig.java +0 -10
  291. package/android/build/generated/source/codegen/java/com/facebook/fbreact/specs/NativeMaterialSymbolModuleSpec.java +0 -39
  292. package/android/build/generated/source/codegen/java/com/facebook/react/viewmanagers/ReactNavigationMaterialSymbolViewManagerDelegate.java +0 -45
  293. package/android/build/generated/source/codegen/java/com/facebook/react/viewmanagers/ReactNavigationMaterialSymbolViewManagerInterface.java +0 -22
  294. package/android/build/generated/source/codegen/java/com/facebook/react/viewmanagers/ReactNavigationSFSymbolViewManagerDelegate.java +0 -39
  295. package/android/build/generated/source/codegen/java/com/facebook/react/viewmanagers/ReactNavigationSFSymbolViewManagerInterface.java +0 -20
  296. package/android/build/generated/source/codegen/jni/CMakeLists.txt +0 -28
  297. package/android/build/generated/source/codegen/jni/ReactNavigationSpec-generated.cpp +0 -32
  298. package/android/build/generated/source/codegen/jni/ReactNavigationSpec.h +0 -31
  299. package/android/build/generated/source/codegen/jni/react/renderer/components/ReactNavigationSpec/ComponentDescriptors.cpp +0 -23
  300. package/android/build/generated/source/codegen/jni/react/renderer/components/ReactNavigationSpec/ComponentDescriptors.h +0 -25
  301. package/android/build/generated/source/codegen/jni/react/renderer/components/ReactNavigationSpec/EventEmitters.cpp +0 -17
  302. package/android/build/generated/source/codegen/jni/react/renderer/components/ReactNavigationSpec/EventEmitters.h +0 -30
  303. package/android/build/generated/source/codegen/jni/react/renderer/components/ReactNavigationSpec/Props.cpp +0 -106
  304. package/android/build/generated/source/codegen/jni/react/renderer/components/ReactNavigationSpec/Props.h +0 -118
  305. package/android/build/generated/source/codegen/jni/react/renderer/components/ReactNavigationSpec/ReactNavigationSpecJSI-generated.cpp +0 -31
  306. package/android/build/generated/source/codegen/jni/react/renderer/components/ReactNavigationSpec/ReactNavigationSpecJSI.h +0 -71
  307. package/android/build/generated/source/codegen/jni/react/renderer/components/ReactNavigationSpec/ShadowNodes.cpp +0 -18
  308. package/android/build/generated/source/codegen/jni/react/renderer/components/ReactNavigationSpec/ShadowNodes.h +0 -43
  309. package/android/build/generated/source/codegen/jni/react/renderer/components/ReactNavigationSpec/States.cpp +0 -16
  310. package/android/build/generated/source/codegen/jni/react/renderer/components/ReactNavigationSpec/States.h +0 -22
  311. package/android/build/generated/source/codegen/schema.json +0 -1
  312. package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/AndroidManifest.xml +0 -7
  313. package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/output-metadata.json +0 -18
  314. package/android/build/intermediates/aar_metadata/debug/writeDebugAarMetadata/aar-metadata.properties +0 -6
  315. package/android/build/intermediates/annotation_processor_list/debug/javaPreCompileDebug/annotationProcessors.json +0 -1
  316. package/android/build/intermediates/assets/debug/mergeDebugAssets/fonts/MaterialSymbols.hash +0 -1
  317. package/android/build/intermediates/assets/debug/mergeDebugAssets/fonts/MaterialSymbolsOutlined_400.ttf +0 -0
  318. package/android/build/intermediates/compile_library_classes_jar/debug/bundleLibCompileToJarDebug/classes.jar +0 -0
  319. package/android/build/intermediates/compile_r_class_jar/debug/generateDebugRFile/R.jar +0 -0
  320. package/android/build/intermediates/compile_symbol_list/debug/generateDebugRFile/R.txt +0 -0
  321. package/android/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties +0 -1
  322. package/android/build/intermediates/incremental/debug/packageDebugResources/merger.xml +0 -2
  323. package/android/build/intermediates/incremental/mergeDebugAssets/merger.xml +0 -2
  324. package/android/build/intermediates/incremental/mergeDebugJniLibFolders/merger.xml +0 -2
  325. package/android/build/intermediates/incremental/mergeDebugShaders/merger.xml +0 -2
  326. package/android/build/intermediates/java_res/debug/processDebugJavaRes/out/META-INF/react-navigation_native_debug.kotlin_module +0 -0
  327. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/facebook/fbreact/specs/NativeMaterialSymbolModuleSpec.class +0 -0
  328. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/facebook/react/viewmanagers/ReactNavigationMaterialSymbolViewManagerDelegate.class +0 -0
  329. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/facebook/react/viewmanagers/ReactNavigationMaterialSymbolViewManagerInterface.class +0 -0
  330. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/facebook/react/viewmanagers/ReactNavigationSFSymbolViewManagerDelegate.class +0 -0
  331. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/facebook/react/viewmanagers/ReactNavigationSFSymbolViewManagerInterface.class +0 -0
  332. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/org/reactnavigation/BuildConfig.class +0 -0
  333. package/android/build/intermediates/local_only_symbol_list/debug/parseDebugLocalResources/R-def.txt +0 -2
  334. package/android/build/intermediates/manifest_merge_blame_file/debug/processDebugManifest/manifest-merger-blame-debug-report.txt +0 -7
  335. package/android/build/intermediates/merged_manifest/debug/processDebugManifest/AndroidManifest.xml +0 -7
  336. package/android/build/intermediates/navigation_json/debug/extractDeepLinksDebug/navigation.json +0 -1
  337. package/android/build/intermediates/nested_resources_validation_report/debug/generateDebugResources/nestedResourcesValidationReport.txt +0 -1
  338. package/android/build/intermediates/react-navigation/fonts/MaterialSymbols.hash +0 -1
  339. package/android/build/intermediates/react-navigation/fonts/MaterialSymbolsOutlined_400.ttf +0 -0
  340. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/META-INF/react-navigation_native_debug.kotlin_module +0 -0
  341. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/facebook/fbreact/specs/NativeMaterialSymbolModuleSpec.class +0 -0
  342. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/facebook/react/viewmanagers/ReactNavigationMaterialSymbolViewManagerDelegate.class +0 -0
  343. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/facebook/react/viewmanagers/ReactNavigationMaterialSymbolViewManagerInterface.class +0 -0
  344. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/facebook/react/viewmanagers/ReactNavigationSFSymbolViewManagerDelegate.class +0 -0
  345. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/facebook/react/viewmanagers/ReactNavigationSFSymbolViewManagerInterface.class +0 -0
  346. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/org/reactnavigation/BuildConfig.class +0 -0
  347. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/org/reactnavigation/MaterialSymbolModule$Companion.class +0 -0
  348. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/org/reactnavigation/MaterialSymbolModule$WhenMappings.class +0 -0
  349. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/org/reactnavigation/MaterialSymbolModule$getImageSource$1.class +0 -0
  350. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/org/reactnavigation/MaterialSymbolModule.class +0 -0
  351. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/org/reactnavigation/MaterialSymbolTypeface.class +0 -0
  352. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/org/reactnavigation/MaterialSymbolTypefaceResult.class +0 -0
  353. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/org/reactnavigation/MaterialSymbolView.class +0 -0
  354. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/org/reactnavigation/MaterialSymbolViewManager$Companion.class +0 -0
  355. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/org/reactnavigation/MaterialSymbolViewManager.class +0 -0
  356. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/org/reactnavigation/ReactNavigationPackage.class +0 -0
  357. package/android/build/intermediates/runtime_library_classes_jar/debug/bundleLibRuntimeToJarDebug/classes.jar +0 -0
  358. package/android/build/intermediates/symbol_list_with_package_name/debug/generateDebugRFile/package-aware-r.txt +0 -1
  359. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab +0 -0
  360. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream +0 -0
  361. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream.len +0 -0
  362. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.len +0 -0
  363. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.values.at +0 -0
  364. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i +0 -0
  365. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i.len +0 -0
  366. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab +0 -0
  367. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream +0 -0
  368. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream.len +0 -0
  369. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.len +0 -0
  370. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.values.at +0 -0
  371. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i +0 -0
  372. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i.len +0 -0
  373. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab +0 -0
  374. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream +0 -0
  375. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream.len +0 -0
  376. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.len +0 -0
  377. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.values.at +0 -0
  378. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i +0 -0
  379. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i.len +0 -0
  380. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab +0 -0
  381. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.keystream +0 -0
  382. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.keystream.len +0 -0
  383. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.len +0 -0
  384. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.values.at +0 -0
  385. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab_i +0 -0
  386. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab_i.len +0 -0
  387. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab +0 -0
  388. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream +0 -0
  389. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream.len +0 -0
  390. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.len +0 -0
  391. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values.at +0 -0
  392. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i +0 -0
  393. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i.len +0 -0
  394. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab +0 -0
  395. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream +0 -0
  396. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream.len +0 -0
  397. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.len +0 -0
  398. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values.at +0 -0
  399. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i +0 -0
  400. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i.len +0 -0
  401. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab +0 -0
  402. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream +0 -0
  403. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream.len +0 -0
  404. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.len +0 -0
  405. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.values.at +0 -0
  406. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i +0 -0
  407. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i.len +0 -0
  408. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab +0 -0
  409. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream +0 -0
  410. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream.len +0 -0
  411. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.len +0 -0
  412. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.values.at +0 -0
  413. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i +0 -0
  414. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i.len +0 -0
  415. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab +0 -0
  416. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream +0 -0
  417. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream.len +0 -0
  418. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.len +0 -0
  419. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.values.at +0 -0
  420. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i +0 -0
  421. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i.len +0 -0
  422. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/counters.tab +0 -2
  423. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab +0 -0
  424. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream +0 -0
  425. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream.len +0 -0
  426. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.len +0 -0
  427. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.values.at +0 -0
  428. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i +0 -0
  429. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i.len +0 -0
  430. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab +0 -0
  431. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream +0 -0
  432. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream.len +0 -0
  433. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.len +0 -0
  434. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.values.at +0 -0
  435. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i +0 -0
  436. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i.len +0 -0
  437. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab +0 -0
  438. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream +0 -0
  439. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream.len +0 -0
  440. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.len +0 -0
  441. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.at +0 -0
  442. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i +0 -0
  443. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i.len +0 -0
  444. package/android/build/kotlin/compileDebugKotlin/cacheable/last-build.bin +0 -0
  445. package/android/build/kotlin/compileDebugKotlin/classpath-snapshot/shrunk-classpath-snapshot.bin +0 -0
  446. package/android/build/outputs/logs/manifest-merger-debug-report.txt +0 -16
  447. package/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
  448. package/android/build/tmp/kotlin-classes/debug/META-INF/react-navigation_native_debug.kotlin_module +0 -0
  449. package/android/build/tmp/kotlin-classes/debug/org/reactnavigation/MaterialSymbolModule$Companion.class +0 -0
  450. package/android/build/tmp/kotlin-classes/debug/org/reactnavigation/MaterialSymbolModule$WhenMappings.class +0 -0
  451. package/android/build/tmp/kotlin-classes/debug/org/reactnavigation/MaterialSymbolModule$getImageSource$1.class +0 -0
  452. package/android/build/tmp/kotlin-classes/debug/org/reactnavigation/MaterialSymbolModule.class +0 -0
  453. package/android/build/tmp/kotlin-classes/debug/org/reactnavigation/MaterialSymbolTypeface.class +0 -0
  454. package/android/build/tmp/kotlin-classes/debug/org/reactnavigation/MaterialSymbolTypefaceResult.class +0 -0
  455. package/android/build/tmp/kotlin-classes/debug/org/reactnavigation/MaterialSymbolView.class +0 -0
  456. package/android/build/tmp/kotlin-classes/debug/org/reactnavigation/MaterialSymbolViewManager$Companion.class +0 -0
  457. package/android/build/tmp/kotlin-classes/debug/org/reactnavigation/MaterialSymbolViewManager.class +0 -0
  458. package/android/build/tmp/kotlin-classes/debug/org/reactnavigation/ReactNavigationPackage.class +0 -0
  459. package/lib/module/ServerContainer.js +0 -55
  460. package/lib/module/ServerContainer.js.map +0 -1
  461. package/lib/module/ServerContext.js.map +0 -1
  462. package/lib/module/__stubs__/window.js +0 -75
  463. package/lib/module/__stubs__/window.js.map +0 -1
  464. package/lib/module/theming/DefaultTheme.js +0 -16
  465. package/lib/module/theming/DefaultTheme.js.map +0 -1
  466. package/lib/typescript/src/ServerContainer.d.ts +0 -14
  467. package/lib/typescript/src/ServerContainer.d.ts.map +0 -1
  468. package/lib/typescript/src/ServerContext.d.ts.map +0 -1
  469. package/lib/typescript/src/__stubs__/window.d.ts +0 -18
  470. package/lib/typescript/src/__stubs__/window.d.ts.map +0 -1
  471. package/lib/typescript/src/theming/DefaultTheme.d.ts.map +0 -1
  472. package/src/ServerContainer.tsx +0 -57
  473. package/src/__stubs__/window.tsx +0 -77
  474. /package/lib/module/{ServerContext.js → server/ServerContext.js} +0 -0
@@ -1,4 +1,5 @@
1
1
  import {
2
+ CommonActions,
2
3
  findFocusedRoute,
3
4
  getActionFromState as getActionFromStateDefault,
4
5
  getPathFromState as getPathFromStateDefault,
@@ -6,27 +7,84 @@ import {
6
7
  type NavigationContainerRef,
7
8
  type NavigationState,
8
9
  type ParamListBase,
10
+ type PartialState,
9
11
  useNavigationIndependentTree,
10
12
  } from '@react-navigation/core';
11
13
  import isEqual from 'fast-deep-equal';
12
14
  import * as React from 'react';
13
15
 
14
16
  import { createMemoryHistory } from './createMemoryHistory';
15
- import { ServerContext } from './ServerContext';
17
+ import { ServerContext } from './server/ServerContext';
16
18
  import type { LinkingOptions } from './types';
17
19
  import type { Thenable } from './useThenable';
18
20
 
19
- type ResultState = ReturnType<typeof getStateFromPathDefault>;
21
+ /**
22
+ * History delta already applied by the browser when handling `popstate`
23
+ * The value 'replace' means the delta is unknown, so we can only replace
24
+ */
25
+ type PopStateDelta = number | 'replace';
26
+
27
+ const getRoutesUntilIndex = (state: NavigationState) =>
28
+ state.routes.slice(0, state.index + 1);
29
+
30
+ /**
31
+ * Get the state object to construct the path from.
32
+ *
33
+ * We use the root state as the base, and fallback to existing `route.state`.
34
+ * If a navigator mounts later, this ensures we don't remove it from URL.
35
+ * It could happen during suspense, hydration, conditional rendering etc.
36
+ */
37
+ const getStateForPath = (
38
+ state: NavigationState | PartialState<NavigationState>,
39
+ fallbackState: NavigationState | PartialState<NavigationState> | undefined
40
+ ): Omit<PartialState<NavigationState>, 'stale'> => {
41
+ const index = state.index ?? state.routes.length - 1;
42
+ const route = state.routes[index];
43
+
44
+ if (route == null) {
45
+ return state;
46
+ }
47
+
48
+ const fallbackRoute = fallbackState?.routes[index];
49
+
50
+ if (
51
+ (fallbackRoute != null &&
52
+ 'key' in fallbackRoute &&
53
+ typeof fallbackRoute?.key === 'string' &&
54
+ typeof route?.key === 'string' &&
55
+ fallbackRoute.key !== route.key) ||
56
+ route.name !== fallbackRoute?.name
57
+ ) {
58
+ return state;
59
+ }
60
+
61
+ const childState = route.state
62
+ ? getStateForPath(route.state, fallbackRoute.state)
63
+ : fallbackRoute.state;
64
+
65
+ if (route.state === childState) {
66
+ return state;
67
+ }
68
+
69
+ return {
70
+ ...state,
71
+ routes: state.routes.map((item) =>
72
+ item === route ? { ...item, state: childState } : item
73
+ ),
74
+ };
75
+ };
20
76
 
21
77
  /**
22
78
  * Calculate total history length including both navigator history and route history
23
79
  */
24
80
  const getTotalHistoryLength = (state: NavigationState): number => {
81
+ const routes = getRoutesUntilIndex(state);
82
+
25
83
  const baseHistoryLength = state.history
26
84
  ? state.history.length
27
- : state.routes.length;
85
+ : routes.length;
28
86
 
29
- const routeHistoryLength = state.routes.reduce((acc, r) => {
87
+ const routeHistoryLength = routes.reduce((acc, r) => {
30
88
  return acc + (r.history ? r.history.length : 0);
31
89
  }, 0);
32
90
 
@@ -51,6 +109,10 @@ const findMatchingState = <T extends NavigationState>(
51
109
  const aRoute = a.routes[a.index];
52
110
  const bRoute = b.routes[b.index];
53
111
 
112
+ if (aRoute == null || bRoute == null) {
113
+ return [a, b];
114
+ }
115
+
54
116
  const aChildState = aRoute.state as T | undefined;
55
117
  const bChildState = bRoute.state as T | undefined;
56
118
 
@@ -74,31 +136,75 @@ const findMatchingState = <T extends NavigationState>(
74
136
  return findMatchingState(aChildState, bChildState);
75
137
  };
76
138
 
139
+ /**
140
+ * Check if the state change is popping the last route or history entry.
141
+ */
142
+ const isPoppingLastEntry = (
143
+ current: NavigationState,
144
+ record: NavigationState
145
+ ): boolean => {
146
+ const currentRoute = current.routes[current.index];
147
+ const recordRoute = record.routes[record.index];
148
+
149
+ if (currentRoute == null || recordRoute == null) {
150
+ return false;
151
+ }
152
+
153
+ const currentRouteHistory = currentRoute.history;
154
+ const recordRouteHistory = recordRoute.history ?? [];
155
+
156
+ if (currentRouteHistory?.length) {
157
+ return (
158
+ currentRoute.key === recordRoute.key &&
159
+ currentRouteHistory.length === recordRouteHistory.length + 1
160
+ );
161
+ }
162
+
163
+ if (current.history && record.history) {
164
+ return current.history.length === record.history.length + 1;
165
+ }
166
+
167
+ const currentRoutes = getRoutesUntilIndex(current);
168
+ const recordRoutes = getRoutesUntilIndex(record);
169
+
170
+ if (currentRoutes.length === recordRoutes.length + 1) {
171
+ return recordRoutes.every((route, i) => {
172
+ const currentRoute = currentRoutes[i];
173
+
174
+ return currentRoute != null && route.key === currentRoute.key;
175
+ });
176
+ }
177
+
178
+ return false;
179
+ };
180
+
77
181
  /**
78
182
  * Run async function in series as it's called.
79
183
  */
80
184
  export const series = (cb: () => Promise<void>) => {
81
185
  let queue = Promise.resolve();
186
+
82
187
  const callback = () => {
83
188
  // eslint-disable-next-line promise/no-callback-in-promise
84
- queue = queue.then(cb);
189
+ queue = queue.then(cb).catch((e) => {
190
+ console.error(e);
191
+ });
85
192
  };
193
+
86
194
  return callback;
87
195
  };
88
196
 
89
197
  const linkingHandlers = new Set<symbol>();
90
198
 
91
- type Options = LinkingOptions<ParamListBase>;
92
-
93
- export function useLinking(
94
- ref: React.RefObject<NavigationContainerRef<ParamListBase> | null>,
199
+ export function useLinking<ParamList extends ParamListBase>(
200
+ ref: React.RefObject<NavigationContainerRef<ParamList> | null>,
95
201
  {
96
202
  enabled = true,
97
203
  config,
98
204
  getStateFromPath = getStateFromPathDefault,
99
205
  getPathFromState = getPathFromStateDefault,
100
206
  getActionFromState = getActionFromStateDefault,
101
- }: Options
207
+ }: LinkingOptions<ParamList>
102
208
  ) {
103
209
  const independent = useNavigationIndependentTree();
104
210
 
@@ -134,7 +240,15 @@ export function useLinking(
134
240
  };
135
241
  }, [enabled, independent]);
136
242
 
137
- const [history] = React.useState(createMemoryHistory);
243
+ const server = React.use(ServerContext);
244
+
245
+ const [history] = React.useState(() => {
246
+ if (server || typeof window === 'undefined') {
247
+ return undefined;
248
+ }
249
+
250
+ return createMemoryHistory();
251
+ });
138
252
 
139
253
  // We store these options in ref to avoid re-creating getInitialState and re-subscribing listeners
140
254
  // This lets user avoid wrapping the items in `React.useCallback` or `React.useMemo`
@@ -154,7 +268,7 @@ export function useLinking(
154
268
  });
155
269
 
156
270
  const validateRoutesNotExistInRootState = React.useCallback(
157
- (state: ResultState) => {
271
+ (state: PartialState<NavigationState>) => {
158
272
  const navigation = ref.current;
159
273
  const rootState = navigation?.getRootState();
160
274
  // Make sure that the routes in the state exist in the root navigator
@@ -164,24 +278,30 @@ export function useLinking(
164
278
  [ref]
165
279
  );
166
280
 
167
- const server = React.useContext(ServerContext);
168
-
169
281
  const getInitialState = React.useCallback(() => {
170
- let value: ResultState | undefined;
282
+ let value: PartialState<NavigationState> | undefined;
171
283
 
172
284
  if (enabledRef.current) {
173
- const location =
174
- server?.location ??
175
- (typeof window !== 'undefined' ? window.location : undefined);
285
+ const location = server
286
+ ? server.location
287
+ : typeof window !== 'undefined'
288
+ ? window.location
289
+ : undefined;
176
290
 
177
291
  const path = location ? location.pathname + location.search : undefined;
178
292
 
179
293
  if (path) {
180
- value = getStateFromPathRef.current(path, configRef.current);
294
+ try {
295
+ value = getStateFromPathRef.current(path, configRef.current);
296
+ } catch (e) {
297
+ console.error(e);
298
+
299
+ value = undefined;
300
+ }
181
301
  }
182
302
  }
183
303
 
184
- const thenable: Thenable<ResultState | undefined> = {
304
+ const thenable: Thenable<PartialState<NavigationState> | undefined> = {
185
305
  then(onfulfilled) {
186
306
  return Promise.resolve(onfulfilled ? onfulfilled(value) : value);
187
307
  },
@@ -193,9 +313,15 @@ export function useLinking(
193
313
 
194
314
  const previousIndexRef = React.useRef<number | undefined>(undefined);
195
315
  const previousStateRef = React.useRef<NavigationState | undefined>(undefined);
196
- const pendingPopStatePathRef = React.useRef<string | undefined>(undefined);
316
+ const pendingPopStateDeltaRef = React.useRef<PopStateDelta | undefined>(
317
+ undefined
318
+ );
197
319
 
198
320
  React.useEffect(() => {
321
+ if (!history) {
322
+ return;
323
+ }
324
+
199
325
  previousIndexRef.current = history.index;
200
326
 
201
327
  return history.listen(() => {
@@ -213,7 +339,88 @@ export function useLinking(
213
339
  const previousIndex = previousIndexRef.current ?? 0;
214
340
 
215
341
  previousIndexRef.current = index;
216
- pendingPopStatePathRef.current = path;
342
+
343
+ const rollbackHistory = () => {
344
+ const delta = previousIndex - index;
345
+
346
+ if (delta === 0) {
347
+ return;
348
+ }
349
+
350
+ history
351
+ .go(delta)
352
+ // eslint-disable-next-line promise/always-return
353
+ ?.then(() => {
354
+ previousIndexRef.current = history.index;
355
+ })
356
+ .catch(() => {
357
+ // The navigation was interrupted
358
+ });
359
+ };
360
+
361
+ const rollbackHistoryIfPrevented = (
362
+ callback: () => void,
363
+ pendingDelta: PopStateDelta
364
+ ) => {
365
+ let removePrevented = false;
366
+ let actionChangedState = false;
367
+
368
+ const unsubscribeEvent = navigation.addListener(
369
+ '__unsafe_event__',
370
+ (e) => {
371
+ if (e.data.type === 'beforeRemove' && e.data.defaultPrevented) {
372
+ removePrevented = true;
373
+ }
374
+ }
375
+ );
376
+
377
+ // After preventing remove, user may synchronously continue navigation
378
+ // This is common when showing a confirmation dialog
379
+ // If this action produces an update, we don't want to rollback the history
380
+ const unsubscribeAction = navigation.addListener(
381
+ '__unsafe_action__',
382
+ (e) => {
383
+ if (!e.data.noop) {
384
+ actionChangedState = true;
385
+ }
386
+ }
387
+ );
388
+
389
+ try {
390
+ callback();
391
+ } finally {
392
+ unsubscribeEvent();
393
+ unsubscribeAction();
394
+ }
395
+
396
+ if (actionChangedState) {
397
+ // The change may be committed later, e.g. with transitions
398
+ // Remember the delta so it can be subtracted when syncing the commit
399
+ pendingPopStateDeltaRef.current = pendingDelta;
400
+ } else if (removePrevented) {
401
+ rollbackHistory();
402
+ }
403
+ };
404
+
405
+ const dispatch = (
406
+ action: Parameters<typeof navigation.dispatch>[0],
407
+ pendingDelta: PopStateDelta
408
+ ) => {
409
+ rollbackHistoryIfPrevented(
410
+ () => navigation.dispatch(action),
411
+ pendingDelta
412
+ );
413
+ };
414
+
415
+ const resetRoot = (
416
+ state: Parameters<typeof navigation.resetRoot>[0],
417
+ pendingDelta: PopStateDelta
418
+ ) => {
419
+ rollbackHistoryIfPrevented(
420
+ () => navigation.resetRoot(state),
421
+ pendingDelta
422
+ );
423
+ };
217
424
 
218
425
  // When browser back/forward is clicked, we first need to check if state object for this index exists
219
426
  // If it does we'll reset to that state object
@@ -221,11 +428,56 @@ export function useLinking(
221
428
  const record = history.get(index);
222
429
 
223
430
  if (record?.path === path && record?.state) {
224
- navigation.resetRoot(record.state);
431
+ const currentState = navigation.getRootState();
432
+
433
+ const [currentFocused, recordFocused] = findMatchingState(
434
+ currentState,
435
+ record.state
436
+ );
437
+
438
+ if (
439
+ previousIndex - index === 1 &&
440
+ currentFocused &&
441
+ recordFocused &&
442
+ isPoppingLastEntry(currentFocused, recordFocused)
443
+ ) {
444
+ const pending = pendingPopStateDeltaRef.current;
445
+
446
+ // If we detect that the state change is popping the last entry
447
+ // Dispatch a back action instead of resetting to the state
448
+ // This makes sure changes to history state since the entry was added don't get lost
449
+ dispatch(
450
+ CommonActions.goBack(),
451
+ // Stack on any delta from a previous `popstate` that hasn't committed yet
452
+ pending === 'replace' ? 'replace' : (pending ?? 0) - 1
453
+ );
454
+ } else {
455
+ // The browser already moved from the current state to the record's state
456
+ resetRoot(
457
+ record.state,
458
+ currentFocused && recordFocused
459
+ ? getTotalHistoryLength(recordFocused) -
460
+ getTotalHistoryLength(currentFocused)
461
+ : 'replace'
462
+ );
463
+ }
464
+
225
465
  return;
226
466
  }
227
467
 
228
- const state = getStateFromPathRef.current(path, configRef.current);
468
+ let state: PartialState<NavigationState> | undefined;
469
+
470
+ try {
471
+ state = getStateFromPathRef.current(
472
+ path,
473
+ configRef.current,
474
+ navigation.getRootState()
475
+ );
476
+ } catch (e) {
477
+ console.error(e);
478
+
479
+ state = undefined;
480
+ }
229
481
 
230
482
  // We should only dispatch an action when going forward
231
483
  // Otherwise the action will likely add items to history, which would mess things up
@@ -244,7 +496,7 @@ export function useLinking(
244
496
 
245
497
  if (action !== undefined) {
246
498
  try {
247
- navigation.dispatch(action);
499
+ dispatch(action, 'replace');
248
500
  } catch (e) {
249
501
  // Ignore any errors from deep linking.
250
502
  // This could happen in case of malformed links, navigation object not being initialized etc.
@@ -257,36 +509,44 @@ export function useLinking(
257
509
  );
258
510
  }
259
511
  } else {
260
- navigation.resetRoot(state);
512
+ resetRoot(state, 'replace');
261
513
  }
262
514
  } else {
263
- navigation.resetRoot(state);
515
+ resetRoot(state, 'replace');
264
516
  }
265
517
  } else {
266
518
  // if current path didn't return any state, we should revert to initial state
267
- navigation.resetRoot(state);
519
+ resetRoot(state, 'replace');
268
520
  }
269
521
  });
270
522
  }, [enabled, history, ref, validateRoutesNotExistInRootState]);
271
523
 
272
524
  React.useEffect(() => {
273
- if (!enabled) {
525
+ if (!enabled || !history) {
274
526
  return;
275
527
  }
276
528
 
277
529
  const getPathForRoute = (
278
530
  route: ReturnType<typeof findFocusedRoute>,
279
- state: NavigationState
531
+ state: NavigationState | PartialState<NavigationState>
280
532
  ): string => {
281
533
  let path;
282
534
 
283
535
  // If the `route` object contains a `path`, use that path as long as `route.name` and `params` still match
284
536
  // This makes sure that we preserve the original URL for wildcard routes
285
537
  if (route?.path) {
286
- const stateForPath = getStateFromPathRef.current(
287
- route.path,
288
- configRef.current
289
- );
538
+ let stateForPath: PartialState<NavigationState> | undefined;
539
+
540
+ try {
541
+ stateForPath = getStateFromPathRef.current(
542
+ route.path,
543
+ configRef.current
544
+ );
545
+ } catch (e) {
546
+ console.error(e);
547
+
548
+ stateForPath = undefined;
549
+ }
290
550
 
291
551
  if (stateForPath) {
292
552
  const focusedRoute = findFocusedRoute(stateForPath);
@@ -329,18 +589,21 @@ export function useLinking(
329
589
  const state = ref.current.getRootState();
330
590
 
331
591
  if (state) {
332
- const route = findFocusedRoute(state);
333
- const path = getPathForRoute(route, state);
592
+ const stateForPath = getStateForPath(state, ref.current.getState());
593
+
594
+ const route = findFocusedRoute(stateForPath);
595
+ const path = getPathForRoute(route, stateForPath);
334
596
 
335
597
  if (previousStateRef.current === undefined) {
336
598
  previousStateRef.current = state;
337
599
  }
338
600
 
339
601
  history.replace({ path, state });
602
+ previousIndexRef.current = history.index;
340
603
  }
341
604
  }
342
605
 
343
- const onStateChange = async () => {
606
+ const onUpdate = async () => {
344
607
  const navigation = ref.current;
345
608
 
346
609
  if (!navigation || !enabled) {
@@ -355,12 +618,20 @@ export function useLinking(
355
618
  return;
356
619
  }
357
620
 
358
- const pendingPath = pendingPopStatePathRef.current;
359
- const route = findFocusedRoute(state);
360
- const path = getPathForRoute(route, state);
621
+ // Skip if the state hasn't changed since we last synced it
622
+ if (previousState === state) {
623
+ return;
624
+ }
625
+
626
+ const stateForPath = getStateForPath(state, navigation.getState());
627
+
628
+ const route = findFocusedRoute(stateForPath);
629
+ const path = getPathForRoute(route, stateForPath);
630
+
631
+ const pendingPopStateDelta = pendingPopStateDeltaRef.current;
361
632
 
362
633
  previousStateRef.current = state;
363
- pendingPopStatePathRef.current = undefined;
634
+ pendingPopStateDeltaRef.current = undefined;
364
635
 
365
636
  // To detect the kind of state change, we need to:
366
637
  // - Find the common focused navigation state in previous and current state
@@ -374,13 +645,14 @@ export function useLinking(
374
645
  if (
375
646
  previousFocusedState &&
376
647
  focusedState &&
377
- // We should only handle push/pop if path changed from what was in last `popstate`
378
- // Otherwise it's likely a change triggered by `popstate`
379
- path !== pendingPath
648
+ // If the delta from `popstate` is unknown, we can only replace
649
+ pendingPopStateDelta !== 'replace'
380
650
  ) {
381
651
  const historyDelta =
382
652
  getTotalHistoryLength(focusedState) -
383
- getTotalHistoryLength(previousFocusedState);
653
+ getTotalHistoryLength(previousFocusedState) -
654
+ // Subtract the delta already applied by the browser to sync only the remaining changes
655
+ (pendingPopStateDelta ?? 0);
384
656
 
385
657
  if (historyDelta > 0) {
386
658
  // If history length is increased, we should pushState
@@ -422,12 +694,16 @@ export function useLinking(
422
694
  // This would happen if the user did a reset/conditionally changed navigators
423
695
  history.replace({ path, state });
424
696
  }
697
+
698
+ previousIndexRef.current = history.index;
425
699
  };
426
700
 
427
- // We debounce onStateChange coz we don't want multiple state changes to be handled at one time
701
+ // We debounce onUpdate coz we don't want multiple state changes to be handled at one time
428
702
  // This could happen since `history.go(n)` is asynchronous
429
703
  // If `pushState` or `replaceState` were called before `history.go(n)` completes, it'll mess stuff up
430
- return ref.current?.addListener('state', series(onStateChange));
704
+ const handleUpdate = series(onUpdate);
705
+
706
+ return ref.current?.addListener('state', handleUpdate);
431
707
  }, [enabled, history, ref]);
432
708
 
433
709
  return {
package/src/useLocale.tsx CHANGED
@@ -6,7 +6,7 @@ import { LocaleDirContext } from './LocaleDirContext';
6
6
  * Hook to access the text direction specified in the `NavigationContainer`.
7
7
  */
8
8
  export function useLocale() {
9
- const direction = React.useContext(LocaleDirContext);
9
+ const direction = React.use(LocaleDirContext);
10
10
 
11
11
  if (direction === undefined) {
12
12
  throw new Error(
@@ -0,0 +1,41 @@
1
+ import * as React from 'react';
2
+
3
+ export function useMemoArray<T>(
4
+ entries: [item: T, deps: readonly unknown[]][]
5
+ ): T[] {
6
+ const previousRef = React.useRef<
7
+ | {
8
+ entries: { item: T; deps: readonly unknown[] }[];
9
+ items: T[];
10
+ }
11
+ | undefined
12
+ >(undefined);
13
+
14
+ const previous = previousRef.current;
15
+ const next = entries.map(([item, deps], index) => {
16
+ const previousEntry = previous?.entries[index];
17
+ const depsEqual =
18
+ previousEntry &&
19
+ previousEntry.deps.length === deps.length &&
20
+ previousEntry.deps.every((it, index) => Object.is(it, deps[index]));
21
+
22
+ return depsEqual ? previousEntry : { item, deps };
23
+ });
24
+
25
+ if (
26
+ previous &&
27
+ previous.entries.length === next.length &&
28
+ next.every((entry, index) => entry === previous.entries[index])
29
+ ) {
30
+ return previous.items;
31
+ }
32
+
33
+ const items = next.map((entry) => entry.item);
34
+
35
+ previousRef.current = {
36
+ entries: next,
37
+ items,
38
+ };
39
+
40
+ return items;
41
+ }
@@ -9,7 +9,7 @@ import { LinkingContext } from './LinkingContext';
9
9
  * @returns Path for the current route.
10
10
  */
11
11
  export function useRoutePath() {
12
- const { options } = React.useContext(LinkingContext);
12
+ const { options } = React.use(LinkingContext);
13
13
  const state = useStateForPath();
14
14
 
15
15
  if (state === undefined) {
@@ -18,7 +18,6 @@ type ScrollableView =
18
18
 
19
19
  type ScrollableWrapper =
20
20
  | { getScrollResponder(): React.ReactNode | ScrollView }
21
- | { getNode(): ScrollableView }
22
21
  | ScrollableView
23
22
  | null;
24
23
 
@@ -39,19 +38,13 @@ function getScrollableNode(ref: React.RefObject<ScrollableWrapper>) {
39
38
  // If the view is a wrapper like FlatList, SectionList etc.
40
39
  // We need to use `getScrollResponder` to get access to the scroll responder
41
40
  return ref.current.getScrollResponder();
42
- } else if ('getNode' in ref.current) {
43
- // When a `ScrollView` is wrapped in `Animated.createAnimatedComponent`
44
- // we need to use `getNode` to get the ref to the actual scrollview.
45
- // Note that `getNode` is deprecated in newer versions of react-native
46
- // this is why we check if we already have a scrollable node above.
47
- return ref.current.getNode();
48
41
  } else {
49
42
  return ref.current;
50
43
  }
51
44
  }
52
45
 
53
46
  export function useScrollToTop(ref: React.RefObject<ScrollableWrapper>) {
54
- const navigation = React.useContext(NavigationContext);
47
+ const navigation = React.use(NavigationContext);
55
48
  const route = useRoute();
56
49
 
57
50
  if (navigation === undefined) {
@@ -91,9 +84,10 @@ export function useScrollToTop(ref: React.RefObject<ScrollableWrapper>) {
91
84
 
92
85
  // In a nested stack navigator, tab press resets the stack to first screen
93
86
  // So we should scroll to top only when we are on first screen
87
+ const firstRoute = navigation.getState().routes[0];
94
88
  const isFirst =
95
89
  tabNavigations.includes(navigation) ||
96
- navigation.getState().routes[0].key === route.key;
90
+ firstRoute?.key === route.key;
97
91
 
98
92
  // Run the operation in the next frame so we're sure all listeners have been run
99
93
  // This is necessary to know if preventDefault() has been called