expo 45.0.4 → 46.0.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/build.gradle +6 -4
- package/android/src/main/java/expo/modules/ReactActivityDelegateWrapper.kt +25 -0
- package/android/src/main/java/expo/modules/ReactNativeHostWrapperBase.kt +0 -5
- package/android/src/reactNativeHostWrapper/expo/modules/ReactNativeHostWrapper.kt +5 -0
- package/android/src/reactNativeHostWrapper64/expo/modules/ReactNativeHostWrapper.kt +14 -0
- package/android/src/reactNativeHostWrapper68/expo/modules/ReactNativeHostWrapper.kt +37 -0
- package/build/Expo.d.ts +1 -0
- package/build/Expo.d.ts.map +1 -1
- package/build/Expo.fx.js +6 -0
- package/build/Expo.fx.js.map +1 -1
- package/build/Expo.fx.web.d.ts.map +1 -1
- package/build/Expo.fx.web.js +17 -0
- package/build/Expo.fx.web.js.map +1 -1
- package/build/Expo.js +1 -0
- package/build/Expo.js.map +1 -1
- package/build/environment/DevAppContainer.d.ts +3 -1
- package/build/environment/DevAppContainer.d.ts.map +1 -1
- package/build/environment/DevAppContainer.js.map +1 -1
- package/build/environment/DevLoadingView.d.ts.map +1 -1
- package/build/environment/DevLoadingView.js +18 -26
- package/build/environment/DevLoadingView.js.map +1 -1
- package/build/environment/DevLoadingViewNativeModule.d.ts +9 -0
- package/build/environment/DevLoadingViewNativeModule.d.ts.map +1 -0
- package/build/environment/DevLoadingViewNativeModule.js +8 -0
- package/build/environment/DevLoadingViewNativeModule.js.map +1 -0
- package/build/environment/DevLoadingViewNativeModule.native.d.ts +3 -0
- package/build/environment/DevLoadingViewNativeModule.native.d.ts.map +1 -0
- package/build/environment/DevLoadingViewNativeModule.native.js +3 -0
- package/build/environment/DevLoadingViewNativeModule.native.js.map +1 -0
- package/build/environment/getInitialSafeArea.d.ts +11 -0
- package/build/environment/getInitialSafeArea.d.ts.map +1 -0
- package/build/environment/getInitialSafeArea.js +13 -0
- package/build/environment/getInitialSafeArea.js.map +1 -0
- package/build/environment/getInitialSafeArea.native.d.ts +11 -0
- package/build/environment/getInitialSafeArea.native.d.ts.map +1 -0
- package/build/environment/getInitialSafeArea.native.js +13 -0
- package/build/environment/getInitialSafeArea.native.js.map +1 -0
- package/build/errors/ExpoErrorManager.d.ts +3 -0
- package/build/errors/ExpoErrorManager.d.ts.map +1 -0
- package/build/errors/ExpoErrorManager.js +39 -0
- package/build/errors/ExpoErrorManager.js.map +1 -0
- package/bundledNativeModules.json +92 -90
- package/expo-module.config.json +4 -1
- package/package.json +19 -19
- package/react-native.config.js +1 -4
- package/scripts/autolinking.rb +4 -0
- package/android/src/legacyReactNativeHostWrapper/expo/modules/ReactNativeHostWrapper.kt +0 -9
- package/ios/Expo.podspec +0 -21
package/android/build.gradle
CHANGED
|
@@ -33,7 +33,7 @@ def getRNVersion() {
|
|
|
33
33
|
ensureDependeciesWereEvaluated(project)
|
|
34
34
|
|
|
35
35
|
group = 'host.exp.exponent'
|
|
36
|
-
version = '
|
|
36
|
+
version = '46.0.0-alpha.0'
|
|
37
37
|
|
|
38
38
|
buildscript {
|
|
39
39
|
def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
|
|
@@ -104,7 +104,7 @@ android {
|
|
|
104
104
|
minSdkVersion safeExtGet("minSdkVersion", 21)
|
|
105
105
|
targetSdkVersion safeExtGet("targetSdkVersion", 31)
|
|
106
106
|
versionCode 1
|
|
107
|
-
versionName "
|
|
107
|
+
versionName "46.0.0-alpha.0"
|
|
108
108
|
consumerProguardFiles("proguard-rules.pro")
|
|
109
109
|
}
|
|
110
110
|
lintOptions {
|
|
@@ -120,10 +120,12 @@ android {
|
|
|
120
120
|
srcDirs += new File(project.buildDir, generatedFilesSrcDir)
|
|
121
121
|
|
|
122
122
|
def rnVersion = getRNVersion()
|
|
123
|
-
if (rnVersion >= versionToNumber(0,
|
|
123
|
+
if (rnVersion >= versionToNumber(0, 69, 0)) {
|
|
124
124
|
srcDirs += "src/reactNativeHostWrapper"
|
|
125
|
+
} else if (rnVersion >= versionToNumber(0, 67, 0)) {
|
|
126
|
+
srcDirs += "src/reactNativeHostWrapper68"
|
|
125
127
|
} else {
|
|
126
|
-
srcDirs += "src/
|
|
128
|
+
srcDirs += "src/reactNativeHostWrapper64"
|
|
127
129
|
}
|
|
128
130
|
}
|
|
129
131
|
}
|
|
@@ -10,9 +10,11 @@ import androidx.collection.ArrayMap
|
|
|
10
10
|
import com.facebook.react.ReactActivity
|
|
11
11
|
import com.facebook.react.ReactActivityDelegate
|
|
12
12
|
import com.facebook.react.ReactDelegate
|
|
13
|
+
import com.facebook.react.ReactInstanceEventListener
|
|
13
14
|
import com.facebook.react.ReactInstanceManager
|
|
14
15
|
import com.facebook.react.ReactNativeHost
|
|
15
16
|
import com.facebook.react.ReactRootView
|
|
17
|
+
import com.facebook.react.bridge.ReactContext
|
|
16
18
|
import com.facebook.react.modules.core.PermissionListener
|
|
17
19
|
import expo.modules.core.interfaces.ReactActivityLifecycleListener
|
|
18
20
|
import java.lang.reflect.Field
|
|
@@ -142,6 +144,29 @@ class ReactActivityDelegateWrapper(
|
|
|
142
144
|
}
|
|
143
145
|
|
|
144
146
|
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
|
|
147
|
+
/**
|
|
148
|
+
* Workaround for a problem when results from [onActivityResult] are not properly delivered to modules.
|
|
149
|
+
* It happens when Android kills the [Activity] upon low memory scenario and recreates it later on.
|
|
150
|
+
*
|
|
151
|
+
* In [com.facebook.react.ReactInstanceManager.onActivityResult] you can see that if
|
|
152
|
+
* [com.facebook.react.bridge.ReactContext] is null then React would not broadcast the result to the modules
|
|
153
|
+
* and thus [expo.modules.kotlin.AppContext] would not be triggered properly.
|
|
154
|
+
*
|
|
155
|
+
* If [com.facebook.react.bridge.ReactContext] is not available when [onActivityResult] is called then
|
|
156
|
+
* let us wait for it and invoke [onActivityResult] once it's available.
|
|
157
|
+
*
|
|
158
|
+
* TODO (@bbarthec): fix it upstream?
|
|
159
|
+
*/
|
|
160
|
+
if (delegate.reactInstanceManager.currentReactContext == null) {
|
|
161
|
+
val reactContextListener = object : ReactInstanceEventListener {
|
|
162
|
+
override fun onReactContextInitialized(context: ReactContext?) {
|
|
163
|
+
delegate.reactInstanceManager.removeReactInstanceEventListener(this)
|
|
164
|
+
delegate.onActivityResult(requestCode, resultCode, data)
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
return delegate.reactInstanceManager.addReactInstanceEventListener(reactContextListener)
|
|
168
|
+
}
|
|
169
|
+
|
|
145
170
|
delegate.onActivityResult(requestCode, resultCode, data)
|
|
146
171
|
}
|
|
147
172
|
|
|
@@ -11,7 +11,6 @@ import com.facebook.react.bridge.JSIModuleSpec
|
|
|
11
11
|
import com.facebook.react.bridge.JavaScriptContextHolder
|
|
12
12
|
import com.facebook.react.bridge.JavaScriptExecutorFactory
|
|
13
13
|
import com.facebook.react.bridge.ReactApplicationContext
|
|
14
|
-
import com.facebook.react.devsupport.RedBoxHandler
|
|
15
14
|
import java.lang.reflect.Method
|
|
16
15
|
|
|
17
16
|
open class ReactNativeHostWrapperBase(
|
|
@@ -39,10 +38,6 @@ open class ReactNativeHostWrapperBase(
|
|
|
39
38
|
return result
|
|
40
39
|
}
|
|
41
40
|
|
|
42
|
-
override fun getRedBoxHandler(): RedBoxHandler? {
|
|
43
|
-
return invokeDelegateMethod("getRedBoxHandler")
|
|
44
|
-
}
|
|
45
|
-
|
|
46
41
|
override fun getJavaScriptExecutorFactory(): JavaScriptExecutorFactory? {
|
|
47
42
|
return reactNativeHostHandlers.asSequence()
|
|
48
43
|
.mapNotNull { it.javaScriptExecutorFactory }
|
|
@@ -5,6 +5,7 @@ import com.facebook.react.ReactNativeHost
|
|
|
5
5
|
import com.facebook.react.ReactPackageTurboModuleManagerDelegate
|
|
6
6
|
import com.facebook.react.common.SurfaceDelegateFactory
|
|
7
7
|
import com.facebook.react.devsupport.DevSupportManagerFactory
|
|
8
|
+
import com.facebook.react.devsupport.interfaces.RedBoxHandler
|
|
8
9
|
|
|
9
10
|
class ReactNativeHostWrapper(
|
|
10
11
|
application: Application,
|
|
@@ -29,4 +30,8 @@ class ReactNativeHostWrapper(
|
|
|
29
30
|
override fun getSurfaceDelegateFactory(): SurfaceDelegateFactory {
|
|
30
31
|
return host.surfaceDelegateFactory
|
|
31
32
|
}
|
|
33
|
+
|
|
34
|
+
override fun getRedBoxHandler(): RedBoxHandler? {
|
|
35
|
+
return invokeDelegateMethod("getRedBoxHandler")
|
|
36
|
+
}
|
|
32
37
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
package expo.modules
|
|
2
|
+
|
|
3
|
+
import android.app.Application
|
|
4
|
+
import com.facebook.react.ReactNativeHost
|
|
5
|
+
import com.facebook.react.devsupport.RedBoxHandler
|
|
6
|
+
|
|
7
|
+
class ReactNativeHostWrapper(
|
|
8
|
+
application: Application,
|
|
9
|
+
host: ReactNativeHost
|
|
10
|
+
) : ReactNativeHostWrapperBase(application, host) {
|
|
11
|
+
override fun getRedBoxHandler(): RedBoxHandler? {
|
|
12
|
+
return invokeDelegateMethod("getRedBoxHandler")
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
package expo.modules
|
|
2
|
+
|
|
3
|
+
import android.app.Application
|
|
4
|
+
import com.facebook.react.ReactNativeHost
|
|
5
|
+
import com.facebook.react.ReactPackageTurboModuleManagerDelegate
|
|
6
|
+
import com.facebook.react.common.SurfaceDelegateFactory
|
|
7
|
+
import com.facebook.react.devsupport.DevSupportManagerFactory
|
|
8
|
+
import com.facebook.react.devsupport.RedBoxHandler
|
|
9
|
+
|
|
10
|
+
class ReactNativeHostWrapper(
|
|
11
|
+
application: Application,
|
|
12
|
+
host: ReactNativeHost
|
|
13
|
+
) : ReactNativeHostWrapperBase(application, host) {
|
|
14
|
+
override fun getDevSupportManagerFactory(): DevSupportManagerFactory? {
|
|
15
|
+
return reactNativeHostHandlers
|
|
16
|
+
.asSequence()
|
|
17
|
+
.mapNotNull { it.devSupportManagerFactory }
|
|
18
|
+
.firstOrNull() as DevSupportManagerFactory?
|
|
19
|
+
?: invokeDelegateMethod("getDevSupportManagerFactory")
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
override fun getReactPackageTurboModuleManagerDelegateBuilder(): ReactPackageTurboModuleManagerDelegate.Builder? {
|
|
23
|
+
return invokeDelegateMethod("getReactPackageTurboModuleManagerDelegateBuilder")
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
override fun getShouldRequireActivity(): Boolean {
|
|
27
|
+
return host.shouldRequireActivity
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
override fun getSurfaceDelegateFactory(): SurfaceDelegateFactory {
|
|
31
|
+
return host.surfaceDelegateFactory
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
override fun getRedBoxHandler(): RedBoxHandler? {
|
|
35
|
+
return invokeDelegateMethod("getRedBoxHandler")
|
|
36
|
+
}
|
|
37
|
+
}
|
package/build/Expo.d.ts
CHANGED
package/build/Expo.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Expo.d.ts","sourceRoot":"","sources":["../src/Expo.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,CAAC;AAEnB,OAAO,KAAK,IAAI,MAAM,aAAa,CAAC;AAEpC,OAAO,EAAE,IAAI,EAAE,CAAC;AAChB,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,gCAAgC,CAAC"}
|
|
1
|
+
{"version":3,"file":"Expo.d.ts","sourceRoot":"","sources":["../src/Expo.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,CAAC;AAEnB,OAAO,KAAK,IAAI,MAAM,aAAa,CAAC;AAEpC,OAAO,EAAE,IAAI,EAAE,CAAC;AAChB,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,gCAAgC,CAAC"}
|
package/build/Expo.fx.js
CHANGED
|
@@ -10,6 +10,7 @@ import { NativeModulesProxy, Platform } from 'expo-modules-core';
|
|
|
10
10
|
import React from 'react';
|
|
11
11
|
import { AppRegistry, StyleSheet } from 'react-native';
|
|
12
12
|
import DevAppContainer from './environment/DevAppContainer';
|
|
13
|
+
import { createErrorHandler } from './errors/ExpoErrorManager';
|
|
13
14
|
// Represents an app running in the store client or an app built with the legacy `expo build` command.
|
|
14
15
|
// `false` when running in bare workflow, custom dev clients, or `eas build`s (managed or bare).
|
|
15
16
|
// This should be used to ensure code that _should_ exist is treated as such.
|
|
@@ -43,6 +44,11 @@ if (NativeModulesProxy.ExpoUpdates?.isMissingRuntimeVersion) {
|
|
|
43
44
|
throw new Error(message);
|
|
44
45
|
}
|
|
45
46
|
}
|
|
47
|
+
if (Constants.executionEnvironment === ExecutionEnvironment.StoreClient) {
|
|
48
|
+
// set up some improvements to commonly logged error messages stemming from react-native
|
|
49
|
+
const globalHandler = ErrorUtils.getGlobalHandler();
|
|
50
|
+
ErrorUtils.setGlobalHandler(createErrorHandler(globalHandler));
|
|
51
|
+
}
|
|
46
52
|
// Having two if statements will enable terser to remove the entire block.
|
|
47
53
|
if (__DEV__) {
|
|
48
54
|
// Only enable the fast refresh indicator for managed iOS apps in dev mode.
|
package/build/Expo.fx.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Expo.fx.js","sourceRoot":"","sources":["../src/Expo.fx.tsx"],"names":[],"mappings":"AAAA,OAAO,2BAA2B,CAAC;AACnC,wEAAwE;AACxE,OAAO,0BAA0B,CAAC;AAClC,OAAO,oCAAoC,CAAC;AAC5C,mFAAmF;AACnF,OAAO,YAAY,CAAC;AAEpB,OAAO,SAAS,EAAE,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AACjE,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,kBAAkB,E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;YAED,mCAAmC,CAAC,GAAG,EAAE,CAAC,wBAAwB,CAAC,CAAC;QACtE,CAAC,CAAC;KACH;CACF","sourcesContent":["import './environment/validate.fx';\n// load remote logging for compatibility with custom development clients\nimport './environment/logging.fx';\nimport './environment/react-native-logs.fx';\n// load expo-asset immediately to set a custom `source` transformer in React Native\nimport 'expo-asset';\n\nimport Constants, { ExecutionEnvironment } from 'expo-constants';\nimport * as Font from 'expo-font';\nimport { NativeModulesProxy, Platform } from 'expo-modules-core';\nimport React from 'react';\nimport { AppRegistry, ErrorUtils, StyleSheet } from 'react-native';\n\nimport DevAppContainer from './environment/DevAppContainer';\nimport { createErrorHandler } from './errors/ExpoErrorManager';\n\n// Represents an app running in the store client or an app built with the legacy `expo build` command.\n// `false` when running in bare workflow, custom dev clients, or `eas build`s (managed or bare).\n// This should be used to ensure code that _should_ exist is treated as such.\nconst isManagedEnvironment =\n Constants.executionEnvironment === ExecutionEnvironment.Standalone ||\n Constants.executionEnvironment === ExecutionEnvironment.StoreClient;\n\n// If expo-font is installed and the style preprocessor is available, use it to parse fonts.\nif (StyleSheet.setStyleAttributePreprocessor) {\n if (__DEV__) {\n // Temporarily disable console.warn() in dev mode,\n // because the experimented `StyleSheet.setStyleAttributePreprocessor` will show a warning about\n // `Overwriting fontFamily style attribute preprocessor`.\n const originalConsoleWarn = global.console.warn;\n global.console.warn = () => {};\n StyleSheet.setStyleAttributePreprocessor('fontFamily', Font.processFontFamily);\n global.console.warn = originalConsoleWarn;\n } else {\n StyleSheet.setStyleAttributePreprocessor('fontFamily', Font.processFontFamily);\n }\n}\n\n// Asserts if bare workflow isn't setup correctly.\nif (NativeModulesProxy.ExpoUpdates?.isMissingRuntimeVersion) {\n const message =\n 'expo-updates is installed but there is no runtime or SDK version configured. ' +\n \"You'll need to configure one of these two properties in \" +\n Platform.select({ ios: 'Expo.plist', android: 'AndroidManifest.xml' }) +\n ' before OTA updates will work properly.';\n if (__DEV__) {\n console.warn(message);\n } else {\n throw new Error(message);\n }\n}\n\nif (Constants.executionEnvironment === ExecutionEnvironment.StoreClient) {\n // set up some improvements to commonly logged error messages stemming from react-native\n const globalHandler = ErrorUtils.getGlobalHandler();\n ErrorUtils.setGlobalHandler(createErrorHandler(globalHandler));\n}\n\n// Having two if statements will enable terser to remove the entire block.\nif (__DEV__) {\n // Only enable the fast refresh indicator for managed iOS apps in dev mode.\n if (isManagedEnvironment && Platform.OS === 'ios') {\n // add the dev app container wrapper component on ios\n // @ts-ignore\n AppRegistry.setWrapperComponentProvider(() => DevAppContainer);\n\n // @ts-ignore\n const originalSetWrapperComponentProvider = AppRegistry.setWrapperComponentProvider;\n\n // @ts-ignore\n AppRegistry.setWrapperComponentProvider = (provider) => {\n function PatchedProviderComponent(props: any) {\n const ProviderComponent = provider();\n\n return (\n <DevAppContainer>\n <ProviderComponent {...props} />\n </DevAppContainer>\n );\n }\n\n originalSetWrapperComponentProvider(() => PatchedProviderComponent);\n };\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Expo.fx.web.d.ts","sourceRoot":"","sources":["../src/Expo.fx.web.
|
|
1
|
+
{"version":3,"file":"Expo.fx.web.d.ts","sourceRoot":"","sources":["../src/Expo.fx.web.tsx"],"names":[],"mappings":"AAAA,OAAO,oCAAoC,CAAC"}
|
package/build/Expo.fx.web.js
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import './environment/react-native-logs.fx';
|
|
2
2
|
import { Platform } from 'expo-modules-core';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { AppRegistry } from 'react-native';
|
|
5
|
+
import DevAppContainer from './environment/DevAppContainer';
|
|
3
6
|
// When users dangerously import a file inside of react-native, it breaks the web alias.
|
|
4
7
|
// This is one of the most common, and cryptic web errors that users encounter.
|
|
5
8
|
// This conditional side-effect provides a more helpful error message for debugging.
|
|
@@ -16,5 +19,19 @@ if (__DEV__) {
|
|
|
16
19
|
},
|
|
17
20
|
});
|
|
18
21
|
}
|
|
22
|
+
// add the dev app container wrapper component to web
|
|
23
|
+
// @ts-ignore
|
|
24
|
+
AppRegistry.setWrapperComponentProvider(() => DevAppContainer);
|
|
25
|
+
// @ts-ignore
|
|
26
|
+
const originalSetWrapperComponentProvider = AppRegistry.setWrapperComponentProvider;
|
|
27
|
+
// @ts-ignore
|
|
28
|
+
AppRegistry.setWrapperComponentProvider = (provider) => {
|
|
29
|
+
function PatchedProviderComponent(props) {
|
|
30
|
+
const ProviderComponent = provider();
|
|
31
|
+
return (React.createElement(DevAppContainer, null,
|
|
32
|
+
React.createElement(ProviderComponent, { ...props })));
|
|
33
|
+
}
|
|
34
|
+
originalSetWrapperComponentProvider(() => PatchedProviderComponent);
|
|
35
|
+
};
|
|
19
36
|
}
|
|
20
37
|
//# sourceMappingURL=Expo.fx.web.js.map
|
package/build/Expo.fx.web.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Expo.fx.web.js","sourceRoot":"","sources":["../src/Expo.fx.web.
|
|
1
|
+
{"version":3,"file":"Expo.fx.web.js","sourceRoot":"","sources":["../src/Expo.fx.web.tsx"],"names":[],"mappings":"AAAA,OAAO,oCAAoC,CAAC;AAE5C,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C,OAAO,eAAe,MAAM,+BAA+B,CAAC;AAE5D,wFAAwF;AACxF,+EAA+E;AAC/E,oFAAoF;AACpF,IAAI,OAAO,EAAE;IACX,qEAAqE;IACrE;IACE,yBAAyB;IACzB,QAAQ,CAAC,EAAE,KAAK,KAAK;QACrB,sDAAsD;QACtD,CAAC,CAAC,yBAAyB,IAAI,MAAM,CAAC,EACtC;QACA,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,yBAAyB,EAAE;YACvD,GAAG;gBACD,MAAM,IAAI,KAAK,CACb,qJAAqJ,CACtJ,CAAC;YACJ,CAAC;SACF,CAAC,CAAC;KACJ;IAED,qDAAqD;IACrD,aAAa;IACb,WAAW,CAAC,2BAA2B,CAAC,GAAG,EAAE,CAAC,eAAe,CAAC,CAAC;IAE/D,aAAa;IACb,MAAM,mCAAmC,GAAG,WAAW,CAAC,2BAA2B,CAAC;IAEpF,aAAa;IACb,WAAW,CAAC,2BAA2B,GAAG,CAAC,QAAQ,EAAE,EAAE;QACrD,SAAS,wBAAwB,CAAC,KAAU;YAC1C,MAAM,iBAAiB,GAAG,QAAQ,EAAE,CAAC;YAErC,OAAO,CACL,oBAAC,eAAe;gBACd,oBAAC,iBAAiB,OAAK,KAAK,GAAI,CAChB,CACnB,CAAC;QACJ,CAAC;QAED,mCAAmC,CAAC,GAAG,EAAE,CAAC,wBAAwB,CAAC,CAAC;IACtE,CAAC,CAAC;CACH","sourcesContent":["import './environment/react-native-logs.fx';\n\nimport { Platform } from 'expo-modules-core';\nimport * as React from 'react';\nimport { AppRegistry } from 'react-native';\n\nimport DevAppContainer from './environment/DevAppContainer';\n\n// When users dangerously import a file inside of react-native, it breaks the web alias.\n// This is one of the most common, and cryptic web errors that users encounter.\n// This conditional side-effect provides a more helpful error message for debugging.\nif (__DEV__) {\n // Use a wrapper `__DEV__` to remove this entire block in production.\n if (\n // Only on web platforms.\n Platform.OS === 'web' &&\n // Skip mocking if someone is shimming this value out.\n !('__fbBatchedBridgeConfig' in global)\n ) {\n Object.defineProperty(global, '__fbBatchedBridgeConfig', {\n get() {\n throw new Error(\n \"Your web project is importing a module from 'react-native' instead of 'react-native-web'. Learn more: https://expo.fyi/fb-batched-bridge-config-web\"\n );\n },\n });\n }\n\n // add the dev app container wrapper component to web\n // @ts-ignore\n AppRegistry.setWrapperComponentProvider(() => DevAppContainer);\n\n // @ts-ignore\n const originalSetWrapperComponentProvider = AppRegistry.setWrapperComponentProvider;\n\n // @ts-ignore\n AppRegistry.setWrapperComponentProvider = (provider) => {\n function PatchedProviderComponent(props: any) {\n const ProviderComponent = provider();\n\n return (\n <DevAppContainer>\n <ProviderComponent {...props} />\n </DevAppContainer>\n );\n }\n\n originalSetWrapperComponentProvider(() => PatchedProviderComponent);\n };\n}\n"]}
|
package/build/Expo.js
CHANGED
package/build/Expo.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Expo.js","sourceRoot":"","sources":["../src/Expo.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,CAAC;AAEnB,OAAO,KAAK,IAAI,MAAM,aAAa,CAAC;AAEpC,OAAO,EAAE,IAAI,EAAE,CAAC;AAChB,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,gCAAgC,CAAC","sourcesContent":["import './Expo.fx';\n\nimport * as Logs from './logs/Logs';\n\nexport { Logs };\nexport { default as registerRootComponent } from './launch/registerRootComponent';\n"]}
|
|
1
|
+
{"version":3,"file":"Expo.js","sourceRoot":"","sources":["../src/Expo.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,CAAC;AAEnB,OAAO,KAAK,IAAI,MAAM,aAAa,CAAC;AAEpC,OAAO,EAAE,IAAI,EAAE,CAAC;AAChB,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,gCAAgC,CAAC","sourcesContent":["import './Expo.fx';\n\nimport * as Logs from './logs/Logs';\n\nexport { Logs };\nexport { disableErrorHandling } from './errors/ExpoErrorManager';\nexport { default as registerRootComponent } from './launch/registerRootComponent';\n"]}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
export default class DevAppContainer extends React.Component
|
|
2
|
+
export default class DevAppContainer extends React.Component<{
|
|
3
|
+
children?: React.ReactNode;
|
|
4
|
+
}> {
|
|
3
5
|
render(): JSX.Element;
|
|
4
6
|
}
|
|
5
7
|
//# sourceMappingURL=DevAppContainer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DevAppContainer.d.ts","sourceRoot":"","sources":["../../src/environment/DevAppContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,KAAK,CAAC,SAAS;
|
|
1
|
+
{"version":3,"file":"DevAppContainer.d.ts","sourceRoot":"","sources":["../../src/environment/DevAppContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,KAAK,CAAC,SAAS,CAAC;IAAE,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,CAAC;IAC1F,MAAM;CAQP"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DevAppContainer.js","sourceRoot":"","sources":["../../src/environment/DevAppContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,cAAc,MAAM,+BAA+B,CAAC;AAE3D,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,KAAK,CAAC,
|
|
1
|
+
{"version":3,"file":"DevAppContainer.js","sourceRoot":"","sources":["../../src/environment/DevAppContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,cAAc,MAAM,+BAA+B,CAAC;AAE3D,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,KAAK,CAAC,SAAyC;IAC1F,MAAM;QACJ,OAAO,CACL;YACG,IAAI,CAAC,KAAK,CAAC,QAAQ;YACpB,oBAAC,cAAc,OAAG,CACjB,CACJ,CAAC;IACJ,CAAC;CACF","sourcesContent":["import * as React from 'react';\n\nimport DevLoadingView from '../environment/DevLoadingView';\n\nexport default class DevAppContainer extends React.Component<{ children?: React.ReactNode }> {\n render() {\n return (\n <>\n {this.props.children}\n <DevLoadingView />\n </>\n );\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DevLoadingView.d.ts","sourceRoot":"","sources":["../../src/environment/DevLoadingView.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DevLoadingView.d.ts","sourceRoot":"","sources":["../../src/environment/DevLoadingView.tsx"],"names":[],"mappings":"AAOA,MAAM,CAAC,OAAO,UAAU,cAAc,uBAmFrC"}
|
|
@@ -1,12 +1,16 @@
|
|
|
1
|
+
import { EventEmitter } from 'expo-modules-core';
|
|
1
2
|
import React, { useEffect, useState, useRef, useMemo } from 'react';
|
|
2
|
-
import { Animated, StyleSheet, Text,
|
|
3
|
+
import { Animated, StyleSheet, Text, Platform, View } from 'react-native';
|
|
4
|
+
import DevLoadingViewNativeModule from './DevLoadingViewNativeModule';
|
|
5
|
+
import { getInitialSafeArea } from './getInitialSafeArea';
|
|
3
6
|
export default function DevLoadingView() {
|
|
7
|
+
const [message, setMessage] = useState('Refreshing...');
|
|
4
8
|
const [isDevLoading, setIsDevLoading] = useState(false);
|
|
5
9
|
const [isAnimating, setIsAnimating] = useState(false);
|
|
6
10
|
const translateY = useRef(new Animated.Value(0)).current;
|
|
7
11
|
const emitter = useMemo(() => {
|
|
8
12
|
try {
|
|
9
|
-
return new
|
|
13
|
+
return new EventEmitter(DevLoadingViewNativeModule);
|
|
10
14
|
}
|
|
11
15
|
catch (error) {
|
|
12
16
|
throw new Error('Failed to instantiate native emitter in `DevLoadingView` because the native module `DevLoadingView` is undefined: ' +
|
|
@@ -16,12 +20,8 @@ export default function DevLoadingView() {
|
|
|
16
20
|
useEffect(() => {
|
|
17
21
|
if (!emitter)
|
|
18
22
|
return;
|
|
19
|
-
function handleShowMessage(
|
|
20
|
-
|
|
21
|
-
// only time we want to display this overlay.
|
|
22
|
-
if (message !== 'Refreshing...') {
|
|
23
|
-
return;
|
|
24
|
-
}
|
|
23
|
+
function handleShowMessage(event) {
|
|
24
|
+
setMessage(event.message);
|
|
25
25
|
// TODO: if we show the refreshing banner and don't get a hide message
|
|
26
26
|
// for 3 seconds, warn the user that it's taking a while and suggest
|
|
27
27
|
// they reload
|
|
@@ -37,7 +37,7 @@ export default function DevLoadingView() {
|
|
|
37
37
|
toValue: 150,
|
|
38
38
|
delay: 1000,
|
|
39
39
|
duration: 350,
|
|
40
|
-
useNativeDriver:
|
|
40
|
+
useNativeDriver: Platform.OS !== 'web',
|
|
41
41
|
}).start(({ finished }) => {
|
|
42
42
|
if (finished) {
|
|
43
43
|
setIsAnimating(false);
|
|
@@ -52,25 +52,17 @@ export default function DevLoadingView() {
|
|
|
52
52
|
hideSubscription.remove();
|
|
53
53
|
};
|
|
54
54
|
}, [translateY, emitter]);
|
|
55
|
-
if (isDevLoading
|
|
56
|
-
return (React.createElement(Animated.View, { style: [styles.animatedContainer, { transform: [{ translateY }] }], pointerEvents: "none" },
|
|
57
|
-
React.createElement(View, { style: styles.banner },
|
|
58
|
-
React.createElement(View, { style: styles.contentContainer },
|
|
59
|
-
React.createElement(View, { style: { flexDirection: 'row' } },
|
|
60
|
-
React.createElement(Text, { style: styles.text }, isDevLoading ? 'Refreshing...' : 'Refreshed')),
|
|
61
|
-
React.createElement(View, { style: { flex: 1 } },
|
|
62
|
-
React.createElement(Text, { style: styles.subtitle }, isDevLoading ? 'Using Fast Refresh' : "Don't see your changes? Reload the app"))))));
|
|
63
|
-
}
|
|
64
|
-
else {
|
|
55
|
+
if (!isDevLoading && !isAnimating) {
|
|
65
56
|
return null;
|
|
66
57
|
}
|
|
58
|
+
return (React.createElement(Animated.View, { style: [styles.animatedContainer, { transform: [{ translateY }] }], pointerEvents: "none" },
|
|
59
|
+
React.createElement(View, { style: styles.banner },
|
|
60
|
+
React.createElement(View, { style: styles.contentContainer },
|
|
61
|
+
React.createElement(View, { style: { flexDirection: 'row' } },
|
|
62
|
+
React.createElement(Text, { style: styles.text }, message)),
|
|
63
|
+
React.createElement(View, { style: { flex: 1 } },
|
|
64
|
+
React.createElement(Text, { style: styles.subtitle }, isDevLoading ? 'Using Fast Refresh' : "Don't see your changes? Reload the app"))))));
|
|
67
65
|
}
|
|
68
|
-
/**
|
|
69
|
-
* This is a hack to get the safe area insets without explicitly depending on react-native-safe-area-context.
|
|
70
|
-
**/
|
|
71
|
-
const RNCSafeAreaContext = TurboModuleRegistry.get('RNCSafeAreaContext');
|
|
72
|
-
// @ts-ignore: we're not using the spec so the return type of getConstants() is {}
|
|
73
|
-
const initialWindowMetrics = RNCSafeAreaContext?.getConstants()?.initialWindowMetrics;
|
|
74
66
|
const styles = StyleSheet.create({
|
|
75
67
|
animatedContainer: {
|
|
76
68
|
position: 'absolute',
|
|
@@ -83,7 +75,7 @@ const styles = StyleSheet.create({
|
|
|
83
75
|
flex: 1,
|
|
84
76
|
overflow: 'visible',
|
|
85
77
|
backgroundColor: 'rgba(0,0,0,0.75)',
|
|
86
|
-
paddingBottom:
|
|
78
|
+
paddingBottom: getInitialSafeArea().bottom,
|
|
87
79
|
},
|
|
88
80
|
contentContainer: {
|
|
89
81
|
flex: 1,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DevLoadingView.js","sourceRoot":"","sources":["../../src/environment/DevLoadingView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACpE,OAAO,
|
|
1
|
+
{"version":3,"file":"DevLoadingView.js","sourceRoot":"","sources":["../../src/environment/DevLoadingView.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACpE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAE1E,OAAO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AI,IAAC,KAAK,EAAE,MAAM,CAAC,QAAQ,IACzB,YAAY,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,wCAAwC,CAC1E,CACF,CACF,CACF,CACO,CACjB,CAAC;AACJ,CAAC;AAED,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,iBAAiB,EAAE;QACjB,QAAQ,EAAE,UAAU;QACpB,MAAM,EAAE,CAAC;QACT,IAAI,EAAE,CAAC;QACP,KAAK,EAAE,CAAC;QACR,MAAM,EAAE,EAAE,EAAE,YAAY;KACzB;IAED,MAAM,EAAE;QACN,IAAI,EAAE,CAAC;QACP,QAAQ,EAAE,SAAS;QACnB,eAAe,EAAE,kBAAkB;QACnC,aAAa,EAAE,kBAAkB,EAAE,CAAC,MAAM;KAC3C;IACD,gBAAgB,EAAE;QAChB,IAAI,EAAE,CAAC;QACP,UAAU,EAAE,EAAE;QACd,aAAa,EAAE,CAAC;QAChB,UAAU,EAAE,QAAQ;QACpB,cAAc,EAAE,QAAQ;QACxB,SAAS,EAAE,QAAQ;KACpB;IACD,IAAI,EAAE;QACJ,KAAK,EAAE,MAAM;QACb,QAAQ,EAAE,EAAE;KACb;IACD,QAAQ,EAAE;QACR,KAAK,EAAE,uBAAuB;KAC/B;CACF,CAAC,CAAC","sourcesContent":["import { EventEmitter } from 'expo-modules-core';\nimport React, { useEffect, useState, useRef, useMemo } from 'react';\nimport { Animated, StyleSheet, Text, Platform, View } from 'react-native';\n\nimport DevLoadingViewNativeModule from './DevLoadingViewNativeModule';\nimport { getInitialSafeArea } from './getInitialSafeArea';\n\nexport default function DevLoadingView() {\n const [message, setMessage] = useState('Refreshing...');\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<EventEmitter>(() => {\n try {\n return new EventEmitter(DevLoadingViewNativeModule);\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(event: { message: string }) {\n setMessage(event.message);\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: Platform.OS !== 'web',\n }).start(({ finished }) => {\n if (finished) {\n setIsAnimating(false);\n translateY.setValue(0);\n }\n });\n }\n\n const showMessageSubscription = emitter.addListener(\n 'devLoadingView:showMessage',\n handleShowMessage\n );\n const hideSubscription = emitter.addListener('devLoadingView:hide', handleHide);\n\n return function cleanup() {\n showMessageSubscription.remove();\n hideSubscription.remove();\n };\n }, [translateY, emitter]);\n\n if (!isDevLoading && !isAnimating) {\n return null;\n }\n\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}>{message}</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}\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\n banner: {\n flex: 1,\n overflow: 'visible',\n backgroundColor: 'rgba(0,0,0,0.75)',\n paddingBottom: getInitialSafeArea().bottom,\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 @@
|
|
|
1
|
+
{"version":3,"file":"DevLoadingViewNativeModule.d.ts","sourceRoot":"","sources":["../../src/environment/DevLoadingViewNativeModule.ts"],"names":[],"mappings":";;;;;;;AAAA,wBAMG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DevLoadingViewNativeModule.js","sourceRoot":"","sources":["../../src/environment/DevLoadingViewNativeModule.ts"],"names":[],"mappings":"AAAA,eAAe,MAAM,CAAC,MAAM,CAAC;IAC3B,IAAI,EAAE,gBAAgB;IACtB,cAAc,KAAI,CAAC;IACnB,aAAa,KAAI,CAAC;IAClB,WAAW,KAAI,CAAC;IAChB,eAAe,KAAI,CAAC;CACrB,CAAC,CAAC","sourcesContent":["export default Object.freeze({\n name: 'DevLoadingView',\n startObserving() {},\n stopObserving() {},\n addListener() {},\n removeListeners() {},\n});\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DevLoadingViewNativeModule.native.d.ts","sourceRoot":"","sources":["../../src/environment/DevLoadingViewNativeModule.native.ts"],"names":[],"mappings":";AAEA,wBAA4C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DevLoadingViewNativeModule.native.js","sourceRoot":"","sources":["../../src/environment/DevLoadingViewNativeModule.native.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,eAAe,aAAa,CAAC,cAAc,CAAC","sourcesContent":["import { NativeModules } from 'react-native';\n\nexport default NativeModules.DevLoadingView;\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Get the best estimate safe area before native modules have fully loaded,
|
|
3
|
+
* this is the fallback file which assumes guessing cannot be done.
|
|
4
|
+
*/
|
|
5
|
+
export declare function getInitialSafeArea(): {
|
|
6
|
+
top: number;
|
|
7
|
+
bottom: number;
|
|
8
|
+
left: number;
|
|
9
|
+
right: number;
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=getInitialSafeArea.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getInitialSafeArea.d.ts","sourceRoot":"","sources":["../../src/environment/getInitialSafeArea.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,wBAAgB,kBAAkB,IAAI;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAOjG"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Get the best estimate safe area before native modules have fully loaded,
|
|
3
|
+
* this is the fallback file which assumes guessing cannot be done.
|
|
4
|
+
*/
|
|
5
|
+
export function getInitialSafeArea() {
|
|
6
|
+
return {
|
|
7
|
+
top: 0,
|
|
8
|
+
bottom: 0,
|
|
9
|
+
left: 0,
|
|
10
|
+
right: 0,
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=getInitialSafeArea.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getInitialSafeArea.js","sourceRoot":"","sources":["../../src/environment/getInitialSafeArea.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,UAAU,kBAAkB;IAChC,OAAO;QACL,GAAG,EAAE,CAAC;QACN,MAAM,EAAE,CAAC;QACT,IAAI,EAAE,CAAC;QACP,KAAK,EAAE,CAAC;KACT,CAAC;AACJ,CAAC","sourcesContent":["/**\n * Get the best estimate safe area before native modules have fully loaded,\n * this is the fallback file which assumes guessing cannot be done.\n */\nexport function getInitialSafeArea(): { top: number; bottom: number; left: number; right: number } {\n return {\n top: 0,\n bottom: 0,\n left: 0,\n right: 0,\n };\n}\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Get the best estimate safe area before native modules have fully loaded.
|
|
3
|
+
* This is a hack to get the safe area insets without explicitly depending on react-native-safe-area-context.
|
|
4
|
+
*/
|
|
5
|
+
export declare function getInitialSafeArea(): {
|
|
6
|
+
top: number;
|
|
7
|
+
bottom: number;
|
|
8
|
+
left: number;
|
|
9
|
+
right: number;
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=getInitialSafeArea.native.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getInitialSafeArea.native.d.ts","sourceRoot":"","sources":["../../src/environment/getInitialSafeArea.native.ts"],"names":[],"mappings":"AAIA;;;GAGG;AACH,wBAAgB,kBAAkB,IAAI;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAOjG"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { TurboModuleRegistry } from 'react-native';
|
|
2
|
+
const DEFAULT_SAFE_AREA = { top: 0, bottom: 0, left: 0, right: 0 };
|
|
3
|
+
/**
|
|
4
|
+
* Get the best estimate safe area before native modules have fully loaded.
|
|
5
|
+
* This is a hack to get the safe area insets without explicitly depending on react-native-safe-area-context.
|
|
6
|
+
*/
|
|
7
|
+
export function getInitialSafeArea() {
|
|
8
|
+
const RNCSafeAreaContext = TurboModuleRegistry.get('RNCSafeAreaContext');
|
|
9
|
+
// @ts-ignore: we're not using the spec so the return type of getConstants() is {}
|
|
10
|
+
const initialWindowMetrics = RNCSafeAreaContext?.getConstants()?.initialWindowMetrics;
|
|
11
|
+
return initialWindowMetrics?.insets ?? DEFAULT_SAFE_AREA;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=getInitialSafeArea.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getInitialSafeArea.native.js","sourceRoot":"","sources":["../../src/environment/getInitialSafeArea.native.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAEnD,MAAM,iBAAiB,GAAG,EAAE,GAAG,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC;AAEnE;;;GAGG;AACH,MAAM,UAAU,kBAAkB;IAChC,MAAM,kBAAkB,GAAG,mBAAmB,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IAEzE,kFAAkF;IAClF,MAAM,oBAAoB,GAAG,kBAAkB,EAAE,YAAY,EAAE,EAAE,oBAAoB,CAAC;IAEtF,OAAO,oBAAoB,EAAE,MAAM,IAAI,iBAAiB,CAAC;AAC3D,CAAC","sourcesContent":["import { TurboModuleRegistry } from 'react-native';\n\nconst DEFAULT_SAFE_AREA = { top: 0, bottom: 0, left: 0, right: 0 };\n\n/**\n * Get the best estimate safe area before native modules have fully loaded.\n * This is a hack to get the safe area insets without explicitly depending on react-native-safe-area-context.\n */\nexport function getInitialSafeArea(): { top: number; bottom: number; left: number; right: number } {\n const RNCSafeAreaContext = TurboModuleRegistry.get('RNCSafeAreaContext');\n\n // @ts-ignore: we're not using the spec so the return type of getConstants() is {}\n const initialWindowMetrics = RNCSafeAreaContext?.getConstants()?.initialWindowMetrics;\n\n return initialWindowMetrics?.insets ?? DEFAULT_SAFE_AREA;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExpoErrorManager.d.ts","sourceRoot":"","sources":["../../src/errors/ExpoErrorManager.ts"],"names":[],"mappings":"AAmCA,wBAAgB,kBAAkB,CAAC,eAAe,KAAA,sCASjD;AAED,wBAAgB,oBAAoB,SAEnC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
let isErrorHandlingEnabled = true;
|
|
2
|
+
const developmentBuildMessage = `If you're trying to use a module that is not supported in Expo Go, you need to create a development build of your app. See https://docs.expo.dev/development/introduction/ for more info.`;
|
|
3
|
+
function customizeUnavailableMessage(error) {
|
|
4
|
+
error.message += '\n\n' + developmentBuildMessage;
|
|
5
|
+
}
|
|
6
|
+
function customizeModuleIsMissingMessage(error) {
|
|
7
|
+
error.message = `Your JavaScript code tried to access a native module that doesn't exist.
|
|
8
|
+
|
|
9
|
+
${developmentBuildMessage}`;
|
|
10
|
+
}
|
|
11
|
+
function customizeError(error) {
|
|
12
|
+
if ('code' in error && error.code === 'ERR_UNAVAILABLE') {
|
|
13
|
+
customizeUnavailableMessage(error);
|
|
14
|
+
}
|
|
15
|
+
else if (error.message.includes('Native module cannot be null') || // RN 0.64 and below message
|
|
16
|
+
error.message.includes('`new NativeEventEmitter()` requires a non-null argument.') // RN 0.65+ message
|
|
17
|
+
) {
|
|
18
|
+
customizeModuleIsMissingMessage(error);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
function errorHandler(originalHandler, error, isFatal) {
|
|
22
|
+
if (error instanceof Error) {
|
|
23
|
+
customizeError(error);
|
|
24
|
+
}
|
|
25
|
+
originalHandler(error, isFatal);
|
|
26
|
+
}
|
|
27
|
+
export function createErrorHandler(originalHandler) {
|
|
28
|
+
return (error, isFatal) => {
|
|
29
|
+
if (isErrorHandlingEnabled) {
|
|
30
|
+
errorHandler(originalHandler, error, isFatal);
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
originalHandler(error, isFatal);
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
export function disableErrorHandling() {
|
|
37
|
+
isErrorHandlingEnabled = false;
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=ExpoErrorManager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExpoErrorManager.js","sourceRoot":"","sources":["../../src/errors/ExpoErrorManager.ts"],"names":[],"mappings":"AAGA,IAAI,sBAAsB,GAAG,IAAI,CAAC;AAElC,MAAM,uBAAuB,GAAG,2LAA2L,CAAC;AAE5N,SAAS,2BAA2B,CAAC,KAAiB;IACpD,KAAK,CAAC,OAAO,IAAI,MAAM,GAAG,uBAAuB,CAAC;AACpD,CAAC;AAED,SAAS,+BAA+B,CAAC,KAAY;IACnD,KAAK,CAAC,OAAO,GAAG;;EAEhB,uBAAuB,EAAE,CAAC;AAC5B,CAAC;AAED,SAAS,cAAc,CAAC,KAAyB;IAC/C,IAAI,MAAM,IAAI,KAAK,IAAI,KAAK,CAAC,IAAI,KAAK,iBAAiB,EAAE;QACvD,2BAA2B,CAAC,KAAK,CAAC,CAAC;KACpC;SAAM,IACL,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,8BAA8B,CAAC,IAAI,4BAA4B;QACtF,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,0DAA0D,CAAC,CAAC,mBAAmB;MACtG;QACA,+BAA+B,CAAC,KAAK,CAAC,CAAC;KACxC;AACH,CAAC;AAED,SAAS,YAAY,CAAC,eAAe,EAAE,KAAK,EAAE,OAAO;IACnD,IAAI,KAAK,YAAY,KAAK,EAAE;QAC1B,cAAc,CAAC,KAAK,CAAC,CAAC;KACvB;IACD,eAAe,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;AAClC,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,eAAe;IAChD,OAAO,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE;QACxB,IAAI,sBAAsB,EAAE;YAC1B,YAAY,CAAC,eAAe,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;YAC9C,OAAO;SACR;QAED,eAAe,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IAClC,CAAC,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,oBAAoB;IAClC,sBAAsB,GAAG,KAAK,CAAC;AACjC,CAAC","sourcesContent":["// Similar interface to the one used in expo modules.\ntype CodedError = Error & { code?: string };\n\nlet isErrorHandlingEnabled = true;\n\nconst developmentBuildMessage = `If you're trying to use a module that is not supported in Expo Go, you need to create a development build of your app. See https://docs.expo.dev/development/introduction/ for more info.`;\n\nfunction customizeUnavailableMessage(error: CodedError) {\n error.message += '\\n\\n' + developmentBuildMessage;\n}\n\nfunction customizeModuleIsMissingMessage(error: Error) {\n error.message = `Your JavaScript code tried to access a native module that doesn't exist. \n\n${developmentBuildMessage}`;\n}\n\nfunction customizeError(error: Error | CodedError) {\n if ('code' in error && error.code === 'ERR_UNAVAILABLE') {\n customizeUnavailableMessage(error);\n } else if (\n error.message.includes('Native module cannot be null') || // RN 0.64 and below message\n error.message.includes('`new NativeEventEmitter()` requires a non-null argument.') // RN 0.65+ message\n ) {\n customizeModuleIsMissingMessage(error);\n }\n}\n\nfunction errorHandler(originalHandler, error, isFatal) {\n if (error instanceof Error) {\n customizeError(error);\n }\n originalHandler(error, isFatal);\n}\n\nexport function createErrorHandler(originalHandler) {\n return (error, isFatal) => {\n if (isErrorHandlingEnabled) {\n errorHandler(originalHandler, error, isFatal);\n return;\n }\n\n originalHandler(error, isFatal);\n };\n}\n\nexport function disableErrorHandling() {\n isErrorHandlingEnabled = false;\n}\n"]}
|
|
@@ -1,112 +1,114 @@
|
|
|
1
1
|
{
|
|
2
2
|
"@expo/vector-icons": "^13.0.0",
|
|
3
3
|
"@react-native-async-storage/async-storage": "~1.17.3",
|
|
4
|
-
"@react-native-community/datetimepicker": "6.
|
|
4
|
+
"@react-native-community/datetimepicker": "6.2.0",
|
|
5
5
|
"@react-native-masked-view/masked-view": "0.2.6",
|
|
6
|
-
"@react-native-community/netinfo": "
|
|
7
|
-
"@react-native-community/slider": "4.2.
|
|
6
|
+
"@react-native-community/netinfo": "9.3.0",
|
|
7
|
+
"@react-native-community/slider": "4.2.3",
|
|
8
8
|
"@react-native-community/viewpager": "5.0.11",
|
|
9
|
-
"@react-native-picker/picker": "2.4.
|
|
9
|
+
"@react-native-picker/picker": "2.4.2",
|
|
10
10
|
"@react-native-segmented-control/segmented-control": "2.4.0",
|
|
11
|
-
"@stripe/stripe-react-native": "0.
|
|
12
|
-
"expo-ads-admob": "~13.
|
|
13
|
-
"expo-ads-facebook": "~11.
|
|
14
|
-
"expo-analytics-amplitude": "~11.
|
|
15
|
-
"expo-analytics-segment": "~11.
|
|
11
|
+
"@stripe/stripe-react-native": "0.13.1",
|
|
12
|
+
"expo-ads-admob": "~13.1.0",
|
|
13
|
+
"expo-ads-facebook": "~11.3.0",
|
|
14
|
+
"expo-analytics-amplitude": "~11.3.0",
|
|
15
|
+
"expo-analytics-segment": "~11.3.0",
|
|
16
16
|
"expo-app-auth": "~11.1.0",
|
|
17
17
|
"expo-app-loader-provider": "~8.0.0",
|
|
18
|
-
"expo-app-loading": "~2.
|
|
19
|
-
"expo-apple-authentication": "~4.
|
|
20
|
-
"expo-application": "~4.
|
|
21
|
-
"expo-asset": "~8.
|
|
22
|
-
"expo-auth-session": "~3.
|
|
23
|
-
"expo-av": "~
|
|
24
|
-
"expo-background-fetch": "~10.
|
|
25
|
-
"expo-barcode-scanner": "~11.
|
|
26
|
-
"expo-battery": "~6.
|
|
27
|
-
"expo-blur": "~11.
|
|
28
|
-
"expo-branch": "~5.
|
|
29
|
-
"expo-brightness": "~10.
|
|
30
|
-
"expo-build-properties": "~0.
|
|
31
|
-
"expo-calendar": "~10.
|
|
32
|
-
"expo-camera": "~12.
|
|
33
|
-
"expo-cellular": "~4.
|
|
34
|
-
"expo-checkbox": "~2.
|
|
35
|
-
"expo-clipboard": "~3.0
|
|
36
|
-
"expo-constants": "~13.
|
|
37
|
-
"expo-contacts": "~10.
|
|
38
|
-
"expo-crypto": "~
|
|
39
|
-
"expo-dev-client": "~0.
|
|
40
|
-
"expo-device": "~4.
|
|
41
|
-
"expo-document-picker": "~10.
|
|
42
|
-
"expo-error-recovery": "~3.
|
|
43
|
-
"expo-face-detector": "~11.
|
|
44
|
-
"expo-facebook": "~12.
|
|
45
|
-
"expo-file-system": "~14.
|
|
46
|
-
"expo-firebase-analytics": "~7.
|
|
47
|
-
"expo-firebase-core": "~5.
|
|
48
|
-
"expo-firebase-recaptcha": "~2.
|
|
49
|
-
"expo-font": "~10.
|
|
50
|
-
"expo-gl": "~11.
|
|
51
|
-
"expo-gl-cpp": "~11.
|
|
18
|
+
"expo-app-loading": "~2.1.0",
|
|
19
|
+
"expo-apple-authentication": "~4.3.0",
|
|
20
|
+
"expo-application": "~4.2.0",
|
|
21
|
+
"expo-asset": "~8.6.0",
|
|
22
|
+
"expo-auth-session": "~3.7.0",
|
|
23
|
+
"expo-av": "~12.0.0",
|
|
24
|
+
"expo-background-fetch": "~10.3.0",
|
|
25
|
+
"expo-barcode-scanner": "~11.4.0",
|
|
26
|
+
"expo-battery": "~6.3.0",
|
|
27
|
+
"expo-blur": "~11.2.0",
|
|
28
|
+
"expo-branch": "~5.3.0",
|
|
29
|
+
"expo-brightness": "~10.3.0",
|
|
30
|
+
"expo-build-properties": "~0.3.0",
|
|
31
|
+
"expo-calendar": "~10.3.0",
|
|
32
|
+
"expo-camera": "~12.3.0",
|
|
33
|
+
"expo-cellular": "~4.3.0",
|
|
34
|
+
"expo-checkbox": "~2.2.0",
|
|
35
|
+
"expo-clipboard": "~3.1.0",
|
|
36
|
+
"expo-constants": "~13.2.0",
|
|
37
|
+
"expo-contacts": "~10.3.0",
|
|
38
|
+
"expo-crypto": "~11.0.0",
|
|
39
|
+
"expo-dev-client": "~1.0.0",
|
|
40
|
+
"expo-device": "~4.3.0",
|
|
41
|
+
"expo-document-picker": "~10.3.0",
|
|
42
|
+
"expo-error-recovery": "~3.2.0",
|
|
43
|
+
"expo-face-detector": "~11.3.0",
|
|
44
|
+
"expo-facebook": "~12.3.0",
|
|
45
|
+
"expo-file-system": "~14.1.0",
|
|
46
|
+
"expo-firebase-analytics": "~7.1.0",
|
|
47
|
+
"expo-firebase-core": "~5.1.0",
|
|
48
|
+
"expo-firebase-recaptcha": "~2.3.0",
|
|
49
|
+
"expo-font": "~10.2.0",
|
|
50
|
+
"expo-gl": "~11.4.0",
|
|
51
|
+
"expo-gl-cpp": "~11.4.0",
|
|
52
52
|
"expo-google-app-auth": "~8.3.0",
|
|
53
|
-
"expo-
|
|
54
|
-
"expo-haptics": "~11.2.0",
|
|
53
|
+
"expo-haptics": "~11.3.0",
|
|
55
54
|
"expo-image-loader": "~3.2.0",
|
|
56
|
-
"expo-image-manipulator": "~10.
|
|
57
|
-
"expo-image-picker": "~13.
|
|
58
|
-
"expo-in-app-purchases": "~13.
|
|
59
|
-
"expo-intent-launcher": "~10.
|
|
60
|
-
"expo-keep-awake": "~10.
|
|
61
|
-
"expo-linear-gradient": "~11.
|
|
62
|
-
"expo-linking": "~3.
|
|
63
|
-
"expo-local-authentication": "~12.
|
|
64
|
-
"expo-localization": "~13.
|
|
65
|
-
"expo-location": "~14.
|
|
66
|
-
"expo-mail-composer": "~11.
|
|
67
|
-
"expo-media-library": "~14.
|
|
68
|
-
"expo-module-template": "~10.
|
|
69
|
-
"expo-modules-core": "~0.
|
|
70
|
-
"expo-navigation-bar": "~1.
|
|
71
|
-
"expo-network": "~4.
|
|
72
|
-
"expo-notifications": "~0.
|
|
55
|
+
"expo-image-manipulator": "~10.4.0",
|
|
56
|
+
"expo-image-picker": "~13.2.0",
|
|
57
|
+
"expo-in-app-purchases": "~13.1.0",
|
|
58
|
+
"expo-intent-launcher": "~10.3.0",
|
|
59
|
+
"expo-keep-awake": "~10.2.0",
|
|
60
|
+
"expo-linear-gradient": "~11.4.0",
|
|
61
|
+
"expo-linking": "~3.2.0",
|
|
62
|
+
"expo-local-authentication": "~12.3.0",
|
|
63
|
+
"expo-localization": "~13.1.0",
|
|
64
|
+
"expo-location": "~14.3.0",
|
|
65
|
+
"expo-mail-composer": "~11.3.0",
|
|
66
|
+
"expo-media-library": "~14.2.0",
|
|
67
|
+
"expo-module-template": "~10.7.0",
|
|
68
|
+
"expo-modules-core": "~0.11.0",
|
|
69
|
+
"expo-navigation-bar": "~1.3.0",
|
|
70
|
+
"expo-network": "~4.3.0",
|
|
71
|
+
"expo-notifications": "~0.16.0",
|
|
73
72
|
"expo-permissions": "~13.2.0",
|
|
74
|
-
"expo-print": "~11.
|
|
75
|
-
"expo-random": "~12.
|
|
76
|
-
"expo-screen-
|
|
77
|
-
"expo-
|
|
78
|
-
"expo-
|
|
79
|
-
"expo-
|
|
73
|
+
"expo-print": "~11.3.0",
|
|
74
|
+
"expo-random": "~12.3.0",
|
|
75
|
+
"expo-screen-capture": "~4.3.0",
|
|
76
|
+
"expo-screen-orientation": "~4.3.0",
|
|
77
|
+
"expo-secure-store": "~11.3.0",
|
|
78
|
+
"expo-sensors": "~11.4.0",
|
|
79
|
+
"expo-sharing": "~10.3.0",
|
|
80
80
|
"expo-sms": "~10.2.0",
|
|
81
|
-
"expo-speech": "~10.
|
|
82
|
-
"expo-splash-screen": "~0.
|
|
83
|
-
"expo-sqlite": "~10.
|
|
84
|
-
"expo-status-bar": "~1.
|
|
85
|
-
"expo-store-review": "~5.
|
|
86
|
-
"expo-system-ui": "~1.
|
|
87
|
-
"expo-task-manager": "~10.
|
|
88
|
-
"expo-tracking-transparency": "~2.
|
|
89
|
-
"expo-updates": "~0.
|
|
90
|
-
"expo-video-thumbnails": "~6.
|
|
91
|
-
"expo-web-browser": "~
|
|
92
|
-
"lottie-react-native": "5.
|
|
81
|
+
"expo-speech": "~10.3.0",
|
|
82
|
+
"expo-splash-screen": "~0.16.0",
|
|
83
|
+
"expo-sqlite": "~10.3.0",
|
|
84
|
+
"expo-status-bar": "~1.4.0",
|
|
85
|
+
"expo-store-review": "~5.3.0",
|
|
86
|
+
"expo-system-ui": "~1.3.0",
|
|
87
|
+
"expo-task-manager": "~10.3.0",
|
|
88
|
+
"expo-tracking-transparency": "~2.3.0",
|
|
89
|
+
"expo-updates": "~0.14.0",
|
|
90
|
+
"expo-video-thumbnails": "~6.4.0",
|
|
91
|
+
"expo-web-browser": "~11.0.0",
|
|
92
|
+
"lottie-react-native": "5.1.3",
|
|
93
93
|
"react": "17.0.2",
|
|
94
94
|
"react-dom": "17.0.2",
|
|
95
95
|
"react-native": "0.68.2",
|
|
96
96
|
"react-native-web": "0.17.7",
|
|
97
|
-
"react-native-branch": "5.
|
|
98
|
-
"react-native-gesture-handler": "~2.
|
|
97
|
+
"react-native-branch": "^5.4.0",
|
|
98
|
+
"react-native-gesture-handler": "~2.5.0",
|
|
99
99
|
"react-native-get-random-values": "~1.8.0",
|
|
100
|
-
"react-native-maps": "0.
|
|
101
|
-
"react-native-pager-view": "5.4.
|
|
102
|
-
"react-native-reanimated": "~2.
|
|
103
|
-
"react-native-safe-area-context": "4.
|
|
104
|
-
"react-native-screens": "~3.
|
|
100
|
+
"react-native-maps": "0.31.1",
|
|
101
|
+
"react-native-pager-view": "5.4.24",
|
|
102
|
+
"react-native-reanimated": "~2.9.1",
|
|
103
|
+
"react-native-safe-area-context": "4.3.1",
|
|
104
|
+
"react-native-screens": "~3.14.1",
|
|
105
105
|
"react-native-shared-element": "0.8.4",
|
|
106
106
|
"react-native-svg": "12.3.0",
|
|
107
|
-
"react-native-view-shot": "3.
|
|
108
|
-
"react-native-webview": "11.
|
|
107
|
+
"react-native-view-shot": "3.3.0",
|
|
108
|
+
"react-native-webview": "11.22.4",
|
|
109
109
|
"sentry-expo": "^4.0.0",
|
|
110
110
|
"unimodules-app-loader": "~3.1.0",
|
|
111
|
-
"unimodules-image-loader-interface": "~6.1.0"
|
|
111
|
+
"unimodules-image-loader-interface": "~6.1.0",
|
|
112
|
+
"@shopify/react-native-skia": "0.1.134",
|
|
113
|
+
"@shopify/flash-list": "1.1.0"
|
|
112
114
|
}
|
package/expo-module.config.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "46.0.0-alpha.0",
|
|
4
4
|
"description": "The Expo SDK",
|
|
5
5
|
"main": "build/Expo.js",
|
|
6
6
|
"module": "build/Expo.js",
|
|
@@ -54,18 +54,18 @@
|
|
|
54
54
|
"homepage": "https://github.com/expo/expo/tree/main/packages/expo",
|
|
55
55
|
"dependencies": {
|
|
56
56
|
"@babel/runtime": "^7.14.0",
|
|
57
|
-
"@expo/cli": "0.
|
|
57
|
+
"@expo/cli": "0.2.0",
|
|
58
58
|
"@expo/vector-icons": "^13.0.0",
|
|
59
|
-
"babel-preset-expo": "~9.
|
|
59
|
+
"babel-preset-expo": "~9.2.0",
|
|
60
60
|
"cross-spawn": "^6.0.5",
|
|
61
|
-
"expo-application": "~4.
|
|
62
|
-
"expo-asset": "~8.
|
|
63
|
-
"expo-constants": "~13.
|
|
64
|
-
"expo-file-system": "~14.
|
|
65
|
-
"expo-font": "~10.
|
|
66
|
-
"expo-keep-awake": "~10.
|
|
67
|
-
"expo-modules-autolinking": "0.
|
|
68
|
-
"expo-modules-core": "0.
|
|
61
|
+
"expo-application": "~4.2.0",
|
|
62
|
+
"expo-asset": "~8.6.0",
|
|
63
|
+
"expo-constants": "~13.2.0",
|
|
64
|
+
"expo-file-system": "~14.1.0",
|
|
65
|
+
"expo-font": "~10.2.0",
|
|
66
|
+
"expo-keep-awake": "~10.2.0",
|
|
67
|
+
"expo-modules-autolinking": "0.10.0",
|
|
68
|
+
"expo-modules-core": "0.11.0",
|
|
69
69
|
"fbemitter": "^3.0.0",
|
|
70
70
|
"getenv": "^1.0.0",
|
|
71
71
|
"invariant": "^2.2.4",
|
|
@@ -75,19 +75,19 @@
|
|
|
75
75
|
"uuid": "^3.4.0"
|
|
76
76
|
},
|
|
77
77
|
"optionalDependencies": {
|
|
78
|
-
"expo-error-recovery": "~3.
|
|
78
|
+
"expo-error-recovery": "~3.2.0"
|
|
79
79
|
},
|
|
80
80
|
"devDependencies": {
|
|
81
81
|
"@types/fbemitter": "^2.0.32",
|
|
82
82
|
"@types/invariant": "^2.2.33",
|
|
83
|
-
"@types/react": "~
|
|
84
|
-
"@types/react-native": "~0.
|
|
85
|
-
"@types/react-test-renderer": "^
|
|
83
|
+
"@types/react": "~18.0.14",
|
|
84
|
+
"@types/react-native": "~0.69.1",
|
|
85
|
+
"@types/react-test-renderer": "^18.0.0",
|
|
86
86
|
"@types/uuid": "^3.4.7",
|
|
87
87
|
"expo-module-scripts": "^2.0.0",
|
|
88
|
-
"react": "
|
|
89
|
-
"react-dom": "
|
|
90
|
-
"react-native": "0.
|
|
88
|
+
"react": "18.0.0",
|
|
89
|
+
"react-dom": "18.0.0",
|
|
90
|
+
"react-native": "0.69.1"
|
|
91
91
|
},
|
|
92
|
-
"gitHead": "
|
|
92
|
+
"gitHead": "6e131f2da851a47c3a24eb3d6fc971a1a7822086"
|
|
93
93
|
}
|
package/react-native.config.js
CHANGED
|
@@ -3,10 +3,7 @@ const path = require('path');
|
|
|
3
3
|
module.exports = {
|
|
4
4
|
dependency: {
|
|
5
5
|
platforms: {
|
|
6
|
-
ios: {
|
|
7
|
-
podspecPath: path.join(__dirname, 'ios/Expo.podspec'),
|
|
8
|
-
project: 'ios/Expo.xcodeproj',
|
|
9
|
-
},
|
|
6
|
+
ios: {},
|
|
10
7
|
android: {
|
|
11
8
|
packageImportPath: 'import expo.modules.ExpoModulesPackage;',
|
|
12
9
|
},
|
package/scripts/autolinking.rb
CHANGED
|
@@ -16,6 +16,10 @@ def use_expo_modules!(options = {})
|
|
|
16
16
|
@current_target_definition.autolinking_manager = Expo::AutolinkingManager.new(self, @current_target_definition, options).use_expo_modules!
|
|
17
17
|
end
|
|
18
18
|
|
|
19
|
+
def use_expo_modules_tests!(options = {})
|
|
20
|
+
use_expo_modules!({ testsOnly: true }.merge(options))
|
|
21
|
+
end
|
|
22
|
+
|
|
19
23
|
def expo_patch_react_imports!(installer, options = {})
|
|
20
24
|
unless installer.is_a?(Pod::Installer)
|
|
21
25
|
Pod::UI.warn 'expo_patch_react_imports!() - Invalid `installer` parameter'.red
|
package/ios/Expo.podspec
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
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
|