expo-router 1.2.2 → 1.4.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 (173) hide show
  1. package/{_root.tsx → _entry.tsx} +9 -4
  2. package/_html-ctx.tsx +9 -0
  3. package/babel.js +14 -10
  4. package/build/ExpoRoot.d.ts +6 -0
  5. package/build/ExpoRoot.d.ts.map +1 -0
  6. package/build/LocationProvider.d.ts +25 -0
  7. package/build/LocationProvider.d.ts.map +1 -0
  8. package/build/NavigationContainer.d.ts +8 -0
  9. package/build/NavigationContainer.d.ts.map +1 -0
  10. package/build/Route.d.ts +44 -0
  11. package/build/Route.d.ts.map +1 -0
  12. package/build/exports.d.ts +15 -0
  13. package/build/exports.d.ts.map +1 -0
  14. package/build/fork/NavigationContainer.d.ts +3 -0
  15. package/build/fork/NavigationContainer.d.ts.map +1 -0
  16. package/build/fork/NavigationContainer.native.d.ts +26 -0
  17. package/build/fork/NavigationContainer.native.d.ts.map +1 -0
  18. package/build/fork/expo/createRoot.d.ts +2 -0
  19. package/build/fork/expo/createRoot.d.ts.map +1 -0
  20. package/build/fork/expo/createRoot.native.d.ts +3 -0
  21. package/build/fork/expo/createRoot.native.d.ts.map +1 -0
  22. package/build/fork/expo/registerRootComponent.d.ts +16 -0
  23. package/build/fork/expo/registerRootComponent.d.ts.map +1 -0
  24. package/build/fork/extractPathFromURL.d.ts +6 -0
  25. package/build/fork/extractPathFromURL.d.ts.map +1 -0
  26. package/build/fork/findFocusedRoute.d.ts +23 -0
  27. package/build/fork/findFocusedRoute.d.ts.map +1 -0
  28. package/build/fork/getPathFromState.d.ts +50 -0
  29. package/build/fork/getPathFromState.d.ts.map +1 -0
  30. package/build/fork/getStateFromPath.d.ts +54 -0
  31. package/build/fork/getStateFromPath.d.ts.map +1 -0
  32. package/build/fork/useLinking.d.ts +3 -0
  33. package/build/fork/useLinking.d.ts.map +1 -0
  34. package/build/fork/useLinking.native.d.ts +49 -0
  35. package/build/fork/useLinking.native.d.ts.map +1 -0
  36. package/build/fork/validatePathConfig.d.ts +2 -0
  37. package/build/fork/validatePathConfig.d.ts.map +1 -0
  38. package/build/getDevServer/index.d.ts +7 -0
  39. package/build/getDevServer/index.d.ts.map +1 -0
  40. package/build/getDevServer/index.native.d.ts +2 -0
  41. package/build/getDevServer/index.native.d.ts.map +1 -0
  42. package/build/getLinkingConfig.d.ts +9 -0
  43. package/build/getLinkingConfig.d.ts.map +1 -0
  44. package/build/getReactNavigationConfig.d.ts +13 -0
  45. package/build/getReactNavigationConfig.d.ts.map +1 -0
  46. package/build/getRoutes.d.ts +38 -0
  47. package/build/getRoutes.d.ts.map +1 -0
  48. package/build/head/Head.d.ts +7 -0
  49. package/build/head/Head.d.ts.map +1 -0
  50. package/build/head/Head.native.d.ts +11 -0
  51. package/build/head/Head.native.d.ts.map +1 -0
  52. package/build/index.d.ts +4 -0
  53. package/build/index.d.ts.map +1 -0
  54. package/build/layouts/Drawer.d.ts +107 -0
  55. package/build/layouts/Drawer.d.ts.map +1 -0
  56. package/build/layouts/Stack.d.ts +107 -0
  57. package/build/layouts/Stack.d.ts.map +1 -0
  58. package/build/layouts/Tabs.d.ts +154 -0
  59. package/build/layouts/Tabs.d.ts.map +1 -0
  60. package/build/layouts/withLayoutContext.d.ts +16 -0
  61. package/build/layouts/withLayoutContext.d.ts.map +1 -0
  62. package/build/link/Link.d.ts +33 -0
  63. package/build/link/Link.d.ts.map +1 -0
  64. package/build/link/href.d.ts +10 -0
  65. package/build/link/href.d.ts.map +1 -0
  66. package/build/link/linking.d.ts +7 -0
  67. package/build/link/linking.d.ts.map +1 -0
  68. package/build/link/path.d.ts +2 -0
  69. package/build/link/path.d.ts.map +1 -0
  70. package/build/link/stateOperations.d.ts +81 -0
  71. package/build/link/stateOperations.d.ts.map +1 -0
  72. package/build/link/useHref.d.ts +10 -0
  73. package/build/link/useHref.d.ts.map +1 -0
  74. package/build/link/useLinkToPath.d.ts +6 -0
  75. package/build/link/useLinkToPath.d.ts.map +1 -0
  76. package/build/link/useLinkToPathProps.d.ts +11 -0
  77. package/build/link/useLinkToPathProps.d.ts.map +1 -0
  78. package/build/link/useLinkingContext.d.ts +7 -0
  79. package/build/link/useLinkingContext.d.ts.map +1 -0
  80. package/build/link/useLoadedNavigation.d.ts +7 -0
  81. package/build/link/useLoadedNavigation.d.ts.map +1 -0
  82. package/build/link/useRouter.d.ts +15 -0
  83. package/build/link/useRouter.d.ts.map +1 -0
  84. package/build/loadStaticParamsAsync.d.ts +3 -0
  85. package/build/loadStaticParamsAsync.d.ts.map +1 -0
  86. package/build/matchers.d.ts +12 -0
  87. package/build/matchers.d.ts.map +1 -0
  88. package/build/onboard/Tutorial.d.ts +3 -0
  89. package/build/onboard/Tutorial.d.ts.map +1 -0
  90. package/build/onboard/createEntryFile.d.ts +3 -0
  91. package/build/onboard/createEntryFile.d.ts.map +1 -0
  92. package/build/onboard/useTutorial.d.ts +4 -0
  93. package/build/onboard/useTutorial.d.ts.map +1 -0
  94. package/build/primitives.d.ts +19 -0
  95. package/build/primitives.d.ts.map +1 -0
  96. package/build/renderRootComponent.d.ts +7 -0
  97. package/build/renderRootComponent.d.ts.map +1 -0
  98. package/build/static/getRootComponent.d.ts +2 -0
  99. package/build/static/getRootComponent.d.ts.map +1 -0
  100. package/build/static/html.d.ts +15 -0
  101. package/build/static/html.d.ts.map +1 -0
  102. package/build/static/renderStaticContent.d.ts +10 -0
  103. package/build/static/renderStaticContent.d.ts.map +1 -0
  104. package/build/static/useServerState.d.ts +42 -0
  105. package/build/static/useServerState.d.ts.map +1 -0
  106. package/build/static/useServerState.native.d.ts +2 -0
  107. package/build/static/useServerState.native.d.ts.map +1 -0
  108. package/build/types.d.ts +13 -0
  109. package/build/types.d.ts.map +1 -0
  110. package/build/useFocusEffect.d.ts +11 -0
  111. package/build/useFocusEffect.d.ts.map +1 -0
  112. package/build/useInitialRootState.d.ts +42 -0
  113. package/build/useInitialRootState.d.ts.map +1 -0
  114. package/build/useInitialRootState.native.d.ts +3 -0
  115. package/build/useInitialRootState.native.d.ts.map +1 -0
  116. package/build/useInitialRootStateContext.d.ts +13 -0
  117. package/build/useInitialRootStateContext.d.ts.map +1 -0
  118. package/build/useNavigation.d.ts +9 -0
  119. package/build/useNavigation.d.ts.map +1 -0
  120. package/build/useRootNavigation.d.ts +9 -0
  121. package/build/useRootNavigation.d.ts.map +1 -0
  122. package/build/useRootRouteNodeContext.d.ts +11 -0
  123. package/build/useRootRouteNodeContext.d.ts.map +1 -0
  124. package/build/useScreens.d.ts +27 -0
  125. package/build/useScreens.d.ts.map +1 -0
  126. package/build/utils/mockState.d.ts +7 -0
  127. package/build/utils/mockState.d.ts.map +1 -0
  128. package/build/views/ErrorBoundary.d.ts +4 -0
  129. package/build/views/ErrorBoundary.d.ts.map +1 -0
  130. package/build/views/Navigator.d.ts +280 -0
  131. package/build/views/Navigator.d.ts.map +1 -0
  132. package/build/views/Screen.d.ts +19 -0
  133. package/build/views/Screen.d.ts.map +1 -0
  134. package/build/views/Sitemap.d.ts +5 -0
  135. package/build/views/Sitemap.d.ts.map +1 -0
  136. package/build/views/Splash.d.ts +26 -0
  137. package/build/views/Splash.d.ts.map +1 -0
  138. package/build/views/Try.d.ts +24 -0
  139. package/build/views/Try.d.ts.map +1 -0
  140. package/build/views/Unmatched.d.ts +4 -0
  141. package/build/views/Unmatched.d.ts.map +1 -0
  142. package/entry.js +2 -6
  143. package/html.ts +1 -0
  144. package/index.d.ts +1 -0
  145. package/package.json +32 -14
  146. package/src/Route.tsx +12 -1
  147. package/src/__tests__/{getLinkingConfig.test.node.ts → getReactNavigationConfig.test.node.ts} +45 -2
  148. package/src/__tests__/getRoutes.test.node.ts +40 -10
  149. package/src/__tests__/loadStaticParamsAsync.test.node.ts +413 -0
  150. package/src/fork/__tests__/__snapshots__/extractPathFromURL.test.ios.ts.snap +78 -18
  151. package/src/fork/__tests__/extractPathFromURL.test.ios.ts +56 -26
  152. package/src/fork/__tests__/getStateFromPath-upstream.test.node.ts +2 -0
  153. package/src/fork/extractPathFromURL.ts +74 -9
  154. package/src/fork/findFocusedRoute.tsx +15 -0
  155. package/src/fork/getStateFromPath.ts +33 -21
  156. package/src/fork/validatePathConfig.ts +32 -0
  157. package/src/getLinkingConfig.ts +3 -76
  158. package/src/getReactNavigationConfig.ts +103 -0
  159. package/src/getRoutes.ts +167 -91
  160. package/src/link/Link.tsx +12 -7
  161. package/src/link/href.ts +2 -2
  162. package/src/link/linking.ts +17 -2
  163. package/src/link/stateOperations.ts +22 -14
  164. package/src/link/useLinkToPath.ts +3 -7
  165. package/src/loadStaticParamsAsync.ts +169 -0
  166. package/src/static/getRootComponent.ts +28 -0
  167. package/src/static/html.tsx +38 -0
  168. package/src/static/renderStaticContent.tsx +7 -53
  169. package/src/static/useServerState.ts +27 -17
  170. package/src/ts-declarations.d.ts +1 -0
  171. package/src/useFocusEffect.tsx +1 -1
  172. package/src/useScreens.tsx +2 -0
  173. package/types/react-native.d.ts +179 -0
@@ -2,13 +2,14 @@
2
2
 
3
3
  import "@expo/metro-runtime";
4
4
 
5
- import { ExpoRoot } from "expo-router";
6
5
  import React from "react";
7
6
 
7
+ import { ExpoRoot } from "./src";
8
8
  import { getNavigationConfig } from "./src/getLinkingConfig";
9
9
  import { getRoutes } from "./src/getRoutes";
10
+ import { loadStaticParamsAsync } from "./src/loadStaticParamsAsync";
10
11
 
11
- const ctx = require.context(process.env.EXPO_ROUTER_APP_ROOT!);
12
+ export const ctx = require.context(process.env.EXPO_ROUTER_APP_ROOT!);
12
13
 
13
14
  // Must be exported or Fast Refresh won't update the context >:[
14
15
  export default function ExpoRouterRoot() {
@@ -16,10 +17,14 @@ export default function ExpoRouterRoot() {
16
17
  }
17
18
 
18
19
  /** Get the linking manifest from a Node.js process. */
19
- export function getManifest() {
20
- const routeTree = getRoutes(ctx);
20
+ export async function getManifest(options: any) {
21
+ const routeTree = getRoutes(ctx, options);
21
22
  if (!routeTree) {
22
23
  return null;
23
24
  }
25
+
26
+ // Evaluate all static params
27
+ await loadStaticParamsAsync(routeTree);
28
+
24
29
  return getNavigationConfig(routeTree);
25
30
  }
package/_html-ctx.tsx ADDED
@@ -0,0 +1,9 @@
1
+ /// <reference path="metro-require.d.ts" />
2
+
3
+ /** Optionally import `app/+html.js` file. */
4
+ export const ctx = require.context(
5
+ process.env.EXPO_ROUTER_APP_ROOT!,
6
+ false,
7
+ /\+html\.[tj]sx?$/,
8
+ "sync"
9
+ );
package/babel.js CHANGED
@@ -1,3 +1,4 @@
1
+ const { getConfig } = require("expo/config");
1
2
  const nodePath = require("path");
2
3
  const resolveFrom = require("resolve-from");
3
4
  const { getExpoConstantsManifest } = require("./node/getExpoConstantsManifest");
@@ -17,25 +18,28 @@ function getExpoAppManifest(projectRoot) {
17
18
  }
18
19
 
19
20
  function getExpoRouterAppRoot(projectRoot) {
20
- if (process.env.EXPO_ROUTER_APP_ROOT) {
21
- return process.env.EXPO_ROUTER_APP_ROOT;
21
+ // Bump to v2 to prevent the CLI from setting the variable anymore.
22
+ // TODO: Bump to v3 to revert back to the CLI setting the variable again, but with custom value
23
+ // support.
24
+ if (process.env.EXPO_ROUTER_APP_ROOT_2) {
25
+ return process.env.EXPO_ROUTER_APP_ROOT_2;
22
26
  }
23
27
  const routerEntry = resolveFrom.silent(projectRoot, "expo-router/entry");
24
28
 
25
- if (!routerEntry) {
26
- console.warn(
27
- `Required environment variable EXPO_ROUTER_APP_ROOT is not defined, bundle with Expo CLI (expo@^46.0.13) to fix.`
28
- );
29
- process.env.EXPO_ROUTER_APP_ROOT = "../../app";
30
- return process.env.EXPO_ROUTER_APP_ROOT;
31
- }
29
+ const { exp } = getConfig(projectRoot);
30
+ const customSrc = exp.extra?.router?.unstable_src || "./app";
31
+ const isAbsolute = customSrc.startsWith("/");
32
32
  // It doesn't matter if the app folder exists.
33
- const appFolder = nodePath.join(projectRoot, "app");
33
+ const appFolder = isAbsolute
34
+ ? customSrc
35
+ : nodePath.join(projectRoot, customSrc);
34
36
  const appRoot = nodePath.relative(nodePath.dirname(routerEntry), appFolder);
35
37
  debug("routerEntry", routerEntry, appFolder, appRoot);
36
38
 
39
+ process.env.EXPO_ROUTER_APP_ROOT_2 = appRoot;
37
40
  return appRoot;
38
41
  }
42
+ // TODO: Strip the function `generateStaticParams` when bundling for node.js environments.
39
43
 
40
44
  module.exports = function (api) {
41
45
  const { types: t } = api;
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import { RequireContext } from "./types";
3
+ export declare function ExpoRoot({ context }: {
4
+ context: RequireContext;
5
+ }): JSX.Element;
6
+ //# sourceMappingURL=ExpoRoot.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExpoRoot.d.ts","sourceRoot":"","sources":["../src/ExpoRoot.tsx"],"names":[],"mappings":";AAMA,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AA6BzC,wBAAgB,QAAQ,CAAC,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,EAAE,cAAc,CAAA;CAAE,eAahE"}
@@ -0,0 +1,25 @@
1
+ import React from "react";
2
+ type SearchParams = Record<string, string | string[]>;
3
+ type UrlObject = {
4
+ pathname: string;
5
+ readonly params: SearchParams;
6
+ segments: string[];
7
+ };
8
+ export declare function compareUrlSearchParams(a: SearchParams, b: SearchParams): boolean;
9
+ export declare function getNormalizedStatePath({ path: statePath, params, }: {
10
+ path: string;
11
+ params: any;
12
+ }): Omit<UrlObject, "pathname">;
13
+ export declare function LocationProvider({ children }: {
14
+ children: React.ReactNode;
15
+ }): JSX.Element;
16
+ /** @returns Currently selected route as a normalized string without search parameters. e.g. `/acme?foo=bar` -> `/acme`. Segments will be normalized: `/[id]?id=normal` -> `/normal` */
17
+ export declare function usePathname(): string;
18
+ /** @returns Current URL Search Parameters. */
19
+ export declare function useSearchParams<TParams extends SearchParams = SearchParams>(): Partial<TParams>;
20
+ /** @returns Current URL Search Parameters that only update when the path matches the current route. */
21
+ export declare function useLocalSearchParams<TParams extends SearchParams = SearchParams>(): Partial<TParams>;
22
+ /** @returns Array of selected segments. */
23
+ export declare function useSegments(): string[];
24
+ export {};
25
+ //# sourceMappingURL=LocationProvider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LocationProvider.d.ts","sourceRoot":"","sources":["../src/LocationProvider.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAY1B,KAAK,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC,CAAC;AAEtD,KAAK,SAAS,GAAG;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAC;IAC9B,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB,CAAC;AA0BF,wBAAgB,sBAAsB,CACpC,CAAC,EAAE,YAAY,EACf,CAAC,EAAE,YAAY,GACd,OAAO,CAET;AAwFD,wBAAgB,sBAAsB,CAAC,EACrC,IAAI,EAAE,SAAS,EACf,MAAM,GACP,EAAE;IACD,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,GAAG,CAAC;CACb,GAAG,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,CAgB9B;AAQD,wBAAgB,gBAAgB,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,eAM3E;AAcD,uLAAuL;AACvL,wBAAgB,WAAW,IAAI,MAAM,CAEpC;AAED,8CAA8C;AAC9C,wBAAgB,eAAe,CAC7B,OAAO,SAAS,YAAY,GAAG,YAAY,KACxC,OAAO,CAAC,OAAO,CAAC,CAEpB;AAED,uGAAuG;AACvG,wBAAgB,oBAAoB,CAClC,OAAO,SAAS,YAAY,GAAG,YAAY,KACxC,OAAO,CAAC,OAAO,CAAC,CAEpB;AAED,2CAA2C;AAC3C,wBAAgB,WAAW,IAAI,MAAM,EAAE,CAEtC"}
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ /** Get the root navigation container ref. */
3
+ export declare function getNavigationContainerRef(): import("@react-navigation/native").NavigationContainerRefWithCurrent<Record<string, unknown>>;
4
+ /** react-navigation `NavigationContainer` with automatic `linking` prop generated from the routes context. */
5
+ export declare function NavigationContainer(props: {
6
+ children: React.ReactNode;
7
+ }): JSX.Element;
8
+ //# sourceMappingURL=NavigationContainer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NavigationContainer.d.ts","sourceRoot":"","sources":["../src/NavigationContainer.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAU1B,6CAA6C;AAC7C,wBAAgB,yBAAyB,kGAExC;AAED,8GAA8G;AAC9G,wBAAgB,mBAAmB,CAAC,KAAK,EAAE;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,eAyBvE"}
@@ -0,0 +1,44 @@
1
+ import React, { ReactNode } from "react";
2
+ import type { ErrorBoundaryProps } from "./exports";
3
+ export type DynamicConvention = {
4
+ name: string;
5
+ deep: boolean;
6
+ };
7
+ export type LoadedRoute = {
8
+ ErrorBoundary?: React.ComponentType<ErrorBoundaryProps>;
9
+ default: React.ComponentType<any>;
10
+ unstable_settings?: Record<string, any>;
11
+ getNavOptions?: (args: any) => any;
12
+ generateStaticParams?: (props: {
13
+ params?: Record<string, string | string[]>;
14
+ }) => Record<string, string | string[]>[];
15
+ };
16
+ export type RouteNode = {
17
+ /** Load a route into memory. Returns the exports from a route. */
18
+ loadRoute: () => LoadedRoute;
19
+ /** Loaded initial route name. */
20
+ initialRouteName?: string;
21
+ /** nested routes */
22
+ children: RouteNode[];
23
+ /** Is the route a dynamic path */
24
+ dynamic: null | DynamicConvention[];
25
+ /** `index`, `error-boundary`, etc. */
26
+ route: string;
27
+ /** Context Module ID, used for matching children. */
28
+ contextKey: string;
29
+ /** Added in-memory */
30
+ generated?: boolean;
31
+ /** Internal screens like the directory or the auto 404 should be marked as internal. */
32
+ internal?: boolean;
33
+ };
34
+ /** Return the RouteNode at the current contextual boundary. */
35
+ export declare function useRouteNode(): RouteNode | null;
36
+ export declare function useContextKey(): string;
37
+ /** Provides the matching routes and filename to the children. */
38
+ export declare function Route({ children, node, }: {
39
+ children: ReactNode;
40
+ node: RouteNode;
41
+ }): JSX.Element;
42
+ export declare function sortRoutesWithInitial(initialRouteName?: string): (a: RouteNode, b: RouteNode) => number;
43
+ export declare function sortRoutes(a: RouteNode, b: RouteNode): number;
44
+ //# sourceMappingURL=Route.d.ts.map
@@ -0,0 +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,CAAC;IACxD,OAAO,EAAE,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;IAClC,iBAAiB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACxC,aAAa,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,GAAG,CAAC;IACnC,oBAAoB,CAAC,EAAE,CAAC,KAAK,EAAE;QAC7B,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC,CAAC;KAC5C,KAAK,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC,EAAE,CAAC;CAC3C,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG;IACtB,kEAAkE;IAClE,SAAS,EAAE,MAAM,WAAW,CAAC;IAC7B,iCAAiC;IACjC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,oBAAoB;IACpB,QAAQ,EAAE,SAAS,EAAE,CAAC;IACtB,kCAAkC;IAClC,OAAO,EAAE,IAAI,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,EACpB,QAAQ,EACR,IAAI,GACL,EAAE;IACD,QAAQ,EAAE,SAAS,CAAC;IACpB,IAAI,EAAE,SAAS,CAAC;CACjB,eAMA;AAED,wBAAgB,qBAAqB,CAAC,gBAAgB,CAAC,EAAE,MAAM,OAClD,SAAS,KAAK,SAAS,KAAG,MAAM,CAW5C;AAED,wBAAgB,UAAU,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,SAAS,GAAG,MAAM,CAmC7D"}
@@ -0,0 +1,15 @@
1
+ import { Navigator, Slot } from "./views/Navigator";
2
+ export { useRouter } from "./link/useRouter";
3
+ export { usePathname, useLocalSearchParams, useSearchParams, useSegments, } from "./LocationProvider";
4
+ export { Link, Redirect } from "./link/Link";
5
+ export { withLayoutContext } from "./layouts/withLayoutContext";
6
+ export { Navigator, Slot };
7
+ export { ExpoRoot } from "./ExpoRoot";
8
+ export { Unmatched } from "./views/Unmatched";
9
+ export { ErrorBoundaryProps } from "./views/Try";
10
+ export { ErrorBoundary } from "./views/ErrorBoundary";
11
+ export { SplashScreen } from "./views/Splash";
12
+ export { useNavigation } from "./useNavigation";
13
+ export { useRootNavigation, useRootNavigationState } from "./useRootNavigation";
14
+ export { useFocusEffect } from "./useFocusEffect";
15
+ //# sourceMappingURL=exports.d.ts.map
@@ -0,0 +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,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EACL,WAAW,EACX,oBAAoB,EACpB,eAAe,EACf,WAAW,GACZ,MAAM,oBAAoB,CAAC;AAC5B,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,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAChF,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { NavigationContainer } from "@react-navigation/native";
2
+ export default NavigationContainer;
3
+ //# sourceMappingURL=NavigationContainer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NavigationContainer.d.ts","sourceRoot":"","sources":["../../src/fork/NavigationContainer.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAE/D,eAAe,mBAAmB,CAAC"}
@@ -0,0 +1,26 @@
1
+ import { NavigationContainerProps, NavigationContainerRef } from "@react-navigation/core";
2
+ import { DocumentTitleOptions, LinkingOptions, Theme } from "@react-navigation/native";
3
+ import * as React from "react";
4
+ declare global {
5
+ var REACT_NAVIGATION_DEVTOOLS: WeakMap<NavigationContainerRef<any>, {
6
+ readonly linking: LinkingOptions<any>;
7
+ }>;
8
+ }
9
+ type Props<ParamList extends object> = NavigationContainerProps & {
10
+ theme?: Theme;
11
+ linking?: LinkingOptions<ParamList>;
12
+ fallback?: React.ReactNode;
13
+ documentTitle?: DocumentTitleOptions;
14
+ onReady?: () => void;
15
+ };
16
+ declare const NavigationContainer: <RootParamList extends object = ReactNavigation.RootParamList>(props: NavigationContainerProps & {
17
+ theme?: Theme | undefined;
18
+ linking?: LinkingOptions<RootParamList> | undefined;
19
+ fallback?: React.ReactNode;
20
+ documentTitle?: DocumentTitleOptions | undefined;
21
+ onReady?: (() => void) | undefined;
22
+ } & {
23
+ ref?: React.Ref<NavigationContainerRef<RootParamList>> | undefined;
24
+ }) => React.ReactElement;
25
+ export default NavigationContainer;
26
+ //# sourceMappingURL=NavigationContainer.native.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NavigationContainer.native.d.ts","sourceRoot":"","sources":["../../src/fork/NavigationContainer.native.tsx"],"names":[],"mappings":"AAEA,OAAO,EAKL,wBAAwB,EACxB,sBAAsB,EAGvB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAEL,oBAAoB,EAEpB,cAAc,EACd,KAAK,EAEN,MAAM,0BAA0B,CAAC;AAIlC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,CAAC,MAAM,CAAC;IAEb,IAAI,yBAAyB,EAAE,OAAO,CACpC,sBAAsB,CAAC,GAAG,CAAC,EAC3B;QAAE,QAAQ,CAAC,OAAO,EAAE,cAAc,CAAC,GAAG,CAAC,CAAA;KAAE,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;AA2GF,QAAA,MAAM,mBAAmB;;;eA9GZ,MAAM,SAAS;;qBAEV,IAAI;;;MAkHjB,MAAM,YAAY,CAAC;AAExB,eAAe,mBAAmB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { createRoot, hydrateRoot } from "react-dom/client";
2
+ //# sourceMappingURL=createRoot.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createRoot.d.ts","sourceRoot":"","sources":["../../../src/fork/expo/createRoot.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export declare function createRoot(): null;
2
+ export declare function hydrateRoot(): null;
3
+ //# sourceMappingURL=createRoot.native.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createRoot.native.d.ts","sourceRoot":"","sources":["../../../src/fork/expo/createRoot.native.tsx"],"names":[],"mappings":"AAEA,wBAAgB,UAAU,SAEzB;AACD,wBAAgB,WAAW,SAE1B"}
@@ -0,0 +1,16 @@
1
+ import "expo/build/Expo.fx";
2
+ import "@expo/metro-runtime";
3
+ import * as React from "react";
4
+ type InitialProps = {
5
+ exp: {
6
+ notification?: any;
7
+ manifestString?: string;
8
+ [key: string]: any;
9
+ };
10
+ shell?: boolean;
11
+ shellManifestUrl?: string;
12
+ [key: string]: any;
13
+ };
14
+ export default function registerRootComponent<P extends InitialProps>(component: React.ComponentType<P>): void;
15
+ export {};
16
+ //# sourceMappingURL=registerRootComponent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registerRootComponent.d.ts","sourceRoot":"","sources":["../../../src/fork/expo/registerRootComponent.tsx"],"names":[],"mappings":"AAGA,OAAO,oBAAoB,CAAC;AAG5B,OAAO,qBAAqB,CAAC;AAI7B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,KAAK,YAAY,GAAG;IAClB,GAAG,EAAE;QACH,YAAY,CAAC,EAAE,GAAG,CAAC;QACnB,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;KACpB,CAAC;IACF,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAAC,CAAC,SAAS,YAAY,EAClE,SAAS,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,GAChC,IAAI,CA6CN"}
@@ -0,0 +1,6 @@
1
+ export declare function extractExpoPathFromURL(url: string): string;
2
+ export declare function adjustPathname(url: {
3
+ hostname?: string | null;
4
+ pathname: string;
5
+ }): string;
6
+ //# sourceMappingURL=extractPathFromURL.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"extractPathFromURL.d.ts","sourceRoot":"","sources":["../../src/fork/extractPathFromURL.ts"],"names":[],"mappings":"AAwEA,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,MAAM,UAGjD;AAED,wBAAgB,cAAc,CAAC,GAAG,EAAE;IAClC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,QAAQ,EAAE,MAAM,CAAC;CAClB,UAMA"}
@@ -0,0 +1,23 @@
1
+ import type { InitialState } from "@react-navigation/routers";
2
+ export declare function findFocusedRoute(state: InitialState): (Omit<import("@react-navigation/routers").Route<string, object | undefined>, "key"> & {
3
+ state?: Readonly<Partial<Omit<Readonly<{
4
+ key: string;
5
+ index: number;
6
+ routeNames: string[];
7
+ history?: unknown[] | undefined;
8
+ routes: (Readonly<{
9
+ key: string;
10
+ name: string;
11
+ path?: string | undefined;
12
+ }> & Readonly<{
13
+ params?: Readonly<object | undefined>;
14
+ }> & {
15
+ state?: Readonly<any> | import("@react-navigation/routers").PartialState<Readonly<any>> | undefined;
16
+ })[];
17
+ type: string;
18
+ stale: false;
19
+ }>, "routes" | "stale">> & {
20
+ routes: (Omit<import("@react-navigation/routers").Route<string, object | undefined>, "key"> & any)[];
21
+ }> | undefined;
22
+ }) | undefined;
23
+ //# sourceMappingURL=findFocusedRoute.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"findFocusedRoute.d.ts","sourceRoot":"","sources":["../../src/fork/findFocusedRoute.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAE9D,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,YAAY;;;;;;;;;;;;;;;;;;;;eAUnD"}
@@ -0,0 +1,50 @@
1
+ import { PathConfigMap } from "@react-navigation/core";
2
+ import type { NavigationState, PartialState } from "@react-navigation/routers";
3
+ type Options<ParamList extends object> = {
4
+ initialRouteName?: string;
5
+ screens: PathConfigMap<ParamList>;
6
+ };
7
+ export type State = NavigationState | Omit<PartialState<NavigationState>, "stale">;
8
+ /**
9
+ * Utility to serialize a navigation state object to a path string.
10
+ *
11
+ * @example
12
+ * ```js
13
+ * getPathFromState(
14
+ * {
15
+ * routes: [
16
+ * {
17
+ * name: 'Chat',
18
+ * params: { author: 'Jane', id: 42 },
19
+ * },
20
+ * ],
21
+ * },
22
+ * {
23
+ * screens: {
24
+ * Chat: {
25
+ * path: 'chat/:author/:id',
26
+ * stringify: { author: author => author.toLowerCase() }
27
+ * }
28
+ * }
29
+ * }
30
+ * )
31
+ * ```
32
+ *
33
+ * @param state Navigation state to serialize.
34
+ * @param options Extra options to fine-tune how to serialize the path.
35
+ * @returns Path representing the state, e.g. /foo/bar?count=42.
36
+ */
37
+ export default function getPathFromState<ParamList extends object>(state: State, _options?: Options<ParamList> & {
38
+ preserveGroups?: boolean;
39
+ preserveDynamicRoutes?: boolean;
40
+ }): string;
41
+ export declare function getPathDataFromState<ParamList extends object>(state: State, _options?: Options<ParamList> & {
42
+ preserveGroups?: boolean;
43
+ preserveDynamicRoutes?: boolean;
44
+ }): {
45
+ path: string;
46
+ params: Record<string, any>;
47
+ };
48
+ export declare function deepEqual(a: any, b: any): boolean;
49
+ export {};
50
+ //# sourceMappingURL=getPathFromState.d.ts.map
@@ -0,0 +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,GAAG,EAAE,CAAC,EAAE,GAAG,WAqCvC"}
@@ -0,0 +1,54 @@
1
+ import { PathConfigMap } from "@react-navigation/core";
2
+ import type { NavigationState, PartialState } from "@react-navigation/routers";
3
+ import { RouteNode } from "../Route";
4
+ type Options<ParamList extends object> = {
5
+ initialRouteName?: string;
6
+ screens: PathConfigMap<ParamList>;
7
+ };
8
+ type ParseConfig = Record<string, (value: string) => any>;
9
+ type InitialRouteConfig = {
10
+ initialRouteName: string;
11
+ parentScreens: string[];
12
+ };
13
+ export type ResultState = PartialState<NavigationState> & {
14
+ state?: ResultState;
15
+ };
16
+ /**
17
+ * Utility to parse a path string to initial state object accepted by the container.
18
+ * This is useful for deep linking when we need to handle the incoming URL.
19
+ *
20
+ * @example
21
+ * ```js
22
+ * getStateFromPath(
23
+ * '/chat/jane/42',
24
+ * {
25
+ * screens: {
26
+ * Chat: {
27
+ * path: 'chat/:author/:id',
28
+ * parse: { id: Number }
29
+ * }
30
+ * }
31
+ * }
32
+ * )
33
+ * ```
34
+ * @param path Path string to parse and convert, e.g. /foo/bar?count=42.
35
+ * @param options Extra options to fine-tune how to parse the path.
36
+ */
37
+ export default function getStateFromPath<ParamList extends object>(path: string, options?: Options<ParamList>): ResultState | undefined;
38
+ export declare function getMatchableRouteConfigs<ParamList extends object>(options?: Options<ParamList>): {
39
+ configs: {
40
+ isInitial: boolean;
41
+ screen: string;
42
+ regex?: RegExp | undefined;
43
+ path: string;
44
+ pattern: string;
45
+ routeNames: string[];
46
+ parse?: ParseConfig | undefined;
47
+ hasChildren: boolean;
48
+ userReadableName: string;
49
+ _route?: RouteNode | undefined;
50
+ }[];
51
+ initialRoutes: InitialRouteConfig[];
52
+ };
53
+ export {};
54
+ //# sourceMappingURL=getStateFromPath.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getStateFromPath.d.ts","sourceRoot":"","sources":["../../src/fork/getStateFromPath.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,KAAK,EAEV,eAAe,EACf,YAAY,EACb,MAAM,2BAA2B,CAAC;AAMnC,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAGrC,KAAK,OAAO,CAAC,SAAS,SAAS,MAAM,IAAI;IACvC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,OAAO,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC;CACnC,CAAC;AAEF,KAAK,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,GAAG,CAAC,CAAC;AAe1D,KAAK,kBAAkB,GAAG;IACxB,gBAAgB,EAAE,MAAM,CAAC;IACzB,aAAa,EAAE,MAAM,EAAE,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG,YAAY,CAAC,eAAe,CAAC,GAAG;IACxD,KAAK,CAAC,EAAE,WAAW,CAAC;CACrB,CAAC;AAkBF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,SAAS,SAAS,MAAM,EAC/D,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,GAC3B,WAAW,GAAG,SAAS,CAIzB;AAED,wBAAgB,wBAAwB,CAAC,SAAS,SAAS,MAAM,EAC/D,OAAO,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC;;;;;;;;;;;;;;EA+C7B"}
@@ -0,0 +1,3 @@
1
+ declare const _default: typeof import("./useLinking.native").default;
2
+ export default _default;
3
+ //# sourceMappingURL=useLinking.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useLinking.d.ts","sourceRoot":"","sources":["../../src/fork/useLinking.ts"],"names":[],"mappings":";AAGA,wBAA0E"}
@@ -0,0 +1,49 @@
1
+ import { NavigationContainerRef, ParamListBase } from "@react-navigation/core";
2
+ import type { LinkingOptions } from "@react-navigation/native";
3
+ import * as React from "react";
4
+ type Options = LinkingOptions<ParamListBase>;
5
+ export default function useLinking(ref: React.RefObject<NavigationContainerRef<ParamListBase>>, { filter, config, getInitialURL, subscribe, getStateFromPath, getActionFromState, }: Options): {
6
+ getInitialState: () => PromiseLike<(Partial<Omit<Readonly<{
7
+ key: string;
8
+ index: number;
9
+ routeNames: string[];
10
+ history?: unknown[] | undefined;
11
+ routes: (Readonly<{
12
+ key: string;
13
+ name: string;
14
+ path?: string | undefined;
15
+ }> & Readonly<{
16
+ params?: Readonly<object | undefined>;
17
+ }> & {
18
+ state?: Readonly<any> | import("@react-navigation/core").PartialState<Readonly<any>> | undefined;
19
+ })[];
20
+ type: string;
21
+ stale: false;
22
+ }>, "routes" | "stale">> & Readonly<{
23
+ stale?: true | undefined;
24
+ routes: import("@react-navigation/core").PartialRoute<import("@react-navigation/core").Route<string, object | undefined>>[];
25
+ }> & {
26
+ state?: (Partial<Omit<Readonly<{
27
+ key: string;
28
+ index: number;
29
+ routeNames: string[];
30
+ history?: unknown[] | undefined;
31
+ routes: (Readonly<{
32
+ key: string;
33
+ name: string;
34
+ path?: string | undefined;
35
+ }> & Readonly<{
36
+ params?: Readonly<object | undefined>;
37
+ }> & {
38
+ state?: Readonly<any> | import("@react-navigation/core").PartialState<Readonly<any>> | undefined;
39
+ })[];
40
+ type: string;
41
+ stale: false;
42
+ }>, "routes" | "stale">> & Readonly<{
43
+ stale?: true | undefined;
44
+ routes: import("@react-navigation/core").PartialRoute<import("@react-navigation/core").Route<string, object | undefined>>[];
45
+ }> & any) | undefined;
46
+ }) | undefined>;
47
+ };
48
+ export {};
49
+ //# sourceMappingURL=useLinking.native.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useLinking.native.d.ts","sourceRoot":"","sources":["../../src/fork/useLinking.native.ts"],"names":[],"mappings":"AAIA,OAAO,EAGL,sBAAsB,EACtB,aAAa,EACd,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,KAAK,OAAO,GAAG,cAAc,CAAC,aAAa,CAAC,CAAC;AAI7C,MAAM,CAAC,OAAO,UAAU,UAAU,CAChC,GAAG,EAAE,KAAK,CAAC,SAAS,CAAC,sBAAsB,CAAC,aAAa,CAAC,CAAC,EAC3D,EAGE,MAAM,EACN,MAAM,EACN,aAQI,EACJ,SAUC,EACD,gBAA0C,EAC1C,kBAA8C,GAC/C,EAAE,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2KX"}
@@ -0,0 +1,2 @@
1
+ export default function validatePathConfig(config: any, root?: boolean): void;
2
+ //# sourceMappingURL=validatePathConfig.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validatePathConfig.d.ts","sourceRoot":"","sources":["../../src/fork/validatePathConfig.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,MAAM,EAAE,GAAG,EAAE,IAAI,UAAO,QA4BlE"}
@@ -0,0 +1,7 @@
1
+ export declare const getDevServer: () => {
2
+ bundleLoadedFromServer: boolean;
3
+ /** URL but ensures that platform query param is added. */
4
+ readonly fullBundleUrl: string;
5
+ url: string;
6
+ };
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/getDevServer/index.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,YAAY;;IAcrB,0DAA0D;;;CAmB7D,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const getDevServer: any;
2
+ //# sourceMappingURL=index.native.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../src/getDevServer/index.native.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,KAA+D,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { LinkingOptions } from "@react-navigation/native";
2
+ import { RouteNode } from "./Route";
3
+ import { Screen } from "./getReactNavigationConfig";
4
+ export declare function getNavigationConfig(routes: RouteNode): {
5
+ initialRouteName?: string;
6
+ screens: Record<string, Screen>;
7
+ };
8
+ export declare function getLinkingConfig(routes: RouteNode): LinkingOptions<object>;
9
+ //# sourceMappingURL=getLinkingConfig.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getLinkingConfig.d.ts","sourceRoot":"","sources":["../src/getLinkingConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE9E,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACpC,OAAO,EAA4B,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAQ9E,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,SAAS,GAAG;IACtD,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACjC,CAEA;AAED,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,SAAS,GAAG,cAAc,CAAC,MAAM,CAAC,CAmB1E"}
@@ -0,0 +1,13 @@
1
+ import type { RouteNode } from "./Route";
2
+ export type Screen = string | {
3
+ path: string;
4
+ screens: Record<string, Screen>;
5
+ _route?: RouteNode;
6
+ initialRouteName?: string;
7
+ };
8
+ export declare function getReactNavigationScreensConfig(nodes: RouteNode[], metaOnly: boolean): Record<string, Screen>;
9
+ export declare function getReactNavigationConfig(routes: RouteNode, metaOnly: boolean): {
10
+ initialRouteName?: string;
11
+ screens: Record<string, Screen>;
12
+ };
13
+ //# sourceMappingURL=getReactNavigationConfig.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getReactNavigationConfig.d.ts","sourceRoot":"","sources":["../src/getReactNavigationConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAGzC,MAAM,MAAM,MAAM,GACd,MAAM,GACN;IACE,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B,CAAC;AAsEN,wBAAgB,+BAA+B,CAC7C,KAAK,EAAE,SAAS,EAAE,EAClB,QAAQ,EAAE,OAAO,GAChB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAMxB;AAED,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,SAAS,EACjB,QAAQ,EAAE,OAAO,GAChB;IACD,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACjC,CAKA"}
@@ -0,0 +1,38 @@
1
+ import type { DynamicConvention, RouteNode } from "./Route";
2
+ import type { RequireContext } from "./types";
3
+ export type FileNode = Pick<RouteNode, "contextKey" | "loadRoute"> & {
4
+ /** Like `(tab)/index` */
5
+ normalizedName: string;
6
+ };
7
+ type TreeNode = {
8
+ name: string;
9
+ children: TreeNode[];
10
+ parents: string[];
11
+ /** null when there is no file in a folder. */
12
+ node: FileNode | null;
13
+ };
14
+ type Options = {
15
+ ignore?: RegExp[];
16
+ };
17
+ /** Convert a flat map of file nodes into a nested tree of files. */
18
+ export declare function getRecursiveTree(files: FileNode[]): TreeNode;
19
+ export declare function generateDynamicFromSegment(name: string): DynamicConvention | null;
20
+ export declare function generateDynamic(name: string): RouteNode["dynamic"];
21
+ /**
22
+ * Asserts if the require.context has files that share the same name but have different extensions. Exposed for testing.
23
+ * @private
24
+ */
25
+ export declare function assertDuplicateRoutes(filenames: string[]): void;
26
+ /** Given a Metro context module, return an array of nested routes. */
27
+ export declare function getRoutes(contextModule: RequireContext, options?: Options): RouteNode | null;
28
+ export declare function getRoutesAsync(contextModule: RequireContext, options?: Options): Promise<RouteNode | null>;
29
+ /** Get routes without unmatched or sitemap. */
30
+ export declare function getExactRoutes(contextModule: RequireContext, options?: Options): RouteNode | null;
31
+ export declare function getExactRoutesAsync(contextModule: RequireContext, options?: Options): Promise<RouteNode | null>;
32
+ /**
33
+ * Exposed for testing.
34
+ * @returns a top-level deep dynamic route if it exists, otherwise null.
35
+ */
36
+ export declare function getUserDefinedDeepDynamicRoute(routes: RouteNode): RouteNode | null;
37
+ export {};
38
+ //# sourceMappingURL=getRoutes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getRoutes.d.ts","sourceRoot":"","sources":["../src/getRoutes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAS5D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,MAAM,MAAM,QAAQ,GAAG,IAAI,CAAC,SAAS,EAAE,YAAY,GAAG,WAAW,CAAC,GAAG;IACnE,yBAAyB;IACzB,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,KAAK,QAAQ,GAAG;IACd,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,QAAQ,EAAE,CAAC;IACrB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,8CAA8C;IAC9C,IAAI,EAAE,QAAQ,GAAG,IAAI,CAAC;CACvB,CAAC;AAEF,KAAK,OAAO,GAAG;IACb,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;CACnB,CAAC;AAEF,oEAAoE;AACpE,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,QAAQ,EAAE,GAAG,QAAQ,CA+C5D;AAyBD,wBAAgB,0BAA0B,CACxC,IAAI,EAAE,MAAM,GACX,iBAAiB,GAAG,IAAI,CAK1B;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC,SAAS,CAAC,CAMlE;AA8MD;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,MAAM,EAAE,QAiBxD;AAED,sEAAsE;AACtE,wBAAgB,SAAS,CACvB,aAAa,EAAE,cAAc,EAC7B,OAAO,CAAC,EAAE,OAAO,GAChB,SAAS,GAAG,IAAI,CAYlB;AAED,wBAAsB,cAAc,CAClC,aAAa,EAAE,cAAc,EAC7B,OAAO,CAAC,EAAE,OAAO,GAChB,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC,CAY3B;AAUD,+CAA+C;AAC/C,wBAAgB,cAAc,CAC5B,aAAa,EAAE,cAAc,EAC7B,OAAO,CAAC,EAAE,OAAO,GAChB,SAAS,GAAG,IAAI,CAIlB;AAYD,wBAAsB,mBAAmB,CACvC,aAAa,EAAE,cAAc,EAC7B,OAAO,CAAC,EAAE,OAAO,GAChB,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC,CAI3B;AA4CD;;;GAGG;AACH,wBAAgB,8BAA8B,CAC5C,MAAM,EAAE,SAAS,GAChB,SAAS,GAAG,IAAI,CAgBlB"}
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ import { HelmetProvider } from "react-helmet-async";
3
+ declare const Head: React.FC<{}> & {
4
+ Provider: typeof HelmetProvider;
5
+ };
6
+ export default Head;
7
+ //# sourceMappingURL=Head.d.ts.map