8
0

improve plugin implementation: update method signatures, consolidate event emitter, and regenerate dependencies

This commit is contained in:
andre 2026-02-16 10:32:33 +01:00
parent a588e93657
commit 0b77bf0abd
6 changed files with 13579 additions and 7961 deletions

View File

@ -7,9 +7,12 @@ import com.facebook.react.uimanager.ViewManager
class WebIdMetaPluginPackage : ReactPackage {
override fun createNativeModules(reactContext: ReactApplicationContext)
= listOf(WebIdMetaPluginModule(reactContext))
override fun createNativeModules(reactContext: ReactApplicationContext): List<NativeModule> {
return listOf(WebIdMetaPluginModule(reactContext))
}
override fun createViewManagers(reactContext: ReactApplicationContext)
= emptyList<ViewManager<*, *>>()
override fun createViewManagers(reactContext: ReactApplicationContext): List<ViewManager<*, *>> {
return emptyList()
}
}

View File

@ -4,7 +4,6 @@ import com.facebook.react.ReactActivity
import com.facebook.react.ReactActivityDelegate
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.fabricEnabled
import com.facebook.react.defaults.DefaultReactActivityDelegate
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.fabricEnabled
class MainActivity : ReactActivity() {
@ -19,5 +18,5 @@ class MainActivity : ReactActivity() {
* which allows you to enable New Architecture with a single boolean flags [fabricEnabled]
*/
override fun createReactActivityDelegate(): ReactActivityDelegate =
DefaultReactActivityDelegate(this, mainComponentName, false)
DefaultReactActivityDelegate(this, mainComponentName, fabricEnabled)
}

View File

@ -11,9 +11,8 @@
},
"dependencies": {
"react": "19.2.3",
"react-dom": "19.2.3",
"react-native": "0.84.0",
"react-native-web-id-meta-plugin": "file:.."
"react-native-bouncy-checkbox": "^4.1.4"
},
"devDependencies": {
"@babel/core": "^7.20.0",

View File

@ -135,7 +135,9 @@
"@react-native",
"prettier"
],
"plugins": ["prettier"],
"plugins": [
"prettier"
],
"rules": {
"react/react-in-jsx-scope": "off",
"prettier/prettier": [

View File

@ -17,9 +17,7 @@ const WebIdMetaPlugin = NativeModules.WebIdMetaPlugin
}
);
export const webIdEventEmitter = new NativeEventEmitter(
Platform.OS === 'android' ? undefined : WebIdMetaPlugin
);
export const webIdEventEmitter = new NativeEventEmitter(WebIdMetaPlugin);
export function createMetaPlugin(
uri: string,

21515
yarn.lock

File diff suppressed because it is too large Load Diff