expo-dev-menu-interface 1.8.1 → 1.8.3

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.
@@ -1,7 +1,7 @@
1
1
  apply plugin: 'com.android.library'
2
2
 
3
3
  group = 'host.exp.exponent'
4
- version = '1.8.1'
4
+ version = '1.8.3'
5
5
 
6
6
  def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
7
7
  apply from: expoModulesCorePlugin
@@ -13,7 +13,7 @@ android {
13
13
  namespace "expo.interfaces.devmenu"
14
14
  defaultConfig {
15
15
  versionCode 6
16
- versionName '1.8.1'
16
+ versionName '1.8.3'
17
17
  }
18
18
  }
19
19
 
@@ -9,6 +9,11 @@ interface DevMenuExtensionSettingsInterface {
9
9
  val manager: DevMenuManagerInterface
10
10
  }
11
11
 
12
+ /**
13
+ * A native extension to provide extra dev-menu items.
14
+ * The implementation should call [DevMenuManagerInterface.registerExtensionInterface]
15
+ * to register its instance to the manager.
16
+ */
12
17
  interface DevMenuExtensionInterface {
13
18
  /**
14
19
  * Returns a name of the module and the extension. Also required by [com.facebook.react.bridge.ReactContextBaseJavaModule].
@@ -57,6 +57,11 @@ interface DevMenuManagerInterface {
57
57
  */
58
58
  fun dispatchCallable(actionId: String, args: ReadableMap?)
59
59
 
60
+ /**
61
+ * Registers an extra [DevMenuExtensionInterface] to the manager.
62
+ */
63
+ fun registerExtensionInterface(extensionInterface: DevMenuExtensionInterface)
64
+
60
65
  /**
61
66
  * @return a list of dev menu items serialized to the [Bundle].
62
67
  */
@@ -56,7 +56,10 @@ class ReactHostWrapper(reactNativeHost: ReactNativeHost, reactHost: ReactHost?)
56
56
 
57
57
  val hasInstance: Boolean
58
58
  get() {
59
- return currentReactContext?.hasActiveReactInstance() ?: false
59
+ if (isBridgelessMode) {
60
+ return currentReactContext?.hasActiveReactInstance() ?: false
61
+ }
62
+ return reactNativeHost.hasInstance() && currentReactContext?.hasActiveReactInstance() ?: false
60
63
  }
61
64
 
62
65
  val devSupportManager: DevSupportManager?
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-dev-menu-interface",
3
- "version": "1.8.1",
3
+ "version": "1.8.3",
4
4
  "description": "Interface for expo-dev-menu",
5
5
  "main": "index.js",
6
6
  "keywords": [
@@ -25,5 +25,5 @@
25
25
  "peerDependencies": {
26
26
  "expo": "*"
27
27
  },
28
- "gitHead": "75658dcbae535ec32cbb296de1c811eba059e03a"
28
+ "gitHead": "71b2f4339ef7b5b42ce87c1d8c17fe41c60355e0"
29
29
  }