@react-navigation/core 7.0.0-alpha.0 → 7.0.0-alpha.10

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 (486) hide show
  1. package/lib/commonjs/BaseNavigationContainer.js +57 -63
  2. package/lib/commonjs/BaseNavigationContainer.js.map +1 -1
  3. package/lib/commonjs/CurrentRenderContext.js +4 -6
  4. package/lib/commonjs/CurrentRenderContext.js.map +1 -1
  5. package/lib/commonjs/DeprecatedNavigationInChildContext.js +4 -6
  6. package/lib/commonjs/DeprecatedNavigationInChildContext.js.map +1 -1
  7. package/lib/commonjs/EnsureSingleNavigator.js +4 -5
  8. package/lib/commonjs/EnsureSingleNavigator.js.map +1 -1
  9. package/lib/commonjs/Group.js +1 -1
  10. package/lib/commonjs/Group.js.map +1 -1
  11. package/lib/commonjs/NavigationBuilderContext.js +4 -6
  12. package/lib/commonjs/NavigationBuilderContext.js.map +1 -1
  13. package/lib/commonjs/NavigationContainerRefContext.js +4 -6
  14. package/lib/commonjs/NavigationContainerRefContext.js.map +1 -1
  15. package/lib/commonjs/NavigationContext.js +4 -6
  16. package/lib/commonjs/NavigationContext.js.map +1 -1
  17. package/lib/commonjs/NavigationHelpersContext.js +4 -6
  18. package/lib/commonjs/NavigationHelpersContext.js.map +1 -1
  19. package/lib/commonjs/NavigationIndependentTree.js +9 -10
  20. package/lib/commonjs/NavigationIndependentTree.js.map +1 -1
  21. package/lib/commonjs/NavigationIndependentTreeContext.js +4 -6
  22. package/lib/commonjs/NavigationIndependentTreeContext.js.map +1 -1
  23. package/lib/commonjs/NavigationRouteContext.js +4 -6
  24. package/lib/commonjs/NavigationRouteContext.js.map +1 -1
  25. package/lib/commonjs/NavigationStateContext.js +4 -5
  26. package/lib/commonjs/NavigationStateContext.js.map +1 -1
  27. package/lib/commonjs/PreventRemoveContext.js +9 -6
  28. package/lib/commonjs/PreventRemoveContext.js.map +1 -1
  29. package/lib/commonjs/PreventRemoveProvider.js +16 -18
  30. package/lib/commonjs/PreventRemoveProvider.js.map +1 -1
  31. package/lib/commonjs/SceneView.js +10 -11
  32. package/lib/commonjs/SceneView.js.map +1 -1
  33. package/lib/commonjs/Screen.js +1 -1
  34. package/lib/commonjs/Screen.js.map +1 -1
  35. package/lib/commonjs/StaticContainer.js +5 -7
  36. package/lib/commonjs/StaticContainer.js.map +1 -1
  37. package/lib/commonjs/StaticNavigation.js +36 -10
  38. package/lib/commonjs/StaticNavigation.js.map +1 -1
  39. package/lib/commonjs/UnhandledActionContext.js +4 -6
  40. package/lib/commonjs/UnhandledActionContext.js.map +1 -1
  41. package/lib/commonjs/checkDuplicateRouteNames.js +2 -3
  42. package/lib/commonjs/checkDuplicateRouteNames.js.map +1 -1
  43. package/lib/commonjs/checkSerializable.js +1 -1
  44. package/lib/commonjs/checkSerializable.js.map +1 -1
  45. package/lib/commonjs/createNavigationContainerRef.js +2 -3
  46. package/lib/commonjs/createNavigationContainerRef.js.map +1 -1
  47. package/lib/commonjs/createNavigatorFactory.js +7 -11
  48. package/lib/commonjs/createNavigatorFactory.js.map +1 -1
  49. package/lib/commonjs/findFocusedRoute.js +3 -5
  50. package/lib/commonjs/findFocusedRoute.js.map +1 -1
  51. package/lib/commonjs/getActionFromState.js +7 -9
  52. package/lib/commonjs/getActionFromState.js.map +1 -1
  53. package/lib/commonjs/getFocusedRouteNameFromRoute.js +2 -2
  54. package/lib/commonjs/getFocusedRouteNameFromRoute.js.map +1 -1
  55. package/lib/commonjs/getPathFromState.js +24 -25
  56. package/lib/commonjs/getPathFromState.js.map +1 -1
  57. package/lib/commonjs/getStateFromPath.js +29 -22
  58. package/lib/commonjs/getStateFromPath.js.map +1 -1
  59. package/lib/commonjs/index.js +78 -76
  60. package/lib/commonjs/index.js.map +1 -1
  61. package/lib/commonjs/isArrayEqual.js +1 -1
  62. package/lib/commonjs/isArrayEqual.js.map +1 -1
  63. package/lib/commonjs/isRecordEqual.js +1 -1
  64. package/lib/commonjs/isRecordEqual.js.map +1 -1
  65. package/lib/commonjs/theming/ThemeContext.js +12 -0
  66. package/lib/commonjs/theming/ThemeContext.js.map +1 -0
  67. package/lib/commonjs/theming/ThemeProvider.js +20 -0
  68. package/lib/commonjs/theming/ThemeProvider.js.map +1 -0
  69. package/lib/commonjs/theming/useTheme.js +18 -0
  70. package/lib/commonjs/theming/useTheme.js.map +1 -0
  71. package/lib/commonjs/types.js +1 -8
  72. package/lib/commonjs/types.js.map +1 -1
  73. package/lib/commonjs/useChildListeners.js +3 -3
  74. package/lib/commonjs/useChildListeners.js.map +1 -1
  75. package/lib/commonjs/useComponent.js +3 -3
  76. package/lib/commonjs/useComponent.js.map +1 -1
  77. package/lib/commonjs/useCurrentRender.js +5 -6
  78. package/lib/commonjs/useCurrentRender.js.map +1 -1
  79. package/lib/commonjs/useDescriptors.js +92 -41
  80. package/lib/commonjs/useDescriptors.js.map +1 -1
  81. package/lib/commonjs/useEventEmitter.js +6 -7
  82. package/lib/commonjs/useEventEmitter.js.map +1 -1
  83. package/lib/commonjs/useFocusEffect.js +7 -6
  84. package/lib/commonjs/useFocusEffect.js.map +1 -1
  85. package/lib/commonjs/useFocusEvents.js +7 -8
  86. package/lib/commonjs/useFocusEvents.js.map +1 -1
  87. package/lib/commonjs/useFocusedListenersChildrenAdapter.js +6 -7
  88. package/lib/commonjs/useFocusedListenersChildrenAdapter.js.map +1 -1
  89. package/lib/commonjs/useIsFocused.js +8 -8
  90. package/lib/commonjs/useIsFocused.js.map +1 -1
  91. package/lib/commonjs/useIsomorphicLayoutEffect.js +12 -0
  92. package/lib/commonjs/useIsomorphicLayoutEffect.js.map +1 -0
  93. package/lib/commonjs/useIsomorphicLayoutEffect.native.js +9 -0
  94. package/lib/commonjs/useIsomorphicLayoutEffect.native.js.map +1 -0
  95. package/lib/commonjs/useKeyedChildListeners.js +3 -3
  96. package/lib/commonjs/useKeyedChildListeners.js.map +1 -1
  97. package/lib/commonjs/useNavigation.js +7 -8
  98. package/lib/commonjs/useNavigation.js.map +1 -1
  99. package/lib/commonjs/useNavigationBuilder.js +115 -106
  100. package/lib/commonjs/useNavigationBuilder.js.map +1 -1
  101. package/lib/commonjs/useNavigationCache.js +60 -20
  102. package/lib/commonjs/useNavigationCache.js.map +1 -1
  103. package/lib/commonjs/useNavigationContainerRef.js +5 -6
  104. package/lib/commonjs/useNavigationContainerRef.js.map +1 -1
  105. package/lib/commonjs/useNavigationHelpers.js +9 -11
  106. package/lib/commonjs/useNavigationHelpers.js.map +1 -1
  107. package/lib/commonjs/useNavigationIndependentTree.js +5 -6
  108. package/lib/commonjs/useNavigationIndependentTree.js.map +1 -1
  109. package/lib/commonjs/useNavigationState.js +5 -6
  110. package/lib/commonjs/useNavigationState.js.map +1 -1
  111. package/lib/commonjs/useOnAction.js +13 -12
  112. package/lib/commonjs/useOnAction.js.map +1 -1
  113. package/lib/commonjs/useOnGetState.js +11 -13
  114. package/lib/commonjs/useOnGetState.js.map +1 -1
  115. package/lib/commonjs/useOnPreventRemove.js +10 -12
  116. package/lib/commonjs/useOnPreventRemove.js.map +1 -1
  117. package/lib/commonjs/useOnRouteFocus.js +5 -6
  118. package/lib/commonjs/useOnRouteFocus.js.map +1 -1
  119. package/lib/commonjs/useOptionsGetters.js +14 -16
  120. package/lib/commonjs/useOptionsGetters.js.map +1 -1
  121. package/lib/commonjs/usePreventRemove.js +10 -10
  122. package/lib/commonjs/usePreventRemove.js.map +1 -1
  123. package/lib/commonjs/usePreventRemoveContext.js +5 -6
  124. package/lib/commonjs/usePreventRemoveContext.js.map +1 -1
  125. package/lib/commonjs/useRegisterNavigator.js +3 -3
  126. package/lib/commonjs/useRegisterNavigator.js.map +1 -1
  127. package/lib/commonjs/useRoute.js +5 -6
  128. package/lib/commonjs/useRoute.js.map +1 -1
  129. package/lib/commonjs/useRouteCache.js +20 -17
  130. package/lib/commonjs/useRouteCache.js.map +1 -1
  131. package/lib/commonjs/useSyncState.js +28 -57
  132. package/lib/commonjs/useSyncState.js.map +1 -1
  133. package/lib/commonjs/validatePathConfig.js +38 -11
  134. package/lib/commonjs/validatePathConfig.js.map +1 -1
  135. package/lib/module/BaseNavigationContainer.js +39 -44
  136. package/lib/module/BaseNavigationContainer.js.map +1 -1
  137. package/lib/module/CurrentRenderContext.js +1 -2
  138. package/lib/module/CurrentRenderContext.js.map +1 -1
  139. package/lib/module/DeprecatedNavigationInChildContext.js +1 -2
  140. package/lib/module/DeprecatedNavigationInChildContext.js.map +1 -1
  141. package/lib/module/EnsureSingleNavigator.js +1 -1
  142. package/lib/module/EnsureSingleNavigator.js.map +1 -1
  143. package/lib/module/Group.js +1 -1
  144. package/lib/module/Group.js.map +1 -1
  145. package/lib/module/NavigationBuilderContext.js +1 -2
  146. package/lib/module/NavigationBuilderContext.js.map +1 -1
  147. package/lib/module/NavigationContainerRefContext.js +1 -2
  148. package/lib/module/NavigationContainerRefContext.js.map +1 -1
  149. package/lib/module/NavigationContext.js +1 -2
  150. package/lib/module/NavigationContext.js.map +1 -1
  151. package/lib/module/NavigationHelpersContext.js +1 -2
  152. package/lib/module/NavigationHelpersContext.js.map +1 -1
  153. package/lib/module/NavigationIndependentTree.js +4 -4
  154. package/lib/module/NavigationIndependentTree.js.map +1 -1
  155. package/lib/module/NavigationIndependentTreeContext.js +1 -2
  156. package/lib/module/NavigationIndependentTreeContext.js.map +1 -1
  157. package/lib/module/NavigationRouteContext.js +1 -2
  158. package/lib/module/NavigationRouteContext.js.map +1 -1
  159. package/lib/module/NavigationStateContext.js +1 -1
  160. package/lib/module/NavigationStateContext.js.map +1 -1
  161. package/lib/module/PreventRemoveContext.js +1 -2
  162. package/lib/module/PreventRemoveContext.js.map +1 -1
  163. package/lib/module/PreventRemoveProvider.js +10 -12
  164. package/lib/module/PreventRemoveProvider.js.map +1 -1
  165. package/lib/module/SceneView.js +5 -5
  166. package/lib/module/SceneView.js.map +1 -1
  167. package/lib/module/Screen.js +1 -1
  168. package/lib/module/Screen.js.map +1 -1
  169. package/lib/module/StaticContainer.js +2 -3
  170. package/lib/module/StaticContainer.js.map +1 -1
  171. package/lib/module/StaticNavigation.js +28 -6
  172. package/lib/module/StaticNavigation.js.map +1 -1
  173. package/lib/module/UnhandledActionContext.js +1 -2
  174. package/lib/module/UnhandledActionContext.js.map +1 -1
  175. package/lib/module/checkDuplicateRouteNames.js +2 -3
  176. package/lib/module/checkDuplicateRouteNames.js.map +1 -1
  177. package/lib/module/checkSerializable.js +1 -1
  178. package/lib/module/checkSerializable.js.map +1 -1
  179. package/lib/module/createNavigationContainerRef.js +1 -1
  180. package/lib/module/createNavigationContainerRef.js.map +1 -1
  181. package/lib/module/createNavigatorFactory.js +3 -6
  182. package/lib/module/createNavigatorFactory.js.map +1 -1
  183. package/lib/module/findFocusedRoute.js +3 -5
  184. package/lib/module/findFocusedRoute.js.map +1 -1
  185. package/lib/module/getActionFromState.js +7 -9
  186. package/lib/module/getActionFromState.js.map +1 -1
  187. package/lib/module/getFocusedRouteNameFromRoute.js +2 -2
  188. package/lib/module/getFocusedRouteNameFromRoute.js.map +1 -1
  189. package/lib/module/getPathFromState.js +21 -21
  190. package/lib/module/getPathFromState.js.map +1 -1
  191. package/lib/module/getStateFromPath.js +25 -18
  192. package/lib/module/getStateFromPath.js.map +1 -1
  193. package/lib/module/index.js +31 -28
  194. package/lib/module/index.js.map +1 -1
  195. package/lib/module/isArrayEqual.js +1 -1
  196. package/lib/module/isArrayEqual.js.map +1 -1
  197. package/lib/module/isRecordEqual.js +1 -1
  198. package/lib/module/isRecordEqual.js.map +1 -1
  199. package/lib/module/theming/ThemeContext.js +4 -0
  200. package/lib/module/theming/ThemeContext.js.map +1 -0
  201. package/lib/module/theming/ThemeProvider.js +12 -0
  202. package/lib/module/theming/ThemeProvider.js.map +1 -0
  203. package/lib/module/theming/useTheme.js +10 -0
  204. package/lib/module/theming/useTheme.js.map +1 -0
  205. package/lib/module/types.js +1 -8
  206. package/lib/module/types.js.map +1 -1
  207. package/lib/module/useChildListeners.js +1 -1
  208. package/lib/module/useChildListeners.js.map +1 -1
  209. package/lib/module/useComponent.js +1 -1
  210. package/lib/module/useComponent.js.map +1 -1
  211. package/lib/module/useCurrentRender.js +2 -2
  212. package/lib/module/useCurrentRender.js.map +1 -1
  213. package/lib/module/useDescriptors.js +88 -36
  214. package/lib/module/useDescriptors.js.map +1 -1
  215. package/lib/module/useEventEmitter.js +4 -5
  216. package/lib/module/useEventEmitter.js.map +1 -1
  217. package/lib/module/useFocusEffect.js +4 -2
  218. package/lib/module/useFocusEffect.js.map +1 -1
  219. package/lib/module/useFocusEvents.js +4 -4
  220. package/lib/module/useFocusEvents.js.map +1 -1
  221. package/lib/module/useFocusedListenersChildrenAdapter.js +3 -3
  222. package/lib/module/useFocusedListenersChildrenAdapter.js.map +1 -1
  223. package/lib/module/useIsFocused.js +2 -2
  224. package/lib/module/useIsFocused.js.map +1 -1
  225. package/lib/module/useIsomorphicLayoutEffect.js +7 -0
  226. package/lib/module/useIsomorphicLayoutEffect.js.map +1 -0
  227. package/lib/module/useIsomorphicLayoutEffect.native.js +3 -0
  228. package/lib/module/useIsomorphicLayoutEffect.native.js.map +1 -0
  229. package/lib/module/useKeyedChildListeners.js +1 -1
  230. package/lib/module/useKeyedChildListeners.js.map +1 -1
  231. package/lib/module/useNavigation.js +3 -3
  232. package/lib/module/useNavigation.js.map +1 -1
  233. package/lib/module/useNavigationBuilder.js +97 -88
  234. package/lib/module/useNavigationBuilder.js.map +1 -1
  235. package/lib/module/useNavigationCache.js +57 -16
  236. package/lib/module/useNavigationCache.js.map +1 -1
  237. package/lib/module/useNavigationContainerRef.js +2 -2
  238. package/lib/module/useNavigationContainerRef.js.map +1 -1
  239. package/lib/module/useNavigationHelpers.js +5 -6
  240. package/lib/module/useNavigationHelpers.js.map +1 -1
  241. package/lib/module/useNavigationIndependentTree.js +2 -2
  242. package/lib/module/useNavigationIndependentTree.js.map +1 -1
  243. package/lib/module/useNavigationState.js +2 -2
  244. package/lib/module/useNavigationState.js.map +1 -1
  245. package/lib/module/useOnAction.js +8 -6
  246. package/lib/module/useOnAction.js.map +1 -1
  247. package/lib/module/useOnGetState.js +6 -7
  248. package/lib/module/useOnGetState.js.map +1 -1
  249. package/lib/module/useOnPreventRemove.js +6 -7
  250. package/lib/module/useOnPreventRemove.js.map +1 -1
  251. package/lib/module/useOnRouteFocus.js +2 -2
  252. package/lib/module/useOnRouteFocus.js.map +1 -1
  253. package/lib/module/useOptionsGetters.js +10 -11
  254. package/lib/module/useOptionsGetters.js.map +1 -1
  255. package/lib/module/usePreventRemove.js +5 -5
  256. package/lib/module/usePreventRemove.js.map +1 -1
  257. package/lib/module/usePreventRemoveContext.js +2 -2
  258. package/lib/module/usePreventRemoveContext.js.map +1 -1
  259. package/lib/module/useRegisterNavigator.js +1 -1
  260. package/lib/module/useRegisterNavigator.js.map +1 -1
  261. package/lib/module/useRoute.js +2 -2
  262. package/lib/module/useRoute.js.map +1 -1
  263. package/lib/module/useRouteCache.js +17 -13
  264. package/lib/module/useRouteCache.js.map +1 -1
  265. package/lib/module/useSyncState.js +25 -54
  266. package/lib/module/useSyncState.js.map +1 -1
  267. package/lib/module/validatePathConfig.js +38 -11
  268. package/lib/module/validatePathConfig.js.map +1 -1
  269. package/lib/typescript/src/BaseNavigationContainer.d.ts +3 -3
  270. package/lib/typescript/src/BaseNavigationContainer.d.ts.map +1 -1
  271. package/lib/typescript/src/CurrentRenderContext.d.ts +1 -2
  272. package/lib/typescript/src/CurrentRenderContext.d.ts.map +1 -1
  273. package/lib/typescript/src/DeprecatedNavigationInChildContext.d.ts +1 -2
  274. package/lib/typescript/src/DeprecatedNavigationInChildContext.d.ts.map +1 -1
  275. package/lib/typescript/src/EnsureSingleNavigator.d.ts +1 -1
  276. package/lib/typescript/src/EnsureSingleNavigator.d.ts.map +1 -1
  277. package/lib/typescript/src/Group.d.ts +1 -1
  278. package/lib/typescript/src/Group.d.ts.map +1 -1
  279. package/lib/typescript/src/NavigationBuilderContext.d.ts +1 -2
  280. package/lib/typescript/src/NavigationBuilderContext.d.ts.map +1 -1
  281. package/lib/typescript/src/NavigationContainerRefContext.d.ts +1 -2
  282. package/lib/typescript/src/NavigationContainerRefContext.d.ts.map +1 -1
  283. package/lib/typescript/src/NavigationContext.d.ts +1 -18
  284. package/lib/typescript/src/NavigationContext.d.ts.map +1 -1
  285. package/lib/typescript/src/NavigationHelpersContext.d.ts +1 -2
  286. package/lib/typescript/src/NavigationHelpersContext.d.ts.map +1 -1
  287. package/lib/typescript/src/NavigationIndependentTree.d.ts +2 -2
  288. package/lib/typescript/src/NavigationIndependentTree.d.ts.map +1 -1
  289. package/lib/typescript/src/NavigationIndependentTreeContext.d.ts +1 -2
  290. package/lib/typescript/src/NavigationIndependentTreeContext.d.ts.map +1 -1
  291. package/lib/typescript/src/NavigationRouteContext.d.ts +1 -2
  292. package/lib/typescript/src/NavigationRouteContext.d.ts.map +1 -1
  293. package/lib/typescript/src/NavigationStateContext.d.ts +3 -20
  294. package/lib/typescript/src/NavigationStateContext.d.ts.map +1 -1
  295. package/lib/typescript/src/PreventRemoveContext.d.ts +1 -2
  296. package/lib/typescript/src/PreventRemoveContext.d.ts.map +1 -1
  297. package/lib/typescript/src/PreventRemoveProvider.d.ts +1 -1
  298. package/lib/typescript/src/PreventRemoveProvider.d.ts.map +1 -1
  299. package/lib/typescript/src/SceneView.d.ts +2 -2
  300. package/lib/typescript/src/SceneView.d.ts.map +1 -1
  301. package/lib/typescript/src/Screen.d.ts +1 -1
  302. package/lib/typescript/src/Screen.d.ts.map +1 -1
  303. package/lib/typescript/src/StaticContainer.d.ts +1 -3
  304. package/lib/typescript/src/StaticContainer.d.ts.map +1 -1
  305. package/lib/typescript/src/StaticNavigation.d.ts +12 -5
  306. package/lib/typescript/src/StaticNavigation.d.ts.map +1 -1
  307. package/lib/typescript/src/UnhandledActionContext.d.ts +1 -2
  308. package/lib/typescript/src/UnhandledActionContext.d.ts.map +1 -1
  309. package/lib/typescript/src/checkDuplicateRouteNames.d.ts +1 -1
  310. package/lib/typescript/src/checkDuplicateRouteNames.d.ts.map +1 -1
  311. package/lib/typescript/src/checkSerializable.d.ts +1 -1
  312. package/lib/typescript/src/checkSerializable.d.ts.map +1 -1
  313. package/lib/typescript/src/createNavigationContainerRef.d.ts +1 -1
  314. package/lib/typescript/src/createNavigationContainerRef.d.ts.map +1 -1
  315. package/lib/typescript/src/createNavigatorFactory.d.ts +1 -1
  316. package/lib/typescript/src/createNavigatorFactory.d.ts.map +1 -1
  317. package/lib/typescript/src/findFocusedRoute.d.ts +2 -10
  318. package/lib/typescript/src/findFocusedRoute.d.ts.map +1 -1
  319. package/lib/typescript/src/getActionFromState.d.ts +1 -1
  320. package/lib/typescript/src/getActionFromState.d.ts.map +1 -1
  321. package/lib/typescript/src/getFocusedRouteNameFromRoute.d.ts +1 -1
  322. package/lib/typescript/src/getFocusedRouteNameFromRoute.d.ts.map +1 -1
  323. package/lib/typescript/src/getPathFromState.d.ts +2 -1
  324. package/lib/typescript/src/getPathFromState.d.ts.map +1 -1
  325. package/lib/typescript/src/getStateFromPath.d.ts +2 -1
  326. package/lib/typescript/src/getStateFromPath.d.ts.map +1 -1
  327. package/lib/typescript/src/index.d.ts +31 -28
  328. package/lib/typescript/src/index.d.ts.map +1 -1
  329. package/lib/typescript/src/isArrayEqual.d.ts +1 -1
  330. package/lib/typescript/src/isArrayEqual.d.ts.map +1 -1
  331. package/lib/typescript/src/isRecordEqual.d.ts +1 -1
  332. package/lib/typescript/src/isRecordEqual.d.ts.map +1 -1
  333. package/lib/typescript/src/theming/ThemeContext.d.ts +3 -0
  334. package/lib/typescript/src/theming/ThemeContext.d.ts.map +1 -0
  335. package/lib/typescript/src/theming/ThemeProvider.d.ts +8 -0
  336. package/lib/typescript/src/theming/ThemeProvider.d.ts.map +1 -0
  337. package/lib/typescript/src/theming/useTheme.d.ts +2 -0
  338. package/lib/typescript/src/theming/useTheme.d.ts.map +1 -0
  339. package/lib/typescript/src/types.d.ts +80 -1
  340. package/lib/typescript/src/types.d.ts.map +1 -1
  341. package/lib/typescript/src/useChildListeners.d.ts +1 -1
  342. package/lib/typescript/src/useChildListeners.d.ts.map +1 -1
  343. package/lib/typescript/src/useComponent.d.ts +2 -2
  344. package/lib/typescript/src/useComponent.d.ts.map +1 -1
  345. package/lib/typescript/src/useCurrentRender.d.ts +1 -1
  346. package/lib/typescript/src/useCurrentRender.d.ts.map +1 -1
  347. package/lib/typescript/src/useDescriptors.d.ts +107 -59
  348. package/lib/typescript/src/useDescriptors.d.ts.map +1 -1
  349. package/lib/typescript/src/useEventEmitter.d.ts +1 -1
  350. package/lib/typescript/src/useEventEmitter.d.ts.map +1 -1
  351. package/lib/typescript/src/useFocusEffect.d.ts +1 -1
  352. package/lib/typescript/src/useFocusEffect.d.ts.map +1 -1
  353. package/lib/typescript/src/useFocusEvents.d.ts +1 -1
  354. package/lib/typescript/src/useFocusEvents.d.ts.map +1 -1
  355. package/lib/typescript/src/useFocusedListenersChildrenAdapter.d.ts +2 -2
  356. package/lib/typescript/src/useFocusedListenersChildrenAdapter.d.ts.map +1 -1
  357. package/lib/typescript/src/useIsFocused.d.ts +1 -1
  358. package/lib/typescript/src/useIsFocused.d.ts.map +1 -1
  359. package/lib/typescript/src/useIsomorphicLayoutEffect.d.ts +6 -0
  360. package/lib/typescript/src/useIsomorphicLayoutEffect.d.ts.map +1 -0
  361. package/lib/typescript/src/useIsomorphicLayoutEffect.native.d.ts +3 -0
  362. package/lib/typescript/src/useIsomorphicLayoutEffect.native.d.ts.map +1 -0
  363. package/lib/typescript/src/useKeyedChildListeners.d.ts +1 -1
  364. package/lib/typescript/src/useKeyedChildListeners.d.ts.map +1 -1
  365. package/lib/typescript/src/useNavigation.d.ts +4 -1
  366. package/lib/typescript/src/useNavigation.d.ts.map +1 -1
  367. package/lib/typescript/src/useNavigationBuilder.d.ts +99 -63
  368. package/lib/typescript/src/useNavigationBuilder.d.ts.map +1 -1
  369. package/lib/typescript/src/useNavigationCache.d.ts +53 -3
  370. package/lib/typescript/src/useNavigationCache.d.ts.map +1 -1
  371. package/lib/typescript/src/useNavigationContainerRef.d.ts +1 -1
  372. package/lib/typescript/src/useNavigationContainerRef.d.ts.map +1 -1
  373. package/lib/typescript/src/useNavigationHelpers.d.ts +26 -40
  374. package/lib/typescript/src/useNavigationHelpers.d.ts.map +1 -1
  375. package/lib/typescript/src/useNavigationIndependentTree.d.ts +1 -1
  376. package/lib/typescript/src/useNavigationIndependentTree.d.ts.map +1 -1
  377. package/lib/typescript/src/useNavigationState.d.ts +1 -1
  378. package/lib/typescript/src/useNavigationState.d.ts.map +1 -1
  379. package/lib/typescript/src/useOnAction.d.ts +2 -2
  380. package/lib/typescript/src/useOnAction.d.ts.map +1 -1
  381. package/lib/typescript/src/useOnGetState.d.ts +2 -2
  382. package/lib/typescript/src/useOnGetState.d.ts.map +1 -1
  383. package/lib/typescript/src/useOnPreventRemove.d.ts +2 -2
  384. package/lib/typescript/src/useOnPreventRemove.d.ts.map +1 -1
  385. package/lib/typescript/src/useOnRouteFocus.d.ts +1 -1
  386. package/lib/typescript/src/useOnRouteFocus.d.ts.map +1 -1
  387. package/lib/typescript/src/useOptionsGetters.d.ts +1 -1
  388. package/lib/typescript/src/useOptionsGetters.d.ts.map +1 -1
  389. package/lib/typescript/src/usePreventRemove.d.ts +1 -1
  390. package/lib/typescript/src/usePreventRemove.d.ts.map +1 -1
  391. package/lib/typescript/src/usePreventRemoveContext.d.ts +1 -1
  392. package/lib/typescript/src/usePreventRemoveContext.d.ts.map +1 -1
  393. package/lib/typescript/src/useRegisterNavigator.d.ts +1 -1
  394. package/lib/typescript/src/useRegisterNavigator.d.ts.map +1 -1
  395. package/lib/typescript/src/useRoute.d.ts +1 -1
  396. package/lib/typescript/src/useRoute.d.ts.map +1 -1
  397. package/lib/typescript/src/useRouteCache.d.ts +1 -1
  398. package/lib/typescript/src/useRouteCache.d.ts.map +1 -1
  399. package/lib/typescript/src/useSyncState.d.ts +1 -4
  400. package/lib/typescript/src/useSyncState.d.ts.map +1 -1
  401. package/lib/typescript/src/validatePathConfig.d.ts +1 -1
  402. package/lib/typescript/src/validatePathConfig.d.ts.map +1 -1
  403. package/lib/typescript/utils/usePrevious.d.ts +6 -0
  404. package/lib/typescript/utils/usePrevious.d.ts.map +1 -0
  405. package/package.json +14 -14
  406. package/src/BaseNavigationContainer.tsx +52 -55
  407. package/src/CurrentRenderContext.tsx +1 -3
  408. package/src/DeprecatedNavigationInChildContext.tsx +1 -3
  409. package/src/EnsureSingleNavigator.tsx +1 -1
  410. package/src/Group.tsx +2 -2
  411. package/src/NavigationBuilderContext.tsx +1 -3
  412. package/src/NavigationContainerRefContext.tsx +1 -3
  413. package/src/NavigationContext.tsx +1 -3
  414. package/src/NavigationHelpersContext.tsx +1 -3
  415. package/src/NavigationIndependentTree.tsx +4 -4
  416. package/src/NavigationIndependentTreeContext.tsx +1 -3
  417. package/src/NavigationRouteContext.tsx +3 -5
  418. package/src/NavigationStateContext.tsx +1 -1
  419. package/src/PreventRemoveContext.tsx +1 -3
  420. package/src/PreventRemoveProvider.tsx +7 -4
  421. package/src/SceneView.tsx +6 -6
  422. package/src/Screen.tsx +2 -2
  423. package/src/StaticContainer.tsx +19 -18
  424. package/src/StaticNavigation.tsx +35 -33
  425. package/src/UnhandledActionContext.tsx +1 -3
  426. package/src/checkDuplicateRouteNames.tsx +2 -2
  427. package/src/checkSerializable.tsx +1 -1
  428. package/src/createNavigationContainerRef.tsx +2 -2
  429. package/src/createNavigatorFactory.tsx +5 -7
  430. package/src/findFocusedRoute.tsx +1 -1
  431. package/src/getActionFromState.tsx +2 -2
  432. package/src/getFocusedRouteNameFromRoute.tsx +4 -4
  433. package/src/getPathFromState.tsx +16 -13
  434. package/src/getStateFromPath.tsx +25 -6
  435. package/src/index.tsx +33 -30
  436. package/src/isArrayEqual.tsx +1 -1
  437. package/src/isRecordEqual.tsx +1 -4
  438. package/src/theming/ThemeContext.tsx +7 -0
  439. package/src/theming/ThemeProvider.tsx +14 -0
  440. package/src/theming/useTheme.tsx +15 -0
  441. package/src/types.tsx +133 -17
  442. package/src/useChildListeners.tsx +1 -1
  443. package/src/useComponent.tsx +1 -1
  444. package/src/useCurrentRender.tsx +2 -6
  445. package/src/useDescriptors.tsx +161 -66
  446. package/src/useEventEmitter.tsx +1 -1
  447. package/src/useFocusEffect.tsx +3 -2
  448. package/src/useFocusEvents.tsx +2 -2
  449. package/src/useFocusedListenersChildrenAdapter.tsx +5 -4
  450. package/src/useIsFocused.tsx +2 -2
  451. package/src/useIsomorphicLayoutEffect.native.tsx +3 -0
  452. package/src/useIsomorphicLayoutEffect.tsx +7 -0
  453. package/src/useKeyedChildListeners.tsx +1 -1
  454. package/src/useNavigation.tsx +7 -4
  455. package/src/useNavigationBuilder.tsx +141 -122
  456. package/src/useNavigationCache.tsx +93 -32
  457. package/src/useNavigationContainerRef.tsx +3 -3
  458. package/src/useNavigationHelpers.tsx +9 -10
  459. package/src/useNavigationIndependentTree.tsx +2 -2
  460. package/src/useNavigationState.tsx +2 -2
  461. package/src/useOnAction.tsx +13 -7
  462. package/src/useOnGetState.tsx +6 -8
  463. package/src/useOnPreventRemove.tsx +5 -4
  464. package/src/useOnRouteFocus.tsx +2 -2
  465. package/src/useOptionsGetters.tsx +5 -9
  466. package/src/usePreventRemove.tsx +4 -4
  467. package/src/usePreventRemoveContext.tsx +2 -2
  468. package/src/useRegisterNavigator.tsx +1 -1
  469. package/src/useRoute.tsx +2 -2
  470. package/src/useRouteCache.tsx +18 -17
  471. package/src/useSyncState.tsx +31 -59
  472. package/src/validatePathConfig.tsx +58 -14
  473. package/lib/commonjs/fromEntries.js +0 -18
  474. package/lib/commonjs/fromEntries.js.map +0 -1
  475. package/lib/commonjs/useScheduleUpdate.js +0 -37
  476. package/lib/commonjs/useScheduleUpdate.js.map +0 -1
  477. package/lib/module/fromEntries.js +0 -12
  478. package/lib/module/fromEntries.js.map +0 -1
  479. package/lib/module/useScheduleUpdate.js +0 -27
  480. package/lib/module/useScheduleUpdate.js.map +0 -1
  481. package/lib/typescript/src/fromEntries.d.ts +0 -2
  482. package/lib/typescript/src/fromEntries.d.ts.map +0 -1
  483. package/lib/typescript/src/useScheduleUpdate.d.ts +0 -14
  484. package/lib/typescript/src/useScheduleUpdate.d.ts.map +0 -1
  485. package/src/fromEntries.tsx +0 -13
  486. package/src/useScheduleUpdate.tsx +0 -32
@@ -1 +1 @@
1
- {"version":3,"file":"useCurrentRender.d.ts","sourceRoot":"","sources":["../../../src/useCurrentRender.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAIhF,OAAO,KAAK,EACV,UAAU,EACV,iBAAiB,EACjB,cAAc,EACd,SAAS,EACV,MAAM,SAAS,CAAC;AAEjB,KAAK,OAAO,GAAG;IACb,KAAK,EAAE,eAAe,CAAC;IACvB,UAAU,EAAE,iBAAiB,CAAC,aAAa,CAAC,CAAC;IAC7C,WAAW,EAAE,MAAM,CACjB,MAAM,EACN,UAAU,CAAC,MAAM,EAAE,cAAc,CAAC,aAAa,CAAC,EAAE,SAAS,CAAC,aAAa,CAAC,CAAC,CAC5E,CAAC;CACH,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,EACvC,KAAK,EACL,UAAU,EACV,WAAW,GACZ,EAAE,OAAO,QAMT"}
1
+ {"version":3,"file":"useCurrentRender.d.ts","sourceRoot":"","sources":["../../../src/useCurrentRender.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAIhF,OAAO,KAAK,EACV,UAAU,EACV,iBAAiB,EACjB,cAAc,EACd,SAAS,EACV,MAAM,SAAS,CAAC;AAEjB,KAAK,OAAO,GAAG;IACb,KAAK,EAAE,eAAe,CAAC;IACvB,UAAU,EAAE,iBAAiB,CAAC,aAAa,CAAC,CAAC;IAC7C,WAAW,EAAE,MAAM,CACjB,MAAM,EACN,UAAU,CAAC,MAAM,EAAE,cAAc,CAAC,aAAa,CAAC,EAAE,SAAS,CAAC,aAAa,CAAC,CAAC,CAC5E,CAAC;CACH,CAAC;AAEF;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,EAAE,OAAO,QAM3E"}
@@ -1,26 +1,31 @@
1
- import type { NavigationAction, NavigationState, ParamListBase, Router } from '@react-navigation/routers';
2
- import { AddKeyedListener, AddListener } from './NavigationBuilderContext';
1
+ import type { NavigationAction, NavigationState, ParamListBase, PartialState, Router } from '@react-navigation/routers';
2
+ import * as React from 'react';
3
+ import { type AddKeyedListener, type AddListener } from './NavigationBuilderContext';
3
4
  import type { Descriptor, EventMapBase, NavigationHelpers, NavigationProp, RouteConfig, RouteProp } from './types';
4
5
  import type { NavigationEventEmitter } from './useEventEmitter';
5
6
  export type ScreenConfigWithParent<State extends NavigationState, ScreenOptions extends {}, EventMap extends EventMapBase> = {
6
7
  keys: (string | undefined)[];
7
8
  options: (ScreenOptionsOrCallback<ScreenOptions> | undefined)[] | undefined;
9
+ layout: ScreenLayout | undefined;
8
10
  props: RouteConfig<ParamListBase, string, State, ScreenOptions, EventMap>;
9
11
  };
12
+ type ScreenLayout = (props: {
13
+ route: RouteProp<ParamListBase, string>;
14
+ navigation: any;
15
+ theme: ReactNavigation.Theme;
16
+ children: React.ReactElement;
17
+ }) => React.ReactElement;
10
18
  type ScreenOptionsOrCallback<ScreenOptions extends {}> = ScreenOptions | ((props: {
11
19
  route: RouteProp<ParamListBase, string>;
12
20
  navigation: any;
21
+ theme: ReactNavigation.Theme;
13
22
  }) => ScreenOptions);
14
23
  type Options<State extends NavigationState, ScreenOptions extends {}, EventMap extends EventMapBase> = {
15
24
  state: State;
16
25
  screens: Record<string, ScreenConfigWithParent<State, ScreenOptions, EventMap>>;
17
26
  navigation: NavigationHelpers<ParamListBase>;
18
- screenOptions?: ScreenOptionsOrCallback<ScreenOptions>;
19
- defaultScreenOptions?: ScreenOptions | ((props: {
20
- route: RouteProp<ParamListBase>;
21
- navigation: any;
22
- options: ScreenOptions;
23
- }) => ScreenOptions);
27
+ screenOptions: ScreenOptionsOrCallback<ScreenOptions> | undefined;
28
+ screenLayout: ScreenLayout | undefined;
24
29
  onAction: (action: NavigationAction) => boolean;
25
30
  getState: () => State;
26
31
  setState: (state: State) => void;
@@ -38,58 +43,101 @@ type Options<State extends NavigationState, ScreenOptions extends {}, EventMap e
38
43
  * - Options specified by the screen for the navigator
39
44
  * - Navigation object intended for the route
40
45
  */
41
- export default function useDescriptors<State extends NavigationState, ActionHelpers extends Record<string, () => void>, ScreenOptions extends {}, EventMap extends EventMapBase>({ state, screens, navigation, screenOptions, defaultScreenOptions, onAction, getState, setState, addListener, addKeyedListener, onRouteFocus, router, emitter, }: Options<State, ScreenOptions, EventMap>): Record<string, Descriptor<ScreenOptions, Omit<{
42
- dispatch(action: Readonly<{
43
- type: string;
44
- payload?: object | undefined;
45
- source?: string | undefined;
46
- target?: string | undefined;
47
- }> | ((state: Readonly<State>) => Readonly<{
48
- type: string;
49
- payload?: object | undefined;
50
- source?: string | undefined;
51
- target?: string | undefined;
52
- }>)): void;
53
- navigate<RouteName extends string>(...args: RouteName extends unknown ? [screen: RouteName] | [screen: RouteName, params: object | undefined] : never): void;
54
- navigate<RouteName_1 extends string>(options: RouteName_1 extends unknown ? {
55
- name: RouteName_1;
56
- params: object | undefined;
57
- path?: string | undefined;
58
- merge?: boolean | undefined;
59
- } : never): void;
60
- navigateDeprecated<RouteName_2 extends string>(...args: RouteName_2 extends unknown ? [screen: RouteName_2] | [screen: RouteName_2, params: object | undefined] : never): void;
61
- navigateDeprecated<RouteName_3 extends string>(options: RouteName_3 extends unknown ? {
62
- name: RouteName_3;
63
- params: object | undefined;
64
- merge?: boolean | undefined;
65
- } : never): void;
66
- reset(state: State | import("@react-navigation/routers").PartialState<State>): void;
67
- goBack(): void;
68
- isFocused(): boolean;
69
- canGoBack(): boolean;
70
- getId(): string | undefined;
71
- getParent<T = NavigationHelpers<ParamListBase, {}> | undefined>(id?: string | undefined): T;
72
- getState(): State;
73
- } & import("./types").PrivateValueStore<[ParamListBase, unknown, unknown]>, "getParent"> & {
74
- getParent<T_1 = NavigationProp<ParamListBase, string, undefined, Readonly<{
75
- key: string;
76
- index: number;
77
- routeNames: string[];
78
- history?: unknown[] | undefined;
79
- routes: (Readonly<{
46
+ export declare function useDescriptors<State extends NavigationState, ActionHelpers extends Record<string, () => void>, ScreenOptions extends {}, EventMap extends EventMapBase>({ state, screens, navigation, screenOptions, screenLayout, onAction, getState, setState, addListener, addKeyedListener, onRouteFocus, router, emitter, }: Options<State, ScreenOptions, EventMap>): {
47
+ describe: (route: RouteProp<ParamListBase>, placeholder: boolean) => Descriptor<ScreenOptions, Omit<{
48
+ dispatch(action: Readonly<{
49
+ type: string;
50
+ payload?: object | undefined;
51
+ source?: string | undefined;
52
+ target?: string | undefined;
53
+ }> | ((state: Readonly<State>) => Readonly<{
54
+ type: string;
55
+ payload?: object | undefined;
56
+ source?: string | undefined;
57
+ target?: string | undefined;
58
+ }>)): void;
59
+ navigate<RouteName extends string>(...args: RouteName extends unknown ? [screen: RouteName] | [screen: RouteName, params: object | undefined] : never): void;
60
+ navigate<RouteName_1 extends string>(options: RouteName_1 extends unknown ? {
61
+ name: RouteName_1;
62
+ params: object | undefined;
63
+ path?: string | undefined;
64
+ merge?: boolean | undefined;
65
+ } : never): void;
66
+ navigateDeprecated<RouteName_2 extends string>(...args: RouteName_2 extends unknown ? [screen: RouteName_2] | [screen: RouteName_2, params: object | undefined] : never): void;
67
+ navigateDeprecated<RouteName_3 extends string>(options: RouteName_3 extends unknown ? {
68
+ name: RouteName_3;
69
+ params: object | undefined;
70
+ merge?: boolean | undefined;
71
+ } : never): void;
72
+ preload<RouteName_4 extends string>(...args: RouteName_4 extends unknown ? [screen: RouteName_4] | [screen: RouteName_4, params: object | undefined] : never): void;
73
+ reset(state: State | PartialState<State>): void;
74
+ goBack(): void;
75
+ isFocused(): boolean;
76
+ canGoBack(): boolean;
77
+ getId(): string | undefined;
78
+ getParent<T = NavigationHelpers<ParamListBase, {}> | undefined>(id?: string | undefined): T;
79
+ getState(): State;
80
+ setStateForNextRouteNamesChange(state: State | PartialState<State>): void;
81
+ } & import("./types").PrivateValueStore<[ParamListBase, unknown, unknown]>, "getParent"> & {
82
+ getParent<T_1 = NavigationProp<ParamListBase, string, undefined, Readonly<{
80
83
  key: string;
81
- name: string;
84
+ index: number;
85
+ routeNames: string[];
86
+ history?: unknown[] | undefined;
87
+ routes: import("@react-navigation/routers").NavigationRoute<ParamListBase, string>[];
88
+ type: string;
89
+ stale: false;
90
+ }>, {}, {}> | undefined>(id?: string | undefined): T_1;
91
+ setParams(params: Partial<object | undefined>): void;
92
+ setOptions(options: Partial<ScreenOptions>): void;
93
+ } & import("./types").EventConsumer<EventMap & import("./types").EventMapCore<State>> & import("./types").PrivateValueStore<[ParamListBase, string, EventMap]> & ActionHelpers, RouteProp<ParamListBase>>;
94
+ descriptors: Record<string, Descriptor<ScreenOptions, Omit<{
95
+ dispatch(action: Readonly<{
96
+ type: string;
97
+ payload?: object | undefined;
98
+ source?: string | undefined;
99
+ target?: string | undefined;
100
+ }> | ((state: Readonly<State>) => Readonly<{
101
+ type: string;
102
+ payload?: object | undefined;
103
+ source?: string | undefined;
104
+ target?: string | undefined;
105
+ }>)): void;
106
+ navigate<RouteName extends string>(...args: RouteName extends unknown ? [screen: RouteName] | [screen: RouteName, params: object | undefined] : never): void;
107
+ navigate<RouteName_1 extends string>(options: RouteName_1 extends unknown ? {
108
+ name: RouteName_1;
109
+ params: object | undefined;
82
110
  path?: string | undefined;
83
- }> & Readonly<{
84
- params?: Readonly<object | undefined>;
85
- }> & {
86
- state?: Readonly<any> | import("@react-navigation/routers").PartialState<Readonly<any>> | undefined;
87
- })[];
88
- type: string;
89
- stale: false;
90
- }>, {}, {}> | undefined>(id?: string | undefined): T_1;
91
- setParams(params: Partial<object | undefined>): void;
92
- setOptions(options: Partial<ScreenOptions>): void;
93
- } & import("./types").EventConsumer<EventMap & import("./types").EventMapCore<State>> & import("./types").PrivateValueStore<[ParamListBase, string, EventMap]> & ActionHelpers, RouteProp<ParamListBase, string>>>;
111
+ merge?: boolean | undefined;
112
+ } : never): void;
113
+ navigateDeprecated<RouteName_2 extends string>(...args: RouteName_2 extends unknown ? [screen: RouteName_2] | [screen: RouteName_2, params: object | undefined] : never): void;
114
+ navigateDeprecated<RouteName_3 extends string>(options: RouteName_3 extends unknown ? {
115
+ name: RouteName_3;
116
+ params: object | undefined;
117
+ merge?: boolean | undefined;
118
+ } : never): void;
119
+ preload<RouteName_4 extends string>(...args: RouteName_4 extends unknown ? [screen: RouteName_4] | [screen: RouteName_4, params: object | undefined] : never): void;
120
+ reset(state: State | PartialState<State>): void;
121
+ goBack(): void;
122
+ isFocused(): boolean;
123
+ canGoBack(): boolean;
124
+ getId(): string | undefined;
125
+ getParent<T = NavigationHelpers<ParamListBase, {}> | undefined>(id?: string | undefined): T;
126
+ getState(): State;
127
+ setStateForNextRouteNamesChange(state: State | PartialState<State>): void;
128
+ } & import("./types").PrivateValueStore<[ParamListBase, unknown, unknown]>, "getParent"> & {
129
+ getParent<T_1 = NavigationProp<ParamListBase, string, undefined, Readonly<{
130
+ key: string;
131
+ index: number;
132
+ routeNames: string[];
133
+ history?: unknown[] | undefined;
134
+ routes: import("@react-navigation/routers").NavigationRoute<ParamListBase, string>[];
135
+ type: string;
136
+ stale: false;
137
+ }>, {}, {}> | undefined>(id?: string | undefined): T_1;
138
+ setParams(params: Partial<object | undefined>): void;
139
+ setOptions(options: Partial<ScreenOptions>): void;
140
+ } & import("./types").EventConsumer<EventMap & import("./types").EventMapCore<State>> & import("./types").PrivateValueStore<[ParamListBase, string, EventMap]> & ActionHelpers, RouteProp<ParamListBase>>>;
141
+ };
94
142
  export {};
95
143
  //# sourceMappingURL=useDescriptors.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useDescriptors.d.ts","sourceRoot":"","sources":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C,KAAK,EAAE,aAAa,EAAE,QAAQ,CAAC;sBA2Mf,UAAU,aAAa,CAAC,eAAe,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2BxE"}
@@ -5,5 +5,5 @@ export type NavigationEventEmitter<T extends Record<string, any>> = EventEmitter
5
5
  /**
6
6
  * Hook to manage the event system used by the navigator to notify screens of various events.
7
7
  */
8
- export default function useEventEmitter<T extends Record<string, any>>(listen?: (e: any) => void): NavigationEventEmitter<T>;
8
+ export declare function useEventEmitter<T extends Record<string, any>>(listen?: (e: any) => void): NavigationEventEmitter<T>;
9
9
  //# sourceMappingURL=useEventEmitter.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useEventEmitter.d.ts","sourceRoot":"","sources":["../../../src/useEventEmitter.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAY,aAAa,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAErE,MAAM,MAAM,sBAAsB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,IAC9D,YAAY,CAAC,CAAC,CAAC,GAAG;IAChB,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,aAAa,CAAC,CAAC,CAAC,CAAC;CAC9C,CAAC;AAIJ;;GAEG;AACH,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACnE,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,KAAK,IAAI,GACxB,sBAAsB,CAAC,CAAC,CAAC,CA4H3B"}
1
+ {"version":3,"file":"useEventEmitter.d.ts","sourceRoot":"","sources":["../../../src/useEventEmitter.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAY,aAAa,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAErE,MAAM,MAAM,sBAAsB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,IAC9D,YAAY,CAAC,CAAC,CAAC,GAAG;IAChB,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,aAAa,CAAC,CAAC,CAAC,CAAC;CAC9C,CAAC;AAIJ;;GAEG;AACH,wBAAgB,eAAe,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC3D,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,KAAK,IAAI,GACxB,sBAAsB,CAAC,CAAC,CAAC,CA4H3B"}
@@ -6,6 +6,6 @@ type EffectCallback = () => undefined | void | (() => void);
6
6
  *
7
7
  * @param callback Memoized callback containing the effect, should optionally return a cleanup function.
8
8
  */
9
- export default function useFocusEffect(effect: EffectCallback): void;
9
+ export declare function useFocusEffect(effect: EffectCallback): void;
10
10
  export {};
11
11
  //# sourceMappingURL=useFocusEffect.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useFocusEffect.d.ts","sourceRoot":"","sources":["../../../src/useFocusEffect.tsx"],"names":[],"mappings":"AAIA,KAAK,cAAc,GAAG,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC,MAAM,IAAI,CAAC,CAAC;AAE5D;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,MAAM,EAAE,cAAc,QAkG5D"}
1
+ {"version":3,"file":"useFocusEffect.d.ts","sourceRoot":"","sources":["../../../src/useFocusEffect.tsx"],"names":[],"mappings":"AAIA,KAAK,cAAc,GAAG,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC,MAAM,IAAI,CAAC,CAAC;AAE5D;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,cAAc,QAmGpD"}
@@ -8,6 +8,6 @@ type Options<State extends NavigationState> = {
8
8
  /**
9
9
  * Hook to take care of emitting `focus` and `blur` events.
10
10
  */
11
- export default function useFocusEvents<State extends NavigationState>({ state, emitter, }: Options<State>): void;
11
+ export declare function useFocusEvents<State extends NavigationState>({ state, emitter, }: Options<State>): void;
12
12
  export {};
13
13
  //# sourceMappingURL=useFocusEvents.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useFocusEvents.d.ts","sourceRoot":"","sources":["../../../src/useFocusEvents.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAIjE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAEhE,KAAK,OAAO,CAAC,KAAK,SAAS,eAAe,IAAI;IAC5C,KAAK,EAAE,KAAK,CAAC;IACb,OAAO,EAAE,sBAAsB,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC;CACtD,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,KAAK,SAAS,eAAe,EAAE,EACpE,KAAK,EACL,OAAO,GACR,EAAE,OAAO,CAAC,KAAK,CAAC,QAsDhB"}
1
+ {"version":3,"file":"useFocusEvents.d.ts","sourceRoot":"","sources":["../../../src/useFocusEvents.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAIjE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAEhE,KAAK,OAAO,CAAC,KAAK,SAAS,eAAe,IAAI;IAC5C,KAAK,EAAE,KAAK,CAAC;IACb,OAAO,EAAE,sBAAsB,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC;CACtD,CAAC;AAEF;;GAEG;AACH,wBAAgB,cAAc,CAAC,KAAK,SAAS,eAAe,EAAE,EAC5D,KAAK,EACL,OAAO,GACR,EAAE,OAAO,CAAC,KAAK,CAAC,QAsDhB"}
@@ -1,5 +1,5 @@
1
1
  import type { ParamListBase } from '@react-navigation/routers';
2
- import { FocusedNavigationListener } from './NavigationBuilderContext';
2
+ import { type FocusedNavigationListener } from './NavigationBuilderContext';
3
3
  import type { NavigationHelpers } from './types';
4
4
  type Options = {
5
5
  navigation: NavigationHelpers<ParamListBase>;
@@ -8,6 +8,6 @@ type Options = {
8
8
  /**
9
9
  * Hook for passing focus callback to children
10
10
  */
11
- export default function useFocusedListenersChildrenAdapter({ navigation, focusedListeners, }: Options): void;
11
+ export declare function useFocusedListenersChildrenAdapter({ navigation, focusedListeners, }: Options): void;
12
12
  export {};
13
13
  //# sourceMappingURL=useFocusedListenersChildrenAdapter.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useFocusedListenersChildrenAdapter.d.ts","sourceRoot":"","sources":["../../../src/useFocusedListenersChildrenAdapter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAG/D,OAAiC,EAE/B,yBAAyB,EAC1B,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAEjD,KAAK,OAAO,GAAG;IACb,UAAU,EAAE,iBAAiB,CAAC,aAAa,CAAC,CAAC;IAC7C,gBAAgB,EAAE,yBAAyB,EAAE,CAAC;CAC/C,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,OAAO,UAAU,kCAAkC,CAAC,EACzD,UAAU,EACV,gBAAgB,GACjB,EAAE,OAAO,QA0BT"}
1
+ {"version":3,"file":"useFocusedListenersChildrenAdapter.d.ts","sourceRoot":"","sources":["../../../src/useFocusedListenersChildrenAdapter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAG/D,OAAO,EAEL,KAAK,yBAAyB,EAE/B,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAEjD,KAAK,OAAO,GAAG;IACb,UAAU,EAAE,iBAAiB,CAAC,aAAa,CAAC,CAAC;IAC7C,gBAAgB,EAAE,yBAAyB,EAAE,CAAC;CAC/C,CAAC;AAEF;;GAEG;AACH,wBAAgB,kCAAkC,CAAC,EACjD,UAAU,EACV,gBAAgB,GACjB,EAAE,OAAO,QA0BT"}
@@ -2,5 +2,5 @@
2
2
  * Hook to get the current focus state of the screen. Returns a `true` if screen is focused, otherwise `false`.
3
3
  * This can be used if a component needs to render something based on the focus state.
4
4
  */
5
- export default function useIsFocused(): boolean;
5
+ export declare function useIsFocused(): boolean;
6
6
  //# sourceMappingURL=useIsFocused.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useIsFocused.d.ts","sourceRoot":"","sources":["../../../src/useIsFocused.tsx"],"names":[],"mappings":"AAKA;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,IAAI,OAAO,CAiC9C"}
1
+ {"version":3,"file":"useIsFocused.d.ts","sourceRoot":"","sources":["../../../src/useIsFocused.tsx"],"names":[],"mappings":"AAKA;;;GAGG;AACH,wBAAgB,YAAY,IAAI,OAAO,CAiCtC"}
@@ -0,0 +1,6 @@
1
+ import { useEffect } from 'react';
2
+ /**
3
+ * Use `useEffect` during SSR and `useLayoutEffect` in the browser to avoid warnings.
4
+ */
5
+ export declare const useIsomorphicLayoutEffect: typeof useEffect;
6
+ //# sourceMappingURL=useIsomorphicLayoutEffect.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useIsomorphicLayoutEffect.d.ts","sourceRoot":"","sources":["../../../src/useIsomorphicLayoutEffect.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAmB,MAAM,OAAO,CAAC;AAEnD;;GAEG;AACH,eAAO,MAAM,yBAAyB,kBACyB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { useLayoutEffect } from 'react';
2
+ export declare const useIsomorphicLayoutEffect: typeof useLayoutEffect;
3
+ //# sourceMappingURL=useIsomorphicLayoutEffect.native.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useIsomorphicLayoutEffect.native.d.ts","sourceRoot":"","sources":["../../../src/useIsomorphicLayoutEffect.native.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,OAAO,CAAC;AAExC,eAAO,MAAM,yBAAyB,wBAAkB,CAAC"}
@@ -2,7 +2,7 @@ import type { KeyedListenerMap } from './NavigationBuilderContext';
2
2
  /**
3
3
  * Hook which lets child navigators add getters to be called for obtaining rehydrated state.
4
4
  */
5
- export default function useKeyedChildListeners(): {
5
+ export declare function useKeyedChildListeners(): {
6
6
  keyedListeners: {
7
7
  getState: Record<string, import("./NavigationBuilderContext").GetStateListener | undefined>;
8
8
  beforeRemove: Record<string, import("./NavigationBuilderContext").ChildBeforeRemoveListener | undefined>;
@@ -1 +1 @@
1
- {"version":3,"file":"useKeyedChildListeners.d.ts","sourceRoot":"","sources":["../../../src/useKeyedChildListeners.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAEnE;;GAEG;AACH,MAAM,CAAC,OAAO,UAAU,sBAAsB;;;;;uEAgBnC,MAAM;EAkBhB"}
1
+ {"version":3,"file":"useKeyedChildListeners.d.ts","sourceRoot":"","sources":["../../../src/useKeyedChildListeners.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAEnE;;GAEG;AACH,wBAAgB,sBAAsB;;;;;uEAgB3B,MAAM;EAkBhB"}
@@ -1,8 +1,11 @@
1
+ import { type NavigationState } from '@react-navigation/routers';
1
2
  import type { NavigationProp } from './types';
2
3
  /**
3
4
  * Hook to access the navigation prop of the parent screen anywhere.
4
5
  *
5
6
  * @returns Navigation prop of the parent screen.
6
7
  */
7
- export default function useNavigation<T = NavigationProp<ReactNavigation.RootParamList>>(): T;
8
+ export declare function useNavigation<T = Omit<NavigationProp<ReactNavigation.RootParamList>, 'getState'> & {
9
+ getState(): NavigationState | undefined;
10
+ }>(): T;
8
11
  //# sourceMappingURL=useNavigation.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useNavigation.d.ts","sourceRoot":"","sources":["../../../src/useNavigation.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,aAAa,CACnC,CAAC,GAAG,cAAc,CAAC,eAAe,CAAC,aAAa,CAAC,KAC9C,CAAC,CAYL"}
1
+ {"version":3,"file":"useNavigation.d.ts","sourceRoot":"","sources":["../../../src/useNavigation.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAKjE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C;;;;GAIG;AACH,wBAAgB,aAAa,CAC3B,CAAC,GAAG,IAAI,CAAC,cAAc,CAAC,eAAe,CAAC,aAAa,CAAC,EAAE,UAAU,CAAC,GAAG;IACpE,QAAQ,IAAI,eAAe,GAAG,SAAS,CAAC;CACzC,KACE,CAAC,CAYL"}
@@ -1,17 +1,6 @@
1
- import { DefaultRouterOptions, NavigationState, ParamListBase, PartialState, RouterFactory } from '@react-navigation/routers';
1
+ import { type DefaultRouterOptions, type NavigationState, type ParamListBase, type PartialState, type RouterFactory } from '@react-navigation/routers';
2
2
  import * as React from 'react';
3
- import { DefaultNavigatorOptions, EventMapCore, PrivateValueStore, RouteProp } from './types';
4
- type NavigationBuilderOptions<ScreenOptions extends {}> = {
5
- /**
6
- * Default options specified by the navigator.
7
- * It receives the custom options in the arguments if a function is specified.
8
- */
9
- defaultScreenOptions?: ScreenOptions | ((props: {
10
- route: RouteProp<ParamListBase>;
11
- navigation: any;
12
- options: ScreenOptions;
13
- }) => ScreenOptions);
14
- };
3
+ import { type DefaultNavigatorOptions, type EventMapCore, PrivateValueStore } from './types';
15
4
  /**
16
5
  * Hook for building navigators.
17
6
  *
@@ -19,7 +8,7 @@ type NavigationBuilderOptions<ScreenOptions extends {}> = {
19
8
  * @param options Options object containing `children` and additional options for the router.
20
9
  * @returns An object containing `state`, `navigation`, `descriptors` objects.
21
10
  */
22
- export default function useNavigationBuilder<State extends NavigationState, RouterOptions extends DefaultRouterOptions, ActionHelpers extends Record<string, () => void>, ScreenOptions extends {}, EventMap extends Record<string, any>>(createRouter: RouterFactory<State, any, RouterOptions>, options: DefaultNavigatorOptions<ParamListBase, State, ScreenOptions, EventMap> & NavigationBuilderOptions<ScreenOptions> & RouterOptions): {
11
+ export declare function useNavigationBuilder<State extends NavigationState, RouterOptions extends DefaultRouterOptions, ActionHelpers extends Record<string, () => void>, ScreenOptions extends {}, EventMap extends Record<string, any>>(createRouter: RouterFactory<State, any, RouterOptions>, options: DefaultNavigatorOptions<ParamListBase, State, ScreenOptions, EventMap> & RouterOptions): {
23
12
  state: State;
24
13
  navigation: {
25
14
  dispatch(action: Readonly<{
@@ -32,15 +21,7 @@ export default function useNavigationBuilder<State extends NavigationState, Rout
32
21
  index: number;
33
22
  routeNames: string[];
34
23
  history?: unknown[] | undefined;
35
- routes: (Readonly<{
36
- key: string;
37
- name: string;
38
- path?: string | undefined;
39
- }> & Readonly<{
40
- params?: Readonly<object | undefined>;
41
- }> & {
42
- state?: Readonly<any> | PartialState<Readonly<any>> | undefined;
43
- })[];
24
+ routes: import("@react-navigation/routers").NavigationRoute<ParamListBase, string>[];
44
25
  type: string;
45
26
  stale: false;
46
27
  }>>) => Readonly<{
@@ -59,23 +40,23 @@ export default function useNavigationBuilder<State extends NavigationState, Rout
59
40
  navigateDeprecated<RouteName_2 extends string>(...args: RouteName_2 extends unknown ? [screen: RouteName_2] | [screen: RouteName_2, params: object | undefined] : never): void;
60
41
  navigateDeprecated<RouteName_3 extends string>(options: RouteName_3 extends unknown ? {
61
42
  name: RouteName_3;
43
+ /**
44
+ * Hook for building navigators.
45
+ *
46
+ * @param createRouter Factory method which returns router object.
47
+ * @param options Options object containing `children` and additional options for the router.
48
+ * @returns An object containing `state`, `navigation`, `descriptors` objects.
49
+ */
62
50
  params: object | undefined;
63
51
  merge?: boolean | undefined;
64
52
  } : never): void;
53
+ preload<RouteName_4 extends string>(...args: RouteName_4 extends unknown ? [screen: RouteName_4] | [screen: RouteName_4, params: object | undefined] : never): void;
65
54
  reset(state: Readonly<{
66
55
  key: string;
67
56
  index: number;
68
57
  routeNames: string[];
69
58
  history?: unknown[] | undefined;
70
- routes: (Readonly<{
71
- key: string;
72
- name: string;
73
- path?: string | undefined;
74
- }> & Readonly<{
75
- params?: Readonly<object | undefined>;
76
- }> & {
77
- state?: Readonly<any> | PartialState<Readonly<any>> | undefined;
78
- })[];
59
+ routes: import("@react-navigation/routers").NavigationRoute<ParamListBase, string>[];
79
60
  type: string;
80
61
  stale: false;
81
62
  }> | PartialState<Readonly<{
@@ -83,15 +64,7 @@ export default function useNavigationBuilder<State extends NavigationState, Rout
83
64
  index: number;
84
65
  routeNames: string[];
85
66
  history?: unknown[] | undefined;
86
- routes: (Readonly<{
87
- key: string;
88
- name: string;
89
- path?: string | undefined;
90
- }> & Readonly<{
91
- params?: Readonly<object | undefined>;
92
- }> & {
93
- state?: Readonly<any> | PartialState<Readonly<any>> | undefined;
94
- })[];
67
+ routes: import("@react-navigation/routers").NavigationRoute<ParamListBase, string>[];
95
68
  type: string;
96
69
  stale: false;
97
70
  }>>): void;
@@ -105,21 +78,84 @@ export default function useNavigationBuilder<State extends NavigationState, Rout
105
78
  index: number;
106
79
  routeNames: string[];
107
80
  history?: unknown[] | undefined;
108
- routes: (Readonly<{
109
- key: string;
110
- name: string;
111
- path?: string | undefined;
112
- }> & Readonly<{
113
- params?: Readonly<object | undefined>;
114
- }> & {
115
- state?: Readonly<any> | PartialState<Readonly<any>> | undefined;
116
- })[];
81
+ routes: import("@react-navigation/routers").NavigationRoute<ParamListBase, string>[];
117
82
  type: string;
118
83
  stale: false;
119
84
  }>;
85
+ setStateForNextRouteNamesChange(state: Readonly<{
86
+ key: string;
87
+ index: number;
88
+ routeNames: string[];
89
+ history?: unknown[] | undefined;
90
+ routes: import("@react-navigation/routers").NavigationRoute<ParamListBase, string>[];
91
+ type: string;
92
+ stale: false;
93
+ }> | PartialState<Readonly<{
94
+ key: string;
95
+ index: number;
96
+ routeNames: string[];
97
+ history?: unknown[] | undefined;
98
+ routes: import("@react-navigation/routers").NavigationRoute<ParamListBase, string>[];
99
+ type: string;
100
+ stale: false;
101
+ }>>): void;
120
102
  } & PrivateValueStore<[ParamListBase, unknown, unknown]> & import("./types").EventEmitter<EventMap> & {
121
- setParams<RouteName_4 extends string>(params: Partial<object | undefined>): void;
103
+ setParams<RouteName_5 extends string>(params: Partial<object | undefined>): void;
122
104
  } & ActionHelpers;
105
+ describe: (route: import("./types").RouteProp<ParamListBase>, placeholder: boolean) => import("./types").Descriptor<ScreenOptions, Omit<{
106
+ dispatch(action: Readonly<{
107
+ type: string;
108
+ payload?: object | undefined;
109
+ source?: string | undefined;
110
+ target?: string | undefined;
111
+ }> | ((state: Readonly<State>) => Readonly<{
112
+ type: string;
113
+ payload?: object | undefined;
114
+ source?: string | undefined;
115
+ target?: string | undefined;
116
+ }>)): void;
117
+ navigate<RouteName extends string>(...args: RouteName extends unknown ? [screen: RouteName] | [screen: RouteName, params: object | undefined] : never): void;
118
+ navigate<RouteName_1 extends string>(options: RouteName_1 extends unknown ? {
119
+ name: RouteName_1;
120
+ params: object | undefined;
121
+ path?: string | undefined;
122
+ merge?: boolean | undefined;
123
+ } : never): void;
124
+ navigateDeprecated<RouteName_2 extends string>(...args: RouteName_2 extends unknown ? [screen: RouteName_2] | [screen: RouteName_2, params: object | undefined] : never): void;
125
+ navigateDeprecated<RouteName_3 extends string>(options: RouteName_3 extends unknown ? {
126
+ name: RouteName_3;
127
+ /**
128
+ * Hook for building navigators.
129
+ *
130
+ * @param createRouter Factory method which returns router object.
131
+ * @param options Options object containing `children` and additional options for the router.
132
+ * @returns An object containing `state`, `navigation`, `descriptors` objects.
133
+ */
134
+ params: object | undefined;
135
+ merge?: boolean | undefined;
136
+ } : never): void;
137
+ preload<RouteName_4 extends string>(...args: RouteName_4 extends unknown ? [screen: RouteName_4] | [screen: RouteName_4, params: object | undefined] : never): void;
138
+ reset(state: State | PartialState<State>): void;
139
+ goBack(): void;
140
+ isFocused(): boolean;
141
+ canGoBack(): boolean;
142
+ getId(): string | undefined;
143
+ getParent<T = import("./types").NavigationHelpers<ParamListBase, {}> | undefined>(id?: string | undefined): T;
144
+ getState(): State;
145
+ setStateForNextRouteNamesChange(state: State | PartialState<State>): void;
146
+ } & PrivateValueStore<[ParamListBase, unknown, unknown]>, "getParent"> & {
147
+ getParent<T_1 = import("./types").NavigationProp<ParamListBase, string, undefined, Readonly<{
148
+ key: string;
149
+ index: number;
150
+ routeNames: string[];
151
+ history?: unknown[] | undefined;
152
+ routes: import("@react-navigation/routers").NavigationRoute<ParamListBase, string>[];
153
+ type: string;
154
+ stale: false;
155
+ }>, {}, {}> | undefined>(id?: string | undefined): T_1;
156
+ setParams(params: Partial<object | undefined>): void;
157
+ setOptions(options: Partial<ScreenOptions>): void;
158
+ } & import("./types").EventConsumer<EventMap & EventMapCore<State>> & PrivateValueStore<[ParamListBase, string, EventMap]> & ActionHelpers, import("./types").RouteProp<ParamListBase>>;
123
159
  descriptors: Record<string, import("./types").Descriptor<ScreenOptions, Omit<{
124
160
  dispatch(action: Readonly<{
125
161
  type: string;
@@ -142,9 +178,17 @@ export default function useNavigationBuilder<State extends NavigationState, Rout
142
178
  navigateDeprecated<RouteName_2 extends string>(...args: RouteName_2 extends unknown ? [screen: RouteName_2] | [screen: RouteName_2, params: object | undefined] : never): void;
143
179
  navigateDeprecated<RouteName_3 extends string>(options: RouteName_3 extends unknown ? {
144
180
  name: RouteName_3;
181
+ /**
182
+ * Hook for building navigators.
183
+ *
184
+ * @param createRouter Factory method which returns router object.
185
+ * @param options Options object containing `children` and additional options for the router.
186
+ * @returns An object containing `state`, `navigation`, `descriptors` objects.
187
+ */
145
188
  params: object | undefined;
146
189
  merge?: boolean | undefined;
147
190
  } : never): void;
191
+ preload<RouteName_4 extends string>(...args: RouteName_4 extends unknown ? [screen: RouteName_4] | [screen: RouteName_4, params: object | undefined] : never): void;
148
192
  reset(state: State | PartialState<State>): void;
149
193
  goBack(): void;
150
194
  isFocused(): boolean;
@@ -152,30 +196,22 @@ export default function useNavigationBuilder<State extends NavigationState, Rout
152
196
  getId(): string | undefined;
153
197
  getParent<T = import("./types").NavigationHelpers<ParamListBase, {}> | undefined>(id?: string | undefined): T;
154
198
  getState(): State;
199
+ setStateForNextRouteNamesChange(state: State | PartialState<State>): void;
155
200
  } & PrivateValueStore<[ParamListBase, unknown, unknown]>, "getParent"> & {
156
201
  getParent<T_1 = import("./types").NavigationProp<ParamListBase, string, undefined, Readonly<{
157
202
  key: string;
158
203
  index: number;
159
204
  routeNames: string[];
160
205
  history?: unknown[] | undefined;
161
- routes: (Readonly<{
162
- key: string;
163
- name: string;
164
- path?: string | undefined;
165
- }> & Readonly<{
166
- params?: Readonly<object | undefined>;
167
- }> & {
168
- state?: Readonly<any> | PartialState<Readonly<any>> | undefined;
169
- })[];
206
+ routes: import("@react-navigation/routers").NavigationRoute<ParamListBase, string>[];
170
207
  type: string;
171
208
  stale: false;
172
209
  }>, {}, {}> | undefined>(id?: string | undefined): T_1;
173
210
  setParams(params: Partial<object | undefined>): void;
174
211
  setOptions(options: Partial<ScreenOptions>): void;
175
- } & import("./types").EventConsumer<EventMap & EventMapCore<State>> & PrivateValueStore<[ParamListBase, string, EventMap]> & ActionHelpers, RouteProp<ParamListBase, string>>>;
212
+ } & import("./types").EventConsumer<EventMap & EventMapCore<State>> & PrivateValueStore<[ParamListBase, string, EventMap]> & ActionHelpers, import("./types").RouteProp<ParamListBase>>>;
176
213
  NavigationContent: ({ children }: {
177
214
  children: React.ReactNode;
178
- }) => JSX.Element;
215
+ }) => React.JSX.Element;
179
216
  };
180
- export {};
181
217
  //# sourceMappingURL=useNavigationBuilder.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useNavigationBuilder.d.ts","sourceRoot":"","sources":["../../../src/useNavigationBuilder.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,oBAAoB,EAEpB,eAAe,EACf,aAAa,EACb,YAAY,EAIZ,aAAa,EACd,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAW/B,OAAO,EACL,uBAAuB,EAEvB,YAAY,EAEZ,iBAAiB,EAEjB,SAAS,EACV,MAAM,SAAS,CAAC;AAoBjB,KAAK,wBAAwB,CAAC,aAAa,SAAS,EAAE,IAAI;IACxD;;;OAGG;IACH,oBAAoB,CAAC,EACjB,aAAa,GACb,CAAC,CAAC,KAAK,EAAE;QACP,KAAK,EAAE,SAAS,CAAC,aAAa,CAAC,CAAC;QAChC,UAAU,EAAE,GAAG,CAAC;QAChB,OAAO,EAAE,aAAa,CAAC;KACxB,KAAK,aAAa,CAAC,CAAC;CAC1B,CAAC;AAwLF;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAC1C,KAAK,SAAS,eAAe,EAC7B,aAAa,SAAS,oBAAoB,EAC1C,aAAa,SAAS,MAAM,CAAC,MAAM,EAAE,MAAM,IAAI,CAAC,EAChD,aAAa,SAAS,EAAE,EACxB,QAAQ,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAEpC,YAAY,EAAE,aAAa,CAAC,KAAK,EAAE,GAAG,EAAE,aAAa,CAAC,EACtD,OAAO,EAAE,uBAAuB,CAC9B,aAAa,EACb,KAAK,EACL,aAAa,EACb,QAAQ,CACT,GACC,wBAAwB,CAAC,aAAa,CAAC,GACvC,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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