expo-router 2.0.1 → 3.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 (381) hide show
  1. package/README.md +1 -1
  2. package/{_ctx.android.tsx → _ctx.android.js} +1 -2
  3. package/_ctx.d.ts +3 -0
  4. package/{_ctx.ios.tsx → _ctx.ios.js} +1 -2
  5. package/_ctx.js +1 -0
  6. package/{_ctx.web.tsx → _ctx.web.js} +1 -2
  7. package/_error.js +2 -4
  8. package/app.plugin.js +1 -1
  9. package/babel.js +44 -55
  10. package/build/ExpoRoot.d.ts +2 -2
  11. package/build/ExpoRoot.d.ts.map +1 -1
  12. package/build/ExpoRoot.js +79 -0
  13. package/build/ExpoRoot.js.map +1 -0
  14. package/build/LocationProvider.d.ts +2 -2
  15. package/build/LocationProvider.d.ts.map +1 -1
  16. package/build/LocationProvider.js +30 -0
  17. package/build/LocationProvider.js.map +1 -0
  18. package/build/Route.d.ts +3 -3
  19. package/build/Route.d.ts.map +1 -1
  20. package/build/Route.js +68 -0
  21. package/build/Route.js.map +1 -0
  22. package/build/exports.d.ts +12 -12
  23. package/build/exports.js +17 -0
  24. package/build/exports.js.map +1 -0
  25. package/build/fork/NavigationContainer.d.ts +1 -1
  26. package/build/fork/NavigationContainer.js +4 -0
  27. package/build/fork/NavigationContainer.js.map +1 -0
  28. package/build/fork/NavigationContainer.native.d.ts +3 -3
  29. package/build/fork/NavigationContainer.native.d.ts.map +1 -1
  30. package/build/fork/NavigationContainer.native.js +81 -0
  31. package/build/fork/NavigationContainer.native.js.map +1 -0
  32. package/build/fork/expo/createRoot.d.ts +1 -1
  33. package/build/fork/expo/createRoot.js +2 -0
  34. package/build/fork/expo/createRoot.js.map +1 -0
  35. package/{src/fork/expo/createRoot.native.tsx → build/fork/expo/createRoot.native.js} +3 -2
  36. package/build/fork/expo/createRoot.native.js.map +1 -0
  37. package/build/fork/expo/registerRootComponent.d.ts +3 -3
  38. package/build/fork/expo/registerRootComponent.js +51 -0
  39. package/build/fork/expo/registerRootComponent.js.map +1 -0
  40. package/build/fork/extractPathFromURL.d.ts.map +1 -1
  41. package/build/fork/extractPathFromURL.js +76 -0
  42. package/build/fork/extractPathFromURL.js.map +1 -0
  43. package/build/fork/findFocusedRoute.d.ts +1 -1
  44. package/build/fork/findFocusedRoute.js +10 -0
  45. package/build/fork/findFocusedRoute.js.map +1 -0
  46. package/build/fork/getPathFromState.d.ts +3 -3
  47. package/build/fork/getPathFromState.d.ts.map +1 -1
  48. package/build/fork/getPathFromState.js +419 -0
  49. package/build/fork/getPathFromState.js.map +1 -0
  50. package/build/fork/getStateFromPath.d.ts +3 -3
  51. package/build/fork/getStateFromPath.d.ts.map +1 -1
  52. package/build/fork/getStateFromPath.js +503 -0
  53. package/build/fork/getStateFromPath.js.map +1 -0
  54. package/build/fork/useLinking.d.ts.map +1 -1
  55. package/build/fork/useLinking.js +3 -0
  56. package/build/fork/useLinking.js.map +1 -0
  57. package/build/fork/useLinking.native.d.ts +3 -3
  58. package/build/fork/useLinking.native.d.ts.map +1 -1
  59. package/build/fork/useLinking.native.js +154 -0
  60. package/build/fork/useLinking.native.js.map +1 -0
  61. package/build/fork/validatePathConfig.d.ts.map +1 -1
  62. package/build/fork/validatePathConfig.js +19 -0
  63. package/build/fork/validatePathConfig.js.map +1 -0
  64. package/build/getDevServer/index.js +30 -0
  65. package/build/getDevServer/index.js.map +1 -0
  66. package/build/getDevServer/index.native.js +2 -0
  67. package/build/getDevServer/index.native.js.map +1 -0
  68. package/build/getLinkingConfig.d.ts +4 -4
  69. package/build/getLinkingConfig.d.ts.map +1 -1
  70. package/build/getLinkingConfig.js +43 -0
  71. package/build/getLinkingConfig.js.map +1 -0
  72. package/build/getReactNavigationConfig.d.ts +1 -1
  73. package/build/getReactNavigationConfig.d.ts.map +1 -1
  74. package/build/getReactNavigationConfig.js +69 -0
  75. package/build/getReactNavigationConfig.js.map +1 -0
  76. package/build/getRoutes.d.ts +4 -4
  77. package/build/getRoutes.d.ts.map +1 -1
  78. package/build/getRoutes.js +378 -0
  79. package/build/getRoutes.js.map +1 -0
  80. package/build/global-state/router-store.d.ts +14 -16
  81. package/build/global-state/router-store.d.ts.map +1 -1
  82. package/build/global-state/router-store.js +179 -0
  83. package/build/global-state/router-store.js.map +1 -0
  84. package/build/global-state/routing.d.ts +6 -6
  85. package/build/global-state/routing.d.ts.map +1 -1
  86. package/build/global-state/routing.js +149 -0
  87. package/build/global-state/routing.js.map +1 -0
  88. package/build/global-state/sort-routes.d.ts +1 -1
  89. package/build/global-state/sort-routes.d.ts.map +1 -1
  90. package/build/global-state/sort-routes.js +8 -0
  91. package/build/global-state/sort-routes.js.map +1 -0
  92. package/build/head/ExpoHead.android.d.ts +10 -0
  93. package/build/head/ExpoHead.android.d.ts.map +1 -0
  94. package/build/head/ExpoHead.android.js +6 -0
  95. package/build/head/ExpoHead.android.js.map +1 -0
  96. package/build/head/ExpoHead.d.ts +8 -0
  97. package/build/head/ExpoHead.d.ts.map +1 -0
  98. package/build/head/ExpoHead.ios.d.ts +7 -0
  99. package/build/head/ExpoHead.ios.d.ts.map +1 -0
  100. package/build/head/ExpoHead.ios.js +242 -0
  101. package/build/head/ExpoHead.ios.js.map +1 -0
  102. package/build/head/ExpoHead.js +7 -0
  103. package/build/head/ExpoHead.js.map +1 -0
  104. package/build/head/ExpoHeadModule.d.ts +33 -0
  105. package/build/head/ExpoHeadModule.d.ts.map +1 -0
  106. package/build/head/ExpoHeadModule.js +4 -0
  107. package/build/head/ExpoHeadModule.js.map +1 -0
  108. package/build/head/ExpoHeadModule.native.d.ts +3 -0
  109. package/build/head/ExpoHeadModule.native.d.ts.map +1 -0
  110. package/build/head/ExpoHeadModule.native.js +10 -0
  111. package/build/head/ExpoHeadModule.native.js.map +1 -0
  112. package/build/head/index.d.ts +2 -0
  113. package/build/head/index.d.ts.map +1 -0
  114. package/build/head/index.js +2 -0
  115. package/build/head/index.js.map +1 -0
  116. package/build/head/url.d.ts +2 -0
  117. package/build/head/url.d.ts.map +1 -0
  118. package/build/head/url.js +64 -0
  119. package/build/head/url.js.map +1 -0
  120. package/build/hooks.d.ts +1 -1
  121. package/build/hooks.d.ts.map +1 -1
  122. package/{src/hooks.ts → build/hooks.js} +34 -70
  123. package/build/hooks.js.map +1 -0
  124. package/build/imperative-api.d.ts +1 -1
  125. package/build/imperative-api.js +9 -0
  126. package/build/imperative-api.js.map +1 -0
  127. package/{src/import-mode/index.android.ts → build/import-mode/index.android.js} +1 -0
  128. package/build/import-mode/index.android.js.map +1 -0
  129. package/{src/import-mode/index.ios.ts → build/import-mode/index.ios.js} +1 -0
  130. package/build/import-mode/index.ios.js.map +1 -0
  131. package/build/import-mode/index.js +2 -0
  132. package/build/import-mode/index.js.map +1 -0
  133. package/{src/import-mode/index.web.ts → build/import-mode/index.web.js} +1 -0
  134. package/build/import-mode/index.web.js.map +1 -0
  135. package/build/index.d.ts +3 -3
  136. package/build/index.js +4 -0
  137. package/build/index.js.map +1 -0
  138. package/build/layouts/Drawer.d.ts +1 -1
  139. package/build/layouts/Drawer.d.ts.map +1 -1
  140. package/build/layouts/Drawer.js +6 -0
  141. package/build/layouts/Drawer.js.map +1 -0
  142. package/build/layouts/Stack.d.ts +1 -1
  143. package/build/layouts/Stack.d.ts.map +1 -1
  144. package/build/layouts/Stack.js +6 -0
  145. package/build/layouts/Stack.js.map +1 -0
  146. package/build/layouts/Tabs.d.ts +4 -4
  147. package/build/layouts/Tabs.d.ts.map +1 -1
  148. package/build/layouts/Tabs.js +34 -0
  149. package/build/layouts/Tabs.js.map +1 -0
  150. package/build/layouts/withLayoutContext.d.ts +4 -4
  151. package/build/layouts/withLayoutContext.d.ts.map +1 -1
  152. package/build/layouts/withLayoutContext.js +65 -0
  153. package/build/layouts/withLayoutContext.js.map +1 -0
  154. package/build/link/Link.d.ts +5 -5
  155. package/build/link/Link.d.ts.map +1 -1
  156. package/build/link/Link.js +63 -0
  157. package/build/link/Link.js.map +1 -0
  158. package/build/link/href.js +46 -0
  159. package/build/link/href.js.map +1 -0
  160. package/build/link/linking.d.ts +2 -2
  161. package/build/link/linking.d.ts.map +1 -1
  162. package/build/link/linking.js +86 -0
  163. package/build/link/linking.js.map +1 -0
  164. package/build/link/path.d.ts.map +1 -1
  165. package/build/link/path.js +143 -0
  166. package/build/link/path.js.map +1 -0
  167. package/build/link/stateOperations.d.ts +3 -3
  168. package/build/link/stateOperations.js +91 -0
  169. package/build/link/stateOperations.js.map +1 -0
  170. package/build/link/useLinkToPathProps.d.ts +2 -2
  171. package/build/link/useLinkToPathProps.d.ts.map +1 -1
  172. package/build/link/useLinkToPathProps.js +45 -0
  173. package/build/link/useLinkToPathProps.js.map +1 -0
  174. package/build/link/useLoadedNavigation.d.ts +1 -1
  175. package/build/link/useLoadedNavigation.js +46 -0
  176. package/build/link/useLoadedNavigation.js.map +1 -0
  177. package/build/loadStaticParamsAsync.d.ts +1 -1
  178. package/build/loadStaticParamsAsync.d.ts.map +1 -1
  179. package/build/loadStaticParamsAsync.js +117 -0
  180. package/build/loadStaticParamsAsync.js.map +1 -0
  181. package/build/matchers.js +49 -0
  182. package/build/matchers.js.map +1 -0
  183. package/build/onboard/Tutorial.d.ts.map +1 -1
  184. package/build/onboard/Tutorial.js +155 -0
  185. package/build/onboard/Tutorial.js.map +1 -0
  186. package/{src/onboard/createEntryFile.ts → build/onboard/createEntryFile.js} +19 -22
  187. package/build/onboard/createEntryFile.js.map +1 -0
  188. package/build/primitives.js +5 -0
  189. package/build/primitives.js.map +1 -0
  190. package/build/qualified-entry.d.ts +3 -0
  191. package/build/qualified-entry.d.ts.map +1 -0
  192. package/{_app.tsx → build/qualified-entry.js} +7 -10
  193. package/build/qualified-entry.js.map +1 -0
  194. package/build/renderRootComponent.d.ts +1 -1
  195. package/build/renderRootComponent.d.ts.map +1 -1
  196. package/build/renderRootComponent.js +72 -0
  197. package/build/renderRootComponent.js.map +1 -0
  198. package/build/static/getRootComponent.d.ts.map +1 -1
  199. package/build/static/getRootComponent.js +22 -0
  200. package/build/static/getRootComponent.js.map +1 -0
  201. package/build/static/html.d.ts +1 -1
  202. package/build/static/html.js +25 -0
  203. package/build/static/html.js.map +1 -0
  204. package/build/static/renderStaticContent.d.ts +6 -1
  205. package/build/static/renderStaticContent.d.ts.map +1 -1
  206. package/build/static/renderStaticContent.js +85 -0
  207. package/build/static/renderStaticContent.js.map +1 -0
  208. package/build/testing-library/context-stubs.d.ts +1 -1
  209. package/build/testing-library/context-stubs.d.ts.map +1 -1
  210. package/build/testing-library/context-stubs.js +30 -0
  211. package/build/testing-library/context-stubs.js.map +1 -0
  212. package/build/testing-library/expect.js +14 -0
  213. package/build/testing-library/expect.js.map +1 -0
  214. package/build/testing-library/index.d.ts +4 -4
  215. package/build/testing-library/index.d.ts.map +1 -1
  216. package/build/testing-library/index.js +57 -0
  217. package/build/testing-library/index.js.map +1 -0
  218. package/build/testing-library/mocks.d.ts +1 -1
  219. package/build/testing-library/mocks.js +33 -0
  220. package/build/testing-library/mocks.js.map +1 -0
  221. package/build/testing-library/require-context-ponyfill.d.ts +1 -1
  222. package/build/testing-library/require-context-ponyfill.js +29 -0
  223. package/build/testing-library/require-context-ponyfill.js.map +1 -0
  224. package/build/types.d.ts +1 -1
  225. package/build/types.d.ts.map +1 -1
  226. package/build/types.js +2 -0
  227. package/build/types.js.map +1 -0
  228. package/build/useDeprecated.d.ts.map +1 -1
  229. package/build/useDeprecated.js +23 -0
  230. package/build/useDeprecated.js.map +1 -0
  231. package/build/useFocusEffect.d.ts.map +1 -1
  232. package/build/useFocusEffect.js +98 -0
  233. package/build/useFocusEffect.js.map +1 -0
  234. package/build/useNavigation.d.ts +1 -1
  235. package/build/useNavigation.d.ts.map +1 -1
  236. package/build/useNavigation.js +63 -0
  237. package/build/useNavigation.js.map +1 -0
  238. package/build/useScreens.d.ts +4 -4
  239. package/build/useScreens.d.ts.map +1 -1
  240. package/build/useScreens.js +183 -0
  241. package/build/useScreens.js.map +1 -0
  242. package/build/utils/mockState.d.ts +1 -1
  243. package/build/utils/mockState.d.ts.map +1 -1
  244. package/build/utils/mockState.js +24 -0
  245. package/build/utils/mockState.js.map +1 -0
  246. package/{src/utils/url.ts → build/utils/url.js} +3 -2
  247. package/build/utils/url.js.map +1 -0
  248. package/build/views/EmptyRoute.js +9 -0
  249. package/build/views/EmptyRoute.js.map +1 -0
  250. package/build/views/ErrorBoundary.d.ts +1 -1
  251. package/build/views/ErrorBoundary.d.ts.map +1 -1
  252. package/build/views/ErrorBoundary.js +124 -0
  253. package/build/views/ErrorBoundary.js.map +1 -0
  254. package/build/views/Navigator.d.ts +11 -11
  255. package/build/views/Navigator.d.ts.map +1 -1
  256. package/build/views/Navigator.js +87 -0
  257. package/build/views/Navigator.js.map +1 -0
  258. package/build/views/Screen.d.ts.map +1 -1
  259. package/build/views/Screen.js +30 -0
  260. package/build/views/Screen.js.map +1 -0
  261. package/build/views/Sitemap.d.ts +1 -1
  262. package/build/views/Sitemap.d.ts.map +1 -1
  263. package/build/views/Sitemap.js +156 -0
  264. package/build/views/Sitemap.js.map +1 -0
  265. package/build/views/Splash.js +109 -0
  266. package/build/views/Splash.js.map +1 -0
  267. package/build/views/SuspenseFallback.d.ts +1 -1
  268. package/build/views/SuspenseFallback.js +7 -0
  269. package/build/views/SuspenseFallback.js.map +1 -0
  270. package/build/views/Toast.d.ts +1 -1
  271. package/build/views/Toast.d.ts.map +1 -1
  272. package/build/views/Toast.js +73 -0
  273. package/build/views/Toast.js.map +1 -0
  274. package/build/views/Try.d.ts +1 -1
  275. package/build/views/Try.js +27 -0
  276. package/build/views/Try.js.map +1 -0
  277. package/build/views/Unmatched.d.ts.map +1 -1
  278. package/build/views/Unmatched.js +72 -0
  279. package/build/views/Unmatched.js.map +1 -0
  280. package/drawer.d.ts +2 -0
  281. package/drawer.js +1 -0
  282. package/entry.js +4 -5
  283. package/expo-module.config.json +8 -0
  284. package/head.d.ts +1 -0
  285. package/head.js +1 -0
  286. package/html.js +1 -0
  287. package/ios/ExpoHead.podspec +32 -0
  288. package/ios/ExpoHeadAppDelegateSubscriber.swift +94 -0
  289. package/ios/ExpoHeadModule.swift +186 -0
  290. package/node/getExpoConstantsManifest.js +22 -38
  291. package/node/render.js +1 -1
  292. package/package.json +41 -38
  293. package/plugin/build/index.d.ts +1 -1
  294. package/plugin/build/index.js +4 -2
  295. package/plugin/jest.config.js +1 -0
  296. package/stack.d.ts +2 -0
  297. package/stack.js +1 -0
  298. package/tabs.d.ts +2 -0
  299. package/tabs.js +1 -0
  300. package/testing-library.d.ts +1 -0
  301. package/testing-library.js +1 -0
  302. package/types/expect.d.ts +1 -1
  303. package/types/global.d.ts +7 -7
  304. package/types/metro-require.d.ts +1 -1
  305. package/types/react-native-web.d.ts +16 -18
  306. package/_ctx.tsx +0 -5
  307. package/_entry.tsx +0 -33
  308. package/_html-ctx.tsx +0 -9
  309. package/drawer.ts +0 -2
  310. package/head.ts +0 -6
  311. package/html.ts +0 -1
  312. package/plugin/src/index.ts +0 -54
  313. package/src/ExpoRoot.tsx +0 -128
  314. package/src/LocationProvider.tsx +0 -52
  315. package/src/Route.tsx +0 -120
  316. package/src/exports.ts +0 -34
  317. package/src/fork/NavigationContainer.native.tsx +0 -159
  318. package/src/fork/NavigationContainer.tsx +0 -4
  319. package/src/fork/expo/createRoot.tsx +0 -1
  320. package/src/fork/expo/registerRootComponent.tsx +0 -77
  321. package/src/fork/extractPathFromURL.ts +0 -103
  322. package/src/fork/findFocusedRoute.tsx +0 -15
  323. package/src/fork/getPathFromState.ts +0 -647
  324. package/src/fork/getStateFromPath.ts +0 -776
  325. package/src/fork/useLinking.native.ts +0 -224
  326. package/src/fork/useLinking.ts +0 -4
  327. package/src/fork/validatePathConfig.ts +0 -32
  328. package/src/getDevServer/index.native.ts +0 -1
  329. package/src/getDevServer/index.ts +0 -37
  330. package/src/getLinkingConfig.ts +0 -69
  331. package/src/getReactNavigationConfig.ts +0 -103
  332. package/src/getRoutes.ts +0 -520
  333. package/src/global-state/router-store.tsx +0 -262
  334. package/src/global-state/routing.ts +0 -213
  335. package/src/global-state/sort-routes.ts +0 -12
  336. package/src/imperative-api.ts +0 -10
  337. package/src/import-mode/index.ts +0 -1
  338. package/src/index.tsx +0 -3
  339. package/src/layouts/Drawer.tsx +0 -15
  340. package/src/layouts/Stack.tsx +0 -15
  341. package/src/layouts/Tabs.tsx +0 -61
  342. package/src/layouts/withLayoutContext.tsx +0 -114
  343. package/src/link/Link.tsx +0 -104
  344. package/src/link/href.ts +0 -62
  345. package/src/link/linking.ts +0 -106
  346. package/src/link/path.ts +0 -141
  347. package/src/link/stateOperations.ts +0 -152
  348. package/src/link/useLinkToPathProps.tsx +0 -60
  349. package/src/link/useLoadedNavigation.ts +0 -60
  350. package/src/loadStaticParamsAsync.ts +0 -196
  351. package/src/matchers.tsx +0 -56
  352. package/src/onboard/Tutorial.tsx +0 -196
  353. package/src/primitives.tsx +0 -5
  354. package/src/renderRootComponent.tsx +0 -87
  355. package/src/static/getRootComponent.ts +0 -28
  356. package/src/static/html.tsx +0 -38
  357. package/src/static/renderStaticContent.tsx +0 -103
  358. package/src/testing-library/context-stubs.ts +0 -52
  359. package/src/testing-library/expect.ts +0 -15
  360. package/src/testing-library/index.tsx +0 -103
  361. package/src/testing-library/mocks.ts +0 -39
  362. package/src/testing-library/require-context-ponyfill.ts +0 -44
  363. package/src/ts-declarations.d.ts +0 -1
  364. package/src/types.ts +0 -30
  365. package/src/useDeprecated.ts +0 -35
  366. package/src/useFocusEffect.tsx +0 -121
  367. package/src/useNavigation.ts +0 -84
  368. package/src/useScreens.tsx +0 -297
  369. package/src/utils/mockState.ts +0 -31
  370. package/src/views/EmptyRoute.tsx +0 -16
  371. package/src/views/ErrorBoundary.tsx +0 -171
  372. package/src/views/Navigator.tsx +0 -164
  373. package/src/views/Screen.tsx +0 -67
  374. package/src/views/Sitemap.tsx +0 -269
  375. package/src/views/Splash.tsx +0 -125
  376. package/src/views/SuspenseFallback.tsx +0 -12
  377. package/src/views/Toast.tsx +0 -102
  378. package/src/views/Try.tsx +0 -46
  379. package/src/views/Unmatched.tsx +0 -97
  380. package/stack.ts +0 -2
  381. package/tabs.ts +0 -2
@@ -0,0 +1 @@
1
+ {"version":3,"file":"exports.js","sourceRoot":"","sources":["../src/exports.ts"],"names":[],"mappings":"AAAA,kBAAkB;AAClB,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEpD,OAAO,EACL,SAAS,EACT,qBAAqB,EACrB,WAAW,EACX,qBAAqB,EACrB,oBAAoB,EACpB,eAAe,EACf,WAAW,EACX,iBAAiB,EACjB,sBAAsB,GACvB,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE1C,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;AAE3B,oBAAoB;AACpB,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEtD,WAAW;AACX,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,mBAAmB;AACnB,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC","sourcesContent":["// Expo Router API\nimport { Navigator, Slot } from './views/Navigator';\n\nexport {\n useRouter,\n useUnstableGlobalHref,\n usePathname,\n useGlobalSearchParams,\n useLocalSearchParams,\n useSearchParams,\n useSegments,\n useRootNavigation,\n useRootNavigationState,\n} from './hooks';\n\nexport { router } from './imperative-api';\n\nexport { Link, Redirect } from './link/Link';\n\nexport { withLayoutContext } from './layouts/withLayoutContext';\nexport { Navigator, Slot };\n\n// Expo Router Views\nexport { ExpoRoot } from './ExpoRoot';\nexport { Unmatched } from './views/Unmatched';\nexport { ErrorBoundaryProps } from './views/Try';\nexport { ErrorBoundary } from './views/ErrorBoundary';\n\n// Platform\nexport { SplashScreen } from './views/Splash';\n\n// React Navigation\nexport { useNavigation } from './useNavigation';\nexport { useFocusEffect } from './useFocusEffect';\n"]}
@@ -1,3 +1,3 @@
1
- import { NavigationContainer } from "@react-navigation/native";
1
+ import { NavigationContainer } from '@react-navigation/native';
2
2
  export default NavigationContainer;
3
3
  //# sourceMappingURL=NavigationContainer.d.ts.map
@@ -0,0 +1,4 @@
1
+ // We only need to fork on native to support any prefixes.
2
+ import { NavigationContainer } from '@react-navigation/native';
3
+ export default NavigationContainer;
4
+ //# sourceMappingURL=NavigationContainer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NavigationContainer.js","sourceRoot":"","sources":["../../src/fork/NavigationContainer.tsx"],"names":[],"mappings":"AAAA,0DAA0D;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAE/D,eAAe,mBAAmB,CAAC","sourcesContent":["// We only need to fork on native to support any prefixes.\nimport { NavigationContainer } from '@react-navigation/native';\n\nexport default NavigationContainer;\n"]}
@@ -1,6 +1,6 @@
1
- import { NavigationContainerProps, NavigationContainerRef } from "@react-navigation/core";
2
- import { DocumentTitleOptions, LinkingOptions, Theme } from "@react-navigation/native";
3
- import * as React from "react";
1
+ import { NavigationContainerProps, NavigationContainerRef } from '@react-navigation/core';
2
+ import { DocumentTitleOptions, LinkingOptions, Theme } from '@react-navigation/native';
3
+ import * as React from 'react';
4
4
  declare global {
5
5
  var REACT_NAVIGATION_DEVTOOLS: WeakMap<NavigationContainerRef<any>, {
6
6
  readonly linking: LinkingOptions<any>;
@@ -1 +1 @@
1
- {"version":3,"file":"NavigationContainer.native.d.ts","sourceRoot":"","sources":["../../src/fork/NavigationContainer.native.tsx"],"names":[],"mappings":"AAEA,OA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AE,CAC1C,CAAC;CACH;AAID,KAAK,KAAK,CAAC,SAAS,SAAS,MAAM,IAAI,wBAAwB,GAAG;IAChE,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,OAAO,CAAC,EAAE,cAAc,CAAC,SAAS,CAAC,CAAC;IACpC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,aAAa,CAAC,EAAE,oBAAoB,CAAC;IACrC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB,CAAC;AAuGF,QAAA,MAAM,mBAAmB;;;eA1GZ,MAAM,SAAS;;qBAEV,IAAI;;;MA8GjB,MAAM,YAAY,CAAC;AAExB,eAAe,mBAAmB,CAAC"}
@@ -0,0 +1,81 @@
1
+ // Forked from React Navigation in order to use a custom `useLinking` -> `extractPathFromURL` function.
2
+ // https://github.com/react-navigation/react-navigation/blob/main/packages/native/src/NavigationContainer.tsx
3
+ import { BaseNavigationContainer, getActionFromState, getPathFromState, getStateFromPath, validatePathConfig, } from '@react-navigation/core';
4
+ import { DefaultTheme, LinkingContext, ThemeProvider, } from '@react-navigation/native';
5
+ import useBackButton from '@react-navigation/native/src/useBackButton';
6
+ import useDocumentTitle from '@react-navigation/native/src/useDocumentTitle';
7
+ import useThenable from '@react-navigation/native/src/useThenable';
8
+ import * as React from 'react';
9
+ import useLinking from './useLinking';
10
+ global.REACT_NAVIGATION_DEVTOOLS = new WeakMap();
11
+ /**
12
+ * Container component which holds the navigation state designed for React Native apps.
13
+ * This should be rendered at the root wrapping the whole app.
14
+ *
15
+ * @param props.initialState Initial state object for the navigation tree. When deep link handling is enabled, this will override deep links when specified. Make sure that you don't specify an `initialState` when there's a deep link (`Linking.getInitialURL()`).
16
+ * @param props.onReady Callback which is called after the navigation tree mounts.
17
+ * @param props.onStateChange Callback which is called with the latest navigation state when it changes.
18
+ * @param props.theme Theme object for the navigators.
19
+ * @param props.linking Options for deep linking. Deep link handling is enabled when this prop is provided, unless `linking.enabled` is `false`.
20
+ * @param props.fallback Fallback component to render until we have finished getting initial state when linking is enabled. Defaults to `null`.
21
+ * @param props.documentTitle Options to configure the document title on Web. Updating document title is handled by default unless `documentTitle.enabled` is `false`.
22
+ * @param props.children Child elements to render the content.
23
+ * @param props.ref Ref object which refers to the navigation object containing helper methods.
24
+ */
25
+ function NavigationContainerInner({ theme = DefaultTheme, linking, fallback = null, documentTitle, onReady, ...rest }, ref) {
26
+ const isLinkingEnabled = linking ? linking.enabled !== false : false;
27
+ if (linking?.config) {
28
+ validatePathConfig(linking.config);
29
+ }
30
+ const refContainer = React.useRef(null);
31
+ useBackButton(refContainer);
32
+ useDocumentTitle(refContainer, documentTitle);
33
+ const { getInitialState } = useLinking(refContainer, {
34
+ // independent: rest.independent,
35
+ enabled: isLinkingEnabled,
36
+ prefixes: [],
37
+ ...linking,
38
+ });
39
+ // Add additional linking related info to the ref
40
+ // This will be used by the devtools
41
+ React.useEffect(() => {
42
+ if (refContainer.current) {
43
+ REACT_NAVIGATION_DEVTOOLS.set(refContainer.current, {
44
+ get linking() {
45
+ return {
46
+ ...linking,
47
+ enabled: isLinkingEnabled,
48
+ prefixes: linking?.prefixes ?? [],
49
+ getStateFromPath: linking?.getStateFromPath ?? getStateFromPath,
50
+ getPathFromState: linking?.getPathFromState ?? getPathFromState,
51
+ getActionFromState: linking?.getActionFromState ?? getActionFromState,
52
+ };
53
+ },
54
+ });
55
+ }
56
+ });
57
+ const [isResolved, initialState] = useThenable(getInitialState);
58
+ React.useImperativeHandle(ref, () => refContainer.current);
59
+ const linkingContext = React.useMemo(() => ({ options: linking }), [linking]);
60
+ const isReady = rest.initialState != null || !isLinkingEnabled || isResolved;
61
+ const onReadyRef = React.useRef(onReady);
62
+ React.useEffect(() => {
63
+ onReadyRef.current = onReady;
64
+ });
65
+ React.useEffect(() => {
66
+ if (isReady) {
67
+ onReadyRef.current?.();
68
+ }
69
+ }, [isReady]);
70
+ if (!isReady) {
71
+ // This is temporary until we have Suspense for data-fetching
72
+ // Then the fallback will be handled by a parent `Suspense` component
73
+ return fallback;
74
+ }
75
+ return (React.createElement(LinkingContext.Provider, { value: linkingContext },
76
+ React.createElement(ThemeProvider, { value: theme },
77
+ React.createElement(BaseNavigationContainer, { ...rest, initialState: rest.initialState == null ? initialState : rest.initialState, ref: refContainer }))));
78
+ }
79
+ const NavigationContainer = React.forwardRef(NavigationContainerInner);
80
+ export default NavigationContainer;
81
+ //# sourceMappingURL=NavigationContainer.native.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NavigationContainer.native.js","sourceRoot":"","sources":["../../src/fork/NavigationContainer.native.tsx"],"names":[],"mappings":"AAAA,uGAAuG;AACvG,6GAA6G;AAC7G,OAAO,EACL,uBAAuB,EACvB,kBAAkB,EAClB,gBAAgB,EAChB,gBAAgB,EAIhB,kBAAkB,GACnB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,YAAY,EAEZ,cAAc,EAGd,aAAa,GACd,MAAM,0BAA0B,CAAC;AAClC,OAAO,aAAa,MAAM,4CAA4C,CAAC;AACvE,OAAO,gBAAgB,MAAM,+CAA+C,CAAC;AAC7E,OAAO,WAAW,MAAM,0CAA0C,CAAC;AACnE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,UAAU,MAAM,cAAc,CAAC;AAUtC,MAAM,CAAC,yBAAyB,GAAG,IAAI,OAAO,EAAE,CAAC;AAUjD;;;;;;;;;;;;;GAaG;AACH,SAAS,wBAAwB,CAC/B,EACE,KAAK,GAAG,YAAY,EACpB,OAAO,EACP,QAAQ,GAAG,IAAI,EACf,aAAa,EACb,OAAO,EACP,GAAG,IAAI,EACc,EACvB,GAA6D;IAE7D,MAAM,gBAAgB,GAAG,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,KAAK,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC;IAErE,IAAI,OAAO,EAAE,MAAM,EAAE;QACnB,kBAAkB,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;KACpC;IA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AC,gBAAgB,IAAI,UAAU,CAAC;IAE7E,MAAM,UAAU,GAAG,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAEzC,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,UAAU,CAAC,OAAO,GAAG,OAAO,CAAC;IAC/B,CAAC,CAAC,CAAC;IAEH,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,IAAI,OAAO,EAAE;YACX,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC;SACxB;IACH,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;IAEd,IAAI,CAAC,OAAO,EAAE;QACZ,6DAA6D;QAC7D,qEAAqE;QACrE,OAAO,QAA8B,CAAC;KACvC;IAED,OAAO,CACL,oBAAC,cAAc,CAAC,QAAQ,IAAC,KAAK,EAAE,cAAc;QAC5C,oBAAC,aAAa,IAAC,KAAK,EAAE,KAAK;YACzB,oBAAC,uBAAuB,OAClB,IAAI,EACR,YAAY,EAAE,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,EAC1E,GAAG,EAAE,YAAY,GACjB,CACY,CACQ,CAC3B,CAAC;AACJ,CAAC;AAED,MAAM,mBAAmB,GAAG,KAAK,CAAC,UAAU,CAAC,wBAAwB,CAM9C,CAAC;AAExB,eAAe,mBAAmB,CAAC","sourcesContent":["// Forked from React Navigation in order to use a custom `useLinking` -> `extractPathFromURL` function.\n// https://github.com/react-navigation/react-navigation/blob/main/packages/native/src/NavigationContainer.tsx\nimport {\n BaseNavigationContainer,\n getActionFromState,\n getPathFromState,\n getStateFromPath,\n NavigationContainerProps,\n NavigationContainerRef,\n ParamListBase,\n validatePathConfig,\n} from '@react-navigation/core';\nimport {\n DefaultTheme,\n DocumentTitleOptions,\n LinkingContext,\n LinkingOptions,\n Theme,\n ThemeProvider,\n} from '@react-navigation/native';\nimport useBackButton from '@react-navigation/native/src/useBackButton';\nimport useDocumentTitle from '@react-navigation/native/src/useDocumentTitle';\nimport useThenable from '@react-navigation/native/src/useThenable';\nimport * as React from 'react';\n\nimport useLinking from './useLinking';\n\ndeclare global {\n // eslint-disable-next-line no-var\n var REACT_NAVIGATION_DEVTOOLS: WeakMap<\n NavigationContainerRef<any>,\n { readonly linking: LinkingOptions<any> }\n >;\n}\n\nglobal.REACT_NAVIGATION_DEVTOOLS = new WeakMap();\n\ntype Props<ParamList extends object> = NavigationContainerProps & {\n theme?: Theme;\n linking?: LinkingOptions<ParamList>;\n fallback?: React.ReactNode;\n documentTitle?: DocumentTitleOptions;\n onReady?: () => void;\n};\n\n/**\n * Container component which holds the navigation state designed for React Native apps.\n * This should be rendered at the root wrapping the whole app.\n *\n * @param props.initialState Initial state object for the navigation tree. When deep link handling is enabled, this will override deep links when specified. Make sure that you don't specify an `initialState` when there's a deep link (`Linking.getInitialURL()`).\n * @param props.onReady Callback which is called after the navigation tree mounts.\n * @param props.onStateChange Callback which is called with the latest navigation state when it changes.\n * @param props.theme Theme object for the navigators.\n * @param props.linking Options for deep linking. Deep link handling is enabled when this prop is provided, unless `linking.enabled` is `false`.\n * @param props.fallback Fallback component to render until we have finished getting initial state when linking is enabled. Defaults to `null`.\n * @param props.documentTitle Options to configure the document title on Web. Updating document title is handled by default unless `documentTitle.enabled` is `false`.\n * @param props.children Child elements to render the content.\n * @param props.ref Ref object which refers to the navigation object containing helper methods.\n */\nfunction NavigationContainerInner(\n {\n theme = DefaultTheme,\n linking,\n fallback = null,\n documentTitle,\n onReady,\n ...rest\n }: Props<ParamListBase>,\n ref?: React.Ref<NavigationContainerRef<ParamListBase> | null>\n) {\n const isLinkingEnabled = linking ? linking.enabled !== false : false;\n\n if (linking?.config) {\n validatePathConfig(linking.config);\n }\n\n const refContainer = React.useRef<NavigationContainerRef<ParamListBase>>(null);\n\n useBackButton(refContainer);\n useDocumentTitle(refContainer, documentTitle);\n\n const { getInitialState } = useLinking(refContainer, {\n // independent: rest.independent,\n enabled: isLinkingEnabled,\n prefixes: [],\n ...linking,\n });\n\n // Add additional linking related info to the ref\n // This will be used by the devtools\n React.useEffect(() => {\n if (refContainer.current) {\n REACT_NAVIGATION_DEVTOOLS.set(refContainer.current, {\n get linking() {\n return {\n ...linking,\n enabled: isLinkingEnabled,\n prefixes: linking?.prefixes ?? [],\n getStateFromPath: linking?.getStateFromPath ?? getStateFromPath,\n getPathFromState: linking?.getPathFromState ?? getPathFromState,\n getActionFromState: linking?.getActionFromState ?? getActionFromState,\n };\n },\n });\n }\n });\n\n const [isResolved, initialState] = useThenable(getInitialState);\n\n React.useImperativeHandle(ref, () => refContainer.current);\n\n const linkingContext = React.useMemo(() => ({ options: linking }), [linking]);\n\n const isReady = rest.initialState != null || !isLinkingEnabled || isResolved;\n\n const onReadyRef = React.useRef(onReady);\n\n React.useEffect(() => {\n onReadyRef.current = onReady;\n });\n\n React.useEffect(() => {\n if (isReady) {\n onReadyRef.current?.();\n }\n }, [isReady]);\n\n if (!isReady) {\n // This is temporary until we have Suspense for data-fetching\n // Then the fallback will be handled by a parent `Suspense` component\n return fallback as React.ReactElement;\n }\n\n return (\n <LinkingContext.Provider value={linkingContext}>\n <ThemeProvider value={theme}>\n <BaseNavigationContainer\n {...rest}\n initialState={rest.initialState == null ? initialState : rest.initialState}\n ref={refContainer}\n />\n </ThemeProvider>\n </LinkingContext.Provider>\n );\n}\n\nconst NavigationContainer = React.forwardRef(NavigationContainerInner) as <\n RootParamList extends object = ReactNavigation.RootParamList\n>(\n props: Props<RootParamList> & {\n ref?: React.Ref<NavigationContainerRef<RootParamList>>;\n }\n) => React.ReactElement;\n\nexport default NavigationContainer;\n"]}
@@ -1,2 +1,2 @@
1
- export { createRoot, hydrateRoot } from "react-dom/client";
1
+ export { createRoot, hydrateRoot } from 'react-dom/client';
2
2
  //# sourceMappingURL=createRoot.d.ts.map
@@ -0,0 +1,2 @@
1
+ export { createRoot, hydrateRoot } from 'react-dom/client';
2
+ //# sourceMappingURL=createRoot.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createRoot.js","sourceRoot":"","sources":["../../../src/fork/expo/createRoot.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC","sourcesContent":["export { createRoot, hydrateRoot } from 'react-dom/client';\n"]}
@@ -1,8 +1,9 @@
1
1
  // NOTE(EvanBacon): We need this noop because Metro doesn't support optional dependencies.
2
2
  // `react-dom` is not required and therefore needs to be dodged using platform extensions on native.
3
3
  export function createRoot() {
4
- return null;
4
+ return null;
5
5
  }
6
6
  export function hydrateRoot() {
7
- return null;
7
+ return null;
8
8
  }
9
+ //# sourceMappingURL=createRoot.native.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createRoot.native.js","sourceRoot":"","sources":["../../../src/fork/expo/createRoot.native.tsx"],"names":[],"mappings":"AAAA,0FAA0F;AAC1F,oGAAoG;AACpG,MAAM,UAAU,UAAU;IACxB,OAAO,IAAI,CAAC;AACd,CAAC;AACD,MAAM,UAAU,WAAW;IACzB,OAAO,IAAI,CAAC;AACd,CAAC","sourcesContent":["// NOTE(EvanBacon): We need this noop because Metro doesn't support optional dependencies.\n// `react-dom` is not required and therefore needs to be dodged using platform extensions on native.\nexport function createRoot() {\n return null;\n}\nexport function hydrateRoot() {\n return null;\n}\n"]}
@@ -1,6 +1,6 @@
1
- import "expo/build/Expo.fx";
2
- import "@expo/metro-runtime";
3
- import * as React from "react";
1
+ import 'expo/build/Expo.fx';
2
+ import '@expo/metro-runtime';
3
+ import * as React from 'react';
4
4
  type InitialProps = {
5
5
  exp: {
6
6
  notification?: any;
@@ -0,0 +1,51 @@
1
+ // Fork of:
2
+ // https://github.com/expo/expo/blob/main/packages/expo/src/launch/registerRootComponent.tsx
3
+ // Originally made in Expo SDK 47 to add support for React 18 and Metro web.
4
+ import 'expo/build/Expo.fx';
5
+ // NOTE(EvanBacon): Add Metro web support to the global runtime.
6
+ import '@expo/metro-runtime';
7
+ // @ts-ignore: build order issue
8
+ import { withErrorOverlay } from '@expo/metro-runtime/error-overlay';
9
+ import * as React from 'react';
10
+ import { AppRegistry, Platform } from 'react-native';
11
+ import { createRoot, hydrateRoot } from './createRoot';
12
+ // Web root tag is preserved for re-use between refreshes.
13
+ let rootTag = null;
14
+ export default function registerRootComponent(component) {
15
+ let qualifiedComponent = component;
16
+ if (process.env.NODE_ENV !== 'production') {
17
+ const { withDevTools } = require('expo/build/launch/withDevTools');
18
+ // Add error support to the root component.
19
+ qualifiedComponent = withErrorOverlay(withDevTools(component));
20
+ }
21
+ if (Platform.OS !== 'web') {
22
+ AppRegistry.registerComponent('main', () => qualifiedComponent);
23
+ }
24
+ else if (
25
+ // Skip querying the DOM if we're in a Node.js environment.
26
+ typeof document !== 'undefined') {
27
+ let tag = document.getElementById('root');
28
+ if (!tag) {
29
+ tag = document.getElementById('main');
30
+ if (process.env.NODE_ENV !== 'production') {
31
+ // This block will be removed in production
32
+ if (tag) {
33
+ console.warn('Mounting the root React component to an HTML element with id "main" is deprecated. Use id "root" instead.');
34
+ }
35
+ }
36
+ }
37
+ if (!tag) {
38
+ throw new Error('Required HTML element with id "root" was not found in the document HTML. This is required for mounting the root React component.');
39
+ }
40
+ // Using React 18 directly because `react-native-web` still uses the old API:
41
+ // https://github.com/necolas/react-native-web/blob/e8098fd029102d7801c32c1ede792bce01808c00/packages/react-native-web/src/exports/render/index.js#L10
42
+ if (process.env.EXPO_PUBLIC_USE_STATIC) {
43
+ hydrateRoot(tag, React.createElement(qualifiedComponent));
44
+ }
45
+ else {
46
+ rootTag ??= createRoot(tag);
47
+ rootTag.render(React.createElement(qualifiedComponent));
48
+ }
49
+ }
50
+ }
51
+ //# sourceMappingURL=registerRootComponent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registerRootComponent.js","sourceRoot":"","sources":["../../../src/fork/expo/registerRootComponent.tsx"],"names":[],"mappings":"AAAA,WAAW;AACX,4FAA4F;AAC5F,4EAA4E;AAC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AM,IAAI,KAAK,CACb,kIAAkI,CACnI,CAAC;SACH;QAED,6EAA6E;QAC7E,sJAAsJ;QACtJ,IAAI,OAAO,CAAC,GAAG,CAAC,sBAAsB,EAAE;YACtC,WAAW,CAAC,GAAG,EAAE,KAAK,CAAC,aAAa,CAAC,kBAAkB,CAAC,CAAC,CAAC;SAC3D;aAAM;YACL,OAAO,KAAK,UAAU,CAAC,GAAG,CAAC,CAAC;YAC5B,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,aAAa,CAAC,kBAAkB,CAAC,CAAC,CAAC;SACzD;KACF;AACH,CAAC","sourcesContent":["// Fork of:\n// https://github.com/expo/expo/blob/main/packages/expo/src/launch/registerRootComponent.tsx\n// Originally made in Expo SDK 47 to add support for React 18 and Metro web.\nimport 'expo/build/Expo.fx';\n\n// NOTE(EvanBacon): Add Metro web support to the global runtime.\nimport '@expo/metro-runtime';\n\n// @ts-ignore: build order issue\nimport { withErrorOverlay } from '@expo/metro-runtime/error-overlay';\nimport * as React from 'react';\nimport { AppRegistry, Platform } from 'react-native';\n\nimport { createRoot, hydrateRoot } from './createRoot';\n\ntype InitialProps = {\n exp: {\n notification?: any;\n manifestString?: string;\n [key: string]: any;\n };\n shell?: boolean;\n shellManifestUrl?: string;\n [key: string]: any;\n};\n\n// Web root tag is preserved for re-use between refreshes.\nlet rootTag: import('react-dom/client').Root | null = null;\n\nexport default function registerRootComponent<P extends InitialProps>(\n component: React.ComponentType<P>\n): void {\n let qualifiedComponent = component;\n\n if (process.env.NODE_ENV !== 'production') {\n const { withDevTools } =\n require('expo/build/launch/withDevTools') as typeof import('expo/build/launch/withDevTools');\n // Add error support to the root component.\n qualifiedComponent = withErrorOverlay(withDevTools(component));\n }\n\n if (Platform.OS !== 'web') {\n AppRegistry.registerComponent('main', () => qualifiedComponent);\n } else if (\n // Skip querying the DOM if we're in a Node.js environment.\n typeof document !== 'undefined'\n ) {\n let tag = document.getElementById('root');\n\n if (!tag) {\n tag = document.getElementById('main');\n if (process.env.NODE_ENV !== 'production') {\n // This block will be removed in production\n if (tag) {\n console.warn(\n 'Mounting the root React component to an HTML element with id \"main\" is deprecated. Use id \"root\" instead.'\n );\n }\n }\n }\n\n if (!tag) {\n throw new Error(\n 'Required HTML element with id \"root\" was not found in the document HTML. This is required for mounting the root React component.'\n );\n }\n\n // Using React 18 directly because `react-native-web` still uses the old API:\n // https://github.com/necolas/react-native-web/blob/e8098fd029102d7801c32c1ede792bce01808c00/packages/react-native-web/src/exports/render/index.js#L10\n if (process.env.EXPO_PUBLIC_USE_STATIC) {\n hydrateRoot(tag, React.createElement(qualifiedComponent));\n } else {\n rootTag ??= createRoot(tag);\n rootTag.render(React.createElement(qualifiedComponent));\n }\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"extractPathFromURL.d.ts","sourceRoot":"","sources":["../../src/fork/extractPathFromURL.ts"],"names":[],"mappings":"AAwFA,wBAAgB,sBAAsB,CAAC,GAAG,GAAE,MAAW,UAGtD;AAED,wBAAgB,cAAc,CAAC,GAAG,EAAE;IAClC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,QAAQ,EAAE,MAAM,CAAC;CAClB,UAMA"}
1
+ {"version":3,"file":"extractPathFromURL.d.ts","sourceRoot":"","sources":["../../src/fork/extractPathFromURL.ts"],"names":[],"mappings":"AAqFA,wBAAgB,sBAAsB,CAAC,GAAG,GAAE,MAAW,UAGtD;AAED,wBAAgB,cAAc,CAAC,GAAG,EAAE;IAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,UAMjF"}
@@ -0,0 +1,76 @@
1
+ import Constants, { ExecutionEnvironment } from 'expo-constants';
2
+ import * as Linking from 'expo-linking';
3
+ import URL from 'url-parse';
4
+ // This is only run on native.
5
+ function extractExactPathFromURL(url) {
6
+ if (
7
+ // If a universal link / app link / web URL is used, we should use the path
8
+ // from the URL, while stripping the origin.
9
+ url.match(/^https?:\/\//)) {
10
+ const { origin, href } = new URL(url);
11
+ return href.replace(origin, '');
12
+ }
13
+ // Handle special URLs used in Expo Go: `/--/pathname` -> `pathname`
14
+ if (Constants.executionEnvironment === ExecutionEnvironment.StoreClient &&
15
+ // while not exhaustive, `exp` and `exps` are the only two schemes which
16
+ // are passed through to other apps in Expo Go.
17
+ url.match(/^exp(s)?:\/\//)) {
18
+ const pathname = url.match(/exps?:\/\/.*?\/--\/(.*)/)?.[1];
19
+ if (pathname) {
20
+ return fromDeepLink('a://' + pathname);
21
+ }
22
+ const res = Linking.parse(url);
23
+ const qs = !res.queryParams
24
+ ? ''
25
+ : Object.entries(res.queryParams)
26
+ .map(([k, v]) => `${k}=${v}`)
27
+ .join('&');
28
+ return (adjustPathname({ hostname: res.hostname, pathname: res.path || '' }) + (qs ? '?' + qs : ''));
29
+ }
30
+ // TODO: Support dev client URLs
31
+ return fromDeepLink(url);
32
+ }
33
+ /** Major hack to support the makeshift expo-development-client system. */
34
+ function isExpoDevelopmentClient(url) {
35
+ return !!url.hostname.match(/^expo-development-client$/);
36
+ }
37
+ function fromDeepLink(url) {
38
+ // This is for all standard deep links, e.g. `foobar://` where everything
39
+ // after the `://` is the path.
40
+ const res = new URL(url, true);
41
+ if (isExpoDevelopmentClient(res)) {
42
+ if (!res.query || !res.query.url) {
43
+ return '';
44
+ }
45
+ const incomingUrl = res.query.url;
46
+ return extractExactPathFromURL(decodeURI(incomingUrl));
47
+ }
48
+ const qs = !res.query
49
+ ? ''
50
+ : Object.entries(res.query)
51
+ .map(([k, v]) => `${k}=${decodeURIComponent(v)}`)
52
+ .join('&');
53
+ let results = '';
54
+ if (res.host) {
55
+ results += res.host;
56
+ }
57
+ if (res.pathname) {
58
+ results += res.pathname;
59
+ }
60
+ if (qs) {
61
+ results += '?' + qs;
62
+ }
63
+ return results;
64
+ }
65
+ export function extractExpoPathFromURL(url = '') {
66
+ // TODO: We should get rid of this, dropping specificities is not good
67
+ return extractExactPathFromURL(url).replace(/^\//, '');
68
+ }
69
+ export function adjustPathname(url) {
70
+ if (url.hostname === 'exp.host' || url.hostname === 'u.expo.dev') {
71
+ // drop the first two segments from pathname:
72
+ return url.pathname.split('/').slice(2).join('/');
73
+ }
74
+ return url.pathname;
75
+ }
76
+ //# sourceMappingURL=extractPathFromURL.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"extractPathFromURL.js","sourceRoot":"","sources":["../../src/fork/extractPathFromURL.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,EAAE,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AACjE,OAAO,KAAK,OAAO,MAAM,cAAc,CAAC;AACxC,OAAO,GAAG,MAAM,WAAW,CAAC;AAE5B,8BAA8B;AAC9B,SAAS,uBAAuB,CAAC,GAAW;IAC1C;IACE,2EAA2E;IAC3E,4CAA4C;IAC5C,GAAG,CAAC,KAAK,CAAC,cAAc,CAAC,EACzB;QACA,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC;QACtC,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;KACjC;IAED,oEAAoE;IACpE,IACE,SAAS,CAAC,oBAAoB,KAAK,oBAAoB,CAAC,WAAW;QACnE,wEAAwE;QACxE,+CAA+C;QAC/C,GAAG,CAAC,KAAK,CAAC,eAAe,CAAC,EAC1B;QACA,MAAM,QAAQ,GAAG,GAAG,CAAC,KAAK,CAAC,yBAAyB,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;QAC3D,IAAI,QAAQ,EAAE;YACZ,OAAO,YAAY,CAAC,MAAM,GAAG,QAAQ,CAAC,CAAC;SACxC;QAED,MAAM,GAAG,GAAG,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAE/B,MAAM,EAAE,GAAG,CAAC,GAAG,CAAC,WAAW;YACzB,CAAC,CAAC,EAAE;YACJ,CAAC,CAAC,MAAM,CAAC,OAA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CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,kBAAkB,CAAC,CAAC,CAAC,EAAE,CAAC;aAChD,IAAI,CAAC,GAAG,CAAC,CAAC;IAEjB,IAAI,OAAO,GAAG,EAAE,CAAC;IAEjB,IAAI,GAAG,CAAC,IAAI,EAAE;QACZ,OAAO,IAAI,GAAG,CAAC,IAAI,CAAC;KACrB;IAED,IAAI,GAAG,CAAC,QAAQ,EAAE;QAChB,OAAO,IAAI,GAAG,CAAC,QAAQ,CAAC;KACzB;IAED,IAAI,EAAE,EAAE;QACN,OAAO,IAAI,GAAG,GAAG,EAAE,CAAC;KACrB;IAED,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,MAAM,UAAU,sBAAsB,CAAC,MAAc,EAAE;IACrD,sEAAsE;IACtE,OAAO,uBAAuB,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;AACzD,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,GAAmD;IAChF,IAAI,GAAG,CAAC,QAAQ,KAAK,UAAU,IAAI,GAAG,CAAC,QAAQ,KAAK,YAAY,EAAE;QAChE,6CAA6C;QAC7C,OAAO,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;KACnD;IACD,OAAO,GAAG,CAAC,QAAQ,CAAC;AACtB,CAAC","sourcesContent":["import Constants, { ExecutionEnvironment } from 'expo-constants';\nimport * as Linking from 'expo-linking';\nimport URL from 'url-parse';\n\n// This is only run on native.\nfunction extractExactPathFromURL(url: string): string {\n if (\n // If a universal link / app link / web URL is used, we should use the path\n // from the URL, while stripping the origin.\n url.match(/^https?:\\/\\//)\n ) {\n const { origin, href } = new URL(url);\n return href.replace(origin, '');\n }\n\n // Handle special URLs used in Expo Go: `/--/pathname` -> `pathname`\n if (\n Constants.executionEnvironment === ExecutionEnvironment.StoreClient &&\n // while not exhaustive, `exp` and `exps` are the only two schemes which\n // are passed through to other apps in Expo Go.\n url.match(/^exp(s)?:\\/\\//)\n ) {\n const pathname = url.match(/exps?:\\/\\/.*?\\/--\\/(.*)/)?.[1];\n if (pathname) {\n return fromDeepLink('a://' + pathname);\n }\n\n const res = Linking.parse(url);\n\n const qs = !res.queryParams\n ? ''\n : Object.entries(res.queryParams)\n .map(([k, v]) => `${k}=${v}`)\n .join('&');\n return (\n adjustPathname({ hostname: res.hostname, pathname: res.path || '' }) + (qs ? '?' + qs : '')\n );\n }\n\n // TODO: Support dev client URLs\n\n return fromDeepLink(url);\n}\n\n/** Major hack to support the makeshift expo-development-client system. */\nfunction isExpoDevelopmentClient(url: URL<Record<string, string | undefined>>): boolean {\n return !!url.hostname.match(/^expo-development-client$/);\n}\n\nfunction fromDeepLink(url: string): string {\n // This is for all standard deep links, e.g. `foobar://` where everything\n // after the `://` is the path.\n const res = new URL(url, true);\n\n if (isExpoDevelopmentClient(res)) {\n if (!res.query || !res.query.url) {\n return '';\n }\n const incomingUrl = res.query.url;\n return extractExactPathFromURL(decodeURI(incomingUrl));\n }\n\n const qs = !res.query\n ? ''\n : Object.entries(res.query as Record<string, string>)\n .map(([k, v]) => `${k}=${decodeURIComponent(v)}`)\n .join('&');\n\n let results = '';\n\n if (res.host) {\n results += res.host;\n }\n\n if (res.pathname) {\n results += res.pathname;\n }\n\n if (qs) {\n results += '?' + qs;\n }\n\n return results;\n}\n\nexport function extractExpoPathFromURL(url: string = '') {\n // TODO: We should get rid of this, dropping specificities is not good\n return extractExactPathFromURL(url).replace(/^\\//, '');\n}\n\nexport function adjustPathname(url: { hostname?: string | null; pathname: string }) {\n if (url.hostname === 'exp.host' || url.hostname === 'u.expo.dev') {\n // drop the first two segments from pathname:\n return url.pathname.split('/').slice(2).join('/');\n }\n return url.pathname;\n}\n"]}
@@ -1,4 +1,4 @@
1
- import type { InitialState } from "@react-navigation/routers";
1
+ import type { InitialState } from '@react-navigation/routers';
2
2
  export declare function findFocusedRoute(state: InitialState): (Omit<import("@react-navigation/routers").Route<string, object | undefined>, "key"> & {
3
3
  state?: Readonly<Partial<Omit<Readonly<{
4
4
  key: string;
@@ -0,0 +1,10 @@
1
+ // Forked so we can access without importing any React Native code in Node.js environments.
2
+ export function findFocusedRoute(state) {
3
+ let current = state;
4
+ while (current?.routes[current.index ?? 0].state != null) {
5
+ current = current.routes[current.index ?? 0].state;
6
+ }
7
+ const route = current?.routes[current?.index ?? 0];
8
+ return route;
9
+ }
10
+ //# sourceMappingURL=findFocusedRoute.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"findFocusedRoute.js","sourceRoot":"","sources":["../../src/fork/findFocusedRoute.tsx"],"names":[],"mappings":"AAAA,2FAA2F;AAI3F,MAAM,UAAU,gBAAgB,CAAC,KAAmB;IAClD,IAAI,OAAO,GAA6B,KAAK,CAAC;IAE9C,OAAO,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,IAAI,EAAE;QACxD,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC;KACpD;IAED,MAAM,KAAK,GAAG,OAAO,EAAE,MAAM,CAAC,OAAO,EAAE,KAAK,IAAI,CAAC,CAAC,CAAC;IAEnD,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["// Forked so we can access without importing any React Native code in Node.js environments.\n\nimport type { InitialState } from '@react-navigation/routers';\n\nexport function findFocusedRoute(state: InitialState) {\n let current: InitialState | undefined = state;\n\n while (current?.routes[current.index ?? 0].state != null) {\n current = current.routes[current.index ?? 0].state;\n }\n\n const route = current?.routes[current?.index ?? 0];\n\n return route;\n}\n"]}
@@ -1,10 +1,10 @@
1
- import { PathConfigMap } from "@react-navigation/core";
2
- import type { NavigationState, PartialState } from "@react-navigation/routers";
1
+ import { PathConfigMap } from '@react-navigation/core';
2
+ import type { NavigationState, PartialState } from '@react-navigation/routers';
3
3
  type Options<ParamList extends object> = {
4
4
  initialRouteName?: string;
5
5
  screens: PathConfigMap<ParamList>;
6
6
  };
7
- export type State = NavigationState | Omit<PartialState<NavigationState>, "stale">;
7
+ export type State = NavigationState | Omit<PartialState<NavigationState>, 'stale'>;
8
8
  /**
9
9
  * Utility to serialize a navigation state object to a path string.
10
10
  *
@@ -1 +1 @@
1
- {"version":3,"file":"getPathFromState.d.ts","sourceRoot":"","sources":["../../src/fork/getPathFromState.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,aAAa,EAEd,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EACV,eAAe,EACf,YAAY,EAEb,MAAM,2BAA2B,CAAC;AASnC,KAAK,OAAO,CAAC,SAAS,SAAS,MAAM,IAAI;IACvC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,OAAO,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC;CACnC,CAAC;AAEF,MAAM,MAAM,KAAK,GACb,eAAe,GACf,IAAI,CAAC,YAAY,CAAC,eAAe,CAAC,EAAE,OAAO,CAAC,CAAC;AAkEjD;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,SAAS,SAAS,MAAM,EAC/D,KAAK,EAAE,KAAK,EACZ,QAAQ,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,GAAG;IAC9B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,qBAAqB,CAAC,EAAE,OAAO,CAAC;CACjC,GACA,MAAM,CAER;AAED,wBAAgB,oBAAoB,CAAC,SAAS,SAAS,MAAM,EAC3D,KAAK,EAAE,KAAK,EACZ,QAAQ,GAAE,OAAO,CAAC,SAAS,CAAC,GAAG;IAC7B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,qBAAqB,CAAC,EAAE,OAAO,CAAC;CACF;;;EAyBjC;AAsBD,wBAAgB,SAAS,CAAC,CAAC,EAAE,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