-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat(#162): fabric support - add JS Flow spec - make android viewmanager to conform to codegen-ed specs - make android viewmanager extend ReactViewManager instead of ViewGroupManager - add codegen-ed spec to make viewmanager work also in old arch - use install_module_dependencies in the podspec to install deps on both new and old architectures - add subclass of RCTViewComponentView - use fabric implementation when RCT_NEW_ARCH_ENABLED flag is true - set RN peerDependency to be version >= 0.71 * feat(#162): bump RNTA to v3, bump RN to v0.73, add pointerEvents example
- Loading branch information
1 parent
40ff01d
commit b5dc9d0
Showing
33 changed files
with
3,770 additions
and
2,359 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
module.exports = { | ||
extends: ['@react-native-community'], | ||
extends: '@react-native', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 17 additions & 13 deletions
30
android/src/main/java/org/reactnative/maskedview/RNCMaskedViewManager.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 25 additions & 9 deletions
34
android/src/main/java/org/reactnative/maskedview/RNCMaskedViewPackage.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,41 @@ | ||
package org.reactnative.maskedview; | ||
|
||
import com.facebook.react.ReactPackage; | ||
import com.facebook.react.bridge.JavaScriptModule; | ||
import androidx.annotation.Nullable; | ||
|
||
import com.facebook.react.TurboReactPackage; | ||
import com.facebook.react.bridge.NativeModule; | ||
import com.facebook.react.bridge.ReactApplicationContext; | ||
import com.facebook.react.module.model.ReactModuleInfo; | ||
import com.facebook.react.module.model.ReactModuleInfoProvider; | ||
import com.facebook.react.uimanager.ViewManager; | ||
|
||
import java.util.Arrays; | ||
import java.util.Collections; | ||
import java.util.HashMap; | ||
import java.util.List; | ||
import java.util.Map; | ||
|
||
public class RNCMaskedViewPackage extends TurboReactPackage { | ||
@Override | ||
@Nullable | ||
public NativeModule getModule(String name, ReactApplicationContext reactContext) { | ||
return null; | ||
} | ||
|
||
public class RNCMaskedViewPackage implements ReactPackage { | ||
@Override | ||
public List<NativeModule> createNativeModules(ReactApplicationContext reactApplicationContext) { | ||
return Collections.emptyList(); | ||
public ReactModuleInfoProvider getReactModuleInfoProvider() { | ||
final Map<String, ReactModuleInfo> reactModuleInfoMap = new HashMap<>(); | ||
return new ReactModuleInfoProvider() { | ||
@Override | ||
public Map<String, ReactModuleInfo> getReactModuleInfos() { | ||
return reactModuleInfoMap; | ||
} | ||
}; | ||
} | ||
|
||
@Override | ||
public List<ViewManager> createViewManagers(ReactApplicationContext reactApplicationContext) { | ||
return Arrays.<ViewManager>asList( | ||
new RNCMaskedViewManager() | ||
); | ||
return Arrays.<ViewManager>asList( | ||
new RNCMaskedViewManager() | ||
); | ||
} | ||
} |
31 changes: 31 additions & 0 deletions
31
android/src/oldarch/java/com/facebook/react/viewmanagers/RNCMaskedViewManagerDelegate.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/** | ||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). | ||
* | ||
* Do not edit this file as changes may cause incorrect behavior and will be lost | ||
* once the code is regenerated. | ||
* | ||
* @generated by codegen project: GeneratePropsJavaDelegate.js | ||
*/ | ||
|
||
package com.facebook.react.viewmanagers; | ||
|
||
import android.view.View; | ||
import androidx.annotation.Nullable; | ||
import com.facebook.react.uimanager.BaseViewManagerDelegate; | ||
import com.facebook.react.uimanager.BaseViewManagerInterface; | ||
|
||
public class RNCMaskedViewManagerDelegate<T extends View, U extends BaseViewManagerInterface<T> & RNCMaskedViewManagerInterface<T>> extends BaseViewManagerDelegate<T, U> { | ||
public RNCMaskedViewManagerDelegate(U viewManager) { | ||
super(viewManager); | ||
} | ||
@Override | ||
public void setProperty(T view, String propName, @Nullable Object value) { | ||
switch (propName) { | ||
case "androidRenderingMode": | ||
mViewManager.setAndroidRenderingMode(view, (String) value); | ||
break; | ||
default: | ||
super.setProperty(view, propName, value); | ||
} | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
android/src/oldarch/java/com/facebook/react/viewmanagers/RNCMaskedViewManagerInterface.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/** | ||
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). | ||
* | ||
* Do not edit this file as changes may cause incorrect behavior and will be lost | ||
* once the code is regenerated. | ||
* | ||
* @generated by codegen project: GeneratePropsJavaInterface.js | ||
*/ | ||
|
||
package com.facebook.react.viewmanagers; | ||
|
||
import android.view.View; | ||
import androidx.annotation.Nullable; | ||
|
||
public interface RNCMaskedViewManagerInterface<T extends View> { | ||
void setAndroidRenderingMode(T view, @Nullable String value); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,8 @@ | |
.xcode.env | ||
Pods/ | ||
build/ | ||
dist/ | ||
dist/* | ||
!dist/.gitignore | ||
local.properties | ||
msbuild.binlog | ||
node_modules/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.2-bin.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip | ||
networkTimeout=10000 | ||
validateDistributionUrl=true | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
Oops, something went wrong.