@react-navigation/core 7.0.0-rc.1 → 7.0.0-rc.11

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 (549) hide show
  1. package/lib/commonjs/BaseNavigationContainer.js +43 -33
  2. package/lib/commonjs/BaseNavigationContainer.js.map +1 -1
  3. package/lib/commonjs/EnsureSingleNavigator.js +5 -3
  4. package/lib/commonjs/EnsureSingleNavigator.js.map +1 -1
  5. package/lib/commonjs/NavigationIndependentTree.js +14 -10
  6. package/lib/commonjs/NavigationIndependentTree.js.map +1 -1
  7. package/lib/commonjs/PreventRemoveProvider.js +8 -6
  8. package/lib/commonjs/PreventRemoveProvider.js.map +1 -1
  9. package/lib/commonjs/SceneView.js +23 -18
  10. package/lib/commonjs/SceneView.js.map +1 -1
  11. package/lib/commonjs/StaticNavigation.js +57 -35
  12. package/lib/commonjs/StaticNavigation.js.map +1 -1
  13. package/lib/commonjs/createNavigatorFactory.js +2 -2
  14. package/lib/commonjs/getFocusedRouteNameFromRoute.js +1 -1
  15. package/lib/commonjs/getPathFromState.js +1 -1
  16. package/lib/commonjs/getStateFromPath.js +2 -2
  17. package/lib/commonjs/index.js +32 -32
  18. package/lib/commonjs/package.json +1 -0
  19. package/lib/commonjs/theming/ThemeProvider.js +6 -4
  20. package/lib/commonjs/theming/ThemeProvider.js.map +1 -1
  21. package/lib/commonjs/theming/useTheme.js +1 -1
  22. package/lib/commonjs/types.js +20 -2
  23. package/lib/commonjs/types.js.map +1 -1
  24. package/lib/commonjs/useComponent.js +5 -3
  25. package/lib/commonjs/useComponent.js.map +1 -1
  26. package/lib/commonjs/useCurrentRender.js +1 -1
  27. package/lib/commonjs/useDescriptors.js +19 -16
  28. package/lib/commonjs/useDescriptors.js.map +1 -1
  29. package/lib/commonjs/useFocusEffect.js +1 -1
  30. package/lib/commonjs/useFocusEvents.js +1 -1
  31. package/lib/commonjs/useFocusedListenersChildrenAdapter.js +1 -1
  32. package/lib/commonjs/useIsFocused.js +7 -18
  33. package/lib/commonjs/useIsFocused.js.map +1 -1
  34. package/lib/commonjs/useNavigation.js +2 -2
  35. package/lib/commonjs/useNavigationBuilder.js +32 -28
  36. package/lib/commonjs/useNavigationBuilder.js.map +1 -1
  37. package/lib/commonjs/useNavigationCache.js +1 -1
  38. package/lib/commonjs/useNavigationContainerRef.js +1 -1
  39. package/lib/commonjs/useNavigationHelpers.js +3 -3
  40. package/lib/commonjs/useNavigationIndependentTree.js +1 -1
  41. package/lib/commonjs/useNavigationState.js +6 -16
  42. package/lib/commonjs/useNavigationState.js.map +1 -1
  43. package/lib/commonjs/useOnAction.js +3 -3
  44. package/lib/commonjs/useOnGetState.js +3 -3
  45. package/lib/commonjs/useOnPreventRemove.js +2 -2
  46. package/lib/commonjs/useOnRouteFocus.js +1 -1
  47. package/lib/commonjs/useOptionsGetters.js +2 -2
  48. package/lib/commonjs/usePreventRemove.js +3 -3
  49. package/lib/commonjs/usePreventRemoveContext.js +1 -1
  50. package/lib/commonjs/useRegisterNavigator.js +1 -1
  51. package/lib/commonjs/useRoute.js +1 -1
  52. package/lib/commonjs/useRouteCache.js +1 -1
  53. package/lib/commonjs/useSyncState.js +1 -1
  54. package/lib/module/BaseNavigationContainer.js +45 -33
  55. package/lib/module/BaseNavigationContainer.js.map +1 -1
  56. package/lib/module/CurrentRenderContext.js +2 -0
  57. package/lib/module/CurrentRenderContext.js.map +1 -1
  58. package/lib/module/DeprecatedNavigationInChildContext.js +2 -0
  59. package/lib/module/DeprecatedNavigationInChildContext.js.map +1 -1
  60. package/lib/module/EnsureSingleNavigator.js +7 -3
  61. package/lib/module/EnsureSingleNavigator.js.map +1 -1
  62. package/lib/module/Group.js +2 -0
  63. package/lib/module/Group.js.map +1 -1
  64. package/lib/module/NavigationBuilderContext.js +2 -0
  65. package/lib/module/NavigationBuilderContext.js.map +1 -1
  66. package/lib/module/NavigationContainerRefContext.js +2 -0
  67. package/lib/module/NavigationContainerRefContext.js.map +1 -1
  68. package/lib/module/NavigationContext.js +2 -0
  69. package/lib/module/NavigationContext.js.map +1 -1
  70. package/lib/module/NavigationHelpersContext.js +2 -0
  71. package/lib/module/NavigationHelpersContext.js.map +1 -1
  72. package/lib/module/NavigationIndependentTree.js +16 -10
  73. package/lib/module/NavigationIndependentTree.js.map +1 -1
  74. package/lib/module/NavigationIndependentTreeContext.js +2 -0
  75. package/lib/module/NavigationIndependentTreeContext.js.map +1 -1
  76. package/lib/module/NavigationRouteContext.js +2 -0
  77. package/lib/module/NavigationRouteContext.js.map +1 -1
  78. package/lib/module/NavigationStateContext.js +2 -0
  79. package/lib/module/NavigationStateContext.js.map +1 -1
  80. package/lib/module/PreventRemoveContext.js +2 -0
  81. package/lib/module/PreventRemoveContext.js.map +1 -1
  82. package/lib/module/PreventRemoveProvider.js +10 -6
  83. package/lib/module/PreventRemoveProvider.js.map +1 -1
  84. package/lib/module/SceneView.js +25 -18
  85. package/lib/module/SceneView.js.map +1 -1
  86. package/lib/module/Screen.js +2 -0
  87. package/lib/module/Screen.js.map +1 -1
  88. package/lib/module/StaticContainer.js +2 -0
  89. package/lib/module/StaticContainer.js.map +1 -1
  90. package/lib/module/StaticNavigation.js +58 -35
  91. package/lib/module/StaticNavigation.js.map +1 -1
  92. package/lib/module/UnhandledActionContext.js +2 -0
  93. package/lib/module/UnhandledActionContext.js.map +1 -1
  94. package/lib/module/checkDuplicateRouteNames.js +2 -0
  95. package/lib/module/checkDuplicateRouteNames.js.map +1 -1
  96. package/lib/module/checkSerializable.js +2 -0
  97. package/lib/module/checkSerializable.js.map +1 -1
  98. package/lib/module/createNavigationContainerRef.js +2 -0
  99. package/lib/module/createNavigationContainerRef.js.map +1 -1
  100. package/lib/module/createNavigatorFactory.js +4 -2
  101. package/lib/module/createNavigatorFactory.js.map +1 -1
  102. package/lib/module/deepFreeze.js +2 -0
  103. package/lib/module/deepFreeze.js.map +1 -1
  104. package/lib/module/findFocusedRoute.js +2 -0
  105. package/lib/module/findFocusedRoute.js.map +1 -1
  106. package/lib/module/getActionFromState.js +2 -0
  107. package/lib/module/getActionFromState.js.map +1 -1
  108. package/lib/module/getFocusedRouteNameFromRoute.js +3 -1
  109. package/lib/module/getFocusedRouteNameFromRoute.js.map +1 -1
  110. package/lib/module/getPathFromState.js +3 -1
  111. package/lib/module/getPathFromState.js.map +1 -1
  112. package/lib/module/getStateFromPath.js +4 -2
  113. package/lib/module/getStateFromPath.js.map +1 -1
  114. package/lib/module/index.js +34 -32
  115. package/lib/module/index.js.map +1 -1
  116. package/lib/module/isArrayEqual.js +2 -0
  117. package/lib/module/isArrayEqual.js.map +1 -1
  118. package/lib/module/isRecordEqual.js +2 -0
  119. package/lib/module/isRecordEqual.js.map +1 -1
  120. package/lib/module/package.json +1 -0
  121. package/lib/module/theming/ThemeContext.js +2 -0
  122. package/lib/module/theming/ThemeContext.js.map +1 -1
  123. package/lib/module/theming/ThemeProvider.js +8 -4
  124. package/lib/module/theming/ThemeProvider.js.map +1 -1
  125. package/lib/module/theming/useTheme.js +3 -1
  126. package/lib/module/theming/useTheme.js.map +1 -1
  127. package/lib/module/types.js +22 -1
  128. package/lib/module/types.js.map +1 -1
  129. package/lib/module/useChildListeners.js +2 -0
  130. package/lib/module/useChildListeners.js.map +1 -1
  131. package/lib/module/useComponent.js +7 -3
  132. package/lib/module/useComponent.js.map +1 -1
  133. package/lib/module/useCurrentRender.js +3 -1
  134. package/lib/module/useCurrentRender.js.map +1 -1
  135. package/lib/module/useDescriptors.js +21 -16
  136. package/lib/module/useDescriptors.js.map +1 -1
  137. package/lib/module/useEventEmitter.js +2 -0
  138. package/lib/module/useEventEmitter.js.map +1 -1
  139. package/lib/module/useFocusEffect.js +3 -1
  140. package/lib/module/useFocusEffect.js.map +1 -1
  141. package/lib/module/useFocusEvents.js +3 -1
  142. package/lib/module/useFocusEvents.js.map +1 -1
  143. package/lib/module/useFocusedListenersChildrenAdapter.js +3 -1
  144. package/lib/module/useFocusedListenersChildrenAdapter.js.map +1 -1
  145. package/lib/module/useIsFocused.js +8 -17
  146. package/lib/module/useIsFocused.js.map +1 -1
  147. package/lib/module/useIsomorphicLayoutEffect.js +2 -0
  148. package/lib/module/useIsomorphicLayoutEffect.js.map +1 -1
  149. package/lib/module/useIsomorphicLayoutEffect.native.js +2 -0
  150. package/lib/module/useIsomorphicLayoutEffect.native.js.map +1 -1
  151. package/lib/module/useKeyedChildListeners.js +2 -0
  152. package/lib/module/useKeyedChildListeners.js.map +1 -1
  153. package/lib/module/useLazyValue.js +2 -0
  154. package/lib/module/useLazyValue.js.map +1 -1
  155. package/lib/module/useNavigation.js +4 -2
  156. package/lib/module/useNavigation.js.map +1 -1
  157. package/lib/module/useNavigationBuilder.js +34 -28
  158. package/lib/module/useNavigationBuilder.js.map +1 -1
  159. package/lib/module/useNavigationCache.js +3 -1
  160. package/lib/module/useNavigationCache.js.map +1 -1
  161. package/lib/module/useNavigationContainerRef.js +3 -1
  162. package/lib/module/useNavigationContainerRef.js.map +1 -1
  163. package/lib/module/useNavigationHelpers.js +5 -3
  164. package/lib/module/useNavigationHelpers.js.map +1 -1
  165. package/lib/module/useNavigationIndependentTree.js +3 -1
  166. package/lib/module/useNavigationIndependentTree.js.map +1 -1
  167. package/lib/module/useNavigationState.js +8 -16
  168. package/lib/module/useNavigationState.js.map +1 -1
  169. package/lib/module/useOnAction.js +5 -3
  170. package/lib/module/useOnAction.js.map +1 -1
  171. package/lib/module/useOnGetState.js +5 -3
  172. package/lib/module/useOnGetState.js.map +1 -1
  173. package/lib/module/useOnPreventRemove.js +4 -2
  174. package/lib/module/useOnPreventRemove.js.map +1 -1
  175. package/lib/module/useOnRouteFocus.js +3 -1
  176. package/lib/module/useOnRouteFocus.js.map +1 -1
  177. package/lib/module/useOptionsGetters.js +4 -2
  178. package/lib/module/useOptionsGetters.js.map +1 -1
  179. package/lib/module/usePreventRemove.js +5 -3
  180. package/lib/module/usePreventRemove.js.map +1 -1
  181. package/lib/module/usePreventRemoveContext.js +3 -1
  182. package/lib/module/usePreventRemoveContext.js.map +1 -1
  183. package/lib/module/useRegisterNavigator.js +3 -1
  184. package/lib/module/useRegisterNavigator.js.map +1 -1
  185. package/lib/module/useRoute.js +3 -1
  186. package/lib/module/useRoute.js.map +1 -1
  187. package/lib/module/useRouteCache.js +3 -1
  188. package/lib/module/useRouteCache.js.map +1 -1
  189. package/lib/module/useSyncState.js +3 -1
  190. package/lib/module/useSyncState.js.map +1 -1
  191. package/lib/module/validatePathConfig.js +2 -0
  192. package/lib/module/validatePathConfig.js.map +1 -1
  193. package/lib/typescript/commonjs/package.json +1 -0
  194. package/lib/typescript/commonjs/src/BaseNavigationContainer.d.ts.map +1 -0
  195. package/lib/typescript/commonjs/src/CurrentRenderContext.d.ts.map +1 -0
  196. package/lib/typescript/commonjs/src/DeprecatedNavigationInChildContext.d.ts.map +1 -0
  197. package/lib/typescript/{src → commonjs/src}/EnsureSingleNavigator.d.ts +1 -1
  198. package/lib/typescript/commonjs/src/EnsureSingleNavigator.d.ts.map +1 -0
  199. package/lib/typescript/commonjs/src/Group.d.ts.map +1 -0
  200. package/lib/typescript/commonjs/src/NavigationBuilderContext.d.ts.map +1 -0
  201. package/lib/typescript/commonjs/src/NavigationContainerRefContext.d.ts.map +1 -0
  202. package/lib/typescript/commonjs/src/NavigationContext.d.ts.map +1 -0
  203. package/lib/typescript/commonjs/src/NavigationHelpersContext.d.ts.map +1 -0
  204. package/lib/typescript/{src → commonjs/src}/NavigationIndependentTree.d.ts +1 -1
  205. package/lib/typescript/commonjs/src/NavigationIndependentTree.d.ts.map +1 -0
  206. package/lib/typescript/commonjs/src/NavigationIndependentTreeContext.d.ts.map +1 -0
  207. package/lib/typescript/commonjs/src/NavigationRouteContext.d.ts.map +1 -0
  208. package/lib/typescript/commonjs/src/NavigationStateContext.d.ts.map +1 -0
  209. package/lib/typescript/commonjs/src/PreventRemoveContext.d.ts.map +1 -0
  210. package/lib/typescript/{src → commonjs/src}/PreventRemoveProvider.d.ts +1 -1
  211. package/lib/typescript/commonjs/src/PreventRemoveProvider.d.ts.map +1 -0
  212. package/lib/typescript/{src → commonjs/src}/SceneView.d.ts +1 -2
  213. package/lib/typescript/commonjs/src/SceneView.d.ts.map +1 -0
  214. package/lib/typescript/commonjs/src/Screen.d.ts.map +1 -0
  215. package/lib/typescript/commonjs/src/StaticContainer.d.ts.map +1 -0
  216. package/lib/typescript/{src → commonjs/src}/StaticNavigation.d.ts +2 -4
  217. package/lib/typescript/commonjs/src/StaticNavigation.d.ts.map +1 -0
  218. package/lib/typescript/commonjs/src/UnhandledActionContext.d.ts.map +1 -0
  219. package/lib/typescript/commonjs/src/checkDuplicateRouteNames.d.ts.map +1 -0
  220. package/lib/typescript/commonjs/src/checkSerializable.d.ts.map +1 -0
  221. package/lib/typescript/commonjs/src/createNavigationContainerRef.d.ts.map +1 -0
  222. package/lib/typescript/commonjs/src/createNavigatorFactory.d.ts.map +1 -0
  223. package/lib/typescript/commonjs/src/deepFreeze.d.ts.map +1 -0
  224. package/lib/typescript/commonjs/src/findFocusedRoute.d.ts.map +1 -0
  225. package/lib/typescript/commonjs/src/getActionFromState.d.ts.map +1 -0
  226. package/lib/typescript/commonjs/src/getFocusedRouteNameFromRoute.d.ts.map +1 -0
  227. package/lib/typescript/commonjs/src/getPathFromState.d.ts.map +1 -0
  228. package/lib/typescript/commonjs/src/getStateFromPath.d.ts.map +1 -0
  229. package/lib/typescript/commonjs/src/index.d.ts.map +1 -0
  230. package/lib/typescript/commonjs/src/isArrayEqual.d.ts.map +1 -0
  231. package/lib/typescript/commonjs/src/isRecordEqual.d.ts.map +1 -0
  232. package/lib/typescript/commonjs/src/theming/ThemeContext.d.ts.map +1 -0
  233. package/lib/typescript/{src → commonjs/src}/theming/ThemeProvider.d.ts +1 -1
  234. package/lib/typescript/commonjs/src/theming/ThemeProvider.d.ts.map +1 -0
  235. package/lib/typescript/commonjs/src/theming/useTheme.d.ts.map +1 -0
  236. package/lib/typescript/{src → commonjs/src}/types.d.ts +6 -6
  237. package/lib/typescript/commonjs/src/types.d.ts.map +1 -0
  238. package/lib/typescript/commonjs/src/useChildListeners.d.ts.map +1 -0
  239. package/lib/typescript/{src → commonjs/src}/useComponent.d.ts +1 -1
  240. package/lib/typescript/commonjs/src/useComponent.d.ts.map +1 -0
  241. package/lib/typescript/commonjs/src/useCurrentRender.d.ts.map +1 -0
  242. package/lib/typescript/commonjs/src/useDescriptors.d.ts.map +1 -0
  243. package/lib/typescript/commonjs/src/useEventEmitter.d.ts.map +1 -0
  244. package/lib/typescript/commonjs/src/useFocusEffect.d.ts.map +1 -0
  245. package/lib/typescript/commonjs/src/useFocusEvents.d.ts.map +1 -0
  246. package/lib/typescript/commonjs/src/useFocusedListenersChildrenAdapter.d.ts.map +1 -0
  247. package/lib/typescript/commonjs/src/useIsFocused.d.ts.map +1 -0
  248. package/lib/typescript/commonjs/src/useIsomorphicLayoutEffect.d.ts.map +1 -0
  249. package/lib/typescript/commonjs/src/useIsomorphicLayoutEffect.native.d.ts.map +1 -0
  250. package/lib/typescript/commonjs/src/useKeyedChildListeners.d.ts.map +1 -0
  251. package/lib/typescript/commonjs/src/useLazyValue.d.ts.map +1 -0
  252. package/lib/typescript/commonjs/src/useNavigation.d.ts.map +1 -0
  253. package/lib/typescript/{src → commonjs/src}/useNavigationBuilder.d.ts +1 -1
  254. package/lib/typescript/commonjs/src/useNavigationBuilder.d.ts.map +1 -0
  255. package/lib/typescript/commonjs/src/useNavigationCache.d.ts.map +1 -0
  256. package/lib/typescript/commonjs/src/useNavigationContainerRef.d.ts.map +1 -0
  257. package/lib/typescript/commonjs/src/useNavigationHelpers.d.ts.map +1 -0
  258. package/lib/typescript/commonjs/src/useNavigationIndependentTree.d.ts.map +1 -0
  259. package/lib/typescript/commonjs/src/useNavigationState.d.ts.map +1 -0
  260. package/lib/typescript/commonjs/src/useOnAction.d.ts.map +1 -0
  261. package/lib/typescript/commonjs/src/useOnGetState.d.ts.map +1 -0
  262. package/lib/typescript/commonjs/src/useOnPreventRemove.d.ts.map +1 -0
  263. package/lib/typescript/commonjs/src/useOnRouteFocus.d.ts.map +1 -0
  264. package/lib/typescript/commonjs/src/useOptionsGetters.d.ts.map +1 -0
  265. package/lib/typescript/commonjs/src/usePreventRemove.d.ts.map +1 -0
  266. package/lib/typescript/commonjs/src/usePreventRemoveContext.d.ts.map +1 -0
  267. package/lib/typescript/commonjs/src/useRegisterNavigator.d.ts.map +1 -0
  268. package/lib/typescript/commonjs/src/useRoute.d.ts.map +1 -0
  269. package/lib/typescript/commonjs/src/useRouteCache.d.ts.map +1 -0
  270. package/lib/typescript/commonjs/src/useSyncState.d.ts.map +1 -0
  271. package/lib/typescript/commonjs/src/validatePathConfig.d.ts.map +1 -0
  272. package/lib/typescript/commonjs/tsconfig.build.tsbuildinfo +1 -0
  273. package/lib/typescript/module/package.json +1 -0
  274. package/lib/typescript/module/src/BaseNavigationContainer.d.ts +17 -0
  275. package/lib/typescript/module/src/BaseNavigationContainer.d.ts.map +1 -0
  276. package/lib/typescript/module/src/CurrentRenderContext.d.ts +9 -0
  277. package/lib/typescript/module/src/CurrentRenderContext.d.ts.map +1 -0
  278. package/lib/typescript/module/src/DeprecatedNavigationInChildContext.d.ts +6 -0
  279. package/lib/typescript/module/src/DeprecatedNavigationInChildContext.d.ts.map +1 -0
  280. package/lib/typescript/module/src/EnsureSingleNavigator.d.ts +14 -0
  281. package/lib/typescript/module/src/EnsureSingleNavigator.d.ts.map +1 -0
  282. package/lib/typescript/module/src/Group.d.ts +7 -0
  283. package/lib/typescript/module/src/Group.d.ts.map +1 -0
  284. package/lib/typescript/module/src/NavigationBuilderContext.d.ts +34 -0
  285. package/lib/typescript/module/src/NavigationBuilderContext.d.ts.map +1 -0
  286. package/lib/typescript/module/src/NavigationContainerRefContext.d.ts +8 -0
  287. package/lib/typescript/module/src/NavigationContainerRefContext.d.ts.map +1 -0
  288. package/lib/typescript/module/src/NavigationContext.d.ts +8 -0
  289. package/lib/typescript/module/src/NavigationContext.d.ts.map +1 -0
  290. package/lib/typescript/module/src/NavigationHelpersContext.d.ts +9 -0
  291. package/lib/typescript/module/src/NavigationHelpersContext.d.ts.map +1 -0
  292. package/lib/typescript/module/src/NavigationIndependentTree.d.ts +8 -0
  293. package/lib/typescript/module/src/NavigationIndependentTree.d.ts.map +1 -0
  294. package/lib/typescript/module/src/NavigationIndependentTreeContext.d.ts +6 -0
  295. package/lib/typescript/module/src/NavigationIndependentTreeContext.d.ts.map +1 -0
  296. package/lib/typescript/module/src/NavigationRouteContext.d.ts +7 -0
  297. package/lib/typescript/module/src/NavigationRouteContext.d.ts.map +1 -0
  298. package/lib/typescript/module/src/NavigationStateContext.d.ts +13 -0
  299. package/lib/typescript/module/src/NavigationStateContext.d.ts.map +1 -0
  300. package/lib/typescript/module/src/PreventRemoveContext.d.ts +13 -0
  301. package/lib/typescript/module/src/PreventRemoveContext.d.ts.map +1 -0
  302. package/lib/typescript/module/src/PreventRemoveProvider.d.ts +10 -0
  303. package/lib/typescript/module/src/PreventRemoveProvider.d.ts.map +1 -0
  304. package/lib/typescript/module/src/SceneView.d.ts +21 -0
  305. package/lib/typescript/module/src/SceneView.d.ts.map +1 -0
  306. package/lib/typescript/module/src/Screen.d.ts +7 -0
  307. package/lib/typescript/module/src/Screen.d.ts.map +1 -0
  308. package/lib/typescript/module/src/StaticContainer.d.ts +6 -0
  309. package/lib/typescript/module/src/StaticContainer.d.ts.map +1 -0
  310. package/lib/typescript/module/src/StaticNavigation.d.ts +188 -0
  311. package/lib/typescript/module/src/StaticNavigation.d.ts.map +1 -0
  312. package/lib/typescript/module/src/UnhandledActionContext.d.ts +4 -0
  313. package/lib/typescript/module/src/UnhandledActionContext.d.ts.map +1 -0
  314. package/lib/typescript/module/src/checkDuplicateRouteNames.d.ts +3 -0
  315. package/lib/typescript/module/src/checkDuplicateRouteNames.d.ts.map +1 -0
  316. package/lib/typescript/module/src/checkSerializable.d.ts +10 -0
  317. package/lib/typescript/module/src/checkSerializable.d.ts.map +1 -0
  318. package/lib/typescript/module/src/createNavigationContainerRef.d.ts +4 -0
  319. package/lib/typescript/module/src/createNavigationContainerRef.d.ts.map +1 -0
  320. package/lib/typescript/module/src/createNavigatorFactory.d.ts +10 -0
  321. package/lib/typescript/module/src/createNavigatorFactory.d.ts.map +1 -0
  322. package/lib/typescript/module/src/deepFreeze.d.ts +3 -0
  323. package/lib/typescript/module/src/deepFreeze.d.ts.map +1 -0
  324. package/lib/typescript/module/src/findFocusedRoute.d.ts +5 -0
  325. package/lib/typescript/module/src/findFocusedRoute.d.ts.map +1 -0
  326. package/lib/typescript/module/src/getActionFromState.d.ts +17 -0
  327. package/lib/typescript/module/src/getActionFromState.d.ts.map +1 -0
  328. package/lib/typescript/module/src/getFocusedRouteNameFromRoute.d.ts +3 -0
  329. package/lib/typescript/module/src/getFocusedRouteNameFromRoute.d.ts.map +1 -0
  330. package/lib/typescript/module/src/getPathFromState.d.ts +40 -0
  331. package/lib/typescript/module/src/getPathFromState.d.ts.map +1 -0
  332. package/lib/typescript/module/src/getStateFromPath.d.ts +34 -0
  333. package/lib/typescript/module/src/getStateFromPath.d.ts.map +1 -0
  334. package/lib/typescript/module/src/index.d.ts +34 -0
  335. package/lib/typescript/module/src/index.d.ts.map +1 -0
  336. package/lib/typescript/module/src/isArrayEqual.d.ts +6 -0
  337. package/lib/typescript/module/src/isArrayEqual.d.ts.map +1 -0
  338. package/lib/typescript/module/src/isRecordEqual.d.ts +5 -0
  339. package/lib/typescript/module/src/isRecordEqual.d.ts.map +1 -0
  340. package/lib/typescript/module/src/theming/ThemeContext.d.ts +3 -0
  341. package/lib/typescript/module/src/theming/ThemeContext.d.ts.map +1 -0
  342. package/lib/typescript/module/src/theming/ThemeProvider.d.ts +8 -0
  343. package/lib/typescript/module/src/theming/ThemeProvider.d.ts.map +1 -0
  344. package/lib/typescript/module/src/theming/useTheme.d.ts +2 -0
  345. package/lib/typescript/module/src/theming/useTheme.d.ts.map +1 -0
  346. package/lib/typescript/module/src/types.d.ts +695 -0
  347. package/lib/typescript/module/src/types.d.ts.map +1 -0
  348. package/lib/typescript/module/src/useChildListeners.d.ts +12 -0
  349. package/lib/typescript/module/src/useChildListeners.d.ts.map +1 -0
  350. package/lib/typescript/module/src/useComponent.d.ts +7 -0
  351. package/lib/typescript/module/src/useComponent.d.ts.map +1 -0
  352. package/lib/typescript/module/src/useCurrentRender.d.ts +14 -0
  353. package/lib/typescript/module/src/useCurrentRender.d.ts.map +1 -0
  354. package/lib/typescript/module/src/useDescriptors.d.ts +133 -0
  355. package/lib/typescript/module/src/useDescriptors.d.ts.map +1 -0
  356. package/lib/typescript/module/src/useEventEmitter.d.ts +9 -0
  357. package/lib/typescript/module/src/useEventEmitter.d.ts.map +1 -0
  358. package/lib/typescript/module/src/useFocusEffect.d.ts +11 -0
  359. package/lib/typescript/module/src/useFocusEffect.d.ts.map +1 -0
  360. package/lib/typescript/module/src/useFocusEvents.d.ts +13 -0
  361. package/lib/typescript/module/src/useFocusEvents.d.ts.map +1 -0
  362. package/lib/typescript/module/src/useFocusedListenersChildrenAdapter.d.ts +13 -0
  363. package/lib/typescript/module/src/useFocusedListenersChildrenAdapter.d.ts.map +1 -0
  364. package/lib/typescript/module/src/useIsFocused.d.ts +6 -0
  365. package/lib/typescript/module/src/useIsFocused.d.ts.map +1 -0
  366. package/lib/typescript/module/src/useIsomorphicLayoutEffect.d.ts +6 -0
  367. package/lib/typescript/module/src/useIsomorphicLayoutEffect.d.ts.map +1 -0
  368. package/lib/typescript/module/src/useIsomorphicLayoutEffect.native.d.ts +3 -0
  369. package/lib/typescript/module/src/useIsomorphicLayoutEffect.native.d.ts.map +1 -0
  370. package/lib/typescript/module/src/useKeyedChildListeners.d.ts +12 -0
  371. package/lib/typescript/module/src/useKeyedChildListeners.d.ts.map +1 -0
  372. package/lib/typescript/module/src/useLazyValue.d.ts +2 -0
  373. package/lib/typescript/module/src/useLazyValue.d.ts.map +1 -0
  374. package/lib/typescript/module/src/useNavigation.d.ts +11 -0
  375. package/lib/typescript/module/src/useNavigation.d.ts.map +1 -0
  376. package/lib/typescript/module/src/useNavigationBuilder.d.ts +181 -0
  377. package/lib/typescript/module/src/useNavigationBuilder.d.ts.map +1 -0
  378. package/lib/typescript/module/src/useNavigationCache.d.ts +65 -0
  379. package/lib/typescript/module/src/useNavigationCache.d.ts.map +1 -0
  380. package/lib/typescript/module/src/useNavigationContainerRef.d.ts +3 -0
  381. package/lib/typescript/module/src/useNavigationContainerRef.d.ts.map +1 -0
  382. package/lib/typescript/module/src/useNavigationHelpers.d.ts +96 -0
  383. package/lib/typescript/module/src/useNavigationHelpers.d.ts.map +1 -0
  384. package/lib/typescript/module/src/useNavigationIndependentTree.d.ts +2 -0
  385. package/lib/typescript/module/src/useNavigationIndependentTree.d.ts.map +1 -0
  386. package/lib/typescript/module/src/useNavigationState.d.ts +10 -0
  387. package/lib/typescript/module/src/useNavigationState.d.ts.map +1 -0
  388. package/lib/typescript/module/src/useOnAction.d.ts +26 -0
  389. package/lib/typescript/module/src/useOnAction.d.ts.map +1 -0
  390. package/lib/typescript/module/src/useOnGetState.d.ts +9 -0
  391. package/lib/typescript/module/src/useOnGetState.d.ts.map +1 -0
  392. package/lib/typescript/module/src/useOnPreventRemove.d.ts +17 -0
  393. package/lib/typescript/module/src/useOnPreventRemove.d.ts.map +1 -0
  394. package/lib/typescript/module/src/useOnRouteFocus.d.ts +15 -0
  395. package/lib/typescript/module/src/useOnRouteFocus.d.ts.map +1 -0
  396. package/lib/typescript/module/src/useOptionsGetters.d.ts +13 -0
  397. package/lib/typescript/module/src/useOptionsGetters.d.ts.map +1 -0
  398. package/lib/typescript/module/src/usePreventRemove.d.ts +13 -0
  399. package/lib/typescript/module/src/usePreventRemove.d.ts.map +1 -0
  400. package/lib/typescript/module/src/usePreventRemoveContext.d.ts +5 -0
  401. package/lib/typescript/module/src/usePreventRemoveContext.d.ts.map +1 -0
  402. package/lib/typescript/module/src/useRegisterNavigator.d.ts +6 -0
  403. package/lib/typescript/module/src/useRegisterNavigator.d.ts.map +1 -0
  404. package/lib/typescript/module/src/useRoute.d.ts +9 -0
  405. package/lib/typescript/module/src/useRoute.d.ts.map +1 -0
  406. package/lib/typescript/module/src/useRouteCache.d.ts +14 -0
  407. package/lib/typescript/module/src/useRouteCache.d.ts.map +1 -0
  408. package/lib/typescript/module/src/useSyncState.d.ts +2 -0
  409. package/lib/typescript/module/src/useSyncState.d.ts.map +1 -0
  410. package/lib/typescript/module/src/validatePathConfig.d.ts +2 -0
  411. package/lib/typescript/module/src/validatePathConfig.d.ts.map +1 -0
  412. package/lib/typescript/module/tsconfig.build.tsbuildinfo +1 -0
  413. package/package.json +38 -13
  414. package/src/StaticNavigation.tsx +50 -34
  415. package/src/types.tsx +18 -11
  416. package/src/useIsFocused.tsx +20 -31
  417. package/src/useNavigationBuilder.tsx +3 -1
  418. package/src/useNavigationState.tsx +15 -17
  419. package/lib/typescript/src/BaseNavigationContainer.d.ts.map +0 -1
  420. package/lib/typescript/src/CurrentRenderContext.d.ts.map +0 -1
  421. package/lib/typescript/src/DeprecatedNavigationInChildContext.d.ts.map +0 -1
  422. package/lib/typescript/src/EnsureSingleNavigator.d.ts.map +0 -1
  423. package/lib/typescript/src/Group.d.ts.map +0 -1
  424. package/lib/typescript/src/NavigationBuilderContext.d.ts.map +0 -1
  425. package/lib/typescript/src/NavigationContainerRefContext.d.ts.map +0 -1
  426. package/lib/typescript/src/NavigationContext.d.ts.map +0 -1
  427. package/lib/typescript/src/NavigationHelpersContext.d.ts.map +0 -1
  428. package/lib/typescript/src/NavigationIndependentTree.d.ts.map +0 -1
  429. package/lib/typescript/src/NavigationIndependentTreeContext.d.ts.map +0 -1
  430. package/lib/typescript/src/NavigationRouteContext.d.ts.map +0 -1
  431. package/lib/typescript/src/NavigationStateContext.d.ts.map +0 -1
  432. package/lib/typescript/src/PreventRemoveContext.d.ts.map +0 -1
  433. package/lib/typescript/src/PreventRemoveProvider.d.ts.map +0 -1
  434. package/lib/typescript/src/SceneView.d.ts.map +0 -1
  435. package/lib/typescript/src/Screen.d.ts.map +0 -1
  436. package/lib/typescript/src/StaticContainer.d.ts.map +0 -1
  437. package/lib/typescript/src/StaticNavigation.d.ts.map +0 -1
  438. package/lib/typescript/src/UnhandledActionContext.d.ts.map +0 -1
  439. package/lib/typescript/src/checkDuplicateRouteNames.d.ts.map +0 -1
  440. package/lib/typescript/src/checkSerializable.d.ts.map +0 -1
  441. package/lib/typescript/src/createNavigationContainerRef.d.ts.map +0 -1
  442. package/lib/typescript/src/createNavigatorFactory.d.ts.map +0 -1
  443. package/lib/typescript/src/deepFreeze.d.ts.map +0 -1
  444. package/lib/typescript/src/findFocusedRoute.d.ts.map +0 -1
  445. package/lib/typescript/src/getActionFromState.d.ts.map +0 -1
  446. package/lib/typescript/src/getFocusedRouteNameFromRoute.d.ts.map +0 -1
  447. package/lib/typescript/src/getPathFromState.d.ts.map +0 -1
  448. package/lib/typescript/src/getStateFromPath.d.ts.map +0 -1
  449. package/lib/typescript/src/index.d.ts.map +0 -1
  450. package/lib/typescript/src/isArrayEqual.d.ts.map +0 -1
  451. package/lib/typescript/src/isRecordEqual.d.ts.map +0 -1
  452. package/lib/typescript/src/theming/ThemeContext.d.ts.map +0 -1
  453. package/lib/typescript/src/theming/ThemeProvider.d.ts.map +0 -1
  454. package/lib/typescript/src/theming/useTheme.d.ts.map +0 -1
  455. package/lib/typescript/src/types.d.ts.map +0 -1
  456. package/lib/typescript/src/useChildListeners.d.ts.map +0 -1
  457. package/lib/typescript/src/useComponent.d.ts.map +0 -1
  458. package/lib/typescript/src/useCurrentRender.d.ts.map +0 -1
  459. package/lib/typescript/src/useDescriptors.d.ts.map +0 -1
  460. package/lib/typescript/src/useEventEmitter.d.ts.map +0 -1
  461. package/lib/typescript/src/useFocusEffect.d.ts.map +0 -1
  462. package/lib/typescript/src/useFocusEvents.d.ts.map +0 -1
  463. package/lib/typescript/src/useFocusedListenersChildrenAdapter.d.ts.map +0 -1
  464. package/lib/typescript/src/useIsFocused.d.ts.map +0 -1
  465. package/lib/typescript/src/useIsomorphicLayoutEffect.d.ts.map +0 -1
  466. package/lib/typescript/src/useIsomorphicLayoutEffect.native.d.ts.map +0 -1
  467. package/lib/typescript/src/useKeyedChildListeners.d.ts.map +0 -1
  468. package/lib/typescript/src/useLazyValue.d.ts.map +0 -1
  469. package/lib/typescript/src/useNavigation.d.ts.map +0 -1
  470. package/lib/typescript/src/useNavigationBuilder.d.ts.map +0 -1
  471. package/lib/typescript/src/useNavigationCache.d.ts.map +0 -1
  472. package/lib/typescript/src/useNavigationContainerRef.d.ts.map +0 -1
  473. package/lib/typescript/src/useNavigationHelpers.d.ts.map +0 -1
  474. package/lib/typescript/src/useNavigationIndependentTree.d.ts.map +0 -1
  475. package/lib/typescript/src/useNavigationState.d.ts.map +0 -1
  476. package/lib/typescript/src/useOnAction.d.ts.map +0 -1
  477. package/lib/typescript/src/useOnGetState.d.ts.map +0 -1
  478. package/lib/typescript/src/useOnPreventRemove.d.ts.map +0 -1
  479. package/lib/typescript/src/useOnRouteFocus.d.ts.map +0 -1
  480. package/lib/typescript/src/useOptionsGetters.d.ts.map +0 -1
  481. package/lib/typescript/src/usePreventRemove.d.ts.map +0 -1
  482. package/lib/typescript/src/usePreventRemoveContext.d.ts.map +0 -1
  483. package/lib/typescript/src/useRegisterNavigator.d.ts.map +0 -1
  484. package/lib/typescript/src/useRoute.d.ts.map +0 -1
  485. package/lib/typescript/src/useRouteCache.d.ts.map +0 -1
  486. package/lib/typescript/src/useSyncState.d.ts.map +0 -1
  487. package/lib/typescript/src/validatePathConfig.d.ts.map +0 -1
  488. package/lib/typescript/utils/usePrevious.d.ts +0 -6
  489. package/lib/typescript/utils/usePrevious.d.ts.map +0 -1
  490. /package/lib/typescript/{src → commonjs/src}/BaseNavigationContainer.d.ts +0 -0
  491. /package/lib/typescript/{src → commonjs/src}/CurrentRenderContext.d.ts +0 -0
  492. /package/lib/typescript/{src → commonjs/src}/DeprecatedNavigationInChildContext.d.ts +0 -0
  493. /package/lib/typescript/{src → commonjs/src}/Group.d.ts +0 -0
  494. /package/lib/typescript/{src → commonjs/src}/NavigationBuilderContext.d.ts +0 -0
  495. /package/lib/typescript/{src → commonjs/src}/NavigationContainerRefContext.d.ts +0 -0
  496. /package/lib/typescript/{src → commonjs/src}/NavigationContext.d.ts +0 -0
  497. /package/lib/typescript/{src → commonjs/src}/NavigationHelpersContext.d.ts +0 -0
  498. /package/lib/typescript/{src → commonjs/src}/NavigationIndependentTreeContext.d.ts +0 -0
  499. /package/lib/typescript/{src → commonjs/src}/NavigationRouteContext.d.ts +0 -0
  500. /package/lib/typescript/{src → commonjs/src}/NavigationStateContext.d.ts +0 -0
  501. /package/lib/typescript/{src → commonjs/src}/PreventRemoveContext.d.ts +0 -0
  502. /package/lib/typescript/{src → commonjs/src}/Screen.d.ts +0 -0
  503. /package/lib/typescript/{src → commonjs/src}/StaticContainer.d.ts +0 -0
  504. /package/lib/typescript/{src → commonjs/src}/UnhandledActionContext.d.ts +0 -0
  505. /package/lib/typescript/{src → commonjs/src}/checkDuplicateRouteNames.d.ts +0 -0
  506. /package/lib/typescript/{src → commonjs/src}/checkSerializable.d.ts +0 -0
  507. /package/lib/typescript/{src → commonjs/src}/createNavigationContainerRef.d.ts +0 -0
  508. /package/lib/typescript/{src → commonjs/src}/createNavigatorFactory.d.ts +0 -0
  509. /package/lib/typescript/{src → commonjs/src}/deepFreeze.d.ts +0 -0
  510. /package/lib/typescript/{src → commonjs/src}/findFocusedRoute.d.ts +0 -0
  511. /package/lib/typescript/{src → commonjs/src}/getActionFromState.d.ts +0 -0
  512. /package/lib/typescript/{src → commonjs/src}/getFocusedRouteNameFromRoute.d.ts +0 -0
  513. /package/lib/typescript/{src → commonjs/src}/getPathFromState.d.ts +0 -0
  514. /package/lib/typescript/{src → commonjs/src}/getStateFromPath.d.ts +0 -0
  515. /package/lib/typescript/{src → commonjs/src}/index.d.ts +0 -0
  516. /package/lib/typescript/{src → commonjs/src}/isArrayEqual.d.ts +0 -0
  517. /package/lib/typescript/{src → commonjs/src}/isRecordEqual.d.ts +0 -0
  518. /package/lib/typescript/{src → commonjs/src}/theming/ThemeContext.d.ts +0 -0
  519. /package/lib/typescript/{src → commonjs/src}/theming/useTheme.d.ts +0 -0
  520. /package/lib/typescript/{src → commonjs/src}/useChildListeners.d.ts +0 -0
  521. /package/lib/typescript/{src → commonjs/src}/useCurrentRender.d.ts +0 -0
  522. /package/lib/typescript/{src → commonjs/src}/useDescriptors.d.ts +0 -0
  523. /package/lib/typescript/{src → commonjs/src}/useEventEmitter.d.ts +0 -0
  524. /package/lib/typescript/{src → commonjs/src}/useFocusEffect.d.ts +0 -0
  525. /package/lib/typescript/{src → commonjs/src}/useFocusEvents.d.ts +0 -0
  526. /package/lib/typescript/{src → commonjs/src}/useFocusedListenersChildrenAdapter.d.ts +0 -0
  527. /package/lib/typescript/{src → commonjs/src}/useIsFocused.d.ts +0 -0
  528. /package/lib/typescript/{src → commonjs/src}/useIsomorphicLayoutEffect.d.ts +0 -0
  529. /package/lib/typescript/{src → commonjs/src}/useIsomorphicLayoutEffect.native.d.ts +0 -0
  530. /package/lib/typescript/{src → commonjs/src}/useKeyedChildListeners.d.ts +0 -0
  531. /package/lib/typescript/{src → commonjs/src}/useLazyValue.d.ts +0 -0
  532. /package/lib/typescript/{src → commonjs/src}/useNavigation.d.ts +0 -0
  533. /package/lib/typescript/{src → commonjs/src}/useNavigationCache.d.ts +0 -0
  534. /package/lib/typescript/{src → commonjs/src}/useNavigationContainerRef.d.ts +0 -0
  535. /package/lib/typescript/{src → commonjs/src}/useNavigationHelpers.d.ts +0 -0
  536. /package/lib/typescript/{src → commonjs/src}/useNavigationIndependentTree.d.ts +0 -0
  537. /package/lib/typescript/{src → commonjs/src}/useNavigationState.d.ts +0 -0
  538. /package/lib/typescript/{src → commonjs/src}/useOnAction.d.ts +0 -0
  539. /package/lib/typescript/{src → commonjs/src}/useOnGetState.d.ts +0 -0
  540. /package/lib/typescript/{src → commonjs/src}/useOnPreventRemove.d.ts +0 -0
  541. /package/lib/typescript/{src → commonjs/src}/useOnRouteFocus.d.ts +0 -0
  542. /package/lib/typescript/{src → commonjs/src}/useOptionsGetters.d.ts +0 -0
  543. /package/lib/typescript/{src → commonjs/src}/usePreventRemove.d.ts +0 -0
  544. /package/lib/typescript/{src → commonjs/src}/usePreventRemoveContext.d.ts +0 -0
  545. /package/lib/typescript/{src → commonjs/src}/useRegisterNavigator.d.ts +0 -0
  546. /package/lib/typescript/{src → commonjs/src}/useRoute.d.ts +0 -0
  547. /package/lib/typescript/{src → commonjs/src}/useRouteCache.d.ts +0 -0
  548. /package/lib/typescript/{src → commonjs/src}/useSyncState.d.ts +0 -0
  549. /package/lib/typescript/{src → commonjs/src}/validatePathConfig.d.ts +0 -0
@@ -0,0 +1,65 @@
1
+ import { type NavigationAction, type NavigationState, type ParamListBase, type Router } from '@react-navigation/routers';
2
+ import type { NavigationHelpers, NavigationProp } from './types';
3
+ import type { NavigationEventEmitter } from './useEventEmitter';
4
+ type Options<State extends NavigationState, ScreenOptions extends {}, EventMap extends Record<string, any>> = {
5
+ state: State;
6
+ getState: () => State;
7
+ navigation: NavigationHelpers<ParamListBase> & Partial<NavigationProp<ParamListBase, string, any, any, any>>;
8
+ setOptions: (cb: (options: Record<string, ScreenOptions>) => Record<string, ScreenOptions>) => void;
9
+ router: Router<State, NavigationAction>;
10
+ emitter: NavigationEventEmitter<EventMap>;
11
+ };
12
+ type NavigationItem<State extends NavigationState, ScreenOptions extends {}, EventMap extends Record<string, any>> = NavigationProp<ParamListBase, string, string | undefined, State, ScreenOptions, EventMap>;
13
+ type NavigationCache<State extends NavigationState, ScreenOptions extends {}, EventMap extends Record<string, any>> = Record<string, NavigationItem<State, ScreenOptions, EventMap>>;
14
+ /**
15
+ * Hook to cache navigation objects for each screen in the navigator.
16
+ * It's important to cache them to make sure navigation objects don't change between renders.
17
+ * This lets us apply optimizations like `React.memo` to minimize re-rendering screens.
18
+ */
19
+ export declare function useNavigationCache<State extends NavigationState, ScreenOptions extends {}, EventMap extends Record<string, any>, ActionHelpers extends Record<string, () => void>>({ state, getState, navigation, setOptions, router, emitter, }: Options<State, ScreenOptions, EventMap>): {
20
+ base: Omit<{
21
+ dispatch(action: Readonly<{
22
+ type: string;
23
+ payload?: object;
24
+ source?: string;
25
+ target?: string;
26
+ }> | ((state: Readonly<State>) => NavigationAction)): void;
27
+ navigate<RouteName extends string>(...args: RouteName extends unknown ? [screen: RouteName] | [screen: RouteName, params: object | undefined] : never): void;
28
+ navigate<RouteName extends string>(options: RouteName extends unknown ? {
29
+ name: RouteName;
30
+ params: object | undefined;
31
+ path?: string;
32
+ merge?: boolean;
33
+ } : never): void;
34
+ navigateDeprecated<RouteName extends string>(...args: RouteName extends unknown ? [screen: RouteName] | [screen: RouteName, params: object | undefined] : never): void;
35
+ navigateDeprecated<RouteName extends string>(options: RouteName extends unknown ? {
36
+ name: RouteName;
37
+ params: object | undefined;
38
+ merge?: boolean;
39
+ } : never): void;
40
+ preload<RouteName extends string>(...args: RouteName extends unknown ? [screen: RouteName] | [screen: RouteName, params: object | undefined] : never): void;
41
+ reset(state: State | import("@react-navigation/routers").PartialState<State>): void;
42
+ goBack(): void;
43
+ isFocused(): boolean;
44
+ canGoBack(): boolean;
45
+ getId(): string | undefined;
46
+ getParent<T = NavigationHelpers<ParamListBase, {}> | undefined>(id?: string): T;
47
+ getState(): State;
48
+ setStateForNextRouteNamesChange(state: State | import("@react-navigation/routers").PartialState<State>): void;
49
+ } & import("./types").PrivateValueStore<[ParamListBase, unknown, unknown]>, "getParent"> & {
50
+ getParent<T = NavigationProp<ParamListBase, string, undefined, Readonly<{
51
+ key: string;
52
+ index: number;
53
+ routeNames: string[];
54
+ history?: unknown[];
55
+ routes: import("@react-navigation/routers").NavigationRoute<ParamListBase, string>[];
56
+ type: string;
57
+ stale: false;
58
+ }>, {}, {}> | undefined>(id?: string | undefined): T;
59
+ setParams(params: Partial<object | undefined>): void;
60
+ setOptions(options: Partial<ScreenOptions>): void;
61
+ } & import("./types").EventConsumer<EventMap & import("./types").EventMapCore<State>> & import("./types").PrivateValueStore<[ParamListBase, string, EventMap]> & ActionHelpers;
62
+ navigations: NavigationCache<State, ScreenOptions, EventMap>;
63
+ };
64
+ export {};
65
+ //# sourceMappingURL=useNavigationCache.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useNavigationCache.d.ts","sourceRoot":"","sources":["../../../../src/useNavigationCache.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,MAAM,EACZ,MAAM,2BAA2B,CAAC;AAInC,OAAO,KAAK,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AACjE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAEhE,KAAK,OAAO,CACV,KAAK,SAAS,eAAe,EAC7B,aAAa,SAAS,EAAE,EACxB,QAAQ,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,IAClC;IACF,KAAK,EAAE,KAAK,CAAC;IACb,QAAQ,EAAE,MAAM,KAAK,CAAC;IACtB,UAAU,EAAE,iBAAiB,CAAC,aAAa,CAAC,GAC1C,OAAO,CAAC,cAAc,CAAC,aAAa,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;IAChE,UAAU,EAAE,CACV,EAAE,EAAE,CACF,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,KACnC,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,KAC/B,IAAI,CAAC;IACV,MAAM,EAAE,MAAM,CAAC,KAAK,EAAE,gBAAgB,CAAC,CAAC;IACxC,OAAO,EAAE,sBAAsB,CAAC,QAAQ,CAAC,CAAC;CAC3C,CAAC;AAEF,KAAK,cAAc,CACjB,KAAK,SAAS,eAAe,EAC7B,aAAa,SAAS,EAAE,EACxB,QAAQ,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,IAClC,cAAc,CAChB,aAAa,EACb,MAAM,EACN,MAAM,GAAG,SAAS,EAClB,KAAK,EACL,aAAa,EACb,QAAQ,CACT,CAAC;AAEF,KAAK,eAAe,CAClB,KAAK,SAAS,eAAe,EAC7B,aAAa,SAAS,EAAE,EACxB,QAAQ,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,IAClC,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,KAAK,EAAE,aAAa,EAAE,QAAQ,CAAC,CAAC,CAAC;AAEnE;;;;GAIG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,SAAS,eAAe,EAC7B,aAAa,SAAS,EAAE,EACxB,QAAQ,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACpC,aAAa,SAAS,MAAM,CAAC,MAAM,EAAE,MAAM,IAAI,CAAC,EAChD,EACA,KAAK,EACL,QAAQ,EACR,UAAU,EACV,UAAU,EACV,MAAM,EACN,OAAO,GACR,EAAE,OAAO,CAAC,KAAK,EAAE,aAAa,EAAE,QAAQ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4KzC"}
@@ -0,0 +1,3 @@
1
+ import type { NavigationContainerRefWithCurrent } from './types';
2
+ export declare function useNavigationContainerRef<ParamList extends {} = ReactNavigation.RootParamList>(): NavigationContainerRefWithCurrent<ParamList>;
3
+ //# sourceMappingURL=useNavigationContainerRef.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useNavigationContainerRef.d.ts","sourceRoot":"","sources":["../../../../src/useNavigationContainerRef.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,SAAS,CAAC;AAEjE,wBAAgB,yBAAyB,CACvC,SAAS,SAAS,EAAE,GAAG,eAAe,CAAC,aAAa,KACjD,iCAAiC,CAAC,SAAS,CAAC,CAShD"}
@@ -0,0 +1,96 @@
1
+ import { type NavigationAction, type NavigationState, type ParamListBase, type Router } from '@react-navigation/routers';
2
+ import { type NavigationHelpers, PrivateValueStore } from './types';
3
+ import type { NavigationEventEmitter } from './useEventEmitter';
4
+ type Options<State extends NavigationState, Action extends NavigationAction> = {
5
+ id: string | undefined;
6
+ onAction: (action: NavigationAction) => boolean;
7
+ getState: () => State;
8
+ emitter: NavigationEventEmitter<any>;
9
+ router: Router<State, Action>;
10
+ };
11
+ /**
12
+ * Navigation object with helper methods to be used by a navigator.
13
+ * This object includes methods for common actions as well as methods the parent screen's navigation object.
14
+ */
15
+ export declare function useNavigationHelpers<State extends NavigationState, ActionHelpers extends Record<string, () => void>, Action extends NavigationAction, EventMap extends Record<string, any>>({ id: navigatorId, onAction, getState, emitter, router, }: Options<State, Action>): {
16
+ dispatch(action: Readonly<{
17
+ type: string;
18
+ payload?: object;
19
+ source?: string;
20
+ target?: string;
21
+ }> | ((state: Readonly<Readonly<{
22
+ key: string;
23
+ index: number;
24
+ routeNames: string[];
25
+ history?: unknown[];
26
+ routes: import("@react-navigation/routers").NavigationRoute<ParamListBase, string>[];
27
+ type: string;
28
+ stale: false;
29
+ }>>) => NavigationAction)): void;
30
+ navigate<RouteName extends string>(...args: RouteName extends unknown ? [screen: RouteName] | [screen: RouteName, params: object | undefined] : never): void;
31
+ navigate<RouteName extends string>(options: RouteName extends unknown ? {
32
+ name: RouteName;
33
+ params: object | undefined;
34
+ path?: string;
35
+ merge?: boolean;
36
+ } : never): void;
37
+ navigateDeprecated<RouteName extends string>(...args: RouteName extends unknown ? [screen: RouteName] | [screen: RouteName, params: object | undefined] : never): void;
38
+ navigateDeprecated<RouteName extends string>(options: RouteName extends unknown ? {
39
+ name: RouteName;
40
+ params: object | undefined;
41
+ merge?: boolean;
42
+ } : never): void;
43
+ preload<RouteName extends string>(...args: RouteName extends unknown ? [screen: RouteName] | [screen: RouteName, params: object | undefined] : never): void;
44
+ reset(state: Readonly<{
45
+ key: string;
46
+ index: number;
47
+ routeNames: string[];
48
+ history?: unknown[];
49
+ routes: import("@react-navigation/routers").NavigationRoute<ParamListBase, string>[];
50
+ type: string;
51
+ stale: false;
52
+ }> | import("@react-navigation/routers").PartialState<Readonly<{
53
+ key: string;
54
+ index: number;
55
+ routeNames: string[];
56
+ history?: unknown[];
57
+ routes: import("@react-navigation/routers").NavigationRoute<ParamListBase, string>[];
58
+ type: string;
59
+ stale: false;
60
+ }>>): void;
61
+ goBack(): void;
62
+ isFocused(): boolean;
63
+ canGoBack(): boolean;
64
+ getId(): string | undefined;
65
+ getParent<T = NavigationHelpers<ParamListBase, {}> | undefined>(id?: string): T;
66
+ getState(): Readonly<{
67
+ key: string;
68
+ index: number;
69
+ routeNames: string[];
70
+ history?: unknown[];
71
+ routes: import("@react-navigation/routers").NavigationRoute<ParamListBase, string>[];
72
+ type: string;
73
+ stale: false;
74
+ }>;
75
+ setStateForNextRouteNamesChange(state: Readonly<{
76
+ key: string;
77
+ index: number;
78
+ routeNames: string[];
79
+ history?: unknown[];
80
+ routes: import("@react-navigation/routers").NavigationRoute<ParamListBase, string>[];
81
+ type: string;
82
+ stale: false;
83
+ }> | import("@react-navigation/routers").PartialState<Readonly<{
84
+ key: string;
85
+ index: number;
86
+ routeNames: string[];
87
+ history?: unknown[];
88
+ routes: import("@react-navigation/routers").NavigationRoute<ParamListBase, string>[];
89
+ type: string;
90
+ stale: false;
91
+ }>>): void;
92
+ } & PrivateValueStore<[ParamListBase, unknown, unknown]> & import("./types").EventEmitter<EventMap> & {
93
+ setParams<RouteName extends string>(params: Partial<object | undefined>): void;
94
+ } & ActionHelpers;
95
+ export {};
96
+ //# sourceMappingURL=useNavigationHelpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useNavigationHelpers.d.ts","sourceRoot":"","sources":["../../../../src/useNavigationHelpers.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,MAAM,EACZ,MAAM,2BAA2B,CAAC;AAInC,OAAO,EAAE,KAAK,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAEpE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAKhE,KAAK,OAAO,CAAC,KAAK,SAAS,eAAe,EAAE,MAAM,SAAS,gBAAgB,IAAI;IAC7E,EAAE,EAAE,MAAM,GAAG,SAAS,CAAC;IACvB,QAAQ,EAAE,CAAC,MAAM,EAAE,gBAAgB,KAAK,OAAO,CAAC;IAChD,QAAQ,EAAE,MAAM,KAAK,CAAC;IACtB,OAAO,EAAE,sBAAsB,CAAC,GAAG,CAAC,CAAC;IACrC,MAAM,EAAE,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;CAC/B,CAAC;AAEF;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,SAAS,eAAe,EAC7B,aAAa,SAAS,MAAM,CAAC,MAAM,EAAE,MAAM,IAAI,CAAC,EAChD,MAAM,SAAS,gBAAgB,EAC/B,QAAQ,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACpC,EACA,EAAE,EAAE,WAAW,EACf,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,MAAM,GACP,EAAE,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBA0ExB"}
@@ -0,0 +1,2 @@
1
+ export declare function useNavigationIndependentTree(): boolean;
2
+ //# sourceMappingURL=useNavigationIndependentTree.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useNavigationIndependentTree.d.ts","sourceRoot":"","sources":["../../../../src/useNavigationIndependentTree.tsx"],"names":[],"mappings":"AAIA,wBAAgB,4BAA4B,YAE3C"}
@@ -0,0 +1,10 @@
1
+ import type { NavigationState, ParamListBase } from '@react-navigation/routers';
2
+ type Selector<ParamList extends ParamListBase, T> = (state: NavigationState<ParamList>) => T;
3
+ /**
4
+ * Hook to get a value from the current navigation state using a selector.
5
+ *
6
+ * @param selector Selector function to get a value from the state.
7
+ */
8
+ export declare function useNavigationState<ParamList extends ParamListBase, T>(selector: Selector<ParamList, T>): T;
9
+ export {};
10
+ //# sourceMappingURL=useNavigationState.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useNavigationState.d.ts","sourceRoot":"","sources":["../../../../src/useNavigationState.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAOhF,KAAK,QAAQ,CAAC,SAAS,SAAS,aAAa,EAAE,CAAC,IAAI,CAClD,KAAK,EAAE,eAAe,CAAC,SAAS,CAAC,KAC9B,CAAC,CAAC;AAEP;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,SAAS,SAAS,aAAa,EAAE,CAAC,EACnE,QAAQ,EAAE,QAAQ,CAAC,SAAS,EAAE,CAAC,CAAC,GAC/B,CAAC,CAoBH"}
@@ -0,0 +1,26 @@
1
+ import type { NavigationAction, NavigationState, PartialState, Router, RouterConfigOptions } from '@react-navigation/routers';
2
+ import { type ChildActionListener, type ChildBeforeRemoveListener } from './NavigationBuilderContext';
3
+ import type { EventMapCore } from './types';
4
+ import type { NavigationEventEmitter } from './useEventEmitter';
5
+ type Options = {
6
+ router: Router<NavigationState, NavigationAction>;
7
+ key?: string;
8
+ getState: () => NavigationState;
9
+ setState: (state: NavigationState | PartialState<NavigationState>) => void;
10
+ actionListeners: ChildActionListener[];
11
+ beforeRemoveListeners: Record<string, ChildBeforeRemoveListener | undefined>;
12
+ routerConfigOptions: RouterConfigOptions;
13
+ emitter: NavigationEventEmitter<EventMapCore<any>>;
14
+ };
15
+ /**
16
+ * Hook to handle actions for a navigator, including state updates and bubbling.
17
+ *
18
+ * Bubbling an action is achieved in 2 ways:
19
+ * 1. To bubble action to parent, we expose the action handler in context and then access the parent context
20
+ * 2. To bubble action to child, child adds event listeners subscribing to actions from parent
21
+ *
22
+ * When the action handler handles as action, it returns `true`, otherwise `false`.
23
+ */
24
+ export declare function useOnAction({ router, getState, setState, key, actionListeners, beforeRemoveListeners, routerConfigOptions, emitter, }: Options): (action: NavigationAction, visitedNavigators?: Set<string>) => boolean;
25
+ export {};
26
+ //# sourceMappingURL=useOnAction.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useOnAction.d.ts","sourceRoot":"","sources":["../../../../src/useOnAction.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,eAAe,EACf,YAAY,EACZ,MAAM,EACN,mBAAmB,EACpB,MAAM,2BAA2B,CAAC;AAInC,OAAO,EACL,KAAK,mBAAmB,EACxB,KAAK,yBAAyB,EAE/B,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAGhE,KAAK,OAAO,GAAG;IACb,MAAM,EAAE,MAAM,CAAC,eAAe,EAAE,gBAAgB,CAAC,CAAC;IAClD,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,eAAe,CAAC;IAChC,QAAQ,EAAE,CAAC,KAAK,EAAE,eAAe,GAAG,YAAY,CAAC,eAAe,CAAC,KAAK,IAAI,CAAC;IAC3E,eAAe,EAAE,mBAAmB,EAAE,CAAC;IACvC,qBAAqB,EAAE,MAAM,CAAC,MAAM,EAAE,yBAAyB,GAAG,SAAS,CAAC,CAAC;IAC7E,mBAAmB,EAAE,mBAAmB,CAAC;IACzC,OAAO,EAAE,sBAAsB,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC;CACpD,CAAC;AAEF;;;;;;;;GAQG;AACH,wBAAgB,WAAW,CAAC,EAC1B,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,GAAG,EACH,eAAe,EACf,qBAAqB,EACrB,mBAAmB,EACnB,OAAO,GACR,EAAE,OAAO,YAoBI,gBAAgB,sBACL,GAAG,CAAC,MAAM,CAAC,aA8GnC"}
@@ -0,0 +1,9 @@
1
+ import type { NavigationState } from '@react-navigation/routers';
2
+ import { type GetStateListener } from './NavigationBuilderContext';
3
+ type Options = {
4
+ getState: () => NavigationState;
5
+ getStateListeners: Record<string, GetStateListener | undefined>;
6
+ };
7
+ export declare function useOnGetState({ getState, getStateListeners }: Options): void;
8
+ export {};
9
+ //# sourceMappingURL=useOnGetState.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useOnGetState.d.ts","sourceRoot":"","sources":["../../../../src/useOnGetState.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAIjE,OAAO,EACL,KAAK,gBAAgB,EAEtB,MAAM,4BAA4B,CAAC;AAGpC,KAAK,OAAO,GAAG;IACb,QAAQ,EAAE,MAAM,eAAe,CAAC;IAChC,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,GAAG,SAAS,CAAC,CAAC;CACjE,CAAC;AAEF,wBAAgB,aAAa,CAAC,EAAE,QAAQ,EAAE,iBAAiB,EAAE,EAAE,OAAO,QA6BrE"}
@@ -0,0 +1,17 @@
1
+ import type { NavigationAction, NavigationState } from '@react-navigation/routers';
2
+ import { type ChildBeforeRemoveListener } from './NavigationBuilderContext';
3
+ import type { EventMapCore } from './types';
4
+ import type { NavigationEventEmitter } from './useEventEmitter';
5
+ type Options = {
6
+ getState: () => NavigationState;
7
+ emitter: NavigationEventEmitter<EventMapCore<any>>;
8
+ beforeRemoveListeners: Record<string, ChildBeforeRemoveListener | undefined>;
9
+ };
10
+ export declare const shouldPreventRemove: (emitter: NavigationEventEmitter<EventMapCore<any>>, beforeRemoveListeners: Record<string, ChildBeforeRemoveListener | undefined>, currentRoutes: {
11
+ key: string;
12
+ }[], nextRoutes: {
13
+ key?: string | undefined;
14
+ }[], action: NavigationAction) => boolean;
15
+ export declare function useOnPreventRemove({ getState, emitter, beforeRemoveListeners, }: Options): void;
16
+ export {};
17
+ //# sourceMappingURL=useOnPreventRemove.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useOnPreventRemove.d.ts","sourceRoot":"","sources":["../../../../src/useOnPreventRemove.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,eAAe,EAChB,MAAM,2BAA2B,CAAC;AAGnC,OAAO,EACL,KAAK,yBAAyB,EAE/B,MAAM,4BAA4B,CAAC;AAEpC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAEhE,KAAK,OAAO,GAAG;IACb,QAAQ,EAAE,MAAM,eAAe,CAAC;IAChC,OAAO,EAAE,sBAAsB,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC;IACnD,qBAAqB,EAAE,MAAM,CAAC,MAAM,EAAE,yBAAyB,GAAG,SAAS,CAAC,CAAC;CAC9E,CAAC;AAIF,eAAO,MAAM,mBAAmB,YACrB,sBAAsB,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,yBAC3B,MAAM,CAAC,MAAM,EAAE,yBAAyB,GAAG,SAAS,CAAC,iBAC7D;IAAE,GAAG,EAAE,MAAM,CAAA;CAAE,EAAE,cACpB;IAAE,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,EAAE,UAClC,gBAAgB,YA8CzB,CAAC;AAEF,wBAAgB,kBAAkB,CAAC,EACjC,QAAQ,EACR,OAAO,EACP,qBAAqB,GACtB,EAAE,OAAO,QAoBT"}
@@ -0,0 +1,15 @@
1
+ import type { NavigationAction, NavigationState, Router } from '@react-navigation/routers';
2
+ type Options<Action extends NavigationAction> = {
3
+ router: Router<NavigationState, Action>;
4
+ getState: () => NavigationState;
5
+ setState: (state: NavigationState) => void;
6
+ key?: string;
7
+ };
8
+ /**
9
+ * Hook to handle focus actions for a route.
10
+ * Focus action needs to be treated specially, coz when a nested route is focused,
11
+ * the parent navigators also needs to be focused.
12
+ */
13
+ export declare function useOnRouteFocus<Action extends NavigationAction>({ router, getState, key: sourceRouteKey, setState, }: Options<Action>): (key: string) => void;
14
+ export {};
15
+ //# sourceMappingURL=useOnRouteFocus.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useOnRouteFocus.d.ts","sourceRoot":"","sources":["../../../../src/useOnRouteFocus.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,eAAe,EACf,MAAM,EACP,MAAM,2BAA2B,CAAC;AAKnC,KAAK,OAAO,CAAC,MAAM,SAAS,gBAAgB,IAAI;IAC9C,MAAM,EAAE,MAAM,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC;IACxC,QAAQ,EAAE,MAAM,eAAe,CAAC;IAChC,QAAQ,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,IAAI,CAAC;IAC3C,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,MAAM,SAAS,gBAAgB,EAAE,EAC/D,MAAM,EACN,QAAQ,EACR,GAAG,EAAE,cAAc,EACnB,QAAQ,GACT,EAAE,OAAO,CAAC,MAAM,CAAC,SAMR,MAAM,UAcf"}
@@ -0,0 +1,13 @@
1
+ import type { ParamListBase } from '@react-navigation/routers';
2
+ import type { NavigationProp } from './types';
3
+ type Options = {
4
+ key?: string;
5
+ navigation?: NavigationProp<ParamListBase>;
6
+ options?: object | undefined;
7
+ };
8
+ export declare function useOptionsGetters({ key, options, navigation }: Options): {
9
+ addOptionsGetter: (key: string, getter: () => object | undefined | null) => () => void;
10
+ getCurrentOptions: () => object | null | undefined;
11
+ };
12
+ export {};
13
+ //# sourceMappingURL=useOptionsGetters.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useOptionsGetters.d.ts","sourceRoot":"","sources":["../../../../src/useOptionsGetters.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAK/D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,KAAK,OAAO,GAAG;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,cAAc,CAAC,aAAa,CAAC,CAAC;IAC3C,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC9B,CAAC;AAEF,wBAAgB,iBAAiB,CAAC,EAAE,GAAG,EAAE,OAAO,EAAE,UAAU,EAAE,EAAE,OAAO;4BA+D7D,MAAM,UAAU,MAAM,MAAM,GAAG,SAAS,GAAG,IAAI;;EAiBxD"}
@@ -0,0 +1,13 @@
1
+ import type { NavigationAction } from '@react-navigation/routers';
2
+ /**
3
+ * Hook to prevent screen from being removed. Can be used to prevent users from leaving the screen.
4
+ *
5
+ * @param preventRemove Boolean indicating whether to prevent screen from being removed.
6
+ * @param callback Function which is executed when screen was prevented from being removed.
7
+ */
8
+ export declare function usePreventRemove(preventRemove: boolean, callback: (options: {
9
+ data: {
10
+ action: NavigationAction;
11
+ };
12
+ }) => void): void;
13
+ //# sourceMappingURL=usePreventRemove.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usePreventRemove.d.ts","sourceRoot":"","sources":["../../../../src/usePreventRemove.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAUlE;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAC9B,aAAa,EAAE,OAAO,EACtB,QAAQ,EAAE,CAAC,OAAO,EAAE;IAAE,IAAI,EAAE;QAAE,MAAM,EAAE,gBAAgB,CAAA;KAAE,CAAA;CAAE,KAAK,IAAI,QAgCpE"}
@@ -0,0 +1,5 @@
1
+ export declare function usePreventRemoveContext(): {
2
+ preventedRoutes: import("./PreventRemoveContext").PreventedRoutes;
3
+ setPreventRemove: (id: string, routeKey: string, preventRemove: boolean) => void;
4
+ };
5
+ //# sourceMappingURL=usePreventRemoveContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usePreventRemoveContext.d.ts","sourceRoot":"","sources":["../../../../src/usePreventRemoveContext.tsx"],"names":[],"mappings":"AAIA,wBAAgB,uBAAuB;;;EAUtC"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Register a navigator in the parent context (either a navigation container or a screen).
3
+ * This is used to prevent multiple navigators under a single container or screen.
4
+ */
5
+ export declare function useRegisterNavigator(): string;
6
+ //# sourceMappingURL=useRegisterNavigator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useRegisterNavigator.d.ts","sourceRoot":"","sources":["../../../../src/useRegisterNavigator.tsx"],"names":[],"mappings":"AAKA;;;GAGG;AACH,wBAAgB,oBAAoB,WAmBnC"}
@@ -0,0 +1,9 @@
1
+ import type { ParamListBase } from '@react-navigation/routers';
2
+ import type { RouteProp } from './types';
3
+ /**
4
+ * Hook to access the route prop of the parent screen anywhere.
5
+ *
6
+ * @returns Route prop of the parent screen.
7
+ */
8
+ export declare function useRoute<T extends RouteProp<ParamListBase>>(): T;
9
+ //# sourceMappingURL=useRoute.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useRoute.d.ts","sourceRoot":"","sources":["../../../../src/useRoute.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAI/D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzC;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,CAAC,SAAS,SAAS,CAAC,aAAa,CAAC,KAAK,CAAC,CAUhE"}
@@ -0,0 +1,14 @@
1
+ import type { NavigationState, ParamListBase } from '@react-navigation/routers';
2
+ import type { RouteProp } from './types';
3
+ /**
4
+ * Utilities such as `getFocusedRouteNameFromRoute` need to access state.
5
+ * So we need a way to suppress the warning for those use cases.
6
+ * This is fine since they are internal utilities and this is not public API.
7
+ */
8
+ export declare const CHILD_STATE: unique symbol;
9
+ /**
10
+ * Hook to cache route props for each screen in the navigator.
11
+ * This lets add warnings and modifications to the route object but keep references between renders.
12
+ */
13
+ export declare function useRouteCache<State extends NavigationState>(routes: State['routes']): RouteProp<ParamListBase>[];
14
+ //# sourceMappingURL=useRouteCache.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useRouteCache.d.ts","sourceRoot":"","sources":["../../../../src/useRouteCache.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAIhF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAIzC;;;;GAIG;AACH,eAAO,MAAM,WAAW,eAAwB,CAAC;AAEjD;;;GAGG;AACH,wBAAgB,aAAa,CAAC,KAAK,SAAS,eAAe,EACzD,MAAM,EAAE,KAAK,CAAC,QAAQ,CAAC,8BAmDxB"}
@@ -0,0 +1,2 @@
1
+ export declare function useSyncState<T>(getInitialState: () => T): readonly [T, () => T, (newState: T) => void];
2
+ //# sourceMappingURL=useSyncState.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSyncState.d.ts","sourceRoot":"","sources":["../../../../src/useSyncState.tsx"],"names":[],"mappings":"AA8CA,wBAAgB,YAAY,CAAC,CAAC,EAAE,eAAe,EAAE,MAAM,CAAC,gDAYvD"}
@@ -0,0 +1,2 @@
1
+ export declare function validatePathConfig(config: unknown, root?: boolean): void;
2
+ //# sourceMappingURL=validatePathConfig.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validatePathConfig.d.ts","sourceRoot":"","sources":["../../../../src/validatePathConfig.tsx"],"names":[],"mappings":"AAKA,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,OAAO,EAAE,IAAI,UAAO,QAsE9D"}