first commit

This commit is contained in:
2026-03-10 16:18:05 +00:00
commit 11f9c069b5
31635 changed files with 3187747 additions and 0 deletions

2
node_modules/expo-linking/.eslintrc.js generated vendored Normal file
View File

@@ -0,0 +1,2 @@
// @generated by expo-module-scripts
module.exports = require('expo-module-scripts/eslintrc.base.js');

393
node_modules/expo-linking/CHANGELOG.md generated vendored Normal file
View File

@@ -0,0 +1,393 @@
# Changelog
## Unpublished
### 🛠 Breaking changes
### 🎉 New features
### 🐛 Bug fixes
### 💡 Others
## 55.0.7 — 2026-02-25
_This version does not introduce any user-facing changes._
## 55.0.6 — 2026-02-20
_This version does not introduce any user-facing changes._
## 55.0.5 — 2026-02-20
_This version does not introduce any user-facing changes._
## 55.0.4 — 2026-02-08
_This version does not introduce any user-facing changes._
## 55.0.3 — 2026-01-26
_This version does not introduce any user-facing changes._
## 55.0.2 — 2026-01-23
_This version does not introduce any user-facing changes._
## 55.0.1 — 2026-01-22
_This version does not introduce any user-facing changes._
## 55.0.0 — 2026-01-21
_This version does not introduce any user-facing changes._
## 8.0.10 - 2025-12-05
_This version does not introduce any user-facing changes._
## 8.0.9 - 2025-11-17
_This version does not introduce any user-facing changes._
## 8.0.8 — 2025-09-11
_This version does not introduce any user-facing changes._
## 8.0.7 — 2025-09-03
_This version does not introduce any user-facing changes._
## 8.0.6 — 2025-08-31
_This version does not introduce any user-facing changes._
## 8.0.5 — 2025-08-28
_This version does not introduce any user-facing changes._
## 8.0.4 — 2025-08-26
_This version does not introduce any user-facing changes._
## 8.0.3 — 2025-08-21
_This version does not introduce any user-facing changes._
## 8.0.2 — 2025-08-16
_This version does not introduce any user-facing changes._
## 8.0.1 — 2025-08-15
_This version does not introduce any user-facing changes._
## 8.0.0 — 2025-08-13
_This version does not introduce any user-facing changes._
## 7.1.7 - 2025-07-03
### 🐛 Bug fixes
- Fix cold booting iOS apps from a universal link. ([#37647](https://github.com/expo/expo/pull/37647) by [@EvanBacon](https://github.com/EvanBacon))
## 7.1.6 - 2025-07-01
### 💡 Others
- Deprecate `useURL` in favor of `useLinkingURL`. ([#37005](https://github.com/expo/expo/pull/37005) by [@aleqsio](https://github.com/aleqsio))
- Remove "Please" from warnings and errors ([#36862](https://github.com/expo/expo/pull/36862) by [@brentvatne](https://github.com/brentvatne))
## 7.1.5 — 2025-05-08
### 🐛 Bug fixes
- Fixed `createURL` double-encodes URI parameters. ([#36704](https://github.com/expo/expo/pull/36704) by [@lukmccall](https://github.com/lukmccall))
## 7.1.4 — 2025-04-30
_This version does not introduce any user-facing changes._
## 7.1.3 — 2025-04-25
_This version does not introduce any user-facing changes._
## 7.1.2 — 2025-04-14
_This version does not introduce any user-facing changes._
## 7.1.1 — 2025-04-09
_This version does not introduce any user-facing changes._
## 7.1.0 — 2025-04-04
### 🎉 New features
- Add macOS support. ([#35064](https://github.com/expo/expo/pull/35064) by [@gabrieldonadel](https://github.com/gabrieldonadel))
### 💡 Others
- [Android] Started using expo modules gradle plugin. ([#34176](https://github.com/expo/expo/pull/34176) by [@lukmccall](https://github.com/lukmccall))
- [apple] Migrate remaining `expo-module.config.json` to unified platform syntax. ([#34445](https://github.com/expo/expo/pull/34445) by [@reichhartd](https://github.com/reichhartd))
## 7.0.5 - 2025-01-27
### 🎉 New features
- [iOS] Add basic support for App Clips. ([#34327](https://github.com/expo/expo/pull/34327) by [@EvanBacon](https://github.com/EvanBacon))
## 7.0.4 - 2025-01-10
_This version does not introduce any user-facing changes._
## 7.0.3 — 2024-11-19
### 🐛 Bug fixes
- [iOS] Fix `addEventListener` and `useURL` hook. ([#33076](https://github.com/expo/expo/pull/33076) by [@gabrieldonadel](https://github.com/gabrieldonadel))
## 7.0.2 — 2024-10-25
_This version does not introduce any user-facing changes._
## 7.0.1 — 2024-10-24
### 🐛 Bug fixes
- [iOS] Add tvOS to podspec. ([#32255](https://github.com/expo/expo/pull/32255) by [@douglowder](https://github.com/douglowder))
## 7.0.0 — 2024-10-22
### 🛠 Breaking changes
- Bumped iOS deployment target to 15.1. ([#30840](https://github.com/expo/expo/pull/30840) by [@tsapeta](https://github.com/tsapeta))
### 🎉 New features
- Add shims for `react-server` environments. ([#31622](https://github.com/expo/expo/pull/31622) by [@EvanBacon](https://github.com/EvanBacon))
- Add native `getLinkingURL` function. ([#29405](https://github.com/expo/expo/pull/29405) by [@aleqsio](https://github.com/aleqsio))
### 🐛 Bug fixes
- Add missing `react` and `react-native` peer dependencies for isolated modules. ([#30473](https://github.com/expo/expo/pull/30473) by [@byCedric](https://github.com/byCedric))
### 💡 Others
- Standardized Babel configuration to use `expo-module-scripts`. ([#31915](https://github.com/expo/expo/pull/31915) by [@reichhartd](https://github.com/reichhartd))
## 6.3.1 — 2024-04-23
_This version does not introduce any user-facing changes._
## 6.3.0 — 2024-04-18
_This version does not introduce any user-facing changes._
## 6.2.2 - 2024-01-12
_This version does not introduce any user-facing changes._
## 6.2.1 — 2023-12-12
_This version does not introduce any user-facing changes._
## 6.2.0 — 2023-11-14
### 💡 Others
- Migrate to new standard `URL` support on native. ([#24941](https://github.com/expo/expo/pull/24941) by [@EvanBacon](https://github.com/EvanBacon))
## 6.1.1 — 2023-10-17
_This version does not introduce any user-facing changes._
## 6.1.0 — 2023-09-15
### 🛠 Breaking changes
- Remove deprecated `makeUrl` function. ([#24300](https://github.com/expo/expo/pull/24300) by [@EvanBacon](https://github.com/EvanBacon))
### 🐛 Bug fixes
- Fix parsing web URLs with `+` symbols in the pathname. ([#24300](https://github.com/expo/expo/pull/24300) by [@EvanBacon](https://github.com/EvanBacon))
### 💡 Others
- Reduce bundle size on web. ([#24300](https://github.com/expo/expo/pull/24300) by [@EvanBacon](https://github.com/EvanBacon))
## 6.0.0 — 2023-08-02
_This version does not introduce any user-facing changes._
## 5.0.2 — 2023-06-24
_This version does not introduce any user-facing changes._
## 5.0.1 — 2023-06-22
_This version does not introduce any user-facing changes._
## 5.0.0 — 2023-06-21
### 🛠 Breaking changes
- Drop support for `detach.scheme` schemes (ExpoKit). ([#22848](https://github.com/expo/expo/pull/22848) by [@EvanBacon](https://github.com/EvanBacon))
## 4.1.0 — 2023-05-08
### 💡 Others
- Warn on use of Constants.manifest. ([#22247](https://github.com/expo/expo/pull/22247) by [@wschurman](https://github.com/wschurman))
## 4.0.1 — 2023-02-09
_This version does not introduce any user-facing changes._
## 4.0.0 — 2023-02-03
### 🛠 Breaking changes
- Removed the deprecated `Linking.removeEventListener`. ([#20832](https://github.com/expo/expo/pull/20832) by [@kudo](https://github.com/kudo))
### 💡 Others
- Fix link in README that was incorrectly pointing to to expo-asset. ([#20616](https://github.com/expo/expo/pull/20616) by [@stereoplegic](https://github.com/stereoplegic))
## 3.3.1 — 2023-02-27
### 🐛 Bug fixes
- Fixed crash when calling `Linking.removeEventListener` and added warning about `Linking.removeEventListener` being removed from react-native. ([#21371](https://github.com/expo/expo/pull/21371) by [@gabrieldonadel](https://github.com/gabrieldonadel))
## 3.2.3 — 2022-10-25
### 🐛 Bug fixes
- Recognize EAS Updates (u.expo.dev) URL's as Expo-hosted so `createURL` can make a valid default URL for expo-auth-session ([#19258](https://github.com/expo/expo/pull/19258) by [@confraria](https://github.com/confraria)) and [@keith-kurak](https://github.com/keith-kurak))
### 💡 Others
- Update docs link. ([#18935](https://github.com/expo/expo/pull/18935) by [@EvanBacon](https://github.com/EvanBacon))
## 3.2.2 — 2022-07-25
_This version does not introduce any user-facing changes._
## 3.2.1 — 2022-07-16
_This version does not introduce any user-facing changes._
## 3.2.0 — 2022-07-07
### 🐛 Bug fixes
- Fix bug in isExpoHosted for new manifests. ([#17402](https://github.com/expo/expo/pull/17402) by [@wschurman](https://github.com/wschurman))
- Fix `addEventListener` not returning a subscription on web. ([#17925](https://github.com/expo/expo/pull/17925) by [@EvanBacon](https://github.com/EvanBacon))
## 3.1.0 — 2022-04-18
### 🎉 New features
- `addEventListener` returns `EmitterSubscription` rather than `void` ([#17014](https://github.com/expo/expo/pull/17014) by [@frankcalise](https://github.com/frankcalise))
### 🐛 Bug fixes
- `addEventListener` and `removeEventListener` only accept `'url'` as `type` param, rather than `string`
- `useURL` hook now cleans up `addEventListener` via `remove` rather than `removeEventListener` ([#17014](https://github.com/expo/expo/pull/17014) by [@frankcalise](https://github.com/frankcalise))
### 💡 Others
- Export public `Schemes` methods in main file. ([#17058](https://github.com/expo/expo/pull/17058) by [@Simek](https://github.com/Simek))
## 3.0.0 — 2021-12-03
### 🛠 Breaking changes
- Remove deprecated `useUrl` method. ([#15226](https://github.com/expo/expo/pull/15226) by [@Simek](https://github.com/Simek))
### 💡 Others
- Update `qs` dependency. ([#15069](https://github.com/expo/expo/pull/15069) by [@Simek](https://github.com/Simek))
- Extract `sendIntent` method `extras` parameter to the separate type named `SendIntentExtras`. ([#15226](https://github.com/expo/expo/pull/15226) by [@Simek](https://github.com/Simek))
## 2.4.1 — 2021-10-01
_This version does not introduce any user-facing changes._
## 2.4.0 — 2021-09-09
### 🎉 New features
- Update JS code to read manifest2 when manifest is not available. ([#13602](https://github.com/expo/expo/pull/13602) by [@wschurman](https://github.com/wschurman))
## 2.3.0 — 2021-06-16
### 🐛 Bug fixes
- Fix accidental condition that caused AuthSession Google Provider to error when no scheme in Expo Go. ([#12846](https://github.com/expo/expo/pull/12846) by [@brentvatne](https://github.com/brentvatne))
- Add new manifest2 field and make existing field optional. ([#12817](https://github.com/expo/expo/pull/12817) by [@wschurman](https://github.com/wschurman))
## 2.2.3 — 2021-04-13
_This version does not introduce any user-facing changes._
## 2.2.2 — 2021-04-09
### 🎉 New features
- Add internal ability to skip warnings for scheme resolution. ([#12464](https://github.com/expo/expo/pull/12464) by [@EvanBacon](https://github.com/EvanBacon))
## 2.2.1 — 2021-03-30
### 🐛 Bug fixes
- Replace useUrl with useURL and update documentation. ([#12310](https://github.com/expo/expo/pull/12310) by [@brentvatne](https://github.com/brentvatne))
## 2.2.0 — 2021-03-10
### 🐛 Bug fixes
- Remove peerDependencies and unimodulePeerDependencies from Expo modules. ([#11980](https://github.com/expo/expo/pull/11980) by [@brentvatne](https://github.com/brentvatne))
## 2.1.1 — 2021-01-21
### 🎉 New features
- Added bare workflow support. ([#11560](https://github.com/expo/expo/pull/11560) by [@EvanBacon](https://github.com/EvanBacon))
- `Linking.createURL` creates URLs with two slashes in bare workflow. ([#11702](https://github.com/expo/expo/pull/11702) by [@EvanBacon](https://github.com/EvanBacon))
## 2.1.0 — 2021-01-15
### 🐛 Bug fixes
- Removed `fbjs` dependency ([#11396](https://github.com/expo/expo/pull/11396) by [@cruzach](https://github.com/cruzach))
## 2.0.0 — 2020-12-08
_This version does not introduce any user-facing changes._
## 1.0.6 — 2020-11-17
### 🐛 Bug fixes
- Improved mechanism used to determine whether in bare or managed workflow. ([#10993](https://github.com/expo/expo/pull/10993) by [@esamelson](https://github.com/esamelson))
## 1.0.5 — 2020-10-22
### 🐛 Bug fixes
- Prevent crash in bare workflow if `Constants.manifest` isn't defined.
## 1.0.4 — 2020-08-18
_This version does not introduce any user-facing changes._
## 1.0.3 — 2020-05-29
_This version does not introduce any user-facing changes._
## 1.0.2 — 2020-05-27
_This version does not introduce any user-facing changes._

26
node_modules/expo-linking/README.md generated vendored Normal file
View File

@@ -0,0 +1,26 @@
# expo-linking
Create and open deep links universally.
# API documentation
- [Documentation for the latest stable release](https://docs.expo.dev/versions/latest/sdk/linking/)
- [Documentation for the main branch](https://docs.expo.dev/versions/unversioned/sdk/linking/)
# Installation in managed Expo projects
For [managed](https://docs.expo.dev/archive/managed-vs-bare/) Expo projects, please follow the installation instructions in the [API documentation for the latest stable release](https://docs.expo.dev/versions/latest/sdk/linking/). If you follow the link and there is no documentation available then this library is not yet usable within managed projects — it is likely to be included in an upcoming Expo SDK release.
# Installation in bare React Native projects
For bare React Native projects, you must ensure that you have [installed and configured the `expo` package](https://docs.expo.dev/bare/installing-expo-modules/) before continuing.
### Add the package to your npm dependencies
```
npx expo install expo-linking
```
# Contributing
Contributions are very welcome! Please refer to guidelines described in the [contributing guide](https://github.com/expo/expo#contributing).

18
node_modules/expo-linking/android/build.gradle generated vendored Normal file
View File

@@ -0,0 +1,18 @@
plugins {
id 'com.android.library'
id 'expo-module-gradle-plugin'
}
group = 'host.exp.exponent'
version = '55.0.7'
android {
namespace "expo.modules.linking"
defaultConfig {
versionCode 1
versionName "55.0.7"
}
lintOptions {
abortOnError false
}
}

View File

@@ -0,0 +1,2 @@
<manifest>
</manifest>

View File

@@ -0,0 +1,39 @@
package expo.modules.linking
import android.net.Uri
import androidx.core.os.bundleOf
import expo.modules.kotlin.modules.Module
import expo.modules.kotlin.modules.ModuleDefinition
import java.lang.ref.WeakReference
class ExpoLinkingModule : Module() {
companion object {
var initialURL: Uri? = null
var onURLReceivedObservers: MutableSet<((Uri?) -> Unit)> = mutableSetOf()
}
private var onURLReceivedObserver: ((Uri?) -> Unit)? = null
override fun definition() = ModuleDefinition {
Name("ExpoLinking")
Events("onURLReceived")
Function("getLinkingURL") {
initialURL?.toString()
}
OnStartObserving("onURLReceived") {
val weakModule = WeakReference(this@ExpoLinkingModule)
val observer: (Uri?) -> Unit = { uri: Uri? ->
weakModule.get()?.sendEvent("onURLReceived", bundleOf("url" to uri?.toString()))
}
onURLReceivedObservers.add(observer)
onURLReceivedObserver = observer
}
OnStopObserving("onURLReceived") {
onURLReceivedObservers.remove(onURLReceivedObserver)
}
}
}

View File

@@ -0,0 +1,11 @@
package expo.modules.linking
import android.content.Context
import expo.modules.core.interfaces.Package
import expo.modules.core.interfaces.ReactActivityLifecycleListener
class ExpoLinkingPackage : Package {
override fun createReactActivityLifecycleListeners(activityContext: Context?): List<ReactActivityLifecycleListener> {
return listOf(LinkingReactActivityLifecycleListener())
}
}

View File

@@ -0,0 +1,26 @@
package expo.modules.linking
import android.app.Activity
import android.content.Intent
import android.net.Uri
import android.os.Bundle
import expo.modules.core.interfaces.ReactActivityLifecycleListener
class LinkingReactActivityLifecycleListener : ReactActivityLifecycleListener {
override fun onCreate(activity: Activity?, savedInstanceState: Bundle?) {
onReceiveURL(activity?.intent?.data)
}
override fun onNewIntent(intent: Intent?): Boolean {
onReceiveURL(intent?.data)
return true
}
private fun onReceiveURL(url: Uri?) {
if (url == null) {
return
}
ExpoLinkingModule.initialURL = url
ExpoLinkingModule.onURLReceivedObservers.forEach { it -> it(url) }
}
}

10
node_modules/expo-linking/build/ExpoLinking.d.ts generated vendored Normal file
View File

@@ -0,0 +1,10 @@
import { NativeModule } from 'expo-modules-core';
type ExpoLinkingModuleEvents = {
onURLReceived(url: string): void;
};
declare class ExpoLinkingNativeModule extends NativeModule<ExpoLinkingModuleEvents> {
getLinkingURL(): string | null;
}
declare const ExpoLinking: ExpoLinkingNativeModule;
export default ExpoLinking;
//# sourceMappingURL=ExpoLinking.d.ts.map

1
node_modules/expo-linking/build/ExpoLinking.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"ExpoLinking.d.ts","sourceRoot":"","sources":["../src/ExpoLinking.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEtE,KAAK,uBAAuB,GAAG;IAC7B,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;CAClC,CAAC;AAEF,OAAO,OAAO,uBAAwB,SAAQ,YAAY,CAAC,uBAAuB,CAAC;IACjF,aAAa,IAAI,MAAM,GAAG,IAAI;CAC/B;AAED,QAAA,MAAM,WAAW,yBAA8D,CAAC;AAChF,eAAe,WAAW,CAAC"}

4
node_modules/expo-linking/build/ExpoLinking.js generated vendored Normal file
View File

@@ -0,0 +1,4 @@
import { requireNativeModule } from 'expo-modules-core';
const ExpoLinking = requireNativeModule('ExpoLinking');
export default ExpoLinking;
//# sourceMappingURL=ExpoLinking.js.map

1
node_modules/expo-linking/build/ExpoLinking.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"ExpoLinking.js","sourceRoot":"","sources":["../src/ExpoLinking.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAgB,MAAM,mBAAmB,CAAC;AAUtE,MAAM,WAAW,GAAG,mBAAmB,CAA0B,aAAa,CAAC,CAAC;AAChF,eAAe,WAAW,CAAC","sourcesContent":["import { requireNativeModule, NativeModule } from 'expo-modules-core';\n\ntype ExpoLinkingModuleEvents = {\n onURLReceived(url: string): void;\n};\n\ndeclare class ExpoLinkingNativeModule extends NativeModule<ExpoLinkingModuleEvents> {\n getLinkingURL(): string | null;\n}\n\nconst ExpoLinking = requireNativeModule<ExpoLinkingNativeModule>('ExpoLinking');\nexport default ExpoLinking;\n"]}

9
node_modules/expo-linking/build/ExpoLinking.web.d.ts generated vendored Normal file
View File

@@ -0,0 +1,9 @@
import { URLListener } from './Linking.types';
declare const _default: {
addListener(eventName: "onURLReceived" | string, listener: URLListener): {
remove(): void;
};
getLinkingURL(): string;
};
export default _default;
//# sourceMappingURL=ExpoLinking.web.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"ExpoLinking.web.d.ts","sourceRoot":"","sources":["../src/ExpoLinking.web.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;;2BAGrB,eAAe,GAAG,MAAM,YAAY,WAAW,GAAG;QAAE,MAAM,IAAI,IAAI,CAAA;KAAE;qBAoB1E,MAAM;;AArBzB,wBAyBE"}

23
node_modules/expo-linking/build/ExpoLinking.web.js generated vendored Normal file
View File

@@ -0,0 +1,23 @@
import invariant from 'invariant';
export default {
addListener(eventName, listener) {
invariant(eventName === 'onURLReceived', `Linking.addListener(): ${eventName} is not a valid event`);
// Do nothing in Node.js environments
if (typeof window === 'undefined') {
return { remove() { } };
}
const nativeListener = (nativeEvent) => listener({ url: window.location.href, nativeEvent });
window.addEventListener('message', nativeListener, false);
return {
remove: () => {
window.removeEventListener('message', nativeListener);
},
};
},
getLinkingURL() {
if (typeof window === 'undefined')
return '';
return window.location.href;
},
};
//# sourceMappingURL=ExpoLinking.web.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"ExpoLinking.web.js","sourceRoot":"","sources":["../src/ExpoLinking.web.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,WAAW,CAAC;AAIlC,eAAe;IACb,WAAW,CAAC,SAAmC,EAAE,QAAqB;QACpE,SAAS,CACP,SAAS,KAAK,eAAe,EAC7B,0BAA0B,SAAS,uBAAuB,CAC3D,CAAC;QACF,qCAAqC;QACrC,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE,CAAC;YAClC,OAAO,EAAE,MAAM,KAAI,CAAC,EAAE,CAAC;QACzB,CAAC;QAED,MAAM,cAAc,GAAG,CAAC,WAAyB,EAAE,EAAE,CACnD,QAAQ,CAAC,EAAE,GAAG,EAAE,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,WAAW,EAAE,CAAC,CAAC;QACvD,MAAM,CAAC,gBAAgB,CAAC,SAAS,EAAE,cAAc,EAAE,KAAK,CAAC,CAAC;QAC1D,OAAO;YACL,MAAM,EAAE,GAAG,EAAE;gBACX,MAAM,CAAC,mBAAmB,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC;YACxD,CAAC;SACF,CAAC;IACJ,CAAC;IAED,aAAa;QACX,IAAI,OAAO,MAAM,KAAK,WAAW;YAAE,OAAO,EAAE,CAAC;QAC7C,OAAO,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC;IAC9B,CAAC;CACF,CAAC","sourcesContent":["import invariant from 'invariant';\n\nimport { URLListener } from './Linking.types';\n\nexport default {\n addListener(eventName: 'onURLReceived' | string, listener: URLListener): { remove(): void } {\n invariant(\n eventName === 'onURLReceived',\n `Linking.addListener(): ${eventName} is not a valid event`\n );\n // Do nothing in Node.js environments\n if (typeof window === 'undefined') {\n return { remove() {} };\n }\n\n const nativeListener = (nativeEvent: MessageEvent) =>\n listener({ url: window.location.href, nativeEvent });\n window.addEventListener('message', nativeListener, false);\n return {\n remove: () => {\n window.removeEventListener('message', nativeListener);\n },\n };\n },\n\n getLinkingURL(): string {\n if (typeof window === 'undefined') return '';\n return window.location.href;\n },\n};\n"]}

76
node_modules/expo-linking/build/Linking.d.ts generated vendored Normal file
View File

@@ -0,0 +1,76 @@
import { EmitterSubscription } from 'react-native';
import { ParsedURL, SendIntentExtras, URLListener } from './Linking.types';
/**
* Add a handler to `Linking` changes by listening to the `url` event type and providing the handler.
* It is recommended to use the [`useURL()`](#useurl) hook instead.
* @param type The only valid type is `'url'`.
* @param handler An [`URLListener`](#urllistener) function that takes an `event` object of the type
* [`EventType`](#eventtype).
* @return An EmitterSubscription that has the remove method from EventSubscription
* @see [React Native documentation on Linking](https://reactnative.dev/docs/linking#addeventlistener).
*/
export declare function addEventListener(type: 'url', handler: URLListener): EmitterSubscription;
/**
* Helper method which wraps React Native's `Linking.getInitialURL()` in `Linking.parse()`.
* Parses the deep link information out of the URL used to open the experience initially.
* If no link opened the app, all the fields will be `null`.
* > On the web it parses the current window URL.
* @return A promise that resolves with `ParsedURL` object.
*/
export declare function parseInitialURLAsync(): Promise<ParsedURL>;
/**
* Launch an Android intent with extras.
* > Use [`expo-intent-launcher`](./intent-launcher) instead. `sendIntent` is only included in
* > `Linking` for API compatibility with React Native's Linking API.
* @platform android
*/
export declare function sendIntent(action: string, extras?: SendIntentExtras[]): Promise<void>;
/**
* Open the operating system settings app and displays the apps custom settings, if it has any.
*/
export declare function openSettings(): Promise<void>;
/**
* Get the URL that was used to launch the app if it was launched by a link.
* @return The URL string that launched your app, or `null`.
*/
export declare function getInitialURL(): Promise<string | null>;
/**
* Get the URL that was used to launch the app if it was launched by a link.
* @return The URL string that launched your app, or `null`.
*/
export declare function getLinkingURL(): string | null;
/**
* Attempt to open the given URL with an installed app. See the [Linking guide](/guides/linking)
* for more information.
* @param url A URL for the operating system to open. For example: `tel:5555555`, `exp://`.
* @return A `Promise` that is fulfilled with `true` if the link is opened operating system
* automatically or the user confirms the prompt to open the link. The `Promise` rejects if there
* are no applications registered for the URL or the user cancels the dialog.
*/
export declare function openURL(url: string): Promise<true>;
/**
* Determine whether or not an installed app can handle a given URL.
* On web this always returns `true` because there is no API for detecting what URLs can be opened.
* @param url The URL that you want to test can be opened.
* @return A `Promise` object that is fulfilled with `true` if the URL can be handled, otherwise it
* `false` if not.
* The `Promise` will reject on Android if it was impossible to check if the URL can be opened, and
* on iOS if you didn't [add the specific scheme in the `LSApplicationQueriesSchemes` key inside **Info.plist**](/guides/linking#linking-from-your-app).
*/
export declare function canOpenURL(url: string): Promise<boolean>;
/**
* Returns the initial URL followed by any subsequent changes to the URL.
* @deprecated Use `useLinkingURL` hook instead.
* @return Returns the initial URL or `null`.
*/
export declare function useURL(): string | null;
/**
* Returns the linking URL followed by any subsequent changes to the URL.
* Always returns the initial URL immediately on reload.
* @return Returns the initial URL or `null`.
*/
export declare function useLinkingURL(): string | null;
export * from './Linking.types';
export * from './Schemes';
export { parse, createURL } from './createURL';
//# sourceMappingURL=Linking.d.ts.map

1
node_modules/expo-linking/build/Linking.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"Linking.d.ts","sourceRoot":"","sources":["../src/Linking.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAY,MAAM,cAAc,CAAC;AAG7D,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAM3E;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW,GAAG,mBAAmB,CAEvF;AAGD;;;;;;GAMG;AACH,wBAAsB,oBAAoB,IAAI,OAAO,CAAC,SAAS,CAAC,CAY/D;AAGD;;;;;GAKG;AACH,wBAAsB,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,gBAAgB,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAK3F;AAGD;;GAEG;AACH,wBAAsB,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC,CAQlD;AAGD;;;GAGG;AACH,wBAAsB,aAAa,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAE5D;AAED;;;GAGG;AACH,wBAAgB,aAAa,IAAI,MAAM,GAAG,IAAI,CAE7C;AAGD;;;;;;;GAOG;AACH,wBAAsB,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAGxD;AAGD;;;;;;;;GAQG;AACH,wBAAsB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAG9D;AAGD;;;;GAIG;AACH,wBAAgB,MAAM,IAAI,MAAM,GAAG,IAAI,CActC;AAED;;;;GAIG;AACH,wBAAgB,aAAa,IAAI,MAAM,GAAG,IAAI,CAa7C;AAED,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC"}

146
node_modules/expo-linking/build/Linking.js generated vendored Normal file
View File

@@ -0,0 +1,146 @@
import { UnavailabilityError } from 'expo-modules-core';
import { useEffect, useState } from 'react';
import { Platform } from 'react-native';
import ExpoLinking from './ExpoLinking';
import RNLinking from './RNLinking';
import { parse } from './createURL';
import { validateURL } from './validateURL';
// @needsAudit
/**
* Add a handler to `Linking` changes by listening to the `url` event type and providing the handler.
* It is recommended to use the [`useURL()`](#useurl) hook instead.
* @param type The only valid type is `'url'`.
* @param handler An [`URLListener`](#urllistener) function that takes an `event` object of the type
* [`EventType`](#eventtype).
* @return An EmitterSubscription that has the remove method from EventSubscription
* @see [React Native documentation on Linking](https://reactnative.dev/docs/linking#addeventlistener).
*/
export function addEventListener(type, handler) {
return RNLinking.addEventListener(type, handler);
}
// @needsAudit
/**
* Helper method which wraps React Native's `Linking.getInitialURL()` in `Linking.parse()`.
* Parses the deep link information out of the URL used to open the experience initially.
* If no link opened the app, all the fields will be `null`.
* > On the web it parses the current window URL.
* @return A promise that resolves with `ParsedURL` object.
*/
export async function parseInitialURLAsync() {
const initialUrl = await RNLinking.getInitialURL();
if (!initialUrl) {
return {
scheme: null,
hostname: null,
path: null,
queryParams: null,
};
}
return parse(initialUrl);
}
// @needsAudit
/**
* Launch an Android intent with extras.
* > Use [`expo-intent-launcher`](./intent-launcher) instead. `sendIntent` is only included in
* > `Linking` for API compatibility with React Native's Linking API.
* @platform android
*/
export async function sendIntent(action, extras) {
if (Platform.OS === 'android') {
return await RNLinking.sendIntent(action, extras);
}
throw new UnavailabilityError('Linking', 'sendIntent');
}
// @needsAudit
/**
* Open the operating system settings app and displays the apps custom settings, if it has any.
*/
export async function openSettings() {
if (Platform.OS === 'web') {
throw new UnavailabilityError('Linking', 'openSettings');
}
if (RNLinking.openSettings) {
return await RNLinking.openSettings();
}
await openURL('app-settings:');
}
// @needsAudit
/**
* Get the URL that was used to launch the app if it was launched by a link.
* @return The URL string that launched your app, or `null`.
*/
export async function getInitialURL() {
return (await RNLinking.getInitialURL()) ?? null;
}
/**
* Get the URL that was used to launch the app if it was launched by a link.
* @return The URL string that launched your app, or `null`.
*/
export function getLinkingURL() {
return ExpoLinking.getLinkingURL();
}
// @needsAudit
/**
* Attempt to open the given URL with an installed app. See the [Linking guide](/guides/linking)
* for more information.
* @param url A URL for the operating system to open. For example: `tel:5555555`, `exp://`.
* @return A `Promise` that is fulfilled with `true` if the link is opened operating system
* automatically or the user confirms the prompt to open the link. The `Promise` rejects if there
* are no applications registered for the URL or the user cancels the dialog.
*/
export async function openURL(url) {
validateURL(url);
return await RNLinking.openURL(url);
}
// @needsAudit
/**
* Determine whether or not an installed app can handle a given URL.
* On web this always returns `true` because there is no API for detecting what URLs can be opened.
* @param url The URL that you want to test can be opened.
* @return A `Promise` object that is fulfilled with `true` if the URL can be handled, otherwise it
* `false` if not.
* The `Promise` will reject on Android if it was impossible to check if the URL can be opened, and
* on iOS if you didn't [add the specific scheme in the `LSApplicationQueriesSchemes` key inside **Info.plist**](/guides/linking#linking-from-your-app).
*/
export async function canOpenURL(url) {
validateURL(url);
return await RNLinking.canOpenURL(url);
}
// @needsAudit
/**
* Returns the initial URL followed by any subsequent changes to the URL.
* @deprecated Use `useLinkingURL` hook instead.
* @return Returns the initial URL or `null`.
*/
export function useURL() {
const [url, setLink] = useState(null);
function onChange(event) {
setLink(event.url);
}
useEffect(() => {
getInitialURL().then((url) => setLink(url));
const subscription = addEventListener('url', onChange);
return () => subscription.remove();
}, []);
return url;
}
/**
* Returns the linking URL followed by any subsequent changes to the URL.
* Always returns the initial URL immediately on reload.
* @return Returns the initial URL or `null`.
*/
export function useLinkingURL() {
const [url, setLink] = useState(ExpoLinking.getLinkingURL);
function onChange(event) {
setLink(event.url);
}
useEffect(() => {
const subscription = ExpoLinking.addListener('onURLReceived', onChange);
return () => subscription.remove();
}, []);
return url ?? null;
}
export * from './Linking.types';
export * from './Schemes';
export { parse, createURL } from './createURL';
//# sourceMappingURL=Linking.js.map

1
node_modules/expo-linking/build/Linking.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long

20
node_modules/expo-linking/build/Linking.server.d.ts generated vendored Normal file
View File

@@ -0,0 +1,20 @@
import { ParsedURL, SendIntentExtras, URLListener } from './Linking.types';
export declare function addEventListener(type: 'url', handler: URLListener): {
remove(): void;
};
export declare function parseInitialURLAsync(): Promise<ParsedURL>;
export declare function sendIntent(action: string, extras?: SendIntentExtras[]): Promise<void>;
export declare function openSettings(): Promise<void>;
export declare function getInitialURL(): Promise<string | null>;
export declare function getLinkingURL(): string;
export declare function openURL(url: string): Promise<true>;
export declare function canOpenURL(): Promise<boolean>;
export declare function useURL(): string | null;
export declare function useLinkingURL(): null;
export * from './Linking.types';
export declare function collectManifestSchemes(): never[];
export declare function hasConstantsManifest(): boolean;
export declare function hasCustomScheme(): boolean;
export declare function resolveScheme(): string;
export { parse, createURL } from './createURL';
//# sourceMappingURL=Linking.server.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"Linking.server.d.ts","sourceRoot":"","sources":["../src/Linking.server.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE3E,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW;;EAEjE;AAED,wBAAsB,oBAAoB,IAAI,OAAO,CAAC,SAAS,CAAC,CAO/D;AAED,wBAAsB,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,gBAAgB,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAE3F;AAED,wBAAsB,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC,CAElD;AAED,wBAAsB,aAAa,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAE5D;AAED,wBAAgB,aAAa,WAE5B;AAED,wBAAsB,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAExD;AAED,wBAAsB,UAAU,qBAE/B;AAED,wBAAgB,MAAM,IAAI,MAAM,GAAG,IAAI,CAEtC;AAED,wBAAgB,aAAa,SAE5B;AAED,cAAc,iBAAiB,CAAC;AAEhC,wBAAgB,sBAAsB,YAErC;AAED,wBAAgB,oBAAoB,YAEnC;AAED,wBAAgB,eAAe,YAE9B;AAED,wBAAgB,aAAa,WAE5B;AAED,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC"}

51
node_modules/expo-linking/build/Linking.server.js generated vendored Normal file
View File

@@ -0,0 +1,51 @@
import { UnavailabilityError } from 'expo-modules-core';
export function addEventListener(type, handler) {
return { remove() { } };
}
export async function parseInitialURLAsync() {
return {
scheme: null,
hostname: null,
path: null,
queryParams: null,
};
}
export async function sendIntent(action, extras) {
throw new UnavailabilityError('Linking', 'sendIntent');
}
export async function openSettings() {
throw new UnavailabilityError('Linking', 'openSettings');
}
export async function getInitialURL() {
return '';
}
export function getLinkingURL() {
return '';
}
export async function openURL(url) {
return true;
}
export async function canOpenURL() {
return true;
}
export function useURL() {
return null;
}
export function useLinkingURL() {
return null;
}
export * from './Linking.types';
export function collectManifestSchemes() {
return [];
}
export function hasConstantsManifest() {
return false;
}
export function hasCustomScheme() {
return false;
}
export function resolveScheme() {
return '';
}
export { parse, createURL } from './createURL';
//# sourceMappingURL=Linking.server.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"Linking.server.js","sourceRoot":"","sources":["../src/Linking.server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAIxD,MAAM,UAAU,gBAAgB,CAAC,IAAW,EAAE,OAAoB;IAChE,OAAO,EAAE,MAAM,KAAI,CAAC,EAAE,CAAC;AACzB,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,oBAAoB;IACxC,OAAO;QACL,MAAM,EAAE,IAAI;QACZ,QAAQ,EAAE,IAAI;QACd,IAAI,EAAE,IAAI;QACV,WAAW,EAAE,IAAI;KAClB,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,UAAU,CAAC,MAAc,EAAE,MAA2B;IAC1E,MAAM,IAAI,mBAAmB,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC;AACzD,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,YAAY;IAChC,MAAM,IAAI,mBAAmB,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC;AAC3D,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,aAAa;IACjC,OAAO,EAAE,CAAC;AACZ,CAAC;AAED,MAAM,UAAU,aAAa;IAC3B,OAAO,EAAE,CAAC;AACZ,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,OAAO,CAAC,GAAW;IACvC,OAAO,IAAI,CAAC;AACd,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,UAAU;IAC9B,OAAO,IAAI,CAAC;AACd,CAAC;AAED,MAAM,UAAU,MAAM;IACpB,OAAO,IAAI,CAAC;AACd,CAAC;AAED,MAAM,UAAU,aAAa;IAC3B,OAAO,IAAI,CAAC;AACd,CAAC;AAED,cAAc,iBAAiB,CAAC;AAEhC,MAAM,UAAU,sBAAsB;IACpC,OAAO,EAAE,CAAC;AACZ,CAAC;AAED,MAAM,UAAU,oBAAoB;IAClC,OAAO,KAAK,CAAC;AACf,CAAC;AAED,MAAM,UAAU,eAAe;IAC7B,OAAO,KAAK,CAAC;AACf,CAAC;AAED,MAAM,UAAU,aAAa;IAC3B,OAAO,EAAE,CAAC;AACZ,CAAC;AAED,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC","sourcesContent":["import { UnavailabilityError } from 'expo-modules-core';\n\nimport { ParsedURL, SendIntentExtras, URLListener } from './Linking.types';\n\nexport function addEventListener(type: 'url', handler: URLListener) {\n return { remove() {} };\n}\n\nexport async function parseInitialURLAsync(): Promise<ParsedURL> {\n return {\n scheme: null,\n hostname: null,\n path: null,\n queryParams: null,\n };\n}\n\nexport async function sendIntent(action: string, extras?: SendIntentExtras[]): Promise<void> {\n throw new UnavailabilityError('Linking', 'sendIntent');\n}\n\nexport async function openSettings(): Promise<void> {\n throw new UnavailabilityError('Linking', 'openSettings');\n}\n\nexport async function getInitialURL(): Promise<string | null> {\n return '';\n}\n\nexport function getLinkingURL() {\n return '';\n}\n\nexport async function openURL(url: string): Promise<true> {\n return true;\n}\n\nexport async function canOpenURL() {\n return true;\n}\n\nexport function useURL(): string | null {\n return null;\n}\n\nexport function useLinkingURL() {\n return null;\n}\n\nexport * from './Linking.types';\n\nexport function collectManifestSchemes() {\n return [];\n}\n\nexport function hasConstantsManifest() {\n return false;\n}\n\nexport function hasCustomScheme() {\n return false;\n}\n\nexport function resolveScheme() {\n return '';\n}\n\nexport { parse, createURL } from './createURL';\n"]}

38
node_modules/expo-linking/build/Linking.types.d.ts generated vendored Normal file
View File

@@ -0,0 +1,38 @@
export type QueryParams = Record<string, undefined | string | string[]>;
export type ParsedURL = {
scheme: string | null;
hostname: string | null;
/**
* The path into the app specified by the URL.
*/
path: string | null;
/**
* The set of query parameters specified by the query string of the url used to open the app.
*/
queryParams: QueryParams | null;
};
export type CreateURLOptions = {
/**
* URI protocol `<scheme>://` that must be built into your native app.
*/
scheme?: string;
/**
* An object of parameters that will be converted into a query string.
*/
queryParams?: QueryParams;
/**
* Should the URI be triple slashed `scheme:///path` or double slashed `scheme://path`.
*/
isTripleSlashed?: boolean;
};
export type EventType = {
url: string;
nativeEvent?: MessageEvent;
};
export type URLListener = (event: EventType) => void;
export type NativeURLListener = (nativeEvent: MessageEvent) => void;
export type SendIntentExtras = {
key: string;
value: string | number | boolean;
};
//# sourceMappingURL=Linking.types.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"Linking.types.d.ts","sourceRoot":"","sources":["../src/Linking.types.ts"],"names":[],"mappings":"AACA,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,SAAS,GAAG,MAAM,GAAG,MAAM,EAAE,CAAC,CAAC;AAGxE,MAAM,MAAM,SAAS,GAAG;IACtB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB;;OAEG;IACH,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB;;OAEG;IACH,WAAW,EAAE,WAAW,GAAG,IAAI,CAAC;CACjC,CAAC;AAGF,MAAM,MAAM,gBAAgB,GAAG;IAC7B;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B;;OAEG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B,CAAC;AAGF,MAAM,MAAM,SAAS,GAAG;IACtB,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,CAAC,EAAE,YAAY,CAAC;CAC5B,CAAC;AAGF,MAAM,MAAM,WAAW,GAAG,CAAC,KAAK,EAAE,SAAS,KAAK,IAAI,CAAC;AAGrD,MAAM,MAAM,iBAAiB,GAAG,CAAC,WAAW,EAAE,YAAY,KAAK,IAAI,CAAC;AAGpE,MAAM,MAAM,gBAAgB,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAA;CAAE,CAAC"}

2
node_modules/expo-linking/build/Linking.types.js generated vendored Normal file
View File

@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=Linking.types.js.map

1
node_modules/expo-linking/build/Linking.types.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"Linking.types.js","sourceRoot":"","sources":["../src/Linking.types.ts"],"names":[],"mappings":"","sourcesContent":["// @docsMissing\nexport type QueryParams = Record<string, undefined | string | string[]>;\n\n// @needsAudit @docsMissing\nexport type ParsedURL = {\n scheme: string | null;\n hostname: string | null;\n /**\n * The path into the app specified by the URL.\n */\n path: string | null;\n /**\n * The set of query parameters specified by the query string of the url used to open the app.\n */\n queryParams: QueryParams | null;\n};\n\n// @needsAudit\nexport type CreateURLOptions = {\n /**\n * URI protocol `<scheme>://` that must be built into your native app.\n */\n scheme?: string;\n /**\n * An object of parameters that will be converted into a query string.\n */\n queryParams?: QueryParams;\n /**\n * Should the URI be triple slashed `scheme:///path` or double slashed `scheme://path`.\n */\n isTripleSlashed?: boolean;\n};\n\n// @docsMissing\nexport type EventType = {\n url: string;\n nativeEvent?: MessageEvent;\n};\n\n// @docsMissing\nexport type URLListener = (event: EventType) => void;\n\n// @docsMissing\nexport type NativeURLListener = (nativeEvent: MessageEvent) => void;\n\n// @docsMissing\nexport type SendIntentExtras = { key: string; value: string | number | boolean };\n"]}

3
node_modules/expo-linking/build/RNLinking.d.ts generated vendored Normal file
View File

@@ -0,0 +1,3 @@
import { Linking } from 'react-native';
export default Linking;
//# sourceMappingURL=RNLinking.d.ts.map

1
node_modules/expo-linking/build/RNLinking.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"RNLinking.d.ts","sourceRoot":"","sources":["../src/RNLinking.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,eAAe,OAAO,CAAC"}

3
node_modules/expo-linking/build/RNLinking.js generated vendored Normal file
View File

@@ -0,0 +1,3 @@
import { Linking } from 'react-native';
export default Linking;
//# sourceMappingURL=RNLinking.js.map

1
node_modules/expo-linking/build/RNLinking.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"RNLinking.js","sourceRoot":"","sources":["../src/RNLinking.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,eAAe,OAAO,CAAC","sourcesContent":["import { Linking } from 'react-native';\nexport default Linking;\n"]}

12
node_modules/expo-linking/build/RNLinking.web.d.ts generated vendored Normal file
View File

@@ -0,0 +1,12 @@
import { URLListener } from './Linking.types';
declare const _default: {
addEventListener(type: "url", listener: URLListener): {
remove(): void;
};
removeEventListener(type: "url", listener: URLListener): void;
canOpenURL(): Promise<boolean>;
getInitialURL(): Promise<string>;
openURL(url: string): Promise<void>;
};
export default _default;
//# sourceMappingURL=RNLinking.web.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"RNLinking.web.d.ts","sourceRoot":"","sources":["../src/RNLinking.web.ts"],"names":[],"mappings":"AAEA,OAAO,EAAqB,WAAW,EAAE,MAAM,iBAAiB,CAAC;;2BAKxC,KAAK,YAAY,WAAW,GAAG;QAAE,MAAM,IAAI,IAAI,CAAA;KAAE;8BAkB9C,KAAK,YAAY,WAAW,GAAG,IAAI;kBAgBzC,OAAO,CAAC,OAAO,CAAC;qBAKb,OAAO,CAAC,MAAM,CAAC;iBAKnB,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;;AA7C3C,wBAmDE"}

47
node_modules/expo-linking/build/RNLinking.web.js generated vendored Normal file
View File

@@ -0,0 +1,47 @@
import invariant from 'invariant';
const listeners = [];
export default {
addEventListener(type, listener) {
// Do nothing in Node.js environments
if (typeof window === 'undefined') {
return { remove() { } };
}
invariant(type === 'url', `Linking.addEventListener(): ${type} is not a valid event`);
const nativeListener = (nativeEvent) => listener({ url: window.location.href, nativeEvent });
listeners.push({ listener, nativeListener });
window.addEventListener('message', nativeListener, false);
return {
remove: () => {
this.removeEventListener(type, listener);
},
};
},
removeEventListener(type, listener) {
// Do nothing in Node.js environments
if (typeof window === 'undefined') {
return;
}
invariant(type === 'url', `Linking.addEventListener(): ${type} is not a valid event`);
const listenerIndex = listeners.findIndex((pair) => pair.listener === listener);
invariant(listenerIndex !== -1, 'Linking.removeEventListener(): cannot remove an unregistered event listener.');
const nativeListener = listeners[listenerIndex].nativeListener;
window.removeEventListener('message', nativeListener, false);
listeners.splice(listenerIndex, 1);
},
async canOpenURL() {
// In reality this should be able to return false for links like `chrome://` on chrome.
return true;
},
async getInitialURL() {
if (typeof window === 'undefined')
return '';
return window.location.href;
},
async openURL(url) {
if (typeof window !== 'undefined') {
// @ts-ignore
window.location = new URL(url, window.location).toString();
}
},
};
//# sourceMappingURL=RNLinking.web.js.map

1
node_modules/expo-linking/build/RNLinking.web.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"RNLinking.web.js","sourceRoot":"","sources":["../src/RNLinking.web.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,WAAW,CAAC;AAIlC,MAAM,SAAS,GAAmE,EAAE,CAAC;AAErF,eAAe;IACb,gBAAgB,CAAC,IAAW,EAAE,QAAqB;QACjD,qCAAqC;QACrC,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE,CAAC;YAClC,OAAO,EAAE,MAAM,KAAI,CAAC,EAAE,CAAC;QACzB,CAAC;QAED,SAAS,CAAC,IAAI,KAAK,KAAK,EAAE,+BAA+B,IAAI,uBAAuB,CAAC,CAAC;QACtF,MAAM,cAAc,GAAsB,CAAC,WAAW,EAAE,EAAE,CACxD,QAAQ,CAAC,EAAE,GAAG,EAAE,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,WAAW,EAAE,CAAC,CAAC;QACvD,SAAS,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,cAAc,EAAE,CAAC,CAAC;QAC7C,MAAM,CAAC,gBAAgB,CAAC,SAAS,EAAE,cAAc,EAAE,KAAK,CAAC,CAAC;QAC1D,OAAO;YACL,MAAM,EAAE,GAAG,EAAE;gBACX,IAAI,CAAC,mBAAmB,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;YAC3C,CAAC;SACF,CAAC;IACJ,CAAC;IAED,mBAAmB,CAAC,IAAW,EAAE,QAAqB;QACpD,qCAAqC;QACrC,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE,CAAC;YAClC,OAAO;QACT,CAAC;QACD,SAAS,CAAC,IAAI,KAAK,KAAK,EAAE,+BAA+B,IAAI,uBAAuB,CAAC,CAAC;QACtF,MAAM,aAAa,GAAG,SAAS,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,KAAK,QAAQ,CAAC,CAAC;QAChF,SAAS,CACP,aAAa,KAAK,CAAC,CAAC,EACpB,8EAA8E,CAC/E,CAAC;QACF,MAAM,cAAc,GAAG,SAAS,CAAC,aAAa,CAAC,CAAC,cAAc,CAAC;QAC/D,MAAM,CAAC,mBAAmB,CAAC,SAAS,EAAE,cAAc,EAAE,KAAK,CAAC,CAAC;QAC7D,SAAS,CAAC,MAAM,CAAC,aAAa,EAAE,CAAC,CAAC,CAAC;IACrC,CAAC;IAED,KAAK,CAAC,UAAU;QACd,uFAAuF;QACvF,OAAO,IAAI,CAAC;IACd,CAAC;IAED,KAAK,CAAC,aAAa;QACjB,IAAI,OAAO,MAAM,KAAK,WAAW;YAAE,OAAO,EAAE,CAAC;QAC7C,OAAO,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC;IAC9B,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,GAAW;QACvB,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE,CAAC;YAClC,aAAa;YACb,MAAM,CAAC,QAAQ,GAAG,IAAI,GAAG,CAAC,GAAG,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC,QAAQ,EAAE,CAAC;QAC7D,CAAC;IACH,CAAC;CACF,CAAC","sourcesContent":["import invariant from 'invariant';\n\nimport { NativeURLListener, URLListener } from './Linking.types';\n\nconst listeners: { listener: URLListener; nativeListener: NativeURLListener }[] = [];\n\nexport default {\n addEventListener(type: 'url', listener: URLListener): { remove(): void } {\n // Do nothing in Node.js environments\n if (typeof window === 'undefined') {\n return { remove() {} };\n }\n\n invariant(type === 'url', `Linking.addEventListener(): ${type} is not a valid event`);\n const nativeListener: NativeURLListener = (nativeEvent) =>\n listener({ url: window.location.href, nativeEvent });\n listeners.push({ listener, nativeListener });\n window.addEventListener('message', nativeListener, false);\n return {\n remove: () => {\n this.removeEventListener(type, listener);\n },\n };\n },\n\n removeEventListener(type: 'url', listener: URLListener): void {\n // Do nothing in Node.js environments\n if (typeof window === 'undefined') {\n return;\n }\n invariant(type === 'url', `Linking.addEventListener(): ${type} is not a valid event`);\n const listenerIndex = listeners.findIndex((pair) => pair.listener === listener);\n invariant(\n listenerIndex !== -1,\n 'Linking.removeEventListener(): cannot remove an unregistered event listener.'\n );\n const nativeListener = listeners[listenerIndex].nativeListener;\n window.removeEventListener('message', nativeListener, false);\n listeners.splice(listenerIndex, 1);\n },\n\n async canOpenURL(): Promise<boolean> {\n // In reality this should be able to return false for links like `chrome://` on chrome.\n return true;\n },\n\n async getInitialURL(): Promise<string> {\n if (typeof window === 'undefined') return '';\n return window.location.href;\n },\n\n async openURL(url: string): Promise<void> {\n if (typeof window !== 'undefined') {\n // @ts-ignore\n window.location = new URL(url, window.location).toString();\n }\n },\n};\n"]}

20
node_modules/expo-linking/build/Schemes.d.ts generated vendored Normal file
View File

@@ -0,0 +1,20 @@
export declare function hasCustomScheme(): boolean;
/**
* Collect a list of platform schemes from the manifest.
*
* This method is based on the `Scheme` modules from `@expo/config-plugins`
* which are used for collecting the schemes before prebuilding a native app.
*
* - Android: `scheme` -> `android.scheme` -> `android.package`
* - iOS: `scheme` -> `ios.scheme` -> `ios.bundleIdentifier`
*/
export declare function collectManifestSchemes(): string[];
/**
* Ensure the user has linked the expo-constants manifest in bare workflow.
*/
export declare function hasConstantsManifest(): boolean;
export declare function resolveScheme(options: {
scheme?: string;
isSilent?: boolean;
}): string;
//# sourceMappingURL=Schemes.d.ts.map

1
node_modules/expo-linking/build/Schemes.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"Schemes.d.ts","sourceRoot":"","sources":["../src/Schemes.ts"],"names":[],"mappings":"AAMA,wBAAgB,eAAe,IAAI,OAAO,CAWzC;AAkCD;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,IAAI,MAAM,EAAE,CAYjD;AAeD;;GAEG;AACH,wBAAgB,oBAAoB,IAAI,OAAO,CAE9C;AAGD,wBAAgB,aAAa,CAAC,OAAO,EAAE;IAAE,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,MAAM,CAiGtF"}

158
node_modules/expo-linking/build/Schemes.js generated vendored Normal file
View File

@@ -0,0 +1,158 @@
import Constants, { ExecutionEnvironment } from 'expo-constants';
import { Platform } from 'expo-modules-core';
const LINKING_GUIDE_URL = `https://docs.expo.dev/guides/linking/`;
// @docsMissing
export function hasCustomScheme() {
if (Constants.executionEnvironment === ExecutionEnvironment.Bare) {
// Bare always uses a custom scheme.
return true;
}
else if (Constants.executionEnvironment === ExecutionEnvironment.Standalone) {
// Standalone uses a custom scheme when one is defined.
const manifestSchemes = collectManifestSchemes();
return !!manifestSchemes.length;
}
// Store client uses the default scheme.
return false;
}
function getSchemes(config) {
if (config) {
if (Array.isArray(config.scheme)) {
const validate = (value) => {
return typeof value === 'string';
};
return config.scheme.filter(validate);
}
else if (typeof config.scheme === 'string') {
return [config.scheme];
}
}
return [];
}
// Valid schemes for the Expo client.
const EXPO_CLIENT_SCHEMES = Platform.select({
// Results from `npx uri-scheme list --info-path ios/Exponent/Supporting/Info.plist`
ios: [
'exp',
'exps',
'fb1696089354000816',
'host.exp.exponent',
'com.googleusercontent.apps.603386649315-vp4revvrcgrcjme51ebuhbkbspl048l9',
],
// Collected manually
android: ['exp', 'exps'],
});
/**
* Collect a list of platform schemes from the manifest.
*
* This method is based on the `Scheme` modules from `@expo/config-plugins`
* which are used for collecting the schemes before prebuilding a native app.
*
* - Android: `scheme` -> `android.scheme` -> `android.package`
* - iOS: `scheme` -> `ios.scheme` -> `ios.bundleIdentifier`
*/
export function collectManifestSchemes() {
// ios.scheme, android.scheme, and scheme as an array are not yet added to the
// Expo config spec, but there's no harm in adding them early.
// They'll be added when we drop support for `expo build` or decide
// to have them only work with `eas build`.
const platformManifest = Platform.select({
ios: Constants.expoConfig?.ios,
android: Constants.expoConfig?.android,
}) ?? {};
return getSchemes(Constants.expoConfig).concat(getSchemes(platformManifest));
}
function getNativeAppIdScheme() {
// Add the native application identifier to the list of schemes for parity with `expo build`.
// The native app id has been added to builds for a long time to support Google Sign-In.
return (Platform.select({
ios: Constants.expoConfig?.ios?.bundleIdentifier,
// TODO: This may change to android.applicationId in the future.
android: Constants.expoConfig?.android?.package,
}) ?? null);
}
// @needsAudit
/**
* Ensure the user has linked the expo-constants manifest in bare workflow.
*/
export function hasConstantsManifest() {
return !!Object.keys(Constants.expoConfig ?? {}).length;
}
// @docsMissing
export function resolveScheme(options) {
if (Constants.executionEnvironment !== ExecutionEnvironment.StoreClient &&
!hasConstantsManifest()) {
throw new Error(`expo-linking needs access to the expo-constants manifest (app.json or app.config.js) to determine what URI scheme to use. Setup the manifest and rebuild: https://github.com/expo/expo/blob/main/packages/expo-constants/README.md`);
}
const manifestSchemes = collectManifestSchemes();
const nativeAppId = getNativeAppIdScheme();
if (!manifestSchemes.length) {
if (__DEV__ && !options.isSilent) {
// Assert a config warning if no scheme is setup yet. `isSilent` is used for warnings, but we'll ignore it for exceptions.
console.warn(`Linking requires a build-time setting \`scheme\` in the project's Expo config (app.config.js or app.json) for production apps, if it's left blank, your app may crash. The scheme does not apply to development in the Expo client but you should add it as soon as you start working with Linking to avoid creating a broken build. Learn more: ${LINKING_GUIDE_URL}`);
}
else if (!__DEV__ || Constants.executionEnvironment !== ExecutionEnvironment.StoreClient) {
// Throw in production or when not in store client. Use the __DEV__ flag so users can test this functionality with `expo start --no-dev`,
throw new Error('Cannot make a deep link into a standalone app with no custom scheme defined');
}
}
// In the Expo client...
if (Constants.executionEnvironment === ExecutionEnvironment.StoreClient) {
if (options.scheme) {
// This enables users to use the fb or google redirects on iOS in the Expo client.
if (EXPO_CLIENT_SCHEMES?.includes(options.scheme)) {
return options.scheme;
}
// Silently ignore to make bare workflow development easier.
}
// Fallback to the default client scheme.
return 'exp';
}
const schemes = [...manifestSchemes, nativeAppId].filter(Boolean);
if (options.scheme) {
if (__DEV__) {
// Bare workflow development assertion about the provided scheme matching the Expo config.
if (!schemes.includes(options.scheme) && !options.isSilent) {
// TODO: Will this cause issues for things like Facebook or Google that use `reversed-client-id://` or `fb<FBID>:/`?
// Traditionally these APIs don't use the Linking API directly.
console.warn(`The provided Linking scheme '${options.scheme}' does not appear in the list of possible URI schemes in your Expo config. Expected one of: ${schemes
.map((scheme) => `'${scheme}'`)
.join(', ')}`);
}
}
// Return the user provided value.
return options.scheme;
}
// If no scheme is provided, we'll guess what the scheme is based on the manifest.
// This is to attempt to keep managed apps working across expo build and EAS build.
// EAS build ejects the app before building it so we can assume that the user will
// be using one of defined schemes.
// If the native app id is the only scheme,
if (!!nativeAppId && !manifestSchemes.length && !options.isSilent) {
// Assert a config warning if no scheme is setup yet.
// This warning only applies to managed workflow EAS apps, as bare workflow
console.warn(`Linking requires a build-time setting \`scheme\` in the project's Expo config (app.config.js or app.json) for bare or production apps. Manually providing a \`scheme\` property can circumvent this warning. Using native app identifier as the scheme '${nativeAppId}'. Learn more: ${LINKING_GUIDE_URL}`);
return nativeAppId;
}
// When the native app id is defined, it'll be added to the list of schemes, for most
// users this will be unexpected behavior and cause all apps to warn when the Linking API
// is used without a predefined scheme. For now, if the native app id is defined, require
// at least one more scheme to be added before throwing a warning.
// i.e. `scheme: ['foo', 'bar']` (unimplemented functionality).
const [scheme, ...extraSchemes] = manifestSchemes;
if (!scheme) {
const errorMessage = `Linking requires a build-time setting \`scheme\` in the project's Expo config (app.config.js or app.json) for bare or production apps. Manually providing a \`scheme\` property can circumvent this error. Learn more: ${LINKING_GUIDE_URL}`;
// Throw in production, use the __DEV__ flag so users can test this functionality with `expo start --no-dev`
throw new Error(errorMessage);
}
if (extraSchemes.length && !options.isSilent) {
console.warn(`Linking found multiple possible URI schemes in your Expo config.\nUsing '${scheme}'. Ignoring: ${[
...extraSchemes,
nativeAppId,
]
.filter(Boolean)
.join(', ')}.\nProvide the preferred URI scheme to the Linking API.`);
}
return scheme;
}
//# sourceMappingURL=Schemes.js.map

1
node_modules/expo-linking/build/Schemes.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long

5
node_modules/expo-linking/build/Schemes.web.d.ts generated vendored Normal file
View File

@@ -0,0 +1,5 @@
export declare function hasCustomScheme(): boolean;
export declare function collectManifestSchemes(): string[];
export declare function hasConstantsManifest(): boolean;
export declare function resolveScheme(): string;
//# sourceMappingURL=Schemes.web.d.ts.map

1
node_modules/expo-linking/build/Schemes.web.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"Schemes.web.d.ts","sourceRoot":"","sources":["../src/Schemes.web.ts"],"names":[],"mappings":"AAAA,wBAAgB,eAAe,IAAI,OAAO,CAEzC;AACD,wBAAgB,sBAAsB,IAAI,MAAM,EAAE,CAEjD;AACD,wBAAgB,oBAAoB,IAAI,OAAO,CAE9C;AACD,wBAAgB,aAAa,IAAI,MAAM,CAEtC"}

13
node_modules/expo-linking/build/Schemes.web.js generated vendored Normal file
View File

@@ -0,0 +1,13 @@
export function hasCustomScheme() {
return true;
}
export function collectManifestSchemes() {
return [];
}
export function hasConstantsManifest() {
return false;
}
export function resolveScheme() {
return 'https';
}
//# sourceMappingURL=Schemes.web.js.map

1
node_modules/expo-linking/build/Schemes.web.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"Schemes.web.js","sourceRoot":"","sources":["../src/Schemes.web.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,eAAe;IAC7B,OAAO,IAAI,CAAC;AACd,CAAC;AACD,MAAM,UAAU,sBAAsB;IACpC,OAAO,EAAE,CAAC;AACZ,CAAC;AACD,MAAM,UAAU,oBAAoB;IAClC,OAAO,KAAK,CAAC;AACf,CAAC;AACD,MAAM,UAAU,aAAa;IAC3B,OAAO,OAAO,CAAC;AACjB,CAAC","sourcesContent":["export function hasCustomScheme(): boolean {\n return true;\n}\nexport function collectManifestSchemes(): string[] {\n return [];\n}\nexport function hasConstantsManifest(): boolean {\n return false;\n}\nexport function resolveScheme(): string {\n return 'https';\n}\n"]}

32
node_modules/expo-linking/build/createURL.d.ts generated vendored Normal file
View File

@@ -0,0 +1,32 @@
import { CreateURLOptions, ParsedURL } from './Linking.types';
/**
* Helper method for constructing a deep link into your app, given an optional path and set of query
* parameters. Creates a URI scheme with two slashes by default.
*
* The scheme must be defined in the [app config](./../config/app) under `expo.scheme`
* or `expo.{android,ios}.scheme`. Platform-specific schemes defined under `expo.{android,ios}.scheme`
* take precedence over universal schemes defined under `expo.scheme`.
*
* # Examples
* - Development and production builds: `<scheme>://path` - uses the optional `scheme` property if provided, and otherwise uses the first scheme defined by your app config
* - Web (dev): `https://localhost:19006/path`
* - Web (prod): `https://myapp.com/path`
* - Expo Go (dev): `exp://128.0.0.1:8081/--/path`
*
* The behavior of this method in Expo Go for published updates is undefined and should not be relied upon.
* The created URL in this case is neither stable nor predictable during the lifetime of the app.
* If a stable URL is needed, for example in authorization callbacks, a build (or development build)
* of your application should be used and the scheme provided.
*
* @param path Addition path components to append to the base URL.
* @param namedParameters Additional options object.
* @return A URL string which points to your app with the given deep link information.
*/
export declare function createURL(path: string, { scheme, queryParams, isTripleSlashed }?: CreateURLOptions): string;
/**
* Helper method for parsing out deep link information from a URL.
* @param url A URL that points to the currently running experience (for example, an output of `Linking.createURL()`).
* @return A `ParsedURL` object.
*/
export declare function parse(url: string): ParsedURL;
//# sourceMappingURL=createURL.d.ts.map

1
node_modules/expo-linking/build/createURL.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"createURL.d.ts","sourceRoot":"","sources":["../src/createURL.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAoD9D;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,SAAS,CACvB,IAAI,EAAE,MAAM,EACZ,EAAE,MAAM,EAAE,WAAgB,EAAE,eAAuB,EAAE,GAAE,gBAAqB,GAC3E,MAAM,CAsDR;AAGD;;;;GAIG;AACH,wBAAgB,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAoD5C"}

168
node_modules/expo-linking/build/createURL.js generated vendored Normal file
View File

@@ -0,0 +1,168 @@
import Constants from 'expo-constants';
import { hasCustomScheme, resolveScheme } from './Schemes';
import { validateURL } from './validateURL';
function getHostUri() {
if (Constants.expoConfig?.hostUri) {
return Constants.expoConfig.hostUri;
}
else if (!hasCustomScheme()) {
// we're probably not using up-to-date xdl, so just fake it for now
// we have to remove the /--/ on the end since this will be inserted again later
return removeScheme(Constants.linkingUri).replace(/\/--($|\/.*$)/, '');
}
else {
return null;
}
}
function isExpoHosted() {
const hostUri = getHostUri();
return !!(hostUri &&
(/^(.*\.)?(expo\.io|exp\.host|exp\.direct|expo\.test|expo\.dev)(:.*)?(\/.*)?$/.test(hostUri) ||
Constants.expoGoConfig?.developer));
}
function removeScheme(url) {
return url.replace(/^[a-zA-Z0-9+.-]+:\/\//, '');
}
function removePort(url) {
return url.replace(/(?=([a-zA-Z0-9+.-]+:\/\/)?[^/]):\d+/, '');
}
function removeLeadingSlash(url) {
return url.replace(/^\//, '');
}
function removeTrailingSlashAndQueryString(url) {
return url.replace(/\/?\?.*$/, '');
}
function ensureLeadingSlash(input, shouldAppend) {
const hasSlash = input.startsWith('/');
if (hasSlash && !shouldAppend) {
return input.substring(1);
}
else if (!hasSlash && shouldAppend) {
return `/${input}`;
}
return input;
}
// @needsAudit
/**
* Helper method for constructing a deep link into your app, given an optional path and set of query
* parameters. Creates a URI scheme with two slashes by default.
*
* The scheme must be defined in the [app config](./../config/app) under `expo.scheme`
* or `expo.{android,ios}.scheme`. Platform-specific schemes defined under `expo.{android,ios}.scheme`
* take precedence over universal schemes defined under `expo.scheme`.
*
* # Examples
* - Development and production builds: `<scheme>://path` - uses the optional `scheme` property if provided, and otherwise uses the first scheme defined by your app config
* - Web (dev): `https://localhost:19006/path`
* - Web (prod): `https://myapp.com/path`
* - Expo Go (dev): `exp://128.0.0.1:8081/--/path`
*
* The behavior of this method in Expo Go for published updates is undefined and should not be relied upon.
* The created URL in this case is neither stable nor predictable during the lifetime of the app.
* If a stable URL is needed, for example in authorization callbacks, a build (or development build)
* of your application should be used and the scheme provided.
*
* @param path Addition path components to append to the base URL.
* @param namedParameters Additional options object.
* @return A URL string which points to your app with the given deep link information.
*/
export function createURL(path, { scheme, queryParams = {}, isTripleSlashed = false } = {}) {
const resolvedScheme = resolveScheme({ scheme });
let hostUri = getHostUri() || '';
if (hasCustomScheme() && isExpoHosted()) {
hostUri = '';
}
if (path) {
if (isExpoHosted() && hostUri) {
path = `/--/${removeLeadingSlash(path)}`;
}
if (isTripleSlashed && !path.startsWith('/')) {
path = `/${path}`;
}
}
else {
path = '';
}
// merge user-provided query params with any that were already in the hostUri
// e.g. release-channel
let queryString = '';
const queryStringMatchResult = hostUri.match(/(.*)\?(.+)/);
if (queryStringMatchResult) {
hostUri = queryStringMatchResult[1];
queryString = queryStringMatchResult[2];
let paramsFromHostUri = {};
try {
paramsFromHostUri = Object.fromEntries(
// @ts-ignore: [Symbol.iterator] is indeed, available on every platform.
new URLSearchParams(queryString));
}
catch { }
queryParams = {
...queryParams,
...paramsFromHostUri,
};
}
queryString = new URLSearchParams(
// For legacy purposes, we'll strip out the nullish values before creating the URL.
Object.fromEntries(Object.entries(queryParams).filter(([, value]) => value != null))).toString();
if (queryString) {
queryString = `?${queryString}`;
}
hostUri = ensureLeadingSlash(hostUri, !isTripleSlashed);
// URLSearchParams.stringify already encodes query parameters, so we only need to encode the remaining part of the URL.
const encodedURI = encodeURI(`${resolvedScheme}:${isTripleSlashed ? '/' : ''}/${hostUri}${path}`);
return `${encodedURI}${queryString}`;
}
// @needsAudit
/**
* Helper method for parsing out deep link information from a URL.
* @param url A URL that points to the currently running experience (for example, an output of `Linking.createURL()`).
* @return A `ParsedURL` object.
*/
export function parse(url) {
validateURL(url);
const queryParams = {};
let path = null;
let hostname = null;
let scheme = null;
try {
const parsed = new URL(url);
parsed.searchParams.forEach((value, key) => {
queryParams[key] = decodeURIComponent(value);
});
path = parsed.pathname || null;
hostname = parsed.hostname || null;
scheme = parsed.protocol || null;
}
catch {
path = url;
}
const hostUri = getHostUri() || '';
const hostUriStripped = removePort(removeTrailingSlashAndQueryString(hostUri));
if (scheme) {
// Remove colon at end
scheme = scheme.substring(0, scheme.length - 1);
}
if (path) {
path = removeLeadingSlash(path);
let expoPrefix = null;
if (hostUriStripped) {
const parts = hostUriStripped.split('/');
expoPrefix = parts.slice(1).concat(['--/']).join('/');
}
if (isExpoHosted() && !hasCustomScheme() && expoPrefix && path.startsWith(expoPrefix)) {
path = path.substring(expoPrefix.length);
hostname = null;
}
else if (path.indexOf('+') > -1) {
path = path.substring(path.indexOf('+') + 1);
}
}
return {
hostname,
path,
queryParams,
scheme,
};
}
//# sourceMappingURL=createURL.js.map

1
node_modules/expo-linking/build/createURL.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long

4
node_modules/expo-linking/build/createURL.web.d.ts generated vendored Normal file
View File

@@ -0,0 +1,4 @@
import { CreateURLOptions, ParsedURL } from './Linking.types';
export declare function createURL(path: string, { queryParams }?: CreateURLOptions): string;
export declare function parse(url: string): ParsedURL;
//# sourceMappingURL=createURL.web.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"createURL.web.d.ts","sourceRoot":"","sources":["../src/createURL.web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE9D,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,WAAgB,EAAE,GAAE,gBAAqB,GAAG,MAAM,CAe3F;AAED,wBAAgB,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAoC5C"}

54
node_modules/expo-linking/build/createURL.web.js generated vendored Normal file
View File

@@ -0,0 +1,54 @@
export function createURL(path, { queryParams = {} } = {}) {
if (typeof window === 'undefined')
return '';
const url = new URL(path, window.location.origin);
Object.entries(queryParams).forEach(([key, value]) => {
if (typeof value === 'string') {
url.searchParams.set(key, encodeURIComponent(value));
}
else if (value != null) {
url.searchParams.set(key,
// @ts-expect-error: browser supports using array
value);
}
});
return url.toString().replace(/\/$/, '');
}
export function parse(url) {
let parsed;
try {
parsed = new URL(url);
}
catch {
if (typeof window === 'undefined') {
return {
hostname: null,
path: url,
queryParams: {},
scheme: null,
};
}
return {
hostname: 'localhost',
path: url,
queryParams: {},
scheme: 'http',
};
}
const queryParams = {};
parsed.searchParams.forEach((value, key) => {
queryParams[key] = decodeURIComponent(value);
});
return {
hostname: parsed.hostname || null,
// TODO: We should probably update native to follow the default URL behavior closer.
path: !parsed.hostname && !parsed.pathname
? null
: parsed.pathname === ''
? null
: parsed.pathname.replace(/^\//, ''),
queryParams,
scheme: parsed.protocol.replace(/:$/, ''),
};
}
//# sourceMappingURL=createURL.web.js.map

1
node_modules/expo-linking/build/createURL.web.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"createURL.web.js","sourceRoot":"","sources":["../src/createURL.web.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,SAAS,CAAC,IAAY,EAAE,EAAE,WAAW,GAAG,EAAE,KAAuB,EAAE;IACjF,IAAI,OAAO,MAAM,KAAK,WAAW;QAAE,OAAO,EAAE,CAAC;IAC7C,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IAClD,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;QACnD,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;YAC9B,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,GAAG,EAAE,kBAAkB,CAAC,KAAK,CAAC,CAAC,CAAC;QACvD,CAAC;aAAM,IAAI,KAAK,IAAI,IAAI,EAAE,CAAC;YACzB,GAAG,CAAC,YAAY,CAAC,GAAG,CAClB,GAAG;YACH,iDAAiD;YACjD,KAAK,CACN,CAAC;QACJ,CAAC;IACH,CAAC,CAAC,CAAC;IACH,OAAO,GAAG,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;AAC3C,CAAC;AAED,MAAM,UAAU,KAAK,CAAC,GAAW;IAC/B,IAAI,MAAW,CAAC;IAChB,IAAI,CAAC;QACH,MAAM,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC;IACxB,CAAC;IAAC,MAAM,CAAC;QACP,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE,CAAC;YAClC,OAAO;gBACL,QAAQ,EAAE,IAAI;gBACd,IAAI,EAAE,GAAG;gBACT,WAAW,EAAE,EAAE;gBACf,MAAM,EAAE,IAAI;aACb,CAAC;QACJ,CAAC;QACD,OAAO;YACL,QAAQ,EAAE,WAAW;YACrB,IAAI,EAAE,GAAG;YACT,WAAW,EAAE,EAAE;YACf,MAAM,EAAE,MAAM;SACf,CAAC;IACJ,CAAC;IACD,MAAM,WAAW,GAA2B,EAAE,CAAC;IAC/C,MAAM,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;QACzC,WAAW,CAAC,GAAG,CAAC,GAAG,kBAAkB,CAAC,KAAK,CAAC,CAAC;IAC/C,CAAC,CAAC,CAAC;IACH,OAAO;QACL,QAAQ,EAAE,MAAM,CAAC,QAAQ,IAAI,IAAI;QACjC,oFAAoF;QACpF,IAAI,EACF,CAAC,MAAM,CAAC,QAAQ,IAAI,CAAC,MAAM,CAAC,QAAQ;YAClC,CAAC,CAAC,IAAI;YACN,CAAC,CAAC,MAAM,CAAC,QAAQ,KAAK,EAAE;gBACtB,CAAC,CAAC,IAAI;gBACN,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC;QAC1C,WAAW;QACX,MAAM,EAAE,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC;KAC1C,CAAC;AACJ,CAAC","sourcesContent":["import { CreateURLOptions, ParsedURL } from './Linking.types';\n\nexport function createURL(path: string, { queryParams = {} }: CreateURLOptions = {}): string {\n if (typeof window === 'undefined') return '';\n const url = new URL(path, window.location.origin);\n Object.entries(queryParams).forEach(([key, value]) => {\n if (typeof value === 'string') {\n url.searchParams.set(key, encodeURIComponent(value));\n } else if (value != null) {\n url.searchParams.set(\n key,\n // @ts-expect-error: browser supports using array\n value\n );\n }\n });\n return url.toString().replace(/\\/$/, '');\n}\n\nexport function parse(url: string): ParsedURL {\n let parsed: URL;\n try {\n parsed = new URL(url);\n } catch {\n if (typeof window === 'undefined') {\n return {\n hostname: null,\n path: url,\n queryParams: {},\n scheme: null,\n };\n }\n return {\n hostname: 'localhost',\n path: url,\n queryParams: {},\n scheme: 'http',\n };\n }\n const queryParams: Record<string, string> = {};\n parsed.searchParams.forEach((value, key) => {\n queryParams[key] = decodeURIComponent(value);\n });\n return {\n hostname: parsed.hostname || null,\n // TODO: We should probably update native to follow the default URL behavior closer.\n path:\n !parsed.hostname && !parsed.pathname\n ? null\n : parsed.pathname === ''\n ? null\n : parsed.pathname.replace(/^\\//, ''),\n queryParams,\n scheme: parsed.protocol.replace(/:$/, ''),\n };\n}\n"]}

2
node_modules/expo-linking/build/validateURL.d.ts generated vendored Normal file
View File

@@ -0,0 +1,2 @@
export declare function validateURL(url: string): void;
//# sourceMappingURL=validateURL.d.ts.map

1
node_modules/expo-linking/build/validateURL.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"validateURL.d.ts","sourceRoot":"","sources":["../src/validateURL.ts"],"names":[],"mappings":"AAEA,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAG7C"}

6
node_modules/expo-linking/build/validateURL.js generated vendored Normal file
View File

@@ -0,0 +1,6 @@
import invariant from 'invariant';
export function validateURL(url) {
invariant(typeof url === 'string', 'Invalid URL: should be a string. Was: ' + url);
invariant(url, 'Invalid URL: cannot be empty');
}
//# sourceMappingURL=validateURL.js.map

1
node_modules/expo-linking/build/validateURL.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"validateURL.js","sourceRoot":"","sources":["../src/validateURL.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,UAAU,WAAW,CAAC,GAAW;IACrC,SAAS,CAAC,OAAO,GAAG,KAAK,QAAQ,EAAE,wCAAwC,GAAG,GAAG,CAAC,CAAC;IACnF,SAAS,CAAC,GAAG,EAAE,8BAA8B,CAAC,CAAC;AACjD,CAAC","sourcesContent":["import invariant from 'invariant';\n\nexport function validateURL(url: string): void {\n invariant(typeof url === 'string', 'Invalid URL: should be a string. Was: ' + url);\n invariant(url, 'Invalid URL: cannot be empty');\n}\n"]}

16
node_modules/expo-linking/expo-module.config.json generated vendored Normal file
View File

@@ -0,0 +1,16 @@
{
"platforms": ["apple", "android", "web"],
"apple": {
"modules": ["ExpoLinkingModule"],
"appDelegateSubscribers": ["LinkingAppDelegateSubscriber"]
},
"android": {
"modules": ["expo.modules.linking.ExpoLinkingModule"],
"publication": {
"groupId": "host.exp.exponent",
"artifactId": "expo.modules.linking",
"version": "55.0.7",
"repository": "local-maven-repo"
}
}
}

30
node_modules/expo-linking/ios/ExpoLinking.podspec generated vendored Normal file
View File

@@ -0,0 +1,30 @@
require 'json'
package = JSON.parse(File.read(File.join(__dir__, '..', 'package.json')))
Pod::Spec.new do |s|
s.name = 'ExpoLinking'
s.version = package['version']
s.summary = package['description']
s.description = package['description']
s.license = package['license']
s.author = package['author']
s.homepage = package['homepage']
s.platforms = {
:ios => '15.1',
:tvos => '15.1',
:osx => '11.0'
}
s.source = { git: 'https://github.com/expo/expo.git' }
s.static_framework = true
s.dependency 'ExpoModulesCore'
# Swift/Objective-C compatibility
s.pod_target_xcconfig = {
'DEFINES_MODULE' => 'YES',
'SWIFT_COMPILATION_MODE' => 'wholemodule'
}
s.source_files = "**/*.{h,m,mm,swift,hpp,cpp}"
end

32
node_modules/expo-linking/ios/ExpoLinkingModule.swift generated vendored Normal file
View File

@@ -0,0 +1,32 @@
import ExpoModulesCore
let onURLReceived = "onURLReceived"
public let onURLReceivedNotification = Notification.Name(onURLReceived)
public class ExpoLinkingModule: Module {
public func definition() -> ModuleDefinition {
Name("ExpoLinking")
Events(onURLReceived)
OnStartObserving(onURLReceived) {
NotificationCenter.default.addObserver(self, selector: #selector(handleURLReceivedNotification), name: onURLReceivedNotification, object: nil)
}
OnStopObserving(onURLReceived) {
// swiftlint:disable:next notification_center_detachment
NotificationCenter.default.removeObserver(self)
}
Function("getLinkingURL") {
return ExpoLinkingRegistry.shared.initialURL?.absoluteString
}
}
@objc func handleURLReceivedNotification(_ notification: Notification) {
guard let url = notification.userInfo?["url"] as? URL else {
return
}
self.sendEvent(onURLReceived, ["url": url.absoluteString])
}
}

View File

@@ -0,0 +1,8 @@
typealias OnURLReceivedCallback = (URL) -> Void
class ExpoLinkingRegistry {
static let shared = ExpoLinkingRegistry()
var initialURL: URL?
private init() { }
}

View File

@@ -0,0 +1,38 @@
import ExpoModulesCore
public class LinkingAppDelegateSubscriber: ExpoAppDelegateSubscriber {
#if os(iOS) || os(tvOS)
public func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey: Any] = [:]) -> Bool {
ExpoLinkingRegistry.shared.initialURL = url
NotificationCenter.default.post(name: onURLReceivedNotification, object: self, userInfo: ["url": url])
return false
}
#elseif os(macOS)
public func application(_ application: NSApplication, open urls: [URL]) {
guard let url = urls.first else {
return
}
ExpoLinkingRegistry.shared.initialURL = url
NotificationCenter.default.post(name: onURLReceivedNotification, object: self, userInfo: ["url": url])
}
#endif
public func application(
_ application: UIApplication,
continue userActivity: NSUserActivity,
restorationHandler: @escaping ([any UIUserActivityRestoring]?) -> Void
) -> Bool {
// The URL can be nullish when launching App Clips from Test Flight without custom invocations set.
if userActivity.activityType == NSUserActivityTypeBrowsingWeb, let url = userActivity.webpageURL {
// App Clips and cold universal link launches don't appear to invoke application:open:options:
// so we'll use this first request to assume the initial URL.
if ExpoLinkingRegistry.shared.initialURL == nil {
ExpoLinkingRegistry.shared.initialURL = url
}
NotificationCenter.default.post(name: onURLReceivedNotification, object: self, userInfo: ["url": url])
return true
}
return false
}
}

1
node_modules/expo-linking/jest-rsc.config.js generated vendored Normal file
View File

@@ -0,0 +1 @@
module.exports = require('jest-expo/rsc/jest-preset');

View File

@@ -0,0 +1 @@
ed5b68ea8ace3e98aaaaa1bac77179fb

View File

@@ -0,0 +1 @@
6d333ab0bbfd515cec43299271011985dc02ff1d

View File

@@ -0,0 +1 @@
59d45e2a6cf5b9f1d58570a3a23fbfbcf5eeb66463e7510e727155d94c38cad2

View File

@@ -0,0 +1 @@
d8abe8805c570aa18ee34018f0836e26d825ce9e008a7af2aa9ecc2ffd3f32958037def397960dbdcfb09bfba5938052603637dedc16a6d5d19e92efc0926f47

View File

@@ -0,0 +1 @@
fb67d01955821bb5067c03e341969795

View File

@@ -0,0 +1 @@
44a063ed3278300099d6366b42fd905fbe204271

View File

@@ -0,0 +1 @@
b2e7fe6f8deed45ab138b7575dc620c060a5ae0da829004d71aaa88701aa1f77

View File

@@ -0,0 +1 @@
b2eed551713460d1c11b5570c6e842ccf88505b480be38922e0926ac72182370ea15b1c444cd6ed7b2f32249cd62c39ebf4c931f445308d318b96eb928bd81f7

View File

@@ -0,0 +1,87 @@
{
"formatVersion": "1.1",
"component": {
"group": "host.exp.exponent",
"module": "expo.modules.linking",
"version": "55.0.7",
"attributes": {
"org.gradle.status": "release"
}
},
"createdBy": {
"gradle": {
"version": "9.0.0"
}
},
"variants": [
{
"name": "releaseVariantReleaseApiPublication",
"attributes": {
"org.gradle.category": "library",
"org.gradle.dependency.bundling": "external",
"org.gradle.libraryelements": "aar",
"org.gradle.usage": "java-api"
},
"files": [
{
"name": "expo.modules.linking-55.0.7.aar",
"url": "expo.modules.linking-55.0.7.aar",
"size": 11854,
"sha512": "b2eed551713460d1c11b5570c6e842ccf88505b480be38922e0926ac72182370ea15b1c444cd6ed7b2f32249cd62c39ebf4c931f445308d318b96eb928bd81f7",
"sha256": "b2e7fe6f8deed45ab138b7575dc620c060a5ae0da829004d71aaa88701aa1f77",
"sha1": "44a063ed3278300099d6366b42fd905fbe204271",
"md5": "fb67d01955821bb5067c03e341969795"
}
]
},
{
"name": "releaseVariantReleaseRuntimePublication",
"attributes": {
"org.gradle.category": "library",
"org.gradle.dependency.bundling": "external",
"org.gradle.libraryelements": "aar",
"org.gradle.usage": "java-runtime"
},
"dependencies": [
{
"group": "org.jetbrains.kotlin",
"module": "kotlin-stdlib-jdk7",
"version": {
"requires": "2.1.20"
}
}
],
"files": [
{
"name": "expo.modules.linking-55.0.7.aar",
"url": "expo.modules.linking-55.0.7.aar",
"size": 11854,
"sha512": "b2eed551713460d1c11b5570c6e842ccf88505b480be38922e0926ac72182370ea15b1c444cd6ed7b2f32249cd62c39ebf4c931f445308d318b96eb928bd81f7",
"sha256": "b2e7fe6f8deed45ab138b7575dc620c060a5ae0da829004d71aaa88701aa1f77",
"sha1": "44a063ed3278300099d6366b42fd905fbe204271",
"md5": "fb67d01955821bb5067c03e341969795"
}
]
},
{
"name": "releaseVariantReleaseSourcePublication",
"attributes": {
"org.gradle.category": "documentation",
"org.gradle.dependency.bundling": "external",
"org.gradle.docstype": "sources",
"org.gradle.usage": "java-runtime"
},
"files": [
{
"name": "expo.modules.linking-55.0.7-sources.jar",
"url": "expo.modules.linking-55.0.7-sources.jar",
"size": 2384,
"sha512": "d8abe8805c570aa18ee34018f0836e26d825ce9e008a7af2aa9ecc2ffd3f32958037def397960dbdcfb09bfba5938052603637dedc16a6d5d19e92efc0926f47",
"sha256": "59d45e2a6cf5b9f1d58570a3a23fbfbcf5eeb66463e7510e727155d94c38cad2",
"sha1": "6d333ab0bbfd515cec43299271011985dc02ff1d",
"md5": "ed5b68ea8ace3e98aaaaa1bac77179fb"
}
]
}
]
}

View File

@@ -0,0 +1 @@
e4de9b93337a255d7f16c4f9904bd6ee

View File

@@ -0,0 +1 @@
0f0aa52187c77c9a8e34edf1a83b281d3d29dd7c

View File

@@ -0,0 +1 @@
1ea8141f9c9901d0d9438c38bdfe10c9382fa30ea5a0a11e23800f92668746d7

View File

@@ -0,0 +1 @@
9b7d9a1b9f22eebd3d7c5f2713a69f7b0cc578f047118c00ba6455a872206a440a9af834b91819ffa7192cd3bbedf5af54d1dbaac6c6b39585ebd245096168a0

View File

@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<!-- This module was also published with a richer model, Gradle metadata, -->
<!-- which should be used instead. Do not delete the following line which -->
<!-- is to indicate to Gradle or any Gradle module metadata file consumer -->
<!-- that they should prefer consuming it instead. -->
<!-- do_not_remove: published-with-gradle-metadata -->
<modelVersion>4.0.0</modelVersion>
<groupId>host.exp.exponent</groupId>
<artifactId>expo.modules.linking</artifactId>
<version>55.0.7</version>
<packaging>aar</packaging>
<name>expo.modules.linking</name>
<url>https://github.com/expo/expo</url>
<organization>
<name>650 Industries, Inc. (“Expo”)</name>
<url>https://expo.dev/home</url>
</organization>
<licenses>
<license>
<name>MIT License</name>
<url>https://github.com/expo/expo/blob/main/LICENSE</url>
<distribution>https://github.com/expo/expo/blob/main/LICENSE</distribution>
</license>
</licenses>
<developers>
<developer>
<name>Expo Maintainers</name>
<email>support@expo.dev</email>
<url>https://github.com/orgs/expo/people</url>
</developer>
</developers>
<scm>
<connection>https://github.com/expo/expo.git</connection>
<developerConnection>https://github.com/expo/expo.git</developerConnection>
<url>https://github.com/expo/expo</url>
</scm>
<dependencies>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib-jdk7</artifactId>
<version>2.1.20</version>
<scope>runtime</scope>
</dependency>
</dependencies>
</project>

View File

@@ -0,0 +1 @@
d4c0fb243571114fa1f931f520f97ff3

View File

@@ -0,0 +1 @@
d37c715a6849f56106e45554be4548a13f049671

View File

@@ -0,0 +1 @@
5534492ca83940953b945ed6b1865aee9b55c9cf65a02c6c410afad5993e5b3a

View File

@@ -0,0 +1 @@
ea24322fce40822a138398dbff654013709abad758f5b4a36a295fc316d3978ade190929cd24cca29fec0a7a877c82e52100193b3f5ea08f373bfd2bd6a10b81

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<metadata>
<groupId>host.exp.exponent</groupId>
<artifactId>expo.modules.linking</artifactId>
<versioning>
<latest>55.0.7</latest>
<release>55.0.7</release>
<versions>
<version>55.0.7</version>
</versions>
<lastUpdated>20260225012644</lastUpdated>
</versioning>
</metadata>

View File

@@ -0,0 +1 @@
1f7dd6985128784c3ad0ceeda18f3f13

View File

@@ -0,0 +1 @@
3ec72576b07d0ee10086c021f9f4c217a0322f00

View File

@@ -0,0 +1 @@
3786922ab3f8f25d34026bfa31fcaaab3958e17e58f86a7f6a16e6b4213cf8e0

View File

@@ -0,0 +1 @@
2ec1f9d4c9a9d5a0e2e5e606455f37b7b95834607c413e3908bd12ad9ee5ef4670a3cd325d4ded67059545e9730418901b72266c34ecd5f01130fe06fc008258

10
node_modules/expo-linking/mocks/ExpoLinking.ts generated vendored Normal file
View File

@@ -0,0 +1,10 @@
/**
* Automatically generated by expo-modules-test-core.
*
* This autogenerated file provides a mock for native Expo module,
* and works out of the box with the expo jest preset.
* */
export function getLinkingURL(): string | null {
return null;
}

55
node_modules/expo-linking/package.json generated vendored Normal file
View File

@@ -0,0 +1,55 @@
{
"name": "expo-linking",
"version": "55.0.7",
"description": "Create and open deep links universally",
"main": "build/Linking.js",
"types": "build/Linking.d.ts",
"exports": {
"./package.json": "./package.json",
".": {
"react-server": "./build/Linking.server.js",
"default": "./build/Linking.js"
}
},
"scripts": {
"build": "expo-module build",
"clean": "expo-module clean",
"lint": "expo-module lint",
"test": "expo-module test",
"test:rsc": "jest --config jest-rsc.config.js",
"prepare": "expo-module prepare",
"prepublishOnly": "expo-module prepublishOnly",
"expo-module": "expo-module"
},
"keywords": [
"react-native",
"expo",
"expo-linking"
],
"repository": {
"type": "git",
"url": "https://github.com/expo/expo.git",
"directory": "packages/expo-linking"
},
"bugs": {
"url": "https://github.com/expo/expo/issues"
},
"author": "650 Industries, Inc.",
"license": "MIT",
"homepage": "https://docs.expo.dev/versions/latest/sdk/linking",
"dependencies": {
"expo-constants": "~55.0.7",
"invariant": "^2.2.4"
},
"devDependencies": {
"expo-module-scripts": "^55.0.2"
},
"peerDependencies": {
"react": "*",
"react-native": "*"
},
"jest": {
"preset": "expo-module-scripts"
},
"gitHead": "b183e5cbd95eb6ee54a878291c7077d8d63e4850"
}

12
node_modules/expo-linking/src/ExpoLinking.ts generated vendored Normal file
View File

@@ -0,0 +1,12 @@
import { requireNativeModule, NativeModule } from 'expo-modules-core';
type ExpoLinkingModuleEvents = {
onURLReceived(url: string): void;
};
declare class ExpoLinkingNativeModule extends NativeModule<ExpoLinkingModuleEvents> {
getLinkingURL(): string | null;
}
const ExpoLinking = requireNativeModule<ExpoLinkingNativeModule>('ExpoLinking');
export default ExpoLinking;

30
node_modules/expo-linking/src/ExpoLinking.web.ts generated vendored Normal file
View File

@@ -0,0 +1,30 @@
import invariant from 'invariant';
import { URLListener } from './Linking.types';
export default {
addListener(eventName: 'onURLReceived' | string, listener: URLListener): { remove(): void } {
invariant(
eventName === 'onURLReceived',
`Linking.addListener(): ${eventName} is not a valid event`
);
// Do nothing in Node.js environments
if (typeof window === 'undefined') {
return { remove() {} };
}
const nativeListener = (nativeEvent: MessageEvent) =>
listener({ url: window.location.href, nativeEvent });
window.addEventListener('message', nativeListener, false);
return {
remove: () => {
window.removeEventListener('message', nativeListener);
},
};
},
getLinkingURL(): string {
if (typeof window === 'undefined') return '';
return window.location.href;
},
};

68
node_modules/expo-linking/src/Linking.server.ts generated vendored Normal file
View File

@@ -0,0 +1,68 @@
import { UnavailabilityError } from 'expo-modules-core';
import { ParsedURL, SendIntentExtras, URLListener } from './Linking.types';
export function addEventListener(type: 'url', handler: URLListener) {
return { remove() {} };
}
export async function parseInitialURLAsync(): Promise<ParsedURL> {
return {
scheme: null,
hostname: null,
path: null,
queryParams: null,
};
}
export async function sendIntent(action: string, extras?: SendIntentExtras[]): Promise<void> {
throw new UnavailabilityError('Linking', 'sendIntent');
}
export async function openSettings(): Promise<void> {
throw new UnavailabilityError('Linking', 'openSettings');
}
export async function getInitialURL(): Promise<string | null> {
return '';
}
export function getLinkingURL() {
return '';
}
export async function openURL(url: string): Promise<true> {
return true;
}
export async function canOpenURL() {
return true;
}
export function useURL(): string | null {
return null;
}
export function useLinkingURL() {
return null;
}
export * from './Linking.types';
export function collectManifestSchemes() {
return [];
}
export function hasConstantsManifest() {
return false;
}
export function hasCustomScheme() {
return false;
}
export function resolveScheme() {
return '';
}
export { parse, createURL } from './createURL';

165
node_modules/expo-linking/src/Linking.ts generated vendored Normal file
View File

@@ -0,0 +1,165 @@
import { UnavailabilityError } from 'expo-modules-core';
import { useEffect, useState } from 'react';
import { EmitterSubscription, Platform } from 'react-native';
import ExpoLinking from './ExpoLinking';
import { ParsedURL, SendIntentExtras, URLListener } from './Linking.types';
import RNLinking from './RNLinking';
import { parse } from './createURL';
import { validateURL } from './validateURL';
// @needsAudit
/**
* Add a handler to `Linking` changes by listening to the `url` event type and providing the handler.
* It is recommended to use the [`useURL()`](#useurl) hook instead.
* @param type The only valid type is `'url'`.
* @param handler An [`URLListener`](#urllistener) function that takes an `event` object of the type
* [`EventType`](#eventtype).
* @return An EmitterSubscription that has the remove method from EventSubscription
* @see [React Native documentation on Linking](https://reactnative.dev/docs/linking#addeventlistener).
*/
export function addEventListener(type: 'url', handler: URLListener): EmitterSubscription {
return RNLinking.addEventListener(type, handler);
}
// @needsAudit
/**
* Helper method which wraps React Native's `Linking.getInitialURL()` in `Linking.parse()`.
* Parses the deep link information out of the URL used to open the experience initially.
* If no link opened the app, all the fields will be `null`.
* > On the web it parses the current window URL.
* @return A promise that resolves with `ParsedURL` object.
*/
export async function parseInitialURLAsync(): Promise<ParsedURL> {
const initialUrl = await RNLinking.getInitialURL();
if (!initialUrl) {
return {
scheme: null,
hostname: null,
path: null,
queryParams: null,
};
}
return parse(initialUrl);
}
// @needsAudit
/**
* Launch an Android intent with extras.
* > Use [`expo-intent-launcher`](./intent-launcher) instead. `sendIntent` is only included in
* > `Linking` for API compatibility with React Native's Linking API.
* @platform android
*/
export async function sendIntent(action: string, extras?: SendIntentExtras[]): Promise<void> {
if (Platform.OS === 'android') {
return await RNLinking.sendIntent(action, extras);
}
throw new UnavailabilityError('Linking', 'sendIntent');
}
// @needsAudit
/**
* Open the operating system settings app and displays the apps custom settings, if it has any.
*/
export async function openSettings(): Promise<void> {
if (Platform.OS === 'web') {
throw new UnavailabilityError('Linking', 'openSettings');
}
if (RNLinking.openSettings) {
return await RNLinking.openSettings();
}
await openURL('app-settings:');
}
// @needsAudit
/**
* Get the URL that was used to launch the app if it was launched by a link.
* @return The URL string that launched your app, or `null`.
*/
export async function getInitialURL(): Promise<string | null> {
return (await RNLinking.getInitialURL()) ?? null;
}
/**
* Get the URL that was used to launch the app if it was launched by a link.
* @return The URL string that launched your app, or `null`.
*/
export function getLinkingURL(): string | null {
return ExpoLinking.getLinkingURL();
}
// @needsAudit
/**
* Attempt to open the given URL with an installed app. See the [Linking guide](/guides/linking)
* for more information.
* @param url A URL for the operating system to open. For example: `tel:5555555`, `exp://`.
* @return A `Promise` that is fulfilled with `true` if the link is opened operating system
* automatically or the user confirms the prompt to open the link. The `Promise` rejects if there
* are no applications registered for the URL or the user cancels the dialog.
*/
export async function openURL(url: string): Promise<true> {
validateURL(url);
return await RNLinking.openURL(url);
}
// @needsAudit
/**
* Determine whether or not an installed app can handle a given URL.
* On web this always returns `true` because there is no API for detecting what URLs can be opened.
* @param url The URL that you want to test can be opened.
* @return A `Promise` object that is fulfilled with `true` if the URL can be handled, otherwise it
* `false` if not.
* The `Promise` will reject on Android if it was impossible to check if the URL can be opened, and
* on iOS if you didn't [add the specific scheme in the `LSApplicationQueriesSchemes` key inside **Info.plist**](/guides/linking#linking-from-your-app).
*/
export async function canOpenURL(url: string): Promise<boolean> {
validateURL(url);
return await RNLinking.canOpenURL(url);
}
// @needsAudit
/**
* Returns the initial URL followed by any subsequent changes to the URL.
* @deprecated Use `useLinkingURL` hook instead.
* @return Returns the initial URL or `null`.
*/
export function useURL(): string | null {
const [url, setLink] = useState<string | null>(null);
function onChange(event: { url: string }) {
setLink(event.url);
}
useEffect(() => {
getInitialURL().then((url) => setLink(url));
const subscription = addEventListener('url', onChange);
return () => subscription.remove();
}, []);
return url;
}
/**
* Returns the linking URL followed by any subsequent changes to the URL.
* Always returns the initial URL immediately on reload.
* @return Returns the initial URL or `null`.
*/
export function useLinkingURL(): string | null {
const [url, setLink] = useState<string | null>(ExpoLinking.getLinkingURL);
function onChange(event: { url: string }) {
setLink(event.url);
}
useEffect(() => {
const subscription = ExpoLinking.addListener('onURLReceived', onChange as any);
return () => subscription.remove();
}, []);
return url ?? null;
}
export * from './Linking.types';
export * from './Schemes';
export { parse, createURL } from './createURL';

47
node_modules/expo-linking/src/Linking.types.ts generated vendored Normal file
View File

@@ -0,0 +1,47 @@
// @docsMissing
export type QueryParams = Record<string, undefined | string | string[]>;
// @needsAudit @docsMissing
export type ParsedURL = {
scheme: string | null;
hostname: string | null;
/**
* The path into the app specified by the URL.
*/
path: string | null;
/**
* The set of query parameters specified by the query string of the url used to open the app.
*/
queryParams: QueryParams | null;
};
// @needsAudit
export type CreateURLOptions = {
/**
* URI protocol `<scheme>://` that must be built into your native app.
*/
scheme?: string;
/**
* An object of parameters that will be converted into a query string.
*/
queryParams?: QueryParams;
/**
* Should the URI be triple slashed `scheme:///path` or double slashed `scheme://path`.
*/
isTripleSlashed?: boolean;
};
// @docsMissing
export type EventType = {
url: string;
nativeEvent?: MessageEvent;
};
// @docsMissing
export type URLListener = (event: EventType) => void;
// @docsMissing
export type NativeURLListener = (nativeEvent: MessageEvent) => void;
// @docsMissing
export type SendIntentExtras = { key: string; value: string | number | boolean };

2
node_modules/expo-linking/src/RNLinking.ts generated vendored Normal file
View File

@@ -0,0 +1,2 @@
import { Linking } from 'react-native';
export default Linking;

58
node_modules/expo-linking/src/RNLinking.web.ts generated vendored Normal file
View File

@@ -0,0 +1,58 @@
import invariant from 'invariant';
import { NativeURLListener, URLListener } from './Linking.types';
const listeners: { listener: URLListener; nativeListener: NativeURLListener }[] = [];
export default {
addEventListener(type: 'url', listener: URLListener): { remove(): void } {
// Do nothing in Node.js environments
if (typeof window === 'undefined') {
return { remove() {} };
}
invariant(type === 'url', `Linking.addEventListener(): ${type} is not a valid event`);
const nativeListener: NativeURLListener = (nativeEvent) =>
listener({ url: window.location.href, nativeEvent });
listeners.push({ listener, nativeListener });
window.addEventListener('message', nativeListener, false);
return {
remove: () => {
this.removeEventListener(type, listener);
},
};
},
removeEventListener(type: 'url', listener: URLListener): void {
// Do nothing in Node.js environments
if (typeof window === 'undefined') {
return;
}
invariant(type === 'url', `Linking.addEventListener(): ${type} is not a valid event`);
const listenerIndex = listeners.findIndex((pair) => pair.listener === listener);
invariant(
listenerIndex !== -1,
'Linking.removeEventListener(): cannot remove an unregistered event listener.'
);
const nativeListener = listeners[listenerIndex].nativeListener;
window.removeEventListener('message', nativeListener, false);
listeners.splice(listenerIndex, 1);
},
async canOpenURL(): Promise<boolean> {
// In reality this should be able to return false for links like `chrome://` on chrome.
return true;
},
async getInitialURL(): Promise<string> {
if (typeof window === 'undefined') return '';
return window.location.href;
},
async openURL(url: string): Promise<void> {
if (typeof window !== 'undefined') {
// @ts-ignore
window.location = new URL(url, window.location).toString();
}
},
};

193
node_modules/expo-linking/src/Schemes.ts generated vendored Normal file
View File

@@ -0,0 +1,193 @@
import Constants, { ExecutionEnvironment } from 'expo-constants';
import { Platform } from 'expo-modules-core';
const LINKING_GUIDE_URL = `https://docs.expo.dev/guides/linking/`;
// @docsMissing
export function hasCustomScheme(): boolean {
if (Constants.executionEnvironment === ExecutionEnvironment.Bare) {
// Bare always uses a custom scheme.
return true;
} else if (Constants.executionEnvironment === ExecutionEnvironment.Standalone) {
// Standalone uses a custom scheme when one is defined.
const manifestSchemes = collectManifestSchemes();
return !!manifestSchemes.length;
}
// Store client uses the default scheme.
return false;
}
type SchemeConfig = {
scheme?: string | string[];
};
function getSchemes(config: SchemeConfig | null | undefined): string[] {
if (config) {
if (Array.isArray(config.scheme)) {
const validate = (value: any): value is string => {
return typeof value === 'string';
};
return config.scheme.filter<string>(validate);
} else if (typeof config.scheme === 'string') {
return [config.scheme];
}
}
return [];
}
// Valid schemes for the Expo client.
const EXPO_CLIENT_SCHEMES = Platform.select({
// Results from `npx uri-scheme list --info-path ios/Exponent/Supporting/Info.plist`
ios: [
'exp',
'exps',
'fb1696089354000816',
'host.exp.exponent',
'com.googleusercontent.apps.603386649315-vp4revvrcgrcjme51ebuhbkbspl048l9',
],
// Collected manually
android: ['exp', 'exps'],
});
/**
* Collect a list of platform schemes from the manifest.
*
* This method is based on the `Scheme` modules from `@expo/config-plugins`
* which are used for collecting the schemes before prebuilding a native app.
*
* - Android: `scheme` -> `android.scheme` -> `android.package`
* - iOS: `scheme` -> `ios.scheme` -> `ios.bundleIdentifier`
*/
export function collectManifestSchemes(): string[] {
// ios.scheme, android.scheme, and scheme as an array are not yet added to the
// Expo config spec, but there's no harm in adding them early.
// They'll be added when we drop support for `expo build` or decide
// to have them only work with `eas build`.
const platformManifest =
(Platform.select<any>({
ios: Constants.expoConfig?.ios,
android: Constants.expoConfig?.android,
}) as SchemeConfig) ?? {};
return getSchemes(Constants.expoConfig).concat(getSchemes(platformManifest));
}
function getNativeAppIdScheme(): string | null {
// Add the native application identifier to the list of schemes for parity with `expo build`.
// The native app id has been added to builds for a long time to support Google Sign-In.
return (
Platform.select({
ios: Constants.expoConfig?.ios?.bundleIdentifier,
// TODO: This may change to android.applicationId in the future.
android: Constants.expoConfig?.android?.package,
}) ?? null
);
}
// @needsAudit
/**
* Ensure the user has linked the expo-constants manifest in bare workflow.
*/
export function hasConstantsManifest(): boolean {
return !!Object.keys(Constants.expoConfig ?? {}).length;
}
// @docsMissing
export function resolveScheme(options: { scheme?: string; isSilent?: boolean }): string {
if (
Constants.executionEnvironment !== ExecutionEnvironment.StoreClient &&
!hasConstantsManifest()
) {
throw new Error(
`expo-linking needs access to the expo-constants manifest (app.json or app.config.js) to determine what URI scheme to use. Setup the manifest and rebuild: https://github.com/expo/expo/blob/main/packages/expo-constants/README.md`
);
}
const manifestSchemes = collectManifestSchemes();
const nativeAppId = getNativeAppIdScheme();
if (!manifestSchemes.length) {
if (__DEV__ && !options.isSilent) {
// Assert a config warning if no scheme is setup yet. `isSilent` is used for warnings, but we'll ignore it for exceptions.
console.warn(
`Linking requires a build-time setting \`scheme\` in the project's Expo config (app.config.js or app.json) for production apps, if it's left blank, your app may crash. The scheme does not apply to development in the Expo client but you should add it as soon as you start working with Linking to avoid creating a broken build. Learn more: ${LINKING_GUIDE_URL}`
);
} else if (!__DEV__ || Constants.executionEnvironment !== ExecutionEnvironment.StoreClient) {
// Throw in production or when not in store client. Use the __DEV__ flag so users can test this functionality with `expo start --no-dev`,
throw new Error(
'Cannot make a deep link into a standalone app with no custom scheme defined'
);
}
}
// In the Expo client...
if (Constants.executionEnvironment === ExecutionEnvironment.StoreClient) {
if (options.scheme) {
// This enables users to use the fb or google redirects on iOS in the Expo client.
if (EXPO_CLIENT_SCHEMES?.includes(options.scheme)) {
return options.scheme;
}
// Silently ignore to make bare workflow development easier.
}
// Fallback to the default client scheme.
return 'exp';
}
const schemes = [...manifestSchemes, nativeAppId].filter(Boolean);
if (options.scheme) {
if (__DEV__) {
// Bare workflow development assertion about the provided scheme matching the Expo config.
if (!schemes.includes(options.scheme) && !options.isSilent) {
// TODO: Will this cause issues for things like Facebook or Google that use `reversed-client-id://` or `fb<FBID>:/`?
// Traditionally these APIs don't use the Linking API directly.
console.warn(
`The provided Linking scheme '${
options.scheme
}' does not appear in the list of possible URI schemes in your Expo config. Expected one of: ${schemes
.map((scheme) => `'${scheme}'`)
.join(', ')}`
);
}
}
// Return the user provided value.
return options.scheme;
}
// If no scheme is provided, we'll guess what the scheme is based on the manifest.
// This is to attempt to keep managed apps working across expo build and EAS build.
// EAS build ejects the app before building it so we can assume that the user will
// be using one of defined schemes.
// If the native app id is the only scheme,
if (!!nativeAppId && !manifestSchemes.length && !options.isSilent) {
// Assert a config warning if no scheme is setup yet.
// This warning only applies to managed workflow EAS apps, as bare workflow
console.warn(
`Linking requires a build-time setting \`scheme\` in the project's Expo config (app.config.js or app.json) for bare or production apps. Manually providing a \`scheme\` property can circumvent this warning. Using native app identifier as the scheme '${nativeAppId}'. Learn more: ${LINKING_GUIDE_URL}`
);
return nativeAppId;
}
// When the native app id is defined, it'll be added to the list of schemes, for most
// users this will be unexpected behavior and cause all apps to warn when the Linking API
// is used without a predefined scheme. For now, if the native app id is defined, require
// at least one more scheme to be added before throwing a warning.
// i.e. `scheme: ['foo', 'bar']` (unimplemented functionality).
const [scheme, ...extraSchemes] = manifestSchemes;
if (!scheme) {
const errorMessage = `Linking requires a build-time setting \`scheme\` in the project's Expo config (app.config.js or app.json) for bare or production apps. Manually providing a \`scheme\` property can circumvent this error. Learn more: ${LINKING_GUIDE_URL}`;
// Throw in production, use the __DEV__ flag so users can test this functionality with `expo start --no-dev`
throw new Error(errorMessage);
}
if (extraSchemes.length && !options.isSilent) {
console.warn(
`Linking found multiple possible URI schemes in your Expo config.\nUsing '${scheme}'. Ignoring: ${[
...extraSchemes,
nativeAppId,
]
.filter(Boolean)
.join(', ')}.\nProvide the preferred URI scheme to the Linking API.`
);
}
return scheme;
}

12
node_modules/expo-linking/src/Schemes.web.ts generated vendored Normal file
View File

@@ -0,0 +1,12 @@
export function hasCustomScheme(): boolean {
return true;
}
export function collectManifestSchemes(): string[] {
return [];
}
export function hasConstantsManifest(): boolean {
return false;
}
export function resolveScheme(): string {
return 'https';
}

195
node_modules/expo-linking/src/createURL.ts generated vendored Normal file
View File

@@ -0,0 +1,195 @@
import Constants from 'expo-constants';
import { CreateURLOptions, ParsedURL } from './Linking.types';
import { hasCustomScheme, resolveScheme } from './Schemes';
import { validateURL } from './validateURL';
function getHostUri(): string | null {
if (Constants.expoConfig?.hostUri) {
return Constants.expoConfig.hostUri;
} else if (!hasCustomScheme()) {
// we're probably not using up-to-date xdl, so just fake it for now
// we have to remove the /--/ on the end since this will be inserted again later
return removeScheme(Constants.linkingUri).replace(/\/--($|\/.*$)/, '');
} else {
return null;
}
}
function isExpoHosted(): boolean {
const hostUri = getHostUri();
return !!(
hostUri &&
(/^(.*\.)?(expo\.io|exp\.host|exp\.direct|expo\.test|expo\.dev)(:.*)?(\/.*)?$/.test(hostUri) ||
Constants.expoGoConfig?.developer)
);
}
function removeScheme(url: string): string {
return url.replace(/^[a-zA-Z0-9+.-]+:\/\//, '');
}
function removePort(url: string): string {
return url.replace(/(?=([a-zA-Z0-9+.-]+:\/\/)?[^/]):\d+/, '');
}
function removeLeadingSlash(url: string): string {
return url.replace(/^\//, '');
}
function removeTrailingSlashAndQueryString(url: string): string {
return url.replace(/\/?\?.*$/, '');
}
function ensureLeadingSlash(input: string, shouldAppend: boolean): string {
const hasSlash = input.startsWith('/');
if (hasSlash && !shouldAppend) {
return input.substring(1);
} else if (!hasSlash && shouldAppend) {
return `/${input}`;
}
return input;
}
// @needsAudit
/**
* Helper method for constructing a deep link into your app, given an optional path and set of query
* parameters. Creates a URI scheme with two slashes by default.
*
* The scheme must be defined in the [app config](./../config/app) under `expo.scheme`
* or `expo.{android,ios}.scheme`. Platform-specific schemes defined under `expo.{android,ios}.scheme`
* take precedence over universal schemes defined under `expo.scheme`.
*
* # Examples
* - Development and production builds: `<scheme>://path` - uses the optional `scheme` property if provided, and otherwise uses the first scheme defined by your app config
* - Web (dev): `https://localhost:19006/path`
* - Web (prod): `https://myapp.com/path`
* - Expo Go (dev): `exp://128.0.0.1:8081/--/path`
*
* The behavior of this method in Expo Go for published updates is undefined and should not be relied upon.
* The created URL in this case is neither stable nor predictable during the lifetime of the app.
* If a stable URL is needed, for example in authorization callbacks, a build (or development build)
* of your application should be used and the scheme provided.
*
* @param path Addition path components to append to the base URL.
* @param namedParameters Additional options object.
* @return A URL string which points to your app with the given deep link information.
*/
export function createURL(
path: string,
{ scheme, queryParams = {}, isTripleSlashed = false }: CreateURLOptions = {}
): string {
const resolvedScheme = resolveScheme({ scheme });
let hostUri = getHostUri() || '';
if (hasCustomScheme() && isExpoHosted()) {
hostUri = '';
}
if (path) {
if (isExpoHosted() && hostUri) {
path = `/--/${removeLeadingSlash(path)}`;
}
if (isTripleSlashed && !path.startsWith('/')) {
path = `/${path}`;
}
} else {
path = '';
}
// merge user-provided query params with any that were already in the hostUri
// e.g. release-channel
let queryString = '';
const queryStringMatchResult = hostUri.match(/(.*)\?(.+)/);
if (queryStringMatchResult) {
hostUri = queryStringMatchResult[1];
queryString = queryStringMatchResult[2];
let paramsFromHostUri = {};
try {
paramsFromHostUri = Object.fromEntries(
// @ts-ignore: [Symbol.iterator] is indeed, available on every platform.
new URLSearchParams(queryString)
);
} catch {}
queryParams = {
...queryParams,
...paramsFromHostUri,
};
}
queryString = new URLSearchParams(
// For legacy purposes, we'll strip out the nullish values before creating the URL.
Object.fromEntries(
Object.entries(queryParams).filter(([, value]) => value != null) as [string, string][]
)
).toString();
if (queryString) {
queryString = `?${queryString}`;
}
hostUri = ensureLeadingSlash(hostUri, !isTripleSlashed);
// URLSearchParams.stringify already encodes query parameters, so we only need to encode the remaining part of the URL.
const encodedURI = encodeURI(`${resolvedScheme}:${isTripleSlashed ? '/' : ''}/${hostUri}${path}`);
return `${encodedURI}${queryString}`;
}
// @needsAudit
/**
* Helper method for parsing out deep link information from a URL.
* @param url A URL that points to the currently running experience (for example, an output of `Linking.createURL()`).
* @return A `ParsedURL` object.
*/
export function parse(url: string): ParsedURL {
validateURL(url);
const queryParams: Record<string, string> = {};
let path: string | null = null;
let hostname: string | null = null;
let scheme: string | null = null;
try {
const parsed = new URL(url);
parsed.searchParams.forEach((value, key) => {
queryParams[key] = decodeURIComponent(value);
});
path = parsed.pathname || null;
hostname = parsed.hostname || null;
scheme = parsed.protocol || null;
} catch {
path = url;
}
const hostUri = getHostUri() || '';
const hostUriStripped = removePort(removeTrailingSlashAndQueryString(hostUri));
if (scheme) {
// Remove colon at end
scheme = scheme.substring(0, scheme.length - 1);
}
if (path) {
path = removeLeadingSlash(path);
let expoPrefix: string | null = null;
if (hostUriStripped) {
const parts = hostUriStripped.split('/');
expoPrefix = parts.slice(1).concat(['--/']).join('/');
}
if (isExpoHosted() && !hasCustomScheme() && expoPrefix && path.startsWith(expoPrefix)) {
path = path.substring(expoPrefix.length);
hostname = null;
} else if (path.indexOf('+') > -1) {
path = path.substring(path.indexOf('+') + 1);
}
}
return {
hostname,
path,
queryParams,
scheme,
};
}

56
node_modules/expo-linking/src/createURL.web.ts generated vendored Normal file
View File

@@ -0,0 +1,56 @@
import { CreateURLOptions, ParsedURL } from './Linking.types';
export function createURL(path: string, { queryParams = {} }: CreateURLOptions = {}): string {
if (typeof window === 'undefined') return '';
const url = new URL(path, window.location.origin);
Object.entries(queryParams).forEach(([key, value]) => {
if (typeof value === 'string') {
url.searchParams.set(key, encodeURIComponent(value));
} else if (value != null) {
url.searchParams.set(
key,
// @ts-expect-error: browser supports using array
value
);
}
});
return url.toString().replace(/\/$/, '');
}
export function parse(url: string): ParsedURL {
let parsed: URL;
try {
parsed = new URL(url);
} catch {
if (typeof window === 'undefined') {
return {
hostname: null,
path: url,
queryParams: {},
scheme: null,
};
}
return {
hostname: 'localhost',
path: url,
queryParams: {},
scheme: 'http',
};
}
const queryParams: Record<string, string> = {};
parsed.searchParams.forEach((value, key) => {
queryParams[key] = decodeURIComponent(value);
});
return {
hostname: parsed.hostname || null,
// TODO: We should probably update native to follow the default URL behavior closer.
path:
!parsed.hostname && !parsed.pathname
? null
: parsed.pathname === ''
? null
: parsed.pathname.replace(/^\//, ''),
queryParams,
scheme: parsed.protocol.replace(/:$/, ''),
};
}

Some files were not shown because too many files have changed in this diff Show More