expo-router 3.5.1 → 3.5.3

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.
@@ -1,6 +1,7 @@
1
- export declare function extractExpoPathFromURL(url?: string): string;
2
- export declare function adjustPathname(url: {
3
- hostname?: string | null;
1
+ export declare function parsePathAndParamsFromExpoGoLink(url: string): {
4
2
  pathname: string;
5
- }): string;
3
+ queryString: string;
4
+ };
5
+ export declare function parsePathFromExpoGoLink(url: string): string;
6
+ export declare function extractExpoPathFromURL(url?: string): string;
6
7
  //# sourceMappingURL=extractPathFromURL.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"extractPathFromURL.d.ts","sourceRoot":"","sources":["../../src/fork/extractPathFromURL.ts"],"names":[],"mappings":"AAyFA,wBAAgB,sBAAsB,CAAC,GAAG,GAAE,MAAW,UAGtD;AAED,wBAAgB,cAAc,CAAC,GAAG,EAAE;IAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,UAMjF"}
1
+ {"version":3,"file":"extractPathFromURL.d.ts","sourceRoot":"","sources":["../../src/fork/extractPathFromURL.ts"],"names":[],"mappings":"AAAA,wBAAgB,gCAAgC,CAAC,GAAG,EAAE,MAAM,GAAG;IAC7D,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;CACrB,CAUA;AAED,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAI3D;AAqFD,wBAAgB,sBAAsB,CAAC,GAAG,GAAE,MAAW,UAMtD"}
@@ -1,30 +1,23 @@
1
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
2
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.adjustPathname = exports.extractExpoPathFromURL = void 0;
27
- const Linking = __importStar(require("expo-linking"));
3
+ exports.extractExpoPathFromURL = exports.parsePathFromExpoGoLink = exports.parsePathAndParamsFromExpoGoLink = void 0;
4
+ function parsePathAndParamsFromExpoGoLink(url) {
5
+ // If the URL is defined (default in Expo Go dev apps) and the URL has no path:
6
+ // `exp://192.168.87.39:19000/` then use the default `exp://192.168.87.39:19000/--/`
7
+ const href = parsePathFromExpoGoLink(url);
8
+ const results = href.match(/(.*?)(\?.*)/);
9
+ return {
10
+ pathname: results?.[1] ?? '',
11
+ queryString: results?.[2] ?? '',
12
+ };
13
+ }
14
+ exports.parsePathAndParamsFromExpoGoLink = parsePathAndParamsFromExpoGoLink;
15
+ function parsePathFromExpoGoLink(url) {
16
+ // If the URL is defined (default in Expo Go dev apps) and the URL has no path:
17
+ // `exp://192.168.87.39:19000/` then use the default `exp://192.168.87.39:19000/--/`
18
+ return url.match(/exps?:\/\/.*?\/--\/(.*)/)?.[1] ?? '';
19
+ }
20
+ exports.parsePathFromExpoGoLink = parsePathFromExpoGoLink;
28
21
  // This is only run on native.
29
22
  function extractExactPathFromURL(url) {
30
23
  if (
@@ -40,17 +33,16 @@ function extractExactPathFromURL(url) {
40
33
  // while not exhaustive, `exp` and `exps` are the only two schemes which
41
34
  // are passed through to other apps in Expo Go.
42
35
  url.match(/^exp(s)?:\/\//)) {
43
- const pathname = url.match(/exps?:\/\/.*?\/--\/(.*)/)?.[1];
36
+ const pathname = parsePathFromExpoGoLink(url);
44
37
  if (pathname) {
45
38
  return fromDeepLink('a://' + pathname);
46
39
  }
47
- const res = Linking.parse(url);
48
- const qs = !res.queryParams
49
- ? ''
50
- : Object.entries(res.queryParams)
51
- .map(([k, v]) => `${k}=${v}`)
52
- .join('&');
53
- return (adjustPathname({ hostname: res.hostname, pathname: res.path || '' }) + (qs ? '?' + qs : ''));
40
+ // Match the `?.*` segment of the URL.
41
+ const queryParams = url.match(/exps?:\/\/.*\?(.*)/)?.[1];
42
+ if (queryParams) {
43
+ return fromDeepLink('a://?' + queryParams);
44
+ }
45
+ return '';
54
46
  }
55
47
  // TODO: Support dev client URLs
56
48
  return fromDeepLink(url);
@@ -93,16 +85,9 @@ function fromDeepLink(url) {
93
85
  return results;
94
86
  }
95
87
  function extractExpoPathFromURL(url = '') {
96
- // TODO: We should get rid of this, dropping specificities is not good
97
- return extractExactPathFromURL(url).replace(/^\//, '');
88
+ return (extractExactPathFromURL(url)
89
+ // TODO: We should get rid of this, dropping specificities is not good
90
+ .replace(/^\//, ''));
98
91
  }
99
92
  exports.extractExpoPathFromURL = extractExpoPathFromURL;
100
- function adjustPathname(url) {
101
- if (url.hostname === 'exp.host' || url.hostname === 'u.expo.dev') {
102
- // drop the first two segments from pathname:
103
- return url.pathname.split('/').slice(2).join('/');
104
- }
105
- return url.pathname;
106
- }
107
- exports.adjustPathname = adjustPathname;
108
93
  //# sourceMappingURL=extractPathFromURL.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"extractPathFromURL.js","sourceRoot":"","sources":["../../src/fork/extractPathFromURL.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,sDAAwC;AAExC,8BAA8B;AAC9B,SAAS,uBAAuB,CAAC,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GAAG,GAAG,EAAE,CAAC;KACrB;IAED,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,SAAgB,sBAAsB,CAAC,MAAc,EAAE;IACrD,sEAAsE;IACtE,OAAO,uBAAuB,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;AACzD,CAAC;AAHD,wDAGC;AAED,SAAgB,cAAc,CAAC,GAAmD;IAChF,IAAI,GAAG,CAAC,QAAQ,KAAK,UAAU,IAAI,GAAG,CAAC,QAAQ,KAAK,YAAY,EAAE;QAChE,6CAA6C;QAC7C,OAAO,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;KACnD;IACD,OAAO,GAAG,CAAC,QAAQ,CAAC;AACtB,CAAC;AAND,wCAMC","sourcesContent":["import * as Linking from 'expo-linking';\n\n// This is only run on native.\nfunction extractExactPathFromURL(url: string): string {\n if (\n // If a universal link / app link / web URL is used, we should use the path\n // from the URL, while stripping the origin.\n url.match(/^https?:\\/\\//)\n ) {\n const { origin, href } = new URL(url);\n return href.replace(origin, '');\n }\n\n const isExpoGo = typeof expo !== 'undefined' && globalThis.expo?.modules?.ExpoGo;\n\n // Handle special URLs used in Expo Go: `/--/pathname` -> `pathname`\n if (\n isExpoGo &&\n // while not exhaustive, `exp` and `exps` are the only two schemes which\n // are passed through to other apps in Expo Go.\n url.match(/^exp(s)?:\\/\\//)\n ) {\n const pathname = url.match(/exps?:\\/\\/.*?\\/--\\/(.*)/)?.[1];\n if (pathname) {\n return fromDeepLink('a://' + pathname);\n }\n\n const res = Linking.parse(url);\n\n const qs = !res.queryParams\n ? ''\n : Object.entries(res.queryParams)\n .map(([k, v]) => `${k}=${v}`)\n .join('&');\n return (\n adjustPathname({ hostname: res.hostname, pathname: res.path || '' }) + (qs ? '?' + qs : '')\n );\n }\n\n // TODO: Support dev client URLs\n\n return fromDeepLink(url);\n}\n\n/** Major hack to support the makeshift expo-development-client system. */\nfunction isExpoDevelopmentClient(url: URL): boolean {\n return url.hostname === 'expo-development-client';\n}\n\nfunction fromDeepLink(url: string): string {\n let res: URL;\n try {\n // This is for all standard deep links, e.g. `foobar://` where everything\n // after the `://` is the path.\n res = new URL(url);\n } catch {\n return url;\n }\n\n if (isExpoDevelopmentClient(res)) {\n if (!res.searchParams.get('url')) {\n return '';\n }\n const incomingUrl = res.searchParams.get('url')!;\n return extractExactPathFromURL(decodeURI(incomingUrl));\n }\n\n let results = '';\n\n if (res.host) {\n results += res.host;\n }\n\n if (res.pathname) {\n results += res.pathname;\n }\n\n const qs = !res.search\n ? ''\n : // @ts-ignore: `entries` is not on `URLSearchParams` in some typechecks.\n [...res.searchParams.entries()].map(([k, v]) => `${k}=${decodeURIComponent(v)}`).join('&');\n\n if (qs) {\n results += '?' + qs;\n }\n\n return results;\n}\n\nexport function extractExpoPathFromURL(url: string = '') {\n // TODO: We should get rid of this, dropping specificities is not good\n return extractExactPathFromURL(url).replace(/^\\//, '');\n}\n\nexport function adjustPathname(url: { hostname?: string | null; pathname: string }) {\n if (url.hostname === 'exp.host' || url.hostname === 'u.expo.dev') {\n // drop the first two segments from pathname:\n return url.pathname.split('/').slice(2).join('/');\n }\n return url.pathname;\n}\n"]}
1
+ {"version":3,"file":"extractPathFromURL.js","sourceRoot":"","sources":["../../src/fork/extractPathFromURL.ts"],"names":[],"mappings":";;;AAAA,SAAgB,gCAAgC,CAAC,GAAW;IAI1D,+EAA+E;IAC/E,oFAAoF;IAEpF,MAAM,IAAI,GAAG,uBAAuB,CAAC,GAAG,CAAC,CAAC;IAC1C,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;IAC1C,OAAO;QACL,QAAQ,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE;QAC5B,WAAW,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE;KACh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AC1B,sEAAsE;SACrE,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CACtB,CAAC;AACJ,CAAC;AAND,wDAMC","sourcesContent":["export function parsePathAndParamsFromExpoGoLink(url: string): {\n pathname: string;\n queryString: string;\n} {\n // If the URL is defined (default in Expo Go dev apps) and the URL has no path:\n // `exp://192.168.87.39:19000/` then use the default `exp://192.168.87.39:19000/--/`\n\n const href = parsePathFromExpoGoLink(url);\n const results = href.match(/(.*?)(\\?.*)/);\n return {\n pathname: results?.[1] ?? '',\n queryString: results?.[2] ?? '',\n };\n}\n\nexport function parsePathFromExpoGoLink(url: string): string {\n // If the URL is defined (default in Expo Go dev apps) and the URL has no path:\n // `exp://192.168.87.39:19000/` then use the default `exp://192.168.87.39:19000/--/`\n return url.match(/exps?:\\/\\/.*?\\/--\\/(.*)/)?.[1] ?? '';\n}\n\n// This is only run on native.\nfunction extractExactPathFromURL(url: string): string {\n if (\n // If a universal link / app link / web URL is used, we should use the path\n // from the URL, while stripping the origin.\n url.match(/^https?:\\/\\//)\n ) {\n const { origin, href } = new URL(url);\n return href.replace(origin, '');\n }\n\n const isExpoGo = typeof expo !== 'undefined' && globalThis.expo?.modules?.ExpoGo;\n\n // Handle special URLs used in Expo Go: `/--/pathname` -> `pathname`\n if (\n isExpoGo &&\n // while not exhaustive, `exp` and `exps` are the only two schemes which\n // are passed through to other apps in Expo Go.\n url.match(/^exp(s)?:\\/\\//)\n ) {\n const pathname = parsePathFromExpoGoLink(url);\n if (pathname) {\n return fromDeepLink('a://' + pathname);\n }\n // Match the `?.*` segment of the URL.\n const queryParams = url.match(/exps?:\\/\\/.*\\?(.*)/)?.[1];\n if (queryParams) {\n return fromDeepLink('a://?' + queryParams);\n }\n\n return '';\n }\n\n // TODO: Support dev client URLs\n\n return fromDeepLink(url);\n}\n\n/** Major hack to support the makeshift expo-development-client system. */\nfunction isExpoDevelopmentClient(url: URL): boolean {\n return url.hostname === 'expo-development-client';\n}\n\nfunction fromDeepLink(url: string): string {\n let res: URL;\n try {\n // This is for all standard deep links, e.g. `foobar://` where everything\n // after the `://` is the path.\n res = new URL(url);\n } catch {\n return url;\n }\n\n if (isExpoDevelopmentClient(res)) {\n if (!res.searchParams.get('url')) {\n return '';\n }\n const incomingUrl = res.searchParams.get('url')!;\n return extractExactPathFromURL(decodeURI(incomingUrl));\n }\n\n let results = '';\n\n if (res.host) {\n results += res.host;\n }\n\n if (res.pathname) {\n results += res.pathname;\n }\n\n const qs = !res.search\n ? ''\n : // @ts-ignore: `entries` is not on `URLSearchParams` in some typechecks.\n [...res.searchParams.entries()].map(([k, v]) => `${k}=${decodeURIComponent(v)}`).join('&');\n\n if (qs) {\n results += '?' + qs;\n }\n\n return results;\n}\n\nexport function extractExpoPathFromURL(url: string = '') {\n return (\n extractExactPathFromURL(url)\n // TODO: We should get rid of this, dropping specificities is not good\n .replace(/^\\//, '')\n );\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"linking.d.ts","sourceRoot":"","sources":["../../src/link/linking.ts"],"names":[],"mappings":"AAIA,OAAO,gBAAgB,MAAM,0BAA0B,CAAC;AACxD,OAAO,gBAAgB,MAAM,0BAA0B,CAAC;AASxD,wBAAgB,aAAa,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,GAAG,MAAM,CA8C/D;AAID,wBAAgB,UAAU,IAAI,MAAM,CAKnC;AAED,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,cA4B/D;AAED,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,CAAC"}
1
+ {"version":3,"file":"linking.d.ts","sourceRoot":"","sources":["../../src/link/linking.ts"],"names":[],"mappings":"AAIA,OAAO,gBAAgB,MAAM,0BAA0B,CAAC;AACxD,OAAO,gBAAgB,MAAM,0BAA0B,CAAC;AAoBxD,wBAAgB,aAAa,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,GAAG,MAAM,CAoB/D;AAID,wBAAgB,UAAU,IAAI,MAAM,CAKnC;AAgBD,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,cAiB/D;AAED,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,CAAC"}
@@ -35,6 +35,15 @@ exports.getPathFromState = getPathFromState_1.default;
35
35
  const getStateFromPath_1 = __importDefault(require("../fork/getStateFromPath"));
36
36
  exports.getStateFromPath = getStateFromPath_1.default;
37
37
  const isExpoGo = typeof expo !== 'undefined' && globalThis.expo?.modules?.ExpoGo;
38
+ function getInitialURLWithTimeout() {
39
+ return Promise.race([
40
+ Linking.getInitialURL(),
41
+ new Promise((resolve) =>
42
+ // Timeout in 150ms if `getInitialState` doesn't resolve
43
+ // Workaround for https://github.com/facebook/react-native/issues/25675
44
+ setTimeout(() => resolve(null), 150)),
45
+ ]);
46
+ }
38
47
  // A custom getInitialURL is used on native to ensure the app always starts at
39
48
  // the root path if it's launched from something other than a deep link.
40
49
  // This helps keep the native functionality working like the web functionality.
@@ -52,33 +61,10 @@ function getInitialURL() {
52
61
  return window.location.href;
53
62
  }
54
63
  }
55
- return Promise.race([
56
- (async () => {
57
- const url = await Linking.getInitialURL();
58
- // NOTE(EvanBacon): This could probably be wrapped with the development boundary
59
- // since Expo Go is mostly just used in development.
60
- // Expo Go is weird and requires the root path to be `/--/`
61
- if (url && isExpoGo) {
62
- const parsed = Linking.parse(url);
63
- // If the URL is defined (default in Expo Go dev apps) and the URL has no path:
64
- // `exp://192.168.87.39:19000/` then use the default `exp://192.168.87.39:19000/--/`
65
- if (parsed.path === null ||
66
- ['', '/'].includes((0, extractPathFromURL_1.adjustPathname)({
67
- hostname: parsed.hostname,
68
- pathname: parsed.path,
69
- }))) {
70
- return getRootURL();
71
- }
72
- }
73
- // The path will be nullish in bare apps when the app is launched from the home screen.
74
- // TODO(EvanBacon): define some policy around notifications.
75
- return url ?? getRootURL();
76
- })(),
77
- new Promise((resolve) =>
78
- // Timeout in 150ms if `getInitialState` doesn't resolve
79
- // Workaround for https://github.com/facebook/react-native/issues/25675
80
- setTimeout(() => resolve(getRootURL()), 150)),
81
- ]);
64
+ return getInitialURLWithTimeout().then((url) => parseExpoGoUrlFromListener(url) ??
65
+ // The path will be nullish in bare apps when the app is launched from the home screen.
66
+ // TODO(EvanBacon): define some policy around notifications.
67
+ getRootURL());
82
68
  }
83
69
  exports.getInitialURL = getInitialURL;
84
70
  let _rootURL;
@@ -89,21 +75,25 @@ function getRootURL() {
89
75
  return _rootURL;
90
76
  }
91
77
  exports.getRootURL = getRootURL;
78
+ // Expo Go is weird and requires the root path to be `/--/`
79
+ function parseExpoGoUrlFromListener(url) {
80
+ if (!url || !isExpoGo) {
81
+ return url;
82
+ }
83
+ const { pathname, queryString } = (0, extractPathFromURL_1.parsePathAndParamsFromExpoGoLink)(url);
84
+ // If the URL is defined (default in Expo Go dev apps) and the URL has no path:
85
+ // `exp://192.168.87.39:19000/` then use the default `exp://192.168.87.39:19000/--/`
86
+ if (!pathname || pathname === '/') {
87
+ return (getRootURL() + queryString);
88
+ }
89
+ return url;
90
+ }
92
91
  function addEventListener(listener) {
93
92
  let callback;
94
93
  if (isExpoGo) {
95
94
  // This extra work is only done in the Expo Go app.
96
95
  callback = ({ url }) => {
97
- const parsed = Linking.parse(url);
98
- // If the URL is defined (default in Expo Go dev apps) and the URL has no path:
99
- // `exp://192.168.87.39:19000/` then use the default `exp://192.168.87.39:19000/--/`
100
- if (parsed.path === null ||
101
- ['', '/'].includes((0, extractPathFromURL_1.adjustPathname)({ hostname: parsed.hostname, pathname: parsed.path }))) {
102
- listener(getRootURL());
103
- }
104
- else {
105
- listener(url);
106
- }
96
+ listener(parseExpoGoUrlFromListener(url));
107
97
  };
108
98
  }
109
99
  else {
@@ -1 +1 @@
1
- {"version":3,"file":"linking.js","sourceRoot":"","sources":["../../src/link/linking.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,sDAAwC;AAC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D,MAAM,YAAY,GAAG,OAAO,CAAC,gBAAgB,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;IAE/D,OAAO,GAAG,EAAE;QACV,2FAA2F;QAC3F,YAAY,EAAE,MAAM,EAAE,EAAE,CAAC;IAC3B,CAAC,CAAC;AACJ,CAAC;AA5BD,4CA4BC","sourcesContent":["import * as Linking from 'expo-linking';\nimport { Platform } from 'react-native';\n\nimport { adjustPathname } from '../fork/extractPathFromURL';\nimport getPathFromState from '../fork/getPathFromState';\nimport getStateFromPath from '../fork/getStateFromPath';\n\nconst isExpoGo = typeof expo !== 'undefined' && globalThis.expo?.modules?.ExpoGo;\n\n// A custom getInitialURL is used on native to ensure the app always starts at\n// the root path if it's launched from something other than a deep link.\n// This helps keep the native functionality working like the web functionality.\n// For example, if you had a root navigator where the first screen was `/settings` and the second was `/index`\n// then `/index` would be used on web and `/settings` would be used on native.\nexport function getInitialURL(): Promise<string | null> | string {\n if (process.env.NODE_ENV === 'test') {\n return Linking.getInitialURL() ?? getRootURL();\n }\n\n if (Platform.OS === 'web') {\n if (typeof window === 'undefined') {\n return '';\n } else if (window.location?.href) {\n return window.location.href;\n }\n }\n return Promise.race<string>([\n (async () => {\n const url = await Linking.getInitialURL();\n\n // NOTE(EvanBacon): This could probably be wrapped with the development boundary\n // since Expo Go is mostly just used in development.\n\n // Expo Go is weird and requires the root path to be `/--/`\n if (url && isExpoGo) {\n const parsed = Linking.parse(url);\n // If the URL is defined (default in Expo Go dev apps) and the URL has no path:\n // `exp://192.168.87.39:19000/` then use the default `exp://192.168.87.39:19000/--/`\n if (\n parsed.path === null ||\n ['', '/'].includes(\n adjustPathname({\n hostname: parsed.hostname,\n pathname: parsed.path,\n })\n )\n ) {\n return getRootURL();\n }\n }\n // The path will be nullish in bare apps when the app is launched from the home screen.\n // TODO(EvanBacon): define some policy around notifications.\n return url ?? getRootURL();\n })(),\n new Promise<string>((resolve) =>\n // Timeout in 150ms if `getInitialState` doesn't resolve\n // Workaround for https://github.com/facebook/react-native/issues/25675\n setTimeout(() => resolve(getRootURL()), 150)\n ),\n ]);\n}\n\nlet _rootURL: string | undefined;\n\nexport function getRootURL(): string {\n if (_rootURL === undefined) {\n _rootURL = Linking.createURL('/');\n }\n return _rootURL;\n}\n\nexport function addEventListener(listener: (url: string) => void) {\n let callback: (({ url }: { url: string }) => void) | undefined;\n\n if (isExpoGo) {\n // This extra work is only done in the Expo Go app.\n callback = ({ url }: { url: string }) => {\n const parsed = Linking.parse(url);\n\n // If the URL is defined (default in Expo Go dev apps) and the URL has no path:\n // `exp://192.168.87.39:19000/` then use the default `exp://192.168.87.39:19000/--/`\n if (\n parsed.path === null ||\n ['', '/'].includes(adjustPathname({ hostname: parsed.hostname, pathname: parsed.path }))\n ) {\n listener(getRootURL());\n } else {\n listener(url);\n }\n };\n } else {\n callback = ({ url }: { url: string }) => listener(url);\n }\n const subscription = Linking.addEventListener('url', callback);\n\n return () => {\n // https://github.com/facebook/react-native/commit/6d1aca806cee86ad76de771ed3a1cc62982ebcd7\n subscription?.remove?.();\n };\n}\n\nexport { getStateFromPath, getPathFromState };\n"]}
1
+ {"version":3,"file":"linking.js","sourceRoot":"","sources":["../../src/link/linking.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,sDAAwC;AACxC,+CAAwC;AAExC,mEAA8E;AAC9E,gFAAwD;AAqF7B,2BArFpB,0BAAgB,CAqFoB;AApF3C,gFAAwD;AAoF/C,2BApFF,0BAAgB,CAoFE;AAlFzB,MAAM,QAAQ,GAAG,OAAO,IAAI,KAAK,WAAW,IAAI,UAAU,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,CAAC;AAEjF,SAAS,wBAAwB;IAC/B,OAAO,OAAO,CAAC,IAAI,CAAC;QAClB,OAAO,CAAC,aAAa,EAAE;QACvB,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,EAAE;QAC5B,wDAAwD;QACxD,uEAAuE;QACvE,UAAU,CAAC,GAAG,EA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AAO,CAAC,UAAU,EAAE,GAAG,WAAW,CAAM,CAAC;KAC1C;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AAED,SAAgB,gBAAgB,CAAC,QAA+B;IAC9D,IAAI,QAA0D,CAAC;IAE/D,IAAI,QAAQ,EAAE;QACZ,mDAAmD;QACnD,QAAQ,GAAG,CAAC,EAAE,GAAG,EAAmB,EAAE,EAAE;YACtC,QAAQ,CAAC,0BAA0B,CAAC,GAAG,CAAC,CAAC,CAAC;QAC5C,CAAC,CAAC;KACH;SAAM;QACL,QAAQ,GAAG,CAAC,EAAE,GAAG,EAAmB,EAAE,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;KACxD;IACD,MAAM,YAAY,GAAG,OAAO,CAAC,gBAAgB,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;IAE/D,OAAO,GAAG,EAAE;QACV,2FAA2F;QAC3F,YAAY,EAAE,MAAM,EAAE,EAAE,CAAC;IAC3B,CAAC,CAAC;AACJ,CAAC;AAjBD,4CAiBC","sourcesContent":["import * as Linking from 'expo-linking';\nimport { Platform } from 'react-native';\n\nimport { parsePathAndParamsFromExpoGoLink } from '../fork/extractPathFromURL';\nimport getPathFromState from '../fork/getPathFromState';\nimport getStateFromPath from '../fork/getStateFromPath';\n\nconst isExpoGo = typeof expo !== 'undefined' && globalThis.expo?.modules?.ExpoGo;\n\nfunction getInitialURLWithTimeout(): Promise<string | null> {\n return Promise.race([\n Linking.getInitialURL(),\n new Promise<null>((resolve) =>\n // Timeout in 150ms if `getInitialState` doesn't resolve\n // Workaround for https://github.com/facebook/react-native/issues/25675\n setTimeout(() => resolve(null), 150)\n ),\n ]);\n}\n\n// A custom getInitialURL is used on native to ensure the app always starts at\n// the root path if it's launched from something other than a deep link.\n// This helps keep the native functionality working like the web functionality.\n// For example, if you had a root navigator where the first screen was `/settings` and the second was `/index`\n// then `/index` would be used on web and `/settings` would be used on native.\nexport function getInitialURL(): Promise<string | null> | string {\n if (process.env.NODE_ENV === 'test') {\n return Linking.getInitialURL() ?? getRootURL();\n }\n\n if (Platform.OS === 'web') {\n if (typeof window === 'undefined') {\n return '';\n } else if (window.location?.href) {\n return window.location.href;\n }\n }\n\n return getInitialURLWithTimeout().then(\n (url) =>\n parseExpoGoUrlFromListener(url) ??\n // The path will be nullish in bare apps when the app is launched from the home screen.\n // TODO(EvanBacon): define some policy around notifications.\n getRootURL()\n );\n}\n\nlet _rootURL: string | undefined;\n\nexport function getRootURL(): string {\n if (_rootURL === undefined) {\n _rootURL = Linking.createURL('/');\n }\n return _rootURL;\n}\n\n// Expo Go is weird and requires the root path to be `/--/`\nfunction parseExpoGoUrlFromListener<T extends string | null>(url: T): T {\n if (!url || !isExpoGo) {\n return url;\n }\n const { pathname, queryString } = parsePathAndParamsFromExpoGoLink(url);\n // If the URL is defined (default in Expo Go dev apps) and the URL has no path:\n // `exp://192.168.87.39:19000/` then use the default `exp://192.168.87.39:19000/--/`\n if (!pathname || pathname === '/') {\n return (getRootURL() + queryString) as T;\n }\n return url;\n}\n\nexport function addEventListener(listener: (url: string) => void) {\n let callback: (({ url }: { url: string }) => void) | undefined;\n\n if (isExpoGo) {\n // This extra work is only done in the Expo Go app.\n callback = ({ url }: { url: string }) => {\n listener(parseExpoGoUrlFromListener(url));\n };\n } else {\n callback = ({ url }: { url: string }) => listener(url);\n }\n const subscription = Linking.addEventListener('url', callback);\n\n return () => {\n // https://github.com/facebook/react-native/commit/6d1aca806cee86ad76de771ed3a1cc62982ebcd7\n subscription?.remove?.();\n };\n}\n\nexport { getStateFromPath, getPathFromState };\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-router",
3
- "version": "3.5.1",
3
+ "version": "3.5.3",
4
4
  "description": "Expo Router is a file-based router for React Native and web applications.",
5
5
  "author": "650 Industries, Inc.",
6
6
  "license": "MIT",
@@ -92,15 +92,15 @@
92
92
  "tsd": "^0.28.1"
93
93
  },
94
94
  "dependencies": {
95
- "@expo/metro-runtime": "3.2.0",
95
+ "@expo/metro-runtime": "3.2.1",
96
96
  "@expo/server": "^0.4.0",
97
97
  "@radix-ui/react-slot": "1.0.1",
98
98
  "@react-navigation/bottom-tabs": "~6.5.7",
99
99
  "@react-navigation/native": "~6.1.6",
100
100
  "@react-navigation/native-stack": "~6.9.12",
101
- "expo-splash-screen": "0.27.1",
101
+ "expo-splash-screen": "0.27.2",
102
102
  "react-helmet-async": "^1.3.0",
103
103
  "schema-utils": "^4.0.1"
104
104
  },
105
- "gitHead": "0897aeadb926491a457bcd67d83360956994ee82"
105
+ "gitHead": "f47e3af17a790a34b95fe10dda8383389e7d74e2"
106
106
  }
@@ -182,7 +182,7 @@ export namespace ExpoRouter {
182
182
  navigate: (href: Href) => void;
183
183
  /** Navigate to route without appending to the history. */
184
184
  replace: (href: Href) => void;
185
- /** Navigate to the provided href using a push operation if possible. */
185
+ /** Navigate to a screen with a stack lower than the current screen. Using the provided count if possible, otherwise 1. */
186
186
  dismiss: (count?: number) => void;
187
187
  /** Navigate to first screen within the lowest stack. */
188
188
  dismissAll: () => void;