expo 55.0.0-canary-20251008-6acbc1c → 55.0.0-canary-20251009-9919e08
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 +21 -74
- package/android/src/main/java/expo/modules/ReactActivityDelegateWrapper.kt +0 -33
- 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 +80 -80
- package/package.json +19 -20
- package/src/async-require/hmr.ts +59 -55
- package/src/dom/dom-entry.tsx +8 -8
- 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 -135
- package/android/src/main/java/expo/modules/ExpoDevSupportManagerFactory.kt +0 -145
- package/android/src/main/java/expo/modules/ReactNativeHostWrapper.kt +0 -51
- package/android/src/main/java/expo/modules/ReactNativeHostWrapperBase.kt +0 -107
- 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
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
package expo.modules
|
|
2
|
-
|
|
3
|
-
import android.app.Application
|
|
4
|
-
import androidx.collection.ArrayMap
|
|
5
|
-
import com.facebook.react.ReactInstanceEventListener
|
|
6
|
-
import com.facebook.react.ReactInstanceManager
|
|
7
|
-
import com.facebook.react.ReactNativeHost
|
|
8
|
-
import com.facebook.react.ReactPackage
|
|
9
|
-
import com.facebook.react.bridge.JavaScriptExecutorFactory
|
|
10
|
-
import com.facebook.react.bridge.ReactContext
|
|
11
|
-
import com.facebook.react.defaults.DefaultReactNativeHost
|
|
12
|
-
import java.lang.reflect.Method
|
|
13
|
-
|
|
14
|
-
open class ReactNativeHostWrapperBase(
|
|
15
|
-
application: Application,
|
|
16
|
-
protected val host: ReactNativeHost
|
|
17
|
-
) : DefaultReactNativeHost(application) {
|
|
18
|
-
|
|
19
|
-
val reactNativeHostHandlers = ExpoModulesPackage.packageList
|
|
20
|
-
.flatMap { it.createReactNativeHostHandlers(application) }
|
|
21
|
-
private val methodMap: ArrayMap<String, Method> = ArrayMap()
|
|
22
|
-
|
|
23
|
-
override fun createReactInstanceManager(): ReactInstanceManager {
|
|
24
|
-
val developerSupport = useDeveloperSupport
|
|
25
|
-
reactNativeHostHandlers.forEach { handler ->
|
|
26
|
-
handler.onWillCreateReactInstance(developerSupport)
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
val result = super.createReactInstanceManager()
|
|
30
|
-
|
|
31
|
-
reactNativeHostHandlers.forEach { handler ->
|
|
32
|
-
handler.onDidCreateDevSupportManager(result.devSupportManager)
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
result.addReactInstanceEventListener(object : ReactInstanceEventListener {
|
|
36
|
-
override fun onReactContextInitialized(context: ReactContext) {
|
|
37
|
-
reactNativeHostHandlers.forEach { handler ->
|
|
38
|
-
handler.onDidCreateReactInstance(developerSupport, context)
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
})
|
|
42
|
-
|
|
43
|
-
injectHostReactInstanceManager(result)
|
|
44
|
-
|
|
45
|
-
return result
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
override fun getJavaScriptExecutorFactory(): JavaScriptExecutorFactory? {
|
|
49
|
-
return reactNativeHostHandlers.asSequence()
|
|
50
|
-
.mapNotNull { it.javaScriptExecutorFactory }
|
|
51
|
-
.firstOrNull() ?: invokeDelegateMethod("getJavaScriptExecutorFactory")
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
public override fun getJSMainModuleName(): String {
|
|
55
|
-
return invokeDelegateMethod("getJSMainModuleName")
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
public override fun getJSBundleFile(): String? {
|
|
59
|
-
return reactNativeHostHandlers.asSequence()
|
|
60
|
-
.mapNotNull { it.getJSBundleFile(useDeveloperSupport) }
|
|
61
|
-
.firstOrNull() ?: invokeDelegateMethod("getJSBundleFile")
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
public override fun getBundleAssetName(): String? {
|
|
65
|
-
return reactNativeHostHandlers.asSequence()
|
|
66
|
-
.mapNotNull { it.getBundleAssetName(useDeveloperSupport) }
|
|
67
|
-
.firstOrNull() ?: invokeDelegateMethod("getBundleAssetName")
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
override fun getUseDeveloperSupport(): Boolean {
|
|
71
|
-
return reactNativeHostHandlers.asSequence()
|
|
72
|
-
.mapNotNull { it.useDeveloperSupport }
|
|
73
|
-
.firstOrNull() ?: host.useDeveloperSupport
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
public override fun getPackages(): MutableList<ReactPackage> {
|
|
77
|
-
return invokeDelegateMethod("getPackages")
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
//endregion
|
|
81
|
-
|
|
82
|
-
//region Internals
|
|
83
|
-
|
|
84
|
-
// this is to call the methods as overridden in MainApplication.kt
|
|
85
|
-
@Suppress("UNCHECKED_CAST")
|
|
86
|
-
internal fun <T> invokeDelegateMethod(name: String): T {
|
|
87
|
-
var method = methodMap[name]
|
|
88
|
-
if (method == null) {
|
|
89
|
-
method = ReactNativeHost::class.java.getDeclaredMethod(name)
|
|
90
|
-
method.isAccessible = true
|
|
91
|
-
methodMap[name] = method
|
|
92
|
-
}
|
|
93
|
-
return method!!.invoke(host) as T
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
/**
|
|
97
|
-
* Inject the @{ReactInstanceManager} from the wrapper to the wrapped host.
|
|
98
|
-
* In case the wrapped host to call `getReactInstanceManager` inside its methods.
|
|
99
|
-
*/
|
|
100
|
-
private fun injectHostReactInstanceManager(reactInstanceManager: ReactInstanceManager) {
|
|
101
|
-
val mReactInstanceManagerField = ReactNativeHost::class.java.getDeclaredField("mReactInstanceManager")
|
|
102
|
-
mReactInstanceManagerField.isAccessible = true
|
|
103
|
-
mReactInstanceManagerField.set(host, reactInstanceManager)
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
//endregion
|
|
107
|
-
}
|
|
@@ -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
|
-
}
|