@react-navigation/core 7.8.3 → 7.8.5

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 (522) hide show
  1. package/lib/typescript/src/BaseNavigationContainer.d.ts.map +1 -0
  2. package/lib/typescript/src/CurrentRenderContext.d.ts.map +1 -0
  3. package/lib/typescript/src/DeprecatedNavigationInChildContext.d.ts.map +1 -0
  4. package/lib/typescript/src/EnsureSingleNavigator.d.ts.map +1 -0
  5. package/lib/typescript/src/Group.d.ts.map +1 -0
  6. package/lib/typescript/src/NavigationBuilderContext.d.ts.map +1 -0
  7. package/lib/typescript/src/NavigationContainerRefContext.d.ts.map +1 -0
  8. package/lib/typescript/src/NavigationContext.d.ts.map +1 -0
  9. package/lib/typescript/src/NavigationFocusedRouteStateContext.d.ts.map +1 -0
  10. package/lib/typescript/src/NavigationHelpersContext.d.ts.map +1 -0
  11. package/lib/typescript/src/NavigationIndependentTree.d.ts.map +1 -0
  12. package/lib/typescript/src/NavigationIndependentTreeContext.d.ts.map +1 -0
  13. package/lib/typescript/src/NavigationRouteContext.d.ts.map +1 -0
  14. package/lib/typescript/src/NavigationStateContext.d.ts.map +1 -0
  15. package/lib/typescript/src/PreventRemoveContext.d.ts.map +1 -0
  16. package/lib/typescript/src/PreventRemoveProvider.d.ts.map +1 -0
  17. package/lib/typescript/src/SceneView.d.ts.map +1 -0
  18. package/lib/typescript/src/Screen.d.ts.map +1 -0
  19. package/lib/typescript/src/StaticContainer.d.ts.map +1 -0
  20. package/lib/typescript/src/StaticNavigation.d.ts.map +1 -0
  21. package/lib/typescript/src/UnhandledActionContext.d.ts.map +1 -0
  22. package/lib/typescript/src/arrayStartsWith.d.ts.map +1 -0
  23. package/lib/typescript/src/checkDuplicateRouteNames.d.ts.map +1 -0
  24. package/lib/typescript/src/checkSerializable.d.ts.map +1 -0
  25. package/lib/typescript/src/createNavigationContainerRef.d.ts.map +1 -0
  26. package/lib/typescript/src/createNavigatorFactory.d.ts.map +1 -0
  27. package/lib/typescript/src/deepFreeze.d.ts.map +1 -0
  28. package/lib/typescript/src/findFocusedRoute.d.ts.map +1 -0
  29. package/lib/typescript/src/getActionFromState.d.ts.map +1 -0
  30. package/lib/typescript/src/getFocusedRouteNameFromRoute.d.ts.map +1 -0
  31. package/lib/typescript/src/getPathFromState.d.ts.map +1 -0
  32. package/lib/typescript/src/getPatternParts.d.ts.map +1 -0
  33. package/lib/typescript/src/getStateFromPath.d.ts.map +1 -0
  34. package/lib/typescript/src/index.d.ts.map +1 -0
  35. package/lib/typescript/src/isArrayEqual.d.ts.map +1 -0
  36. package/lib/typescript/src/isRecordEqual.d.ts.map +1 -0
  37. package/lib/typescript/src/theming/ThemeContext.d.ts.map +1 -0
  38. package/lib/typescript/src/theming/ThemeProvider.d.ts.map +1 -0
  39. package/lib/typescript/src/theming/useTheme.d.ts.map +1 -0
  40. package/lib/typescript/src/types.d.ts.map +1 -0
  41. package/lib/typescript/src/useChildListeners.d.ts.map +1 -0
  42. package/lib/typescript/src/useComponent.d.ts.map +1 -0
  43. package/lib/typescript/src/useCurrentRender.d.ts.map +1 -0
  44. package/lib/typescript/src/useDescriptors.d.ts.map +1 -0
  45. package/lib/typescript/src/useEventEmitter.d.ts.map +1 -0
  46. package/lib/typescript/src/useFocusEffect.d.ts.map +1 -0
  47. package/lib/typescript/src/useFocusEvents.d.ts.map +1 -0
  48. package/lib/typescript/src/useFocusedListenersChildrenAdapter.d.ts.map +1 -0
  49. package/lib/typescript/src/useIsFocused.d.ts.map +1 -0
  50. package/lib/typescript/src/useIsomorphicLayoutEffect.d.ts.map +1 -0
  51. package/lib/typescript/src/useIsomorphicLayoutEffect.native.d.ts.map +1 -0
  52. package/lib/typescript/src/useKeyedChildListeners.d.ts.map +1 -0
  53. package/lib/typescript/src/useLazyValue.d.ts.map +1 -0
  54. package/lib/typescript/src/useNavigation.d.ts.map +1 -0
  55. package/lib/typescript/src/useNavigationBuilder.d.ts.map +1 -0
  56. package/lib/typescript/src/useNavigationCache.d.ts.map +1 -0
  57. package/lib/typescript/src/useNavigationContainerRef.d.ts.map +1 -0
  58. package/lib/typescript/src/useNavigationHelpers.d.ts.map +1 -0
  59. package/lib/typescript/src/useNavigationIndependentTree.d.ts.map +1 -0
  60. package/lib/typescript/src/useNavigationState.d.ts.map +1 -0
  61. package/lib/typescript/src/useOnAction.d.ts.map +1 -0
  62. package/lib/typescript/src/useOnGetState.d.ts.map +1 -0
  63. package/lib/typescript/src/useOnPreventRemove.d.ts.map +1 -0
  64. package/lib/typescript/src/useOnRouteFocus.d.ts.map +1 -0
  65. package/lib/typescript/src/useOptionsGetters.d.ts.map +1 -0
  66. package/lib/typescript/src/usePreventRemove.d.ts.map +1 -0
  67. package/lib/typescript/src/usePreventRemoveContext.d.ts.map +1 -0
  68. package/lib/typescript/src/useRegisterNavigator.d.ts.map +1 -0
  69. package/lib/typescript/src/useRoute.d.ts.map +1 -0
  70. package/lib/typescript/src/useRouteCache.d.ts.map +1 -0
  71. package/lib/typescript/src/useScheduleUpdate.d.ts.map +1 -0
  72. package/lib/typescript/src/useStateForPath.d.ts.map +1 -0
  73. package/lib/typescript/src/useSyncState.d.ts.map +1 -0
  74. package/lib/typescript/src/validatePathConfig.d.ts.map +1 -0
  75. package/package.json +11 -24
  76. package/lib/commonjs/BaseNavigationContainer.js +0 -368
  77. package/lib/commonjs/BaseNavigationContainer.js.map +0 -1
  78. package/lib/commonjs/CurrentRenderContext.js +0 -15
  79. package/lib/commonjs/CurrentRenderContext.js.map +0 -1
  80. package/lib/commonjs/DeprecatedNavigationInChildContext.js +0 -14
  81. package/lib/commonjs/DeprecatedNavigationInChildContext.js.map +0 -1
  82. package/lib/commonjs/EnsureSingleNavigator.js +0 -43
  83. package/lib/commonjs/EnsureSingleNavigator.js.map +0 -1
  84. package/lib/commonjs/Group.js +0 -14
  85. package/lib/commonjs/Group.js.map +0 -1
  86. package/lib/commonjs/NavigationBuilderContext.js +0 -23
  87. package/lib/commonjs/NavigationBuilderContext.js.map +0 -1
  88. package/lib/commonjs/NavigationContainerRefContext.js +0 -14
  89. package/lib/commonjs/NavigationContainerRefContext.js.map +0 -1
  90. package/lib/commonjs/NavigationContext.js +0 -14
  91. package/lib/commonjs/NavigationContext.js.map +0 -1
  92. package/lib/commonjs/NavigationFocusedRouteStateContext.js +0 -14
  93. package/lib/commonjs/NavigationFocusedRouteStateContext.js.map +0 -1
  94. package/lib/commonjs/NavigationHelpersContext.js +0 -15
  95. package/lib/commonjs/NavigationHelpersContext.js.map +0 -1
  96. package/lib/commonjs/NavigationIndependentTree.js +0 -35
  97. package/lib/commonjs/NavigationIndependentTree.js.map +0 -1
  98. package/lib/commonjs/NavigationIndependentTreeContext.js +0 -14
  99. package/lib/commonjs/NavigationIndependentTreeContext.js.map +0 -1
  100. package/lib/commonjs/NavigationRouteContext.js +0 -14
  101. package/lib/commonjs/NavigationRouteContext.js.map +0 -1
  102. package/lib/commonjs/NavigationStateContext.js +0 -29
  103. package/lib/commonjs/NavigationStateContext.js.map +0 -1
  104. package/lib/commonjs/PreventRemoveContext.js +0 -16
  105. package/lib/commonjs/PreventRemoveContext.js.map +0 -1
  106. package/lib/commonjs/PreventRemoveProvider.js +0 -91
  107. package/lib/commonjs/PreventRemoveProvider.js.map +0 -1
  108. package/lib/commonjs/SceneView.js +0 -151
  109. package/lib/commonjs/SceneView.js.map +0 -1
  110. package/lib/commonjs/Screen.js +0 -14
  111. package/lib/commonjs/Screen.js.map +0 -1
  112. package/lib/commonjs/StaticContainer.js +0 -31
  113. package/lib/commonjs/StaticContainer.js.map +0 -1
  114. package/lib/commonjs/StaticNavigation.js +0 -258
  115. package/lib/commonjs/StaticNavigation.js.map +0 -1
  116. package/lib/commonjs/UnhandledActionContext.js +0 -11
  117. package/lib/commonjs/UnhandledActionContext.js.map +0 -1
  118. package/lib/commonjs/arrayStartsWith.js +0 -16
  119. package/lib/commonjs/arrayStartsWith.js.map +0 -1
  120. package/lib/commonjs/checkDuplicateRouteNames.js +0 -25
  121. package/lib/commonjs/checkDuplicateRouteNames.js.map +0 -1
  122. package/lib/commonjs/checkSerializable.js +0 -50
  123. package/lib/commonjs/checkSerializable.js.map +0 -1
  124. package/lib/commonjs/createNavigationContainerRef.js +0 -69
  125. package/lib/commonjs/createNavigationContainerRef.js.map +0 -1
  126. package/lib/commonjs/createNavigatorFactory.js +0 -34
  127. package/lib/commonjs/createNavigatorFactory.js.map +0 -1
  128. package/lib/commonjs/deepFreeze.js +0 -40
  129. package/lib/commonjs/deepFreeze.js.map +0 -1
  130. package/lib/commonjs/findFocusedRoute.js +0 -15
  131. package/lib/commonjs/findFocusedRoute.js.map +0 -1
  132. package/lib/commonjs/getActionFromState.js +0 -111
  133. package/lib/commonjs/getActionFromState.js.map +0 -1
  134. package/lib/commonjs/getFocusedRouteNameFromRoute.js +0 -22
  135. package/lib/commonjs/getFocusedRouteNameFromRoute.js.map +0 -1
  136. package/lib/commonjs/getPathFromState.js +0 -241
  137. package/lib/commonjs/getPathFromState.js.map +0 -1
  138. package/lib/commonjs/getPatternParts.js +0 -105
  139. package/lib/commonjs/getPatternParts.js.map +0 -1
  140. package/lib/commonjs/getStateFromPath.js +0 -521
  141. package/lib/commonjs/getStateFromPath.js.map +0 -1
  142. package/lib/commonjs/index.js +0 -295
  143. package/lib/commonjs/index.js.map +0 -1
  144. package/lib/commonjs/isArrayEqual.js +0 -20
  145. package/lib/commonjs/isArrayEqual.js.map +0 -1
  146. package/lib/commonjs/isRecordEqual.js +0 -21
  147. package/lib/commonjs/isRecordEqual.js.map +0 -1
  148. package/lib/commonjs/package.json +0 -1
  149. package/lib/commonjs/theming/ThemeContext.js +0 -12
  150. package/lib/commonjs/theming/ThemeContext.js.map +0 -1
  151. package/lib/commonjs/theming/ThemeProvider.js +0 -21
  152. package/lib/commonjs/theming/ThemeProvider.js.map +0 -1
  153. package/lib/commonjs/theming/useTheme.js +0 -18
  154. package/lib/commonjs/theming/useTheme.js.map +0 -1
  155. package/lib/commonjs/types.js +0 -9
  156. package/lib/commonjs/types.js.map +0 -1
  157. package/lib/commonjs/useChildListeners.js +0 -36
  158. package/lib/commonjs/useChildListeners.js.map +0 -1
  159. package/lib/commonjs/useComponent.js +0 -40
  160. package/lib/commonjs/useComponent.js.map +0 -1
  161. package/lib/commonjs/useCurrentRender.js +0 -25
  162. package/lib/commonjs/useCurrentRender.js.map +0 -1
  163. package/lib/commonjs/useDescriptors.js +0 -192
  164. package/lib/commonjs/useDescriptors.js.map +0 -1
  165. package/lib/commonjs/useEventEmitter.js +0 -105
  166. package/lib/commonjs/useEventEmitter.js.map +0 -1
  167. package/lib/commonjs/useFocusEffect.js +0 -80
  168. package/lib/commonjs/useFocusEffect.js.map +0 -1
  169. package/lib/commonjs/useFocusEvents.js +0 -70
  170. package/lib/commonjs/useFocusEvents.js.map +0 -1
  171. package/lib/commonjs/useFocusedListenersChildrenAdapter.js +0 -48
  172. package/lib/commonjs/useFocusedListenersChildrenAdapter.js.map +0 -1
  173. package/lib/commonjs/useIsFocused.js +0 -28
  174. package/lib/commonjs/useIsFocused.js.map +0 -1
  175. package/lib/commonjs/useIsomorphicLayoutEffect.js +0 -12
  176. package/lib/commonjs/useIsomorphicLayoutEffect.js.map +0 -1
  177. package/lib/commonjs/useIsomorphicLayoutEffect.native.js +0 -9
  178. package/lib/commonjs/useIsomorphicLayoutEffect.native.js.map +0 -1
  179. package/lib/commonjs/useKeyedChildListeners.js +0 -33
  180. package/lib/commonjs/useKeyedChildListeners.js.map +0 -1
  181. package/lib/commonjs/useLazyValue.js +0 -17
  182. package/lib/commonjs/useLazyValue.js.map +0 -1
  183. package/lib/commonjs/useNavigation.js +0 -27
  184. package/lib/commonjs/useNavigation.js.map +0 -1
  185. package/lib/commonjs/useNavigationBuilder.js +0 -495
  186. package/lib/commonjs/useNavigationBuilder.js.map +0 -1
  187. package/lib/commonjs/useNavigationCache.js +0 -162
  188. package/lib/commonjs/useNavigationCache.js.map +0 -1
  189. package/lib/commonjs/useNavigationContainerRef.js +0 -18
  190. package/lib/commonjs/useNavigationContainerRef.js.map +0 -1
  191. package/lib/commonjs/useNavigationHelpers.js +0 -88
  192. package/lib/commonjs/useNavigationHelpers.js.map +0 -1
  193. package/lib/commonjs/useNavigationIndependentTree.js +0 -14
  194. package/lib/commonjs/useNavigationIndependentTree.js.map +0 -1
  195. package/lib/commonjs/useNavigationState.js +0 -26
  196. package/lib/commonjs/useNavigationState.js.map +0 -1
  197. package/lib/commonjs/useOnAction.js +0 -106
  198. package/lib/commonjs/useOnAction.js.map +0 -1
  199. package/lib/commonjs/useOnGetState.js +0 -48
  200. package/lib/commonjs/useOnGetState.js.map +0 -1
  201. package/lib/commonjs/useOnPreventRemove.js +0 -72
  202. package/lib/commonjs/useOnPreventRemove.js.map +0 -1
  203. package/lib/commonjs/useOnRouteFocus.js +0 -36
  204. package/lib/commonjs/useOnRouteFocus.js.map +0 -1
  205. package/lib/commonjs/useOptionsGetters.js +0 -78
  206. package/lib/commonjs/useOptionsGetters.js.map +0 -1
  207. package/lib/commonjs/usePreventRemove.js +0 -48
  208. package/lib/commonjs/usePreventRemove.js.map +0 -1
  209. package/lib/commonjs/usePreventRemoveContext.js +0 -18
  210. package/lib/commonjs/usePreventRemoveContext.js.map +0 -1
  211. package/lib/commonjs/useRegisterNavigator.js +0 -32
  212. package/lib/commonjs/useRegisterNavigator.js.map +0 -1
  213. package/lib/commonjs/useRoute.js +0 -23
  214. package/lib/commonjs/useRoute.js.map +0 -1
  215. package/lib/commonjs/useRouteCache.js +0 -69
  216. package/lib/commonjs/useRouteCache.js.map +0 -1
  217. package/lib/commonjs/useScheduleUpdate.js +0 -30
  218. package/lib/commonjs/useScheduleUpdate.js.map +0 -1
  219. package/lib/commonjs/useStateForPath.js +0 -21
  220. package/lib/commonjs/useStateForPath.js.map +0 -1
  221. package/lib/commonjs/useSyncState.js +0 -87
  222. package/lib/commonjs/useSyncState.js.map +0 -1
  223. package/lib/commonjs/validatePathConfig.js +0 -56
  224. package/lib/commonjs/validatePathConfig.js.map +0 -1
  225. package/lib/typescript/commonjs/package.json +0 -1
  226. package/lib/typescript/commonjs/src/BaseNavigationContainer.d.ts.map +0 -1
  227. package/lib/typescript/commonjs/src/CurrentRenderContext.d.ts.map +0 -1
  228. package/lib/typescript/commonjs/src/DeprecatedNavigationInChildContext.d.ts.map +0 -1
  229. package/lib/typescript/commonjs/src/EnsureSingleNavigator.d.ts.map +0 -1
  230. package/lib/typescript/commonjs/src/Group.d.ts.map +0 -1
  231. package/lib/typescript/commonjs/src/NavigationBuilderContext.d.ts.map +0 -1
  232. package/lib/typescript/commonjs/src/NavigationContainerRefContext.d.ts.map +0 -1
  233. package/lib/typescript/commonjs/src/NavigationContext.d.ts.map +0 -1
  234. package/lib/typescript/commonjs/src/NavigationFocusedRouteStateContext.d.ts.map +0 -1
  235. package/lib/typescript/commonjs/src/NavigationHelpersContext.d.ts.map +0 -1
  236. package/lib/typescript/commonjs/src/NavigationIndependentTree.d.ts.map +0 -1
  237. package/lib/typescript/commonjs/src/NavigationIndependentTreeContext.d.ts.map +0 -1
  238. package/lib/typescript/commonjs/src/NavigationRouteContext.d.ts.map +0 -1
  239. package/lib/typescript/commonjs/src/NavigationStateContext.d.ts.map +0 -1
  240. package/lib/typescript/commonjs/src/PreventRemoveContext.d.ts.map +0 -1
  241. package/lib/typescript/commonjs/src/PreventRemoveProvider.d.ts.map +0 -1
  242. package/lib/typescript/commonjs/src/SceneView.d.ts.map +0 -1
  243. package/lib/typescript/commonjs/src/Screen.d.ts.map +0 -1
  244. package/lib/typescript/commonjs/src/StaticContainer.d.ts.map +0 -1
  245. package/lib/typescript/commonjs/src/StaticNavigation.d.ts.map +0 -1
  246. package/lib/typescript/commonjs/src/UnhandledActionContext.d.ts.map +0 -1
  247. package/lib/typescript/commonjs/src/arrayStartsWith.d.ts.map +0 -1
  248. package/lib/typescript/commonjs/src/checkDuplicateRouteNames.d.ts.map +0 -1
  249. package/lib/typescript/commonjs/src/checkSerializable.d.ts.map +0 -1
  250. package/lib/typescript/commonjs/src/createNavigationContainerRef.d.ts.map +0 -1
  251. package/lib/typescript/commonjs/src/createNavigatorFactory.d.ts.map +0 -1
  252. package/lib/typescript/commonjs/src/deepFreeze.d.ts.map +0 -1
  253. package/lib/typescript/commonjs/src/findFocusedRoute.d.ts.map +0 -1
  254. package/lib/typescript/commonjs/src/getActionFromState.d.ts.map +0 -1
  255. package/lib/typescript/commonjs/src/getFocusedRouteNameFromRoute.d.ts.map +0 -1
  256. package/lib/typescript/commonjs/src/getPathFromState.d.ts.map +0 -1
  257. package/lib/typescript/commonjs/src/getPatternParts.d.ts.map +0 -1
  258. package/lib/typescript/commonjs/src/getStateFromPath.d.ts.map +0 -1
  259. package/lib/typescript/commonjs/src/index.d.ts.map +0 -1
  260. package/lib/typescript/commonjs/src/isArrayEqual.d.ts.map +0 -1
  261. package/lib/typescript/commonjs/src/isRecordEqual.d.ts.map +0 -1
  262. package/lib/typescript/commonjs/src/theming/ThemeContext.d.ts.map +0 -1
  263. package/lib/typescript/commonjs/src/theming/ThemeProvider.d.ts.map +0 -1
  264. package/lib/typescript/commonjs/src/theming/useTheme.d.ts.map +0 -1
  265. package/lib/typescript/commonjs/src/types.d.ts.map +0 -1
  266. package/lib/typescript/commonjs/src/useChildListeners.d.ts.map +0 -1
  267. package/lib/typescript/commonjs/src/useComponent.d.ts.map +0 -1
  268. package/lib/typescript/commonjs/src/useCurrentRender.d.ts.map +0 -1
  269. package/lib/typescript/commonjs/src/useDescriptors.d.ts.map +0 -1
  270. package/lib/typescript/commonjs/src/useEventEmitter.d.ts.map +0 -1
  271. package/lib/typescript/commonjs/src/useFocusEffect.d.ts.map +0 -1
  272. package/lib/typescript/commonjs/src/useFocusEvents.d.ts.map +0 -1
  273. package/lib/typescript/commonjs/src/useFocusedListenersChildrenAdapter.d.ts.map +0 -1
  274. package/lib/typescript/commonjs/src/useIsFocused.d.ts.map +0 -1
  275. package/lib/typescript/commonjs/src/useIsomorphicLayoutEffect.d.ts.map +0 -1
  276. package/lib/typescript/commonjs/src/useIsomorphicLayoutEffect.native.d.ts.map +0 -1
  277. package/lib/typescript/commonjs/src/useKeyedChildListeners.d.ts.map +0 -1
  278. package/lib/typescript/commonjs/src/useLazyValue.d.ts.map +0 -1
  279. package/lib/typescript/commonjs/src/useNavigation.d.ts.map +0 -1
  280. package/lib/typescript/commonjs/src/useNavigationBuilder.d.ts.map +0 -1
  281. package/lib/typescript/commonjs/src/useNavigationCache.d.ts.map +0 -1
  282. package/lib/typescript/commonjs/src/useNavigationContainerRef.d.ts.map +0 -1
  283. package/lib/typescript/commonjs/src/useNavigationHelpers.d.ts.map +0 -1
  284. package/lib/typescript/commonjs/src/useNavigationIndependentTree.d.ts.map +0 -1
  285. package/lib/typescript/commonjs/src/useNavigationState.d.ts.map +0 -1
  286. package/lib/typescript/commonjs/src/useOnAction.d.ts.map +0 -1
  287. package/lib/typescript/commonjs/src/useOnGetState.d.ts.map +0 -1
  288. package/lib/typescript/commonjs/src/useOnPreventRemove.d.ts.map +0 -1
  289. package/lib/typescript/commonjs/src/useOnRouteFocus.d.ts.map +0 -1
  290. package/lib/typescript/commonjs/src/useOptionsGetters.d.ts.map +0 -1
  291. package/lib/typescript/commonjs/src/usePreventRemove.d.ts.map +0 -1
  292. package/lib/typescript/commonjs/src/usePreventRemoveContext.d.ts.map +0 -1
  293. package/lib/typescript/commonjs/src/useRegisterNavigator.d.ts.map +0 -1
  294. package/lib/typescript/commonjs/src/useRoute.d.ts.map +0 -1
  295. package/lib/typescript/commonjs/src/useRouteCache.d.ts.map +0 -1
  296. package/lib/typescript/commonjs/src/useScheduleUpdate.d.ts.map +0 -1
  297. package/lib/typescript/commonjs/src/useStateForPath.d.ts.map +0 -1
  298. package/lib/typescript/commonjs/src/useSyncState.d.ts.map +0 -1
  299. package/lib/typescript/commonjs/src/validatePathConfig.d.ts.map +0 -1
  300. package/lib/typescript/module/src/BaseNavigationContainer.d.ts +0 -17
  301. package/lib/typescript/module/src/BaseNavigationContainer.d.ts.map +0 -1
  302. package/lib/typescript/module/src/CurrentRenderContext.d.ts +0 -9
  303. package/lib/typescript/module/src/CurrentRenderContext.d.ts.map +0 -1
  304. package/lib/typescript/module/src/DeprecatedNavigationInChildContext.d.ts +0 -6
  305. package/lib/typescript/module/src/DeprecatedNavigationInChildContext.d.ts.map +0 -1
  306. package/lib/typescript/module/src/EnsureSingleNavigator.d.ts +0 -14
  307. package/lib/typescript/module/src/EnsureSingleNavigator.d.ts.map +0 -1
  308. package/lib/typescript/module/src/Group.d.ts +0 -7
  309. package/lib/typescript/module/src/Group.d.ts.map +0 -1
  310. package/lib/typescript/module/src/NavigationBuilderContext.d.ts +0 -36
  311. package/lib/typescript/module/src/NavigationBuilderContext.d.ts.map +0 -1
  312. package/lib/typescript/module/src/NavigationContainerRefContext.d.ts +0 -8
  313. package/lib/typescript/module/src/NavigationContainerRefContext.d.ts.map +0 -1
  314. package/lib/typescript/module/src/NavigationContext.d.ts +0 -8
  315. package/lib/typescript/module/src/NavigationContext.d.ts.map +0 -1
  316. package/lib/typescript/module/src/NavigationFocusedRouteStateContext.d.ts +0 -17
  317. package/lib/typescript/module/src/NavigationFocusedRouteStateContext.d.ts.map +0 -1
  318. package/lib/typescript/module/src/NavigationHelpersContext.d.ts +0 -9
  319. package/lib/typescript/module/src/NavigationHelpersContext.d.ts.map +0 -1
  320. package/lib/typescript/module/src/NavigationIndependentTree.d.ts +0 -8
  321. package/lib/typescript/module/src/NavigationIndependentTree.d.ts.map +0 -1
  322. package/lib/typescript/module/src/NavigationIndependentTreeContext.d.ts +0 -6
  323. package/lib/typescript/module/src/NavigationIndependentTreeContext.d.ts.map +0 -1
  324. package/lib/typescript/module/src/NavigationRouteContext.d.ts +0 -7
  325. package/lib/typescript/module/src/NavigationRouteContext.d.ts.map +0 -1
  326. package/lib/typescript/module/src/NavigationStateContext.d.ts +0 -13
  327. package/lib/typescript/module/src/NavigationStateContext.d.ts.map +0 -1
  328. package/lib/typescript/module/src/PreventRemoveContext.d.ts +0 -13
  329. package/lib/typescript/module/src/PreventRemoveContext.d.ts.map +0 -1
  330. package/lib/typescript/module/src/PreventRemoveProvider.d.ts +0 -10
  331. package/lib/typescript/module/src/PreventRemoveProvider.d.ts.map +0 -1
  332. package/lib/typescript/module/src/SceneView.d.ts +0 -21
  333. package/lib/typescript/module/src/SceneView.d.ts.map +0 -1
  334. package/lib/typescript/module/src/Screen.d.ts +0 -7
  335. package/lib/typescript/module/src/Screen.d.ts.map +0 -1
  336. package/lib/typescript/module/src/StaticContainer.d.ts +0 -6
  337. package/lib/typescript/module/src/StaticContainer.d.ts.map +0 -1
  338. package/lib/typescript/module/src/StaticNavigation.d.ts +0 -188
  339. package/lib/typescript/module/src/StaticNavigation.d.ts.map +0 -1
  340. package/lib/typescript/module/src/UnhandledActionContext.d.ts +0 -4
  341. package/lib/typescript/module/src/UnhandledActionContext.d.ts.map +0 -1
  342. package/lib/typescript/module/src/arrayStartsWith.d.ts +0 -5
  343. package/lib/typescript/module/src/arrayStartsWith.d.ts.map +0 -1
  344. package/lib/typescript/module/src/checkDuplicateRouteNames.d.ts +0 -3
  345. package/lib/typescript/module/src/checkDuplicateRouteNames.d.ts.map +0 -1
  346. package/lib/typescript/module/src/checkSerializable.d.ts +0 -10
  347. package/lib/typescript/module/src/checkSerializable.d.ts.map +0 -1
  348. package/lib/typescript/module/src/createNavigationContainerRef.d.ts +0 -4
  349. package/lib/typescript/module/src/createNavigationContainerRef.d.ts.map +0 -1
  350. package/lib/typescript/module/src/createNavigatorFactory.d.ts +0 -10
  351. package/lib/typescript/module/src/createNavigatorFactory.d.ts.map +0 -1
  352. package/lib/typescript/module/src/deepFreeze.d.ts +0 -3
  353. package/lib/typescript/module/src/deepFreeze.d.ts.map +0 -1
  354. package/lib/typescript/module/src/findFocusedRoute.d.ts +0 -10
  355. package/lib/typescript/module/src/findFocusedRoute.d.ts.map +0 -1
  356. package/lib/typescript/module/src/getActionFromState.d.ts +0 -17
  357. package/lib/typescript/module/src/getActionFromState.d.ts.map +0 -1
  358. package/lib/typescript/module/src/getFocusedRouteNameFromRoute.d.ts +0 -3
  359. package/lib/typescript/module/src/getFocusedRouteNameFromRoute.d.ts.map +0 -1
  360. package/lib/typescript/module/src/getPathFromState.d.ts +0 -40
  361. package/lib/typescript/module/src/getPathFromState.d.ts.map +0 -1
  362. package/lib/typescript/module/src/getPatternParts.d.ts +0 -11
  363. package/lib/typescript/module/src/getPatternParts.d.ts.map +0 -1
  364. package/lib/typescript/module/src/getStateFromPath.d.ts +0 -34
  365. package/lib/typescript/module/src/getStateFromPath.d.ts.map +0 -1
  366. package/lib/typescript/module/src/index.d.ts +0 -35
  367. package/lib/typescript/module/src/index.d.ts.map +0 -1
  368. package/lib/typescript/module/src/isArrayEqual.d.ts +0 -6
  369. package/lib/typescript/module/src/isArrayEqual.d.ts.map +0 -1
  370. package/lib/typescript/module/src/isRecordEqual.d.ts +0 -5
  371. package/lib/typescript/module/src/isRecordEqual.d.ts.map +0 -1
  372. package/lib/typescript/module/src/theming/ThemeContext.d.ts +0 -3
  373. package/lib/typescript/module/src/theming/ThemeContext.d.ts.map +0 -1
  374. package/lib/typescript/module/src/theming/ThemeProvider.d.ts +0 -8
  375. package/lib/typescript/module/src/theming/ThemeProvider.d.ts.map +0 -1
  376. package/lib/typescript/module/src/theming/useTheme.d.ts +0 -2
  377. package/lib/typescript/module/src/theming/useTheme.d.ts.map +0 -1
  378. package/lib/typescript/module/src/types.d.ts +0 -732
  379. package/lib/typescript/module/src/types.d.ts.map +0 -1
  380. package/lib/typescript/module/src/useChildListeners.d.ts +0 -12
  381. package/lib/typescript/module/src/useChildListeners.d.ts.map +0 -1
  382. package/lib/typescript/module/src/useComponent.d.ts +0 -7
  383. package/lib/typescript/module/src/useComponent.d.ts.map +0 -1
  384. package/lib/typescript/module/src/useCurrentRender.d.ts +0 -14
  385. package/lib/typescript/module/src/useCurrentRender.d.ts.map +0 -1
  386. package/lib/typescript/module/src/useDescriptors.d.ts +0 -141
  387. package/lib/typescript/module/src/useDescriptors.d.ts.map +0 -1
  388. package/lib/typescript/module/src/useEventEmitter.d.ts +0 -9
  389. package/lib/typescript/module/src/useEventEmitter.d.ts.map +0 -1
  390. package/lib/typescript/module/src/useFocusEffect.d.ts +0 -11
  391. package/lib/typescript/module/src/useFocusEffect.d.ts.map +0 -1
  392. package/lib/typescript/module/src/useFocusEvents.d.ts +0 -13
  393. package/lib/typescript/module/src/useFocusEvents.d.ts.map +0 -1
  394. package/lib/typescript/module/src/useFocusedListenersChildrenAdapter.d.ts +0 -13
  395. package/lib/typescript/module/src/useFocusedListenersChildrenAdapter.d.ts.map +0 -1
  396. package/lib/typescript/module/src/useIsFocused.d.ts +0 -6
  397. package/lib/typescript/module/src/useIsFocused.d.ts.map +0 -1
  398. package/lib/typescript/module/src/useIsomorphicLayoutEffect.d.ts +0 -6
  399. package/lib/typescript/module/src/useIsomorphicLayoutEffect.d.ts.map +0 -1
  400. package/lib/typescript/module/src/useIsomorphicLayoutEffect.native.d.ts +0 -3
  401. package/lib/typescript/module/src/useIsomorphicLayoutEffect.native.d.ts.map +0 -1
  402. package/lib/typescript/module/src/useKeyedChildListeners.d.ts +0 -12
  403. package/lib/typescript/module/src/useKeyedChildListeners.d.ts.map +0 -1
  404. package/lib/typescript/module/src/useLazyValue.d.ts +0 -2
  405. package/lib/typescript/module/src/useLazyValue.d.ts.map +0 -1
  406. package/lib/typescript/module/src/useNavigation.d.ts +0 -11
  407. package/lib/typescript/module/src/useNavigation.d.ts.map +0 -1
  408. package/lib/typescript/module/src/useNavigationBuilder.d.ts +0 -193
  409. package/lib/typescript/module/src/useNavigationBuilder.d.ts.map +0 -1
  410. package/lib/typescript/module/src/useNavigationCache.d.ts +0 -69
  411. package/lib/typescript/module/src/useNavigationCache.d.ts.map +0 -1
  412. package/lib/typescript/module/src/useNavigationContainerRef.d.ts +0 -3
  413. package/lib/typescript/module/src/useNavigationContainerRef.d.ts.map +0 -1
  414. package/lib/typescript/module/src/useNavigationHelpers.d.ts +0 -102
  415. package/lib/typescript/module/src/useNavigationHelpers.d.ts.map +0 -1
  416. package/lib/typescript/module/src/useNavigationIndependentTree.d.ts +0 -2
  417. package/lib/typescript/module/src/useNavigationIndependentTree.d.ts.map +0 -1
  418. package/lib/typescript/module/src/useNavigationState.d.ts +0 -10
  419. package/lib/typescript/module/src/useNavigationState.d.ts.map +0 -1
  420. package/lib/typescript/module/src/useOnAction.d.ts +0 -26
  421. package/lib/typescript/module/src/useOnAction.d.ts.map +0 -1
  422. package/lib/typescript/module/src/useOnGetState.d.ts +0 -9
  423. package/lib/typescript/module/src/useOnGetState.d.ts.map +0 -1
  424. package/lib/typescript/module/src/useOnPreventRemove.d.ts +0 -17
  425. package/lib/typescript/module/src/useOnPreventRemove.d.ts.map +0 -1
  426. package/lib/typescript/module/src/useOnRouteFocus.d.ts +0 -15
  427. package/lib/typescript/module/src/useOnRouteFocus.d.ts.map +0 -1
  428. package/lib/typescript/module/src/useOptionsGetters.d.ts +0 -13
  429. package/lib/typescript/module/src/useOptionsGetters.d.ts.map +0 -1
  430. package/lib/typescript/module/src/usePreventRemove.d.ts +0 -13
  431. package/lib/typescript/module/src/usePreventRemove.d.ts.map +0 -1
  432. package/lib/typescript/module/src/usePreventRemoveContext.d.ts +0 -5
  433. package/lib/typescript/module/src/usePreventRemoveContext.d.ts.map +0 -1
  434. package/lib/typescript/module/src/useRegisterNavigator.d.ts +0 -6
  435. package/lib/typescript/module/src/useRegisterNavigator.d.ts.map +0 -1
  436. package/lib/typescript/module/src/useRoute.d.ts +0 -9
  437. package/lib/typescript/module/src/useRoute.d.ts.map +0 -1
  438. package/lib/typescript/module/src/useRouteCache.d.ts +0 -14
  439. package/lib/typescript/module/src/useRouteCache.d.ts.map +0 -1
  440. package/lib/typescript/module/src/useScheduleUpdate.d.ts +0 -9
  441. package/lib/typescript/module/src/useScheduleUpdate.d.ts.map +0 -1
  442. package/lib/typescript/module/src/useStateForPath.d.ts +0 -8
  443. package/lib/typescript/module/src/useStateForPath.d.ts.map +0 -1
  444. package/lib/typescript/module/src/useSyncState.d.ts +0 -8
  445. package/lib/typescript/module/src/useSyncState.d.ts.map +0 -1
  446. package/lib/typescript/module/src/validatePathConfig.d.ts +0 -2
  447. package/lib/typescript/module/src/validatePathConfig.d.ts.map +0 -1
  448. /package/lib/typescript/{module/package.json → package.json} +0 -0
  449. /package/lib/typescript/{commonjs/src → src}/BaseNavigationContainer.d.ts +0 -0
  450. /package/lib/typescript/{commonjs/src → src}/CurrentRenderContext.d.ts +0 -0
  451. /package/lib/typescript/{commonjs/src → src}/DeprecatedNavigationInChildContext.d.ts +0 -0
  452. /package/lib/typescript/{commonjs/src → src}/EnsureSingleNavigator.d.ts +0 -0
  453. /package/lib/typescript/{commonjs/src → src}/Group.d.ts +0 -0
  454. /package/lib/typescript/{commonjs/src → src}/NavigationBuilderContext.d.ts +0 -0
  455. /package/lib/typescript/{commonjs/src → src}/NavigationContainerRefContext.d.ts +0 -0
  456. /package/lib/typescript/{commonjs/src → src}/NavigationContext.d.ts +0 -0
  457. /package/lib/typescript/{commonjs/src → src}/NavigationFocusedRouteStateContext.d.ts +0 -0
  458. /package/lib/typescript/{commonjs/src → src}/NavigationHelpersContext.d.ts +0 -0
  459. /package/lib/typescript/{commonjs/src → src}/NavigationIndependentTree.d.ts +0 -0
  460. /package/lib/typescript/{commonjs/src → src}/NavigationIndependentTreeContext.d.ts +0 -0
  461. /package/lib/typescript/{commonjs/src → src}/NavigationRouteContext.d.ts +0 -0
  462. /package/lib/typescript/{commonjs/src → src}/NavigationStateContext.d.ts +0 -0
  463. /package/lib/typescript/{commonjs/src → src}/PreventRemoveContext.d.ts +0 -0
  464. /package/lib/typescript/{commonjs/src → src}/PreventRemoveProvider.d.ts +0 -0
  465. /package/lib/typescript/{commonjs/src → src}/SceneView.d.ts +0 -0
  466. /package/lib/typescript/{commonjs/src → src}/Screen.d.ts +0 -0
  467. /package/lib/typescript/{commonjs/src → src}/StaticContainer.d.ts +0 -0
  468. /package/lib/typescript/{commonjs/src → src}/StaticNavigation.d.ts +0 -0
  469. /package/lib/typescript/{commonjs/src → src}/UnhandledActionContext.d.ts +0 -0
  470. /package/lib/typescript/{commonjs/src → src}/arrayStartsWith.d.ts +0 -0
  471. /package/lib/typescript/{commonjs/src → src}/checkDuplicateRouteNames.d.ts +0 -0
  472. /package/lib/typescript/{commonjs/src → src}/checkSerializable.d.ts +0 -0
  473. /package/lib/typescript/{commonjs/src → src}/createNavigationContainerRef.d.ts +0 -0
  474. /package/lib/typescript/{commonjs/src → src}/createNavigatorFactory.d.ts +0 -0
  475. /package/lib/typescript/{commonjs/src → src}/deepFreeze.d.ts +0 -0
  476. /package/lib/typescript/{commonjs/src → src}/findFocusedRoute.d.ts +0 -0
  477. /package/lib/typescript/{commonjs/src → src}/getActionFromState.d.ts +0 -0
  478. /package/lib/typescript/{commonjs/src → src}/getFocusedRouteNameFromRoute.d.ts +0 -0
  479. /package/lib/typescript/{commonjs/src → src}/getPathFromState.d.ts +0 -0
  480. /package/lib/typescript/{commonjs/src → src}/getPatternParts.d.ts +0 -0
  481. /package/lib/typescript/{commonjs/src → src}/getStateFromPath.d.ts +0 -0
  482. /package/lib/typescript/{commonjs/src → src}/index.d.ts +0 -0
  483. /package/lib/typescript/{commonjs/src → src}/isArrayEqual.d.ts +0 -0
  484. /package/lib/typescript/{commonjs/src → src}/isRecordEqual.d.ts +0 -0
  485. /package/lib/typescript/{commonjs/src → src}/theming/ThemeContext.d.ts +0 -0
  486. /package/lib/typescript/{commonjs/src → src}/theming/ThemeProvider.d.ts +0 -0
  487. /package/lib/typescript/{commonjs/src → src}/theming/useTheme.d.ts +0 -0
  488. /package/lib/typescript/{commonjs/src → src}/types.d.ts +0 -0
  489. /package/lib/typescript/{commonjs/src → src}/useChildListeners.d.ts +0 -0
  490. /package/lib/typescript/{commonjs/src → src}/useComponent.d.ts +0 -0
  491. /package/lib/typescript/{commonjs/src → src}/useCurrentRender.d.ts +0 -0
  492. /package/lib/typescript/{commonjs/src → src}/useDescriptors.d.ts +0 -0
  493. /package/lib/typescript/{commonjs/src → src}/useEventEmitter.d.ts +0 -0
  494. /package/lib/typescript/{commonjs/src → src}/useFocusEffect.d.ts +0 -0
  495. /package/lib/typescript/{commonjs/src → src}/useFocusEvents.d.ts +0 -0
  496. /package/lib/typescript/{commonjs/src → src}/useFocusedListenersChildrenAdapter.d.ts +0 -0
  497. /package/lib/typescript/{commonjs/src → src}/useIsFocused.d.ts +0 -0
  498. /package/lib/typescript/{commonjs/src → src}/useIsomorphicLayoutEffect.d.ts +0 -0
  499. /package/lib/typescript/{commonjs/src → src}/useIsomorphicLayoutEffect.native.d.ts +0 -0
  500. /package/lib/typescript/{commonjs/src → src}/useKeyedChildListeners.d.ts +0 -0
  501. /package/lib/typescript/{commonjs/src → src}/useLazyValue.d.ts +0 -0
  502. /package/lib/typescript/{commonjs/src → src}/useNavigation.d.ts +0 -0
  503. /package/lib/typescript/{commonjs/src → src}/useNavigationBuilder.d.ts +0 -0
  504. /package/lib/typescript/{commonjs/src → src}/useNavigationCache.d.ts +0 -0
  505. /package/lib/typescript/{commonjs/src → src}/useNavigationContainerRef.d.ts +0 -0
  506. /package/lib/typescript/{commonjs/src → src}/useNavigationHelpers.d.ts +0 -0
  507. /package/lib/typescript/{commonjs/src → src}/useNavigationIndependentTree.d.ts +0 -0
  508. /package/lib/typescript/{commonjs/src → src}/useNavigationState.d.ts +0 -0
  509. /package/lib/typescript/{commonjs/src → src}/useOnAction.d.ts +0 -0
  510. /package/lib/typescript/{commonjs/src → src}/useOnGetState.d.ts +0 -0
  511. /package/lib/typescript/{commonjs/src → src}/useOnPreventRemove.d.ts +0 -0
  512. /package/lib/typescript/{commonjs/src → src}/useOnRouteFocus.d.ts +0 -0
  513. /package/lib/typescript/{commonjs/src → src}/useOptionsGetters.d.ts +0 -0
  514. /package/lib/typescript/{commonjs/src → src}/usePreventRemove.d.ts +0 -0
  515. /package/lib/typescript/{commonjs/src → src}/usePreventRemoveContext.d.ts +0 -0
  516. /package/lib/typescript/{commonjs/src → src}/useRegisterNavigator.d.ts +0 -0
  517. /package/lib/typescript/{commonjs/src → src}/useRoute.d.ts +0 -0
  518. /package/lib/typescript/{commonjs/src → src}/useRouteCache.d.ts +0 -0
  519. /package/lib/typescript/{commonjs/src → src}/useScheduleUpdate.d.ts +0 -0
  520. /package/lib/typescript/{commonjs/src → src}/useStateForPath.d.ts +0 -0
  521. /package/lib/typescript/{commonjs/src → src}/useSyncState.d.ts +0 -0
  522. /package/lib/typescript/{commonjs/src → src}/validatePathConfig.d.ts +0 -0
@@ -1,521 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.getStateFromPath = getStateFromPath;
7
- var _escapeStringRegexp = _interopRequireDefault(require("escape-string-regexp"));
8
- var queryString = _interopRequireWildcard(require("query-string"));
9
- var _arrayStartsWith = require("./arrayStartsWith.js");
10
- var _findFocusedRoute = require("./findFocusedRoute.js");
11
- var _getPatternParts = require("./getPatternParts.js");
12
- var _isArrayEqual = require("./isArrayEqual.js");
13
- var _validatePathConfig = require("./validatePathConfig.js");
14
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
15
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
16
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
17
- /**
18
- * Utility to parse a path string to initial state object accepted by the container.
19
- * This is useful for deep linking when we need to handle the incoming URL.
20
- *
21
- * @example
22
- * ```js
23
- * getStateFromPath(
24
- * '/chat/jane/42',
25
- * {
26
- * screens: {
27
- * Chat: {
28
- * path: 'chat/:author/:id',
29
- * parse: { id: Number }
30
- * }
31
- * }
32
- * }
33
- * )
34
- * ```
35
- * @param path Path string to parse and convert, e.g. /foo/bar?count=42.
36
- * @param options Extra options to fine-tune how to parse the path.
37
- */
38
- function getStateFromPath(path, options) {
39
- const {
40
- initialRoutes,
41
- configs
42
- } = getConfigResources(options);
43
- const screens = options?.screens;
44
- let remaining = path.replace(/\/+/g, '/') // Replace multiple slash (//) with single ones
45
- .replace(/^\//, '') // Remove extra leading slash
46
- .replace(/\?.*$/, ''); // Remove query params which we will handle later
47
-
48
- // Make sure there is a trailing slash
49
- remaining = remaining.endsWith('/') ? remaining : `${remaining}/`;
50
- const prefix = options?.path?.replace(/^\//, ''); // Remove extra leading slash
51
-
52
- if (prefix) {
53
- // Make sure there is a trailing slash
54
- const normalizedPrefix = prefix.endsWith('/') ? prefix : `${prefix}/`;
55
-
56
- // If the path doesn't start with the prefix, it's not a match
57
- if (!remaining.startsWith(normalizedPrefix)) {
58
- return undefined;
59
- }
60
-
61
- // Remove the prefix from the path
62
- remaining = remaining.replace(normalizedPrefix, '');
63
- }
64
- if (screens === undefined) {
65
- // When no config is specified, use the path segments as route names
66
- const routes = remaining.split('/').filter(Boolean).map(segment => {
67
- const name = decodeURIComponent(segment);
68
- return {
69
- name
70
- };
71
- });
72
- if (routes.length) {
73
- return createNestedStateObject(path, routes, initialRoutes);
74
- }
75
- return undefined;
76
- }
77
- if (remaining === '/') {
78
- // We need to add special handling of empty path so navigation to empty path also works
79
- // When handling empty path, we should only look at the root level config
80
- const match = configs.find(config => config.segments.join('/') === '');
81
- if (match) {
82
- return createNestedStateObject(path, match.routeNames.map(name => ({
83
- name
84
- })), initialRoutes, configs);
85
- }
86
- return undefined;
87
- }
88
- let result;
89
- let current;
90
-
91
- // We match the whole path against the regex instead of segments
92
- // This makes sure matches such as wildcard will catch any unmatched routes, even if nested
93
- const {
94
- routes,
95
- remainingPath
96
- } = matchAgainstConfigs(remaining, configs);
97
- if (routes !== undefined) {
98
- // This will always be empty if full path matched
99
- current = createNestedStateObject(path, routes, initialRoutes, configs);
100
- remaining = remainingPath;
101
- result = current;
102
- }
103
- if (current == null || result == null) {
104
- return undefined;
105
- }
106
- return result;
107
- }
108
-
109
- /**
110
- * Reference to the last used config resources. This is used to avoid recomputing the config resources when the options are the same.
111
- */
112
- const cachedConfigResources = new WeakMap();
113
- function getConfigResources(options) {
114
- if (!options) return prepareConfigResources();
115
- const cached = cachedConfigResources.get(options);
116
- if (cached) return cached;
117
- const resources = prepareConfigResources(options);
118
- cachedConfigResources.set(options, resources);
119
- return resources;
120
- }
121
- function prepareConfigResources(options) {
122
- if (options) {
123
- (0, _validatePathConfig.validatePathConfig)(options);
124
- }
125
- const initialRoutes = getInitialRoutes(options);
126
- const configs = getSortedNormalizedConfigs(initialRoutes, options?.screens);
127
- checkForDuplicatedConfigs(configs);
128
- const configWithRegexes = getConfigsWithRegexes(configs);
129
- return {
130
- initialRoutes,
131
- configs,
132
- configWithRegexes
133
- };
134
- }
135
- function getInitialRoutes(options) {
136
- const initialRoutes = [];
137
- if (options?.initialRouteName) {
138
- initialRoutes.push({
139
- initialRouteName: options.initialRouteName,
140
- parentScreens: []
141
- });
142
- }
143
- return initialRoutes;
144
- }
145
- function getSortedNormalizedConfigs(initialRoutes, screens = {}) {
146
- // Create a normalized configs array which will be easier to use
147
- return [].concat(...Object.keys(screens).map(key => createNormalizedConfigs(key, screens, initialRoutes, [], [], []))).sort((a, b) => {
148
- // Sort config from most specific to least specific:
149
- // - more segments
150
- // - static segments
151
- // - params with regex
152
- // - regular params
153
- // - wildcard
154
-
155
- // If 2 patterns are same, move the one with less route names up
156
- // This is an error state, so it's only useful for consistent error messages
157
- if ((0, _isArrayEqual.isArrayEqual)(a.segments, b.segments)) {
158
- return b.routeNames.join('>').localeCompare(a.routeNames.join('>'));
159
- }
160
-
161
- // If one of the patterns starts with the other, it's more exhaustive
162
- // So move it up
163
- if ((0, _arrayStartsWith.arrayStartsWith)(a.segments, b.segments)) {
164
- return -1;
165
- }
166
- if ((0, _arrayStartsWith.arrayStartsWith)(b.segments, a.segments)) {
167
- return 1;
168
- }
169
- for (let i = 0; i < Math.max(a.segments.length, b.segments.length); i++) {
170
- // if b is longer, b gets higher priority
171
- if (a.segments[i] == null) {
172
- return 1;
173
- }
174
-
175
- // if a is longer, a gets higher priority
176
- if (b.segments[i] == null) {
177
- return -1;
178
- }
179
- const aWildCard = a.segments[i] === '*';
180
- const bWildCard = b.segments[i] === '*';
181
- const aParam = a.segments[i].startsWith(':');
182
- const bParam = b.segments[i].startsWith(':');
183
- const aRegex = aParam && a.segments[i].includes('(');
184
- const bRegex = bParam && b.segments[i].includes('(');
185
-
186
- // if both are wildcard or regex, we compare next component
187
- if (aWildCard && bWildCard || aRegex && bRegex) {
188
- continue;
189
- }
190
-
191
- // if only a is wildcard, b gets higher priority
192
- if (aWildCard && !bWildCard) {
193
- return 1;
194
- }
195
-
196
- // if only b is wildcard, a gets higher priority
197
- if (bWildCard && !aWildCard) {
198
- return -1;
199
- }
200
-
201
- // If only a has a param, b gets higher priority
202
- if (aParam && !bParam) {
203
- return 1;
204
- }
205
-
206
- // If only b has a param, a gets higher priority
207
- if (bParam && !aParam) {
208
- return -1;
209
- }
210
-
211
- // if only a has regex, a gets higher priority
212
- if (aRegex && !bRegex) {
213
- return -1;
214
- }
215
-
216
- // if only b has regex, b gets higher priority
217
- if (bRegex && !aRegex) {
218
- return 1;
219
- }
220
- }
221
- return a.segments.length - b.segments.length;
222
- });
223
- }
224
- function checkForDuplicatedConfigs(configs) {
225
- // Check for duplicate patterns in the config
226
- configs.reduce((acc, config) => {
227
- const pattern = config.segments.join('/');
228
- if (acc[pattern]) {
229
- const a = acc[pattern].routeNames;
230
- const b = config.routeNames;
231
-
232
- // It's not a problem if the path string omitted from a inner most screen
233
- // For example, it's ok if a path resolves to `A > B > C` or `A > B`
234
- const intersects = a.length > b.length ? b.every((it, i) => a[i] === it) : a.every((it, i) => b[i] === it);
235
- if (!intersects) {
236
- throw new Error(`Found conflicting screens with the same pattern. The pattern '${pattern}' resolves to both '${a.join(' > ')}' and '${b.join(' > ')}'. Patterns must be unique and cannot resolve to more than one screen.`);
237
- }
238
- }
239
- return Object.assign(acc, {
240
- [pattern]: config
241
- });
242
- }, {});
243
- }
244
- function getConfigsWithRegexes(configs) {
245
- return configs.map(c => ({
246
- ...c,
247
- // Add `$` to the regex to make sure it matches till end of the path and not just beginning
248
- regex: c.regex ? new RegExp(c.regex.source + '$') : undefined
249
- }));
250
- }
251
- const matchAgainstConfigs = (remaining, configs) => {
252
- let routes;
253
- let remainingPath = remaining;
254
-
255
- // Go through all configs, and see if the next path segment matches our regex
256
- for (const config of configs) {
257
- if (!config.regex) {
258
- continue;
259
- }
260
- const match = remainingPath.match(config.regex);
261
-
262
- // If our regex matches, we need to extract params from the path
263
- if (match) {
264
- routes = config.routeNames.map(routeName => {
265
- const routeConfig = configs.find(c => {
266
- // Check matching name AND pattern in case same screen is used at different levels in config
267
- return c.screen === routeName && (0, _arrayStartsWith.arrayStartsWith)(config.segments, c.segments);
268
- });
269
- const params = routeConfig && match.groups ? Object.fromEntries(Object.entries(match.groups).map(([key, value]) => {
270
- const index = Number(key.replace('param_', ''));
271
- const param = routeConfig.params.find(it => it.index === index);
272
- if (param?.screen === routeName && param?.name) {
273
- return [param.name, value];
274
- }
275
- return null;
276
- }).filter(it => it != null).map(([key, value]) => {
277
- if (value == null) {
278
- return [key, undefined];
279
- }
280
- const decoded = decodeURIComponent(value);
281
- const parsed = routeConfig.parse?.[key] ? routeConfig.parse[key](decoded) : decoded;
282
- return [key, parsed];
283
- })) : undefined;
284
- if (params && Object.keys(params).length) {
285
- return {
286
- name: routeName,
287
- params
288
- };
289
- }
290
- return {
291
- name: routeName
292
- };
293
- });
294
- remainingPath = remainingPath.replace(match[0], '');
295
- break;
296
- }
297
- }
298
- return {
299
- routes,
300
- remainingPath
301
- };
302
- };
303
- const createNormalizedConfigs = (screen, routeConfig, initials, paths, parentScreens, routeNames) => {
304
- const configs = [];
305
- routeNames.push(screen);
306
- parentScreens.push(screen);
307
- const config = routeConfig[screen];
308
- if (typeof config === 'string') {
309
- paths.push({
310
- screen,
311
- path: config
312
- });
313
- configs.push(createConfigItem(screen, [...routeNames], [...paths]));
314
- } else if (typeof config === 'object') {
315
- // if an object is specified as the value (e.g. Foo: { ... }),
316
- // it can have `path` property and
317
- // it could have `screens` prop which has nested configs
318
- if (typeof config.path === 'string') {
319
- if (config.exact && config.path == null) {
320
- throw new Error(`Screen '${screen}' doesn't specify a 'path'. A 'path' needs to be specified when specifying 'exact: true'. If you don't want this screen in the URL, specify it as empty string, e.g. \`path: ''\`.`);
321
- }
322
-
323
- // We should add alias configs after the main config
324
- // So unless they are more specific, main config will be matched first
325
- const aliasConfigs = [];
326
- if (config.alias) {
327
- for (const alias of config.alias) {
328
- if (typeof alias === 'string') {
329
- aliasConfigs.push(createConfigItem(screen, [...routeNames], [...paths, {
330
- screen,
331
- path: alias
332
- }], config.parse));
333
- } else if (typeof alias === 'object') {
334
- aliasConfigs.push(createConfigItem(screen, [...routeNames], alias.exact ? [{
335
- screen,
336
- path: alias.path
337
- }] : [...paths, {
338
- screen,
339
- path: alias.path
340
- }], alias.parse));
341
- }
342
- }
343
- }
344
- if (config.exact) {
345
- // If it's an exact path, we don't need to keep track of the parent screens
346
- // So we can clear it
347
- paths.length = 0;
348
- }
349
- paths.push({
350
- screen,
351
- path: config.path
352
- });
353
- configs.push(createConfigItem(screen, [...routeNames], [...paths], config.parse));
354
- configs.push(...aliasConfigs);
355
- }
356
- if (typeof config !== 'string' && typeof config.path !== 'string' && config.alias?.length) {
357
- throw new Error(`Screen '${screen}' doesn't specify a 'path'. A 'path' needs to be specified in order to use 'alias'.`);
358
- }
359
- if (config.screens) {
360
- // property `initialRouteName` without `screens` has no purpose
361
- if (config.initialRouteName) {
362
- initials.push({
363
- initialRouteName: config.initialRouteName,
364
- parentScreens
365
- });
366
- }
367
- Object.keys(config.screens).forEach(nestedConfig => {
368
- const result = createNormalizedConfigs(nestedConfig, config.screens, initials, [...paths], [...parentScreens], routeNames);
369
- configs.push(...result);
370
- });
371
- }
372
- }
373
- routeNames.pop();
374
- return configs;
375
- };
376
- const createConfigItem = (screen, routeNames, paths, parse) => {
377
- const parts = [];
378
-
379
- // Parse the path string into parts for easier matching
380
- for (const {
381
- screen,
382
- path
383
- } of paths) {
384
- parts.push(...(0, _getPatternParts.getPatternParts)(path).map(part => ({
385
- ...part,
386
- screen
387
- })));
388
- }
389
- const regex = parts.length ? new RegExp(`^(${parts.map((it, i) => {
390
- if (it.param) {
391
- const reg = it.regex || '[^/]+';
392
- return `(((?<param_${i}>${reg})\\/)${it.optional ? '?' : ''})`;
393
- }
394
- return `${it.segment === '*' ? '.*' : (0, _escapeStringRegexp.default)(it.segment)}\\/`;
395
- }).join('')})$`) : undefined;
396
- const segments = parts.map(it => it.segment);
397
- const params = parts.map((it, i) => it.param ? {
398
- index: i,
399
- screen: it.screen,
400
- name: it.param
401
- } : null).filter(it => it != null);
402
- return {
403
- screen,
404
- regex,
405
- segments,
406
- params,
407
- routeNames,
408
- parse
409
- };
410
- };
411
- const findParseConfigForRoute = (routeName, flatConfig) => {
412
- for (const config of flatConfig) {
413
- if (routeName === config.routeNames[config.routeNames.length - 1]) {
414
- return config.parse;
415
- }
416
- }
417
- return undefined;
418
- };
419
-
420
- // Try to find an initial route connected with the one passed
421
- const findInitialRoute = (routeName, parentScreens, initialRoutes) => {
422
- for (const config of initialRoutes) {
423
- if (parentScreens.length === config.parentScreens.length) {
424
- let sameParents = true;
425
- for (let i = 0; i < parentScreens.length; i++) {
426
- if (parentScreens[i].localeCompare(config.parentScreens[i]) !== 0) {
427
- sameParents = false;
428
- break;
429
- }
430
- }
431
- if (sameParents) {
432
- return routeName !== config.initialRouteName ? config.initialRouteName : undefined;
433
- }
434
- }
435
- }
436
- return undefined;
437
- };
438
-
439
- // returns state object with values depending on whether
440
- // it is the end of state and if there is initialRoute for this level
441
- const createStateObject = (initialRoute, route, isEmpty) => {
442
- if (isEmpty) {
443
- if (initialRoute) {
444
- return {
445
- index: 1,
446
- routes: [{
447
- name: initialRoute
448
- }, route]
449
- };
450
- } else {
451
- return {
452
- routes: [route]
453
- };
454
- }
455
- } else {
456
- if (initialRoute) {
457
- return {
458
- index: 1,
459
- routes: [{
460
- name: initialRoute
461
- }, {
462
- ...route,
463
- state: {
464
- routes: []
465
- }
466
- }]
467
- };
468
- } else {
469
- return {
470
- routes: [{
471
- ...route,
472
- state: {
473
- routes: []
474
- }
475
- }]
476
- };
477
- }
478
- }
479
- };
480
- const createNestedStateObject = (path, routes, initialRoutes, flatConfig) => {
481
- let route = routes.shift();
482
- const parentScreens = [];
483
- let initialRoute = findInitialRoute(route.name, parentScreens, initialRoutes);
484
- parentScreens.push(route.name);
485
- const state = createStateObject(initialRoute, route, routes.length === 0);
486
- if (routes.length > 0) {
487
- let nestedState = state;
488
- while (route = routes.shift()) {
489
- initialRoute = findInitialRoute(route.name, parentScreens, initialRoutes);
490
- const nestedStateIndex = nestedState.index || nestedState.routes.length - 1;
491
- nestedState.routes[nestedStateIndex].state = createStateObject(initialRoute, route, routes.length === 0);
492
- if (routes.length > 0) {
493
- nestedState = nestedState.routes[nestedStateIndex].state;
494
- }
495
- parentScreens.push(route.name);
496
- }
497
- }
498
- route = (0, _findFocusedRoute.findFocusedRoute)(state);
499
- route.path = path.replace(/\/$/, '');
500
- const params = parseQueryParams(path, flatConfig ? findParseConfigForRoute(route.name, flatConfig) : undefined);
501
- if (params) {
502
- route.params = {
503
- ...route.params,
504
- ...params
505
- };
506
- }
507
- return state;
508
- };
509
- const parseQueryParams = (path, parseConfig) => {
510
- const query = path.split('?')[1];
511
- const params = queryString.parse(query);
512
- if (parseConfig) {
513
- Object.keys(params).forEach(name => {
514
- if (Object.hasOwnProperty.call(parseConfig, name) && typeof params[name] === 'string') {
515
- params[name] = parseConfig[name](params[name]);
516
- }
517
- });
518
- }
519
- return Object.keys(params).length ? params : undefined;
520
- };
521
- //# sourceMappingURL=getStateFromPath.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_escapeStringRegexp","_interopRequireDefault","require","queryString","_interopRequireWildcard","_arrayStartsWith","_findFocusedRoute","_getPatternParts","_isArrayEqual","_validatePathConfig","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","getStateFromPath","path","options","initialRoutes","configs","getConfigResources","screens","remaining","replace","endsWith","prefix","normalizedPrefix","startsWith","undefined","routes","split","filter","Boolean","map","segment","name","decodeURIComponent","length","createNestedStateObject","match","find","config","segments","join","routeNames","result","current","remainingPath","matchAgainstConfigs","cachedConfigResources","prepareConfigResources","cached","resources","validatePathConfig","getInitialRoutes","getSortedNormalizedConfigs","checkForDuplicatedConfigs","configWithRegexes","getConfigsWithRegexes","initialRouteName","push","parentScreens","concat","keys","key","createNormalizedConfigs","sort","b","isArrayEqual","localeCompare","arrayStartsWith","Math","max","aWildCard","bWildCard","aParam","bParam","aRegex","includes","bRegex","reduce","acc","pattern","intersects","every","it","Error","assign","c","regex","RegExp","source","routeName","routeConfig","screen","params","groups","fromEntries","entries","value","index","Number","param","decoded","parsed","parse","initials","paths","createConfigItem","exact","aliasConfigs","alias","forEach","nestedConfig","pop","parts","getPatternParts","part","reg","optional","escape","findParseConfigForRoute","flatConfig","findInitialRoute","sameParents","createStateObject","initialRoute","route","isEmpty","state","shift","nestedState","nestedStateIndex","findFocusedRoute","parseQueryParams","parseConfig","query"],"sourceRoot":"../../src","sources":["getStateFromPath.tsx"],"mappings":";;;;;;AAMA,IAAAA,mBAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAC,uBAAA,CAAAF,OAAA;AAE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