@react-navigation/core 7.0.0-rc.9 → 7.0.0

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 (855) hide show
  1. package/lib/commonjs/BaseNavigationContainer.js +356 -0
  2. package/lib/commonjs/BaseNavigationContainer.js.map +1 -0
  3. package/lib/commonjs/CurrentRenderContext.js +15 -0
  4. package/lib/commonjs/DeprecatedNavigationInChildContext.js +14 -0
  5. package/lib/commonjs/EnsureSingleNavigator.js +43 -0
  6. package/lib/commonjs/Group.js +14 -0
  7. package/lib/commonjs/NavigationBuilderContext.js +17 -0
  8. package/lib/commonjs/NavigationContainerRefContext.js +14 -0
  9. package/lib/commonjs/NavigationContext.js +14 -0
  10. package/lib/commonjs/NavigationHelpersContext.js +15 -0
  11. package/lib/commonjs/NavigationIndependentTree.js +35 -0
  12. package/lib/commonjs/NavigationIndependentTreeContext.js +14 -0
  13. package/lib/commonjs/NavigationRouteContext.js +14 -0
  14. package/lib/commonjs/NavigationStateContext.js +29 -0
  15. package/lib/commonjs/PreventRemoveContext.js +16 -0
  16. package/lib/commonjs/PreventRemoveProvider.js +91 -0
  17. package/lib/commonjs/SceneView.js +96 -0
  18. package/lib/commonjs/Screen.js +14 -0
  19. package/lib/commonjs/StaticContainer.js +31 -0
  20. package/lib/commonjs/StaticNavigation.js +256 -0
  21. package/lib/commonjs/StaticNavigation.js.map +1 -0
  22. package/lib/commonjs/UnhandledActionContext.js +11 -0
  23. package/lib/commonjs/checkDuplicateRouteNames.js +25 -0
  24. package/lib/commonjs/checkSerializable.js +50 -0
  25. package/lib/commonjs/createNavigationContainerRef.js +69 -0
  26. package/lib/commonjs/createNavigatorFactory.js +34 -0
  27. package/lib/commonjs/deepFreeze.js +37 -0
  28. package/lib/commonjs/findFocusedRoute.js +15 -0
  29. package/lib/commonjs/getActionFromState.js +86 -0
  30. package/lib/commonjs/getFocusedRouteNameFromRoute.js +22 -0
  31. package/lib/commonjs/getPathFromState.js +218 -0
  32. package/lib/commonjs/getPathFromState.js.map +1 -0
  33. package/lib/commonjs/getStateFromPath.js +475 -0
  34. package/lib/commonjs/getStateFromPath.js.map +1 -0
  35. package/lib/commonjs/index.js +287 -0
  36. package/lib/commonjs/isArrayEqual.js +20 -0
  37. package/lib/commonjs/isRecordEqual.js +21 -0
  38. package/lib/commonjs/package.json +1 -0
  39. package/lib/commonjs/theming/ThemeContext.js +12 -0
  40. package/lib/commonjs/theming/ThemeProvider.js +21 -0
  41. package/lib/commonjs/theming/useTheme.js +18 -0
  42. package/lib/commonjs/types.js +27 -0
  43. package/lib/commonjs/types.js.map +1 -0
  44. package/lib/commonjs/useChildListeners.js +36 -0
  45. package/lib/commonjs/useComponent.js +40 -0
  46. package/lib/commonjs/useCurrentRender.js +25 -0
  47. package/lib/commonjs/useDescriptors.js +188 -0
  48. package/lib/commonjs/useEventEmitter.js +105 -0
  49. package/lib/commonjs/useFocusEffect.js +80 -0
  50. package/lib/commonjs/useFocusEvents.js +70 -0
  51. package/lib/commonjs/useFocusedListenersChildrenAdapter.js +48 -0
  52. package/lib/commonjs/useIsFocused.js +28 -0
  53. package/lib/commonjs/useIsomorphicLayoutEffect.js +12 -0
  54. package/lib/commonjs/useIsomorphicLayoutEffect.native.js +9 -0
  55. package/lib/commonjs/useKeyedChildListeners.js +33 -0
  56. package/lib/commonjs/useLazyValue.js +17 -0
  57. package/lib/commonjs/useNavigation.js +27 -0
  58. package/lib/commonjs/useNavigationBuilder.js +478 -0
  59. package/lib/commonjs/useNavigationCache.js +162 -0
  60. package/lib/commonjs/useNavigationContainerRef.js +18 -0
  61. package/lib/commonjs/useNavigationHelpers.js +76 -0
  62. package/lib/commonjs/useNavigationIndependentTree.js +14 -0
  63. package/lib/commonjs/useNavigationState.js +26 -0
  64. package/lib/commonjs/useOnAction.js +106 -0
  65. package/lib/commonjs/useOnGetState.js +48 -0
  66. package/lib/commonjs/useOnPreventRemove.js +72 -0
  67. package/lib/commonjs/useOnRouteFocus.js +36 -0
  68. package/lib/commonjs/useOptionsGetters.js +78 -0
  69. package/lib/commonjs/usePreventRemove.js +48 -0
  70. package/lib/commonjs/usePreventRemoveContext.js +18 -0
  71. package/lib/commonjs/useRegisterNavigator.js +32 -0
  72. package/lib/commonjs/useRoute.js +23 -0
  73. package/lib/commonjs/useRouteCache.js +69 -0
  74. package/lib/commonjs/useSyncState.js +48 -0
  75. package/lib/commonjs/validatePathConfig.js +49 -0
  76. package/lib/commonjs/validatePathConfig.js.map +1 -0
  77. package/lib/module/BaseNavigationContainer.js +349 -0
  78. package/lib/module/BaseNavigationContainer.js.map +1 -0
  79. package/lib/module/CurrentRenderContext.js +10 -0
  80. package/lib/module/CurrentRenderContext.js.map +1 -0
  81. package/lib/module/DeprecatedNavigationInChildContext.js +9 -0
  82. package/lib/module/DeprecatedNavigationInChildContext.js.map +1 -0
  83. package/lib/module/EnsureSingleNavigator.js +36 -0
  84. package/lib/module/EnsureSingleNavigator.js.map +1 -0
  85. package/lib/module/Group.js +10 -0
  86. package/lib/module/Group.js.map +1 -0
  87. package/lib/module/NavigationBuilderContext.js +11 -0
  88. package/lib/module/NavigationBuilderContext.js.map +1 -0
  89. package/lib/module/NavigationContainerRefContext.js +8 -0
  90. package/lib/module/NavigationContainerRefContext.js.map +1 -0
  91. package/lib/module/NavigationContext.js +8 -0
  92. package/lib/module/NavigationContext.js.map +1 -0
  93. package/lib/module/NavigationHelpersContext.js +9 -0
  94. package/lib/module/NavigationHelpersContext.js.map +1 -0
  95. package/lib/module/NavigationIndependentTree.js +30 -0
  96. package/lib/module/NavigationIndependentTree.js.map +1 -0
  97. package/lib/module/NavigationIndependentTreeContext.js +9 -0
  98. package/lib/module/NavigationIndependentTreeContext.js.map +1 -0
  99. package/lib/module/NavigationRouteContext.js +9 -0
  100. package/lib/module/NavigationRouteContext.js.map +1 -0
  101. package/lib/module/NavigationStateContext.js +23 -0
  102. package/lib/module/NavigationStateContext.js.map +1 -0
  103. package/lib/module/PreventRemoveContext.js +11 -0
  104. package/lib/module/PreventRemoveContext.js.map +1 -0
  105. package/lib/module/PreventRemoveProvider.js +84 -0
  106. package/lib/module/PreventRemoveProvider.js.map +1 -0
  107. package/lib/module/SceneView.js +90 -0
  108. package/lib/module/SceneView.js.map +1 -0
  109. package/lib/module/Screen.js +10 -0
  110. package/lib/module/Screen.js.map +1 -0
  111. package/lib/module/StaticContainer.js +26 -0
  112. package/lib/module/StaticContainer.js.map +1 -0
  113. package/lib/module/StaticNavigation.js +249 -0
  114. package/lib/module/StaticNavigation.js.map +1 -0
  115. package/lib/module/UnhandledActionContext.js +5 -0
  116. package/lib/module/UnhandledActionContext.js.map +1 -0
  117. package/lib/module/checkDuplicateRouteNames.js +21 -0
  118. package/lib/module/checkDuplicateRouteNames.js.map +1 -0
  119. package/lib/module/checkSerializable.js +46 -0
  120. package/lib/module/checkSerializable.js.map +1 -0
  121. package/lib/module/createNavigationContainerRef.js +64 -0
  122. package/lib/module/createNavigationContainerRef.js.map +1 -0
  123. package/lib/module/createNavigatorFactory.js +31 -0
  124. package/lib/module/createNavigatorFactory.js.map +1 -0
  125. package/lib/module/deepFreeze.js +31 -0
  126. package/lib/module/deepFreeze.js.map +1 -0
  127. package/lib/module/findFocusedRoute.js +11 -0
  128. package/lib/module/findFocusedRoute.js.map +1 -0
  129. package/lib/module/getActionFromState.js +82 -0
  130. package/lib/module/getActionFromState.js.map +1 -0
  131. package/lib/module/getFocusedRouteNameFromRoute.js +18 -0
  132. package/lib/module/getFocusedRouteNameFromRoute.js.map +1 -0
  133. package/lib/module/getPathFromState.js +212 -0
  134. package/lib/module/getPathFromState.js.map +1 -0
  135. package/lib/module/getStateFromPath.js +468 -0
  136. package/lib/module/getStateFromPath.js.map +1 -0
  137. package/lib/module/index.js +36 -0
  138. package/lib/module/index.js.map +1 -0
  139. package/lib/module/isArrayEqual.js +16 -0
  140. package/lib/module/isArrayEqual.js.map +1 -0
  141. package/lib/module/isRecordEqual.js +17 -0
  142. package/lib/module/isRecordEqual.js.map +1 -0
  143. package/lib/module/package.json +1 -0
  144. package/lib/module/theming/ThemeContext.js +6 -0
  145. package/lib/module/theming/ThemeContext.js.map +1 -0
  146. package/lib/module/theming/ThemeProvider.js +15 -0
  147. package/lib/module/theming/ThemeProvider.js.map +1 -0
  148. package/lib/module/theming/useTheme.js +12 -0
  149. package/lib/module/theming/useTheme.js.map +1 -0
  150. package/lib/module/types.js +23 -0
  151. package/lib/module/types.js.map +1 -0
  152. package/lib/module/useChildListeners.js +30 -0
  153. package/lib/module/useChildListeners.js.map +1 -0
  154. package/lib/module/useComponent.js +34 -0
  155. package/lib/module/useComponent.js.map +1 -0
  156. package/lib/module/useCurrentRender.js +19 -0
  157. package/lib/module/useCurrentRender.js.map +1 -0
  158. package/lib/module/useDescriptors.js +182 -0
  159. package/lib/module/useDescriptors.js.map +1 -0
  160. package/lib/module/useEventEmitter.js +99 -0
  161. package/lib/module/useEventEmitter.js.map +1 -0
  162. package/lib/module/useFocusEffect.js +74 -0
  163. package/lib/module/useFocusEffect.js.map +1 -0
  164. package/lib/module/useFocusEvents.js +64 -0
  165. package/lib/module/useFocusEvents.js.map +1 -0
  166. package/lib/module/useFocusedListenersChildrenAdapter.js +42 -0
  167. package/lib/module/useFocusedListenersChildrenAdapter.js.map +1 -0
  168. package/lib/module/useIsFocused.js +23 -0
  169. package/lib/module/useIsFocused.js.map +1 -0
  170. package/lib/module/useIsomorphicLayoutEffect.js +9 -0
  171. package/lib/module/useIsomorphicLayoutEffect.js.map +1 -0
  172. package/lib/module/useIsomorphicLayoutEffect.native.js +5 -0
  173. package/lib/module/useIsomorphicLayoutEffect.native.js.map +1 -0
  174. package/lib/module/useKeyedChildListeners.js +27 -0
  175. package/lib/module/useKeyedChildListeners.js.map +1 -0
  176. package/lib/module/useLazyValue.js +11 -0
  177. package/lib/module/useLazyValue.js.map +1 -0
  178. package/lib/module/useNavigation.js +21 -0
  179. package/lib/module/useNavigation.js.map +1 -0
  180. package/lib/module/useNavigationBuilder.js +472 -0
  181. package/lib/module/useNavigationBuilder.js.map +1 -0
  182. package/lib/module/useNavigationCache.js +156 -0
  183. package/lib/module/useNavigationCache.js.map +1 -0
  184. package/lib/module/useNavigationContainerRef.js +12 -0
  185. package/lib/module/useNavigationContainerRef.js.map +1 -0
  186. package/lib/module/useNavigationHelpers.js +70 -0
  187. package/lib/module/useNavigationHelpers.js.map +1 -0
  188. package/lib/module/useNavigationIndependentTree.js +8 -0
  189. package/lib/module/useNavigationIndependentTree.js.map +1 -0
  190. package/lib/module/useNavigationState.js +20 -0
  191. package/lib/module/useNavigationState.js.map +1 -0
  192. package/lib/module/useOnAction.js +100 -0
  193. package/lib/module/useOnAction.js.map +1 -0
  194. package/lib/module/useOnGetState.js +42 -0
  195. package/lib/module/useOnGetState.js.map +1 -0
  196. package/lib/module/useOnPreventRemove.js +64 -0
  197. package/lib/module/useOnPreventRemove.js.map +1 -0
  198. package/lib/module/useOnRouteFocus.js +30 -0
  199. package/lib/module/useOnRouteFocus.js.map +1 -0
  200. package/lib/module/useOptionsGetters.js +72 -0
  201. package/lib/module/useOptionsGetters.js.map +1 -0
  202. package/lib/module/usePreventRemove.js +42 -0
  203. package/lib/module/usePreventRemove.js.map +1 -0
  204. package/lib/module/usePreventRemoveContext.js +12 -0
  205. package/lib/module/usePreventRemoveContext.js.map +1 -0
  206. package/lib/module/useRegisterNavigator.js +27 -0
  207. package/lib/module/useRegisterNavigator.js.map +1 -0
  208. package/lib/module/useRoute.js +17 -0
  209. package/lib/module/useRoute.js.map +1 -0
  210. package/lib/module/useRouteCache.js +62 -0
  211. package/lib/module/useRouteCache.js.map +1 -0
  212. package/lib/module/useSyncState.js +42 -0
  213. package/lib/module/useSyncState.js.map +1 -0
  214. package/lib/module/validatePathConfig.js +45 -0
  215. package/lib/module/validatePathConfig.js.map +1 -0
  216. package/lib/typescript/commonjs/package.json +1 -0
  217. package/lib/typescript/commonjs/src/BaseNavigationContainer.d.ts.map +1 -0
  218. package/lib/typescript/commonjs/src/CurrentRenderContext.d.ts.map +1 -0
  219. package/lib/typescript/commonjs/src/DeprecatedNavigationInChildContext.d.ts.map +1 -0
  220. package/lib/typescript/commonjs/src/EnsureSingleNavigator.d.ts.map +1 -0
  221. package/lib/typescript/commonjs/src/Group.d.ts.map +1 -0
  222. package/lib/typescript/commonjs/src/NavigationBuilderContext.d.ts.map +1 -0
  223. package/lib/typescript/commonjs/src/NavigationContainerRefContext.d.ts.map +1 -0
  224. package/lib/typescript/commonjs/src/NavigationContext.d.ts.map +1 -0
  225. package/lib/typescript/commonjs/src/NavigationHelpersContext.d.ts.map +1 -0
  226. package/lib/typescript/commonjs/src/NavigationIndependentTree.d.ts.map +1 -0
  227. package/lib/typescript/commonjs/src/NavigationIndependentTreeContext.d.ts.map +1 -0
  228. package/lib/typescript/commonjs/src/NavigationRouteContext.d.ts.map +1 -0
  229. package/lib/typescript/commonjs/src/NavigationStateContext.d.ts.map +1 -0
  230. package/lib/typescript/commonjs/src/PreventRemoveContext.d.ts.map +1 -0
  231. package/lib/typescript/commonjs/src/PreventRemoveProvider.d.ts.map +1 -0
  232. package/lib/typescript/commonjs/src/SceneView.d.ts.map +1 -0
  233. package/lib/typescript/commonjs/src/Screen.d.ts.map +1 -0
  234. package/lib/typescript/commonjs/src/StaticContainer.d.ts.map +1 -0
  235. package/lib/typescript/commonjs/src/StaticNavigation.d.ts.map +1 -0
  236. package/lib/typescript/commonjs/src/UnhandledActionContext.d.ts.map +1 -0
  237. package/lib/typescript/commonjs/src/checkDuplicateRouteNames.d.ts.map +1 -0
  238. package/lib/typescript/commonjs/src/checkSerializable.d.ts.map +1 -0
  239. package/lib/typescript/commonjs/src/createNavigationContainerRef.d.ts.map +1 -0
  240. package/lib/typescript/commonjs/src/createNavigatorFactory.d.ts.map +1 -0
  241. package/lib/typescript/commonjs/src/deepFreeze.d.ts.map +1 -0
  242. package/lib/typescript/commonjs/src/findFocusedRoute.d.ts.map +1 -0
  243. package/lib/typescript/commonjs/src/getActionFromState.d.ts.map +1 -0
  244. package/lib/typescript/commonjs/src/getFocusedRouteNameFromRoute.d.ts.map +1 -0
  245. package/lib/typescript/commonjs/src/getPathFromState.d.ts.map +1 -0
  246. package/lib/typescript/commonjs/src/getStateFromPath.d.ts.map +1 -0
  247. package/lib/typescript/commonjs/src/index.d.ts.map +1 -0
  248. package/lib/typescript/commonjs/src/isArrayEqual.d.ts.map +1 -0
  249. package/lib/typescript/commonjs/src/isRecordEqual.d.ts.map +1 -0
  250. package/lib/typescript/commonjs/src/theming/ThemeContext.d.ts.map +1 -0
  251. package/lib/typescript/commonjs/src/theming/ThemeProvider.d.ts.map +1 -0
  252. package/lib/typescript/commonjs/src/theming/useTheme.d.ts.map +1 -0
  253. package/lib/typescript/commonjs/src/types.d.ts +702 -0
  254. package/lib/typescript/commonjs/src/types.d.ts.map +1 -0
  255. package/lib/typescript/commonjs/src/useChildListeners.d.ts.map +1 -0
  256. package/lib/typescript/commonjs/src/useComponent.d.ts.map +1 -0
  257. package/lib/typescript/commonjs/src/useCurrentRender.d.ts.map +1 -0
  258. package/lib/typescript/commonjs/src/useDescriptors.d.ts +133 -0
  259. package/lib/typescript/commonjs/src/useDescriptors.d.ts.map +1 -0
  260. package/lib/typescript/commonjs/src/useEventEmitter.d.ts.map +1 -0
  261. package/lib/typescript/commonjs/src/useFocusEffect.d.ts.map +1 -0
  262. package/lib/typescript/commonjs/src/useFocusEvents.d.ts.map +1 -0
  263. package/lib/typescript/commonjs/src/useFocusedListenersChildrenAdapter.d.ts.map +1 -0
  264. package/lib/typescript/commonjs/src/useIsFocused.d.ts.map +1 -0
  265. package/lib/typescript/commonjs/src/useIsomorphicLayoutEffect.d.ts.map +1 -0
  266. package/lib/typescript/commonjs/src/useIsomorphicLayoutEffect.native.d.ts.map +1 -0
  267. package/lib/typescript/commonjs/src/useKeyedChildListeners.d.ts.map +1 -0
  268. package/lib/typescript/commonjs/src/useLazyValue.d.ts.map +1 -0
  269. package/lib/typescript/commonjs/src/useNavigation.d.ts.map +1 -0
  270. package/lib/typescript/commonjs/src/useNavigationBuilder.d.ts +181 -0
  271. package/lib/typescript/commonjs/src/useNavigationBuilder.d.ts.map +1 -0
  272. package/lib/typescript/commonjs/src/useNavigationCache.d.ts +65 -0
  273. package/lib/typescript/commonjs/src/useNavigationCache.d.ts.map +1 -0
  274. package/lib/typescript/commonjs/src/useNavigationContainerRef.d.ts.map +1 -0
  275. package/lib/typescript/commonjs/src/useNavigationHelpers.d.ts +96 -0
  276. package/lib/typescript/commonjs/src/useNavigationHelpers.d.ts.map +1 -0
  277. package/lib/typescript/commonjs/src/useNavigationIndependentTree.d.ts.map +1 -0
  278. package/lib/typescript/commonjs/src/useNavigationState.d.ts.map +1 -0
  279. package/lib/typescript/commonjs/src/useOnAction.d.ts.map +1 -0
  280. package/lib/typescript/commonjs/src/useOnGetState.d.ts.map +1 -0
  281. package/lib/typescript/commonjs/src/useOnPreventRemove.d.ts.map +1 -0
  282. package/lib/typescript/commonjs/src/useOnRouteFocus.d.ts.map +1 -0
  283. package/lib/typescript/commonjs/src/useOptionsGetters.d.ts.map +1 -0
  284. package/lib/typescript/commonjs/src/usePreventRemove.d.ts.map +1 -0
  285. package/lib/typescript/commonjs/src/usePreventRemoveContext.d.ts.map +1 -0
  286. package/lib/typescript/commonjs/src/useRegisterNavigator.d.ts.map +1 -0
  287. package/lib/typescript/commonjs/src/useRoute.d.ts.map +1 -0
  288. package/lib/typescript/commonjs/src/useRouteCache.d.ts.map +1 -0
  289. package/lib/typescript/commonjs/src/useSyncState.d.ts.map +1 -0
  290. package/lib/typescript/commonjs/src/validatePathConfig.d.ts.map +1 -0
  291. package/lib/typescript/commonjs/tsconfig.build.tsbuildinfo +1 -0
  292. package/lib/typescript/module/package.json +1 -0
  293. package/lib/typescript/module/src/BaseNavigationContainer.d.ts +17 -0
  294. package/lib/typescript/module/src/BaseNavigationContainer.d.ts.map +1 -0
  295. package/lib/typescript/module/src/CurrentRenderContext.d.ts +9 -0
  296. package/lib/typescript/module/src/CurrentRenderContext.d.ts.map +1 -0
  297. package/lib/typescript/module/src/DeprecatedNavigationInChildContext.d.ts +6 -0
  298. package/lib/typescript/module/src/DeprecatedNavigationInChildContext.d.ts.map +1 -0
  299. package/lib/typescript/module/src/EnsureSingleNavigator.d.ts +14 -0
  300. package/lib/typescript/module/src/EnsureSingleNavigator.d.ts.map +1 -0
  301. package/lib/typescript/module/src/Group.d.ts +7 -0
  302. package/lib/typescript/module/src/Group.d.ts.map +1 -0
  303. package/lib/typescript/module/src/NavigationBuilderContext.d.ts +34 -0
  304. package/lib/typescript/module/src/NavigationBuilderContext.d.ts.map +1 -0
  305. package/lib/typescript/module/src/NavigationContainerRefContext.d.ts +8 -0
  306. package/lib/typescript/module/src/NavigationContainerRefContext.d.ts.map +1 -0
  307. package/lib/typescript/module/src/NavigationContext.d.ts +8 -0
  308. package/lib/typescript/module/src/NavigationContext.d.ts.map +1 -0
  309. package/lib/typescript/module/src/NavigationHelpersContext.d.ts +9 -0
  310. package/lib/typescript/module/src/NavigationHelpersContext.d.ts.map +1 -0
  311. package/lib/typescript/module/src/NavigationIndependentTree.d.ts +8 -0
  312. package/lib/typescript/module/src/NavigationIndependentTree.d.ts.map +1 -0
  313. package/lib/typescript/module/src/NavigationIndependentTreeContext.d.ts +6 -0
  314. package/lib/typescript/module/src/NavigationIndependentTreeContext.d.ts.map +1 -0
  315. package/lib/typescript/module/src/NavigationRouteContext.d.ts +7 -0
  316. package/lib/typescript/module/src/NavigationRouteContext.d.ts.map +1 -0
  317. package/lib/typescript/module/src/NavigationStateContext.d.ts +13 -0
  318. package/lib/typescript/module/src/NavigationStateContext.d.ts.map +1 -0
  319. package/lib/typescript/module/src/PreventRemoveContext.d.ts +13 -0
  320. package/lib/typescript/module/src/PreventRemoveContext.d.ts.map +1 -0
  321. package/lib/typescript/module/src/PreventRemoveProvider.d.ts +10 -0
  322. package/lib/typescript/module/src/PreventRemoveProvider.d.ts.map +1 -0
  323. package/lib/typescript/module/src/SceneView.d.ts +21 -0
  324. package/lib/typescript/module/src/SceneView.d.ts.map +1 -0
  325. package/lib/typescript/module/src/Screen.d.ts +7 -0
  326. package/lib/typescript/module/src/Screen.d.ts.map +1 -0
  327. package/lib/typescript/module/src/StaticContainer.d.ts +6 -0
  328. package/lib/typescript/module/src/StaticContainer.d.ts.map +1 -0
  329. package/lib/typescript/module/src/StaticNavigation.d.ts +188 -0
  330. package/lib/typescript/module/src/StaticNavigation.d.ts.map +1 -0
  331. package/lib/typescript/module/src/UnhandledActionContext.d.ts +4 -0
  332. package/lib/typescript/module/src/UnhandledActionContext.d.ts.map +1 -0
  333. package/lib/typescript/module/src/checkDuplicateRouteNames.d.ts +3 -0
  334. package/lib/typescript/module/src/checkDuplicateRouteNames.d.ts.map +1 -0
  335. package/lib/typescript/module/src/checkSerializable.d.ts +10 -0
  336. package/lib/typescript/module/src/checkSerializable.d.ts.map +1 -0
  337. package/lib/typescript/module/src/createNavigationContainerRef.d.ts +4 -0
  338. package/lib/typescript/module/src/createNavigationContainerRef.d.ts.map +1 -0
  339. package/lib/typescript/module/src/createNavigatorFactory.d.ts +10 -0
  340. package/lib/typescript/module/src/createNavigatorFactory.d.ts.map +1 -0
  341. package/lib/typescript/module/src/deepFreeze.d.ts +3 -0
  342. package/lib/typescript/module/src/deepFreeze.d.ts.map +1 -0
  343. package/lib/typescript/module/src/findFocusedRoute.d.ts +5 -0
  344. package/lib/typescript/module/src/findFocusedRoute.d.ts.map +1 -0
  345. package/lib/typescript/module/src/getActionFromState.d.ts +17 -0
  346. package/lib/typescript/module/src/getActionFromState.d.ts.map +1 -0
  347. package/lib/typescript/module/src/getFocusedRouteNameFromRoute.d.ts +3 -0
  348. package/lib/typescript/module/src/getFocusedRouteNameFromRoute.d.ts.map +1 -0
  349. package/lib/typescript/module/src/getPathFromState.d.ts +40 -0
  350. package/lib/typescript/module/src/getPathFromState.d.ts.map +1 -0
  351. package/lib/typescript/module/src/getStateFromPath.d.ts +34 -0
  352. package/lib/typescript/module/src/getStateFromPath.d.ts.map +1 -0
  353. package/lib/typescript/module/src/index.d.ts +34 -0
  354. package/lib/typescript/module/src/index.d.ts.map +1 -0
  355. package/lib/typescript/module/src/isArrayEqual.d.ts +6 -0
  356. package/lib/typescript/module/src/isArrayEqual.d.ts.map +1 -0
  357. package/lib/typescript/module/src/isRecordEqual.d.ts +5 -0
  358. package/lib/typescript/module/src/isRecordEqual.d.ts.map +1 -0
  359. package/lib/typescript/module/src/theming/ThemeContext.d.ts +3 -0
  360. package/lib/typescript/module/src/theming/ThemeContext.d.ts.map +1 -0
  361. package/lib/typescript/module/src/theming/ThemeProvider.d.ts +8 -0
  362. package/lib/typescript/module/src/theming/ThemeProvider.d.ts.map +1 -0
  363. package/lib/typescript/module/src/theming/useTheme.d.ts +2 -0
  364. package/lib/typescript/module/src/theming/useTheme.d.ts.map +1 -0
  365. package/lib/typescript/module/src/types.d.ts +702 -0
  366. package/lib/typescript/module/src/types.d.ts.map +1 -0
  367. package/lib/typescript/module/src/useChildListeners.d.ts +12 -0
  368. package/lib/typescript/module/src/useChildListeners.d.ts.map +1 -0
  369. package/lib/typescript/module/src/useComponent.d.ts +7 -0
  370. package/lib/typescript/module/src/useComponent.d.ts.map +1 -0
  371. package/lib/typescript/module/src/useCurrentRender.d.ts +14 -0
  372. package/lib/typescript/module/src/useCurrentRender.d.ts.map +1 -0
  373. package/lib/typescript/module/src/useDescriptors.d.ts +133 -0
  374. package/lib/typescript/module/src/useDescriptors.d.ts.map +1 -0
  375. package/lib/typescript/module/src/useEventEmitter.d.ts +9 -0
  376. package/lib/typescript/module/src/useEventEmitter.d.ts.map +1 -0
  377. package/lib/typescript/module/src/useFocusEffect.d.ts +11 -0
  378. package/lib/typescript/module/src/useFocusEffect.d.ts.map +1 -0
  379. package/lib/typescript/module/src/useFocusEvents.d.ts +13 -0
  380. package/lib/typescript/module/src/useFocusEvents.d.ts.map +1 -0
  381. package/lib/typescript/module/src/useFocusedListenersChildrenAdapter.d.ts +13 -0
  382. package/lib/typescript/module/src/useFocusedListenersChildrenAdapter.d.ts.map +1 -0
  383. package/lib/typescript/module/src/useIsFocused.d.ts +6 -0
  384. package/lib/typescript/module/src/useIsFocused.d.ts.map +1 -0
  385. package/lib/typescript/module/src/useIsomorphicLayoutEffect.d.ts +6 -0
  386. package/lib/typescript/module/src/useIsomorphicLayoutEffect.d.ts.map +1 -0
  387. package/lib/typescript/module/src/useIsomorphicLayoutEffect.native.d.ts +3 -0
  388. package/lib/typescript/module/src/useIsomorphicLayoutEffect.native.d.ts.map +1 -0
  389. package/lib/typescript/module/src/useKeyedChildListeners.d.ts +12 -0
  390. package/lib/typescript/module/src/useKeyedChildListeners.d.ts.map +1 -0
  391. package/lib/typescript/module/src/useLazyValue.d.ts +2 -0
  392. package/lib/typescript/module/src/useLazyValue.d.ts.map +1 -0
  393. package/lib/typescript/module/src/useNavigation.d.ts +11 -0
  394. package/lib/typescript/module/src/useNavigation.d.ts.map +1 -0
  395. package/lib/typescript/module/src/useNavigationBuilder.d.ts +181 -0
  396. package/lib/typescript/module/src/useNavigationBuilder.d.ts.map +1 -0
  397. package/lib/typescript/module/src/useNavigationCache.d.ts +65 -0
  398. package/lib/typescript/module/src/useNavigationCache.d.ts.map +1 -0
  399. package/lib/typescript/module/src/useNavigationContainerRef.d.ts +3 -0
  400. package/lib/typescript/module/src/useNavigationContainerRef.d.ts.map +1 -0
  401. package/lib/typescript/module/src/useNavigationHelpers.d.ts +96 -0
  402. package/lib/typescript/module/src/useNavigationHelpers.d.ts.map +1 -0
  403. package/lib/typescript/module/src/useNavigationIndependentTree.d.ts +2 -0
  404. package/lib/typescript/module/src/useNavigationIndependentTree.d.ts.map +1 -0
  405. package/lib/typescript/module/src/useNavigationState.d.ts +10 -0
  406. package/lib/typescript/module/src/useNavigationState.d.ts.map +1 -0
  407. package/lib/typescript/module/src/useOnAction.d.ts +26 -0
  408. package/lib/typescript/module/src/useOnAction.d.ts.map +1 -0
  409. package/lib/typescript/module/src/useOnGetState.d.ts +9 -0
  410. package/lib/typescript/module/src/useOnGetState.d.ts.map +1 -0
  411. package/lib/typescript/module/src/useOnPreventRemove.d.ts +17 -0
  412. package/lib/typescript/module/src/useOnPreventRemove.d.ts.map +1 -0
  413. package/lib/typescript/module/src/useOnRouteFocus.d.ts +15 -0
  414. package/lib/typescript/module/src/useOnRouteFocus.d.ts.map +1 -0
  415. package/lib/typescript/module/src/useOptionsGetters.d.ts +13 -0
  416. package/lib/typescript/module/src/useOptionsGetters.d.ts.map +1 -0
  417. package/lib/typescript/module/src/usePreventRemove.d.ts +13 -0
  418. package/lib/typescript/module/src/usePreventRemove.d.ts.map +1 -0
  419. package/lib/typescript/module/src/usePreventRemoveContext.d.ts +5 -0
  420. package/lib/typescript/module/src/usePreventRemoveContext.d.ts.map +1 -0
  421. package/lib/typescript/module/src/useRegisterNavigator.d.ts +6 -0
  422. package/lib/typescript/module/src/useRegisterNavigator.d.ts.map +1 -0
  423. package/lib/typescript/module/src/useRoute.d.ts +9 -0
  424. package/lib/typescript/module/src/useRoute.d.ts.map +1 -0
  425. package/lib/typescript/module/src/useRouteCache.d.ts +14 -0
  426. package/lib/typescript/module/src/useRouteCache.d.ts.map +1 -0
  427. package/lib/typescript/module/src/useSyncState.d.ts +2 -0
  428. package/lib/typescript/module/src/useSyncState.d.ts.map +1 -0
  429. package/lib/typescript/module/src/validatePathConfig.d.ts +2 -0
  430. package/lib/typescript/module/src/validatePathConfig.d.ts.map +1 -0
  431. package/lib/typescript/module/tsconfig.build.tsbuildinfo +1 -0
  432. package/package.json +18 -11
  433. package/src/BaseNavigationContainer.tsx +1 -1
  434. package/src/StaticNavigation.tsx +2 -0
  435. package/src/getPathFromState.tsx +20 -4
  436. package/src/getStateFromPath.tsx +124 -63
  437. package/src/types.tsx +33 -46
  438. package/src/useNavigationBuilder.tsx +1 -1
  439. package/src/validatePathConfig.tsx +1 -1
  440. package/lib/commonjs/BaseNavigationContainer.cjs +0 -356
  441. package/lib/commonjs/BaseNavigationContainer.cjs.map +0 -1
  442. package/lib/commonjs/CurrentRenderContext.cjs +0 -15
  443. package/lib/commonjs/DeprecatedNavigationInChildContext.cjs +0 -14
  444. package/lib/commonjs/EnsureSingleNavigator.cjs +0 -43
  445. package/lib/commonjs/Group.cjs +0 -14
  446. package/lib/commonjs/NavigationBuilderContext.cjs +0 -17
  447. package/lib/commonjs/NavigationContainerRefContext.cjs +0 -14
  448. package/lib/commonjs/NavigationContext.cjs +0 -14
  449. package/lib/commonjs/NavigationHelpersContext.cjs +0 -15
  450. package/lib/commonjs/NavigationIndependentTree.cjs +0 -35
  451. package/lib/commonjs/NavigationIndependentTreeContext.cjs +0 -14
  452. package/lib/commonjs/NavigationRouteContext.cjs +0 -14
  453. package/lib/commonjs/NavigationStateContext.cjs +0 -29
  454. package/lib/commonjs/PreventRemoveContext.cjs +0 -16
  455. package/lib/commonjs/PreventRemoveProvider.cjs +0 -91
  456. package/lib/commonjs/SceneView.cjs +0 -96
  457. package/lib/commonjs/Screen.cjs +0 -14
  458. package/lib/commonjs/StaticContainer.cjs +0 -31
  459. package/lib/commonjs/StaticNavigation.cjs +0 -255
  460. package/lib/commonjs/StaticNavigation.cjs.map +0 -1
  461. package/lib/commonjs/UnhandledActionContext.cjs +0 -11
  462. package/lib/commonjs/checkDuplicateRouteNames.cjs +0 -25
  463. package/lib/commonjs/checkSerializable.cjs +0 -50
  464. package/lib/commonjs/createNavigationContainerRef.cjs +0 -69
  465. package/lib/commonjs/createNavigatorFactory.cjs +0 -34
  466. package/lib/commonjs/deepFreeze.cjs +0 -37
  467. package/lib/commonjs/findFocusedRoute.cjs +0 -15
  468. package/lib/commonjs/getActionFromState.cjs +0 -86
  469. package/lib/commonjs/getFocusedRouteNameFromRoute.cjs +0 -22
  470. package/lib/commonjs/getPathFromState.cjs +0 -211
  471. package/lib/commonjs/getPathFromState.cjs.map +0 -1
  472. package/lib/commonjs/getStateFromPath.cjs +0 -438
  473. package/lib/commonjs/getStateFromPath.cjs.map +0 -1
  474. package/lib/commonjs/index.cjs +0 -287
  475. package/lib/commonjs/isArrayEqual.cjs +0 -20
  476. package/lib/commonjs/isRecordEqual.cjs +0 -21
  477. package/lib/commonjs/theming/ThemeContext.cjs +0 -12
  478. package/lib/commonjs/theming/ThemeProvider.cjs +0 -21
  479. package/lib/commonjs/theming/useTheme.cjs +0 -18
  480. package/lib/commonjs/types.cjs +0 -9
  481. package/lib/commonjs/types.cjs.map +0 -1
  482. package/lib/commonjs/useChildListeners.cjs +0 -36
  483. package/lib/commonjs/useComponent.cjs +0 -40
  484. package/lib/commonjs/useCurrentRender.cjs +0 -25
  485. package/lib/commonjs/useDescriptors.cjs +0 -188
  486. package/lib/commonjs/useEventEmitter.cjs +0 -105
  487. package/lib/commonjs/useFocusEffect.cjs +0 -80
  488. package/lib/commonjs/useFocusEvents.cjs +0 -70
  489. package/lib/commonjs/useFocusedListenersChildrenAdapter.cjs +0 -48
  490. package/lib/commonjs/useIsFocused.cjs +0 -28
  491. package/lib/commonjs/useIsomorphicLayoutEffect.cjs +0 -12
  492. package/lib/commonjs/useIsomorphicLayoutEffect.native.cjs +0 -9
  493. package/lib/commonjs/useKeyedChildListeners.cjs +0 -33
  494. package/lib/commonjs/useLazyValue.cjs +0 -17
  495. package/lib/commonjs/useNavigation.cjs +0 -27
  496. package/lib/commonjs/useNavigationBuilder.cjs +0 -478
  497. package/lib/commonjs/useNavigationCache.cjs +0 -162
  498. package/lib/commonjs/useNavigationContainerRef.cjs +0 -18
  499. package/lib/commonjs/useNavigationHelpers.cjs +0 -76
  500. package/lib/commonjs/useNavigationIndependentTree.cjs +0 -14
  501. package/lib/commonjs/useNavigationState.cjs +0 -26
  502. package/lib/commonjs/useOnAction.cjs +0 -106
  503. package/lib/commonjs/useOnGetState.cjs +0 -48
  504. package/lib/commonjs/useOnPreventRemove.cjs +0 -72
  505. package/lib/commonjs/useOnRouteFocus.cjs +0 -36
  506. package/lib/commonjs/useOptionsGetters.cjs +0 -78
  507. package/lib/commonjs/usePreventRemove.cjs +0 -48
  508. package/lib/commonjs/usePreventRemoveContext.cjs +0 -18
  509. package/lib/commonjs/useRegisterNavigator.cjs +0 -32
  510. package/lib/commonjs/useRoute.cjs +0 -23
  511. package/lib/commonjs/useRouteCache.cjs +0 -69
  512. package/lib/commonjs/useSyncState.cjs +0 -48
  513. package/lib/commonjs/validatePathConfig.cjs +0 -49
  514. package/lib/commonjs/validatePathConfig.cjs.map +0 -1
  515. package/lib/module/BaseNavigationContainer.mjs +0 -347
  516. package/lib/module/BaseNavigationContainer.mjs.map +0 -1
  517. package/lib/module/CurrentRenderContext.mjs +0 -8
  518. package/lib/module/CurrentRenderContext.mjs.map +0 -1
  519. package/lib/module/DeprecatedNavigationInChildContext.mjs +0 -7
  520. package/lib/module/DeprecatedNavigationInChildContext.mjs.map +0 -1
  521. package/lib/module/EnsureSingleNavigator.mjs +0 -34
  522. package/lib/module/EnsureSingleNavigator.mjs.map +0 -1
  523. package/lib/module/Group.mjs +0 -8
  524. package/lib/module/Group.mjs.map +0 -1
  525. package/lib/module/NavigationBuilderContext.mjs +0 -9
  526. package/lib/module/NavigationBuilderContext.mjs.map +0 -1
  527. package/lib/module/NavigationContainerRefContext.mjs +0 -6
  528. package/lib/module/NavigationContainerRefContext.mjs.map +0 -1
  529. package/lib/module/NavigationContext.mjs +0 -6
  530. package/lib/module/NavigationContext.mjs.map +0 -1
  531. package/lib/module/NavigationHelpersContext.mjs +0 -7
  532. package/lib/module/NavigationHelpersContext.mjs.map +0 -1
  533. package/lib/module/NavigationIndependentTree.mjs +0 -28
  534. package/lib/module/NavigationIndependentTree.mjs.map +0 -1
  535. package/lib/module/NavigationIndependentTreeContext.mjs +0 -7
  536. package/lib/module/NavigationIndependentTreeContext.mjs.map +0 -1
  537. package/lib/module/NavigationRouteContext.mjs +0 -7
  538. package/lib/module/NavigationRouteContext.mjs.map +0 -1
  539. package/lib/module/NavigationStateContext.mjs +0 -21
  540. package/lib/module/NavigationStateContext.mjs.map +0 -1
  541. package/lib/module/PreventRemoveContext.mjs +0 -9
  542. package/lib/module/PreventRemoveContext.mjs.map +0 -1
  543. package/lib/module/PreventRemoveProvider.mjs +0 -82
  544. package/lib/module/PreventRemoveProvider.mjs.map +0 -1
  545. package/lib/module/SceneView.mjs +0 -88
  546. package/lib/module/SceneView.mjs.map +0 -1
  547. package/lib/module/Screen.mjs +0 -8
  548. package/lib/module/Screen.mjs.map +0 -1
  549. package/lib/module/StaticContainer.mjs +0 -24
  550. package/lib/module/StaticContainer.mjs.map +0 -1
  551. package/lib/module/StaticNavigation.mjs +0 -246
  552. package/lib/module/StaticNavigation.mjs.map +0 -1
  553. package/lib/module/UnhandledActionContext.mjs +0 -3
  554. package/lib/module/UnhandledActionContext.mjs.map +0 -1
  555. package/lib/module/checkDuplicateRouteNames.mjs +0 -19
  556. package/lib/module/checkDuplicateRouteNames.mjs.map +0 -1
  557. package/lib/module/checkSerializable.mjs +0 -44
  558. package/lib/module/checkSerializable.mjs.map +0 -1
  559. package/lib/module/createNavigationContainerRef.mjs +0 -62
  560. package/lib/module/createNavigationContainerRef.mjs.map +0 -1
  561. package/lib/module/createNavigatorFactory.mjs +0 -29
  562. package/lib/module/createNavigatorFactory.mjs.map +0 -1
  563. package/lib/module/deepFreeze.mjs +0 -29
  564. package/lib/module/deepFreeze.mjs.map +0 -1
  565. package/lib/module/findFocusedRoute.mjs +0 -9
  566. package/lib/module/findFocusedRoute.mjs.map +0 -1
  567. package/lib/module/getActionFromState.mjs +0 -80
  568. package/lib/module/getActionFromState.mjs.map +0 -1
  569. package/lib/module/getFocusedRouteNameFromRoute.mjs +0 -16
  570. package/lib/module/getFocusedRouteNameFromRoute.mjs.map +0 -1
  571. package/lib/module/getPathFromState.mjs +0 -203
  572. package/lib/module/getPathFromState.mjs.map +0 -1
  573. package/lib/module/getStateFromPath.mjs +0 -429
  574. package/lib/module/getStateFromPath.mjs.map +0 -1
  575. package/lib/module/index.mjs +0 -34
  576. package/lib/module/index.mjs.map +0 -1
  577. package/lib/module/isArrayEqual.mjs +0 -14
  578. package/lib/module/isArrayEqual.mjs.map +0 -1
  579. package/lib/module/isRecordEqual.mjs +0 -15
  580. package/lib/module/isRecordEqual.mjs.map +0 -1
  581. package/lib/module/theming/ThemeContext.mjs +0 -4
  582. package/lib/module/theming/ThemeContext.mjs.map +0 -1
  583. package/lib/module/theming/ThemeProvider.mjs +0 -13
  584. package/lib/module/theming/ThemeProvider.mjs.map +0 -1
  585. package/lib/module/theming/useTheme.mjs +0 -10
  586. package/lib/module/theming/useTheme.mjs.map +0 -1
  587. package/lib/module/types.mjs +0 -2
  588. package/lib/module/types.mjs.map +0 -1
  589. package/lib/module/useChildListeners.mjs +0 -28
  590. package/lib/module/useChildListeners.mjs.map +0 -1
  591. package/lib/module/useComponent.mjs +0 -32
  592. package/lib/module/useComponent.mjs.map +0 -1
  593. package/lib/module/useCurrentRender.mjs +0 -17
  594. package/lib/module/useCurrentRender.mjs.map +0 -1
  595. package/lib/module/useDescriptors.mjs +0 -180
  596. package/lib/module/useDescriptors.mjs.map +0 -1
  597. package/lib/module/useEventEmitter.mjs +0 -97
  598. package/lib/module/useEventEmitter.mjs.map +0 -1
  599. package/lib/module/useFocusEffect.mjs +0 -72
  600. package/lib/module/useFocusEffect.mjs.map +0 -1
  601. package/lib/module/useFocusEvents.mjs +0 -62
  602. package/lib/module/useFocusEvents.mjs.map +0 -1
  603. package/lib/module/useFocusedListenersChildrenAdapter.mjs +0 -40
  604. package/lib/module/useFocusedListenersChildrenAdapter.mjs.map +0 -1
  605. package/lib/module/useIsFocused.mjs +0 -21
  606. package/lib/module/useIsFocused.mjs.map +0 -1
  607. package/lib/module/useIsomorphicLayoutEffect.mjs +0 -7
  608. package/lib/module/useIsomorphicLayoutEffect.mjs.map +0 -1
  609. package/lib/module/useIsomorphicLayoutEffect.native.mjs +0 -3
  610. package/lib/module/useIsomorphicLayoutEffect.native.mjs.map +0 -1
  611. package/lib/module/useKeyedChildListeners.mjs +0 -25
  612. package/lib/module/useKeyedChildListeners.mjs.map +0 -1
  613. package/lib/module/useLazyValue.mjs +0 -9
  614. package/lib/module/useLazyValue.mjs.map +0 -1
  615. package/lib/module/useNavigation.mjs +0 -19
  616. package/lib/module/useNavigation.mjs.map +0 -1
  617. package/lib/module/useNavigationBuilder.mjs +0 -470
  618. package/lib/module/useNavigationBuilder.mjs.map +0 -1
  619. package/lib/module/useNavigationCache.mjs +0 -154
  620. package/lib/module/useNavigationCache.mjs.map +0 -1
  621. package/lib/module/useNavigationContainerRef.mjs +0 -10
  622. package/lib/module/useNavigationContainerRef.mjs.map +0 -1
  623. package/lib/module/useNavigationHelpers.mjs +0 -68
  624. package/lib/module/useNavigationHelpers.mjs.map +0 -1
  625. package/lib/module/useNavigationIndependentTree.mjs +0 -6
  626. package/lib/module/useNavigationIndependentTree.mjs.map +0 -1
  627. package/lib/module/useNavigationState.mjs +0 -18
  628. package/lib/module/useNavigationState.mjs.map +0 -1
  629. package/lib/module/useOnAction.mjs +0 -98
  630. package/lib/module/useOnAction.mjs.map +0 -1
  631. package/lib/module/useOnGetState.mjs +0 -40
  632. package/lib/module/useOnGetState.mjs.map +0 -1
  633. package/lib/module/useOnPreventRemove.mjs +0 -62
  634. package/lib/module/useOnPreventRemove.mjs.map +0 -1
  635. package/lib/module/useOnRouteFocus.mjs +0 -28
  636. package/lib/module/useOnRouteFocus.mjs.map +0 -1
  637. package/lib/module/useOptionsGetters.mjs +0 -70
  638. package/lib/module/useOptionsGetters.mjs.map +0 -1
  639. package/lib/module/usePreventRemove.mjs +0 -40
  640. package/lib/module/usePreventRemove.mjs.map +0 -1
  641. package/lib/module/usePreventRemoveContext.mjs +0 -10
  642. package/lib/module/usePreventRemoveContext.mjs.map +0 -1
  643. package/lib/module/useRegisterNavigator.mjs +0 -25
  644. package/lib/module/useRegisterNavigator.mjs.map +0 -1
  645. package/lib/module/useRoute.mjs +0 -15
  646. package/lib/module/useRoute.mjs.map +0 -1
  647. package/lib/module/useRouteCache.mjs +0 -60
  648. package/lib/module/useRouteCache.mjs.map +0 -1
  649. package/lib/module/useSyncState.mjs +0 -40
  650. package/lib/module/useSyncState.mjs.map +0 -1
  651. package/lib/module/validatePathConfig.mjs +0 -43
  652. package/lib/module/validatePathConfig.mjs.map +0 -1
  653. package/lib/typescript/src/BaseNavigationContainer.d.ts.map +0 -1
  654. package/lib/typescript/src/CurrentRenderContext.d.ts.map +0 -1
  655. package/lib/typescript/src/DeprecatedNavigationInChildContext.d.ts.map +0 -1
  656. package/lib/typescript/src/EnsureSingleNavigator.d.ts.map +0 -1
  657. package/lib/typescript/src/Group.d.ts.map +0 -1
  658. package/lib/typescript/src/NavigationBuilderContext.d.ts.map +0 -1
  659. package/lib/typescript/src/NavigationContainerRefContext.d.ts.map +0 -1
  660. package/lib/typescript/src/NavigationContext.d.ts.map +0 -1
  661. package/lib/typescript/src/NavigationHelpersContext.d.ts.map +0 -1
  662. package/lib/typescript/src/NavigationIndependentTree.d.ts.map +0 -1
  663. package/lib/typescript/src/NavigationIndependentTreeContext.d.ts.map +0 -1
  664. package/lib/typescript/src/NavigationRouteContext.d.ts.map +0 -1
  665. package/lib/typescript/src/NavigationStateContext.d.ts.map +0 -1
  666. package/lib/typescript/src/PreventRemoveContext.d.ts.map +0 -1
  667. package/lib/typescript/src/PreventRemoveProvider.d.ts.map +0 -1
  668. package/lib/typescript/src/SceneView.d.ts.map +0 -1
  669. package/lib/typescript/src/Screen.d.ts.map +0 -1
  670. package/lib/typescript/src/StaticContainer.d.ts.map +0 -1
  671. package/lib/typescript/src/StaticNavigation.d.ts.map +0 -1
  672. package/lib/typescript/src/UnhandledActionContext.d.ts.map +0 -1
  673. package/lib/typescript/src/checkDuplicateRouteNames.d.ts.map +0 -1
  674. package/lib/typescript/src/checkSerializable.d.ts.map +0 -1
  675. package/lib/typescript/src/createNavigationContainerRef.d.ts.map +0 -1
  676. package/lib/typescript/src/createNavigatorFactory.d.ts.map +0 -1
  677. package/lib/typescript/src/deepFreeze.d.ts.map +0 -1
  678. package/lib/typescript/src/findFocusedRoute.d.ts.map +0 -1
  679. package/lib/typescript/src/getActionFromState.d.ts.map +0 -1
  680. package/lib/typescript/src/getFocusedRouteNameFromRoute.d.ts.map +0 -1
  681. package/lib/typescript/src/getPathFromState.d.ts.map +0 -1
  682. package/lib/typescript/src/getStateFromPath.d.ts.map +0 -1
  683. package/lib/typescript/src/index.d.ts.map +0 -1
  684. package/lib/typescript/src/isArrayEqual.d.ts.map +0 -1
  685. package/lib/typescript/src/isRecordEqual.d.ts.map +0 -1
  686. package/lib/typescript/src/theming/ThemeContext.d.ts.map +0 -1
  687. package/lib/typescript/src/theming/ThemeProvider.d.ts.map +0 -1
  688. package/lib/typescript/src/theming/useTheme.d.ts.map +0 -1
  689. package/lib/typescript/src/types.d.ts +0 -695
  690. package/lib/typescript/src/types.d.ts.map +0 -1
  691. package/lib/typescript/src/useChildListeners.d.ts.map +0 -1
  692. package/lib/typescript/src/useComponent.d.ts.map +0 -1
  693. package/lib/typescript/src/useCurrentRender.d.ts.map +0 -1
  694. package/lib/typescript/src/useDescriptors.d.ts +0 -133
  695. package/lib/typescript/src/useDescriptors.d.ts.map +0 -1
  696. package/lib/typescript/src/useEventEmitter.d.ts.map +0 -1
  697. package/lib/typescript/src/useFocusEffect.d.ts.map +0 -1
  698. package/lib/typescript/src/useFocusEvents.d.ts.map +0 -1
  699. package/lib/typescript/src/useFocusedListenersChildrenAdapter.d.ts.map +0 -1
  700. package/lib/typescript/src/useIsFocused.d.ts.map +0 -1
  701. package/lib/typescript/src/useIsomorphicLayoutEffect.d.ts.map +0 -1
  702. package/lib/typescript/src/useIsomorphicLayoutEffect.native.d.ts.map +0 -1
  703. package/lib/typescript/src/useKeyedChildListeners.d.ts.map +0 -1
  704. package/lib/typescript/src/useLazyValue.d.ts.map +0 -1
  705. package/lib/typescript/src/useNavigation.d.ts.map +0 -1
  706. package/lib/typescript/src/useNavigationBuilder.d.ts +0 -181
  707. package/lib/typescript/src/useNavigationBuilder.d.ts.map +0 -1
  708. package/lib/typescript/src/useNavigationCache.d.ts +0 -65
  709. package/lib/typescript/src/useNavigationCache.d.ts.map +0 -1
  710. package/lib/typescript/src/useNavigationContainerRef.d.ts.map +0 -1
  711. package/lib/typescript/src/useNavigationHelpers.d.ts +0 -96
  712. package/lib/typescript/src/useNavigationHelpers.d.ts.map +0 -1
  713. package/lib/typescript/src/useNavigationIndependentTree.d.ts.map +0 -1
  714. package/lib/typescript/src/useNavigationState.d.ts.map +0 -1
  715. package/lib/typescript/src/useOnAction.d.ts.map +0 -1
  716. package/lib/typescript/src/useOnGetState.d.ts.map +0 -1
  717. package/lib/typescript/src/useOnPreventRemove.d.ts.map +0 -1
  718. package/lib/typescript/src/useOnRouteFocus.d.ts.map +0 -1
  719. package/lib/typescript/src/useOptionsGetters.d.ts.map +0 -1
  720. package/lib/typescript/src/usePreventRemove.d.ts.map +0 -1
  721. package/lib/typescript/src/usePreventRemoveContext.d.ts.map +0 -1
  722. package/lib/typescript/src/useRegisterNavigator.d.ts.map +0 -1
  723. package/lib/typescript/src/useRoute.d.ts.map +0 -1
  724. package/lib/typescript/src/useRouteCache.d.ts.map +0 -1
  725. package/lib/typescript/src/useSyncState.d.ts.map +0 -1
  726. package/lib/typescript/src/validatePathConfig.d.ts.map +0 -1
  727. package/lib/typescript/utils/usePrevious.d.ts +0 -6
  728. package/lib/typescript/utils/usePrevious.d.ts.map +0 -1
  729. /package/lib/commonjs/{CurrentRenderContext.cjs.map → CurrentRenderContext.js.map} +0 -0
  730. /package/lib/commonjs/{DeprecatedNavigationInChildContext.cjs.map → DeprecatedNavigationInChildContext.js.map} +0 -0
  731. /package/lib/commonjs/{EnsureSingleNavigator.cjs.map → EnsureSingleNavigator.js.map} +0 -0
  732. /package/lib/commonjs/{Group.cjs.map → Group.js.map} +0 -0
  733. /package/lib/commonjs/{NavigationBuilderContext.cjs.map → NavigationBuilderContext.js.map} +0 -0
  734. /package/lib/commonjs/{NavigationContainerRefContext.cjs.map → NavigationContainerRefContext.js.map} +0 -0
  735. /package/lib/commonjs/{NavigationContext.cjs.map → NavigationContext.js.map} +0 -0
  736. /package/lib/commonjs/{NavigationHelpersContext.cjs.map → NavigationHelpersContext.js.map} +0 -0
  737. /package/lib/commonjs/{NavigationIndependentTree.cjs.map → NavigationIndependentTree.js.map} +0 -0
  738. /package/lib/commonjs/{NavigationIndependentTreeContext.cjs.map → NavigationIndependentTreeContext.js.map} +0 -0
  739. /package/lib/commonjs/{NavigationRouteContext.cjs.map → NavigationRouteContext.js.map} +0 -0
  740. /package/lib/commonjs/{NavigationStateContext.cjs.map → NavigationStateContext.js.map} +0 -0
  741. /package/lib/commonjs/{PreventRemoveContext.cjs.map → PreventRemoveContext.js.map} +0 -0
  742. /package/lib/commonjs/{PreventRemoveProvider.cjs.map → PreventRemoveProvider.js.map} +0 -0
  743. /package/lib/commonjs/{SceneView.cjs.map → SceneView.js.map} +0 -0
  744. /package/lib/commonjs/{Screen.cjs.map → Screen.js.map} +0 -0
  745. /package/lib/commonjs/{StaticContainer.cjs.map → StaticContainer.js.map} +0 -0
  746. /package/lib/commonjs/{UnhandledActionContext.cjs.map → UnhandledActionContext.js.map} +0 -0
  747. /package/lib/commonjs/{checkDuplicateRouteNames.cjs.map → checkDuplicateRouteNames.js.map} +0 -0
  748. /package/lib/commonjs/{checkSerializable.cjs.map → checkSerializable.js.map} +0 -0
  749. /package/lib/commonjs/{createNavigationContainerRef.cjs.map → createNavigationContainerRef.js.map} +0 -0
  750. /package/lib/commonjs/{createNavigatorFactory.cjs.map → createNavigatorFactory.js.map} +0 -0
  751. /package/lib/commonjs/{deepFreeze.cjs.map → deepFreeze.js.map} +0 -0
  752. /package/lib/commonjs/{findFocusedRoute.cjs.map → findFocusedRoute.js.map} +0 -0
  753. /package/lib/commonjs/{getActionFromState.cjs.map → getActionFromState.js.map} +0 -0
  754. /package/lib/commonjs/{getFocusedRouteNameFromRoute.cjs.map → getFocusedRouteNameFromRoute.js.map} +0 -0
  755. /package/lib/commonjs/{index.cjs.map → index.js.map} +0 -0
  756. /package/lib/commonjs/{isArrayEqual.cjs.map → isArrayEqual.js.map} +0 -0
  757. /package/lib/commonjs/{isRecordEqual.cjs.map → isRecordEqual.js.map} +0 -0
  758. /package/lib/commonjs/theming/{ThemeContext.cjs.map → ThemeContext.js.map} +0 -0
  759. /package/lib/commonjs/theming/{ThemeProvider.cjs.map → ThemeProvider.js.map} +0 -0
  760. /package/lib/commonjs/theming/{useTheme.cjs.map → useTheme.js.map} +0 -0
  761. /package/lib/commonjs/{useChildListeners.cjs.map → useChildListeners.js.map} +0 -0
  762. /package/lib/commonjs/{useComponent.cjs.map → useComponent.js.map} +0 -0
  763. /package/lib/commonjs/{useCurrentRender.cjs.map → useCurrentRender.js.map} +0 -0
  764. /package/lib/commonjs/{useDescriptors.cjs.map → useDescriptors.js.map} +0 -0
  765. /package/lib/commonjs/{useEventEmitter.cjs.map → useEventEmitter.js.map} +0 -0
  766. /package/lib/commonjs/{useFocusEffect.cjs.map → useFocusEffect.js.map} +0 -0
  767. /package/lib/commonjs/{useFocusEvents.cjs.map → useFocusEvents.js.map} +0 -0
  768. /package/lib/commonjs/{useFocusedListenersChildrenAdapter.cjs.map → useFocusedListenersChildrenAdapter.js.map} +0 -0
  769. /package/lib/commonjs/{useIsFocused.cjs.map → useIsFocused.js.map} +0 -0
  770. /package/lib/commonjs/{useIsomorphicLayoutEffect.cjs.map → useIsomorphicLayoutEffect.js.map} +0 -0
  771. /package/lib/commonjs/{useIsomorphicLayoutEffect.native.cjs.map → useIsomorphicLayoutEffect.native.js.map} +0 -0
  772. /package/lib/commonjs/{useKeyedChildListeners.cjs.map → useKeyedChildListeners.js.map} +0 -0
  773. /package/lib/commonjs/{useLazyValue.cjs.map → useLazyValue.js.map} +0 -0
  774. /package/lib/commonjs/{useNavigation.cjs.map → useNavigation.js.map} +0 -0
  775. /package/lib/commonjs/{useNavigationBuilder.cjs.map → useNavigationBuilder.js.map} +0 -0
  776. /package/lib/commonjs/{useNavigationCache.cjs.map → useNavigationCache.js.map} +0 -0
  777. /package/lib/commonjs/{useNavigationContainerRef.cjs.map → useNavigationContainerRef.js.map} +0 -0
  778. /package/lib/commonjs/{useNavigationHelpers.cjs.map → useNavigationHelpers.js.map} +0 -0
  779. /package/lib/commonjs/{useNavigationIndependentTree.cjs.map → useNavigationIndependentTree.js.map} +0 -0
  780. /package/lib/commonjs/{useNavigationState.cjs.map → useNavigationState.js.map} +0 -0
  781. /package/lib/commonjs/{useOnAction.cjs.map → useOnAction.js.map} +0 -0
  782. /package/lib/commonjs/{useOnGetState.cjs.map → useOnGetState.js.map} +0 -0
  783. /package/lib/commonjs/{useOnPreventRemove.cjs.map → useOnPreventRemove.js.map} +0 -0
  784. /package/lib/commonjs/{useOnRouteFocus.cjs.map → useOnRouteFocus.js.map} +0 -0
  785. /package/lib/commonjs/{useOptionsGetters.cjs.map → useOptionsGetters.js.map} +0 -0
  786. /package/lib/commonjs/{usePreventRemove.cjs.map → usePreventRemove.js.map} +0 -0
  787. /package/lib/commonjs/{usePreventRemoveContext.cjs.map → usePreventRemoveContext.js.map} +0 -0
  788. /package/lib/commonjs/{useRegisterNavigator.cjs.map → useRegisterNavigator.js.map} +0 -0
  789. /package/lib/commonjs/{useRoute.cjs.map → useRoute.js.map} +0 -0
  790. /package/lib/commonjs/{useRouteCache.cjs.map → useRouteCache.js.map} +0 -0
  791. /package/lib/commonjs/{useSyncState.cjs.map → useSyncState.js.map} +0 -0
  792. /package/lib/typescript/{src → commonjs/src}/BaseNavigationContainer.d.ts +0 -0
  793. /package/lib/typescript/{src → commonjs/src}/CurrentRenderContext.d.ts +0 -0
  794. /package/lib/typescript/{src → commonjs/src}/DeprecatedNavigationInChildContext.d.ts +0 -0
  795. /package/lib/typescript/{src → commonjs/src}/EnsureSingleNavigator.d.ts +0 -0
  796. /package/lib/typescript/{src → commonjs/src}/Group.d.ts +0 -0
  797. /package/lib/typescript/{src → commonjs/src}/NavigationBuilderContext.d.ts +0 -0
  798. /package/lib/typescript/{src → commonjs/src}/NavigationContainerRefContext.d.ts +0 -0
  799. /package/lib/typescript/{src → commonjs/src}/NavigationContext.d.ts +0 -0
  800. /package/lib/typescript/{src → commonjs/src}/NavigationHelpersContext.d.ts +0 -0
  801. /package/lib/typescript/{src → commonjs/src}/NavigationIndependentTree.d.ts +0 -0
  802. /package/lib/typescript/{src → commonjs/src}/NavigationIndependentTreeContext.d.ts +0 -0
  803. /package/lib/typescript/{src → commonjs/src}/NavigationRouteContext.d.ts +0 -0
  804. /package/lib/typescript/{src → commonjs/src}/NavigationStateContext.d.ts +0 -0
  805. /package/lib/typescript/{src → commonjs/src}/PreventRemoveContext.d.ts +0 -0
  806. /package/lib/typescript/{src → commonjs/src}/PreventRemoveProvider.d.ts +0 -0
  807. /package/lib/typescript/{src → commonjs/src}/SceneView.d.ts +0 -0
  808. /package/lib/typescript/{src → commonjs/src}/Screen.d.ts +0 -0
  809. /package/lib/typescript/{src → commonjs/src}/StaticContainer.d.ts +0 -0
  810. /package/lib/typescript/{src → commonjs/src}/StaticNavigation.d.ts +0 -0
  811. /package/lib/typescript/{src → commonjs/src}/UnhandledActionContext.d.ts +0 -0
  812. /package/lib/typescript/{src → commonjs/src}/checkDuplicateRouteNames.d.ts +0 -0
  813. /package/lib/typescript/{src → commonjs/src}/checkSerializable.d.ts +0 -0
  814. /package/lib/typescript/{src → commonjs/src}/createNavigationContainerRef.d.ts +0 -0
  815. /package/lib/typescript/{src → commonjs/src}/createNavigatorFactory.d.ts +0 -0
  816. /package/lib/typescript/{src → commonjs/src}/deepFreeze.d.ts +0 -0
  817. /package/lib/typescript/{src → commonjs/src}/findFocusedRoute.d.ts +0 -0
  818. /package/lib/typescript/{src → commonjs/src}/getActionFromState.d.ts +0 -0
  819. /package/lib/typescript/{src → commonjs/src}/getFocusedRouteNameFromRoute.d.ts +0 -0
  820. /package/lib/typescript/{src → commonjs/src}/getPathFromState.d.ts +0 -0
  821. /package/lib/typescript/{src → commonjs/src}/getStateFromPath.d.ts +0 -0
  822. /package/lib/typescript/{src → commonjs/src}/index.d.ts +0 -0
  823. /package/lib/typescript/{src → commonjs/src}/isArrayEqual.d.ts +0 -0
  824. /package/lib/typescript/{src → commonjs/src}/isRecordEqual.d.ts +0 -0
  825. /package/lib/typescript/{src → commonjs/src}/theming/ThemeContext.d.ts +0 -0
  826. /package/lib/typescript/{src → commonjs/src}/theming/ThemeProvider.d.ts +0 -0
  827. /package/lib/typescript/{src → commonjs/src}/theming/useTheme.d.ts +0 -0
  828. /package/lib/typescript/{src → commonjs/src}/useChildListeners.d.ts +0 -0
  829. /package/lib/typescript/{src → commonjs/src}/useComponent.d.ts +0 -0
  830. /package/lib/typescript/{src → commonjs/src}/useCurrentRender.d.ts +0 -0
  831. /package/lib/typescript/{src → commonjs/src}/useEventEmitter.d.ts +0 -0
  832. /package/lib/typescript/{src → commonjs/src}/useFocusEffect.d.ts +0 -0
  833. /package/lib/typescript/{src → commonjs/src}/useFocusEvents.d.ts +0 -0
  834. /package/lib/typescript/{src → commonjs/src}/useFocusedListenersChildrenAdapter.d.ts +0 -0
  835. /package/lib/typescript/{src → commonjs/src}/useIsFocused.d.ts +0 -0
  836. /package/lib/typescript/{src → commonjs/src}/useIsomorphicLayoutEffect.d.ts +0 -0
  837. /package/lib/typescript/{src → commonjs/src}/useIsomorphicLayoutEffect.native.d.ts +0 -0
  838. /package/lib/typescript/{src → commonjs/src}/useKeyedChildListeners.d.ts +0 -0
  839. /package/lib/typescript/{src → commonjs/src}/useLazyValue.d.ts +0 -0
  840. /package/lib/typescript/{src → commonjs/src}/useNavigation.d.ts +0 -0
  841. /package/lib/typescript/{src → commonjs/src}/useNavigationContainerRef.d.ts +0 -0
  842. /package/lib/typescript/{src → commonjs/src}/useNavigationIndependentTree.d.ts +0 -0
  843. /package/lib/typescript/{src → commonjs/src}/useNavigationState.d.ts +0 -0
  844. /package/lib/typescript/{src → commonjs/src}/useOnAction.d.ts +0 -0
  845. /package/lib/typescript/{src → commonjs/src}/useOnGetState.d.ts +0 -0
  846. /package/lib/typescript/{src → commonjs/src}/useOnPreventRemove.d.ts +0 -0
  847. /package/lib/typescript/{src → commonjs/src}/useOnRouteFocus.d.ts +0 -0
  848. /package/lib/typescript/{src → commonjs/src}/useOptionsGetters.d.ts +0 -0
  849. /package/lib/typescript/{src → commonjs/src}/usePreventRemove.d.ts +0 -0
  850. /package/lib/typescript/{src → commonjs/src}/usePreventRemoveContext.d.ts +0 -0
  851. /package/lib/typescript/{src → commonjs/src}/useRegisterNavigator.d.ts +0 -0
  852. /package/lib/typescript/{src → commonjs/src}/useRoute.d.ts +0 -0
  853. /package/lib/typescript/{src → commonjs/src}/useRouteCache.d.ts +0 -0
  854. /package/lib/typescript/{src → commonjs/src}/useSyncState.d.ts +0 -0
  855. /package/lib/typescript/{src → commonjs/src}/validatePathConfig.d.ts +0 -0
@@ -0,0 +1,468 @@
1
+ "use strict";
2
+
3
+ import escape from 'escape-string-regexp';
4
+ import * as queryString from 'query-string';
5
+ import { findFocusedRoute } from "./findFocusedRoute.js";
6
+ import { validatePathConfig } from "./validatePathConfig.js";
7
+ /**
8
+ * Utility to parse a path string to initial state object accepted by the container.
9
+ * This is useful for deep linking when we need to handle the incoming URL.
10
+ *
11
+ * @example
12
+ * ```js
13
+ * getStateFromPath(
14
+ * '/chat/jane/42',
15
+ * {
16
+ * screens: {
17
+ * Chat: {
18
+ * path: 'chat/:author/:id',
19
+ * parse: { id: Number }
20
+ * }
21
+ * }
22
+ * }
23
+ * )
24
+ * ```
25
+ * @param path Path string to parse and convert, e.g. /foo/bar?count=42.
26
+ * @param options Extra options to fine-tune how to parse the path.
27
+ */
28
+ export function getStateFromPath(path, options) {
29
+ const {
30
+ initialRoutes,
31
+ configs,
32
+ configWithRegexes
33
+ } = getConfigResources(options);
34
+ const screens = options?.screens;
35
+ let remaining = path.replace(/\/+/g, '/') // Replace multiple slash (//) with single ones
36
+ .replace(/^\//, '') // Remove extra leading slash
37
+ .replace(/\?.*$/, ''); // Remove query params which we will handle later
38
+
39
+ // Make sure there is a trailing slash
40
+ remaining = remaining.endsWith('/') ? remaining : `${remaining}/`;
41
+ const prefix = options?.path?.replace(/^\//, ''); // Remove extra leading slash
42
+
43
+ if (prefix) {
44
+ // Make sure there is a trailing slash
45
+ const normalizedPrefix = prefix.endsWith('/') ? prefix : `${prefix}/`;
46
+
47
+ // If the path doesn't start with the prefix, it's not a match
48
+ if (!remaining.startsWith(normalizedPrefix)) {
49
+ return undefined;
50
+ }
51
+
52
+ // Remove the prefix from the path
53
+ remaining = remaining.replace(normalizedPrefix, '');
54
+ }
55
+ if (screens === undefined) {
56
+ // When no config is specified, use the path segments as route names
57
+ const routes = remaining.split('/').filter(Boolean).map(segment => {
58
+ const name = decodeURIComponent(segment);
59
+ return {
60
+ name
61
+ };
62
+ });
63
+ if (routes.length) {
64
+ return createNestedStateObject(path, routes, initialRoutes);
65
+ }
66
+ return undefined;
67
+ }
68
+ if (remaining === '/') {
69
+ // We need to add special handling of empty path so navigation to empty path also works
70
+ // When handling empty path, we should only look at the root level config
71
+ const match = configs.find(config => config.path === '' && config.routeNames.every(
72
+ // Make sure that none of the parent configs have a non-empty path defined
73
+ name => !configs.find(c => c.screen === name)?.path));
74
+ if (match) {
75
+ return createNestedStateObject(path, match.routeNames.map(name => ({
76
+ name
77
+ })), initialRoutes, configs);
78
+ }
79
+ return undefined;
80
+ }
81
+ let result;
82
+ let current;
83
+
84
+ // We match the whole path against the regex instead of segments
85
+ // This makes sure matches such as wildcard will catch any unmatched routes, even if nested
86
+ const {
87
+ routes,
88
+ remainingPath
89
+ } = matchAgainstConfigs(remaining, configWithRegexes);
90
+ if (routes !== undefined) {
91
+ // This will always be empty if full path matched
92
+ current = createNestedStateObject(path, routes, initialRoutes, configs);
93
+ remaining = remainingPath;
94
+ result = current;
95
+ }
96
+ if (current == null || result == null) {
97
+ return undefined;
98
+ }
99
+ return result;
100
+ }
101
+
102
+ /**
103
+ * Reference to the last used config resources. This is used to avoid recomputing the config resources when the options are the same.
104
+ */
105
+ const cachedConfigResources = new WeakMap();
106
+ function getConfigResources(options) {
107
+ if (!options) return prepareConfigResources();
108
+ const cached = cachedConfigResources.get(options);
109
+ if (cached) return cached;
110
+ const resources = prepareConfigResources(options);
111
+ cachedConfigResources.set(options, resources);
112
+ return resources;
113
+ }
114
+ function prepareConfigResources(options) {
115
+ if (options) {
116
+ validatePathConfig(options);
117
+ }
118
+ const initialRoutes = getInitialRoutes(options);
119
+ const configs = getNormalizedConfigs(initialRoutes, options?.screens);
120
+ checkForDuplicatedConfigs(configs);
121
+ const configWithRegexes = getConfigsWithRegexes(configs);
122
+ return {
123
+ initialRoutes,
124
+ configs,
125
+ configWithRegexes
126
+ };
127
+ }
128
+ function getInitialRoutes(options) {
129
+ const initialRoutes = [];
130
+ if (options?.initialRouteName) {
131
+ initialRoutes.push({
132
+ initialRouteName: options.initialRouteName,
133
+ parentScreens: []
134
+ });
135
+ }
136
+ return initialRoutes;
137
+ }
138
+ function getNormalizedConfigs(initialRoutes, screens = {}) {
139
+ // Create a normalized configs array which will be easier to use
140
+ return [].concat(...Object.keys(screens).map(key => createNormalizedConfigs(key, screens, [], initialRoutes, []))).sort((a, b) => {
141
+ // Sort config so that:
142
+ // - the most exhaustive ones are always at the beginning
143
+ // - patterns with wildcard are always at the end
144
+
145
+ // If 2 patterns are same, move the one with less route names up
146
+ // This is an error state, so it's only useful for consistent error messages
147
+ if (a.pattern === b.pattern) {
148
+ return b.routeNames.join('>').localeCompare(a.routeNames.join('>'));
149
+ }
150
+
151
+ // If one of the patterns starts with the other, it's more exhaustive
152
+ // So move it up
153
+ if (a.pattern.startsWith(b.pattern)) {
154
+ return -1;
155
+ }
156
+ if (b.pattern.startsWith(a.pattern)) {
157
+ return 1;
158
+ }
159
+ const aParts = a.pattern.split('/');
160
+ const bParts = b.pattern.split('/');
161
+ for (let i = 0; i < Math.max(aParts.length, bParts.length); i++) {
162
+ // if b is longer, b get higher priority
163
+ if (aParts[i] == null) {
164
+ return 1;
165
+ }
166
+ // if a is longer, a get higher priority
167
+ if (bParts[i] == null) {
168
+ return -1;
169
+ }
170
+ const aWildCard = aParts[i] === '*' || aParts[i].startsWith(':');
171
+ const bWildCard = bParts[i] === '*' || bParts[i].startsWith(':');
172
+ // if both are wildcard we compare next component
173
+ if (aWildCard && bWildCard) {
174
+ continue;
175
+ }
176
+ // if only a is wild card, b get higher priority
177
+ if (aWildCard) {
178
+ return 1;
179
+ }
180
+ // if only b is wild card, a get higher priority
181
+ if (bWildCard) {
182
+ return -1;
183
+ }
184
+ }
185
+ return bParts.length - aParts.length;
186
+ });
187
+ }
188
+ function checkForDuplicatedConfigs(configs) {
189
+ // Check for duplicate patterns in the config
190
+ configs.reduce((acc, config) => {
191
+ if (acc[config.pattern]) {
192
+ const a = acc[config.pattern].routeNames;
193
+ const b = config.routeNames;
194
+
195
+ // It's not a problem if the path string omitted from a inner most screen
196
+ // For example, it's ok if a path resolves to `A > B > C` or `A > B`
197
+ const intersects = a.length > b.length ? b.every((it, i) => a[i] === it) : a.every((it, i) => b[i] === it);
198
+ if (!intersects) {
199
+ throw new Error(`Found conflicting screens with the same pattern. The pattern '${config.pattern}' resolves to both '${a.join(' > ')}' and '${b.join(' > ')}'. Patterns must be unique and cannot resolve to more than one screen.`);
200
+ }
201
+ }
202
+ return Object.assign(acc, {
203
+ [config.pattern]: config
204
+ });
205
+ }, {});
206
+ }
207
+ function getConfigsWithRegexes(configs) {
208
+ return configs.map(c => ({
209
+ ...c,
210
+ // Add `$` to the regex to make sure it matches till end of the path and not just beginning
211
+ regex: c.regex ? new RegExp(c.regex.source + '$') : undefined
212
+ }));
213
+ }
214
+ const joinPaths = (...paths) => [].concat(...paths.map(p => p.split('/'))).filter(Boolean).join('/');
215
+ const matchAgainstConfigs = (remaining, configs) => {
216
+ let routes;
217
+ let remainingPath = remaining;
218
+
219
+ // Go through all configs, and see if the next path segment matches our regex
220
+ for (const config of configs) {
221
+ if (!config.regex) {
222
+ continue;
223
+ }
224
+ const match = remainingPath.match(config.regex);
225
+
226
+ // If our regex matches, we need to extract params from the path
227
+ if (match) {
228
+ const matchResult = config.pattern?.split('/').reduce((acc, p, index) => {
229
+ if (!p.startsWith(':')) {
230
+ return acc;
231
+ }
232
+
233
+ // Path parameter so increment position for the segment
234
+ acc.pos += 1;
235
+ const decodedParamSegment = decodeURIComponent(
236
+ // The param segments appear every second item starting from 2 in the regex match result
237
+ match[(acc.pos + 1) * 2]
238
+ // Remove trailing slash
239
+ .replace(/\/$/, ''));
240
+ Object.assign(acc.matchedParams, {
241
+ [p]: Object.assign(acc.matchedParams[p] || {}, {
242
+ [index]: decodedParamSegment
243
+ })
244
+ });
245
+ return acc;
246
+ }, {
247
+ pos: -1,
248
+ matchedParams: {}
249
+ });
250
+ const matchedParams = matchResult.matchedParams || {};
251
+ routes = config.routeNames.map(name => {
252
+ const routeConfig = configs.find(c => {
253
+ // Check matching name AND pattern in case same screen is used at different levels in config
254
+ return c.screen === name && config.pattern.startsWith(c.pattern);
255
+ });
256
+
257
+ // Normalize pattern to remove any leading, trailing slashes, duplicate slashes etc.
258
+ const normalizedPath = routeConfig?.path.split('/').filter(Boolean).join('/');
259
+
260
+ // Get the number of segments in the initial pattern
261
+ const numInitialSegments = routeConfig?.pattern
262
+ // Extract the prefix from the pattern by removing the ending path pattern (e.g pattern=`a/b/c/d` and normalizedPath=`c/d` becomes `a/b`)
263
+ .replace(new RegExp(`${escape(normalizedPath)}$`), '')?.split('/').length;
264
+ const params = normalizedPath?.split('/').reduce((acc, p, index) => {
265
+ if (!p.startsWith(':')) {
266
+ return acc;
267
+ }
268
+
269
+ // Get the real index of the path parameter in the matched path
270
+ // by offsetting by the number of segments in the initial pattern
271
+ const offset = numInitialSegments ? numInitialSegments - 1 : 0;
272
+ const value = matchedParams[p]?.[index + offset];
273
+ if (value) {
274
+ const key = p.replace(/^:/, '').replace(/\?$/, '');
275
+ acc[key] = routeConfig?.parse?.[key] ? routeConfig.parse[key](value) : value;
276
+ }
277
+ return acc;
278
+ }, {});
279
+ if (params && Object.keys(params).length) {
280
+ return {
281
+ name,
282
+ params
283
+ };
284
+ }
285
+ return {
286
+ name
287
+ };
288
+ });
289
+ remainingPath = remainingPath.replace(match[1], '');
290
+ break;
291
+ }
292
+ }
293
+ return {
294
+ routes,
295
+ remainingPath
296
+ };
297
+ };
298
+ const createNormalizedConfigs = (screen, routeConfig, routeNames = [], initials, parentScreens, parentPattern) => {
299
+ const configs = [];
300
+ routeNames.push(screen);
301
+ parentScreens.push(screen);
302
+
303
+ // @ts-expect-error: we can't strongly typecheck this for now
304
+ const config = routeConfig[screen];
305
+ if (typeof config === 'string') {
306
+ // If a string is specified as the value of the key(e.g. Foo: '/path'), use it as the pattern
307
+ const pattern = parentPattern ? joinPaths(parentPattern, config) : config;
308
+ configs.push(createConfigItem(screen, routeNames, pattern, config));
309
+ } else if (typeof config === 'object') {
310
+ let pattern;
311
+
312
+ // if an object is specified as the value (e.g. Foo: { ... }),
313
+ // it can have `path` property and
314
+ // it could have `screens` prop which has nested configs
315
+ if (typeof config.path === 'string') {
316
+ if (config.exact && config.path === undefined) {
317
+ throw new Error("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: ''`.");
318
+ }
319
+ pattern = config.exact !== true ? joinPaths(parentPattern || '', config.path || '') : config.path || '';
320
+ configs.push(createConfigItem(screen, routeNames, pattern, config.path, config.parse));
321
+ }
322
+ if (config.screens) {
323
+ // property `initialRouteName` without `screens` has no purpose
324
+ if (config.initialRouteName) {
325
+ initials.push({
326
+ initialRouteName: config.initialRouteName,
327
+ parentScreens
328
+ });
329
+ }
330
+ Object.keys(config.screens).forEach(nestedConfig => {
331
+ const result = createNormalizedConfigs(nestedConfig, config.screens, routeNames, initials, [...parentScreens], pattern ?? parentPattern);
332
+ configs.push(...result);
333
+ });
334
+ }
335
+ }
336
+ routeNames.pop();
337
+ return configs;
338
+ };
339
+ const createConfigItem = (screen, routeNames, pattern, path, parse) => {
340
+ // Normalize pattern to remove any leading, trailing slashes, duplicate slashes etc.
341
+ pattern = pattern.split('/').filter(Boolean).join('/');
342
+ const regex = pattern ? new RegExp(`^(${pattern.split('/').map(it => {
343
+ if (it.startsWith(':')) {
344
+ return `(([^/]+\\/)${it.endsWith('?') ? '?' : ''})`;
345
+ }
346
+ return `${it === '*' ? '.*' : escape(it)}\\/`;
347
+ }).join('')})`) : undefined;
348
+ return {
349
+ screen,
350
+ regex,
351
+ pattern,
352
+ path,
353
+ // The routeNames array is mutated, so copy it to keep the current state
354
+ routeNames: [...routeNames],
355
+ parse
356
+ };
357
+ };
358
+ const findParseConfigForRoute = (routeName, flatConfig) => {
359
+ for (const config of flatConfig) {
360
+ if (routeName === config.routeNames[config.routeNames.length - 1]) {
361
+ return config.parse;
362
+ }
363
+ }
364
+ return undefined;
365
+ };
366
+
367
+ // Try to find an initial route connected with the one passed
368
+ const findInitialRoute = (routeName, parentScreens, initialRoutes) => {
369
+ for (const config of initialRoutes) {
370
+ if (parentScreens.length === config.parentScreens.length) {
371
+ let sameParents = true;
372
+ for (let i = 0; i < parentScreens.length; i++) {
373
+ if (parentScreens[i].localeCompare(config.parentScreens[i]) !== 0) {
374
+ sameParents = false;
375
+ break;
376
+ }
377
+ }
378
+ if (sameParents) {
379
+ return routeName !== config.initialRouteName ? config.initialRouteName : undefined;
380
+ }
381
+ }
382
+ }
383
+ return undefined;
384
+ };
385
+
386
+ // returns state object with values depending on whether
387
+ // it is the end of state and if there is initialRoute for this level
388
+ const createStateObject = (initialRoute, route, isEmpty) => {
389
+ if (isEmpty) {
390
+ if (initialRoute) {
391
+ return {
392
+ index: 1,
393
+ routes: [{
394
+ name: initialRoute
395
+ }, route]
396
+ };
397
+ } else {
398
+ return {
399
+ routes: [route]
400
+ };
401
+ }
402
+ } else {
403
+ if (initialRoute) {
404
+ return {
405
+ index: 1,
406
+ routes: [{
407
+ name: initialRoute
408
+ }, {
409
+ ...route,
410
+ state: {
411
+ routes: []
412
+ }
413
+ }]
414
+ };
415
+ } else {
416
+ return {
417
+ routes: [{
418
+ ...route,
419
+ state: {
420
+ routes: []
421
+ }
422
+ }]
423
+ };
424
+ }
425
+ }
426
+ };
427
+ const createNestedStateObject = (path, routes, initialRoutes, flatConfig) => {
428
+ let route = routes.shift();
429
+ const parentScreens = [];
430
+ let initialRoute = findInitialRoute(route.name, parentScreens, initialRoutes);
431
+ parentScreens.push(route.name);
432
+ const state = createStateObject(initialRoute, route, routes.length === 0);
433
+ if (routes.length > 0) {
434
+ let nestedState = state;
435
+ while (route = routes.shift()) {
436
+ initialRoute = findInitialRoute(route.name, parentScreens, initialRoutes);
437
+ const nestedStateIndex = nestedState.index || nestedState.routes.length - 1;
438
+ nestedState.routes[nestedStateIndex].state = createStateObject(initialRoute, route, routes.length === 0);
439
+ if (routes.length > 0) {
440
+ nestedState = nestedState.routes[nestedStateIndex].state;
441
+ }
442
+ parentScreens.push(route.name);
443
+ }
444
+ }
445
+ route = findFocusedRoute(state);
446
+ route.path = path;
447
+ const params = parseQueryParams(path, flatConfig ? findParseConfigForRoute(route.name, flatConfig) : undefined);
448
+ if (params) {
449
+ route.params = {
450
+ ...route.params,
451
+ ...params
452
+ };
453
+ }
454
+ return state;
455
+ };
456
+ const parseQueryParams = (path, parseConfig) => {
457
+ const query = path.split('?')[1];
458
+ const params = queryString.parse(query);
459
+ if (parseConfig) {
460
+ Object.keys(params).forEach(name => {
461
+ if (Object.hasOwnProperty.call(parseConfig, name) && typeof params[name] === 'string') {
462
+ params[name] = parseConfig[name](params[name]);
463
+ }
464
+ });
465
+ }
466
+ return Object.keys(params).length ? params : undefined;
467
+ };
468
+ //# sourceMappingURL=getStateFromPath.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["escape","queryString","findFocusedRoute","validatePathConfig","getStateFromPath","path","options","initialRoutes","configs","configWithRegexes","getConfigResources","screens","remaining","replace","endsWith","prefix","normalizedPrefix","startsWith","undefined","routes","split","filter","Boolean","map","segment","name","decodeURIComponent","length","createNestedStateObject","match","find","config","routeNames","every","c","screen","result","current","remainingPath","matchAgainstConfigs","cachedConfigResources","WeakMap","prepareConfigResources","cached","get","resources","set","getInitialRoutes","getNormalizedConfigs","checkForDuplicatedConfigs","getConfigsWithRegexes","initialRouteName","push","parentScreens","concat","Object","keys","key","createNormalizedConfigs","sort","a","b","pattern","join","localeCompare","aParts","bParts","i","Math","max","aWildCard","bWildCard","reduce","acc","intersects","it","Error","assign","regex","RegExp","source","joinPaths","paths","p","matchResult","index","pos","decodedParamSegment","matchedParams","routeConfig","normalizedPath","numInitialSegments","params","offset","value","parse","initials","parentPattern","createConfigItem","exact","forEach","nestedConfig","pop","findParseConfigForRoute","routeName","flatConfig","findInitialRoute","sameParents","createStateObject","initialRoute","route","isEmpty","state","shift","nestedState","nestedStateIndex","parseQueryParams","parseConfig","query","hasOwnProperty","call"],"sourceRoot":"../../src","sources":["getStateFromPath.tsx"],"mappings":";;AAKA,OAAOA,MAAM,MAAM,sBAAsB;AACzC,OAAO,KAAKC,WAAW,MAAM,cAAc;AAE3C,SAASC,gBAAgB,QAAQ,uBAAoB;AAErD,SAASC,kBAAkB,QAAQ,yBAAsB;AAwCzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,gBAAgBA,CAC9BC,IAAY,EACZC,OAA4B,EACH;EACzB,MAAM;IAAEC,aAAa;IAAEC,OAAO;IAAEC;EAAkB,CAAC,GACjDC,kBAAkB,CAACJ,OAAO,CAAC;EAE7B,MAAMK,OAAO,GAAGL,OAAO,EAAEK,OAAO;EAEhC,IAAIC,SAAS,GAAGP,IAAI,CACjBQ,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;EAAA,CACrBA,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;EAAA,CACnBA,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC;;EAEzB;EACAD,SA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AAK,CAAgB;EAC9CF,KAAK,CAACzG,IAAI,GAAGA,IAAI;EAEjB,MAAMuF,MAAM,GAAGwB,gBAAgB,CAC7B/G,IAAI,EACJoG,UAAU,GAAGF,uBAAuB,CAACO,KAAK,CAACrF,IAAI,EAAEgF,UAAU,CAAC,GAAGvF,SACjE,CAAC;EAED,IAAI0E,MAAM,EAAE;IACVkB,KAAK,CAAClB,MAAM,GAAG;MAAE,GAAGkB,KAAK,CAAClB,MAAM;MAAE,GAAGA;IAAO,CAAC;EAC/C;EAEA,OAAOoB,KAAK;AACd,CAAC;AAED,MAAMI,gBAAgB,GAAGA,CACvB/G,IAAY,EACZgH,WAAoD,KACjD;EACH,MAAMC,KAAK,GAAGjH,IAAI,CAACe,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;EAChC,MAAMwE,MAAM,GAAG3F,WAAW,CAAC8F,KAAK,CAACuB,KAAK,CAAC;EAEvC,IAAID,WAAW,EAAE;IACf9D,MAAM,CAACC,IAAI,CAACoC,MAAM,CAAC,CAACQ,OAAO,CAAE3E,IAAI,IAAK;MACpC,IACE8B,MAAM,CAACgE,cAAc,CAACC,IAAI,CAACH,WAAW,EAAE5F,IAAI,CAAC,IAC7C,OAAOmE,MAAM,CAACnE,IAAI,CAAC,KAAK,QAAQ,EAChC;QACAmE,MAAM,CAACnE,IAAI,CAAC,GAAG4F,WAAW,CAAC5F,IAAI,CAAC,CAACmE,MAAM,CAACnE,IAAI,CAAW,CAAC;MAC1D;IACF,CAAC,CAAC;EACJ;EAEA,OAAO8B,MAAM,CAACC,IAAI,CAACoC,MAAM,CAAC,CAACjE,MAAM,GAAGiE,MAAM,GAAG1E,SAAS;AACxD,CAAC","ignoreList":[]}
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+
3
+ export { BaseNavigationContainer } from "./BaseNavigationContainer.js";
4
+ export { createNavigationContainerRef } from "./createNavigationContainerRef.js";
5
+ export { createNavigatorFactory } from "./createNavigatorFactory.js";
6
+ export { CurrentRenderContext } from "./CurrentRenderContext.js";
7
+ export { findFocusedRoute } from "./findFocusedRoute.js";
8
+ export { getActionFromState } from "./getActionFromState.js";
9
+ export { getFocusedRouteNameFromRoute } from "./getFocusedRouteNameFromRoute.js";
10
+ export { getPathFromState } from "./getPathFromState.js";
11
+ export { getStateFromPath } from "./getStateFromPath.js";
12
+ export { NavigationContainerRefContext } from "./NavigationContainerRefContext.js";
13
+ export { NavigationContext } from "./NavigationContext.js";
14
+ export { NavigationHelpersContext } from "./NavigationHelpersContext.js";
15
+ export { NavigationIndependentTree } from "./NavigationIndependentTree.js";
16
+ export { NavigationRouteContext } from "./NavigationRouteContext.js";
17
+ export { PreventRemoveContext } from "./PreventRemoveContext.js";
18
+ export { PreventRemoveProvider } from "./PreventRemoveProvider.js";
19
+ export { createComponentForStaticNavigation, createPathConfigForStaticNavigation } from "./StaticNavigation.js";
20
+ export { ThemeContext } from "./theming/ThemeContext.js";
21
+ export { ThemeProvider } from "./theming/ThemeProvider.js";
22
+ export { useTheme } from "./theming/useTheme.js";
23
+ export * from "./types.js";
24
+ export { useFocusEffect } from "./useFocusEffect.js";
25
+ export { useIsFocused } from "./useIsFocused.js";
26
+ export { useNavigation } from "./useNavigation.js";
27
+ export { useNavigationBuilder } from "./useNavigationBuilder.js";
28
+ export { useNavigationContainerRef } from "./useNavigationContainerRef.js";
29
+ export { useNavigationIndependentTree } from "./useNavigationIndependentTree.js";
30
+ export { useNavigationState } from "./useNavigationState.js";
31
+ export { usePreventRemove } from "./usePreventRemove.js";
32
+ export { usePreventRemoveContext } from "./usePreventRemoveContext.js";
33
+ export { useRoute } from "./useRoute.js";
34
+ export { validatePathConfig } from "./validatePathConfig.js";
35
+ export * from '@react-navigation/routers';
36
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["BaseNavigationContainer","createNavigationContainerRef","createNavigatorFactory","CurrentRenderContext","findFocusedRoute","getActionFromState","getFocusedRouteNameFromRoute","getPathFromState","getStateFromPath","NavigationContainerRefContext","NavigationContext","NavigationHelpersContext","NavigationIndependentTree","NavigationRouteContext","PreventRemoveContext","PreventRemoveProvider","createComponentForStaticNavigation","createPathConfigForStaticNavigation","ThemeContext","ThemeProvider","useTheme","useFocusEffect","useIsFocused","useNavigation","useNavigationBuilder","useNavigationContainerRef","useNavigationIndependentTree","useNavigationState","usePreventRemove","usePreventRemoveContext","useRoute","validatePathConfig"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;AAAA,SAASA,uBAAuB,QAAQ,8BAA2B;AACnE,SAASC,4BAA4B,QAAQ,mCAAgC;AAC7E,SAASC,sBAAsB,QAAQ,6BAA0B;AACjE,SAASC,oBAAoB,QAAQ,2BAAwB;AAC7D,SAASC,gBAAgB,QAAQ,uBAAoB;AACrD,SAASC,kBAAkB,QAAQ,yBAAsB;AACzD,SAASC,4BAA4B,QAAQ,mCAAgC;AAC7E,SAASC,gBAAgB,QAAQ,uBAAoB;AACrD,SAASC,gBAAgB,QAAQ,uBAAoB;AACrD,SAASC,6BAA6B,QAAQ,oCAAiC;AAC/E,SAASC,iBAAiB,QAAQ,wBAAqB;AACvD,SAASC,wBAAwB,QAAQ,+BAA4B;AACrE,SAASC,yBAAyB,QAAQ,gCAA6B;AACvE,SAASC,sBAAsB,QAAQ,6BAA0B;AACjE,SAASC,oBAAoB,QAAQ,2BAAwB;AAC7D,SAASC,qBAAqB,QAAQ,4BAAyB;AAC/D,SACEC,kCAAkC,EAClCC,mCAAmC,QAK9B,uBAAoB;AAC3B,SAASC,YAAY,QAAQ,2BAAwB;AACrD,SAASC,aAAa,QAAQ,4BAAyB;AACvD,SAASC,QAAQ,QAAQ,uBAAoB;AAC7C,cAAc,YAAS;AACvB,SAASC,cAAc,QAAQ,qBAAkB;AACjD,SAASC,YAAY,QAAQ,mBAAgB;AAC7C,SAASC,aAAa,QAAQ,oBAAiB;AAC/C,SAASC,oBAAoB,QAAQ,2BAAwB;AAC7D,SAASC,yBAAyB,QAAQ,gCAA6B;AACvE,SAASC,4BAA4B,QAAQ,mCAAgC;AAC7E,SAASC,kBAAkB,QAAQ,yBAAsB;AACzD,SAASC,gBAAgB,QAAQ,uBAAoB;AACrD,SAASC,uBAAuB,QAAQ,8BAA2B;AACnE,SAASC,QAAQ,QAAQ,eAAY;AACrC,SAASC,kBAAkB,QAAQ,yBAAsB;AACzD,cAAc,2BAA2B","ignoreList":[]}
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * Compare two arrays with primitive values as the content.
5
+ * We need to make sure that both values and order match.
6
+ */
7
+ export function isArrayEqual(a, b) {
8
+ if (a === b) {
9
+ return true;
10
+ }
11
+ if (a.length !== b.length) {
12
+ return false;
13
+ }
14
+ return a.every((it, index) => it === b[index]);
15
+ }
16
+ //# sourceMappingURL=isArrayEqual.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["isArrayEqual","a","b","length","every","it","index"],"sourceRoot":"../../src","sources":["isArrayEqual.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA,OAAO,SAASA,YAAYA,CAACC,CAAQ,EAAEC,CAAQ,EAAE;EAC/C,IAAID,CAAC,KAAKC,CAAC,EAAE;IACX,OAAO,IAAI;EACb;EAEA,IAAID,CAAC,CAACE,MAAM,KAAKD,CAAC,CAACC,MAAM,EAAE;IACzB,OAAO,KAAK;EACd;EAEA,OAAOF,CAAC,CAACG,KAAK,CAAC,CAACC,EAAE,EAAEC,KAAK,KAAKD,EAAE,KAAKH,CAAC,CAACI,KAAK,CAAC,CAAC;AAChD","ignoreList":[]}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * Compare two records with primitive values as the content.
5
+ */
6
+ export function isRecordEqual(a, b) {
7
+ if (a === b) {
8
+ return true;
9
+ }
10
+ const aKeys = Object.keys(a);
11
+ const bKeys = Object.keys(b);
12
+ if (aKeys.length !== bKeys.length) {
13
+ return false;
14
+ }
15
+ return aKeys.every(key => a[key] === b[key]);
16
+ }
17
+ //# sourceMappingURL=isRecordEqual.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["isRecordEqual","a","b","aKeys","Object","keys","bKeys","length","every","key"],"sourceRoot":"../../src","sources":["isRecordEqual.tsx"],"mappings":";;AAAA;AACA;AACA;AACA,OAAO,SAASA,aAAaA,CAACC,CAAsB,EAAEC,CAAsB,EAAE;EAC5E,IAAID,CAAC,KAAKC,CAAC,EAAE;IACX,OAAO,IAAI;EACb;EAEA,MAAMC,KAAK,GAAGC,MAAM,CAACC,IAAI,CAACJ,CAAC,CAAC;EAC5B,MAAMK,KAAK,GAAGF,MAAM,CAACC,IAAI,CAACH,CAAC,CAAC;EAE5B,IAAIC,KAAK,CAACI,MAAM,KAAKD,KAAK,CAACC,MAAM,EAAE;IACjC,OAAO,KAAK;EACd;EAEA,OAAOJ,KAAK,CAACK,KAAK,CAAEC,GAAG,IAAKR,CAAC,CAACQ,GAAG,CAAC,KAAKP,CAAC,CAACO,GAAG,CAAC,CAAC;AAChD","ignoreList":[]}
@@ -0,0 +1 @@
1
+ {"type":"module"}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+
3
+ import * as React from 'react';
4
+ export const ThemeContext = /*#__PURE__*/React.createContext(undefined);
5
+ ThemeContext.displayName = 'ThemeContext';
6
+ //# sourceMappingURL=ThemeContext.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","ThemeContext","createContext","undefined","displayName"],"sourceRoot":"../../../src","sources":["theming/ThemeContext.tsx"],"mappings":";;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAE9B,OAAO,MAAMC,YAAY,gBAAGD,KAAK,CAACE,aAAa,CAE7CC,SAAS,CAAC;AAEZF,YAAY,CAACG,WAAW,GAAG,cAAc","ignoreList":[]}
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+
3
+ import * as React from 'react';
4
+ import { ThemeContext } from "./ThemeContext.js";
5
+ import { jsx as _jsx } from "react/jsx-runtime";
6
+ export function ThemeProvider({
7
+ value,
8
+ children
9
+ }) {
10
+ return /*#__PURE__*/_jsx(ThemeContext.Provider, {
11
+ value: value,
12
+ children: children
13
+ });
14
+ }
15
+ //# sourceMappingURL=ThemeProvider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","ThemeContext","jsx","_jsx","ThemeProvider","value","children","Provider"],"sourceRoot":"../../../src","sources":["theming/ThemeProvider.tsx"],"mappings":";;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAE9B,SAASC,YAAY,QAAQ,mBAAgB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAO9C,OAAO,SAASC,aAAaA,CAAC;EAAEC,KAAK;EAAEC;AAAgB,CAAC,EAAE;EACxD,oBACEH,IAAA,CAACF,YAAY,CAACM,QAAQ;IAACF,KAAK,EAAEA,KAAM;IAAAC,QAAA,EAAEA;EAAQ,CAAwB,CAAC;AAE3E","ignoreList":[]}
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+
3
+ import * as React from 'react';
4
+ import { ThemeContext } from "./ThemeContext.js";
5
+ export function useTheme() {
6
+ const theme = React.useContext(ThemeContext);
7
+ if (theme == null) {
8
+ throw new Error("Couldn't find a theme. Is your component inside NavigationContainer or does it have a theme?");
9
+ }
10
+ return theme;
11
+ }
12
+ //# sourceMappingURL=useTheme.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","ThemeContext","useTheme","theme","useContext","Error"],"sourceRoot":"../../../src","sources":["theming/useTheme.tsx"],"mappings":";;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAE9B,SAASC,YAAY,QAAQ,mBAAgB;AAE7C,OAAO,SAASC,QAAQA,CAAA,EAAG;EACzB,MAAMC,KAAK,GAAGH,KAAK,CAACI,UAAU,CAACH,YAAY,CAAC;EAE5C,IAAIE,KAAK,IAAI,IAAI,EAAE;IACjB,MAAM,IAAIE,KAAK,CACb,8FACF,CAAC;EACH;EAEA,OAAOF,KAAK;AACd","ignoreList":[]}