expo 55.0.0-canary-20251008-f2d1b4a → 55.0.0-canary-20251013-623c5a6
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/Expo.podspec +0 -1
- package/android/build.gradle +2 -2
- package/android/src/main/java/expo/modules/ExpoReactHostFactory.kt +2 -16
- package/android/src/main/java/expo/modules/ReactActivityDelegateWrapper.kt +0 -25
- package/build/async-require/hmr.d.ts +7 -7
- package/build/async-require/hmr.d.ts.map +1 -1
- package/build/dom/internal.d.ts +0 -1
- package/build/dom/internal.d.ts.map +1 -1
- package/build/dom/webview-wrapper.d.ts +2 -2
- package/build/dom/webview-wrapper.d.ts.map +1 -1
- package/bundledNativeModules.json +79 -79
- package/package.json +19 -20
- package/src/async-require/hmr.ts +59 -55
- package/src/dom/dom-entry.tsx +6 -6
- package/src/dom/internal.ts +0 -2
- package/src/dom/webview-wrapper.tsx +4 -7
- package/template.tgz +0 -0
- package/android/src/main/java/expo/modules/ExpoBridgelessDevSupportManager.kt +0 -137
- package/android/src/main/java/expo/modules/ExpoDevSupportManagerFactory.kt +0 -149
- package/build/dom/dom-internal.types.d.ts +0 -11
- package/build/dom/dom-internal.types.d.ts.map +0 -1
- package/src/dom/dom-internal.types.ts +0 -9
package/Expo.podspec
CHANGED
package/android/build.gradle
CHANGED
|
@@ -32,7 +32,7 @@ buildscript {
|
|
|
32
32
|
def reactNativeVersion = project.extensions.getByType(ExpoModuleExtension).reactNativeVersion
|
|
33
33
|
|
|
34
34
|
group = 'host.exp.exponent'
|
|
35
|
-
version = '55.0.0-canary-
|
|
35
|
+
version = '55.0.0-canary-20251013-623c5a6'
|
|
36
36
|
|
|
37
37
|
expoModule {
|
|
38
38
|
// We can't prebuild the module because it depends on the generated files.
|
|
@@ -43,7 +43,7 @@ android {
|
|
|
43
43
|
namespace "expo.core"
|
|
44
44
|
defaultConfig {
|
|
45
45
|
versionCode 1
|
|
46
|
-
versionName "55.0.0-canary-
|
|
46
|
+
versionName "55.0.0-canary-20251013-623c5a6"
|
|
47
47
|
consumerProguardFiles("proguard-rules.pro")
|
|
48
48
|
}
|
|
49
49
|
testOptions {
|
|
@@ -20,10 +20,7 @@ import com.facebook.react.runtime.ReactHostDelegate
|
|
|
20
20
|
import com.facebook.react.runtime.ReactHostImpl
|
|
21
21
|
import com.facebook.react.runtime.hermes.HermesInstance
|
|
22
22
|
import expo.modules.core.interfaces.ReactNativeHostHandler
|
|
23
|
-
import com.facebook.react.runtime.internal.bolts.Task
|
|
24
23
|
import java.lang.ref.WeakReference
|
|
25
|
-
import java.util.concurrent.Executors
|
|
26
|
-
import expo.modules.logbox.ExpoLogBoxBuildConfig
|
|
27
24
|
|
|
28
25
|
object ExpoReactHostFactory {
|
|
29
26
|
private var reactHost: ReactHost? = null
|
|
@@ -128,25 +125,14 @@ object ExpoReactHostFactory {
|
|
|
128
125
|
handler.onWillCreateReactInstance(useDevSupport)
|
|
129
126
|
}
|
|
130
127
|
|
|
131
|
-
val reactHostImpl =
|
|
132
|
-
|
|
133
|
-
context,
|
|
134
|
-
reactHostDelegate,
|
|
135
|
-
componentFactory,
|
|
136
|
-
Executors.newSingleThreadExecutor(),
|
|
137
|
-
Task.UI_THREAD_EXECUTOR,
|
|
138
|
-
allowPackagerServerAccess = true,
|
|
139
|
-
useDevSupport = true,
|
|
140
|
-
devSupportManagerFactory = ExpoDefaultDevSupportManagerFactory()
|
|
141
|
-
)
|
|
142
|
-
else -> ReactHostImpl(
|
|
128
|
+
val reactHostImpl =
|
|
129
|
+
ReactHostImpl(
|
|
143
130
|
context,
|
|
144
131
|
reactHostDelegate,
|
|
145
132
|
componentFactory,
|
|
146
133
|
true,
|
|
147
134
|
useDevSupport
|
|
148
135
|
)
|
|
149
|
-
}
|
|
150
136
|
|
|
151
137
|
hostHandlers.forEach { handler ->
|
|
152
138
|
handler.onDidCreateDevSupportManager(reactHostImpl.devSupportManager)
|
|
@@ -12,7 +12,6 @@ import android.os.Bundle
|
|
|
12
12
|
import android.util.Log
|
|
13
13
|
import android.view.KeyEvent
|
|
14
14
|
import android.view.ViewGroup
|
|
15
|
-
import android.view.Window
|
|
16
15
|
import androidx.annotation.VisibleForTesting
|
|
17
16
|
import androidx.collection.ArrayMap
|
|
18
17
|
import androidx.lifecycle.lifecycleScope
|
|
@@ -148,11 +147,6 @@ class ReactActivityDelegateWrapper(
|
|
|
148
147
|
activity.window.colorMode = ActivityInfo.COLOR_MODE_WIDE_COLOR_GAMUT
|
|
149
148
|
}
|
|
150
149
|
|
|
151
|
-
val edgeToEdgeEnabled = invokeWindowUtilKtMethod<Boolean>("isEdgeToEdgeFeatureFlagOn") ?: true
|
|
152
|
-
if (edgeToEdgeEnabled) {
|
|
153
|
-
invokeWindowUtilKtMethod<Unit>("enableEdgeToEdge", Pair(Window::class.java, plainActivity.window))
|
|
154
|
-
}
|
|
155
|
-
|
|
156
150
|
val launchOptions = composeLaunchOptions()
|
|
157
151
|
val reactDelegate: ReactDelegate
|
|
158
152
|
if (ReactNativeFeatureFlags.enableBridgelessArchitecture) {
|
|
@@ -424,25 +418,6 @@ class ReactActivityDelegateWrapper(
|
|
|
424
418
|
return method!!.invoke(delegate, *args) as T
|
|
425
419
|
}
|
|
426
420
|
|
|
427
|
-
private inline fun <reified T> invokeWindowUtilKtMethod(
|
|
428
|
-
methodName: String,
|
|
429
|
-
vararg args: Pair<Class<*>, Any?>
|
|
430
|
-
): T? {
|
|
431
|
-
val windowUtilClassName = "com.facebook.react.views.view.WindowUtilKt"
|
|
432
|
-
|
|
433
|
-
return runCatching {
|
|
434
|
-
val windowUtilKtClass = Class.forName(windowUtilClassName)
|
|
435
|
-
val parameterTypes = args.map { it.first }.toTypedArray()
|
|
436
|
-
val parameterValues = args.map { it.second }.toTypedArray()
|
|
437
|
-
val method = windowUtilKtClass.getDeclaredMethod(methodName, *parameterTypes)
|
|
438
|
-
|
|
439
|
-
method.isAccessible = true
|
|
440
|
-
method.invoke(null, *parameterValues) as? T
|
|
441
|
-
}.onFailure {
|
|
442
|
-
Log.e(TAG, "Failed to invoke '$methodName' on $windowUtilClassName", it)
|
|
443
|
-
}.getOrNull()
|
|
444
|
-
}
|
|
445
|
-
|
|
446
421
|
private suspend fun loadAppImpl(appKey: String?, supportsDelayLoad: Boolean) {
|
|
447
422
|
// Give modules a chance to wrap the ReactRootView in a container ViewGroup. If some module
|
|
448
423
|
// wants to do this, we override the functionality of `loadApp` and call `setContentView` with
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
type LogLevel = 'trace' | 'info' | 'warn' | 'error' | 'log' | 'group' | 'groupCollapsed' | 'groupEnd' | 'debug';
|
|
2
|
-
|
|
3
|
-
* HMR Client that receives from the server HMR updates and propagates them
|
|
4
|
-
* runtime to reflects those changes.
|
|
5
|
-
*/
|
|
6
|
-
declare const HMRClient: {
|
|
2
|
+
export type HMRClientNativeInterface = {
|
|
7
3
|
enable(): void;
|
|
8
4
|
disable(): void;
|
|
9
5
|
registerBundle(requestUrl: string): void;
|
|
10
6
|
log(level: LogLevel, data: any[]): void;
|
|
11
|
-
setup(
|
|
7
|
+
setup(props: {
|
|
12
8
|
isEnabled: boolean;
|
|
13
9
|
}): void;
|
|
14
|
-
_onMetroError(data: unknown): void;
|
|
15
10
|
};
|
|
11
|
+
/**
|
|
12
|
+
* HMR Client that receives from the server HMR updates and propagates them
|
|
13
|
+
* runtime to reflects those changes.
|
|
14
|
+
*/
|
|
15
|
+
declare const HMRClient: HMRClientNativeInterface;
|
|
16
16
|
export default HMRClient;
|
|
17
17
|
//# sourceMappingURL=hmr.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hmr.d.ts","sourceRoot":"","sources":["../../src/async-require/hmr.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"hmr.d.ts","sourceRoot":"","sources":["../../src/async-require/hmr.ts"],"names":[],"mappings":"AA4CA,KAAK,QAAQ,GACT,OAAO,GACP,MAAM,GACN,MAAM,GACN,OAAO,GACP,KAAK,GACL,OAAO,GACP,gBAAgB,GAChB,UAAU,GACV,OAAO,CAAC;AAEZ,MAAM,MAAM,wBAAwB,GAAG;IACrC,MAAM,IAAI,IAAI,CAAC;IACf,OAAO,IAAI,IAAI,CAAC;IAChB,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IACzC,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;IACxC,KAAK,CAAC,KAAK,EAAE;QAAE,SAAS,EAAE,OAAO,CAAA;KAAE,GAAG,IAAI,CAAC;CAC5C,CAAC;AAMF;;;GAGG;AACH,QAAA,MAAM,SAAS,EAAE,wBAsMhB,CAAC;AAuEF,eAAe,SAAS,CAAC"}
|
package/build/dom/internal.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../src/dom/internal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../src/dom/internal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAGvD,eAAO,MAAM,oBAAoB,EAAE,SAAS,GAAG,cAAc,aAAa,EAAE,oBACjE,CAAC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import type { DOMProps } from './dom.types';
|
|
3
3
|
import ExpoDomWebView from './webview/ExpoDOMWebView';
|
|
4
4
|
import RNWebView from './webview/RNWebView';
|
|
5
5
|
type RawWebViewProps = React.ComponentProps<Exclude<typeof ExpoDomWebView, undefined>> & React.ComponentProps<Exclude<typeof RNWebView, undefined>>;
|
|
6
6
|
interface Props {
|
|
7
7
|
children?: any;
|
|
8
|
-
dom?:
|
|
8
|
+
dom?: DOMProps;
|
|
9
9
|
filePath: string;
|
|
10
10
|
ref: React.Ref<object>;
|
|
11
11
|
[propName: string]: unknown;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webview-wrapper.d.ts","sourceRoot":"","sources":["../../src/dom/webview-wrapper.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,
|
|
1
|
+
{"version":3,"file":"webview-wrapper.d.ts","sourceRoot":"","sources":["../../src/dom/webview-wrapper.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,KAAK,EAAiB,QAAQ,EAA4B,MAAM,aAAa,CAAC;AAUrF,OAAO,cAAc,MAAM,0BAA0B,CAAC;AACtD,OAAO,SAAS,MAAM,qBAAqB,CAAC;AAG5C,KAAK,eAAe,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,OAAO,cAAc,EAAE,SAAS,CAAC,CAAC,GACpF,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,OAAO,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC;AAE7D,UAAU,KAAK;IACb,QAAQ,CAAC,EAAE,GAAG,CAAC;IACf,GAAG,CAAC,EAAE,QAAQ,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,GAAG,EAAE,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACvB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC7B;AAED,QAAA,MAAM,UAAU,mFAgMd,CAAC;AAiBH,wBAAgB,cAAc,CAC5B,iBAAiB,EAAE,OAAO,GACzB,KAAK,CAAC,yBAAyB,CAAC,eAAe,CAAC,CASlD;AAED,eAAe,UAAU,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
|
-
"@expo/fingerprint": "0.15.2-canary-
|
|
3
|
-
"@expo/metro-runtime": "6.1.3-canary-
|
|
2
|
+
"@expo/fingerprint": "0.15.2-canary-20251013-623c5a6",
|
|
3
|
+
"@expo/metro-runtime": "6.1.3-canary-20251013-623c5a6",
|
|
4
4
|
"@expo/vector-icons": "^15.0.2",
|
|
5
|
-
"@expo/ui": "0.2.0-canary-
|
|
5
|
+
"@expo/ui": "0.2.0-canary-20251013-623c5a6",
|
|
6
6
|
"@react-native-async-storage/async-storage": "2.2.0",
|
|
7
7
|
"@react-native-community/datetimepicker": "8.4.4",
|
|
8
8
|
"@react-native-masked-view/masked-view": "0.3.2",
|
|
@@ -12,88 +12,88 @@
|
|
|
12
12
|
"@react-native-picker/picker": "2.11.2",
|
|
13
13
|
"@react-native-segmented-control/segmented-control": "2.5.7",
|
|
14
14
|
"@stripe/stripe-react-native": "0.50.3",
|
|
15
|
-
"eslint-config-expo": "10.0.1-canary-
|
|
15
|
+
"eslint-config-expo": "10.0.1-canary-20251013-623c5a6",
|
|
16
16
|
"expo-analytics-amplitude": "~11.3.0",
|
|
17
17
|
"expo-app-auth": "~11.1.0",
|
|
18
18
|
"expo-app-loader-provider": "~8.0.0",
|
|
19
|
-
"expo-apple-authentication": "8.0.8-canary-
|
|
20
|
-
"expo-application": "7.0.8-canary-
|
|
21
|
-
"expo-asset": "12.0.10-canary-
|
|
22
|
-
"expo-audio": "1.1.0-canary-
|
|
23
|
-
"expo-auth-session": "7.0.9-canary-
|
|
24
|
-
"expo-av": "16.0.8-canary-
|
|
25
|
-
"expo-background-fetch": "14.0.8-canary-
|
|
26
|
-
"expo-background-task": "1.0.9-canary-
|
|
27
|
-
"expo-battery": "10.0.8-canary-
|
|
28
|
-
"expo-blur": "
|
|
29
|
-
"expo-brightness": "15.0.0-canary-
|
|
30
|
-
"expo-build-properties": "1.0.10-canary-
|
|
31
|
-
"expo-calendar": "15.0.8-canary-
|
|
32
|
-
"expo-camera": "17.0.9-canary-
|
|
33
|
-
"expo-cellular": "8.0.8-canary-
|
|
34
|
-
"expo-checkbox": "5.0.8-canary-
|
|
35
|
-
"expo-clipboard": "8.0.8-canary-
|
|
36
|
-
"expo-constants": "18.0.10-canary-
|
|
37
|
-
"expo-contacts": "15.0.10-canary-
|
|
38
|
-
"expo-crypto": "15.0.8-canary-
|
|
39
|
-
"expo-dev-client": "6.0.
|
|
40
|
-
"expo-device": "8.0.10-canary-
|
|
41
|
-
"expo-document-picker": "14.0.8-canary-
|
|
42
|
-
"expo-file-system": "19.0.
|
|
43
|
-
"expo-font": "14.0.
|
|
44
|
-
"expo-gl": "16.0.8-canary-
|
|
45
|
-
"expo-glass-effect": "0.1.5-canary-
|
|
19
|
+
"expo-apple-authentication": "8.0.8-canary-20251013-623c5a6",
|
|
20
|
+
"expo-application": "7.0.8-canary-20251013-623c5a6",
|
|
21
|
+
"expo-asset": "12.0.10-canary-20251013-623c5a6",
|
|
22
|
+
"expo-audio": "1.1.0-canary-20251013-623c5a6",
|
|
23
|
+
"expo-auth-session": "7.0.9-canary-20251013-623c5a6",
|
|
24
|
+
"expo-av": "16.0.8-canary-20251013-623c5a6",
|
|
25
|
+
"expo-background-fetch": "14.0.8-canary-20251013-623c5a6",
|
|
26
|
+
"expo-background-task": "1.0.9-canary-20251013-623c5a6",
|
|
27
|
+
"expo-battery": "10.0.8-canary-20251013-623c5a6",
|
|
28
|
+
"expo-blur": "16.0.0-canary-20251013-623c5a6",
|
|
29
|
+
"expo-brightness": "15.0.0-canary-20251013-623c5a6",
|
|
30
|
+
"expo-build-properties": "1.0.10-canary-20251013-623c5a6",
|
|
31
|
+
"expo-calendar": "15.0.8-canary-20251013-623c5a6",
|
|
32
|
+
"expo-camera": "17.0.9-canary-20251013-623c5a6",
|
|
33
|
+
"expo-cellular": "8.0.8-canary-20251013-623c5a6",
|
|
34
|
+
"expo-checkbox": "5.0.8-canary-20251013-623c5a6",
|
|
35
|
+
"expo-clipboard": "8.0.8-canary-20251013-623c5a6",
|
|
36
|
+
"expo-constants": "18.0.10-canary-20251013-623c5a6",
|
|
37
|
+
"expo-contacts": "15.0.10-canary-20251013-623c5a6",
|
|
38
|
+
"expo-crypto": "15.0.8-canary-20251013-623c5a6",
|
|
39
|
+
"expo-dev-client": "6.0.16-canary-20251013-623c5a6",
|
|
40
|
+
"expo-device": "8.0.10-canary-20251013-623c5a6",
|
|
41
|
+
"expo-document-picker": "14.0.8-canary-20251013-623c5a6",
|
|
42
|
+
"expo-file-system": "19.0.18-canary-20251013-623c5a6",
|
|
43
|
+
"expo-font": "14.0.10-canary-20251013-623c5a6",
|
|
44
|
+
"expo-gl": "16.0.8-canary-20251013-623c5a6",
|
|
45
|
+
"expo-glass-effect": "0.1.5-canary-20251013-623c5a6",
|
|
46
46
|
"expo-google-app-auth": "~8.3.0",
|
|
47
|
-
"expo-haptics": "15.0.8-canary-
|
|
48
|
-
"expo-image": "3.1.0-canary-
|
|
49
|
-
"expo-image-loader": "6.0.1-canary-
|
|
50
|
-
"expo-image-manipulator": "14.0.8-canary-
|
|
51
|
-
"expo-image-picker": "17.0.9-canary-
|
|
52
|
-
"expo-intent-launcher": "13.0.8-canary-
|
|
53
|
-
"expo-insights": "0.10.8-canary-
|
|
54
|
-
"expo-keep-awake": "15.0.8-canary-
|
|
55
|
-
"expo-linear-gradient": "15.0.8-canary-
|
|
56
|
-
"expo-linking": "8.0.9-canary-
|
|
57
|
-
"expo-local-authentication": "17.0.8-canary-
|
|
58
|
-
"expo-localization": "17.0.8-canary-
|
|
59
|
-
"expo-location": "19.0.8-canary-
|
|
60
|
-
"expo-mail-composer": "15.0.8-canary-
|
|
61
|
-
"expo-manifests": "1.0.9-canary-
|
|
62
|
-
"expo-maps": "0.12.9-canary-
|
|
63
|
-
"expo-media-library": "18.3.0-canary-
|
|
64
|
-
"expo-mesh-gradient": "0.4.8-canary-
|
|
65
|
-
"expo-module-template": "11.0.16-canary-
|
|
66
|
-
"expo-modules-core": "3.1.0-canary-
|
|
67
|
-
"expo-navigation-bar": "5.0.9-canary-
|
|
68
|
-
"expo-network": "8.0.8-canary-
|
|
69
|
-
"expo-notifications": "1.0.0-canary-
|
|
70
|
-
"expo-print": "15.0.8-canary-
|
|
71
|
-
"expo-live-photo": "1.0.8-canary-
|
|
72
|
-
"expo-router": "6.1.0-canary-
|
|
73
|
-
"expo-screen-capture": "8.0.9-canary-
|
|
74
|
-
"expo-screen-orientation": "9.0.8-canary-
|
|
75
|
-
"expo-secure-store": "15.0.8-canary-
|
|
76
|
-
"expo-sensors": "15.0.8-canary-
|
|
77
|
-
"expo-sharing": "14.0.8-canary-
|
|
78
|
-
"expo-sms": "14.0.8-canary-
|
|
79
|
-
"expo-speech": "14.0.8-canary-
|
|
80
|
-
"expo-splash-screen": "31.0.11-canary-
|
|
81
|
-
"expo-sqlite": "16.0.9-canary-
|
|
82
|
-
"expo-status-bar": "3.0.9-canary-
|
|
83
|
-
"expo-store-review": "9.0.9-canary-
|
|
84
|
-
"expo-symbols": "1.1.0-canary-
|
|
85
|
-
"expo-system-ui": "6.0.8-canary-
|
|
86
|
-
"expo-task-manager": "14.0.8-canary-
|
|
87
|
-
"expo-tracking-transparency": "6.0.8-canary-
|
|
88
|
-
"expo-updates": "29.1.0-canary-
|
|
89
|
-
"expo-video-thumbnails": "10.0.8-canary-
|
|
90
|
-
"expo-video": "3.0.12-canary-
|
|
91
|
-
"expo-web-browser": "15.0.9-canary-
|
|
92
|
-
"jest-expo": "55.0.0-canary-
|
|
47
|
+
"expo-haptics": "15.0.8-canary-20251013-623c5a6",
|
|
48
|
+
"expo-image": "3.1.0-canary-20251013-623c5a6",
|
|
49
|
+
"expo-image-loader": "6.0.1-canary-20251013-623c5a6",
|
|
50
|
+
"expo-image-manipulator": "14.0.8-canary-20251013-623c5a6",
|
|
51
|
+
"expo-image-picker": "17.0.9-canary-20251013-623c5a6",
|
|
52
|
+
"expo-intent-launcher": "13.0.8-canary-20251013-623c5a6",
|
|
53
|
+
"expo-insights": "0.10.8-canary-20251013-623c5a6",
|
|
54
|
+
"expo-keep-awake": "15.0.8-canary-20251013-623c5a6",
|
|
55
|
+
"expo-linear-gradient": "15.0.8-canary-20251013-623c5a6",
|
|
56
|
+
"expo-linking": "8.0.9-canary-20251013-623c5a6",
|
|
57
|
+
"expo-local-authentication": "17.0.8-canary-20251013-623c5a6",
|
|
58
|
+
"expo-localization": "17.0.8-canary-20251013-623c5a6",
|
|
59
|
+
"expo-location": "19.0.8-canary-20251013-623c5a6",
|
|
60
|
+
"expo-mail-composer": "15.0.8-canary-20251013-623c5a6",
|
|
61
|
+
"expo-manifests": "1.0.9-canary-20251013-623c5a6",
|
|
62
|
+
"expo-maps": "0.12.9-canary-20251013-623c5a6",
|
|
63
|
+
"expo-media-library": "18.3.0-canary-20251013-623c5a6",
|
|
64
|
+
"expo-mesh-gradient": "0.4.8-canary-20251013-623c5a6",
|
|
65
|
+
"expo-module-template": "11.0.16-canary-20251013-623c5a6",
|
|
66
|
+
"expo-modules-core": "3.1.0-canary-20251013-623c5a6",
|
|
67
|
+
"expo-navigation-bar": "5.0.9-canary-20251013-623c5a6",
|
|
68
|
+
"expo-network": "8.0.8-canary-20251013-623c5a6",
|
|
69
|
+
"expo-notifications": "1.0.0-canary-20251013-623c5a6",
|
|
70
|
+
"expo-print": "15.0.8-canary-20251013-623c5a6",
|
|
71
|
+
"expo-live-photo": "1.0.8-canary-20251013-623c5a6",
|
|
72
|
+
"expo-router": "6.1.0-canary-20251013-623c5a6",
|
|
73
|
+
"expo-screen-capture": "8.0.9-canary-20251013-623c5a6",
|
|
74
|
+
"expo-screen-orientation": "9.0.8-canary-20251013-623c5a6",
|
|
75
|
+
"expo-secure-store": "15.0.8-canary-20251013-623c5a6",
|
|
76
|
+
"expo-sensors": "15.0.8-canary-20251013-623c5a6",
|
|
77
|
+
"expo-sharing": "14.0.8-canary-20251013-623c5a6",
|
|
78
|
+
"expo-sms": "14.0.8-canary-20251013-623c5a6",
|
|
79
|
+
"expo-speech": "14.0.8-canary-20251013-623c5a6",
|
|
80
|
+
"expo-splash-screen": "31.0.11-canary-20251013-623c5a6",
|
|
81
|
+
"expo-sqlite": "16.0.9-canary-20251013-623c5a6",
|
|
82
|
+
"expo-status-bar": "3.0.9-canary-20251013-623c5a6",
|
|
83
|
+
"expo-store-review": "9.0.9-canary-20251013-623c5a6",
|
|
84
|
+
"expo-symbols": "1.1.0-canary-20251013-623c5a6",
|
|
85
|
+
"expo-system-ui": "6.0.8-canary-20251013-623c5a6",
|
|
86
|
+
"expo-task-manager": "14.0.8-canary-20251013-623c5a6",
|
|
87
|
+
"expo-tracking-transparency": "6.0.8-canary-20251013-623c5a6",
|
|
88
|
+
"expo-updates": "29.1.0-canary-20251013-623c5a6",
|
|
89
|
+
"expo-video-thumbnails": "10.0.8-canary-20251013-623c5a6",
|
|
90
|
+
"expo-video": "3.0.12-canary-20251013-623c5a6",
|
|
91
|
+
"expo-web-browser": "15.0.9-canary-20251013-623c5a6",
|
|
92
|
+
"jest-expo": "55.0.0-canary-20251013-623c5a6",
|
|
93
93
|
"lottie-react-native": "~7.3.1",
|
|
94
94
|
"react": "19.1.1",
|
|
95
95
|
"react-dom": "19.1.1",
|
|
96
|
-
"react-native": "0.82.0
|
|
96
|
+
"react-native": "0.82.0",
|
|
97
97
|
"react-native-web": "~0.21.0",
|
|
98
98
|
"react-native-gesture-handler": "~2.28.0",
|
|
99
99
|
"react-native-get-random-values": "~1.11.0",
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
"react-native-view-shot": "4.0.3",
|
|
109
109
|
"react-native-webview": "13.15.0",
|
|
110
110
|
"sentry-expo": "~7.0.0",
|
|
111
|
-
"unimodules-app-loader": "6.0.8-canary-
|
|
111
|
+
"unimodules-app-loader": "6.0.8-canary-20251013-623c5a6",
|
|
112
112
|
"unimodules-image-loader-interface": "~6.1.0",
|
|
113
113
|
"@shopify/react-native-skia": "2.2.12",
|
|
114
114
|
"@shopify/flash-list": "2.0.2",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo",
|
|
3
|
-
"version": "55.0.0-canary-
|
|
3
|
+
"version": "55.0.0-canary-20251013-623c5a6",
|
|
4
4
|
"description": "The Expo SDK",
|
|
5
5
|
"main": "src/Expo.ts",
|
|
6
6
|
"module": "src/Expo.ts",
|
|
@@ -75,24 +75,23 @@
|
|
|
75
75
|
"homepage": "https://github.com/expo/expo/tree/main/packages/expo",
|
|
76
76
|
"dependencies": {
|
|
77
77
|
"@babel/runtime": "^7.20.0",
|
|
78
|
-
"@expo/cli": "54.1.0-canary-
|
|
79
|
-
"@expo/config": "12.0.11-canary-
|
|
80
|
-
"@expo/config-plugins": "54.0.3-canary-
|
|
81
|
-
"@expo/devtools": "0.1.8-canary-
|
|
82
|
-
"@expo/fingerprint": "0.15.2-canary-
|
|
78
|
+
"@expo/cli": "54.1.0-canary-20251013-623c5a6",
|
|
79
|
+
"@expo/config": "12.0.11-canary-20251013-623c5a6",
|
|
80
|
+
"@expo/config-plugins": "54.0.3-canary-20251013-623c5a6",
|
|
81
|
+
"@expo/devtools": "0.1.8-canary-20251013-623c5a6",
|
|
82
|
+
"@expo/fingerprint": "0.15.2-canary-20251013-623c5a6",
|
|
83
83
|
"@expo/metro": "~54.0.0",
|
|
84
|
-
"@expo/metro-config": "54.0.7-canary-
|
|
84
|
+
"@expo/metro-config": "54.0.7-canary-20251013-623c5a6",
|
|
85
85
|
"@expo/vector-icons": "^15.0.2",
|
|
86
|
-
"@expo/log-box": "0.0.13-canary-20251008-f2d1b4a",
|
|
87
86
|
"@ungap/structured-clone": "^1.3.0",
|
|
88
|
-
"babel-preset-expo": "54.0.
|
|
89
|
-
"expo-asset": "12.0.10-canary-
|
|
90
|
-
"expo-constants": "18.0.10-canary-
|
|
91
|
-
"expo-file-system": "19.0.
|
|
92
|
-
"expo-font": "14.0.
|
|
93
|
-
"expo-keep-awake": "15.0.8-canary-
|
|
94
|
-
"expo-modules-autolinking": "3.1.0-canary-
|
|
95
|
-
"expo-modules-core": "3.1.0-canary-
|
|
87
|
+
"babel-preset-expo": "54.0.5-canary-20251013-623c5a6",
|
|
88
|
+
"expo-asset": "12.0.10-canary-20251013-623c5a6",
|
|
89
|
+
"expo-constants": "18.0.10-canary-20251013-623c5a6",
|
|
90
|
+
"expo-file-system": "19.0.18-canary-20251013-623c5a6",
|
|
91
|
+
"expo-font": "14.0.10-canary-20251013-623c5a6",
|
|
92
|
+
"expo-keep-awake": "15.0.8-canary-20251013-623c5a6",
|
|
93
|
+
"expo-modules-autolinking": "3.1.0-canary-20251013-623c5a6",
|
|
94
|
+
"expo-modules-core": "3.1.0-canary-20251013-623c5a6",
|
|
96
95
|
"pretty-format": "^29.7.0",
|
|
97
96
|
"react-refresh": "^0.14.2",
|
|
98
97
|
"whatwg-url-without-unicode": "8.0.0-3"
|
|
@@ -101,15 +100,15 @@
|
|
|
101
100
|
"@types/node": "^22.14.0",
|
|
102
101
|
"@types/react": "~19.1.10",
|
|
103
102
|
"@types/react-test-renderer": "~19.1.0",
|
|
104
|
-
"expo-module-scripts": "5.0.8-canary-
|
|
103
|
+
"expo-module-scripts": "5.0.8-canary-20251013-623c5a6",
|
|
105
104
|
"react": "19.1.1",
|
|
106
105
|
"react-dom": "19.1.1",
|
|
107
|
-
"react-native": "0.82.0
|
|
106
|
+
"react-native": "0.82.0",
|
|
108
107
|
"web-streams-polyfill": "^3.3.2"
|
|
109
108
|
},
|
|
110
109
|
"peerDependencies": {
|
|
111
|
-
"@expo/dom-webview": "0.2.8-canary-
|
|
112
|
-
"@expo/metro-runtime": "6.1.3-canary-
|
|
110
|
+
"@expo/dom-webview": "0.2.8-canary-20251013-623c5a6",
|
|
111
|
+
"@expo/metro-runtime": "6.1.3-canary-20251013-623c5a6",
|
|
113
112
|
"react": "*",
|
|
114
113
|
"react-native": "*",
|
|
115
114
|
"react-native-webview": "*"
|
package/src/async-require/hmr.ts
CHANGED
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
* Based on this but with web support:
|
|
9
9
|
* https://github.com/facebook/react-native/blob/086714b02b0fb838dee5a66c5bcefe73b53cf3df/Libraries/Utilities/HMRClient.js
|
|
10
10
|
*/
|
|
11
|
-
import { parseWebHmrBuildErrors, type MetroBuildError } from '@expo/log-box/utils';
|
|
12
11
|
import MetroHMRClient from '@expo/metro/metro-runtime/modules/HMRClient';
|
|
13
12
|
import prettyFormat, { plugins } from 'pretty-format';
|
|
14
13
|
import { DeviceEventEmitter } from 'react-native';
|
|
@@ -29,9 +28,17 @@ const pendingEntryPoints: string[] = [];
|
|
|
29
28
|
// @ts-expect-error: Account for multiple versions of pretty-format inside of a monorepo.
|
|
30
29
|
const prettyFormatFunc = typeof prettyFormat === 'function' ? prettyFormat : prettyFormat.default;
|
|
31
30
|
|
|
32
|
-
|
|
31
|
+
type HMRClientType = {
|
|
32
|
+
send: (msg: string) => void;
|
|
33
|
+
isEnabled: () => boolean;
|
|
34
|
+
disable: () => void;
|
|
35
|
+
enable: () => void;
|
|
36
|
+
hasPendingUpdates: () => boolean;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
let hmrClient: HMRClientType | null = null;
|
|
33
40
|
let hmrUnavailableReason: string | null = null;
|
|
34
|
-
|
|
41
|
+
let currentCompileErrorMessage: string | null = null;
|
|
35
42
|
let didConnect: boolean = false;
|
|
36
43
|
const pendingLogs: [LogLevel, any[]][] = [];
|
|
37
44
|
|
|
@@ -46,6 +53,14 @@ type LogLevel =
|
|
|
46
53
|
| 'groupEnd'
|
|
47
54
|
| 'debug';
|
|
48
55
|
|
|
56
|
+
export type HMRClientNativeInterface = {
|
|
57
|
+
enable(): void;
|
|
58
|
+
disable(): void;
|
|
59
|
+
registerBundle(requestUrl: string): void;
|
|
60
|
+
log(level: LogLevel, data: any[]): void;
|
|
61
|
+
setup(props: { isEnabled: boolean }): void;
|
|
62
|
+
};
|
|
63
|
+
|
|
49
64
|
function assert(foo: any, msg: string): asserts foo {
|
|
50
65
|
if (!foo) throw new Error(msg);
|
|
51
66
|
}
|
|
@@ -54,7 +69,7 @@ function assert(foo: any, msg: string): asserts foo {
|
|
|
54
69
|
* HMR Client that receives from the server HMR updates and propagates them
|
|
55
70
|
* runtime to reflects those changes.
|
|
56
71
|
*/
|
|
57
|
-
const HMRClient = {
|
|
72
|
+
const HMRClient: HMRClientNativeInterface = {
|
|
58
73
|
enable() {
|
|
59
74
|
if (hmrUnavailableReason !== null) {
|
|
60
75
|
// If HMR became unavailable while you weren't using it,
|
|
@@ -166,10 +181,10 @@ const HMRClient = {
|
|
|
166
181
|
);
|
|
167
182
|
|
|
168
183
|
client.on('connection-error', (e: Error) => {
|
|
169
|
-
let error = `Cannot connect to
|
|
184
|
+
let error = `Cannot connect to Metro.
|
|
170
185
|
|
|
171
186
|
Try the following to fix the issue:
|
|
172
|
-
- Ensure the
|
|
187
|
+
- Ensure the Metro dev server is running and available on the same network as this device`;
|
|
173
188
|
error += `
|
|
174
189
|
|
|
175
190
|
URL: ${window.location.host}
|
|
@@ -180,7 +195,7 @@ const HMRClient = {
|
|
|
180
195
|
});
|
|
181
196
|
|
|
182
197
|
client.on('update-start', ({ isInitialUpdate }: { isInitialUpdate?: boolean }) => {
|
|
183
|
-
|
|
198
|
+
currentCompileErrorMessage = null;
|
|
184
199
|
didConnect = true;
|
|
185
200
|
|
|
186
201
|
if (client.isEnabled() && !isInitialUpdate) {
|
|
@@ -190,11 +205,10 @@ const HMRClient = {
|
|
|
190
205
|
|
|
191
206
|
client.on('update', ({ isInitialUpdate }: { isInitialUpdate?: boolean }) => {
|
|
192
207
|
if (client.isEnabled() && !isInitialUpdate) {
|
|
193
|
-
|
|
208
|
+
dismissRedbox();
|
|
194
209
|
// @ts-expect-error
|
|
195
210
|
globalThis.__expo_dev_resetErrors?.();
|
|
196
211
|
// LogBox.clearAllLogs();
|
|
197
|
-
// dismissGlobalErrorOverlay();
|
|
198
212
|
}
|
|
199
213
|
});
|
|
200
214
|
|
|
@@ -202,7 +216,22 @@ const HMRClient = {
|
|
|
202
216
|
hideLoading();
|
|
203
217
|
});
|
|
204
218
|
|
|
205
|
-
client.on('error', (data) =>
|
|
219
|
+
client.on('error', (data: { type: string; message: string }) => {
|
|
220
|
+
hideLoading();
|
|
221
|
+
|
|
222
|
+
if (data.type === 'GraphNotFoundError') {
|
|
223
|
+
client.close();
|
|
224
|
+
setHMRUnavailableReason('Metro has restarted since the last edit. Reload to reconnect.');
|
|
225
|
+
} else if (data.type === 'RevisionNotFoundError') {
|
|
226
|
+
client.close();
|
|
227
|
+
setHMRUnavailableReason('Metro and the client are out of sync. Reload to reconnect.');
|
|
228
|
+
} else {
|
|
229
|
+
currentCompileErrorMessage = `${data.type} ${data.message}`;
|
|
230
|
+
if (client.isEnabled()) {
|
|
231
|
+
showCompileError();
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
});
|
|
206
235
|
|
|
207
236
|
client.on('close', (closeEvent: { code: number; reason: string }) => {
|
|
208
237
|
hideLoading();
|
|
@@ -213,19 +242,19 @@ const HMRClient = {
|
|
|
213
242
|
closeEvent == null ||
|
|
214
243
|
closeEvent.code === 1000 ||
|
|
215
244
|
closeEvent.code === 1005 ||
|
|
216
|
-
closeEvent.code === 1006 ||
|
|
217
245
|
closeEvent.code == null;
|
|
218
246
|
|
|
219
247
|
setHMRUnavailableReason(
|
|
220
248
|
`${
|
|
221
249
|
isNormalOrUnsetCloseReason
|
|
222
|
-
? 'Disconnected from
|
|
223
|
-
: `Disconnected from
|
|
250
|
+
? 'Disconnected from Metro.'
|
|
251
|
+
: `Disconnected from Metro (${closeEvent.code}: "${closeEvent.reason}").`
|
|
224
252
|
}
|
|
225
253
|
|
|
226
254
|
To reconnect:
|
|
227
|
-
-
|
|
228
|
-
- Reload
|
|
255
|
+
- Ensure that Metro is running and available on the same network
|
|
256
|
+
- Reload this app (will trigger further help if Metro cannot be connected to)
|
|
257
|
+
`
|
|
229
258
|
);
|
|
230
259
|
});
|
|
231
260
|
|
|
@@ -238,41 +267,6 @@ To reconnect:
|
|
|
238
267
|
registerBundleEntryPoints(hmrClient);
|
|
239
268
|
flushEarlyLogs();
|
|
240
269
|
},
|
|
241
|
-
|
|
242
|
-
_onMetroError(data: unknown) {
|
|
243
|
-
if (!hmrClient) {
|
|
244
|
-
return;
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
assert(typeof data === 'object' && data != null, 'Expected data to be an object');
|
|
248
|
-
|
|
249
|
-
hideLoading();
|
|
250
|
-
|
|
251
|
-
if ('type' in data) {
|
|
252
|
-
if (data.type === 'GraphNotFoundError') {
|
|
253
|
-
hmrClient.close();
|
|
254
|
-
setHMRUnavailableReason('Expo CLI has restarted since the last edit. Reload to reconnect.');
|
|
255
|
-
return;
|
|
256
|
-
} else if (data.type === 'RevisionNotFoundError') {
|
|
257
|
-
hmrClient.close();
|
|
258
|
-
setHMRUnavailableReason(
|
|
259
|
-
`Expo CLI and the ${process.env.EXPO_OS} client are out of sync. Reload to reconnect.`
|
|
260
|
-
);
|
|
261
|
-
return;
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
// Fallback for resolution errors which don't return a type
|
|
266
|
-
// https://github.com/facebook/metro/blob/a3fac645dc377f78bd4182ca0ca73629b2707d5b/packages/metro/src/lib/formatBundlingError.js#L65-L73
|
|
267
|
-
// https://github.com/facebook/metro/pull/1487
|
|
268
|
-
const error = parseWebHmrBuildErrors(data);
|
|
269
|
-
|
|
270
|
-
buildErrorQueue.add(error);
|
|
271
|
-
|
|
272
|
-
if (hmrClient.isEnabled()) {
|
|
273
|
-
showCompileError();
|
|
274
|
-
}
|
|
275
|
-
},
|
|
276
270
|
};
|
|
277
271
|
|
|
278
272
|
function setHMRUnavailableReason(reason: string) {
|
|
@@ -292,7 +286,7 @@ function setHMRUnavailableReason(reason: string) {
|
|
|
292
286
|
}
|
|
293
287
|
}
|
|
294
288
|
|
|
295
|
-
function registerBundleEntryPoints(client:
|
|
289
|
+
function registerBundleEntryPoints(client: HMRClientType | null) {
|
|
296
290
|
if (hmrUnavailableReason != null) {
|
|
297
291
|
// "Bundle Splitting – Metro disconnected"
|
|
298
292
|
window.location.reload();
|
|
@@ -320,17 +314,27 @@ function flushEarlyLogs() {
|
|
|
320
314
|
}
|
|
321
315
|
}
|
|
322
316
|
|
|
317
|
+
function dismissRedbox() {
|
|
318
|
+
// TODO(EvanBacon): Error overlay for web.
|
|
319
|
+
}
|
|
320
|
+
|
|
323
321
|
function showCompileError() {
|
|
324
|
-
if (
|
|
322
|
+
if (currentCompileErrorMessage === null) {
|
|
325
323
|
return;
|
|
326
324
|
}
|
|
327
325
|
|
|
328
326
|
// Even if there is already a redbox, syntax errors are more important.
|
|
329
327
|
// Otherwise you risk seeing a stale runtime error while a syntax error is more recent.
|
|
330
|
-
|
|
328
|
+
dismissRedbox();
|
|
329
|
+
|
|
330
|
+
const message = currentCompileErrorMessage;
|
|
331
|
+
currentCompileErrorMessage = null;
|
|
331
332
|
|
|
332
|
-
const error =
|
|
333
|
-
|
|
333
|
+
const error = new Error(message);
|
|
334
|
+
// Symbolicating compile errors is wasted effort
|
|
335
|
+
// because the stack trace is meaningless:
|
|
336
|
+
// @ts-expect-error
|
|
337
|
+
error.preventSymbolication = true;
|
|
334
338
|
throw error;
|
|
335
339
|
}
|
|
336
340
|
|
package/src/dom/dom-entry.tsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Entry file for a DOM Component.
|
|
2
2
|
import '@expo/metro-runtime';
|
|
3
3
|
|
|
4
|
-
import {
|
|
4
|
+
import { withErrorOverlay } from '@expo/metro-runtime/error-overlay';
|
|
5
5
|
import React from 'react';
|
|
6
6
|
|
|
7
7
|
import { JSONValue } from './dom.types';
|
|
@@ -102,12 +102,12 @@ export function registerDOMComponent(AppModule: any) {
|
|
|
102
102
|
}
|
|
103
103
|
|
|
104
104
|
try {
|
|
105
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
106
|
-
setupLogBox();
|
|
107
|
-
}
|
|
108
|
-
|
|
109
105
|
React.startTransition(() => {
|
|
110
|
-
|
|
106
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
107
|
+
registerRootComponent(withErrorOverlay(DOMComponentRoot));
|
|
108
|
+
} else {
|
|
109
|
+
registerRootComponent(DOMComponentRoot);
|
|
110
|
+
}
|
|
111
111
|
});
|
|
112
112
|
} catch (e) {
|
|
113
113
|
const error = convertError(e);
|
package/src/dom/internal.ts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
export { default as WebView } from './webview-wrapper';
|
|
2
2
|
|
|
3
|
-
export * from './dom-internal.types';
|
|
4
|
-
|
|
5
3
|
// Skip all dom-only functions to give 'undefined is not a function' errors.
|
|
6
4
|
export const registerDOMComponent: undefined | typeof import('./dom-entry').registerDOMComponent =
|
|
7
5
|
undefined;
|
|
@@ -3,8 +3,7 @@ import React from 'react';
|
|
|
3
3
|
import { AppState } from 'react-native';
|
|
4
4
|
|
|
5
5
|
import { getBaseURL } from './base';
|
|
6
|
-
import {
|
|
7
|
-
import type { BridgeMessage, WebViewProps, WebViewRef } from './dom.types';
|
|
6
|
+
import type { BridgeMessage, DOMProps, WebViewProps, WebViewRef } from './dom.types';
|
|
8
7
|
import { _emitGlobalEvent } from './global-events';
|
|
9
8
|
import {
|
|
10
9
|
getInjectBodySizeObserverScript,
|
|
@@ -23,7 +22,7 @@ type RawWebViewProps = React.ComponentProps<Exclude<typeof ExpoDomWebView, undef
|
|
|
23
22
|
|
|
24
23
|
interface Props {
|
|
25
24
|
children?: any;
|
|
26
|
-
dom?:
|
|
25
|
+
dom?: DOMProps;
|
|
27
26
|
filePath: string;
|
|
28
27
|
ref: React.Ref<object>;
|
|
29
28
|
[propName: string]: unknown;
|
|
@@ -31,8 +30,6 @@ interface Props {
|
|
|
31
30
|
|
|
32
31
|
const RawWebView = React.forwardRef<object, Props>((props, ref) => {
|
|
33
32
|
const { children, dom, filePath, ref: _ref, ...marshalProps } = props as Props;
|
|
34
|
-
const { sourceOverride, ...domProps } = dom || {};
|
|
35
|
-
|
|
36
33
|
if (__DEV__) {
|
|
37
34
|
if (children !== undefined) {
|
|
38
35
|
throw new Error(
|
|
@@ -69,7 +66,7 @@ const RawWebView = React.forwardRef<object, Props>((props, ref) => {
|
|
|
69
66
|
const webView = resolveWebView(dom?.useExpoDOMWebView ?? false);
|
|
70
67
|
const webviewRef = React.useRef<WebViewRef>(null);
|
|
71
68
|
const domImperativeHandlePropsRef = React.useRef<string[]>([]);
|
|
72
|
-
const source =
|
|
69
|
+
const source = { uri: `${getBaseURL()}/${filePath}` };
|
|
73
70
|
const [containerStyle, setContainerStyle] = React.useState<WebViewProps['containerStyle']>(null);
|
|
74
71
|
|
|
75
72
|
const { debugZeroHeightStyle, debugOnLayout } = useDebugZeroHeight(dom);
|
|
@@ -132,7 +129,7 @@ const RawWebView = React.forwardRef<object, Props>((props, ref) => {
|
|
|
132
129
|
subscription.remove();
|
|
133
130
|
});
|
|
134
131
|
},
|
|
135
|
-
...
|
|
132
|
+
...dom,
|
|
136
133
|
containerStyle: [containerStyle, debugZeroHeightStyle, dom?.containerStyle],
|
|
137
134
|
onLayout: __DEV__ ? debugOnLayout : dom?.onLayout,
|
|
138
135
|
injectedJavaScriptBeforeContentLoaded: [
|
package/template.tgz
CHANGED
|
Binary file
|
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
package expo.modules
|
|
9
|
-
|
|
10
|
-
import android.content.Context
|
|
11
|
-
import com.facebook.react.bridge.ReadableArray
|
|
12
|
-
import com.facebook.react.bridge.UiThreadUtil
|
|
13
|
-
import com.facebook.react.common.SurfaceDelegate
|
|
14
|
-
import com.facebook.react.common.SurfaceDelegateFactory
|
|
15
|
-
import com.facebook.react.devsupport.DevSupportManagerBase
|
|
16
|
-
import com.facebook.react.devsupport.ReactInstanceDevHelper
|
|
17
|
-
import com.facebook.react.devsupport.interfaces.DevBundleDownloadListener
|
|
18
|
-
import com.facebook.react.devsupport.interfaces.DevLoadingViewManager
|
|
19
|
-
import com.facebook.react.devsupport.interfaces.DevSupportManager
|
|
20
|
-
import com.facebook.react.devsupport.interfaces.PausedInDebuggerOverlayManager
|
|
21
|
-
import com.facebook.react.devsupport.interfaces.RedBoxHandler
|
|
22
|
-
import com.facebook.react.packagerconnection.RequestHandler
|
|
23
|
-
import expo.modules.logbox.ExpoLogBoxSurfaceDelegate
|
|
24
|
-
import com.facebook.react.devsupport.StackTraceHelper.convertJavaStackTrace
|
|
25
|
-
import com.facebook.react.devsupport.StackTraceHelper.convertJsStackTrace
|
|
26
|
-
import com.facebook.react.devsupport.interfaces.StackFrame
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* An implementation of [DevSupportManager] that extends the functionality in
|
|
30
|
-
* [DevSupportManagerBase] with some additional, more flexible APIs for asynchronously loading the
|
|
31
|
-
* JS bundle.
|
|
32
|
-
*
|
|
33
|
-
* @constructor The primary constructor mirrors the same constructor we have for
|
|
34
|
-
* [BridgeDevSupportManager] and
|
|
35
|
-
* * is kept for backward compatibility.
|
|
36
|
-
*/
|
|
37
|
-
internal open class ExpoBridgelessDevSupportManager(
|
|
38
|
-
applicationContext: Context,
|
|
39
|
-
reactInstanceManagerHelper: ReactInstanceDevHelper,
|
|
40
|
-
packagerPathForJSBundleName: String?,
|
|
41
|
-
enableOnCreate: Boolean,
|
|
42
|
-
redBoxHandler: RedBoxHandler?,
|
|
43
|
-
devBundleDownloadListener: DevBundleDownloadListener?,
|
|
44
|
-
minNumShakes: Int,
|
|
45
|
-
customPackagerCommandHandlers: Map<String, RequestHandler>?,
|
|
46
|
-
surfaceDelegateFactory: SurfaceDelegateFactory?,
|
|
47
|
-
devLoadingViewManager: DevLoadingViewManager?,
|
|
48
|
-
pausedInDebuggerOverlayManager: PausedInDebuggerOverlayManager?
|
|
49
|
-
) :
|
|
50
|
-
DevSupportManagerBase(
|
|
51
|
-
applicationContext,
|
|
52
|
-
reactInstanceManagerHelper,
|
|
53
|
-
packagerPathForJSBundleName,
|
|
54
|
-
enableOnCreate,
|
|
55
|
-
redBoxHandler,
|
|
56
|
-
devBundleDownloadListener,
|
|
57
|
-
minNumShakes,
|
|
58
|
-
customPackagerCommandHandlers,
|
|
59
|
-
surfaceDelegateFactory,
|
|
60
|
-
devLoadingViewManager,
|
|
61
|
-
pausedInDebuggerOverlayManager
|
|
62
|
-
) {
|
|
63
|
-
|
|
64
|
-
override val uniqueTag: String
|
|
65
|
-
get() = "Bridgeless"
|
|
66
|
-
|
|
67
|
-
override fun handleReloadJS() {
|
|
68
|
-
UiThreadUtil.assertOnUiThread()
|
|
69
|
-
// dismiss redbox if exists
|
|
70
|
-
hideRedboxDialog()
|
|
71
|
-
reactInstanceDevHelper.reload("BridgelessDevSupportManager.handleReloadJS()")
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
internal class ExpoDevSupportManagerWithLogBoxOverride(
|
|
76
|
-
applicationContext: Context,
|
|
77
|
-
reactInstanceManagerHelper: ReactInstanceDevHelper,
|
|
78
|
-
packagerPathForJSBundleName: String?,
|
|
79
|
-
enableOnCreate: Boolean,
|
|
80
|
-
redBoxHandler: RedBoxHandler?,
|
|
81
|
-
devBundleDownloadListener: DevBundleDownloadListener?,
|
|
82
|
-
minNumShakes: Int,
|
|
83
|
-
customPackagerCommandHandlers: Map<String, RequestHandler>?,
|
|
84
|
-
surfaceDelegateFactory: SurfaceDelegateFactory?,
|
|
85
|
-
devLoadingViewManager: DevLoadingViewManager?,
|
|
86
|
-
pausedInDebuggerOverlayManager: PausedInDebuggerOverlayManager?
|
|
87
|
-
) :
|
|
88
|
-
ExpoBridgelessDevSupportManager(
|
|
89
|
-
applicationContext,
|
|
90
|
-
reactInstanceManagerHelper,
|
|
91
|
-
packagerPathForJSBundleName,
|
|
92
|
-
enableOnCreate,
|
|
93
|
-
redBoxHandler,
|
|
94
|
-
devBundleDownloadListener,
|
|
95
|
-
minNumShakes,
|
|
96
|
-
customPackagerCommandHandlers,
|
|
97
|
-
surfaceDelegateFactory,
|
|
98
|
-
devLoadingViewManager,
|
|
99
|
-
pausedInDebuggerOverlayManager
|
|
100
|
-
) {
|
|
101
|
-
|
|
102
|
-
private var redBoxSurfaceDelegate: SurfaceDelegate? = null
|
|
103
|
-
|
|
104
|
-
override fun hideRedboxDialog() {
|
|
105
|
-
redBoxSurfaceDelegate?.hide()
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
override fun showNewJavaError(message: String?, e: Throwable) {
|
|
109
|
-
showNewError(message, convertJavaStackTrace(e))
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
override fun showNewJSError(message: String?, details: ReadableArray?, errorCookie: Int) {
|
|
113
|
-
showNewError(message, convertJsStackTrace(details))
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
private fun showNewError(message: String?, stack: Array<StackFrame>) {
|
|
117
|
-
UiThreadUtil.runOnUiThread {
|
|
118
|
-
lastErrorTitle = message
|
|
119
|
-
lastErrorStack = stack
|
|
120
|
-
|
|
121
|
-
if (redBoxSurfaceDelegate == null) {
|
|
122
|
-
this.redBoxSurfaceDelegate =
|
|
123
|
-
createSurfaceDelegate("RedBox")
|
|
124
|
-
?: ExpoLogBoxSurfaceDelegate(this@ExpoDevSupportManagerWithLogBoxOverride).apply {
|
|
125
|
-
createContentView("RedBox")
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
if (redBoxSurfaceDelegate?.isShowing() == true) {
|
|
130
|
-
// Sometimes errors cause multiple errors to be thrown in JS in quick succession. Only
|
|
131
|
-
// show the first and most actionable one.
|
|
132
|
-
return@runOnUiThread
|
|
133
|
-
}
|
|
134
|
-
redBoxSurfaceDelegate?.show()
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
}
|
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
package expo.modules
|
|
9
|
-
|
|
10
|
-
import android.content.Context
|
|
11
|
-
import com.facebook.react.common.SurfaceDelegateFactory
|
|
12
|
-
import com.facebook.react.common.build.ReactBuildConfig
|
|
13
|
-
import com.facebook.react.devsupport.interfaces.DevBundleDownloadListener
|
|
14
|
-
import com.facebook.react.devsupport.interfaces.DevLoadingViewManager
|
|
15
|
-
import com.facebook.react.devsupport.interfaces.DevSupportManager
|
|
16
|
-
import com.facebook.react.devsupport.interfaces.PausedInDebuggerOverlayManager
|
|
17
|
-
import com.facebook.react.devsupport.interfaces.RedBoxHandler
|
|
18
|
-
import com.facebook.react.packagerconnection.RequestHandler
|
|
19
|
-
import java.lang.StringBuilder
|
|
20
|
-
import com.facebook.react.devsupport.DevSupportManagerFactory
|
|
21
|
-
import com.facebook.react.devsupport.ReactInstanceDevHelper
|
|
22
|
-
import com.facebook.react.devsupport.ReleaseDevSupportManager
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* A simple factory that creates instances of [DevSupportManager] implementations. Uses reflection
|
|
26
|
-
* to create BridgeDevSupportManager if it exists. This allows ProGuard to strip that class and its
|
|
27
|
-
* dependencies in release builds. If the class isn't found, [PerftestDevSupportManager] is returned
|
|
28
|
-
* instead.
|
|
29
|
-
*/
|
|
30
|
-
internal class ExpoDefaultDevSupportManagerFactory : DevSupportManagerFactory {
|
|
31
|
-
|
|
32
|
-
override fun create(
|
|
33
|
-
applicationContext: Context,
|
|
34
|
-
reactInstanceManagerHelper: ReactInstanceDevHelper,
|
|
35
|
-
packagerPathForJSBundleName: String?,
|
|
36
|
-
enableOnCreate: Boolean,
|
|
37
|
-
redBoxHandler: RedBoxHandler?,
|
|
38
|
-
devBundleDownloadListener: DevBundleDownloadListener?,
|
|
39
|
-
minNumShakes: Int,
|
|
40
|
-
customPackagerCommandHandlers: Map<String, RequestHandler>?,
|
|
41
|
-
surfaceDelegateFactory: SurfaceDelegateFactory?,
|
|
42
|
-
devLoadingViewManager: DevLoadingViewManager?,
|
|
43
|
-
pausedInDebuggerOverlayManager: PausedInDebuggerOverlayManager?
|
|
44
|
-
): DevSupportManager {
|
|
45
|
-
return if (!enableOnCreate) {
|
|
46
|
-
ReleaseDevSupportManager()
|
|
47
|
-
} else {
|
|
48
|
-
try {
|
|
49
|
-
// Developer support is enabled, we now must choose whether to return a DevSupportManager,
|
|
50
|
-
// or a more lean profiling-only PerftestDevSupportManager. We make the choice by first
|
|
51
|
-
// trying to return the full support DevSupportManager and if it fails, then just
|
|
52
|
-
// return PerftestDevSupportManager.
|
|
53
|
-
|
|
54
|
-
// ProGuard is surprisingly smart in this case and will keep a class if it detects a call
|
|
55
|
-
// to
|
|
56
|
-
// Class.forName() with a static string. So instead we generate a quasi-dynamic string to
|
|
57
|
-
// confuse it.
|
|
58
|
-
val className =
|
|
59
|
-
StringBuilder(DEVSUPPORT_IMPL_PACKAGE)
|
|
60
|
-
.append(".")
|
|
61
|
-
.append(DEVSUPPORT_IMPL_CLASS)
|
|
62
|
-
.toString()
|
|
63
|
-
val devSupportManagerClass = Class.forName(className)
|
|
64
|
-
val constructor =
|
|
65
|
-
devSupportManagerClass.getConstructor(
|
|
66
|
-
Context::class.java,
|
|
67
|
-
ReactInstanceDevHelper::class.java,
|
|
68
|
-
String::class.java,
|
|
69
|
-
Boolean::class.javaPrimitiveType,
|
|
70
|
-
RedBoxHandler::class.java,
|
|
71
|
-
DevBundleDownloadListener::class.java,
|
|
72
|
-
Int::class.javaPrimitiveType,
|
|
73
|
-
MutableMap::class.java,
|
|
74
|
-
SurfaceDelegateFactory::class.java,
|
|
75
|
-
DevLoadingViewManager::class.java,
|
|
76
|
-
PausedInDebuggerOverlayManager::class.java
|
|
77
|
-
)
|
|
78
|
-
constructor.newInstance(
|
|
79
|
-
applicationContext,
|
|
80
|
-
reactInstanceManagerHelper,
|
|
81
|
-
packagerPathForJSBundleName,
|
|
82
|
-
true,
|
|
83
|
-
redBoxHandler,
|
|
84
|
-
devBundleDownloadListener,
|
|
85
|
-
minNumShakes,
|
|
86
|
-
customPackagerCommandHandlers,
|
|
87
|
-
surfaceDelegateFactory,
|
|
88
|
-
devLoadingViewManager,
|
|
89
|
-
pausedInDebuggerOverlayManager
|
|
90
|
-
) as DevSupportManager
|
|
91
|
-
} catch (e: Exception) {
|
|
92
|
-
throw e
|
|
93
|
-
// Original implementation
|
|
94
|
-
// https://github.com/facebook/react-native/blob/50273758510a6d756494d05dc91055516c2a6aca/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/DefaultDevSupportManagerFactory.kt#L95
|
|
95
|
-
|
|
96
|
-
// React Native implementation fallback is PerftestDevSupportManager(applicationContext)
|
|
97
|
-
// but that's internal class we would have to vendor, so this impl re-throws.
|
|
98
|
-
// https://github.com/facebook/react-native/blob/50273758510a6d756494d05dc91055516c2a6aca/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/PerftestDevSupportManager.kt#L17
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
override fun create(
|
|
104
|
-
applicationContext: Context,
|
|
105
|
-
reactInstanceManagerHelper: ReactInstanceDevHelper,
|
|
106
|
-
packagerPathForJSBundleName: String?,
|
|
107
|
-
enableOnCreate: Boolean,
|
|
108
|
-
redBoxHandler: RedBoxHandler?,
|
|
109
|
-
devBundleDownloadListener: DevBundleDownloadListener?,
|
|
110
|
-
minNumShakes: Int,
|
|
111
|
-
customPackagerCommandHandlers: Map<String, RequestHandler>?,
|
|
112
|
-
surfaceDelegateFactory: SurfaceDelegateFactory?,
|
|
113
|
-
devLoadingViewManager: DevLoadingViewManager?,
|
|
114
|
-
pausedInDebuggerOverlayManager: PausedInDebuggerOverlayManager?,
|
|
115
|
-
useDevSupport: Boolean
|
|
116
|
-
): DevSupportManager =
|
|
117
|
-
if (ReactBuildConfig.UNSTABLE_ENABLE_FUSEBOX_RELEASE) {
|
|
118
|
-
// Should never happen as ExpoDefaultDevSupportManagerFactory is only used if useDevSupport = true
|
|
119
|
-
throw Error("ExpoDefaultDevSupportManagerFactory supports debug builds only. ReactBuildConfig.UNSTABLE_ENABLE_FUSEBOX_RELEASE is unsupported.")
|
|
120
|
-
|
|
121
|
-
// Original implementation
|
|
122
|
-
// https://github.com/facebook/react-native/blob/50273758510a6d756494d05dc91055516c2a6aca/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/DefaultDevSupportManagerFactory.kt#L114
|
|
123
|
-
|
|
124
|
-
// React Native implementation uses PerftestDevSupportManager(applicationContext)
|
|
125
|
-
// but that's internal class we would have to vendor, so this impl re-throws.
|
|
126
|
-
// https://github.com/facebook/react-native/blob/50273758510a6d756494d05dc91055516c2a6aca/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/PerftestDevSupportManager.kt#L17
|
|
127
|
-
} else if (useDevSupport) {
|
|
128
|
-
ExpoDevSupportManagerWithLogBoxOverride(
|
|
129
|
-
applicationContext,
|
|
130
|
-
reactInstanceManagerHelper,
|
|
131
|
-
packagerPathForJSBundleName,
|
|
132
|
-
enableOnCreate,
|
|
133
|
-
redBoxHandler,
|
|
134
|
-
devBundleDownloadListener,
|
|
135
|
-
minNumShakes,
|
|
136
|
-
customPackagerCommandHandlers,
|
|
137
|
-
surfaceDelegateFactory,
|
|
138
|
-
devLoadingViewManager,
|
|
139
|
-
pausedInDebuggerOverlayManager
|
|
140
|
-
)
|
|
141
|
-
} else {
|
|
142
|
-
ReleaseDevSupportManager()
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
private companion object {
|
|
146
|
-
private const val DEVSUPPORT_IMPL_PACKAGE = "com.facebook.react.devsupport"
|
|
147
|
-
private const val DEVSUPPORT_IMPL_CLASS = "BridgeDevSupportManager"
|
|
148
|
-
}
|
|
149
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { DOMProps } from './dom.types';
|
|
2
|
-
export interface DOMPropsInternal extends DOMProps {
|
|
3
|
-
/**
|
|
4
|
-
* Allows dynamically redirecting a component to a different source, for example prebuilt version.
|
|
5
|
-
* @internal
|
|
6
|
-
*/
|
|
7
|
-
sourceOverride?: {
|
|
8
|
-
uri: string;
|
|
9
|
-
};
|
|
10
|
-
}
|
|
11
|
-
//# sourceMappingURL=dom-internal.types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dom-internal.types.d.ts","sourceRoot":"","sources":["../../src/dom/dom-internal.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE5C,MAAM,WAAW,gBAAiB,SAAQ,QAAQ;IAChD;;;OAGG;IACH,cAAc,CAAC,EAAE;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC;CAClC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { DOMProps } from './dom.types';
|
|
2
|
-
|
|
3
|
-
export interface DOMPropsInternal extends DOMProps {
|
|
4
|
-
/**
|
|
5
|
-
* Allows dynamically redirecting a component to a different source, for example prebuilt version.
|
|
6
|
-
* @internal
|
|
7
|
-
*/
|
|
8
|
-
sourceOverride?: { uri: string };
|
|
9
|
-
}
|