expo-router 3.1.0 → 3.1.1

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 (199) hide show
  1. package/_ctx.android.js +1 -1
  2. package/_ctx.ios.js +1 -1
  3. package/_ctx.js +6 -1
  4. package/_ctx.web.js +1 -1
  5. package/babel.js +0 -18
  6. package/build/ExpoRoot.d.ts.map +1 -1
  7. package/build/ExpoRoot.js +64 -56
  8. package/build/ExpoRoot.js.map +1 -1
  9. package/build/LocationProvider.d.ts +2 -2
  10. package/build/LocationProvider.d.ts.map +1 -1
  11. package/build/LocationProvider.js +11 -5
  12. package/build/LocationProvider.js.map +1 -1
  13. package/build/Route.d.ts +2 -2
  14. package/build/Route.d.ts.map +1 -1
  15. package/build/Route.js +41 -55
  16. package/build/Route.js.map +1 -1
  17. package/build/exports.d.ts +1 -1
  18. package/build/exports.d.ts.map +1 -1
  19. package/build/exports.js +34 -12
  20. package/build/exports.js.map +1 -1
  21. package/build/fork/NavigationContainer.js +4 -2
  22. package/build/fork/NavigationContainer.js.map +1 -1
  23. package/build/fork/NavigationContainer.native.js +48 -20
  24. package/build/fork/NavigationContainer.native.js.map +1 -1
  25. package/build/fork/extractPathFromURL.js +39 -8
  26. package/build/fork/extractPathFromURL.js.map +1 -1
  27. package/build/fork/findFocusedRoute.js +5 -1
  28. package/build/fork/findFocusedRoute.js.map +1 -1
  29. package/build/fork/getPathFromState.d.ts +1 -0
  30. package/build/fork/getPathFromState.d.ts.map +1 -1
  31. package/build/fork/getPathFromState.js +59 -14
  32. package/build/fork/getPathFromState.js.map +1 -1
  33. package/build/fork/getStateFromPath.d.ts +2 -1
  34. package/build/fork/getStateFromPath.d.ts.map +1 -1
  35. package/build/fork/getStateFromPath.js +73 -21
  36. package/build/fork/getStateFromPath.js.map +1 -1
  37. package/build/fork/react-native-web-container.js +3 -1
  38. package/build/fork/react-native-web-container.js.map +1 -1
  39. package/build/fork/useLinking.js +7 -2
  40. package/build/fork/useLinking.js.map +1 -1
  41. package/build/fork/useLinking.native.js +36 -10
  42. package/build/fork/useLinking.native.js.map +1 -1
  43. package/build/fork/validatePathConfig.js +4 -1
  44. package/build/fork/validatePathConfig.js.map +1 -1
  45. package/build/getDevServer/index.js +13 -6
  46. package/build/getDevServer/index.js.map +1 -1
  47. package/build/getDevServer/index.native.js +4 -1
  48. package/build/getDevServer/index.native.js.map +1 -1
  49. package/build/getLinkingConfig.js +19 -14
  50. package/build/getLinkingConfig.js.map +1 -1
  51. package/build/getReactNavigationConfig.js +10 -5
  52. package/build/getReactNavigationConfig.js.map +1 -1
  53. package/build/getRoutes.d.ts +2 -0
  54. package/build/getRoutes.d.ts.map +1 -1
  55. package/build/getRoutes.js +56 -27
  56. package/build/getRoutes.js.map +1 -1
  57. package/build/getServerManifest.d.ts +55 -0
  58. package/build/getServerManifest.d.ts.map +1 -0
  59. package/build/getServerManifest.js +159 -0
  60. package/build/getServerManifest.js.map +1 -0
  61. package/build/global-state/router-store.js +53 -45
  62. package/build/global-state/router-store.js.map +1 -1
  63. package/build/global-state/routing.js +62 -29
  64. package/build/global-state/routing.js.map +1 -1
  65. package/build/global-state/sort-routes.js +7 -3
  66. package/build/global-state/sort-routes.js.map +1 -1
  67. package/build/head/ExpoHead.android.js +10 -3
  68. package/build/head/ExpoHead.android.js.map +1 -1
  69. package/build/head/ExpoHead.ios.js +41 -35
  70. package/build/head/ExpoHead.ios.js.map +1 -1
  71. package/build/head/ExpoHead.js +12 -5
  72. package/build/head/ExpoHead.js.map +1 -1
  73. package/build/head/ExpoHeadModule.js +4 -1
  74. package/build/head/ExpoHeadModule.js.map +1 -1
  75. package/build/head/ExpoHeadModule.native.js +31 -5
  76. package/build/head/ExpoHeadModule.native.js.map +1 -1
  77. package/build/head/index.js +17 -1
  78. package/build/head/index.js.map +1 -1
  79. package/build/head/url.js +12 -5
  80. package/build/head/url.js.map +1 -1
  81. package/build/hooks.d.ts +0 -3
  82. package/build/hooks.d.ts.map +1 -1
  83. package/build/hooks.js +41 -36
  84. package/build/hooks.js.map +1 -1
  85. package/build/imperative-api.js +10 -7
  86. package/build/imperative-api.js.map +1 -1
  87. package/build/import-mode/index.android.js +3 -1
  88. package/build/import-mode/index.android.js.map +1 -1
  89. package/build/import-mode/index.ios.js +3 -1
  90. package/build/import-mode/index.ios.js.map +1 -1
  91. package/build/import-mode/index.js +3 -1
  92. package/build/import-mode/index.js.map +1 -1
  93. package/build/import-mode/index.web.js +3 -1
  94. package/build/import-mode/index.web.js.map +1 -1
  95. package/build/index.js +22 -3
  96. package/build/index.js.map +1 -1
  97. package/build/layouts/Drawer.js +8 -5
  98. package/build/layouts/Drawer.js.map +1 -1
  99. package/build/layouts/Stack.js +8 -5
  100. package/build/layouts/Stack.js.map +1 -1
  101. package/build/layouts/Tabs.js +16 -10
  102. package/build/layouts/Tabs.js.map +1 -1
  103. package/build/layouts/withLayoutContext.js +22 -14
  104. package/build/layouts/withLayoutContext.js.map +1 -1
  105. package/build/link/Link.js +46 -16
  106. package/build/link/Link.js.map +1 -1
  107. package/build/link/href.js +6 -2
  108. package/build/link/href.js.map +1 -1
  109. package/build/link/linking.js +48 -15
  110. package/build/link/linking.js.map +1 -1
  111. package/build/link/path.js +5 -1
  112. package/build/link/path.js.map +1 -1
  113. package/build/link/stateOperations.js +11 -4
  114. package/build/link/stateOperations.js.map +1 -1
  115. package/build/link/useLinkToPathProps.d.ts.map +1 -1
  116. package/build/link/useLinkToPathProps.js +12 -8
  117. package/build/link/useLinkToPathProps.js.map +1 -1
  118. package/build/link/useLoadedNavigation.js +20 -15
  119. package/build/link/useLoadedNavigation.js.map +1 -1
  120. package/build/loadStaticParamsAsync.js +5 -1
  121. package/build/loadStaticParamsAsync.js.map +1 -1
  122. package/build/matchers.js +22 -10
  123. package/build/matchers.js.map +1 -1
  124. package/build/onboard/Tutorial.js +37 -30
  125. package/build/onboard/Tutorial.js.map +1 -1
  126. package/build/onboard/createEntryFile.js +9 -4
  127. package/build/onboard/createEntryFile.js.map +1 -1
  128. package/build/primitives.js +6 -2
  129. package/build/primitives.js.map +1 -1
  130. package/build/qualified-entry.js +14 -7
  131. package/build/qualified-entry.js.map +1 -1
  132. package/build/renderRootComponent.js +18 -11
  133. package/build/renderRootComponent.js.map +1 -1
  134. package/build/routes-manifest.d.ts +14 -0
  135. package/build/routes-manifest.d.ts.map +1 -0
  136. package/build/routes-manifest.js +27 -0
  137. package/build/routes-manifest.js.map +1 -0
  138. package/build/sortRoutes.d.ts +4 -0
  139. package/build/sortRoutes.d.ts.map +1 -0
  140. package/build/sortRoutes.js +53 -0
  141. package/build/sortRoutes.js.map +1 -0
  142. package/build/static/getRootComponent.js +8 -4
  143. package/build/static/getRootComponent.js.map +1 -1
  144. package/build/static/html.js +19 -11
  145. package/build/static/html.js.map +1 -1
  146. package/build/static/renderStaticContent.d.ts.map +1 -1
  147. package/build/static/renderStaticContent.js +63 -30
  148. package/build/static/renderStaticContent.js.map +1 -1
  149. package/build/testing-library/context-stubs.js +14 -6
  150. package/build/testing-library/context-stubs.js.map +1 -1
  151. package/build/testing-library/expect.js +10 -5
  152. package/build/testing-library/expect.js.map +1 -1
  153. package/build/testing-library/index.js +41 -20
  154. package/build/testing-library/index.js.map +1 -1
  155. package/build/testing-library/mocks.js +6 -3
  156. package/build/testing-library/mocks.js.map +1 -1
  157. package/build/testing-library/require-context-ponyfill.js +14 -8
  158. package/build/testing-library/require-context-ponyfill.js.map +1 -1
  159. package/build/types.js +2 -1
  160. package/build/useDeprecated.js +11 -6
  161. package/build/useDeprecated.js.map +1 -1
  162. package/build/useFocusEffect.js +31 -4
  163. package/build/useFocusEffect.js.map +1 -1
  164. package/build/useNavigation.js +20 -12
  165. package/build/useNavigation.js.map +1 -1
  166. package/build/useScreens.js +40 -31
  167. package/build/useScreens.js.map +1 -1
  168. package/build/utils/mockState.js +10 -5
  169. package/build/utils/mockState.js.map +1 -1
  170. package/build/utils/url.js +5 -1
  171. package/build/utils/url.js.map +1 -1
  172. package/build/views/EmptyRoute.js +14 -7
  173. package/build/views/EmptyRoute.js.map +1 -1
  174. package/build/views/ErrorBoundary.js +37 -30
  175. package/build/views/ErrorBoundary.js.map +1 -1
  176. package/build/views/Navigator.js +58 -26
  177. package/build/views/Navigator.js.map +1 -1
  178. package/build/views/Pressable.js +5 -2
  179. package/build/views/Pressable.js.map +1 -1
  180. package/build/views/Screen.d.ts +1 -3
  181. package/build/views/Screen.d.ts.map +1 -1
  182. package/build/views/Screen.js +12 -18
  183. package/build/views/Screen.js.map +1 -1
  184. package/build/views/Sitemap.js +48 -40
  185. package/build/views/Sitemap.js.map +1 -1
  186. package/build/views/Splash.js +41 -12
  187. package/build/views/Splash.js.map +1 -1
  188. package/build/views/SuspenseFallback.js +12 -5
  189. package/build/views/SuspenseFallback.js.map +1 -1
  190. package/build/views/Toast.js +33 -25
  191. package/build/views/Toast.js.map +1 -1
  192. package/build/views/Try.js +12 -5
  193. package/build/views/Try.js.map +1 -1
  194. package/build/views/Unmatched.js +30 -23
  195. package/build/views/Unmatched.js.map +1 -1
  196. package/package.json +7 -5
  197. package/server.d.ts +10 -0
  198. package/server.js +3 -0
  199. package/types/global.d.ts +14 -5
package/_ctx.android.js CHANGED
@@ -1,6 +1,6 @@
1
1
  export const ctx = require.context(
2
2
  process.env.EXPO_ROUTER_APP_ROOT,
3
3
  true,
4
- /.*/,
4
+ /^(?:\.\/)(?!(?:(?:(?:.*\+api)|(?:\+html)))\.[tj]sx?$).*\.[tj]sx?$/,
5
5
  process.env.EXPO_ROUTER_IMPORT_MODE_ANDROID
6
6
  );
package/_ctx.ios.js CHANGED
@@ -1,6 +1,6 @@
1
1
  export const ctx = require.context(
2
2
  process.env.EXPO_ROUTER_APP_ROOT,
3
3
  true,
4
- /.*/,
4
+ /^(?:\.\/)(?!(?:(?:(?:.*\+api)|(?:\+html)))\.[tj]sx?$).*\.[tj]sx?$/,
5
5
  process.env.EXPO_ROUTER_IMPORT_MODE_IOS
6
6
  );
package/_ctx.js CHANGED
@@ -1 +1,6 @@
1
- export const ctx = require.context(process.env.EXPO_ROUTER_APP_ROOT, true, /.*/);
1
+ export const ctx = require.context(
2
+ process.env.EXPO_ROUTER_APP_ROOT,
3
+ true,
4
+ // Ignore root `./+html.js` and API route files `./generate+api.tsx`.
5
+ /^(?:\.\/)(?!(?:(?:(?:.*\+api)|(?:\+html)))\.[tj]sx?$).*\.[tj]sx?$/
6
+ );
package/_ctx.web.js CHANGED
@@ -1,6 +1,6 @@
1
1
  export const ctx = require.context(
2
2
  process.env.EXPO_ROUTER_APP_ROOT,
3
3
  true,
4
- /.*/,
4
+ /^(?:\.\/)(?!(?:(?:(?:.*\+api)|(?:\+html)))\.[tj]sx?$).*\.[tj]sx?$/,
5
5
  process.env.EXPO_ROUTER_IMPORT_MODE_WEB
6
6
  );
package/babel.js CHANGED
@@ -122,29 +122,11 @@ function getExpoRouterAbsoluteAppRoot(projectRoot) {
122
122
 
123
123
  module.exports = function (api) {
124
124
  const { types: t } = api;
125
- const getRelPath = (state) => './' + nodePath.relative(state.file.opts.root, state.filename);
126
125
 
127
126
  const platform = api.caller((caller) => caller?.platform);
128
127
  return {
129
128
  name: 'expo-router',
130
129
  visitor: {
131
- // Add support for Node.js __filename
132
- Identifier(path, state) {
133
- if (path.node.name === '__filename') {
134
- path.replaceWith(
135
- t.stringLiteral(
136
- // `/index.js` is the value used by Webpack.
137
- getRelPath(state)
138
- )
139
- );
140
- }
141
- // Add support for Node.js `__dirname`.
142
- // This static value comes from Webpack somewhere.
143
- if (path.node.name === '__dirname') {
144
- path.replaceWith(t.stringLiteral('/'));
145
- }
146
- },
147
-
148
130
  // Convert `process.env.EXPO_ROUTER_APP_ROOT` to a string literal
149
131
  MemberExpression(path, state) {
150
132
  if (
@@ -1 +1 @@
1
- {"version":3,"file":"ExpoRoot.d.ts","sourceRoot":"","sources":["../src/ExpoRoot.tsx"],"names":[],"mappings":"AAEA,OAAc,EAAE,iBAAiB,EAAE,SAAS,EAAY,MAAM,OAAO,CAAC;AAMtE,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAGzC,MAAM,MAAM,aAAa,GAAG;IAC1B,OAAO,EAAE,cAAc,CAAC;IACxB,QAAQ,CAAC,EAAE,GAAG,CAAC;IACf,OAAO,CAAC,EAAE,iBAAiB,CAAC;QAAE,QAAQ,EAAE,SAAS,CAAA;KAAE,CAAC,CAAC;CACtD,CAAC;AAoCF,wBAAgB,QAAQ,CAAC,EAAE,OAAO,EAAE,aAAwB,EAAE,GAAG,KAAK,EAAE,EAAE,aAAa,eAuBtF"}
1
+ {"version":3,"file":"ExpoRoot.d.ts","sourceRoot":"","sources":["../src/ExpoRoot.tsx"],"names":[],"mappings":"AAEA,OAAc,EAAE,iBAAiB,EAAE,SAAS,EAAY,MAAM,OAAO,CAAC;AAMtE,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAGzC,MAAM,MAAM,aAAa,GAAG;IAC1B,OAAO,EAAE,cAAc,CAAC;IACxB,QAAQ,CAAC,EAAE,GAAG,CAAC;IACf,OAAO,CAAC,EAAE,iBAAiB,CAAC;QAAE,QAAQ,EAAE,SAAS,CAAA;KAAE,CAAC,CAAC;CACtD,CAAC;AAgBF,wBAAgB,QAAQ,CAAC,EAAE,OAAO,EAAE,aAAwB,EAAE,GAAG,KAAK,EAAE,EAAE,aAAa,eAqBtF"}
package/build/ExpoRoot.js CHANGED
@@ -1,68 +1,79 @@
1
- import Constants from 'expo-constants';
2
- import { StatusBar } from 'expo-status-bar';
3
- import React, { Fragment } from 'react';
4
- import { Platform, StyleSheet } from 'react-native';
5
- import { SafeAreaProvider } from 'react-native-safe-area-context';
6
- import UpstreamNavigationContainer from './fork/NavigationContainer';
7
- import { useInitializeExpoRouter } from './global-state/router-store';
8
- import { SplashScreen } from './views/Splash';
9
- function getGestureHandlerRootView() {
10
- try {
11
- const { GestureHandlerRootView } = require('react-native-gesture-handler');
12
- if (!GestureHandlerRootView) {
13
- return React.Fragment;
14
- }
15
- // eslint-disable-next-line no-inner-declarations
16
- function GestureHandler(props) {
17
- return React.createElement(GestureHandlerRootView, { style: styles.gesture, ...props });
18
- }
19
- if (process.env.NODE_ENV === 'development') {
20
- // @ts-expect-error
21
- GestureHandler.displayName = 'GestureHandlerRootView';
22
- }
23
- return GestureHandler;
24
- }
25
- catch {
26
- return React.Fragment;
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
27
7
  }
28
- }
29
- const GestureHandlerRootView = getGestureHandlerRootView();
30
- const INITIAL_METRICS = {
31
- frame: { x: 0, y: 0, width: 0, height: 0 },
32
- insets: { top: 0, left: 0, right: 0, bottom: 0 },
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ var __importDefault = (this && this.__importDefault) || function (mod) {
26
+ return (mod && mod.__esModule) ? mod : { "default": mod };
33
27
  };
34
- const hasViewControllerBasedStatusBarAppearance = Platform.OS === 'ios' &&
35
- !!Constants.expoConfig?.ios?.infoPlist?.UIViewControllerBasedStatusBarAppearance;
36
- export function ExpoRoot({ wrapper: ParentWrapper = Fragment, ...props }) {
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.ExpoRoot = void 0;
30
+ const expo_constants_1 = __importDefault(require("expo-constants"));
31
+ const expo_status_bar_1 = require("expo-status-bar");
32
+ const react_1 = __importStar(require("react"));
33
+ const react_native_1 = require("react-native");
34
+ const react_native_safe_area_context_1 = require("react-native-safe-area-context");
35
+ const NavigationContainer_1 = __importDefault(require("./fork/NavigationContainer"));
36
+ const router_store_1 = require("./global-state/router-store");
37
+ const Splash_1 = require("./views/Splash");
38
+ const isTestEnv = process.env.NODE_ENV === 'test';
39
+ const INITIAL_METRICS = react_native_1.Platform.OS === 'web' || isTestEnv
40
+ ? {
41
+ frame: { x: 0, y: 0, width: 0, height: 0 },
42
+ insets: { top: 0, left: 0, right: 0, bottom: 0 },
43
+ }
44
+ : undefined;
45
+ const hasViewControllerBasedStatusBarAppearance = react_native_1.Platform.OS === 'ios' &&
46
+ !!expo_constants_1.default.expoConfig?.ios?.infoPlist?.UIViewControllerBasedStatusBarAppearance;
47
+ function ExpoRoot({ wrapper: ParentWrapper = react_1.Fragment, ...props }) {
37
48
  /*
38
49
  * Due to static rendering we need to wrap these top level views in second wrapper
39
- * View's like <GestureHandlerRootView /> generate a <div> so if the parent wrapper
50
+ * View's like <SafeAreaProvider /> generate a <div> so if the parent wrapper
40
51
  * is a HTML document, we need to ensure its inside the <body>
41
52
  */
42
53
  const wrapper = ({ children }) => {
43
- return (React.createElement(ParentWrapper, null,
44
- React.createElement(GestureHandlerRootView, null,
45
- React.createElement(SafeAreaProvider
54
+ return (react_1.default.createElement(ParentWrapper, null,
55
+ react_1.default.createElement(react_native_safe_area_context_1.SafeAreaProvider
56
+ // SSR support
57
+ , {
46
58
  // SSR support
47
- , {
48
- // SSR support
49
- initialMetrics: INITIAL_METRICS },
50
- children,
51
- !hasViewControllerBasedStatusBarAppearance && React.createElement(StatusBar, { style: "auto" })))));
59
+ initialMetrics: INITIAL_METRICS },
60
+ children,
61
+ !hasViewControllerBasedStatusBarAppearance && react_1.default.createElement(expo_status_bar_1.StatusBar, { style: "auto" }))));
52
62
  };
53
- return React.createElement(ContextNavigator, { ...props, wrapper: wrapper });
63
+ return react_1.default.createElement(ContextNavigator, { ...props, wrapper: wrapper });
54
64
  }
55
- const initialUrl = Platform.OS === 'web' && typeof window !== 'undefined'
65
+ exports.ExpoRoot = ExpoRoot;
66
+ const initialUrl = react_native_1.Platform.OS === 'web' && typeof window !== 'undefined'
56
67
  ? new URL(window.location.href)
57
68
  : undefined;
58
- function ContextNavigator({ context, location: initialLocation = initialUrl, wrapper: WrapperComponent = Fragment, }) {
59
- const store = useInitializeExpoRouter(context, initialLocation);
69
+ function ContextNavigator({ context, location: initialLocation = initialUrl, wrapper: WrapperComponent = react_1.Fragment, }) {
70
+ const store = (0, router_store_1.useInitializeExpoRouter)(context, initialLocation);
60
71
  if (store.shouldShowTutorial()) {
61
- SplashScreen.hideAsync();
72
+ Splash_1.SplashScreen.hideAsync();
62
73
  if (process.env.NODE_ENV === 'development') {
63
74
  const Tutorial = require('./onboard/Tutorial').Tutorial;
64
- return (React.createElement(WrapperComponent, null,
65
- React.createElement(Tutorial, null)));
75
+ return (react_1.default.createElement(WrapperComponent, null,
76
+ react_1.default.createElement(Tutorial, null)));
66
77
  }
67
78
  else {
68
79
  // Ensure tutorial styles are stripped in production.
@@ -70,13 +81,10 @@ function ContextNavigator({ context, location: initialLocation = initialUrl, wra
70
81
  }
71
82
  }
72
83
  const Component = store.rootComponent;
73
- return (React.createElement(UpstreamNavigationContainer, { ref: store.navigationRef, initialState: store.initialState, linking: store.linking, documentTitle: {
84
+ return (react_1.default.createElement(NavigationContainer_1.default, { ref: store.navigationRef, initialState: store.initialState, linking: store.linking, documentTitle: {
74
85
  enabled: false,
75
86
  } },
76
- React.createElement(WrapperComponent, null,
77
- React.createElement(Component, null))));
87
+ react_1.default.createElement(WrapperComponent, null,
88
+ react_1.default.createElement(Component, null))));
78
89
  }
79
- const styles = StyleSheet.create({
80
- gesture: { flex: 1 },
81
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K,CAAC,kBAAkB,EAAE,EAAE;QAC9B,YAAY,CAAC,SAAS,EAAE,CAAC;QACzB,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,aAAa,EAAE;YAC1C,MAAM,QAAQ,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC,QAAQ,CAAC;YACxD,OAAO,CACL,oBAAC,gBAAgB;gBACf,oBAAC,QAAQ,OAAG,CACK,CACpB,CAAC;SACH;aAAM;YACL,qDAAqD;YACrD,OAAO,IAAI,CAAC;SACb;KACF;IAED,MAAM,SAAS,GAAG,KAAK,CAAC,aAAa,CAAC;IAEtC,OAAO,CACL,oBAAC,2BAA2B,IAC1B,GAAG,EAAE,KAAK,CAAC,aAAa,EACxB,YAAY,EAAE,KAAK,CAAC,YAAY,EAChC,OAAO,EAAE,KAAK,CAAC,OAAO,EACtB,aAAa,EAAE;YACb,OAAO,EAAE,KAAK;SACf;QACD,oBAAC,gBAAgB;YACf,oBAAC,SAAS,OAAG,CACI,CACS,CAC/B,CAAC;AACJ,CAAC;AAED,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,OAAO,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE;CACrB,CAAC,CAAC","sourcesContent":["import Constants from 'expo-constants';\nimport { StatusBar } from 'expo-status-bar';\nimport React, { FunctionComponent, ReactNode, Fragment } from 'react';\nimport { Platform, StyleSheet } from 'react-native';\nimport { SafeAreaProvider } from 'react-native-safe-area-context';\n\nimport UpstreamNavigationContainer from './fork/NavigationContainer';\nimport { useInitializeExpoRouter } from './global-state/router-store';\nimport { RequireContext } from './types';\nimport { SplashScreen } from './views/Splash';\n\nexport type ExpoRootProps = {\n context: RequireContext;\n location?: URL;\n wrapper?: FunctionComponent<{ children: ReactNode }>;\n};\n\nfunction getGestureHandlerRootView() {\n try {\n const { GestureHandlerRootView } =\n require('react-native-gesture-handler') as typeof import('react-native-gesture-handler');\n\n if (!GestureHandlerRootView) {\n return React.Fragment;\n }\n\n // eslint-disable-next-line no-inner-declarations\n function GestureHandler(props: any) {\n return <GestureHandlerRootView style={styles.gesture} {...props} />;\n }\n if (process.env.NODE_ENV === 'development') {\n // @ts-expect-error\n GestureHandler.displayName = 'GestureHandlerRootView';\n }\n return GestureHandler;\n } catch {\n return React.Fragment;\n }\n}\n\nconst GestureHandlerRootView = getGestureHandlerRootView();\n\nconst INITIAL_METRICS = {\n frame: { x: 0, y: 0, width: 0, height: 0 },\n insets: { top: 0, left: 0, right: 0, bottom: 0 },\n};\n\nconst hasViewControllerBasedStatusBarAppearance =\n Platform.OS === 'ios' &&\n !!Constants.expoConfig?.ios?.infoPlist?.UIViewControllerBasedStatusBarAppearance;\n\nexport function ExpoRoot({ wrapper: ParentWrapper = Fragment, ...props }: ExpoRootProps) {\n /*\n * Due to static rendering we need to wrap these top level views in second wrapper\n * View's like <GestureHandlerRootView /> generate a <div> so if the parent wrapper\n * is a HTML document, we need to ensure its inside the <body>\n */\n const wrapper = ({ children }) => {\n return (\n <ParentWrapper>\n <GestureHandlerRootView>\n <SafeAreaProvider\n // SSR support\n initialMetrics={INITIAL_METRICS}>\n {children}\n {/* Users can override this by adding another StatusBar element anywhere higher in the component tree. */}\n {!hasViewControllerBasedStatusBarAppearance && <StatusBar style=\"auto\" />}\n </SafeAreaProvider>\n </GestureHandlerRootView>\n </ParentWrapper>\n );\n };\n\n return <ContextNavigator {...props} wrapper={wrapper} />;\n}\n\nconst initialUrl =\n Platform.OS === 'web' && typeof window !== 'undefined'\n ? new URL(window.location.href)\n : undefined;\n\nfunction ContextNavigator({\n context,\n location: initialLocation = initialUrl,\n wrapper: WrapperComponent = Fragment,\n}: ExpoRootProps) {\n const store = useInitializeExpoRouter(context, initialLocation);\n\n if (store.shouldShowTutorial()) {\n SplashScreen.hideAsync();\n if (process.env.NODE_ENV === 'development') {\n const Tutorial = require('./onboard/Tutorial').Tutorial;\n return (\n <WrapperComponent>\n <Tutorial />\n </WrapperComponent>\n );\n } else {\n // Ensure tutorial styles are stripped in production.\n return null;\n }\n }\n\n const Component = store.rootComponent;\n\n return (\n <UpstreamNavigationContainer\n ref={store.navigationRef}\n initialState={store.initialState}\n linking={store.linking}\n documentTitle={{\n enabled: false,\n }}>\n <WrapperComponent>\n <Component />\n </WrapperComponent>\n </UpstreamNavigationContainer>\n );\n}\n\nconst styles = StyleSheet.create({\n gesture: { flex: 1 },\n});\n"]}
1
+ {"version":3,"file":"ExpoRoot.js","sourceRoot":"","sources":["../src/ExpoRoot.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oEAAuC;AACvC,qDAA4C;AAC5C,+CAAsE;AACtE,+CAAwC;AACxC,mFAAkE;AAElE,qFAAqE;AACrE,8DAAsE;AAEtE,2CAA8C;AAQ9C,MAAM,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,MAAM,CAAC;AAElD,MAAM,eAAe,GACnB,uBAAQ,CAAC,EAAE,KAAK,KAAK,IAAI,SAAS;IAChC,CAAC,CAAC;QACE,KAAK,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE;QAC1C,MAAM,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE;KACjD;IACH,CAAC,CAAC,SAAS,CAAC;AAEhB,MAAM,yCAAyC,GAC7C,uBAAQ,CAAC,EAAE,KAAK,KAAK;IACrB,CAAC,CAAC,wBAAS,CAAC,UAAU,EAAE,GAAG,EAAE,SAAS,EAAE,wCAAwC,CAAC;AAEnF,SAAgB,QAAQ,CAAC,EAAE,OAAO,EAAE,aAAa,GAAG,gBAAQ,EAAE,GAAG,KAAK,EAAiB;IACrF;;;;OAIG;IACH,MAAM,OAAO,GAAG,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;QAC/B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AE,KAAK,CAAC,OAAO,EACtB,aAAa,EAAE;YACb,OAAO,EAAE,KAAK;SACf;QACD,8BAAC,gBAAgB;YACf,8BAAC,SAAS,OAAG,CACI,CACS,CAC/B,CAAC;AACJ,CAAC","sourcesContent":["import Constants from 'expo-constants';\nimport { StatusBar } from 'expo-status-bar';\nimport React, { FunctionComponent, ReactNode, Fragment } from 'react';\nimport { Platform } from 'react-native';\nimport { SafeAreaProvider } from 'react-native-safe-area-context';\n\nimport UpstreamNavigationContainer from './fork/NavigationContainer';\nimport { useInitializeExpoRouter } from './global-state/router-store';\nimport { RequireContext } from './types';\nimport { SplashScreen } from './views/Splash';\n\nexport type ExpoRootProps = {\n context: RequireContext;\n location?: URL;\n wrapper?: FunctionComponent<{ children: ReactNode }>;\n};\n\nconst isTestEnv = process.env.NODE_ENV === 'test';\n\nconst INITIAL_METRICS =\n Platform.OS === 'web' || isTestEnv\n ? {\n frame: { x: 0, y: 0, width: 0, height: 0 },\n insets: { top: 0, left: 0, right: 0, bottom: 0 },\n }\n : undefined;\n\nconst hasViewControllerBasedStatusBarAppearance =\n Platform.OS === 'ios' &&\n !!Constants.expoConfig?.ios?.infoPlist?.UIViewControllerBasedStatusBarAppearance;\n\nexport function ExpoRoot({ wrapper: ParentWrapper = Fragment, ...props }: ExpoRootProps) {\n /*\n * Due to static rendering we need to wrap these top level views in second wrapper\n * View's like <SafeAreaProvider /> generate a <div> so if the parent wrapper\n * is a HTML document, we need to ensure its inside the <body>\n */\n const wrapper = ({ children }) => {\n return (\n <ParentWrapper>\n <SafeAreaProvider\n // SSR support\n initialMetrics={INITIAL_METRICS}>\n {children}\n {/* Users can override this by adding another StatusBar element anywhere higher in the component tree. */}\n {!hasViewControllerBasedStatusBarAppearance && <StatusBar style=\"auto\" />}\n </SafeAreaProvider>\n </ParentWrapper>\n );\n };\n\n return <ContextNavigator {...props} wrapper={wrapper} />;\n}\n\nconst initialUrl =\n Platform.OS === 'web' && typeof window !== 'undefined'\n ? new URL(window.location.href)\n : undefined;\n\nfunction ContextNavigator({\n context,\n location: initialLocation = initialUrl,\n wrapper: WrapperComponent = Fragment,\n}: ExpoRootProps) {\n const store = useInitializeExpoRouter(context, initialLocation);\n\n if (store.shouldShowTutorial()) {\n SplashScreen.hideAsync();\n if (process.env.NODE_ENV === 'development') {\n const Tutorial = require('./onboard/Tutorial').Tutorial;\n return (\n <WrapperComponent>\n <Tutorial />\n </WrapperComponent>\n );\n } else {\n // Ensure tutorial styles are stripped in production.\n return null;\n }\n }\n\n const Component = store.rootComponent;\n\n return (\n <UpstreamNavigationContainer\n ref={store.navigationRef}\n initialState={store.initialState}\n linking={store.linking}\n documentTitle={{\n enabled: false,\n }}>\n <WrapperComponent>\n <Component />\n </WrapperComponent>\n </UpstreamNavigationContainer>\n );\n}\n"]}
@@ -9,10 +9,10 @@ export type UrlObject = {
9
9
  export declare function getRouteInfoFromState(getPathFromState: (state: State, asPath: boolean) => {
10
10
  path: string;
11
11
  params: any;
12
- }, state: State): UrlObject;
12
+ }, state: State, basePath?: string): UrlObject;
13
13
  export declare function getNormalizedStatePath({ path: statePath, params, }: {
14
14
  path: string;
15
15
  params: any;
16
- }): Pick<UrlObject, 'segments' | 'params'>;
16
+ }, basePath?: string): Pick<UrlObject, 'segments' | 'params'>;
17
17
  export {};
18
18
  //# sourceMappingURL=LocationProvider.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"LocationProvider.d.ts","sourceRoot":"","sources":["../src/LocationProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAErD,KAAK,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC,CAAC;AAEtD,MAAM,MAAM,SAAS,GAAG;IACtB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAC;IAC9B,QAAQ,EAAE,M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AAC,EAAE,MAAM,GAChB,IAAI,CAAC,SAAS,EAAE,UAAU,GAAG,QAAQ,CAAC,CAgBxC"}
@@ -1,19 +1,24 @@
1
- export function getRouteInfoFromState(getPathFromState, state) {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getNormalizedStatePath = exports.getRouteInfoFromState = void 0;
4
+ const getStateFromPath_1 = require("./fork/getStateFromPath");
5
+ function getRouteInfoFromState(getPathFromState, state, basePath) {
2
6
  const { path } = getPathFromState(state, false);
3
7
  const qualified = getPathFromState(state, true);
4
8
  return {
5
9
  // TODO: This may have a predefined origin attached in the future.
6
10
  unstable_globalHref: path,
7
- pathname: path.split('?')['0'],
8
- ...getNormalizedStatePath(qualified),
11
+ pathname: (0, getStateFromPath_1.stripBasePath)(path, basePath).split('?')['0'],
12
+ ...getNormalizedStatePath(qualified, basePath),
9
13
  };
10
14
  }
15
+ exports.getRouteInfoFromState = getRouteInfoFromState;
11
16
  // TODO: Split up getPathFromState to return all this info at once.
12
- export function getNormalizedStatePath({ path: statePath, params, }) {
17
+ function getNormalizedStatePath({ path: statePath, params, }, basePath) {
13
18
  const [pathname] = statePath.split('?');
14
19
  return {
15
20
  // Strip empty path at the start
16
- segments: pathname.split('/').filter(Boolean).map(decodeURIComponent),
21
+ segments: (0, getStateFromPath_1.stripBasePath)(pathname, basePath).split('/').filter(Boolean).map(decodeURIComponent),
17
22
  // TODO: This is not efficient, we should generate based on the state instead
18
23
  // of converting to string then back to object
19
24
  params: Object.entries(params).reduce((prev, [key, value]) => {
@@ -27,4 +32,5 @@ export function getNormalizedStatePath({ path: statePath, params, }) {
27
32
  }, {}),
28
33
  };
29
34
  }
35
+ exports.getNormalizedStatePath = getNormalizedStatePath;
30
36
  //# sourceMappingURL=LocationProvider.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"LocationProvider.js","sourceRoot":"","sources":["../src/LocationProvider.tsx"],"names":[],"mappings":"AAWA,MAAM,UAAU,qBAAqB,CACnC,gBAAkF,EAClF,KAAY;IAEZ,MAAM,EAAE,IAAI,EAAE,GAAG,gBAAgB,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;IAChD,MAAM,SAAS,GAAG,gBAAgB,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IAChD,OAAO;QACL,kEAAkE;QAClE,mBAAmB,EAAE,IAAI;QACzB,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC;QAC9B,GAAG,sBAAsB,CAAC,SAAS,CAAC;KACrC,CAAC;AACJ,CAAC;AAED,mEAAmE;AACnE,MAAM,UAAU,sBAAsB,CAAC,EACrC,IAAI,EAAE,SAAS,EACf,MAAM,GAIP;IACC,MAAM,CAAC,QAAQ,CAAC,GAAG,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACxC,OAAO;QACL,gCAAgC;QAChC,QAAQ,EAAE,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,kBAAkB,CAAC;QACrE,6EAA6E;QAC7E,8CAA8C;QAC9C,MAAM,EAAE,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;YAC3D,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;gBACxB,IAAI,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC;aAC3C;iBAAM;gBACL,IAAI,CAAC,GAAG,CAAC,GAAG,kBAAkB,CAAC,KAAe,CAAC,CAAC;aACjD;YACD,OAAO,IAAI,CAAC;QACd,CAAC,EAAE,EAAkB,CAAC;KACvB,CAAC;AACJ,CAAC","sourcesContent":["import type { State } from './fork/getPathFromState';\n\ntype SearchParams = Record<string, string | string[]>;\n\nexport type UrlObject = {\n unstable_globalHref: string;\n pathname: string;\n readonly params: SearchParams;\n segments: string[];\n};\n\nexport function getRouteInfoFromState(\n getPathFromState: (state: State, asPath: boolean) => { path: string; params: any },\n state: State\n): UrlObject {\n const { path } = getPathFromState(state, false);\n const qualified = getPathFromState(state, true);\n return {\n // TODO: This may have a predefined origin attached in the future.\n unstable_globalHref: path,\n pathname: path.split('?')['0'],\n ...getNormalizedStatePath(qualified),\n };\n}\n\n// TODO: Split up getPathFromState to return all this info at once.\nexport function getNormalizedStatePath({\n path: statePath,\n params,\n}: {\n path: string;\n params: any;\n}): Pick<UrlObject, 'segments' | 'params'> {\n const [pathname] = statePath.split('?');\n return {\n // Strip empty path at the start\n segments: pathname.split('/').filter(Boolean).map(decodeURIComponent),\n // TODO: This is not efficient, we should generate based on the state instead\n // of converting to string then back to object\n params: Object.entries(params).reduce((prev, [key, value]) => {\n if (Array.isArray(value)) {\n prev[key] = value.map(decodeURIComponent);\n } else {\n prev[key] = decodeURIComponent(value as string);\n }\n return prev;\n }, {} as SearchParams),\n };\n}\n"]}
1
+ {"version":3,"file":"LocationProvider.js","sourceRoot":"","sources":["../src/LocationProvider.tsx"],"names":[],"mappings":";;;AACA,8DAAwD;AAWxD,SAAgB,qBAAqB,CACnC,gBAAkF,EAClF,KAAY,EACZ,QAAiB;IAEjB,MAAM,EAAE,IAAI,EAAE,GAAG,gBAAgB,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;IAChD,MAAM,SAAS,GAAG,gBAAgB,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IAEhD,OAAO;QACL,kEAAkE;QAClE,mBAAmB,EAAE,IAAI;QACzB,QAAQ,EAAE,IAAA,gCAAa,EAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC;QACvD,GAAG,sBAAsB,CAAC,SAAS,EAAE,QAAQ,CAAC;KAC/C,CAAC;AACJ,CAAC;AAdD,sDAcC;AAED,mEAAmE;AACnE,SAAgB,sBAAsB,CACpC,EACE,IAAI,EAAE,SAAS,EACf,MAAM,GAIP,EACD,QAAiB;IAEjB,MAAM,CAAC,QAAQ,CAAC,GAAG,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACxC,OAAO;QACL,gCAAgC;QAChC,QAAQ,EAAE,IAAA,gCAAa,EAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,kBAAkB,CAAC;QAC9F,6EAA6E;QAC7E,8CAA8C;QAC9C,MAAM,EAAE,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;YAC3D,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;gBACxB,IAAI,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC;aAC3C;iBAAM;gBACL,IAAI,CAAC,GAAG,CAAC,GAAG,kBAAkB,CAAC,KAAe,CAAC,CAAC;aACjD;YACD,OAAO,IAAI,CAAC;QACd,CAAC,EAAE,EAAkB,CAAC;KACvB,CAAC;AACJ,CAAC;AAzBD,wDAyBC","sourcesContent":["import type { State } from './fork/getPathFromState';\nimport { stripBasePath } from './fork/getStateFromPath';\n\ntype SearchParams = Record<string, string | string[]>;\n\nexport type UrlObject = {\n unstable_globalHref: string;\n pathname: string;\n readonly params: SearchParams;\n segments: string[];\n};\n\nexport function getRouteInfoFromState(\n getPathFromState: (state: State, asPath: boolean) => { path: string; params: any },\n state: State,\n basePath?: string\n): UrlObject {\n const { path } = getPathFromState(state, false);\n const qualified = getPathFromState(state, true);\n\n return {\n // TODO: This may have a predefined origin attached in the future.\n unstable_globalHref: path,\n pathname: stripBasePath(path, basePath).split('?')['0'],\n ...getNormalizedStatePath(qualified, basePath),\n };\n}\n\n// TODO: Split up getPathFromState to return all this info at once.\nexport function getNormalizedStatePath(\n {\n path: statePath,\n params,\n }: {\n path: string;\n params: any;\n },\n basePath?: string\n): Pick<UrlObject, 'segments' | 'params'> {\n const [pathname] = statePath.split('?');\n return {\n // Strip empty path at the start\n segments: stripBasePath(pathname, basePath).split('/').filter(Boolean).map(decodeURIComponent),\n // TODO: This is not efficient, we should generate based on the state instead\n // of converting to string then back to object\n params: Object.entries(params).reduce((prev, [key, value]) => {\n if (Array.isArray(value)) {\n prev[key] = value.map(decodeURIComponent);\n } else {\n prev[key] = decodeURIComponent(value as string);\n }\n return prev;\n }, {} as SearchParams),\n };\n}\n"]}
package/build/Route.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import React, { ReactNode } from 'react';
2
2
  import type { ErrorBoundaryProps } from './exports';
3
+ import { sortRoutesWithInitial, sortRoutes } from './sortRoutes';
3
4
  export type DynamicConvention = {
4
5
  name: string;
5
6
  deep: boolean;
@@ -39,6 +40,5 @@ export declare function Route({ children, node }: {
39
40
  children: ReactNode;
40
41
  node: RouteNode;
41
42
  }): JSX.Element;
42
- export declare function sortRoutesWithInitial(initialRouteName?: string): (a: RouteNode, b: RouteNode) => number;
43
- export declare function sortRoutes(a: RouteNode, b: RouteNode): number;
43
+ export { sortRoutesWithInitial, sortRoutes };
44
44
  //# sourceMappingURL=Route.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Route.d.ts","sourceRoot":"","sources":["../src/Route.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAc,MAAM,OAAO,CAAC;AAErD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAGpD,MAAM,MAAM,iBAAiB,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,OAAO,CAAA;CAAE,CAAC;AAEhE,MAAM,MAAM,WAAW,GAAG;IACxB,aAAa,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,kBAAkB,CAAC,C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I,GAAG,iBAAiB,EAAE,CAAC;IACpC,sCAAsC;IACtC,KAAK,EAAE,MAAM,CAAC;IACd,qDAAqD;IACrD,UAAU,EAAE,MAAM,CAAC;IACnB,sBAAsB;IACtB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,wFAAwF;IACxF,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAQF,+DAA+D;AAC/D,wBAAgB,YAAY,IAAI,SAAS,GAAG,IAAI,CAE/C;AAED,wBAAgB,aAAa,IAAI,MAAM,CAMtC;AAED,iEAAiE;AACjE,wBAAgB,KAAK,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAC;IAAC,IAAI,EAAE,SAAS,CAAA;CAAE,eAEjF;AAED,OAAO,EAAE,qBAAqB,EAAE,UAAU,EAAE,CAAC"}
package/build/Route.js CHANGED
@@ -1,68 +1,54 @@
1
- import React, { useContext } from 'react';
2
- import { getContextKey, matchGroupName } from './matchers';
3
- const CurrentRouteContext = React.createContext(null);
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.sortRoutes = exports.sortRoutesWithInitial = exports.Route = exports.useContextKey = exports.useRouteNode = void 0;
27
+ const react_1 = __importStar(require("react"));
28
+ const matchers_1 = require("./matchers");
29
+ const sortRoutes_1 = require("./sortRoutes");
30
+ Object.defineProperty(exports, "sortRoutesWithInitial", { enumerable: true, get: function () { return sortRoutes_1.sortRoutesWithInitial; } });
31
+ Object.defineProperty(exports, "sortRoutes", { enumerable: true, get: function () { return sortRoutes_1.sortRoutes; } });
32
+ const CurrentRouteContext = react_1.default.createContext(null);
4
33
  if (process.env.NODE_ENV !== 'production') {
5
34
  CurrentRouteContext.displayName = 'RouteNode';
6
35
  }
7
36
  /** Return the RouteNode at the current contextual boundary. */
8
- export function useRouteNode() {
9
- return useContext(CurrentRouteContext);
37
+ function useRouteNode() {
38
+ return (0, react_1.useContext)(CurrentRouteContext);
10
39
  }
11
- export function useContextKey() {
40
+ exports.useRouteNode = useRouteNode;
41
+ function useContextKey() {
12
42
  const node = useRouteNode();
13
43
  if (node == null) {
14
44
  throw new Error('No filename found. This is likely a bug in expo-router.');
15
45
  }
16
- return getContextKey(node.contextKey);
46
+ return (0, matchers_1.getContextKey)(node.contextKey);
17
47
  }
48
+ exports.useContextKey = useContextKey;
18
49
  /** Provides the matching routes and filename to the children. */
19
- export function Route({ children, node }) {
20
- return React.createElement(CurrentRouteContext.Provider, { value: node }, children);
21
- }
22
- export function sortRoutesWithInitial(initialRouteName) {
23
- return (a, b) => {
24
- if (initialRouteName) {
25
- if (a.route === initialRouteName) {
26
- return -1;
27
- }
28
- if (b.route === initialRouteName) {
29
- return 1;
30
- }
31
- }
32
- return sortRoutes(a, b);
33
- };
34
- }
35
- export function sortRoutes(a, b) {
36
- if (a.dynamic && !b.dynamic) {
37
- return 1;
38
- }
39
- if (!a.dynamic && b.dynamic) {
40
- return -1;
41
- }
42
- if (a.dynamic && b.dynamic) {
43
- if (a.dynamic.length !== b.dynamic.length) {
44
- return b.dynamic.length - a.dynamic.length;
45
- }
46
- for (let i = 0; i < a.dynamic.length; i++) {
47
- const aDynamic = a.dynamic[i];
48
- const bDynamic = b.dynamic[i];
49
- if (aDynamic.deep && !bDynamic.deep) {
50
- return 1;
51
- }
52
- if (!aDynamic.deep && bDynamic.deep) {
53
- return -1;
54
- }
55
- }
56
- return 0;
57
- }
58
- const aIndex = a.route === 'index' || matchGroupName(a.route) != null;
59
- const bIndex = b.route === 'index' || matchGroupName(b.route) != null;
60
- if (aIndex && !bIndex) {
61
- return -1;
62
- }
63
- if (!aIndex && bIndex) {
64
- return 1;
65
- }
66
- return a.route.length - b.route.length;
50
+ function Route({ children, node }) {
51
+ return react_1.default.createElement(CurrentRouteContext.Provider, { value: node }, children);
67
52
  }
53
+ exports.Route = Route;
68
54
  //# sourceMappingURL=Route.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Route.js","sourceRoot":"","sources":["../src/Route.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAa,UAAU,EAAE,MAAM,OAAO,CAAC;AAGrD,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAiC3D,MAAM,mBAAmB,GAAG,KAAK,CAAC,aAAa,CAAmB,IAAI,CAAC,CAAC;AAExE,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY,EAAE;IACzC,mBAAmB,CAAC,WAAW,GAAG,WAAW,CAAC;CAC/C;AAED,+DAA+D;AAC/D,MAAM,UAAU,YAAY;IAC1B,OAAO,UAAU,CAAC,mBAAmB,CAAC,CAAC;AACzC,CAAC;AAED,MAAM,UAAU,aAAa;IAC3B,MAAM,IAAI,GAAG,YAAY,EAAE,CAAC;IAC5B,IAAI,IAAI,IAAI,IAAI,EAAE;QAChB,MAAM,IAAI,KAAK,CAAC,yDAAyD,CAAC,CAAC;KAC5E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AAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;YAC9B,MAAM,QAAQ,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;YAC9B,IAAI,QAAQ,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE;gBACnC,OAAO,CAAC,CAAC;aACV;YACD,IAAI,CAAC,QAAQ,CAAC,IAAI,IAAI,QAAQ,CAAC,IAAI,EAAE;gBACnC,OAAO,CAAC,CAAC,CAAC;aACX;SACF;QACD,OAAO,CAAC,CAAC;KACV;IAED,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,KAAK,OAAO,IAAI,cAAc,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC;IACtE,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,KAAK,OAAO,IAAI,cAAc,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC;IAEtE,IAAI,MAAM,IAAI,CAAC,MAAM,EAAE;QACrB,OAAO,CAAC,CAAC,CAAC;KACX;IACD,IAAI,CAAC,MAAM,IAAI,MAAM,EAAE;QACrB,OAAO,CAAC,CAAC;KACV;IAED,OAAO,CAAC,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC;AACzC,CAAC","sourcesContent":["import React, { ReactNode, useContext } from 'react';\n\nimport type { ErrorBoundaryProps } from './exports';\nimport { getContextKey, matchGroupName } from './matchers';\n\nexport type DynamicConvention = { name: string; deep: boolean };\n\nexport type LoadedRoute = {\n ErrorBoundary?: React.ComponentType<ErrorBoundaryProps>;\n default?: React.ComponentType<any>;\n unstable_settings?: Record<string, any>;\n getNavOptions?: (args: any) => any;\n generateStaticParams?: (props: {\n params?: Record<string, string | string[]>;\n }) => Record<string, string | string[]>[];\n};\n\nexport type RouteNode = {\n /** Load a route into memory. Returns the exports from a route. */\n loadRoute: () => Partial<LoadedRoute>;\n /** Loaded initial route name. */\n initialRouteName?: string;\n /** nested routes */\n children: RouteNode[];\n /** Is the route a dynamic path */\n dynamic: null | DynamicConvention[];\n /** `index`, `error-boundary`, etc. */\n route: string;\n /** Context Module ID, used for matching children. */\n contextKey: string;\n /** Added in-memory */\n generated?: boolean;\n /** Internal screens like the directory or the auto 404 should be marked as internal. */\n internal?: boolean;\n};\n\nconst CurrentRouteContext = React.createContext<RouteNode | null>(null);\n\nif (process.env.NODE_ENV !== 'production') {\n CurrentRouteContext.displayName = 'RouteNode';\n}\n\n/** Return the RouteNode at the current contextual boundary. */\nexport function useRouteNode(): RouteNode | null {\n return useContext(CurrentRouteContext);\n}\n\nexport function useContextKey(): string {\n const node = useRouteNode();\n if (node == null) {\n throw new Error('No filename found. This is likely a bug in expo-router.');\n }\n return getContextKey(node.contextKey);\n}\n\n/** Provides the matching routes and filename to the children. */\nexport function Route({ children, node }: { children: ReactNode; node: RouteNode }) {\n return <CurrentRouteContext.Provider value={node}>{children}</CurrentRouteContext.Provider>;\n}\n\nexport function sortRoutesWithInitial(initialRouteName?: string) {\n return (a: RouteNode, b: RouteNode): number => {\n if (initialRouteName) {\n if (a.route === initialRouteName) {\n return -1;\n }\n if (b.route === initialRouteName) {\n return 1;\n }\n }\n return sortRoutes(a, b);\n };\n}\n\nexport function sortRoutes(a: RouteNode, b: RouteNode): number {\n if (a.dynamic && !b.dynamic) {\n return 1;\n }\n if (!a.dynamic && b.dynamic) {\n return -1;\n }\n if (a.dynamic && b.dynamic) {\n if (a.dynamic.length !== b.dynamic.length) {\n return b.dynamic.length - a.dynamic.length;\n }\n for (let i = 0; i < a.dynamic.length; i++) {\n const aDynamic = a.dynamic[i];\n const bDynamic = b.dynamic[i];\n if (aDynamic.deep && !bDynamic.deep) {\n return 1;\n }\n if (!aDynamic.deep && bDynamic.deep) {\n return -1;\n }\n }\n return 0;\n }\n\n const aIndex = a.route === 'index' || matchGroupName(a.route) != null;\n const bIndex = b.route === 'index' || matchGroupName(b.route) != null;\n\n if (aIndex && !bIndex) {\n return -1;\n }\n if (!aIndex && bIndex) {\n return 1;\n }\n\n return a.route.length - b.route.length;\n}\n"]}
1
+ {"version":3,"file":"Route.js","sourceRoot":"","sources":["../src/Route.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAqD;AAGrD,yCAA2C;AAC3C,6CAAiE;AAyDxD,sGAzDA,kCAAqB,OAyDA;AAAE,2FAzDA,uBAAU,OAyDA;AAxB1C,MAAM,mBAAmB,GAAG,eAAK,CAAC,aAAa,CAAmB,IAAI,CAAC,CAAC;AAExE,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY,EAAE;IACzC,mBAAmB,CAAC,WAAW,GAAG,WAAW,CAAC;CAC/C;AAED,+DAA+D;AAC/D,SAAgB,YAAY;IAC1B,OAAO,IAAA,kBAAU,EAAC,mBAAmB,CAAC,CAAC;AACzC,CAAC;AAFD,oCAEC;AAED,SAAgB,aAAa;IAC3B,MAAM,IAAI,GAAG,YAAY,EAAE,CAAC;IAC5B,IAAI,IAAI,IAAI,IAAI,EAAE;QAChB,MAAM,IAAI,KAAK,CAAC,yDAAyD,CAAC,CAAC;KAC5E;IACD,OAAO,IAAA,wBAAa,EAAC,IAAI,CAAC,UAAU,CAAC,CAAC;AACxC,CAAC;AAND,sCAMC;AAED,iEAAiE;AACjE,SAAgB,KAAK,CAAC,EAAE,QAAQ,EAAE,IAAI,EAA4C;IAChF,OAAO,8BAAC,mBAAmB,CAAC,QAAQ,IAAC,KAAK,EAAE,IAAI,IAAG,QAAQ,CAAgC,CAAC;AAC9F,CAAC;AAFD,sBAEC","sourcesContent":["import React, { ReactNode, useContext } from 'react';\n\nimport type { ErrorBoundaryProps } from './exports';\nimport { getContextKey } from './matchers';\nimport { sortRoutesWithInitial, sortRoutes } from './sortRoutes';\n\nexport type DynamicConvention = { name: string; deep: boolean };\n\nexport type LoadedRoute = {\n ErrorBoundary?: React.ComponentType<ErrorBoundaryProps>;\n default?: React.ComponentType<any>;\n unstable_settings?: Record<string, any>;\n getNavOptions?: (args: any) => any;\n generateStaticParams?: (props: {\n params?: Record<string, string | string[]>;\n }) => Record<string, string | string[]>[];\n};\n\nexport type RouteNode = {\n /** Load a route into memory. Returns the exports from a route. */\n loadRoute: () => Partial<LoadedRoute>;\n /** Loaded initial route name. */\n initialRouteName?: string;\n /** nested routes */\n children: RouteNode[];\n /** Is the route a dynamic path */\n dynamic: null | DynamicConvention[];\n /** `index`, `error-boundary`, etc. */\n route: string;\n /** Context Module ID, used for matching children. */\n contextKey: string;\n /** Added in-memory */\n generated?: boolean;\n /** Internal screens like the directory or the auto 404 should be marked as internal. */\n internal?: boolean;\n};\n\nconst CurrentRouteContext = React.createContext<RouteNode | null>(null);\n\nif (process.env.NODE_ENV !== 'production') {\n CurrentRouteContext.displayName = 'RouteNode';\n}\n\n/** Return the RouteNode at the current contextual boundary. */\nexport function useRouteNode(): RouteNode | null {\n return useContext(CurrentRouteContext);\n}\n\nexport function useContextKey(): string {\n const node = useRouteNode();\n if (node == null) {\n throw new Error('No filename found. This is likely a bug in expo-router.');\n }\n return getContextKey(node.contextKey);\n}\n\n/** Provides the matching routes and filename to the children. */\nexport function Route({ children, node }: { children: ReactNode; node: RouteNode }) {\n return <CurrentRouteContext.Provider value={node}>{children}</CurrentRouteContext.Provider>;\n}\n\nexport { sortRoutesWithInitial, sortRoutes };\n"]}
@@ -1,5 +1,5 @@
1
1
  import { Navigator, Slot } from './views/Navigator';
2
- export { useRouter, useUnstableGlobalHref, usePathname, useGlobalSearchParams, useLocalSearchParams, useSearchParams, useSegments, useRootNavigation, useRootNavigationState, } from './hooks';
2
+ export { useRouter, useUnstableGlobalHref, usePathname, useGlobalSearchParams, useLocalSearchParams, useSegments, useRootNavigation, useRootNavigationState, } from './hooks';
3
3
  export { router } from './imperative-api';
4
4
  export { Link, Redirect } from './link/Link';
5
5
  export { withLayoutContext } from './layouts/withLayoutContext';
@@ -1 +1 @@
1
- {"version":3,"file":"exports.d.ts","sourceRoot":"","sources":["../src/exports.ts"],"names":[],"mappings":"AACA,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;AAG3B,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAGtD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAG9C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC"}
1
+ {"version":3,"file":"exports.d.ts","sourceRoot":"","sources":["../src/exports.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEpD,OAAO,EACL,SAAS,EACT,qBAAqB,EACrB,WAAW,EACX,qBAAqB,EACrB,oBAAoB,EACpB,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;AAG3B,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAGtD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAG9C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC"}
package/build/exports.js CHANGED
@@ -1,17 +1,39 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useFocusEffect = exports.useNavigation = exports.SplashScreen = exports.ErrorBoundary = exports.Unmatched = exports.ExpoRoot = exports.Slot = exports.Navigator = exports.withLayoutContext = exports.Redirect = exports.Link = exports.router = exports.useRootNavigationState = exports.useRootNavigation = exports.useSegments = exports.useLocalSearchParams = exports.useGlobalSearchParams = exports.usePathname = exports.useUnstableGlobalHref = exports.useRouter = void 0;
1
4
  // Expo Router API
2
- import { Navigator, Slot } from './views/Navigator';
3
- export { useRouter, useUnstableGlobalHref, usePathname, useGlobalSearchParams, useLocalSearchParams, useSearchParams, useSegments, useRootNavigation, useRootNavigationState, } from './hooks';
4
- export { router } from './imperative-api';
5
- export { Link, Redirect } from './link/Link';
6
- export { withLayoutContext } from './layouts/withLayoutContext';
7
- export { Navigator, Slot };
5
+ const Navigator_1 = require("./views/Navigator");
6
+ Object.defineProperty(exports, "Navigator", { enumerable: true, get: function () { return Navigator_1.Navigator; } });
7
+ Object.defineProperty(exports, "Slot", { enumerable: true, get: function () { return Navigator_1.Slot; } });
8
+ var hooks_1 = require("./hooks");
9
+ Object.defineProperty(exports, "useRouter", { enumerable: true, get: function () { return hooks_1.useRouter; } });
10
+ Object.defineProperty(exports, "useUnstableGlobalHref", { enumerable: true, get: function () { return hooks_1.useUnstableGlobalHref; } });
11
+ Object.defineProperty(exports, "usePathname", { enumerable: true, get: function () { return hooks_1.usePathname; } });
12
+ Object.defineProperty(exports, "useGlobalSearchParams", { enumerable: true, get: function () { return hooks_1.useGlobalSearchParams; } });
13
+ Object.defineProperty(exports, "useLocalSearchParams", { enumerable: true, get: function () { return hooks_1.useLocalSearchParams; } });
14
+ Object.defineProperty(exports, "useSegments", { enumerable: true, get: function () { return hooks_1.useSegments; } });
15
+ Object.defineProperty(exports, "useRootNavigation", { enumerable: true, get: function () { return hooks_1.useRootNavigation; } });
16
+ Object.defineProperty(exports, "useRootNavigationState", { enumerable: true, get: function () { return hooks_1.useRootNavigationState; } });
17
+ var imperative_api_1 = require("./imperative-api");
18
+ Object.defineProperty(exports, "router", { enumerable: true, get: function () { return imperative_api_1.router; } });
19
+ var Link_1 = require("./link/Link");
20
+ Object.defineProperty(exports, "Link", { enumerable: true, get: function () { return Link_1.Link; } });
21
+ Object.defineProperty(exports, "Redirect", { enumerable: true, get: function () { return Link_1.Redirect; } });
22
+ var withLayoutContext_1 = require("./layouts/withLayoutContext");
23
+ Object.defineProperty(exports, "withLayoutContext", { enumerable: true, get: function () { return withLayoutContext_1.withLayoutContext; } });
8
24
  // Expo Router Views
9
- export { ExpoRoot } from './ExpoRoot';
10
- export { Unmatched } from './views/Unmatched';
11
- export { ErrorBoundary } from './views/ErrorBoundary';
25
+ var ExpoRoot_1 = require("./ExpoRoot");
26
+ Object.defineProperty(exports, "ExpoRoot", { enumerable: true, get: function () { return ExpoRoot_1.ExpoRoot; } });
27
+ var Unmatched_1 = require("./views/Unmatched");
28
+ Object.defineProperty(exports, "Unmatched", { enumerable: true, get: function () { return Unmatched_1.Unmatched; } });
29
+ var ErrorBoundary_1 = require("./views/ErrorBoundary");
30
+ Object.defineProperty(exports, "ErrorBoundary", { enumerable: true, get: function () { return ErrorBoundary_1.ErrorBoundary; } });
12
31
  // Platform
13
- export { SplashScreen } from './views/Splash';
32
+ var Splash_1 = require("./views/Splash");
33
+ Object.defineProperty(exports, "SplashScreen", { enumerable: true, get: function () { return Splash_1.SplashScreen; } });
14
34
  // React Navigation
15
- export { useNavigation } from './useNavigation';
16
- export { useFocusEffect } from './useFocusEffect';
35
+ var useNavigation_1 = require("./useNavigation");
36
+ Object.defineProperty(exports, "useNavigation", { enumerable: true, get: function () { return useNavigation_1.useNavigation; } });
37
+ var useFocusEffect_1 = require("./useFocusEffect");
38
+ Object.defineProperty(exports, "useFocusEffect", { enumerable: true, get: function () { return useFocusEffect_1.useFocusEffect; } });
17
39
  //# sourceMappingURL=exports.js.map
@@ -1 +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
+ {"version":3,"file":"exports.js","sourceRoot":"","sources":["../src/exports.ts"],"names":[],"mappings":";;;AAAA,kBAAkB;AAClB,iDAAoD;AAkB3C,0FAlBA,qBAAS,OAkBA;AAAE,qFAlBA,gBAAI,OAkBA;AAhBxB,iCASiB;AARf,kGAAA,SAAS,OAAA;AACT,8GAAA,qBAAqB,OAAA;AACrB,oGAAA,WAAW,OAAA;AACX,8GAAA,qBAAqB,OAAA;AACrB,6GAAA,oBAAoB,OAAA;AACpB,oGAAA,WAAW,OAAA;AACX,0GAAA,iBAAiB,OAAA;AACjB,+GAAA,sBAAsB,OAAA;AAGxB,mDAA0C;AAAjC,wGAAA,MAAM,OAAA;AAEf,oCAA6C;AAApC,4FAAA,IAAI,OAAA;AAAE,gGAAA,QAAQ,OAAA;AAEvB,iEAAgE;AAAvD,sHAAA,iBAAiB,OAAA;AAG1B,oBAAoB;AACpB,uCAAsC;AAA7B,oGAAA,QAAQ,OAAA;AACjB,+CAA8C;AAArC,sGAAA,SAAS,OAAA;AAElB,uDAAsD;AAA7C,8GAAA,aAAa,OAAA;AAEtB,WAAW;AACX,yCAA8C;AAArC,sGAAA,YAAY,OAAA;AAErB,mBAAmB;AACnB,iDAAgD;AAAvC,8GAAA,aAAa,OAAA;AACtB,mDAAkD;AAAzC,gHAAA,cAAc,OAAA","sourcesContent":["// Expo Router API\nimport { Navigator, Slot } from './views/Navigator';\n\nexport {\n useRouter,\n useUnstableGlobalHref,\n usePathname,\n useGlobalSearchParams,\n useLocalSearchParams,\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,4 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
1
3
  // We only need to fork on native to support any prefixes.
2
- import { NavigationContainer } from '@react-navigation/native';
3
- export default NavigationContainer;
4
+ const native_1 = require("@react-navigation/native");
5
+ exports.default = native_1.NavigationContainer;
4
6
  //# sourceMappingURL=NavigationContainer.js.map
@@ -1 +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
+ {"version":3,"file":"NavigationContainer.js","sourceRoot":"","sources":["../../src/fork/NavigationContainer.tsx"],"names":[],"mappings":";;AAAA,0DAA0D;AAC1D,qDAA+D;AAE/D,kBAAe,4BAAmB,CAAC","sourcesContent":["// We only need to fork on native to support any prefixes.\nimport { NavigationContainer } from '@react-navigation/native';\n\nexport default NavigationContainer;\n"]}