mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Mark interop classes and interfaces as Unstable
Summary: Mark interop classes and interfaces as Unstable bypass-github-export-checks changelog: [internal] internal Reviewed By: fkgozali, arushikesarwani94 Differential Revision: D54128912 fbshipit-source-id: 56956fc38bac01f461bf686fda0f05a7a105008e
This commit is contained in:
committed by
Facebook GitHub Bot
parent
0274ad076d
commit
a15e8f318d
@@ -2626,14 +2626,6 @@ public class com/facebook/react/fabric/events/FabricEventEmitter : com/facebook/
|
||||
public fun receiveTouches (Ljava/lang/String;Lcom/facebook/react/bridge/WritableArray;Lcom/facebook/react/bridge/WritableArray;)V
|
||||
}
|
||||
|
||||
public abstract interface class com/facebook/react/fabric/interop/UIBlock {
|
||||
public abstract fun execute (Lcom/facebook/react/fabric/interop/UIBlockViewResolver;)V
|
||||
}
|
||||
|
||||
public abstract interface class com/facebook/react/fabric/interop/UIBlockViewResolver {
|
||||
public abstract fun resolveView (I)Landroid/view/View;
|
||||
}
|
||||
|
||||
public abstract interface class com/facebook/react/fabric/mounting/LayoutMetricsConversions {
|
||||
public static fun getMaxSize (I)F
|
||||
public static fun getMinSize (I)F
|
||||
|
||||
+3
@@ -9,6 +9,8 @@
|
||||
|
||||
package com.facebook.react.fabric.interop
|
||||
|
||||
import com.facebook.react.common.annotations.UnstableReactNativeAPI
|
||||
|
||||
/**
|
||||
* Interop Interface added to support `addUiBlock` and `prependUIBlock` methods in Fabric.
|
||||
* Historically those methods were only available in `UIManagerModule` (Paper, the old renderer).
|
||||
@@ -17,6 +19,7 @@ package com.facebook.react.fabric.interop
|
||||
* @deprecated When developing new libraries for Fabric you should instead use [UIManagerListener]
|
||||
* or View Commands to achieve a same results.
|
||||
*/
|
||||
@UnstableReactNativeAPI
|
||||
@Deprecated("Use UIManagerListener or View Commands instead of addUIBlock and prependUIBlock.")
|
||||
public fun interface UIBlock {
|
||||
/**
|
||||
|
||||
+2
@@ -8,6 +8,7 @@
|
||||
package com.facebook.react.fabric.interop
|
||||
|
||||
import android.view.View
|
||||
import com.facebook.react.common.annotations.UnstableReactNativeAPI
|
||||
|
||||
/**
|
||||
* This interface is used as receiver parameter for [UIBlock].
|
||||
@@ -17,6 +18,7 @@ import android.view.View
|
||||
* @deprecated When developing new libraries for Fabric you should instead use [UIManagerListener]
|
||||
* or View Commands to achieve a same results.
|
||||
*/
|
||||
@UnstableReactNativeAPI
|
||||
@Deprecated("Use UIManagerListener or View Commands instead of addUIBlock and prependUIBlock.")
|
||||
public interface UIBlockViewResolver {
|
||||
/**
|
||||
|
||||
+2
@@ -11,8 +11,10 @@ package com.facebook.react.bridge.interop
|
||||
|
||||
import com.facebook.react.bridge.WritableArray
|
||||
import com.facebook.react.bridge.WritableMap
|
||||
import com.facebook.react.common.annotations.UnstableReactNativeAPI
|
||||
import com.facebook.react.uimanager.events.RCTEventEmitter
|
||||
|
||||
@UnstableReactNativeAPI
|
||||
class FakeRCTEventEmitter : RCTEventEmitter {
|
||||
|
||||
override fun receiveEvent(targetReactTag: Int, eventName: String, event: WritableMap?) = Unit
|
||||
|
||||
+1
@@ -19,6 +19,7 @@ import org.junit.Assert.assertTrue
|
||||
import org.junit.Before
|
||||
import org.junit.Test
|
||||
|
||||
@OptIn(UnstableReactNativeAPI::class)
|
||||
class InteropModuleRegistryTest {
|
||||
|
||||
lateinit var underTest: InteropModuleRegistry
|
||||
|
||||
+2
@@ -7,10 +7,12 @@
|
||||
|
||||
package com.facebook.react.fabric.internal.interop
|
||||
|
||||
import com.facebook.react.common.annotations.UnstableReactNativeAPI
|
||||
import com.facebook.testutils.fakes.FakeUIManager
|
||||
import org.junit.Assert.assertEquals
|
||||
import org.junit.Test
|
||||
|
||||
@OptIn(UnstableReactNativeAPI::class)
|
||||
class InteropUiBlockListenerTest {
|
||||
|
||||
@Test
|
||||
|
||||
+2
@@ -15,8 +15,10 @@ import com.facebook.react.bridge.ReadableMap
|
||||
import com.facebook.react.bridge.UIManager
|
||||
import com.facebook.react.bridge.UIManagerListener
|
||||
import com.facebook.react.bridge.WritableMap
|
||||
import com.facebook.react.common.annotations.UnstableReactNativeAPI
|
||||
import com.facebook.react.fabric.interop.UIBlockViewResolver
|
||||
|
||||
@OptIn(UnstableReactNativeAPI::class)
|
||||
class FakeUIManager : UIManager, UIBlockViewResolver {
|
||||
|
||||
// The number of times resolveView was called
|
||||
|
||||
Reference in New Issue
Block a user