@react-navigation/core 8.0.0-alpha.3 → 8.0.0-alpha.31

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 (285) hide show
  1. package/lib/module/BaseNavigationContainer.js +38 -19
  2. package/lib/module/BaseNavigationContainer.js.map +1 -1
  3. package/lib/module/ConsumedParamsContext.js +5 -0
  4. package/lib/module/ConsumedParamsContext.js.map +1 -0
  5. package/lib/module/DataLoading.js +127 -0
  6. package/lib/module/DataLoading.js.map +1 -0
  7. package/lib/module/NavigationBuilderContext.js +1 -0
  8. package/lib/module/NavigationBuilderContext.js.map +1 -1
  9. package/lib/module/NavigationIndependentTree.js +20 -8
  10. package/lib/module/NavigationIndependentTree.js.map +1 -1
  11. package/lib/module/NavigationProvider.js +22 -11
  12. package/lib/module/NavigationProvider.js.map +1 -1
  13. package/lib/module/NavigationStateContext.js +3 -0
  14. package/lib/module/NavigationStateContext.js.map +1 -1
  15. package/lib/module/PreventRemoveContext.js.map +1 -1
  16. package/lib/module/PreventRemoveProvider.js +37 -27
  17. package/lib/module/PreventRemoveProvider.js.map +1 -1
  18. package/lib/module/SceneView.js +10 -41
  19. package/lib/module/SceneView.js.map +1 -1
  20. package/lib/module/StaticNavigation.js +179 -50
  21. package/lib/module/StaticNavigation.js.map +1 -1
  22. package/lib/module/StaticTreeContext.js +5 -0
  23. package/lib/module/StaticTreeContext.js.map +1 -0
  24. package/lib/module/checkSerializable.js +18 -13
  25. package/lib/module/checkSerializable.js.map +1 -1
  26. package/lib/module/createNavigationContainerRef.js +6 -8
  27. package/lib/module/createNavigationContainerRef.js.map +1 -1
  28. package/lib/module/createNavigatorFactory.js +27 -5
  29. package/lib/module/createNavigatorFactory.js.map +1 -1
  30. package/lib/module/findFocusedRoute.js +7 -4
  31. package/lib/module/findFocusedRoute.js.map +1 -1
  32. package/lib/module/getActionFromState.js +45 -20
  33. package/lib/module/getActionFromState.js.map +1 -1
  34. package/lib/module/getPathFromState.js +171 -90
  35. package/lib/module/getPathFromState.js.map +1 -1
  36. package/lib/module/getPatternParts.js +20 -4
  37. package/lib/module/getPatternParts.js.map +1 -1
  38. package/lib/module/getStateFromPath.js +487 -217
  39. package/lib/module/getStateFromPath.js.map +1 -1
  40. package/lib/module/getStateFromRouteParams.js +23 -0
  41. package/lib/module/getStateFromRouteParams.js.map +1 -0
  42. package/lib/module/index.js +5 -4
  43. package/lib/module/index.js.map +1 -1
  44. package/lib/module/theming/useTheme.js +1 -1
  45. package/lib/module/theming/useTheme.js.map +1 -1
  46. package/lib/module/types.js +35 -0
  47. package/lib/module/types.js.map +1 -1
  48. package/lib/module/useDescriptors.js +21 -11
  49. package/lib/module/useDescriptors.js.map +1 -1
  50. package/lib/module/useEventEmitter.js +48 -33
  51. package/lib/module/useEventEmitter.js.map +1 -1
  52. package/lib/module/useFocusEvents.js +12 -4
  53. package/lib/module/useFocusEvents.js.map +1 -1
  54. package/lib/module/useFocusedListenersChildrenAdapter.js +2 -2
  55. package/lib/module/useFocusedListenersChildrenAdapter.js.map +1 -1
  56. package/lib/module/useIsFocused.js +7 -12
  57. package/lib/module/useIsFocused.js.map +1 -1
  58. package/lib/module/useKeyedChildListeners.js +4 -2
  59. package/lib/module/useKeyedChildListeners.js.map +1 -1
  60. package/lib/module/useLazyValue.js.map +1 -1
  61. package/lib/module/useNavigation.js +2 -15
  62. package/lib/module/useNavigation.js.map +1 -1
  63. package/lib/module/useNavigationBuilder.js +204 -131
  64. package/lib/module/useNavigationBuilder.js.map +1 -1
  65. package/lib/module/useNavigationCache.js +22 -17
  66. package/lib/module/useNavigationCache.js.map +1 -1
  67. package/lib/module/useNavigationHelpers.js +28 -10
  68. package/lib/module/useNavigationHelpers.js.map +1 -1
  69. package/lib/module/useNavigationIndependentTree.js +1 -1
  70. package/lib/module/useNavigationIndependentTree.js.map +1 -1
  71. package/lib/module/useNavigationState.js +125 -45
  72. package/lib/module/useNavigationState.js.map +1 -1
  73. package/lib/module/useOnAction.js +37 -7
  74. package/lib/module/useOnAction.js.map +1 -1
  75. package/lib/module/useOnGetState.js +6 -3
  76. package/lib/module/useOnGetState.js.map +1 -1
  77. package/lib/module/useOnPreventRemove.js +39 -30
  78. package/lib/module/useOnPreventRemove.js.map +1 -1
  79. package/lib/module/useOnRouteFocus.js +1 -1
  80. package/lib/module/useOnRouteFocus.js.map +1 -1
  81. package/lib/module/useOptionsGetters.js +10 -5
  82. package/lib/module/useOptionsGetters.js.map +1 -1
  83. package/lib/module/usePreventRemove.js +10 -3
  84. package/lib/module/usePreventRemove.js.map +1 -1
  85. package/lib/module/usePreventRemoveContext.js +1 -1
  86. package/lib/module/usePreventRemoveContext.js.map +1 -1
  87. package/lib/module/useRegisterNavigator.js +2 -2
  88. package/lib/module/useRegisterNavigator.js.map +1 -1
  89. package/lib/module/useRoute.js +2 -0
  90. package/lib/module/useRoute.js.map +1 -1
  91. package/lib/module/useRouteCache.js +17 -11
  92. package/lib/module/useRouteCache.js.map +1 -1
  93. package/lib/module/useScheduleUpdate.js +9 -9
  94. package/lib/module/useScheduleUpdate.js.map +1 -1
  95. package/lib/module/useStateForPath.js +1 -1
  96. package/lib/module/useStateForPath.js.map +1 -1
  97. package/lib/module/useSyncState.js +32 -9
  98. package/lib/module/useSyncState.js.map +1 -1
  99. package/lib/module/validatePathConfig.js +50 -36
  100. package/lib/module/validatePathConfig.js.map +1 -1
  101. package/lib/typescript/src/BaseNavigationContainer.d.ts +6 -3
  102. package/lib/typescript/src/BaseNavigationContainer.d.ts.map +1 -1
  103. package/lib/typescript/src/ConsumedParamsContext.d.ts +3 -0
  104. package/lib/typescript/src/ConsumedParamsContext.d.ts.map +1 -0
  105. package/lib/typescript/src/DataLoading.d.ts +21 -0
  106. package/lib/typescript/src/DataLoading.d.ts.map +1 -0
  107. package/lib/typescript/src/EnsureSingleNavigator.d.ts +1 -1
  108. package/lib/typescript/src/EnsureSingleNavigator.d.ts.map +1 -1
  109. package/lib/typescript/src/Group.d.ts +1 -1
  110. package/lib/typescript/src/Group.d.ts.map +1 -1
  111. package/lib/typescript/src/NavigationBuilderContext.d.ts +9 -8
  112. package/lib/typescript/src/NavigationBuilderContext.d.ts.map +1 -1
  113. package/lib/typescript/src/NavigationContainerRefContext.d.ts +1 -1
  114. package/lib/typescript/src/NavigationContainerRefContext.d.ts.map +1 -1
  115. package/lib/typescript/src/NavigationFocusedRouteStateContext.d.ts +4 -4
  116. package/lib/typescript/src/NavigationFocusedRouteStateContext.d.ts.map +1 -1
  117. package/lib/typescript/src/NavigationHelpersContext.d.ts +1 -1
  118. package/lib/typescript/src/NavigationHelpersContext.d.ts.map +1 -1
  119. package/lib/typescript/src/NavigationIndependentTree.d.ts +1 -1
  120. package/lib/typescript/src/NavigationIndependentTree.d.ts.map +1 -1
  121. package/lib/typescript/src/NavigationProvider.d.ts +12 -13
  122. package/lib/typescript/src/NavigationProvider.d.ts.map +1 -1
  123. package/lib/typescript/src/NavigationStateContext.d.ts +4 -3
  124. package/lib/typescript/src/NavigationStateContext.d.ts.map +1 -1
  125. package/lib/typescript/src/PreventRemoveContext.d.ts +1 -0
  126. package/lib/typescript/src/PreventRemoveContext.d.ts.map +1 -1
  127. package/lib/typescript/src/PreventRemoveProvider.d.ts +1 -1
  128. package/lib/typescript/src/PreventRemoveProvider.d.ts.map +1 -1
  129. package/lib/typescript/src/SceneView.d.ts +4 -2
  130. package/lib/typescript/src/SceneView.d.ts.map +1 -1
  131. package/lib/typescript/src/Screen.d.ts +1 -1
  132. package/lib/typescript/src/Screen.d.ts.map +1 -1
  133. package/lib/typescript/src/StaticContainer.d.ts +1 -1
  134. package/lib/typescript/src/StaticContainer.d.ts.map +1 -1
  135. package/lib/typescript/src/StaticNavigation.d.ts +189 -109
  136. package/lib/typescript/src/StaticNavigation.d.ts.map +1 -1
  137. package/lib/typescript/src/StaticTreeContext.d.ts +4 -0
  138. package/lib/typescript/src/StaticTreeContext.d.ts.map +1 -0
  139. package/lib/typescript/src/checkSerializable.d.ts +8 -4
  140. package/lib/typescript/src/checkSerializable.d.ts.map +1 -1
  141. package/lib/typescript/src/createNavigationContainerRef.d.ts +1 -1
  142. package/lib/typescript/src/createNavigationContainerRef.d.ts.map +1 -1
  143. package/lib/typescript/src/createNavigatorFactory.d.ts +23 -5
  144. package/lib/typescript/src/createNavigatorFactory.d.ts.map +1 -1
  145. package/lib/typescript/src/findFocusedRoute.d.ts +3 -8
  146. package/lib/typescript/src/findFocusedRoute.d.ts.map +1 -1
  147. package/lib/typescript/src/getActionFromState.d.ts +4 -4
  148. package/lib/typescript/src/getActionFromState.d.ts.map +1 -1
  149. package/lib/typescript/src/getPathFromState.d.ts +3 -3
  150. package/lib/typescript/src/getPathFromState.d.ts.map +1 -1
  151. package/lib/typescript/src/getPatternParts.d.ts +1 -0
  152. package/lib/typescript/src/getPatternParts.d.ts.map +1 -1
  153. package/lib/typescript/src/getStateFromPath.d.ts +4 -7
  154. package/lib/typescript/src/getStateFromPath.d.ts.map +1 -1
  155. package/lib/typescript/src/getStateFromRouteParams.d.ts +3 -0
  156. package/lib/typescript/src/getStateFromRouteParams.d.ts.map +1 -0
  157. package/lib/typescript/src/index.d.ts +36 -33
  158. package/lib/typescript/src/index.d.ts.map +1 -1
  159. package/lib/typescript/src/theming/ThemeContext.d.ts +1 -1
  160. package/lib/typescript/src/theming/ThemeContext.d.ts.map +1 -1
  161. package/lib/typescript/src/theming/ThemeProvider.d.ts +2 -2
  162. package/lib/typescript/src/theming/ThemeProvider.d.ts.map +1 -1
  163. package/lib/typescript/src/theming/useTheme.d.ts +1 -1
  164. package/lib/typescript/src/theming/useTheme.d.ts.map +1 -1
  165. package/lib/typescript/src/types.d.ts +260 -159
  166. package/lib/typescript/src/types.d.ts.map +1 -1
  167. package/lib/typescript/src/useChildListeners.d.ts +3 -3
  168. package/lib/typescript/src/useChildListeners.d.ts.map +1 -1
  169. package/lib/typescript/src/useComponent.d.ts +1 -1
  170. package/lib/typescript/src/useComponent.d.ts.map +1 -1
  171. package/lib/typescript/src/useDescriptors.d.ts +10 -9
  172. package/lib/typescript/src/useDescriptors.d.ts.map +1 -1
  173. package/lib/typescript/src/useEventEmitter.d.ts +2 -2
  174. package/lib/typescript/src/useEventEmitter.d.ts.map +1 -1
  175. package/lib/typescript/src/useFocusEvents.d.ts +2 -2
  176. package/lib/typescript/src/useFocusEvents.d.ts.map +1 -1
  177. package/lib/typescript/src/useFocusedListenersChildrenAdapter.d.ts +2 -2
  178. package/lib/typescript/src/useFocusedListenersChildrenAdapter.d.ts.map +1 -1
  179. package/lib/typescript/src/useIsFocused.d.ts +3 -0
  180. package/lib/typescript/src/useIsFocused.d.ts.map +1 -1
  181. package/lib/typescript/src/useKeyedChildListeners.d.ts +3 -3
  182. package/lib/typescript/src/useKeyedChildListeners.d.ts.map +1 -1
  183. package/lib/typescript/src/useLazyValue.d.ts.map +1 -1
  184. package/lib/typescript/src/useNavigation.d.ts +4 -2
  185. package/lib/typescript/src/useNavigation.d.ts.map +1 -1
  186. package/lib/typescript/src/useNavigationBuilder.d.ts +23 -30
  187. package/lib/typescript/src/useNavigationBuilder.d.ts.map +1 -1
  188. package/lib/typescript/src/useNavigationCache.d.ts +3 -3
  189. package/lib/typescript/src/useNavigationCache.d.ts.map +1 -1
  190. package/lib/typescript/src/useNavigationContainerRef.d.ts +1 -1
  191. package/lib/typescript/src/useNavigationContainerRef.d.ts.map +1 -1
  192. package/lib/typescript/src/useNavigationHelpers.d.ts +19 -27
  193. package/lib/typescript/src/useNavigationHelpers.d.ts.map +1 -1
  194. package/lib/typescript/src/useNavigationState.d.ts +17 -3
  195. package/lib/typescript/src/useNavigationState.d.ts.map +1 -1
  196. package/lib/typescript/src/useOnAction.d.ts +9 -9
  197. package/lib/typescript/src/useOnAction.d.ts.map +1 -1
  198. package/lib/typescript/src/useOnGetState.d.ts +1 -1
  199. package/lib/typescript/src/useOnGetState.d.ts.map +1 -1
  200. package/lib/typescript/src/useOnPreventRemove.d.ts +5 -9
  201. package/lib/typescript/src/useOnPreventRemove.d.ts.map +1 -1
  202. package/lib/typescript/src/useOnRouteFocus.d.ts +6 -6
  203. package/lib/typescript/src/useOnRouteFocus.d.ts.map +1 -1
  204. package/lib/typescript/src/useOptionsGetters.d.ts +1 -1
  205. package/lib/typescript/src/useOptionsGetters.d.ts.map +1 -1
  206. package/lib/typescript/src/usePreventRemove.d.ts.map +1 -1
  207. package/lib/typescript/src/usePreventRemoveContext.d.ts +2 -1
  208. package/lib/typescript/src/usePreventRemoveContext.d.ts.map +1 -1
  209. package/lib/typescript/src/useRoute.d.ts +7 -3
  210. package/lib/typescript/src/useRoute.d.ts.map +1 -1
  211. package/lib/typescript/src/useRouteCache.d.ts +5 -5
  212. package/lib/typescript/src/useRouteCache.d.ts.map +1 -1
  213. package/lib/typescript/src/useScheduleUpdate.d.ts +5 -4
  214. package/lib/typescript/src/useScheduleUpdate.d.ts.map +1 -1
  215. package/lib/typescript/src/useStateForPath.d.ts +1 -1
  216. package/lib/typescript/src/useStateForPath.d.ts.map +1 -1
  217. package/lib/typescript/src/useSyncState.d.ts +1 -0
  218. package/lib/typescript/src/useSyncState.d.ts.map +1 -1
  219. package/lib/typescript/src/utilities.d.ts +74 -37
  220. package/lib/typescript/src/utilities.d.ts.map +1 -1
  221. package/lib/typescript/src/validatePathConfig.d.ts.map +1 -1
  222. package/package.json +23 -22
  223. package/src/BaseNavigationContainer.tsx +362 -334
  224. package/src/ConsumedParamsContext.tsx +5 -0
  225. package/src/DataLoading.tsx +203 -0
  226. package/src/NavigationBuilderContext.tsx +14 -9
  227. package/src/NavigationFocusedRouteStateContext.tsx +4 -4
  228. package/src/NavigationIndependentTree.tsx +23 -12
  229. package/src/NavigationProvider.tsx +26 -15
  230. package/src/NavigationStateContext.tsx +9 -6
  231. package/src/PreventRemoveContext.tsx +1 -0
  232. package/src/PreventRemoveProvider.tsx +51 -46
  233. package/src/SceneView.tsx +11 -39
  234. package/src/StaticNavigation.tsx +659 -307
  235. package/src/StaticTreeContext.tsx +7 -0
  236. package/src/checkSerializable.tsx +35 -19
  237. package/src/createNavigationContainerRef.tsx +12 -9
  238. package/src/createNavigatorFactory.tsx +92 -8
  239. package/src/findFocusedRoute.tsx +16 -16
  240. package/src/getActionFromState.tsx +87 -51
  241. package/src/getPathFromState.tsx +254 -128
  242. package/src/getPatternParts.tsx +25 -4
  243. package/src/getStateFromPath.tsx +821 -331
  244. package/src/getStateFromRouteParams.tsx +59 -0
  245. package/src/index.tsx +55 -5
  246. package/src/theming/useTheme.tsx +1 -1
  247. package/src/types.tsx +798 -373
  248. package/src/useDescriptors.tsx +31 -14
  249. package/src/useEventEmitter.tsx +52 -38
  250. package/src/useFocusEvents.tsx +15 -7
  251. package/src/useFocusedListenersChildrenAdapter.tsx +2 -2
  252. package/src/useIsFocused.tsx +14 -21
  253. package/src/useKeyedChildListeners.tsx +4 -2
  254. package/src/useLazyValue.tsx +2 -2
  255. package/src/useNavigation.tsx +7 -24
  256. package/src/useNavigationBuilder.tsx +314 -186
  257. package/src/useNavigationCache.tsx +32 -25
  258. package/src/useNavigationHelpers.tsx +27 -10
  259. package/src/useNavigationIndependentTree.tsx +1 -1
  260. package/src/useNavigationState.tsx +168 -69
  261. package/src/useOnAction.tsx +61 -13
  262. package/src/useOnGetState.tsx +5 -3
  263. package/src/useOnPreventRemove.tsx +75 -42
  264. package/src/useOnRouteFocus.tsx +10 -12
  265. package/src/useOptionsGetters.tsx +11 -5
  266. package/src/usePreventRemove.tsx +12 -3
  267. package/src/usePreventRemoveContext.tsx +1 -1
  268. package/src/useRegisterNavigator.tsx +2 -2
  269. package/src/useRoute.tsx +20 -6
  270. package/src/useRouteCache.tsx +22 -16
  271. package/src/useScheduleUpdate.tsx +9 -10
  272. package/src/useStateForPath.tsx +1 -1
  273. package/src/useSyncState.tsx +35 -9
  274. package/src/utilities.tsx +144 -31
  275. package/src/validatePathConfig.tsx +86 -57
  276. package/lib/module/CurrentRenderContext.js +0 -10
  277. package/lib/module/CurrentRenderContext.js.map +0 -1
  278. package/lib/module/useCurrentRender.js +0 -19
  279. package/lib/module/useCurrentRender.js.map +0 -1
  280. package/lib/typescript/src/CurrentRenderContext.d.ts +0 -9
  281. package/lib/typescript/src/CurrentRenderContext.d.ts.map +0 -1
  282. package/lib/typescript/src/useCurrentRender.d.ts +0 -14
  283. package/lib/typescript/src/useCurrentRender.d.ts.map +0 -1
  284. package/src/CurrentRenderContext.tsx +0 -9
  285. package/src/useCurrentRender.tsx +0 -31
@@ -1,6 +1,12 @@
1
1
  import type { NavigationState, ParamListBase } from '@react-navigation/routers';
2
2
  import * as React from 'react';
3
- import type { NavigationListForNested, RootNavigator } from './types';
3
+ import type { NavigationListForNested, RootNavigator } from './types.js';
4
+ type NavigationStateEvent = 'update' | 'commit';
5
+ type NavigationStateListener = {
6
+ getState: () => NavigationState<ParamListBase>;
7
+ getSnapshot: () => NavigationState<ParamListBase>;
8
+ subscribe: (callback: (event: NavigationStateEvent) => void) => () => void;
9
+ };
4
10
  type NavigationStateForNested<Navigator, RouteName extends keyof NavigationListForNested<Navigator>> = NavigationListForNested<Navigator>[RouteName] extends {
5
11
  getState: () => infer State;
6
12
  } ? State : never;
@@ -14,9 +20,17 @@ type NavigationStateForNested<Navigator, RouteName extends keyof NavigationListF
14
20
  */
15
21
  export declare function useNavigationState<const T, const Navigator = RootNavigator, const RouteName extends keyof NavigationListForNested<Navigator> = keyof NavigationListForNested<Navigator>>(routeName: RouteName, selector: (state: NavigationStateForNested<Navigator, RouteName>) => T): T;
16
22
  export declare function useNavigationState<T>(selector: (state: NavigationState<ParamListBase>) => T): T;
17
- export declare function NavigationStateListenerProvider({ state, children, }: {
23
+ export declare function NavigationStateListenerProvider({ state, getState, subscribe, children, }: {
18
24
  state: NavigationState<ParamListBase>;
25
+ getState: () => NavigationState<ParamListBase>;
26
+ subscribe: (callback: () => void) => () => void;
19
27
  children: React.ReactNode;
20
- }): import("react/jsx-runtime").JSX.Element;
28
+ }): React.JSX.Element;
29
+ export declare function NamedNavigationStateListenerProvider({ name, children, }: {
30
+ name: string;
31
+ children: React.ReactNode;
32
+ }): React.JSX.Element;
33
+ export declare const NavigationStateListenerContext: React.Context<NavigationStateListener | undefined>;
34
+ export declare const NamedNavigationStateListenerListContext: React.Context<Record<string, NavigationStateListener> | undefined>;
21
35
  export {};
22
36
  //# sourceMappingURL=useNavigationState.d.ts.map
@@ -1 +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;AAChF,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,KAAK,EACV,uBAAuB,EAEvB,aAAa,EACd,MAAM,SAAS,CAAC;AAQjB,KAAK,wBAAwB,CAC3B,SAAS,EACT,SAAS,SAAS,MAAM,uBAAuB,CAAC,SAAS,CAAC,IACxD,uBAAuB,CAAC,SAAS,CAAC,CAAC,SAAS,CAAC,SAAS;IACxD,QAAQ,EAAE,MAAM,MAAM,KAAK,CAAC;CAC7B,GACG,KAAK,GACL,KAAK,CAAC;AAEV;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,CAAC,CAAC,EACP,KAAK,CAAC,SAAS,GAAG,aAAa,EAC/B,KAAK,CAAC,SAAS,SACb,MAAM,uBAAuB,CAAC,SAAS,CAAC,GAAG,MAAM,uBAAuB,CAAC,SAAS,CAAC,EAErF,SAAS,EAAE,SAAS,EACpB,QAAQ,EAAE,CAAC,KAAK,EAAE,wBAAwB,CAAC,SAAS,EAAE,SAAS,CAAC,KAAK,CAAC,GACrE,CAAC,CAAC;AACL,wBAAgB,kBAAkB,CAAC,CAAC,EAClC,QAAQ,EAAE,CAAC,KAAK,EAAE,eAAe,CAAC,aAAa,CAAC,KAAK,CAAC,GACrD,CAAC,CAAC;AAkEL,wBAAgB,+BAA+B,CAAC,EAC9C,KAAK,EACL,QAAQ,GACT,EAAE;IACD,KAAK,EA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AkB,CAAC,CAAC,EAClC,QAAQ,EAAE,CAAC,KAAK,EAAE,eAAe,CAAC,aAAa,CAAC,KAAK,CAAC,GACrD,CAAC,CAAC;AAoHL,wBAAgB,+BAA+B,CAAC,EAC9C,KAAK,EACL,QAAQ,EACR,SAAS,EACT,QAAQ,GACT,EAAE;IACD,KAAK,EAAE,eAAe,CAAC,aAAa,CAAC,CAAC;IACtC,QAAQ,EAAE,MAAM,eAAe,CAAC,aAAa,CAAC,CAAC;IAC/C,SAAS,EAAE,CAAC,QAAQ,EAAE,MAAM,IAAI,KAAK,MAAM,IAAI,CAAC;IAChD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,qBAsCA;AAED,wBAAgB,oCAAoC,CAAC,EACnD,IAAI,EACJ,QAAQ,GACT,EAAE;IACD,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,qBAwBA;AAED,eAAO,MAAM,8BAA8B,oDAE/B,CAAC;AAEb,eAAO,MAAM,uCAAuC,oEAExC,CAAC"}
@@ -1,12 +1,12 @@
1
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;
2
+ import { type ChildActionListener, type ChildBeforeRemoveListener } from './NavigationBuilderContext.js';
3
+ import type { EventMapCore } from './types.js';
4
+ import type { NavigationEventEmitter } from './useEventEmitter.js';
5
+ type Options<State extends NavigationState> = {
6
+ router: Router<State, NavigationAction>;
7
+ key?: string | undefined;
8
+ getState: () => State;
9
+ setState: (state: State | PartialState<State>) => void;
10
10
  actionListeners: ChildActionListener[];
11
11
  beforeRemoveListeners: Record<string, ChildBeforeRemoveListener | undefined>;
12
12
  routerConfigOptions: RouterConfigOptions;
@@ -21,6 +21,6 @@ type Options = {
21
21
  *
22
22
  * When the action handler handles as action, it returns `true`, otherwise `false`.
23
23
  */
24
- export declare function useOnAction({ router, getState, setState, key, actionListeners, beforeRemoveListeners, routerConfigOptions, emitter, }: Options): (action: NavigationAction, visitedNavigators?: Set<string>) => boolean;
24
+ export declare function useOnAction<State extends NavigationState>({ router, getState, setState, key, actionListeners, beforeRemoveListeners, routerConfigOptions, emitter, }: Options<State>): (action: NavigationAction, visitedNavigators?: Set<string>) => boolean;
25
25
  export {};
26
26
  //# sourceMappingURL=useOnAction.d.ts.map
@@ -1 +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;AAGnC,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,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K,SAAS,eAAe,EAAE,EACzD,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,GAAG,EACH,eAAe,EACf,qBAAqB,EACrB,mBAAmB,EACnB,OAAO,GACR,EAAE,OAAO,CAAC,KAAK,CAAC,YAqBH,gBAAgB,sBACL,GAAG,CAAC,MAAM,CAAC,aAgJnC"}
@@ -1,5 +1,5 @@
1
1
  import type { NavigationState } from '@react-navigation/routers';
2
- import { type GetStateListener } from './NavigationBuilderContext';
2
+ import { type GetStateListener } from './NavigationBuilderContext.js';
3
3
  type Options = {
4
4
  getState: () => NavigationState;
5
5
  getStateListeners: Record<string, GetStateListener | undefined>;
@@ -1 +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"}
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,+BAA4B,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,QA+BrE"}
@@ -1,17 +1,13 @@
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';
1
+ import type { NavigationAction, NavigationRoute, NavigationState, ParamListBase, PartialRoute } from '@react-navigation/routers';
2
+ import { type ChildBeforeRemoveListener } from './NavigationBuilderContext.js';
3
+ import type { EventMapCore } from './types.js';
4
+ import type { NavigationEventEmitter } from './useEventEmitter.js';
5
5
  type Options = {
6
6
  getState: () => NavigationState;
7
7
  emitter: NavigationEventEmitter<EventMapCore<any>>;
8
8
  beforeRemoveListeners: Record<string, ChildBeforeRemoveListener | undefined>;
9
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;
10
+ export declare const shouldPreventRemove: (emitter: NavigationEventEmitter<EventMapCore<any>>, beforeRemoveListeners: Record<string, ChildBeforeRemoveListener | undefined>, currentRoutes: NavigationRoute<ParamListBase, string>[], nextRoutes: (NavigationRoute<ParamListBase, string> | PartialRoute<NavigationRoute<ParamListBase, string>>)[], action: NavigationAction) => boolean;
15
11
  export declare function useOnPreventRemove({ getState, emitter, beforeRemoveListeners, }: Options): void;
16
12
  export {};
17
13
  //# sourceMappingURL=useOnPreventRemove.d.ts.map
@@ -1 +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,OAA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,qBAAqB,EAAE,MAAM,CAAC,MAAM,EAAE,yBAAyB,GAAG,SAAS,CAAC,CAAC;CAC9E,CAAC;AAIF,eAAO,MAAM,mBAAmB,GAC9B,SAAS,sBAAsB,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,EAClD,uBAAuB,MAAM,CAAC,MAAM,EAAE,yBAAyB,GAAG,SAAS,CAAC,EAC5E,eAAe,eAAe,CAAC,aAAa,EAAE,MAAM,CAAC,EAAE,EACvD,YAAY,CACR,eAAe,CAAC,aAAa,EAAE,MAAM,CAAC,GACtC,YAAY,CAAC,eAAe,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC,CACvD,EAAE,EACH,QAAQ,gBAAgB,YAqEzB,CAAC;AAEF,wBAAgB,kBAAkB,CAAC,EACjC,QAAQ,EACR,OAAO,EACP,qBAAqB,GACtB,EAAE,OAAO,QAwBT"}
@@ -1,15 +1,15 @@
1
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;
2
+ type Options<State extends NavigationState, Action extends NavigationAction> = {
3
+ router: Router<State, Action>;
4
+ getState: () => State;
5
+ setState: (state: State) => void;
6
+ key?: string | undefined;
7
7
  };
8
8
  /**
9
9
  * Hook to handle focus actions for a route.
10
10
  * Focus action needs to be treated specially, coz when a nested route is focused,
11
11
  * the parent navigators also needs to be focused.
12
12
  */
13
- export declare function useOnRouteFocus<Action extends NavigationAction>({ router, getState, key: sourceRouteKey, setState, }: Options<Action>): (key: string) => void;
13
+ export declare function useOnRouteFocus<State extends NavigationState, Action extends NavigationAction>({ router, getState, key: sourceRouteKey, setState }: Options<State, Action>): (key: string) => void;
14
14
  export {};
15
15
  //# sourceMappingURL=useOnRouteFocus.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useOnRouteFocus.d.ts","sourceRoot":"","sources":["../../../src/useOnRouteF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Acf"}
@@ -1,5 +1,5 @@
1
1
  import type { ParamListBase } from '@react-navigation/routers';
2
- import type { NavigationProp } from './types';
2
+ import type { NavigationProp } from './types.js';
3
3
  type Options = {
4
4
  key?: string;
5
5
  navigation?: NavigationProp<ParamListBase>;
@@ -1 +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"}
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,YAAS,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;4BAqE7D,MAAM,UAAU,MAAM,MAAM,GAAG,SAAS,GAAG,IAAI;;EAiBxD"}
@@ -1 +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"}
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,QAyCpE"}
@@ -1,5 +1,6 @@
1
1
  export declare function usePreventRemoveContext(): {
2
- preventedRoutes: import("./PreventRemoveContext").PreventedRoutes;
2
+ preventedRoutes: import("./PreventRemoveContext.js").PreventedRoutes;
3
3
  setPreventRemove: (id: string, routeKey: string, preventRemove: boolean) => void;
4
+ notifyPreventRemove: () => void;
4
5
  };
5
6
  //# sourceMappingURL=usePreventRemoveContext.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"usePreventRemoveContext.d.ts","sourceRoot":"","sources":["../../../src/usePreventRemoveContext.tsx"],"names":[],"mappings":"AAIA,wBAAgB,uBAAuB;;;EAUtC"}
1
+ {"version":3,"file":"usePreventRemoveContext.d.ts","sourceRoot":"","sources":["../../../src/usePreventRemoveContext.tsx"],"names":[],"mappings":"AAIA,wBAAgB,uBAAuB;;;;EAUtC"}
@@ -1,15 +1,19 @@
1
1
  import type { ParamListBase } from '@react-navigation/routers';
2
- import type { RootParamList, RouteForName, RouteProp } from './types';
2
+ import type { NestedParamLists, RootParamList, RouteForName, RouteProp } from './types.js';
3
+ import type { KeyOf } from './utilities.js';
3
4
  /**
4
5
  * Get all possible route names from a param list and its nested navigators.
6
+ * Recurses into the param lists directly instead of using `RouteForName`,
7
+ * So the route objects don't need to be built just to get the names.
5
8
  */
6
- type AllRouteNames<ParamList extends {}> = RouteForName<ParamList, string>['name'];
9
+ type AllRouteNames<ParamList extends {}> = KeyOf<ParamList> | AllNestedRouteNames<NestedParamLists<ParamList>>;
10
+ type AllNestedRouteNames<ParamLists> = ParamLists extends {} ? AllRouteNames<ParamLists> : never;
7
11
  /**
8
12
  * Hook to access the route prop of the parent screen anywhere.
9
13
  *
10
14
  * @returns Route prop of the parent screen.
11
15
  */
12
- export declare function useRoute<const ParamList extends {} = RootParamList, const RouteName extends AllRouteNames<ParamList> = AllRouteNames<ParamList>>(name: RouteName): RouteForName<ParamList, RouteName>;
16
+ export declare function useRoute<const ParamList extends {} = RootParamList, const RouteName extends AllRouteNames<ParamList> & string = AllRouteNames<ParamList> & string>(name: RouteName): RouteForName<ParamList, RouteName>;
13
17
  export declare function useRoute<const ParamList extends {} = RootParamList>(): {} extends ParamList ? RouteProp<ParamListBase> : ParamList extends ParamListBase ? RouteForName<ParamList, string> : RouteProp<ParamListBase>;
14
18
  export {};
15
19
  //# sourceMappingURL=useRoute.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useRoute.d.ts","sourceRoot":"","sources":["../../../src/useRoute.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAO/D,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEtE;;GAEG;AACH,KAAK,aAAa,CAAC,SAAS,SAAS,EAAE,IAAI,YAAY,CACrD,SAAS,EACT,MAAM,CACP,CAAC,MAAM,CAAC,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,YAAY,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;AACvD,wBAAgB,QAAQ,CACtB,KAAK,CAAC,SAAS,SAAS,EAAE,GAAG,aAAa,KACvC,EAAE,SAAS,SAAS,GACrB,SAAS,CAAC,aAAa,CAAC,GACxB,SAAS,SAAS,aAAa,GAC7B,YAAY,CAAC,SAAS,EAAE,MAAM,CAAC,GAC/B,SAAS,CAAC,aAAa,CAAC,CAAC"}
@@ -12,12 +12,12 @@ export declare const CHILD_STATE: unique symbol;
12
12
  export declare function useRouteCache<State extends NavigationState>(routes: State['routes']): Readonly<{
13
13
  key: string;
14
14
  name: string;
15
- path?: string;
15
+ path?: string | undefined;
16
16
  history?: {
17
17
  type: "params";
18
- params: object;
19
- }[];
20
- } & Readonly<{
18
+ params: Readonly<object | undefined>;
19
+ }[] | undefined;
20
+ } & {
21
21
  params?: Readonly<object | undefined>;
22
- }>>[];
22
+ }>[];
23
23
  //# sourceMappingURL=useRouteCache.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useRouteCache.d.ts","sourceRoot":"","sources":["../../../src/useRouteCache.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAiB,MAAM,2BAA2B,CAAC;AAQhF;;;;GAIG;AACH,eAAO,MAAM,WAAW,eAAwB,CAAC;AAEjD;;;GAGG;AACH,wBAAgB,aAAa,CAAC,KAAK,SAAS,eAAe,EACzD,MAAM,EAAE,KAAK,CAAC,QAAQ,CAAC;;;;;;;;;;MA8CxB"}
1
+ {"version":3,"file":"useRouteCache.d.ts","sourceRoot":"","sources":["../../../src/useRouteCache.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAiB,MAAM,2BAA2B,CAAC;AAMhF;;;;GAIG;AACH,eAAO,MAAM,WAAW,eAAwB,CAAC;AAEjD;;;GAGG;AACH,wBAAgB,aAAa,CAAC,KAAK,SAAS,eAAe,EACzD,MAAM,EAAE,KAAK,CAAC,QAAQ,CAAC;;;;;;;;;;KAsDxB"}
@@ -1,9 +1,10 @@
1
1
  /**
2
2
  * When screen config changes, we want to update the navigator in the same update phase.
3
- * However, navigation state is in the root component and React won't let us update it from a child.
4
- * This is a workaround for that, the scheduled update is stored in the ref without actually calling setState.
5
- * It lets all subsequent updates access the latest state so it stays correct.
6
- * Then we call setState during after the component updates.
3
+ * However, navigation state is in the root component and React won't let us update it from a child during render.
4
+ * The render could also be interrupted in concurrent mode, so we need to update after commit.
5
+ * So we queue the update in an insertion effect and flush it in a layout effect.
6
+ * Insertion effects run before layout effects, so every navigator in the tree has queued its update before we flush.
7
+ * This lets nested updates be applied from the root down without clobbering each other.
7
8
  */
8
9
  export declare function useScheduleUpdate(callback: () => void): void;
9
10
  //# sourceMappingURL=useScheduleUpdate.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useScheduleUpdate.d.ts","sourceRoot":"","sources":["../../../src/useScheduleUpdate.tsx"],"names":[],"mappings":"AAIA;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,IAAI,QAUrD"}
1
+ {"version":3,"file":"useScheduleUpdate.d.ts","sourceRoot":"","sources":["../../../src/useScheduleUpdate.tsx"],"names":[],"mappings":"AAIA;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,IAAI,QAQrD"}
@@ -4,5 +4,5 @@
4
4
  *
5
5
  * @returns Minimal state to build a path for the current route.
6
6
  */
7
- export declare function useStateForPath(): import("./NavigationFocusedRouteStateContext").FocusedRouteState | undefined;
7
+ export declare function useStateForPath(): import("./NavigationFocusedRouteStateContext.js").FocusedRouteState | undefined;
8
8
  //# sourceMappingURL=useStateForPath.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useStateForPath.d.ts","sourceRoot":"","sources":["../../../src/useStateForPath.tsx"],"names":[],"mappings":"AAIA;;;;;GAKG;AACH,wBAAgB,eAAe,iFAI9B"}
1
+ {"version":3,"file":"useStateForPath.d.ts","sourceRoot":"","sources":["../../../src/useStateForPath.tsx"],"names":[],"mappings":"AAIA;;;;;GAKG;AACH,wBAAgB,eAAe,oFAI9B"}
@@ -2,6 +2,7 @@ export declare function useSyncState<T>(getInitialState: () => T): {
2
2
  readonly state: T;
3
3
  readonly getState: () => T;
4
4
  readonly setState: (newState: T) => void;
5
+ readonly subscribe: (callback: () => void) => () => void;
5
6
  readonly scheduleUpdate: (callback: () => void) => void;
6
7
  readonly flushUpdates: () => void;
7
8
  };
@@ -1 +1 @@
1
- {"version":3,"file":"useSyncState.d.ts","sourceRoot":"","sources":["../../../src/useSyncState.tsx"],"names":[],"mappings":"AA8DA,wBAAgB,YAAY,CAAC,CAAC,EAAE,eAAe,EAAE,MAAM,CAAC;;;;wCA6BF,MAAM,IAAI;;EA4B/D"}
1
+ {"version":3,"file":"useSyncState.d.ts","sourceRoot":"","sources":["../../../src/useSyncState.tsx"],"names":[],"mappings":"AAmFA,wBAAgB,YAAY,CAAC,CAAC,EAAE,eAAe,EAAE,MAAM,CAAC;;;;yCA/BnB,IAAI;wCA4Da,MAAM,IAAI;;EAiC/D"}
@@ -14,18 +14,52 @@ export type KeysOf<T> = T extends {} ? keyof T : never;
14
14
  * Extract string keys from an object type.
15
15
  */
16
16
  export type KeyOf<T extends {}> = Extract<keyof T, string>;
17
+ /**
18
+ * TS only checks object literals for excess properties when they are not generic.
19
+ * When an object is captured as a generic type, unknown keys are not caught.
20
+ * This builds a type from the provided object where any key not in the allowed type has the type `never`.
21
+ * Checking the provided object against this type then produces an error for each unknown key.
22
+ *
23
+ * When `Provided` has a string index signature (e.g. a type built from `any`,
24
+ * whose `keyof` includes `string`), there are no specific excess keys to flag,
25
+ * so this resolves to an empty type to avoid marking every key as `never`.
26
+ */
27
+ export type NoExcessObject<Provided, Allowed> = string extends keyof Provided ? {} : Record<Exclude<keyof Provided, keyof Allowed>, never>;
28
+ /**
29
+ * Check an object captured as a generic type against an allowed type,
30
+ * e.g. an object returned from a callback isn't checked for excess properties.
31
+ */
32
+ export type NoExcessCallbackReturn<Provided extends {}, Allowed extends {}> = Allowed & Provided & NoExcessObject<Provided, Allowed>;
33
+ /**
34
+ * Apply excess property checking to a value,
35
+ * or to the return value if the value is a function.
36
+ */
37
+ export type NoExcessValue<Provided, Allowed extends {}> = Provided extends (...args: never[]) => infer Return ? (...args: never[]) => Allowed & NoExcessObject<Return, Allowed> : NoExcessObject<Provided, Allowed>;
17
38
  /**
18
39
  * We get a union type when using keyof, but we want an intersection instead.
19
40
  * https://stackoverflow.com/a/50375286/1665026
20
41
  */
21
42
  export type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
22
- export type UnknownToUndefined<T> = unknown extends T ? undefined : T;
23
43
  /**
24
44
  * Exclude undefined from a type.
25
45
  * Similar to NonNullable but only excludes undefined, not null.
26
46
  */
27
47
  export type NotUndefined<T> = T extends undefined ? never : T;
28
48
  export type AnyToUnknown<T> = 0 extends 1 & T ? unknown : T;
49
+ export type RequiredKeys<T extends object> = {
50
+ [K in keyof T]-?: {} extends Pick<T, K> ? never : K;
51
+ }[keyof T];
52
+ type OptionalKeys<T extends object> = Exclude<keyof T, RequiredKeys<T>>;
53
+ /**
54
+ * Remove `| undefined` from the object type,
55
+ * and adjust the optionality of the keys based on the original type.
56
+ */
57
+ export type NotUndefinedObject<T extends object | undefined, O extends object = NotUndefined<T>> = undefined extends T ? {
58
+ [K in RequiredKeys<O>]: O[K];
59
+ } & {
60
+ [K in OptionalKeys<O>]?: O[K] | undefined;
61
+ } : T;
62
+ export type UndefinedIfAllOptional<T> = T extends object ? RequiredKeys<T> extends never ? T | undefined : T : T;
29
63
  /**
30
64
  * Check if a function type has arguments.
31
65
  */
@@ -45,6 +79,21 @@ type ExtractSegmentParam<Segment extends string> = Segment extends `:${infer Par
45
79
  } : Segment extends `:${infer Param}` ? {
46
80
  [K in StripRegex<Param>]: string;
47
81
  } : {};
82
+ export type StandardSchemaValidationResult<Output> = {
83
+ value: Output;
84
+ issues?: undefined;
85
+ } | {
86
+ value?: undefined;
87
+ issues: readonly unknown[];
88
+ };
89
+ export type StandardSchemaV1<Input = unknown, Output = Input> = {
90
+ readonly '~standard': {
91
+ readonly version: 1;
92
+ readonly vendor: string;
93
+ readonly validate: (value: Input) => StandardSchemaValidationResult<Output> | Promise<StandardSchemaValidationResult<Output>>;
94
+ };
95
+ };
96
+ export type QueryParamInput = string | string[] | null | undefined;
48
97
  /**
49
98
  * Extract path params from a path string.
50
99
  * e.g. `/foo/:userId/:postId` -> `{ userId: string; postId: string }`
@@ -53,47 +102,35 @@ type ExtractSegmentParam<Segment extends string> = Segment extends `:${infer Par
53
102
  */
54
103
  export type ExtractParamStrings<Path extends string> = Path extends `${infer Segment}/${infer Rest}` ? ExtractSegmentParam<Segment> & ExtractParamStrings<Rest> : ExtractSegmentParam<Path>;
55
104
  /**
56
- * Extract the parsed params type from base params and parse functions.
57
- * Applies the return type of parse functions to the corresponding params.
105
+ * Get the type of params based on the `parse` config and the path pattern.
58
106
  */
59
107
  export type ExtractParamsType<Params, Parse> = {
60
- [K in keyof Params]: K extends keyof Parse ? Parse[K] extends (value: string) => infer R ? R : Params[K] : Params[K];
61
- };
62
- /**
63
- * Infer the path string from a linking config.
64
- */
65
- export type InferPath<T> = T extends {
66
- path: infer P extends string;
67
- } ? P : never;
108
+ [K in keyof Params]: K extends keyof Parse ? Parse[K] extends StandardSchemaV1<unknown, infer R> ? R : Parse[K] extends (value: string) => infer R ? R : Params[K] : Params[K];
109
+ } & // Query params are the parse keys not present in the path pattern. When there
110
+ ([Exclude<keyof Parse, keyof Params>] extends [never] ? {} : {
111
+ [K in QueryParamOptionalKeys<Params, Parse>]?: QueryParamValue<Parse[K]>;
112
+ } & {
113
+ [K in QueryParamRequiredKeys<Params, Parse>]: QueryParamValue<Parse[K]>;
114
+ });
115
+ type QueryParamValue<ParseValue> = ParseValue extends StandardSchemaV1<unknown, infer R> ? R : ParseValue extends (value: string) => infer R ? R : never;
68
116
  /**
69
- * Infer the parse functions from a linking config.
117
+ * For schema, it's optional if the output has `undefined`, otherwise required
118
+ * For parse function, it's always optional as it can't say if it's required or not
70
119
  */
71
- export type InferParse<T> = T extends {
72
- parse: infer P;
73
- } ? P : {};
120
+ type QueryParamOptionalKeys<Params, Parse> = {
121
+ [K in Exclude<keyof Parse, keyof Params>]: Parse[K] extends StandardSchemaV1<unknown, infer R> ? undefined extends R ? K : never : Parse[K] extends (value: string) => unknown ? K : never;
122
+ }[Exclude<keyof Parse, keyof Params>];
74
123
  /**
75
- * Infer the params type from a screen component or nested navigator.
124
+ * Exclude optional keys to get required keys
125
+ * For schema, it's required if the output doesn't have `undefined`, otherwise optional
126
+ * It doesn't include parse functions (as they are always optional)
76
127
  */
77
- export type InferScreenParams<T> = T extends React.ComponentType<{
78
- route: {
79
- params: infer P;
80
- };
81
- }> ? P : T extends {
82
- config: {
83
- screens: infer Screens;
84
- };
85
- } ? import('./types').NavigatorScreenParams<{
86
- [K in keyof Screens]: Screens[K] extends React.ComponentType<{
87
- route: {
88
- params: infer P;
89
- };
90
- }> ? P : Screens[K] extends {
91
- screen: infer S;
92
- } ? S extends React.ComponentType<{
93
- route: {
94
- params: infer P;
95
- };
96
- }> ? P : undefined : undefined;
97
- }> : undefined;
128
+ type QueryParamRequiredKeys<Params, Parse> = Exclude<Exclude<keyof Parse, keyof Params>, QueryParamOptionalKeys<Params, Parse>>;
129
+ export type InferParamsFromLinking<T> = T extends {
130
+ path: infer P extends string;
131
+ parse: infer Parse;
132
+ } ? UndefinedIfAllOptional<ExtractParamsType<ExtractParamStrings<P>, Parse>> : T extends {
133
+ path: infer P extends string;
134
+ } ? UndefinedIfAllOptional<ExtractParamStrings<P>> : T extends string ? UndefinedIfAllOptional<ExtractParamStrings<T>> : undefined;
98
135
  export {};
99
136
  //# sourceMappingURL=utilities.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"utilities.d.ts","sourceRoot":"","sources":["../../../src/utilities.tsx"],"names":[],"mappings":"AA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MAAM,KAAK,EAAE,MAAM,MAAM,CAAC,CAAC,CAAC;AAEtC;;;;GAIG;AACH,KAAK,sBAAsB,CAAC,MAAM,EAAE,KAAK,IAAI,OAAO,CAClD,OAAO,CAAC,MAAM,KAAK,EAAE,MAAM,MAAM,CAAC,EAClC,sBAAsB,CAAC,MAAM,EAAE,KAAK,CAAC,CACtC,CAAC;AAEF,MAAM,MAAM,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS;IAChD,IAAI,EAAE,MAAM,CAAC,SAAS,MAAM,CAAC;IAC7B,KAAK,EAAE,MAAM,KAAK,CAAC;CACpB,GACG,sBAAsB,CAAC,iBAAiB,CAAC,mBAAmB,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,GACxE,CAAC,SAAS;IACN,IAAI,EAAE,MAAM,CAAC,SAAS,MAAM,CAAC;CAC9B,GACD,sBAAsB,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,GAC9C,CAAC,SAAS,MAAM,GACd,sBAAsB,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,GAC9C,SAAS,CAAC"}
@@ -1 +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,QA6E9D"}
1
+ {"version":3,"file":"validatePathConfig.d.ts","sourceRoot":"","sources":["../../../src/validatePathConfig.tsx"],"names":[],"mappings":"AAmCA,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,OAAO,EAAE,IAAI,UAAO,QA4E9D"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@react-navigation/core",
3
3
  "description": "Core utilities for building navigators",
4
- "version": "8.0.0-alpha.3",
4
+ "version": "8.0.0-alpha.31",
5
5
  "keywords": [
6
6
  "react",
7
7
  "react-native",
@@ -21,7 +21,7 @@
21
21
  "types": "./lib/typescript/src/index.d.ts",
22
22
  "exports": {
23
23
  ".": {
24
- "source": "./src/index.tsx",
24
+ "@react-navigation/source": "./src/index.tsx",
25
25
  "types": "./lib/typescript/src/index.d.ts",
26
26
  "default": "./lib/module/index.js"
27
27
  },
@@ -40,30 +40,31 @@
40
40
  "clean": "del lib"
41
41
  },
42
42
  "dependencies": {
43
- "@react-navigation/routers": "^8.0.0-alpha.1",
44
- "escape-string-regexp": "^4.0.0",
43
+ "@react-navigation/routers": "^8.0.0-alpha.17",
44
+ "escape-string-regexp": "^5.0.0",
45
45
  "fast-deep-equal": "^3.1.3",
46
- "nanoid": "^3.3.11",
47
- "query-string": "^7.1.3",
48
- "react-is": "^19.1.0",
49
- "use-latest-callback": "^0.3.2",
50
- "use-sync-external-store": "^1.5.0"
46
+ "nanoid": "^5.1.11",
47
+ "query-string": "^9.4.0",
48
+ "react-is": "^19.2.6",
49
+ "use-latest-callback": "^0.3.5"
51
50
  },
52
51
  "devDependencies": {
53
- "@jest/globals": "^30.0.0",
54
- "@testing-library/react-native": "^13.2.1",
55
- "@types/react": "~19.1.10",
56
- "@types/react-is": "^19.0.0",
57
- "@types/use-sync-external-store": "^1.5.0",
58
- "del-cli": "^6.0.0",
59
- "immer": "^10.1.1",
60
- "react": "19.1.0",
61
- "react-native-builder-bob": "^0.40.12",
62
- "react-test-renderer": "19.1.0",
63
- "typescript": "^5.9.2"
52
+ "@jest/globals": "^30.4.1",
53
+ "@testing-library/react-native": "^14.0.0",
54
+ "@types/react": "~19.2.17",
55
+ "@types/react-is": "^19.2.0",
56
+ "del-cli": "^7.0.0",
57
+ "immer": "^11.1.8",
58
+ "react": "19.2.3",
59
+ "react-native": "0.85.3",
60
+ "react-native-builder-bob": "^0.43.0",
61
+ "test-renderer": "1.2.0",
62
+ "typescript": "^6.0.3",
63
+ "valibot": "^1.4.1",
64
+ "zod": "^4.4.3"
64
65
  },
65
66
  "peerDependencies": {
66
- "react": ">= 19.0.0"
67
+ "react": ">= 19.2.0"
67
68
  },
68
69
  "react-native-builder-bob": {
69
70
  "source": "src",
@@ -83,5 +84,5 @@
83
84
  ]
84
85
  ]
85
86
  },
86
- "gitHead": "a338af06f8efcbe95e8a0b1aa62cc6bf3797e2ab"
87
+ "gitHead": "f8dd4e8fa7b0c7ec159f9f58ab31660aca8f1bf6"
87
88
  }