expo 43.0.0-alpha.1 → 43.0.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,261 @@
1
+
2
+ # Created by https://www.gitignore.io/api/java,maven,gradle,android,intellij,androidstudio
3
+
4
+ ### Android ###
5
+ # Built application files
6
+ *.apk
7
+ *.ap_
8
+
9
+ # Files for the ART/Dalvik VM
10
+ *.dex
11
+
12
+ # Java class files
13
+ *.class
14
+
15
+ # Generated files
16
+ bin/
17
+ gen/
18
+ out/
19
+
20
+ # Gradle files
21
+ .gradle/
22
+ build/
23
+
24
+ # Local configuration file (sdk path, etc)
25
+ local.properties
26
+
27
+ # Proguard folder generated by Eclipse
28
+ proguard/
29
+
30
+ # Log Files
31
+ *.log
32
+
33
+ # Android Studio Navigation editor temp files
34
+ .navigation/
35
+
36
+ # Android Studio captures folder
37
+ captures/
38
+
39
+ # Intellij
40
+ *.iml
41
+ .idea/workspace.xml
42
+ .idea/tasks.xml
43
+ .idea/gradle.xml
44
+ .idea/dictionaries
45
+ .idea/libraries
46
+
47
+ # External native build folder generated in Android Studio 2.2 and later
48
+ .externalNativeBuild
49
+
50
+ # Freeline
51
+ freeline.py
52
+ freeline/
53
+ freeline_project_description.json
54
+
55
+ ### Android Patch ###
56
+ gen-external-apklibs
57
+
58
+ ### AndroidStudio ###
59
+ # Covers files to be ignored for android development using Android Studio.
60
+
61
+ # Built application files
62
+
63
+ # Files for the ART/Dalvik VM
64
+
65
+ # Java class files
66
+
67
+ # Generated files
68
+
69
+ # Gradle files
70
+ .gradle
71
+
72
+ # Signing files
73
+ .signing/
74
+
75
+ # Local configuration file (sdk path, etc)
76
+
77
+ # Proguard folder generated by Eclipse
78
+
79
+ # Log Files
80
+
81
+ # Android Studio
82
+ /*/build/
83
+ /*/local.properties
84
+ /*/out
85
+ /*/*/build
86
+ /*/*/production
87
+ *.ipr
88
+ *~
89
+ *.swp
90
+
91
+ # Android Patch
92
+
93
+ # External native build folder generated in Android Studio 2.2 and later
94
+
95
+ # NDK
96
+ obj/
97
+
98
+ # IntelliJ IDEA
99
+ *.iws
100
+ /out/
101
+
102
+ # User-specific configurations
103
+ .idea/libraries/
104
+ .idea/.name
105
+ .idea/compiler.xml
106
+ .idea/copyright/profiles_settings.xml
107
+ .idea/encodings.xml
108
+ .idea/misc.xml
109
+ .idea/modules.xml
110
+ .idea/scopes/scope_settings.xml
111
+ .idea/vcs.xml
112
+ .idea/jsLibraryMappings.xml
113
+ .idea/datasources.xml
114
+ .idea/dataSources.ids
115
+ .idea/sqlDataSources.xml
116
+ .idea/dynamic.xml
117
+ .idea/uiDesigner.xml
118
+
119
+ # OS-specific files
120
+ .DS_Store
121
+ .DS_Store?
122
+ ._*
123
+ .Spotlight-V100
124
+ .Trashes
125
+ ehthumbs.db
126
+ Thumbs.db
127
+
128
+ # Legacy Eclipse project files
129
+ .classpath
130
+ .project
131
+ .cproject
132
+ .settings/
133
+
134
+ # Mobile Tools for Java (J2ME)
135
+ .mtj.tmp/
136
+
137
+ # Package Files #
138
+ *.war
139
+ *.ear
140
+
141
+ # virtual machine crash logs (Reference: http://www.java.com/en/download/help/error_hotspot.xml)
142
+ hs_err_pid*
143
+
144
+ ## Plugin-specific files:
145
+
146
+ # mpeltonen/sbt-idea plugin
147
+ .idea_modules/
148
+
149
+ # JIRA plugin
150
+ atlassian-ide-plugin.xml
151
+
152
+ # Mongo Explorer plugin
153
+ .idea/mongoSettings.xml
154
+
155
+ ### AndroidStudio Patch ###
156
+
157
+ !/gradle/wrapper/gradle-wrapper.jar
158
+
159
+ ### Intellij ###
160
+ # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
161
+ # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
162
+
163
+ # User-specific stuff:
164
+ .idea/**/workspace.xml
165
+ .idea/**/tasks.xml
166
+
167
+ # Sensitive or high-churn files:
168
+ .idea/**/dataSources/
169
+ .idea/**/dataSources.ids
170
+ .idea/**/dataSources.xml
171
+ .idea/**/dataSources.local.xml
172
+ .idea/**/sqlDataSources.xml
173
+ .idea/**/dynamic.xml
174
+ .idea/**/uiDesigner.xml
175
+
176
+ # Gradle:
177
+ .idea/**/gradle.xml
178
+ .idea/**/libraries
179
+
180
+ # CMake
181
+ cmake-build-debug/
182
+
183
+ # Mongo Explorer plugin:
184
+ .idea/**/mongoSettings.xml
185
+
186
+ ## File-based project format:
187
+
188
+ ## Plugin-specific files:
189
+
190
+ # IntelliJ
191
+
192
+ # mpeltonen/sbt-idea plugin
193
+
194
+ # JIRA plugin
195
+
196
+ # Cursive Clojure plugin
197
+ .idea/replstate.xml
198
+
199
+ # Ruby plugin and RubyMine
200
+ /.rakeTasks
201
+
202
+ ### Intellij Patch ###
203
+ # Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721
204
+
205
+ # *.iml
206
+ # modules.xml
207
+ # .idea/misc.xml
208
+ # *.ipr
209
+
210
+ # Sonarlint plugin
211
+ .idea/sonarlint
212
+
213
+ ### Java ###
214
+ # Compiled class file
215
+
216
+ # Log file
217
+
218
+ # BlueJ files
219
+ *.ctxt
220
+
221
+ # Mobile Tools for Java (J2ME)
222
+
223
+ # Package Files #
224
+ *.jar
225
+ *.zip
226
+ *.tar.gz
227
+ *.rar
228
+
229
+ # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
230
+
231
+ ### Maven ###
232
+ target/
233
+ pom.xml.tag
234
+ pom.xml.releaseBackup
235
+ pom.xml.versionsBackup
236
+ pom.xml.next
237
+ release.properties
238
+ dependency-reduced-pom.xml
239
+ buildNumber.properties
240
+ .mvn/timing.properties
241
+
242
+ # Avoid ignoring Maven wrapper jar file (.jar files are usually ignored)
243
+ !/.mvn/wrapper/maven-wrapper.jar
244
+
245
+ ### Gradle ###
246
+ **/build/
247
+
248
+ # Ignore Gradle GUI config
249
+ gradle-app.setting
250
+
251
+ # Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
252
+ !gradle-wrapper.jar
253
+
254
+ # Cache of project
255
+ .gradletasknamecache
256
+
257
+ # # Work around https://youtrack.jetbrains.com/issue/IDEA-116898
258
+ # gradle/wrapper/gradle-wrapper.properties
259
+
260
+
261
+ # End of https://www.gitignore.io/api/java,maven,gradle,android,intellij,androidstudio
@@ -0,0 +1,101 @@
1
+ apply plugin: 'com.android.library'
2
+ apply plugin: 'kotlin-android'
3
+ apply plugin: 'maven'
4
+
5
+ // Import autolinking script
6
+ apply from: "../scripts/autolinking.gradle"
7
+
8
+ ensureDependeciesWereEvaluated(project)
9
+
10
+ group = 'host.exp.exponent'
11
+ version = '43.0.0-beta.1'
12
+
13
+ buildscript {
14
+ // Simple helper that allows the root project to override versions declared by this library.
15
+ ext.safeExtGet = { prop, fallback ->
16
+ rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
17
+ }
18
+
19
+ repositories {
20
+ mavenCentral()
21
+ }
22
+
23
+ dependencies {
24
+ classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${safeExtGet('kotlinVersion', '1.4.21')}")
25
+ }
26
+ }
27
+
28
+ //Upload android library to maven with javadoc and android sources
29
+ configurations {
30
+ deployerJars
31
+ }
32
+
33
+ //Creating sources with comments
34
+ task androidSourcesJar(type: Jar) {
35
+ classifier = 'sources'
36
+ from android.sourceSets.main.java.srcDirs
37
+ }
38
+
39
+ //Put the androidSources and javadoc to the artifacts
40
+ artifacts {
41
+ archives androidSourcesJar
42
+ }
43
+
44
+ uploadArchives {
45
+ repositories {
46
+ mavenDeployer {
47
+ configuration = configurations.deployerJars
48
+ repository(url: mavenLocal().url)
49
+ }
50
+ }
51
+ }
52
+
53
+ android {
54
+ compileSdkVersion safeExtGet("compileSdkVersion", 30)
55
+
56
+ compileOptions {
57
+ sourceCompatibility JavaVersion.VERSION_1_8
58
+ targetCompatibility JavaVersion.VERSION_1_8
59
+ }
60
+
61
+ defaultConfig {
62
+ minSdkVersion safeExtGet("minSdkVersion", 21)
63
+ targetSdkVersion safeExtGet("targetSdkVersion", 30)
64
+ versionCode 1
65
+ versionName "43.0.0-beta.1"
66
+ consumerProguardFiles("proguard-rules.pro")
67
+ }
68
+ lintOptions {
69
+ abortOnError false
70
+ }
71
+ kotlinOptions {
72
+ jvmTarget = '1.8'
73
+ }
74
+
75
+ sourceSets {
76
+ main {
77
+ java {
78
+ srcDirs += new File(project.buildDir, generatedFilesSrcDir)
79
+ }
80
+ }
81
+ }
82
+ }
83
+
84
+ dependencies { dependencyHandler ->
85
+ //noinspection GradleDynamicVersion
86
+ implementation 'com.facebook.react:react-native:+'
87
+
88
+ // Link expo modules as dependencies of the adapter. It uses `api` configuration so they all will be visible for the app as well.
89
+ // A collection of the dependencies depends on the options passed to `useExpoModules` in your project's `settings.gradle`.
90
+ addExpoModulesDependencies(dependencyHandler, project)
91
+ }
92
+
93
+ // A task generating a package list of expo modules.
94
+ task generateExpoModulesPackageList {
95
+ doLast {
96
+ generateExpoModulesPackageList()
97
+ }
98
+ }
99
+
100
+ // Run that task during prebuilding phase.
101
+ preBuild.dependsOn "generateExpoModulesPackageList"
@@ -0,0 +1,9 @@
1
+ # For ReactNativeDelegateWrapper
2
+ -keepclassmembers public class com.facebook.react.ReactActivityDelegate {
3
+ protected *;
4
+ }
5
+
6
+ # For ReactNativeHostWrapper
7
+ -keepclassmembers public class com.facebook.react.ReactNativeHost {
8
+ protected *;
9
+ }
@@ -0,0 +1,3 @@
1
+ <manifest package="expo">
2
+
3
+ </manifest>
@@ -0,0 +1,22 @@
1
+ package expo.modules
2
+
3
+ import android.app.Application
4
+ import android.content.res.Configuration
5
+
6
+ class ApplicationLifecycleDispatcher private constructor() {
7
+ companion object {
8
+ @JvmStatic
9
+ fun onApplicationCreate(application: Application) {
10
+ ExpoModulesPackage.packageList
11
+ .flatMap { it.createApplicationLifecycleListeners(application) }
12
+ .forEach { it.onCreate(application) }
13
+ }
14
+
15
+ @JvmStatic
16
+ fun onConfigurationChanged(application: Application, newConfig: Configuration) {
17
+ ExpoModulesPackage.packageList
18
+ .flatMap { it.createApplicationLifecycleListeners(application) }
19
+ .forEach { it.onConfigurationChanged(newConfig) }
20
+ }
21
+ }
22
+ }
@@ -0,0 +1,39 @@
1
+ package expo.modules
2
+
3
+ import android.util.Log
4
+
5
+ import com.facebook.react.ReactPackage
6
+ import com.facebook.react.bridge.NativeModule
7
+ import com.facebook.react.bridge.ReactApplicationContext
8
+ import com.facebook.react.uimanager.ViewManager
9
+
10
+ import expo.modules.adapters.react.ModuleRegistryAdapter
11
+ import expo.modules.core.interfaces.Package
12
+
13
+ import java.lang.Exception
14
+
15
+ class ExpoModulesPackage : ReactPackage {
16
+ val moduleRegistryAdapter = ModuleRegistryAdapter(packageList)
17
+
18
+ companion object {
19
+ @Suppress("unchecked_cast")
20
+ val packageList: List<Package> by lazy {
21
+ try {
22
+ val expoModules = Class.forName("expo.modules.ExpoModulesPackageList")
23
+ val getPackageList = expoModules.getMethod("getPackageList")
24
+ getPackageList.invoke(null) as List<Package>
25
+ } catch (e: Exception) {
26
+ Log.e("ExpoModulesPackage", "Couldn't get expo modules list.", e)
27
+ emptyList()
28
+ }
29
+ }
30
+ }
31
+
32
+ override fun createNativeModules(reactContext: ReactApplicationContext): List<NativeModule> {
33
+ return moduleRegistryAdapter.createNativeModules(reactContext)
34
+ }
35
+
36
+ override fun createViewManagers(reactContext: ReactApplicationContext): List<ViewManager<*, *>> {
37
+ return moduleRegistryAdapter.createViewManagers(reactContext)
38
+ }
39
+ }
@@ -0,0 +1,152 @@
1
+ package expo.modules
2
+
3
+ import android.app.Activity
4
+ import android.content.Context
5
+ import android.content.Intent
6
+ import android.os.Bundle
7
+ import android.view.KeyEvent
8
+ import androidx.collection.ArrayMap
9
+ import com.facebook.react.ReactActivity
10
+ import com.facebook.react.ReactActivityDelegate
11
+ import com.facebook.react.ReactInstanceManager
12
+ import com.facebook.react.ReactNativeHost
13
+ import com.facebook.react.ReactRootView
14
+ import com.facebook.react.modules.core.PermissionListener
15
+ import java.lang.reflect.Method
16
+
17
+ class ReactActivityDelegateWrapper(
18
+ private val activity: ReactActivity,
19
+ private val delegate: ReactActivityDelegate
20
+ ) : ReactActivityDelegate(activity, null) {
21
+ private val reactActivityLifecycleListeners = ExpoModulesPackage.packageList
22
+ .flatMap { it.createReactActivityLifecycleListeners(activity) }
23
+ private val methodMap: ArrayMap<String, Method> = ArrayMap()
24
+
25
+ //region ReactActivityDelegate
26
+
27
+ override fun getLaunchOptions(): Bundle? {
28
+ return invokeDelegateMethod("getLaunchOptions")
29
+ }
30
+
31
+ override fun createRootView(): ReactRootView {
32
+ return invokeDelegateMethod("createRootView")
33
+ }
34
+
35
+ override fun getReactNativeHost(): ReactNativeHost {
36
+ return invokeDelegateMethod("getReactNativeHost")
37
+ }
38
+
39
+ override fun getReactInstanceManager(): ReactInstanceManager {
40
+ return delegate.reactInstanceManager
41
+ }
42
+
43
+ override fun getMainComponentName(): String {
44
+ return delegate.mainComponentName
45
+ }
46
+
47
+ override fun loadApp(appKey: String?) {
48
+ return invokeDelegateMethod("loadApp", arrayOf(String::class.java), arrayOf(appKey))
49
+ }
50
+
51
+ override fun onCreate(savedInstanceState: Bundle?) {
52
+ invokeDelegateMethod<Unit, Bundle?>("onCreate", arrayOf(Bundle::class.java), arrayOf(savedInstanceState))
53
+ reactActivityLifecycleListeners.forEach { listener ->
54
+ listener.onCreate(activity, savedInstanceState)
55
+ }
56
+ }
57
+
58
+ override fun onResume() {
59
+ invokeDelegateMethod<Unit>("onResume")
60
+ reactActivityLifecycleListeners.forEach { listener ->
61
+ listener.onResume(activity)
62
+ }
63
+ }
64
+
65
+ override fun onPause() {
66
+ reactActivityLifecycleListeners.forEach { listener ->
67
+ listener.onPause(activity)
68
+ }
69
+ return invokeDelegateMethod("onPause")
70
+ }
71
+
72
+ override fun onDestroy() {
73
+ reactActivityLifecycleListeners.forEach { listener ->
74
+ listener.onDestroy(activity)
75
+ }
76
+ return invokeDelegateMethod("onDestroy")
77
+ }
78
+
79
+ override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
80
+ delegate.onActivityResult(requestCode, resultCode, data)
81
+ }
82
+
83
+ override fun onKeyDown(keyCode: Int, event: KeyEvent?): Boolean {
84
+ return delegate.onKeyDown(keyCode, event)
85
+ }
86
+
87
+ override fun onKeyUp(keyCode: Int, event: KeyEvent?): Boolean {
88
+ return delegate.onKeyUp(keyCode, event)
89
+ }
90
+
91
+ override fun onKeyLongPress(keyCode: Int, event: KeyEvent?): Boolean {
92
+ return delegate.onKeyLongPress(keyCode, event)
93
+ }
94
+
95
+ override fun onBackPressed(): Boolean {
96
+ return delegate.onBackPressed()
97
+ }
98
+
99
+ override fun onNewIntent(intent: Intent?): Boolean {
100
+ return delegate.onNewIntent(intent)
101
+ }
102
+
103
+ override fun onWindowFocusChanged(hasFocus: Boolean) {
104
+ delegate.onWindowFocusChanged(hasFocus)
105
+ }
106
+
107
+ override fun requestPermissions(permissions: Array<out String>?, requestCode: Int, listener: PermissionListener?) {
108
+ delegate.requestPermissions(permissions, requestCode, listener)
109
+ }
110
+
111
+ override fun onRequestPermissionsResult(requestCode: Int, permissions: Array<out String>?, grantResults: IntArray?) {
112
+ delegate.onRequestPermissionsResult(requestCode, permissions, grantResults)
113
+ }
114
+
115
+ override fun getContext(): Context {
116
+ return invokeDelegateMethod("getContext")
117
+ }
118
+
119
+ override fun getPlainActivity(): Activity {
120
+ return invokeDelegateMethod("getPlainActivity")
121
+ }
122
+
123
+ //endregion
124
+
125
+ //region Internals
126
+
127
+ private fun <T> invokeDelegateMethod(name: String): T {
128
+ var method = methodMap[name]
129
+ if (method == null) {
130
+ method = ReactActivityDelegate::class.java.getDeclaredMethod(name)
131
+ method.isAccessible = true
132
+ methodMap[name] = method
133
+ }
134
+ return method!!.invoke(delegate) as T
135
+ }
136
+
137
+ private fun <T, A> invokeDelegateMethod(
138
+ name: String,
139
+ argTypes: Array<Class<*>>,
140
+ args: Array<A>
141
+ ): T {
142
+ var method = methodMap[name]
143
+ if (method == null) {
144
+ method = ReactActivityDelegate::class.java.getDeclaredMethod(name, *argTypes)
145
+ method.isAccessible = true
146
+ methodMap[name] = method
147
+ }
148
+ return method!!.invoke(delegate, *args) as T
149
+ }
150
+
151
+ //endregion
152
+ }
@@ -0,0 +1,104 @@
1
+ package expo.modules
2
+
3
+ import android.app.Application
4
+ import androidx.collection.ArrayMap
5
+ import com.facebook.react.ReactInstanceManager
6
+ import com.facebook.react.ReactNativeHost
7
+ import com.facebook.react.ReactPackage
8
+ import com.facebook.react.bridge.JSIModule
9
+ import com.facebook.react.bridge.JSIModulePackage
10
+ import com.facebook.react.bridge.JSIModuleSpec
11
+ import com.facebook.react.bridge.JavaScriptContextHolder
12
+ import com.facebook.react.bridge.JavaScriptExecutorFactory
13
+ import com.facebook.react.bridge.ReactApplicationContext
14
+ import com.facebook.react.devsupport.RedBoxHandler
15
+ import com.facebook.react.uimanager.UIImplementationProvider
16
+ import java.lang.reflect.Method
17
+
18
+ class ReactNativeHostWrapper(
19
+ application: Application,
20
+ private val host: ReactNativeHost
21
+ ) : ReactNativeHost(application) {
22
+ private val reactNativeHostHandlers = ExpoModulesPackage.packageList
23
+ .flatMap { it.createReactNativeHostHandlers(application) }
24
+ private val methodMap: ArrayMap<String, Method> = ArrayMap()
25
+
26
+ override fun createReactInstanceManager(): ReactInstanceManager {
27
+ // map() without asSequence() gives a chance for handlers
28
+ // to get noticed before createReactInstanceManager()
29
+ return reactNativeHostHandlers
30
+ .map { it.createReactInstanceManager(useDeveloperSupport) }
31
+ .firstOrNull() ?: super.createReactInstanceManager()
32
+ }
33
+
34
+ override fun getRedBoxHandler(): RedBoxHandler? {
35
+ return invokeDelegateMethod("getRedBoxHandler")
36
+ }
37
+
38
+ override fun getJavaScriptExecutorFactory(): JavaScriptExecutorFactory? {
39
+ return invokeDelegateMethod("getJavaScriptExecutorFactory")
40
+ }
41
+
42
+ override fun getUIImplementationProvider(): UIImplementationProvider {
43
+ return invokeDelegateMethod("getUIImplementationProvider")
44
+ }
45
+
46
+ override fun getJSIModulePackage(): JSIModulePackage? {
47
+ val userJSIModulePackage = invokeDelegateMethod<JSIModulePackage?>("getJSIModulePackage")
48
+ return JSIModuleContainerPackage(userJSIModulePackage)
49
+ }
50
+
51
+ override fun getJSMainModuleName(): String {
52
+ return invokeDelegateMethod("getJSMainModuleName")
53
+ }
54
+
55
+ override fun getJSBundleFile(): String? {
56
+ return reactNativeHostHandlers.asSequence()
57
+ .map { it.getJSBundleFile(useDeveloperSupport) }
58
+ .firstOrNull() ?: invokeDelegateMethod<String?>("getJSBundleFile")
59
+ }
60
+
61
+ override fun getBundleAssetName(): String? {
62
+ return reactNativeHostHandlers.asSequence()
63
+ .map { it.getBundleAssetName(useDeveloperSupport) }
64
+ .firstOrNull() ?: invokeDelegateMethod<String?>("getBundleAssetName")
65
+ }
66
+
67
+ override fun getUseDeveloperSupport(): Boolean {
68
+ return host.useDeveloperSupport
69
+ }
70
+
71
+ override fun getPackages(): MutableList<ReactPackage> {
72
+ return invokeDelegateMethod("getPackages")
73
+ }
74
+
75
+ //endregion
76
+
77
+ //region Internals
78
+
79
+ inner class JSIModuleContainerPackage(userJSIModulePackage: JSIModulePackage?) : JSIModulePackage {
80
+ private val userJSIModulePackage = userJSIModulePackage
81
+ override fun getJSIModules(
82
+ reactApplicationContext: ReactApplicationContext,
83
+ jsContext: JavaScriptContextHolder
84
+ ): List<JSIModuleSpec<JSIModule>> {
85
+ reactNativeHostHandlers.forEach { handler ->
86
+ handler.onRegisterJSIModules(reactApplicationContext, jsContext, useDeveloperSupport)
87
+ }
88
+ userJSIModulePackage?.getJSIModules(reactApplicationContext, jsContext)
89
+ return emptyList()
90
+ }
91
+ }
92
+
93
+ private fun <T> invokeDelegateMethod(name: String): T {
94
+ var method = methodMap[name]
95
+ if (method == null) {
96
+ method = ReactNativeHost::class.java.getDeclaredMethod(name)
97
+ method.isAccessible = true
98
+ methodMap[name] = method
99
+ }
100
+ return method!!.invoke(host) as T
101
+ }
102
+
103
+ //endregion
104
+ }
@@ -1,6 +1,5 @@
1
1
  import React, { useEffect, useState, useRef, useMemo } from 'react';
2
- import { Animated, StyleSheet, Text, NativeModules, NativeEventEmitter, View } from 'react-native';
3
- import { SafeAreaView } from 'react-native-safe-area-context';
2
+ import { Animated, StyleSheet, Text, NativeModules, NativeEventEmitter, UIManager, View, } from 'react-native';
4
3
  export default function DevLoadingView() {
5
4
  const [isDevLoading, setIsDevLoading] = useState(false);
6
5
  const [isAnimating, setIsAnimating] = useState(false);
@@ -55,7 +54,7 @@ export default function DevLoadingView() {
55
54
  }, [translateY, emitter]);
56
55
  if (isDevLoading || isAnimating) {
57
56
  return (React.createElement(Animated.View, { style: [styles.animatedContainer, { transform: [{ translateY }] }], pointerEvents: "none" },
58
- React.createElement(SafeAreaView, { style: styles.banner, edges: ['bottom'] },
57
+ React.createElement(View, { style: styles.banner },
59
58
  React.createElement(View, { style: styles.contentContainer },
60
59
  React.createElement(View, { style: { flexDirection: 'row' } },
61
60
  React.createElement(Text, { style: styles.text }, isDevLoading ? 'Refreshing...' : 'Refreshed')),
@@ -66,6 +65,14 @@ export default function DevLoadingView() {
66
65
  return null;
67
66
  }
68
67
  }
68
+ /**
69
+ * This is a hack to get the safe area insets without explicitly depending on react-native-safe-area-context.
70
+ * The following code is lifted from: https://git.io/Jzk4k
71
+ *
72
+ * TODO: This will need to be updated for Fabric/TurboModules.
73
+ **/
74
+ const RNCSafeAreaProviderConfig = UIManager.getViewManagerConfig('RNCSafeAreaProvider');
75
+ const initialWindowMetrics = RNCSafeAreaProviderConfig?.Constants?.initialWindowMetrics;
69
76
  const styles = StyleSheet.create({
70
77
  animatedContainer: {
71
78
  position: 'absolute',
@@ -78,6 +85,7 @@ const styles = StyleSheet.create({
78
85
  flex: 1,
79
86
  overflow: 'visible',
80
87
  backgroundColor: 'rgba(0,0,0,0.75)',
88
+ paddingBottom: initialWindowMetrics?.insets?.bottom ?? 0,
81
89
  },
82
90
  contentContainer: {
83
91
  flex: 1,
@@ -1 +1 @@
1
- {"version":3,"file":"DevLoadingView.js","sourceRoot":"","sources":["../../src/environment/DevLoadingView.tsx"],"names":[],"mappings":"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","sourcesContent":["import React, { useEffect, useState, useRef, useMemo } from 'react';\nimport { Animated, StyleSheet, Text, NativeModules, NativeEventEmitter, View } from 'react-native';\nimport { SafeAreaView } from 'react-native-safe-area-context';\n\nexport default function DevLoadingView() {\n const [isDevLoading, setIsDevLoading] = useState(false);\n const [isAnimating, setIsAnimating] = useState(false);\n const translateY = useRef(new Animated.Value(0)).current;\n const emitter = useMemo<NativeEventEmitter>(() => {\n try {\n return new NativeEventEmitter(NativeModules.DevLoadingView);\n } catch (error) {\n throw new Error(\n 'Failed to instantiate native emitter in `DevLoadingView` because the native module `DevLoadingView` is undefined: ' +\n error.message\n );\n }\n }, []);\n\n useEffect(() => {\n if (!emitter) return;\n\n function handleShowMessage({ message }) {\n // \"Refreshing...\" is the standard fast refresh message and it's the\n // only time we want to display this overlay.\n if (message !== 'Refreshing...') {\n return;\n }\n\n // TODO: if we show the refreshing banner and don't get a hide message\n // for 3 seconds, warn the user that it's taking a while and suggest\n // they reload\n\n translateY.setValue(0);\n setIsDevLoading(true);\n }\n\n function handleHide() {\n // TODO: if we showed the 'refreshing' banner less than 250ms ago, delay\n // switching to the 'finished' banner\n\n setIsAnimating(true);\n setIsDevLoading(false);\n Animated.timing(translateY, {\n toValue: 150,\n delay: 1000,\n duration: 350,\n useNativeDriver: true,\n }).start(({ finished }) => {\n if (finished) {\n setIsAnimating(false);\n translateY.setValue(0);\n }\n });\n }\n\n emitter.addListener('devLoadingView:showMessage', handleShowMessage);\n emitter.addListener('devLoadingView:hide', handleHide);\n\n return function cleanup() {\n emitter.removeListener('devLoadingView:showMessage', handleShowMessage);\n emitter.removeListener('devLoadingView:hide', handleHide);\n };\n }, [translateY, emitter]);\n\n if (isDevLoading || isAnimating) {\n return (\n <Animated.View\n style={[styles.animatedContainer, { transform: [{ translateY }] }]}\n pointerEvents=\"none\">\n <SafeAreaView style={styles.banner} edges={['bottom']}>\n <View style={styles.contentContainer}>\n <View style={{ flexDirection: 'row' }}>\n <Text style={styles.text}>{isDevLoading ? 'Refreshing...' : 'Refreshed'}</Text>\n </View>\n\n <View style={{ flex: 1 }}>\n <Text style={styles.subtitle}>\n {isDevLoading ? 'Using Fast Refresh' : \"Don't see your changes? Reload the app\"}\n </Text>\n </View>\n </View>\n </SafeAreaView>\n </Animated.View>\n );\n } else {\n return null;\n }\n}\n\nconst styles = StyleSheet.create({\n animatedContainer: {\n position: 'absolute',\n bottom: 0,\n left: 0,\n right: 0,\n zIndex: 42, // arbitrary\n },\n banner: {\n flex: 1,\n overflow: 'visible',\n backgroundColor: 'rgba(0,0,0,0.75)',\n },\n contentContainer: {\n flex: 1,\n paddingTop: 10,\n paddingBottom: 5,\n alignItems: 'center',\n justifyContent: 'center',\n textAlign: 'center',\n },\n text: {\n color: '#fff',\n fontSize: 15,\n },\n subtitle: {\n color: 'rgba(255,255,255,0.8)',\n },\n});\n"]}
1
+ {"version":3,"file":"DevLoadingView.js","sourceRoot":"","sources":["../../src/environment/DevLoadingView.tsx"],"names":[],"mappings":"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","sourcesContent":["import React, { useEffect, useState, useRef, useMemo } from 'react';\nimport {\n Animated,\n StyleSheet,\n Text,\n NativeModules,\n NativeEventEmitter,\n UIManager,\n View,\n} from 'react-native';\n\nexport default function DevLoadingView() {\n const [isDevLoading, setIsDevLoading] = useState(false);\n const [isAnimating, setIsAnimating] = useState(false);\n const translateY = useRef(new Animated.Value(0)).current;\n const emitter = useMemo<NativeEventEmitter>(() => {\n try {\n return new NativeEventEmitter(NativeModules.DevLoadingView);\n } catch (error) {\n throw new Error(\n 'Failed to instantiate native emitter in `DevLoadingView` because the native module `DevLoadingView` is undefined: ' +\n error.message\n );\n }\n }, []);\n\n useEffect(() => {\n if (!emitter) return;\n\n function handleShowMessage({ message }) {\n // \"Refreshing...\" is the standard fast refresh message and it's the\n // only time we want to display this overlay.\n if (message !== 'Refreshing...') {\n return;\n }\n\n // TODO: if we show the refreshing banner and don't get a hide message\n // for 3 seconds, warn the user that it's taking a while and suggest\n // they reload\n\n translateY.setValue(0);\n setIsDevLoading(true);\n }\n\n function handleHide() {\n // TODO: if we showed the 'refreshing' banner less than 250ms ago, delay\n // switching to the 'finished' banner\n\n setIsAnimating(true);\n setIsDevLoading(false);\n Animated.timing(translateY, {\n toValue: 150,\n delay: 1000,\n duration: 350,\n useNativeDriver: true,\n }).start(({ finished }) => {\n if (finished) {\n setIsAnimating(false);\n translateY.setValue(0);\n }\n });\n }\n\n emitter.addListener('devLoadingView:showMessage', handleShowMessage);\n emitter.addListener('devLoadingView:hide', handleHide);\n\n return function cleanup() {\n emitter.removeListener('devLoadingView:showMessage', handleShowMessage);\n emitter.removeListener('devLoadingView:hide', handleHide);\n };\n }, [translateY, emitter]);\n\n if (isDevLoading || isAnimating) {\n return (\n <Animated.View\n style={[styles.animatedContainer, { transform: [{ translateY }] }]}\n pointerEvents=\"none\">\n <View style={styles.banner}>\n <View style={styles.contentContainer}>\n <View style={{ flexDirection: 'row' }}>\n <Text style={styles.text}>{isDevLoading ? 'Refreshing...' : 'Refreshed'}</Text>\n </View>\n\n <View style={{ flex: 1 }}>\n <Text style={styles.subtitle}>\n {isDevLoading ? 'Using Fast Refresh' : \"Don't see your changes? Reload the app\"}\n </Text>\n </View>\n </View>\n </View>\n </Animated.View>\n );\n } else {\n return null;\n }\n}\n\n/**\n * This is a hack to get the safe area insets without explicitly depending on react-native-safe-area-context.\n * The following code is lifted from: https://git.io/Jzk4k\n *\n * TODO: This will need to be updated for Fabric/TurboModules.\n **/\nconst RNCSafeAreaProviderConfig = UIManager.getViewManagerConfig('RNCSafeAreaProvider') as any;\nconst initialWindowMetrics = RNCSafeAreaProviderConfig?.Constants?.initialWindowMetrics as\n | { insets: { bottom: number } }\n | undefined;\n\nconst styles = StyleSheet.create({\n animatedContainer: {\n position: 'absolute',\n bottom: 0,\n left: 0,\n right: 0,\n zIndex: 42, // arbitrary\n },\n banner: {\n flex: 1,\n overflow: 'visible',\n backgroundColor: 'rgba(0,0,0,0.75)',\n paddingBottom: initialWindowMetrics?.insets?.bottom ?? 0,\n },\n contentContainer: {\n flex: 1,\n paddingTop: 10,\n paddingBottom: 5,\n alignItems: 'center',\n justifyContent: 'center',\n textAlign: 'center',\n },\n text: {\n color: '#fff',\n fontSize: 15,\n },\n subtitle: {\n color: 'rgba(255,255,255,0.8)',\n },\n});\n"]}
@@ -0,0 +1,2 @@
1
+ import { InitialProps } from './withExpoRoot.types';
2
+ export declare const attachRecoveredProps: <P extends InitialProps>(props: P) => P;
@@ -0,0 +1,13 @@
1
+ export const attachRecoveredProps = (props) => {
2
+ try {
3
+ // Optionally import expo-error-recovery
4
+ const { recoveredProps } = require('expo-error-recovery');
5
+ return {
6
+ ...props,
7
+ exp: { ...props.exp, errorRecovery: recoveredProps },
8
+ };
9
+ }
10
+ catch { }
11
+ return props;
12
+ };
13
+ //# sourceMappingURL=RecoveryProps.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RecoveryProps.js","sourceRoot":"","sources":["../../src/launch/RecoveryProps.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAyB,KAAQ,EAAK,EAAE;IAC1E,IAAI;QACF,wCAAwC;QACxC,MAAM,EAAE,cAAc,EAAE,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAAC;QAC1D,OAAO;YACL,GAAG,KAAK;YACR,GAAG,EAAE,EAAE,GAAG,KAAK,CAAC,GAAG,EAAE,aAAa,EAAE,cAAc,EAAE;SACrD,CAAC;KACH;IAAC,MAAM,GAAE;IAEV,OAAO,KAAK,CAAC;AACf,CAAC,CAAC","sourcesContent":["import { InitialProps } from './withExpoRoot.types';\n\nexport const attachRecoveredProps = <P extends InitialProps>(props: P): P => {\n try {\n // Optionally import expo-error-recovery\n const { recoveredProps } = require('expo-error-recovery');\n return {\n ...props,\n exp: { ...props.exp, errorRecovery: recoveredProps },\n };\n } catch {}\n\n return props;\n};\n"]}
@@ -1,5 +1,5 @@
1
- import * as ErrorRecovery from 'expo-error-recovery';
2
1
  import * as React from 'react';
2
+ import { attachRecoveredProps } from './RecoveryProps';
3
3
  // This hook can be optionally imported because __DEV__ never changes during runtime.
4
4
  // Using __DEV__ like this enables tree shaking to remove the hook in production.
5
5
  let useDevKeepAwake = () => { };
@@ -14,10 +14,7 @@ if (__DEV__) {
14
14
  export default function withExpoRoot(AppRootComponent) {
15
15
  return function ExpoRoot(props) {
16
16
  useDevKeepAwake();
17
- const combinedProps = {
18
- ...props,
19
- exp: { ...props.exp, errorRecovery: ErrorRecovery.recoveredProps },
20
- };
17
+ const combinedProps = attachRecoveredProps(props);
21
18
  return React.createElement(AppRootComponent, { ...combinedProps });
22
19
  };
23
20
  }
@@ -1 +1 @@
1
- {"version":3,"file":"withExpoRoot.js","sourceRoot":"","sources":["../../src/launch/withExpoRoot.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,aAAa,MAAM,qBAAqB,CAAC;AACrD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,qFAAqF;AACrF,iFAAiF;AACjF,IAAI,eAAe,GAA2B,GAAG,EAAE,GAAE,CAAC,CAAC;AAEvD,IAAI,OAAO,EAAE;IACX,IAAI;QACF,oCAAoC;QACpC,MAAM,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;QACpD,eAAe,GAAG,YAAY,CAAC;KAChC;IAAC,MAAM,GAAE;CACX;AAED,MAAM,CAAC,OAAO,UAAU,YAAY,CAClC,gBAAwC;IAExC,OAAO,SAAS,QAAQ,CAAC,KAAQ;QAC/B,eAAe,EAAE,CAAC;QAElB,MAAM,aAAa,GAAG;YACpB,GAAG,KAAK;YACR,GAAG,EAAE,EAAE,GAAG,KAAK,CAAC,GAAG,EAAE,aAAa,EAAE,aAAa,CAAC,cAAc,EAAE;SACnE,CAAC;QAEF,OAAO,oBAAC,gBAAgB,OAAK,aAAa,GAAI,CAAC;IACjD,CAAC,CAAC;AACJ,CAAC","sourcesContent":["import * as ErrorRecovery from 'expo-error-recovery';\nimport * as React from 'react';\n\nimport { InitialProps } from './withExpoRoot.types';\n\n// This hook can be optionally imported because __DEV__ never changes during runtime.\n// Using __DEV__ like this enables tree shaking to remove the hook in production.\nlet useDevKeepAwake: (tag?: string) => void = () => {};\n\nif (__DEV__) {\n try {\n // Optionally import expo-keep-awake\n const { useKeepAwake } = require('expo-keep-awake');\n useDevKeepAwake = useKeepAwake;\n } catch {}\n}\n\nexport default function withExpoRoot<P extends InitialProps>(\n AppRootComponent: React.ComponentType<P>\n): React.ComponentType<P> {\n return function ExpoRoot(props: P) {\n useDevKeepAwake();\n\n const combinedProps = {\n ...props,\n exp: { ...props.exp, errorRecovery: ErrorRecovery.recoveredProps },\n };\n\n return <AppRootComponent {...combinedProps} />;\n };\n}\n"]}
1
+ {"version":3,"file":"withExpoRoot.js","sourceRoot":"","sources":["../../src/launch/withExpoRoot.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAGvD,qFAAqF;AACrF,iFAAiF;AACjF,IAAI,eAAe,GAA2B,GAAG,EAAE,GAAE,CAAC,CAAC;AAEvD,IAAI,OAAO,EAAE;IACX,IAAI;QACF,oCAAoC;QACpC,MAAM,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;QACpD,eAAe,GAAG,YAAY,CAAC;KAChC;IAAC,MAAM,GAAE;CACX;AAED,MAAM,CAAC,OAAO,UAAU,YAAY,CAClC,gBAAwC;IAExC,OAAO,SAAS,QAAQ,CAAC,KAAQ;QAC/B,eAAe,EAAE,CAAC;QAElB,MAAM,aAAa,GAAG,oBAAoB,CAAC,KAAK,CAAC,CAAC;QAClD,OAAO,oBAAC,gBAAgB,OAAK,aAAa,GAAI,CAAC;IACjD,CAAC,CAAC;AACJ,CAAC","sourcesContent":["import * as React from 'react';\n\nimport { attachRecoveredProps } from './RecoveryProps';\nimport { InitialProps } from './withExpoRoot.types';\n\n// This hook can be optionally imported because __DEV__ never changes during runtime.\n// Using __DEV__ like this enables tree shaking to remove the hook in production.\nlet useDevKeepAwake: (tag?: string) => void = () => {};\n\nif (__DEV__) {\n try {\n // Optionally import expo-keep-awake\n const { useKeepAwake } = require('expo-keep-awake');\n useDevKeepAwake = useKeepAwake;\n } catch {}\n}\n\nexport default function withExpoRoot<P extends InitialProps>(\n AppRootComponent: React.ComponentType<P>\n): React.ComponentType<P> {\n return function ExpoRoot(props: P) {\n useDevKeepAwake();\n\n const combinedProps = attachRecoveredProps(props);\n return <AppRootComponent {...combinedProps} />;\n };\n}\n"]}
@@ -1,13 +1,10 @@
1
- import * as ErrorRecovery from 'expo-error-recovery';
2
1
  import * as React from 'react';
2
+ import { attachRecoveredProps } from './RecoveryProps';
3
3
  export default function withExpoRoot(AppRootComponent) {
4
4
  return class ExpoRootComponent extends React.Component {
5
5
  render() {
6
- const props = {
7
- ...this.props,
8
- exp: { ...this.props.exp, errorRecovery: ErrorRecovery.recoveredProps },
9
- };
10
- return React.createElement(AppRootComponent, { ...props });
6
+ const combinedProps = attachRecoveredProps(this.props);
7
+ return React.createElement(AppRootComponent, { ...combinedProps });
11
8
  }
12
9
  };
13
10
  }
@@ -1 +1 @@
1
- {"version":3,"file":"withExpoRoot.web.js","sourceRoot":"","sources":["../../src/launch/withExpoRoot.web.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,aAAa,MAAM,qBAAqB,CAAC;AACrD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,MAAM,CAAC,OAAO,UAAU,YAAY,CAClC,gBAAwC;IAExC,OAAO,MAAM,iBAAkB,SAAQ,KAAK,CAAC,SAAY;QACvD,MAAM;YACJ,MAAM,KAAK,GAAG;gBACZ,GAAG,IAAI,CAAC,KAAK;gBACb,GAAG,EAAE,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,aAAa,EAAE,aAAa,CAAC,cAAc,EAAE;aACxE,CAAC;YAEF,OAAO,oBAAC,gBAAgB,OAAK,KAAK,GAAI,CAAC;QACzC,CAAC;KACF,CAAC;AACJ,CAAC","sourcesContent":["import * as ErrorRecovery from 'expo-error-recovery';\nimport * as React from 'react';\n\nimport { InitialProps } from './withExpoRoot.types';\n\nexport default function withExpoRoot<P extends InitialProps>(\n AppRootComponent: React.ComponentType<P>\n): React.ComponentClass<P> {\n return class ExpoRootComponent extends React.Component<P> {\n render() {\n const props = {\n ...this.props,\n exp: { ...this.props.exp, errorRecovery: ErrorRecovery.recoveredProps },\n };\n\n return <AppRootComponent {...props} />;\n }\n };\n}\n"]}
1
+ {"version":3,"file":"withExpoRoot.web.js","sourceRoot":"","sources":["../../src/launch/withExpoRoot.web.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAGvD,MAAM,CAAC,OAAO,UAAU,YAAY,CAClC,gBAAwC;IAExC,OAAO,MAAM,iBAAkB,SAAQ,KAAK,CAAC,SAAY;QACvD,MAAM;YACJ,MAAM,aAAa,GAAG,oBAAoB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACvD,OAAO,oBAAC,gBAAgB,OAAK,aAAa,GAAI,CAAC;QACjD,CAAC;KACF,CAAC;AACJ,CAAC","sourcesContent":["import * as React from 'react';\n\nimport { attachRecoveredProps } from './RecoveryProps';\nimport { InitialProps } from './withExpoRoot.types';\n\nexport default function withExpoRoot<P extends InitialProps>(\n AppRootComponent: React.ComponentType<P>\n): React.ComponentClass<P> {\n return class ExpoRootComponent extends React.Component<P> {\n render() {\n const combinedProps = attachRecoveredProps(this.props);\n return <AppRootComponent {...combinedProps} />;\n }\n };\n}\n"]}
@@ -6,85 +6,84 @@
6
6
  "@react-native-community/netinfo": "6.0.2",
7
7
  "@react-native-community/slider": "4.1.4",
8
8
  "@react-native-community/viewpager": "5.0.11",
9
- "@react-native-picker/picker": "1.16.7",
10
- "@react-native-segmented-control/segmented-control": "2.3.0",
11
- "@stripe/stripe-react-native": "0.1.4",
12
- "@unimodules/core": "~7.2.0-alpha.0",
13
- "@unimodules/react-native-adapter": "~6.5.0-alpha.0",
14
- "expo-ads-admob": "~10.1.0",
15
- "expo-ads-facebook": "~10.1.0",
16
- "expo-analytics-amplitude": "~10.2.0",
17
- "expo-analytics-segment": "~10.2.0",
18
- "expo-app-auth": "~10.2.0",
9
+ "@react-native-picker/picker": "2.1.0",
10
+ "@react-native-segmented-control/segmented-control": "2.4.0",
11
+ "@stripe/stripe-react-native": "0.2.2",
12
+ "@unimodules/core": "~7.2.0",
13
+ "@unimodules/react-native-adapter": "~6.5.0",
14
+ "expo-ads-admob": "~11.0.0",
15
+ "expo-ads-facebook": "~11.0.0",
16
+ "expo-analytics-amplitude": "~11.0.0",
17
+ "expo-analytics-segment": "~11.0.0",
18
+ "expo-app-auth": "~11.0.0",
19
19
  "expo-app-loader-provider": "~8.0.0",
20
- "expo-apple-authentication": "~3.2.0",
21
- "expo-application": "~3.3.0",
20
+ "expo-apple-authentication": "~4.0.0",
21
+ "expo-application": "~4.0.0",
22
22
  "expo-asset": "~8.4.0",
23
- "expo-auth-session": "~3.3.0",
24
- "expo-av": "~9.2.0",
25
- "expo-background-fetch": "~9.2.0",
26
- "expo-barcode-scanner": "~10.2.0",
27
- "expo-battery": "~5.0.0",
28
- "expo-blur": "~9.0.3",
29
- "expo-branch": "~4.2.0",
30
- "expo-brightness": "~9.2.0",
31
- "expo-calendar": "~9.2.0",
32
- "expo-camera": "~11.1.1",
33
- "expo-cellular": "~3.2.0",
34
- "expo-checkbox": "~1.0.3",
35
- "expo-clipboard": "~1.1.0",
36
- "expo-constants": "~11.1.0",
37
- "expo-contacts": "~9.2.0",
38
- "expo-crypto": "~9.2.0",
39
- "expo-device": "~3.3.0",
40
- "expo-document-picker": "~9.2.0",
41
- "expo-error-recovery": "~2.3.0",
42
- "expo-face-detector": "~10.1.0",
43
- "expo-facebook": "~11.2.0",
44
- "expo-file-system": "~12.0.0",
45
- "expo-firebase-analytics": "~4.1.0",
46
- "expo-firebase-core": "~3.1.0",
47
- "expo-font": "~9.3.0",
48
- "expo-gl": "~10.4.0",
49
- "expo-gl-cpp": "~10.4.0",
50
- "expo-google-sign-in": "~9.2.0",
51
- "expo-haptics": "~10.2.0-alpha.0",
52
- "expo-image-loader": "~2.3.0-alpha.0",
53
- "expo-image-manipulator": "~9.2.0",
54
- "expo-image-picker": "~10.2.0",
55
- "expo-in-app-purchases": "~11.0.0",
56
- "expo-intent-launcher": "~9.1.0",
57
- "expo-keep-awake": "~9.3.0",
58
- "expo-linear-gradient": "~9.3.0-alpha.0",
59
- "expo-linking": "~2.3.0",
60
- "expo-local-authentication": "~11.1.0",
61
- "expo-localization": "~10.2.0",
62
- "expo-location": "~12.1.0",
63
- "expo-mail-composer": "~10.2.0",
64
- "expo-media-library": "~12.1.0",
65
- "expo-module-template": "~9.1.0",
66
- "expo-modules-core": "~0.3.0",
67
- "expo-network": "~3.2.0",
68
- "expo-notifications": "~0.12.0",
69
- "expo-payments-stripe": "~10.0.0",
70
- "expo-permissions": "~12.1.0",
71
- "expo-print": "~10.2.0",
72
- "expo-random": "~11.2.0",
73
- "expo-screen-orientation": "~3.2.0",
74
- "expo-secure-store": "~10.2.0",
75
- "expo-sensors": "~10.2.0",
76
- "expo-sharing": "~9.2.0",
77
- "expo-sms": "~9.2.0",
78
- "expo-speech": "~9.2.0",
79
- "expo-splash-screen": "~0.11.0",
80
- "expo-sqlite": "~9.2.0",
81
- "expo-status-bar": "~1.0.4",
82
- "expo-store-review": "~4.1.0",
83
- "expo-task-manager": "~9.2.0",
84
- "expo-tracking-transparency": "~1.1.0",
85
- "expo-updates": "~0.8.4",
86
- "expo-video-thumbnails": "~5.2.0",
87
- "expo-web-browser": "~9.2.0",
23
+ "expo-auth-session": "~3.4.0",
24
+ "expo-av": "~10.0.0",
25
+ "expo-background-fetch": "~10.0.0",
26
+ "expo-barcode-scanner": "~11.0.0",
27
+ "expo-battery": "~6.0.0",
28
+ "expo-blur": "~10.0.0",
29
+ "expo-branch": "~5.0.0",
30
+ "expo-brightness": "~10.0.0",
31
+ "expo-calendar": "~10.0.0",
32
+ "expo-camera": "~12.0.0",
33
+ "expo-cellular": "~4.0.0",
34
+ "expo-checkbox": "~2.0.0",
35
+ "expo-clipboard": "~2.0.0",
36
+ "expo-constants": "~12.0.0",
37
+ "expo-contacts": "~10.0.0",
38
+ "expo-crypto": "~10.0.0",
39
+ "expo-device": "~4.0.0",
40
+ "expo-document-picker": "~10.0.0",
41
+ "expo-error-recovery": "~3.0.0",
42
+ "expo-face-detector": "~11.0.0",
43
+ "expo-facebook": "~12.0.0",
44
+ "expo-file-system": "~13.0.0",
45
+ "expo-firebase-analytics": "~5.0.0",
46
+ "expo-firebase-core": "~4.0.0",
47
+ "expo-font": "~10.0.0",
48
+ "expo-gl": "~11.0.0",
49
+ "expo-gl-cpp": "~11.0.0",
50
+ "expo-google-sign-in": "~10.0.0",
51
+ "expo-haptics": "~11.0.0",
52
+ "expo-image-loader": "~3.0.0",
53
+ "expo-image-manipulator": "~10.0.0",
54
+ "expo-image-picker": "~11.0.0",
55
+ "expo-in-app-purchases": "~12.0.0",
56
+ "expo-intent-launcher": "~10.0.0",
57
+ "expo-keep-awake": "~10.0.0",
58
+ "expo-linear-gradient": "~10.0.0",
59
+ "expo-linking": "~2.4.0",
60
+ "expo-local-authentication": "~12.0.0",
61
+ "expo-localization": "~11.0.0",
62
+ "expo-location": "~13.0.0",
63
+ "expo-mail-composer": "~11.0.0",
64
+ "expo-media-library": "~13.0.0",
65
+ "expo-module-template": "~10.0.0",
66
+ "expo-modules-core": "~0.4.0",
67
+ "expo-network": "~4.0.0",
68
+ "expo-notifications": "~0.13.0",
69
+ "expo-permissions": "~13.0.0",
70
+ "expo-print": "~11.0.0",
71
+ "expo-random": "~12.0.0",
72
+ "expo-screen-orientation": "~4.0.0",
73
+ "expo-secure-store": "~11.0.0",
74
+ "expo-sensors": "~11.0.0",
75
+ "expo-sharing": "~10.0.0",
76
+ "expo-sms": "~10.0.0",
77
+ "expo-speech": "~10.0.0",
78
+ "expo-splash-screen": "~0.13.0",
79
+ "expo-sqlite": "~10.0.0",
80
+ "expo-status-bar": "~1.1.0",
81
+ "expo-store-review": "~5.0.0",
82
+ "expo-task-manager": "~10.0.0",
83
+ "expo-tracking-transparency": "~2.0.0",
84
+ "expo-updates": "~0.10.1",
85
+ "expo-video-thumbnails": "~6.0.0",
86
+ "expo-web-browser": "~10.0.0",
88
87
  "firebase": "8.10.0",
89
88
  "lottie-react-native": "4.0.3",
90
89
  "react-native-appearance": "~0.3.3",
@@ -92,17 +91,17 @@
92
91
  "react-native-gesture-handler": "~1.10.2",
93
92
  "react-native-get-random-values": "~1.7.0",
94
93
  "react-native-maps": "0.28.0",
95
- "react-native-pager-view": "5.0.12",
94
+ "react-native-pager-view": "5.4.4",
96
95
  "react-native-reanimated": "~2.2.0",
97
- "react-native-safe-area-context": "3.2.0",
98
- "react-native-screens": "~3.4.0",
96
+ "react-native-safe-area-context": "3.3.2",
97
+ "react-native-screens": "~3.8.0",
99
98
  "react-native-shared-element": "0.8.2",
100
99
  "react-native-svg": "12.1.1",
101
- "react-native-unimodules": "~0.15.0-alpha.0",
100
+ "react-native-unimodules": "~0.15.0",
102
101
  "react-native-view-shot": "3.1.2",
103
102
  "react-native-webview": "11.13.0",
104
103
  "sentry-expo": "^4.0.0",
105
- "unimodules-app-loader": "~2.3.0-alpha.0",
104
+ "unimodules-app-loader": "~3.0.0",
106
105
  "unimodules-image-loader-interface": "~6.1.0",
107
- "unimodules-task-manager-interface": "~6.3.0-alpha.0"
106
+ "unimodules-task-manager-interface": "~7.0.0"
108
107
  }
@@ -0,0 +1,4 @@
1
+ {
2
+ "name": "expo",
3
+ "platforms": ["ios", "android"]
4
+ }
package/ios/Expo.h ADDED
@@ -0,0 +1 @@
1
+ #import <ExpoModulesCore/ExpoModulesCore.h>
@@ -0,0 +1,21 @@
1
+ require 'json'
2
+
3
+ package = JSON.parse(File.read(File.join(__dir__, '..', 'package.json')))
4
+
5
+ Pod::Spec.new do |s|
6
+ s.name = 'Expo'
7
+ s.version = package['version']
8
+ s.summary = package['description']
9
+ s.description = package['description']
10
+ s.license = package['license']
11
+ s.author = package['author']
12
+ s.homepage = package['homepage']
13
+ s.platform = :ios, '12.0'
14
+ s.source = { git: 'https://github.com/expo/expo.git' }
15
+ s.static_framework = true
16
+ s.header_dir = 'Expo'
17
+
18
+ s.dependency 'ExpoModulesCore'
19
+
20
+ s.source_files = '**/*.{h,m,swift}'
21
+ end
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo",
3
- "version": "43.0.0-alpha.1",
3
+ "version": "43.0.0-beta.1",
4
4
  "description": "The Expo SDK",
5
5
  "main": "build/Expo.js",
6
6
  "module": "build/Expo.js",
@@ -13,15 +13,19 @@
13
13
  "expo": "bin/cli.js"
14
14
  },
15
15
  "files": [
16
+ "android",
16
17
  "bin",
17
18
  "build",
19
+ "ios",
18
20
  "scripts",
19
21
  "tools",
20
- "tsconfig.base.json",
22
+ "AppEntry.js",
21
23
  "bundledNativeModules.json",
24
+ "expo-module.config.json",
25
+ "metro-config.js",
26
+ "react-native.config.js",
22
27
  "requiresExtraSetup.json",
23
- "AppEntry.js",
24
- "metro-config.js"
28
+ "tsconfig.base.json"
25
29
  ],
26
30
  "scripts": {
27
31
  "build": "expo-module build",
@@ -50,28 +54,28 @@
50
54
  },
51
55
  "homepage": "https://github.com/expo/expo/tree/master/packages/expo",
52
56
  "dependencies": {
53
- "@babel/runtime": "^7.1.2",
54
- "@expo/metro-config": "^0.1.70",
57
+ "@babel/runtime": "^7.14.0",
58
+ "@expo/metro-config": "~0.1.84",
55
59
  "@expo/vector-icons": "^12.0.4",
56
- "babel-preset-expo": "~8.5.0",
60
+ "babel-preset-expo": "~8.5.1",
57
61
  "cross-spawn": "^6.0.5",
58
- "expo-application": "~3.3.0",
62
+ "expo-application": "~4.0.0",
59
63
  "expo-asset": "~8.4.0",
60
- "expo-constants": "~11.1.0",
61
- "expo-error-recovery": "~2.3.0",
62
- "expo-file-system": "~12.0.0",
63
- "expo-font": "~9.3.0",
64
- "expo-keep-awake": "~9.3.0",
65
- "expo-modules-autolinking": "~0.3.0",
66
- "expo-modules-core": "~0.3.0",
64
+ "expo-constants": "~12.0.0",
65
+ "expo-file-system": "~13.0.0",
66
+ "expo-font": "~10.0.0",
67
+ "expo-keep-awake": "~10.0.0",
68
+ "expo-modules-autolinking": "~0.3.2",
69
+ "expo-modules-core": "~0.4.0",
67
70
  "fbemitter": "^2.1.1",
68
71
  "invariant": "^2.2.2",
69
72
  "md5-file": "^3.2.3",
70
73
  "pretty-format": "^26.4.0",
71
- "react-native-safe-area-context": "3.2.0",
72
- "serialize-error": "^2.1.0",
73
74
  "uuid": "^3.4.0"
74
75
  },
76
+ "optionalDependencies": {
77
+ "expo-error-recovery": "~3.0.0"
78
+ },
75
79
  "devDependencies": {
76
80
  "@types/fbemitter": "^2.0.32",
77
81
  "@types/invariant": "^2.2.29",
@@ -79,11 +83,11 @@
79
83
  "@types/react-native": "~0.64.12",
80
84
  "@types/react-test-renderer": "^17.0.1",
81
85
  "@types/uuid": "^3.4.7",
82
- "expo-location": "^12.1.0",
86
+ "expo-location": "^13.0.0",
83
87
  "expo-module-scripts": "^2.0.0",
84
88
  "react": "17.0.1",
85
89
  "react-dom": "17.0.1",
86
90
  "react-native": "0.64.2"
87
91
  },
88
- "gitHead": "5956d6efc352b9ae53023c7ef6c4fb0ee3f3d2aa"
92
+ "gitHead": "dcb45fc798298943f13c091d30e2846bdc25089b"
89
93
  }
@@ -0,0 +1,15 @@
1
+ const path = require('path');
2
+
3
+ module.exports = {
4
+ dependency: {
5
+ platforms: {
6
+ ios: {
7
+ podspecPath: path.join(__dirname, 'ios/Expo.podspec'),
8
+ project: 'ios/Expo.xcodeproj',
9
+ },
10
+ android: {
11
+ packageImportPath: 'import expo.modules.ExpoModulesPackage;',
12
+ },
13
+ },
14
+ },
15
+ };
@@ -14,10 +14,3 @@ def use_expo_modules!(options = {})
14
14
 
15
15
  @current_target_definition.autolinking_manager = Expo::AutolinkingManager.new(self, @current_target_definition, options).use_expo_modules!
16
16
  end
17
-
18
- # This is enabled by default, but everyone can opt-out if needed.
19
- $ExpoUseSwiftModules = true
20
-
21
- def use_swift_modules!(use = true)
22
- $ExpoUseSwiftModules = use
23
- end
@@ -1,16 +0,0 @@
1
- const serializeError = require('serialize-error');
2
- /**
3
- * @deprecated: Remove in SDK 38
4
- * https://github.com/expo/expo-cli/pull/1269
5
- */
6
- class LogReporter {
7
- update(event) {
8
- if (event.error instanceof Error) {
9
- event.error = serializeError(event.error);
10
- }
11
-
12
- console.log(JSON.stringify(event));
13
- }
14
- }
15
-
16
- module.exports = LogReporter;