diff --git a/android/app/src/main/java/com/expensify/chat/MainApplication.kt b/android/app/src/main/java/com/expensify/chat/MainApplication.kt index 2cc8b7780253..f476ad89c5b4 100644 --- a/android/app/src/main/java/com/expensify/chat/MainApplication.kt +++ b/android/app/src/main/java/com/expensify/chat/MainApplication.kt @@ -11,9 +11,11 @@ import com.expensify.chat.bootsplash.BootSplashPackage import com.expensify.chat.shortcutManagerModule.ShortcutManagerPackage import com.facebook.react.PackageList import com.facebook.react.ReactApplication +import com.facebook.react.ReactHost import com.facebook.react.ReactNativeHost import com.facebook.react.ReactPackage import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load +import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost import com.facebook.react.defaults.DefaultReactNativeHost import com.facebook.react.modules.i18nmanager.I18nUtil import com.facebook.soloader.SoLoader @@ -44,6 +46,9 @@ class MainApplication : MultiDexApplication(), ReactApplication { get() = BuildConfig.IS_HERMES_ENABLED }) + override val reactHost: ReactHost + get() = getDefaultReactHost(applicationContext, reactNativeHost) + override fun onCreate() { super.onCreate() ReactFontManager.getInstance().addCustomFont(this, "Expensify New Kansas", R.font.expensify_new_kansas) @@ -59,7 +64,7 @@ class MainApplication : MultiDexApplication(), ReactApplication { SoLoader.init(this, /* native exopackage */false) if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) { // If you opted-in for the New Architecture, we load the native entry point for this app. - load(bridgelessEnabled = false) + load() } if (BuildConfig.DEBUG) { FirebaseCrashlytics.getInstance().setCrashlyticsCollectionEnabled(false) diff --git a/ios/NewExpensify/AppDelegate.mm b/ios/NewExpensify/AppDelegate.mm index dc0ef2812031..5608c44823f4 100644 --- a/ios/NewExpensify/AppDelegate.mm +++ b/ios/NewExpensify/AppDelegate.mm @@ -88,11 +88,6 @@ - (NSURL *)bundleURL #endif } -- (BOOL)bridgelessEnabled -{ - return NO; -} - // This methods is needed to support the hardware keyboard shortcuts - (NSArray *)keyCommands { return [HardwareShortcuts sharedInstance].keyCommands; diff --git a/ios/NewExpensify/RCTBootSplash.h b/ios/NewExpensify/RCTBootSplash.h index 5dc3def635f2..e4037995d666 100644 --- a/ios/NewExpensify/RCTBootSplash.h +++ b/ios/NewExpensify/RCTBootSplash.h @@ -1,16 +1,7 @@ -// -// RCTBootSplash.h -// NewExpensify -// -// Created by Mathieu Acthernoene on 07/01/2022. -// - #import -#import @interface RCTBootSplash : NSObject -+ (void)invalidateBootSplash; + (void)initWithStoryboard:(NSString * _Nonnull)storyboardName rootView:(UIView * _Nullable)rootView; diff --git a/ios/NewExpensify/RCTBootSplash.mm b/ios/NewExpensify/RCTBootSplash.mm index 3e4a086f07b1..8ce5efee92ff 100644 --- a/ios/NewExpensify/RCTBootSplash.mm +++ b/ios/NewExpensify/RCTBootSplash.mm @@ -2,46 +2,34 @@ #import -#if RCT_NEW_ARCH_ENABLED #import #import -#else #import -#endif -static NSMutableArray *_resolveQueue = nil; +static RCTSurfaceHostingProxyRootView *_rootView = nil; + static UIView *_loadingView = nil; -static UIView *_rootView = nil; -static float _duration = 0; +static NSMutableArray *_resolveQueue = [[NSMutableArray alloc] init]; +static bool _fade = false; static bool _nativeHidden = false; -static bool _transitioning = false; @implementation RCTBootSplash RCT_EXPORT_MODULE(); -- (dispatch_queue_t)methodQueue { - return dispatch_get_main_queue(); ++ (BOOL)requiresMainQueueSetup { + return NO; } -+ (void)invalidateBootSplash { - _resolveQueue = nil; - _rootView = nil; - _nativeHidden = false; -} - -+ (bool)isLoadingViewHidden { - return _loadingView == nil || [_loadingView isHidden]; +- (dispatch_queue_t)methodQueue { + return dispatch_get_main_queue(); } -+ (bool)hasResolveQueue { - return _resolveQueue != nil; ++ (bool)isLoadingViewVisible { + return _loadingView != nil && ![_loadingView isHidden]; } + (void)clearResolveQueue { - if (![self hasResolveQueue]) - return; - while ([_resolveQueue count] > 0) { RCTPromiseResolveBlock resolve = [_resolveQueue objectAtIndex:0]; [_resolveQueue removeObjectAtIndex:0]; @@ -49,19 +37,15 @@ + (void)clearResolveQueue { } } -+ (void)hideLoadingView { - if ([self isLoadingViewHidden]) ++ (void)hideAndClearPromiseQueue { + if (![self isLoadingViewVisible]) { return [RCTBootSplash clearResolveQueue]; + } - if (_duration > 0) { + if (_fade) { dispatch_async(dispatch_get_main_queue(), ^{ - _transitioning = true; - - if (_rootView == nil) - return; - [UIView transitionWithView:_rootView - duration:_duration / 1000.0 + duration:0.250 options:UIViewAnimationOptionTransitionCrossDissolve animations:^{ _loadingView.hidden = YES; @@ -70,7 +54,6 @@ + (void)hideLoadingView { [_loadingView removeFromSuperview]; _loadingView = nil; - _transitioning = false; return [RCTBootSplash clearResolveQueue]; }]; }); @@ -85,30 +68,9 @@ + (void)hideLoadingView { + (void)initWithStoryboard:(NSString * _Nonnull)storyboardName rootView:(UIView * _Nullable)rootView { - if (rootView == nil -#ifdef RCT_NEW_ARCH_ENABLED - || ![rootView isKindOfClass:[RCTSurfaceHostingProxyRootView class]] -#else - || ![rootView isKindOfClass:[RCTRootView class]] -#endif - || _rootView != nil - || [self hasResolveQueue] // hide has already been called, abort init - || RCTRunningInAppExtension()) + if (RCTRunningInAppExtension()) { return; - -#ifdef RCT_NEW_ARCH_ENABLED - RCTSurfaceHostingProxyRootView *proxy = (RCTSurfaceHostingProxyRootView *)rootView; - _rootView = (RCTSurfaceHostingView *)proxy.surface.view; -#else - _rootView = (RCTRootView *)rootView; -#endif - - UIStoryboard *storyboard = [UIStoryboard storyboardWithName:storyboardName bundle:nil]; - - _loadingView = [[storyboard instantiateInitialViewController] view]; - _loadingView.hidden = NO; - - [_rootView addSubview:_loadingView]; + } [NSTimer scheduledTimerWithTimeInterval:0.35 repeats:NO @@ -117,19 +79,43 @@ + (void)initWithStoryboard:(NSString * _Nonnull)storyboardName _nativeHidden = true; // hide has been called before native launch screen fade out - if ([self hasResolveQueue]) - [self hideLoadingView]; + if ([_resolveQueue count] > 0) { + [self hideAndClearPromiseQueue]; + } }]; - [[NSNotificationCenter defaultCenter] addObserver:self - selector:@selector(onJavaScriptDidLoad) - name:RCTJavaScriptDidLoadNotification - object:nil]; + if (rootView != nil) { +#ifdef RCT_NEW_ARCH_ENABLED + _rootView = (RCTSurfaceHostingProxyRootView *)rootView; +#else + _rootView = (RCTRootView *)rootView; +#endif - [[NSNotificationCenter defaultCenter] addObserver:self - selector:@selector(onJavaScriptDidFailToLoad) - name:RCTJavaScriptDidFailToLoadNotification - object:nil]; + UIStoryboard *storyboard = [UIStoryboard storyboardWithName:storyboardName bundle:nil]; + + _loadingView = [[storyboard instantiateInitialViewController] view]; + _loadingView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; + _loadingView.frame = _rootView.bounds; + _loadingView.center = (CGPoint){CGRectGetMidX(_rootView.bounds), CGRectGetMidY(_rootView.bounds)}; + _loadingView.hidden = NO; + +#if RCT_NEW_ARCH_ENABLED + [_rootView disableActivityIndicatorAutoHide:YES]; + [_rootView setLoadingView:_loadingView]; +#else + [_rootView addSubview:_loadingView]; +#endif + + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(onJavaScriptDidLoad) + name:RCTJavaScriptDidLoadNotification + object:nil]; + + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(onJavaScriptDidFailToLoad) + name:RCTJavaScriptDidFailToLoadNotification + object:nil]; + } } + (void)onJavaScriptDidLoad { @@ -137,50 +123,49 @@ + (void)onJavaScriptDidLoad { } + (void)onJavaScriptDidFailToLoad { - [self hideLoadingView]; + [self hideAndClearPromiseQueue]; [[NSNotificationCenter defaultCenter] removeObserver:self]; } -- (void)hide:(double)duration - resolve:(RCTPromiseResolveBlock)resolve - reject:(RCTPromiseRejectBlock)reject { - if (_resolveQueue == nil) - _resolveQueue = [[NSMutableArray alloc] init]; +- (NSDictionary *)constantsToExport { + UIWindow *window = RCTKeyWindow(); + __block bool darkModeEnabled = false; - [_resolveQueue addObject:resolve]; + RCTUnsafeExecuteOnMainQueueSync(^{ + darkModeEnabled = window != nil && window.traitCollection.userInterfaceStyle == UIUserInterfaceStyleDark; + }); - if ([RCTBootSplash isLoadingViewHidden] || RCTRunningInAppExtension()) - return [RCTBootSplash clearResolveQueue]; + return @{ + @"darkModeEnabled": @(darkModeEnabled) + }; +} - _duration = lroundf((float)duration); +- (void)hideImpl:(BOOL)fade + resolve:(RCTPromiseResolveBlock)resolve { + if (RCTRunningInAppExtension()) { + return resolve(@(true)); + } - if (_nativeHidden) - return [RCTBootSplash hideLoadingView]; + [_resolveQueue addObject:resolve]; + _fade = fade; + + if (_nativeHidden) { + return [RCTBootSplash hideAndClearPromiseQueue]; + } } -- (void)getVisibilityStatus:(RCTPromiseResolveBlock)resolve - reject:(RCTPromiseRejectBlock)reject { - if ([RCTBootSplash isLoadingViewHidden]) - return resolve(@"hidden"); - else if (_transitioning) - return resolve(@"transitioning"); - else - return resolve(@"visible"); +- (void)isVisibleImpl:(RCTPromiseResolveBlock)resolve { + resolve(@([RCTBootSplash isLoadingViewVisible])); } -RCT_REMAP_METHOD(hide, - resolve:(RCTPromiseResolveBlock)resolve - rejecte:(RCTPromiseRejectBlock)reject) { - [self hide:0 - resolve:resolve - reject:reject]; +RCT_EXPORT_METHOD(hide:(RCTPromiseResolveBlock)resolve + reject:(RCTPromiseRejectBlock)reject) { + [self hideImpl:0 resolve:resolve]; } -RCT_REMAP_METHOD(getVisibilityStatus, - getVisibilityStatusWithResolve:(RCTPromiseResolveBlock)resolve - rejecte:(RCTPromiseRejectBlock)reject) { - [self getVisibilityStatus:resolve - reject:reject]; +RCT_EXPORT_METHOD(isVisible:(RCTPromiseResolveBlock)resolve + reject:(RCTPromiseRejectBlock)reject) { + [self isVisibleImpl:resolve]; } @end diff --git a/patches/@react-native-firebase+app+12.9.3+002+bridgeless.patch b/patches/@react-native-firebase+app+12.9.3+002+bridgeless.patch new file mode 100644 index 000000000000..322bc2597f2c --- /dev/null +++ b/patches/@react-native-firebase+app+12.9.3+002+bridgeless.patch @@ -0,0 +1,50 @@ +diff --git a/node_modules/@react-native-firebase/app/ios/RNFBApp/RNFBVersion.m b/node_modules/@react-native-firebase/app/ios/RNFBApp/RNFBVersion.m +index f980834..8937cdf 100644 +--- a/node_modules/@react-native-firebase/app/ios/RNFBApp/RNFBVersion.m ++++ b/node_modules/@react-native-firebase/app/ios/RNFBApp/RNFBVersion.m +@@ -15,7 +15,7 @@ + * + */ + +-#import "RCTVersion.h" ++#import + + // generated file - do not modify or commit + NSString* const RNFBVersionString = @"12.9.3"; +diff --git a/node_modules/@react-native-firebase/app/lib/internal/registry/nativeModule.js b/node_modules/@react-native-firebase/app/lib/internal/registry/nativeModule.js +index 03f001c..cf8410a 100644 +--- a/node_modules/@react-native-firebase/app/lib/internal/registry/nativeModule.js ++++ b/node_modules/@react-native-firebase/app/lib/internal/registry/nativeModule.js +@@ -64,15 +64,15 @@ function nativeModuleWrapped(namespace, NativeModule, argToPrepend) { + if (!NativeModule) { + return NativeModule; + } +- +- const properties = Object.keys(NativeModule); +- +- for (let i = 0, len = properties.length; i < len; i++) { +- const property = properties[i]; +- if (typeof NativeModule[property] === 'function') { +- native[property] = nativeModuleMethodWrapped(namespace, NativeModule[property], argToPrepend); +- } else { +- native[property] = NativeModule[property]; ++ const moduleMethods = ["metaGetAll","jsonGetAll","preferencesSetBool","preferencesSetString","preferencesGetAll","preferencesClearAll","eventsNotifyReady","eventsGetListeners","eventsPing","eventsAddListener","eventsRemoveListener","addListener","removeListeners","initializeApp","setLogLevel","setAutomaticDataCollectionEnabled","deleteApp","getConstants","NATIVE_FIREBASE_APPS","FIREBASE_RAW_JSON","checkForUnsentReports","crash","crashWithStackPromise","deleteUnsentReports","didCrashOnPreviousExecution","log","logPromise","sendUnsentReports","setAttribute","setAttributes","setUserId","recordError","recordErrorPromise","setCrashlyticsCollectionEnabled","isErrorGenerationOnJSCrashEnabled","isCrashlyticsJavascriptExceptionHandlerChainingEnabled","isCrashlyticsCollectionEnabled","getConstants"]; ++ for (let i = 0, len = moduleMethods.length; i < len; i++) { ++ const method = moduleMethods[i]; ++ if (NativeModule[method]) { ++ if (typeof NativeModule[method] === 'function') { ++ native[method] = nativeModuleMethodWrapped(namespace, NativeModule[method], argToPrepend); ++ } else { ++ native[method] = NativeModule[method]; ++ } + } + } + +@@ -133,7 +133,6 @@ function initialiseNativeModule(module) { + } + + Object.freeze(multiModuleRoot); +- + NATIVE_MODULE_REGISTRY[key] = multiModuleRoot; + + return NATIVE_MODULE_REGISTRY[key]; diff --git a/patches/@rnmapbox+maps+10.1.30+001+bridgeless.patch b/patches/@rnmapbox+maps+10.1.30+001+bridgeless.patch new file mode 100644 index 000000000000..b840e3da7b12 --- /dev/null +++ b/patches/@rnmapbox+maps+10.1.30+001+bridgeless.patch @@ -0,0 +1,83 @@ +diff --git a/node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/styles/sources/RNMBXRasterSourceManager.kt b/node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/styles/sources/RNMBXRasterSourceManager.kt +index 5bebc1b..80a4be4 100644 +--- a/node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/styles/sources/RNMBXRasterSourceManager.kt ++++ b/node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/styles/sources/RNMBXRasterSourceManager.kt +@@ -5,6 +5,8 @@ import com.facebook.react.bridge.ReactApplicationContext + import com.facebook.react.uimanager.ThemedReactContext + import com.facebook.react.uimanager.annotations.ReactProp + import com.facebook.react.viewmanagers.RNMBXRasterSourceManagerInterface ++import com.rnmapbox.rnmbx.events.constants.EventKeys ++import com.rnmapbox.rnmbx.events.constants.eventMapOf + import javax.annotation.Nonnull + + class RNMBXRasterSourceManager(reactApplicationContext: ReactApplicationContext) : +@@ -26,7 +28,10 @@ class RNMBXRasterSourceManager(reactApplicationContext: ReactApplicationContext) + } + + override fun customEvents(): Map? { +- return null ++ return eventMapOf( ++ EventKeys.RASTER_SOURCE_LAYER_CLICK to "onMapboxRasterSourcePress", ++ EventKeys.MAP_ANDROID_CALLBACK to "onAndroidCallback" ++ ) + } + + companion object { +diff --git a/node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/events/constants/EventKeys.kt b/node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/events/constants/EventKeys.kt +index d059b2c..3882f1e 100644 +--- a/node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/events/constants/EventKeys.kt ++++ b/node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/events/constants/EventKeys.kt +@@ -4,35 +4,37 @@ private fun ns(name: String): String { + val namespace = "rct.mapbox" + return String.format("%s.%s", namespace, name) + } ++ + enum class EventKeys(val value: String) { + // map events +- MAP_CLICK(ns("map.press")), +- MAP_LONG_CLICK(ns("map.longpress")), +- MAP_ONCHANGE(ns("map.change")), +- MAP_ON_LOCATION_CHANGE(ns("map.location.change")), +- MAP_ANDROID_CALLBACK(ns("map.androidcallback")), +- MAP_USER_TRACKING_MODE_CHANGE(ns("map.usertrackingmodechange")), ++ MAP_CLICK("topPress"), ++ MAP_LONG_CLICK("topLongPress"), ++ MAP_ONCHANGE("topMapChange"), ++ MAP_ON_LOCATION_CHANGE("topLocationChange"), ++ MAP_ANDROID_CALLBACK("topAndroidCallback"), ++ MAP_USER_TRACKING_MODE_CHANGE("topUserTrackingModeChange"), + + // point annotation events +- POINT_ANNOTATION_SELECTED(ns("pointannotation.selected")), +- POINT_ANNOTATION_DESELECTED(ns("pointannotation.deselected")), +- POINT_ANNOTATION_DRAG_START(ns("pointannotation.dragstart")), +- POINT_ANNOTATION_DRAG(ns("pointannotation.drag")), +- POINT_ANNOTATION_DRAG_END(ns("pointannotation.dragend")), ++ POINT_ANNOTATION_SELECTED("topMapboxPointAnnotationSelected"), ++ POINT_ANNOTATION_DESELECTED("topMapboxPointAnnotationDeselected"), ++ POINT_ANNOTATION_DRAG_START("topMapboxPointAnnotationDragStart"), ++ POINT_ANNOTATION_DRAG("topMapboxPointAnnotationDrag"), ++ POINT_ANNOTATION_DRAG_END("topMapboxPointAnnotationDragEnd"), + + // source events +- SHAPE_SOURCE_LAYER_CLICK(ns("shapesource.layer.pressed")), +- VECTOR_SOURCE_LAYER_CLICK(ns("vectorsource.layer.pressed")), +- RASTER_SOURCE_LAYER_CLICK(ns("rastersource.layer.pressed")), ++ SHAPE_SOURCE_LAYER_CLICK("topMapboxShapeSourcePress"), ++ VECTOR_SOURCE_LAYER_CLICK("topMapboxVectorSourcePress"), ++ RASTER_SOURCE_LAYER_CLICK("topMapboxRasterSourcePress"), + + // images event +- IMAGES_MISSING(ns("images.missing")), ++ IMAGES_MISSING("topImageMissing"), + + // location events ++ // TODO: not sure about this one since it is not registered anywhere + USER_LOCATION_UPDATE(ns("user.location.update")), + + // viewport events +- VIEWPORT_STATUS_CHANGE(ns("viewport.statuschange")) ++ VIEWPORT_STATUS_CHANGE("topStatusChanged") + } + + fun eventMapOf(vararg values: Pair): Map { diff --git a/patches/lottie-react-native+6.5.1.patch b/patches/lottie-react-native+6.5.1+001+recycling.patch similarity index 100% rename from patches/lottie-react-native+6.5.1.patch rename to patches/lottie-react-native+6.5.1+001+recycling.patch diff --git a/patches/lottie-react-native+6.5.1+002+bridgeless.patch b/patches/lottie-react-native+6.5.1+002+bridgeless.patch new file mode 100644 index 000000000000..854d26f9beb9 --- /dev/null +++ b/patches/lottie-react-native+6.5.1+002+bridgeless.patch @@ -0,0 +1,25 @@ +diff --git a/node_modules/lottie-react-native/android/src/main/java/com/airbnb/android/react/lottie/OnAnimationFailureEvent.kt b/node_modules/lottie-react-native/android/src/main/java/com/airbnb/android/react/lottie/OnAnimationFailureEvent.kt +index aa538d3..0185eaf 100644 +--- a/node_modules/lottie-react-native/android/src/main/java/com/airbnb/android/react/lottie/OnAnimationFailureEvent.kt ++++ b/node_modules/lottie-react-native/android/src/main/java/com/airbnb/android/react/lottie/OnAnimationFailureEvent.kt +@@ -21,6 +21,6 @@ constructor(surfaceId: Int, viewId: Int, private val error: Throwable) : + } + + companion object { +- const val EVENT_NAME = "topAnimationFailureEvent" ++ const val EVENT_NAME = "topAnimationFailure" + } + } +\ No newline at end of file +diff --git a/node_modules/lottie-react-native/android/src/main/java/com/airbnb/android/react/lottie/OnAnimationLoadedEvent.kt b/node_modules/lottie-react-native/android/src/main/java/com/airbnb/android/react/lottie/OnAnimationLoadedEvent.kt +index f17cff9..4ebe3ba 100644 +--- a/node_modules/lottie-react-native/android/src/main/java/com/airbnb/android/react/lottie/OnAnimationLoadedEvent.kt ++++ b/node_modules/lottie-react-native/android/src/main/java/com/airbnb/android/react/lottie/OnAnimationLoadedEvent.kt +@@ -16,6 +16,6 @@ class OnAnimationLoadedEvent constructor(surfaceId: Int, viewId: Int) : + } + + companion object { +- const val EVENT_NAME = "topAnimationLoadedEvent" ++ const val EVENT_NAME = "topAnimationLoaded" + } + } diff --git a/patches/react-native+0.75.2+011+textinput-clear-command.patch b/patches/react-native+0.75.2+011+textinput-clear-command.patch index 773dde04ef44..6723d36d6c6c 100644 --- a/patches/react-native+0.75.2+011+textinput-clear-command.patch +++ b/patches/react-native+0.75.2+011+textinput-clear-command.patch @@ -1,3 +1,51 @@ +diff --git a/node_modules/react-native/Libraries/Components/TextInput/AndroidTextInputNativeComponent.js b/node_modules/react-native/Libraries/Components/TextInput/AndroidTextInputNativeComponent.js +index a77e5b4..6c4bbb2 100644 +--- a/node_modules/react-native/Libraries/Components/TextInput/AndroidTextInputNativeComponent.js ++++ b/node_modules/react-native/Libraries/Components/TextInput/AndroidTextInputNativeComponent.js +@@ -412,6 +412,13 @@ export type NativeProps = $ReadOnly<{| + $ReadOnly<{|target: Int32, text: string|}>, + >, + ++ /** ++ * Invoked when the user performs the clear action. ++ */ ++ onClear?: ?BubblingEventHandler< ++ $ReadOnly<{|target: Int32, eventCount: Int32, text: string|}>, ++ >, ++ + /** + * Callback that is called when a key is pressed. + * This will be called with `{ nativeEvent: { key: keyValue } }` +@@ -655,6 +662,9 @@ export const __INTERNAL_VIEW_CONFIG: PartialViewConfig = { + }, + }, + directEventTypes: { ++ topClear: { ++ registrationName: 'onClear', ++ }, + topScroll: { + registrationName: 'onScroll', + }, +@@ -693,6 +703,7 @@ export const __INTERNAL_VIEW_CONFIG: PartialViewConfig = { + textTransform: true, + returnKeyType: true, + keyboardType: true, ++ onClear: true, + multiline: true, + color: {process: require('../../StyleSheet/processColor').default}, + autoComplete: true, +diff --git a/node_modules/react-native/Libraries/Components/TextInput/RCTTextInputViewConfig.js b/node_modules/react-native/Libraries/Components/TextInput/RCTTextInputViewConfig.js +index 0aa8965..0b14171 100644 +--- a/node_modules/react-native/Libraries/Components/TextInput/RCTTextInputViewConfig.js ++++ b/node_modules/react-native/Libraries/Components/TextInput/RCTTextInputViewConfig.js +@@ -146,6 +146,7 @@ const RCTTextInputViewConfig = { + lineBreakStrategyIOS: true, + smartInsertDelete: true, + ...ConditionallyIgnoredEventHandlers({ ++ onClear: true, + onChange: true, + onSelectionChange: true, + onContentSizeChange: true, diff --git a/node_modules/react-native/Libraries/Components/TextInput/RCTTextInputViewConfig.js b/node_modules/react-native/Libraries/Components/TextInput/RCTTextInputViewConfig.js index 0aa8965..3bfe22c 100644 --- a/node_modules/react-native/Libraries/Components/TextInput/RCTTextInputViewConfig.js diff --git a/patches/react-native-modal+13.0.1.patch b/patches/react-native-modal+13.0.1.patch index cc9c8531e3a3..bd65871cf5ac 100644 --- a/patches/react-native-modal+13.0.1.patch +++ b/patches/react-native-modal+13.0.1.patch @@ -11,7 +11,7 @@ index b63bcfc..bd6419e 100644 buildPanResponder: () => void; getAccDistancePerDirection: (gestureState: PanResponderGestureState) => number; diff --git a/node_modules/react-native-modal/dist/modal.js b/node_modules/react-native-modal/dist/modal.js -index 80f4e75..5a58eae 100644 +index 80f4e75..46277ea 100644 --- a/node_modules/react-native-modal/dist/modal.js +++ b/node_modules/react-native-modal/dist/modal.js @@ -75,6 +75,13 @@ export class ReactNativeModal extends React.Component { @@ -28,7 +28,18 @@ index 80f4e75..5a58eae 100644 this.shouldPropagateSwipe = (evt, gestureState) => { return typeof this.props.propagateSwipe === 'function' ? this.props.propagateSwipe(evt, gestureState) -@@ -453,10 +460,18 @@ export class ReactNativeModal extends React.Component { +@@ -383,7 +390,9 @@ export class ReactNativeModal extends React.Component { + this.setState({ + isVisible: false, + }, () => { +- this.props.onModalHide(); ++ if (Platform.OS !== 'ios') { ++ this.props.onModalHide(); ++ } + }); + }); + } +@@ -453,10 +462,18 @@ export class ReactNativeModal extends React.Component { if (this.state.isVisible) { this.open(); } @@ -48,7 +59,7 @@ index 80f4e75..5a58eae 100644 if (this.didUpdateDimensionsEmitter) { this.didUpdateDimensionsEmitter.remove(); } -@@ -464,6 +479,9 @@ export class ReactNativeModal extends React.Component { +@@ -464,6 +481,9 @@ export class ReactNativeModal extends React.Component { InteractionManager.clearInteractionHandle(this.interactionHandle); this.interactionHandle = null; } @@ -58,9 +69,21 @@ index 80f4e75..5a58eae 100644 } componentDidUpdate(prevProps) { // If the animations have been changed then rebuild them to make sure we're -@@ -525,7 +543,7 @@ export class ReactNativeModal extends React.Component { +@@ -490,7 +510,7 @@ export class ReactNativeModal extends React.Component { + } + render() { + /* eslint-disable @typescript-eslint/no-unused-vars */ +- const { animationIn, animationInTiming, animationOut, animationOutTiming, avoidKeyboard, coverScreen, hasBackdrop, backdropColor, backdropOpacity, backdropTransitionInTiming, backdropTransitionOutTiming, customBackdrop, children, isVisible, onModalShow, onBackButtonPress, useNativeDriver, propagateSwipe, style, ...otherProps } = this.props; ++ const { animationIn, animationInTiming, animationOut, animationOutTiming, avoidKeyboard, coverScreen, hasBackdrop, backdropColor, backdropOpacity, backdropTransitionInTiming, backdropTransitionOutTiming, customBackdrop, children, isVisible, onModalShow, onBackButtonPress, useNativeDriver, propagateSwipe, style, onDismiss, ...otherProps } = this.props; + const { testID, ...containerProps } = otherProps; + const computedStyle = [ + { margin: this.getDeviceWidth() * 0.05, transform: [{ translateY: 0 }] }, +@@ -523,9 +543,9 @@ export class ReactNativeModal extends React.Component { + this.makeBackdrop(), + containerView)); } - return (React.createElement(Modal, Object.assign({ transparent: true, animationType: 'none', visible: this.state.isVisible, onRequestClose: onBackButtonPress }, otherProps), +- return (React.createElement(Modal, Object.assign({ transparent: true, animationType: 'none', visible: this.state.isVisible, onRequestClose: onBackButtonPress }, otherProps), ++ return (React.createElement(Modal, Object.assign({ transparent: true, animationType: 'none', visible: this.state.isVisible, onRequestClose: onBackButtonPress, onDismiss: () => {onDismiss();if (Platform.OS === 'ios'){this.props.onModalHide();}} }, otherProps), this.makeBackdrop(), - avoidKeyboard ? (React.createElement(KeyboardAvoidingView, { behavior: Platform.OS === 'ios' ? 'padding' : undefined, pointerEvents: "box-none", style: computedStyle.concat([{ margin: 0 }]) }, containerView)) : (containerView))); + avoidKeyboard ? (React.createElement(KeyboardAvoidingView, { behavior: 'padding', pointerEvents: "box-none", style: computedStyle.concat([{ margin: 0 }]) }, containerView)) : (containerView))); diff --git a/patches/react-native-pager-view+6.4.1.patch b/patches/react-native-pager-view+6.4.1.patch new file mode 100644 index 000000000000..64b2b580ecd3 --- /dev/null +++ b/patches/react-native-pager-view+6.4.1.patch @@ -0,0 +1,73 @@ +--- a/node_modules/react-native-pager-view/ios/Fabric/RNCPagerViewComponentView.mm ++++ b/node_modules/react-native-pager-view/ios/Fabric/RNCPagerViewComponentView.mm +@@ -195,13 +195,10 @@ -(void)scrollViewDidScroll:(UIScrollView *)scrollView { + + strongEventEmitter.onPageScroll(RNCViewPagerEventEmitter::OnPageScroll{.position = static_cast(position), .offset = offset}); + +- //This is temporary workaround to allow animations based on onPageScroll event +- //until Fabric implements proper NativeAnimationDriver +- RCTBridge *bridge = [RCTBridge currentBridge]; +- +- if (bridge) { +- [bridge.eventDispatcher sendEvent:[[RCTOnPageScrollEvent alloc] initWithReactTag:[NSNumber numberWithInt:self.tag] position:@(position) offset:@(offset)]]; +- } ++ NSDictionary *userInfo = [NSDictionary dictionaryWithObjectsAndKeys:[[RCTOnPageScrollEvent alloc] initWithReactTag:[NSNumber numberWithInt:self.tag] position:@(position) offset:@(offset)], @"event", nil]; ++ [[NSNotificationCenter defaultCenter] postNotificationName:@"RCTNotifyEventDispatcherObserversOfEvent_DEPRECATED" ++ object:nil ++ userInfo:userInfo]; + } + + #pragma mark - Internal methods +diff --git a/node_modules/react-native-pager-view/ios/LEGACY/Fabric/LEGACY_RNCPagerViewComponentView.mm b/node_modules/react-native-pager-view/ios/LEGACY/Fabric/LEGACY_RNCPagerViewComponentView.mm +index 7608645..84f6f60 100644 +--- a/node_modules/react-native-pager-view/ios/LEGACY/Fabric/LEGACY_RNCPagerViewComponentView.mm ++++ b/node_modules/react-native-pager-view/ios/LEGACY/Fabric/LEGACY_RNCPagerViewComponentView.mm +@@ -363,14 +363,10 @@ - (void)scrollViewDidScroll:(UIScrollView *)scrollView { + int eventPosition = (int) position; + strongEventEmitter.onPageScroll(LEGACY_RNCViewPagerEventEmitter::OnPageScroll{.position = static_cast(eventPosition), .offset = interpolatedOffset}); + +- //This is temporary workaround to allow animations based on onPageScroll event +- //until Fabric implements proper NativeAnimationDriver +- RCTBridge *bridge = [RCTBridge currentBridge]; +- +- if (bridge) { +- [bridge.eventDispatcher sendEvent:[[RCTOnPageScrollEvent alloc] initWithReactTag:[NSNumber numberWithInt:self.tag] position:@(position) offset:@(interpolatedOffset)]]; +- } +- ++ NSDictionary *userInfo = [NSDictionary dictionaryWithObjectsAndKeys:[[RCTOnPageScrollEvent alloc] initWithReactTag:[NSNumber numberWithInt:self.tag] position:@(position) offset:@(interpolatedOffset)], @"event", nil]; ++ [[NSNotificationCenter defaultCenter] postNotificationName:@"RCTNotifyEventDispatcherObserversOfEvent_DEPRECATED" ++ object:nil ++ userInfo:userInfo]; + } + + +diff --git a/node_modules/react-native-pager-view/ios/LEGACY/LEGACY_RNCPagerView.m b/node_modules/react-native-pager-view/ios/LEGACY/LEGACY_RNCPagerView.m +index 5f6c535..fd6c2a1 100644 +--- a/node_modules/react-native-pager-view/ios/LEGACY/LEGACY_RNCPagerView.m ++++ b/node_modules/react-native-pager-view/ios/LEGACY/LEGACY_RNCPagerView.m +@@ -1,5 +1,5 @@ + #import "LEGACY_RNCPagerView.h" +-#import "React/RCTLog.h" ++#import + #import + + #import "UIViewController+CreateExtension.h" +diff --git a/node_modules/react-native-pager-view/ios/RNCPagerView.m b/node_modules/react-native-pager-view/ios/RNCPagerView.m +index 584aada..978496f 100644 +--- a/node_modules/react-native-pager-view/ios/RNCPagerView.m ++++ b/node_modules/react-native-pager-view/ios/RNCPagerView.m +@@ -1,12 +1,12 @@ + + #import "RNCPagerView.h" +-#import "React/RCTLog.h" ++#import + #import + + #import "UIViewController+CreateExtension.h" + #import "RCTOnPageScrollEvent.h" + #import "RCTOnPageScrollStateChanged.h" +-#import "React/RCTUIManagerObserverCoordinator.h" ++#import + #import "RCTOnPageSelected.h" + #import + diff --git a/patches/react-native-performance+5.1.0+001+bridgeless.patch b/patches/react-native-performance+5.1.0+001+bridgeless.patch new file mode 100644 index 000000000000..7aed8cf57487 --- /dev/null +++ b/patches/react-native-performance+5.1.0+001+bridgeless.patch @@ -0,0 +1,30 @@ +diff --git a/node_modules/react-native-performance/android/src/main/java/com/oblador/performance/PerformanceModule.java b/node_modules/react-native-performance/android/src/main/java/com/oblador/performance/PerformanceModule.java +index 2fa7d5d..10e1ba6 100644 +--- a/node_modules/react-native-performance/android/src/main/java/com/oblador/performance/PerformanceModule.java ++++ b/node_modules/react-native-performance/android/src/main/java/com/oblador/performance/PerformanceModule.java +@@ -17,7 +17,7 @@ import java.util.Queue; + import java.util.concurrent.ConcurrentLinkedQueue; + + // Should extend NativeRNPerformanceManagerSpec when codegen for old architecture is solved +-public class PerformanceModule extends ReactContextBaseJavaModule implements TurboModule, RNPerformance.MarkerListener { ++public class PerformanceModule extends NativeRNPerformanceManagerSpec implements RNPerformance.MarkerListener { + public static final String PERFORMANCE_MODULE = "RNPerformanceManager"; + public static final String BRIDGE_SETUP_START = "bridgeSetupStart"; + +@@ -118,6 +118,16 @@ public class PerformanceModule extends ReactContextBaseJavaModule implements Tur + return PERFORMANCE_MODULE; + } + ++ @Override ++ public void addListener(String eventName) { ++ // needed for spec ++ } ++ ++ @Override ++ public void removeListeners(double count) { ++ // needed for spec ++ } ++ + private void emitNativeStartupTime() { + safelyEmitMark(new PerformanceMark("nativeLaunchStart", StartTimeProvider.getStartTime())); + safelyEmitMark(new PerformanceMark("nativeLaunchEnd", StartTimeProvider.getEndTime())); diff --git a/patches/react-native-quick-sqlite+8.1.0+001+bridgeless.patch b/patches/react-native-quick-sqlite+8.1.0+001+bridgeless.patch new file mode 100644 index 000000000000..8f8a13d684e5 --- /dev/null +++ b/patches/react-native-quick-sqlite+8.1.0+001+bridgeless.patch @@ -0,0 +1,41 @@ +diff --git a/node_modules/react-native-quick-sqlite/ios/QuickSQLite.mm b/node_modules/react-native-quick-sqlite/ios/QuickSQLite.mm +index 519f31a..308f746 100644 +--- a/node_modules/react-native-quick-sqlite/ios/QuickSQLite.mm ++++ b/node_modules/react-native-quick-sqlite/ios/QuickSQLite.mm +@@ -12,12 +12,12 @@ @implementation QuickSQLite + + RCT_EXPORT_MODULE(QuickSQLite) + ++@synthesize bridge = _bridge; + + RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(install) { + NSLog(@"Installing QuickSQLite module..."); + +- RCTBridge *bridge = [RCTBridge currentBridge]; +- RCTCxxBridge *cxxBridge = (RCTCxxBridge *)bridge; ++ RCTCxxBridge *cxxBridge = (RCTCxxBridge *)self.bridge; + if (cxxBridge == nil) { + return @false; + } +@@ -29,7 +29,7 @@ @implementation QuickSQLite + return @false; + } + auto &runtime = *jsiRuntime; +- auto callInvoker = bridge.jsCallInvoker; ++ auto callInvoker = cxxBridge.jsCallInvoker; + + // Get appGroupID value from Info.plist using key "AppGroup" + NSString *appGroupID = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"ReactNativeQuickSQLite_AppGroup"]; +diff --git a/node_modules/react-native-quick-sqlite/src/index.ts b/node_modules/react-native-quick-sqlite/src/index.ts +index b3e7fc7..7d8930a 100644 +--- a/node_modules/react-native-quick-sqlite/src/index.ts ++++ b/node_modules/react-native-quick-sqlite/src/index.ts +@@ -15,7 +15,7 @@ if (global.__QuickSQLiteProxy == null) { + } + + // Check if we are running on-device (JSI) +- if (global.nativeCallSyncHook == null || QuickSQLiteModule.install == null) { ++ if ((!global.nativeCallSyncHook && !global.RN$Bridgeless) || QuickSQLiteModule.install == null) { + throw new Error( + 'Failed to install react-native-quick-sqlite: React Native is not running on-device. QuickSQLite can only be used when synchronous method invocations (JSI) are possible. If you are using a remote debugger (e.g. Chrome), switch to an on-device debugger (e.g. Flipper) instead.' + ); diff --git a/patches/react-native-vision-camera+4.0.0-beta.13+001+rn75-compatibility.patch b/patches/react-native-vision-camera+4.0.0-beta.13+001+rn75-compatibility.patch index 4e0961ec536a..7c585ddf9f27 100644 --- a/patches/react-native-vision-camera+4.0.0-beta.13+001+rn75-compatibility.patch +++ b/patches/react-native-vision-camera+4.0.0-beta.13+001+rn75-compatibility.patch @@ -729,10 +729,10 @@ index 25e1f55..33b9dd3 100644 + } } diff --git a/node_modules/react-native-vision-camera/android/src/main/java/com/mrousavy/camera/CameraViewManager.kt b/node_modules/react-native-vision-camera/android/src/main/java/com/mrousavy/camera/CameraViewManager.kt -index f2b284c..e348e5c 100644 +index f2b284c..4bb2ebc 100644 --- a/node_modules/react-native-vision-camera/android/src/main/java/com/mrousavy/camera/CameraViewManager.kt +++ b/node_modules/react-native-vision-camera/android/src/main/java/com/mrousavy/camera/CameraViewManager.kt -@@ -4,7 +4,10 @@ import com.facebook.react.bridge.ReadableMap +@@ -4,8 +4,18 @@ import com.facebook.react.bridge.ReadableMap import com.facebook.react.common.MapBuilder import com.facebook.react.uimanager.ThemedReactContext import com.facebook.react.uimanager.ViewGroupManager @@ -740,10 +740,18 @@ index f2b284c..e348e5c 100644 import com.facebook.react.uimanager.annotations.ReactProp +import com.facebook.react.viewmanagers.CameraViewManagerDelegate +import com.facebook.react.viewmanagers.CameraViewManagerInterface ++import com.mrousavy.camera.types.CameraCodeScannedEvent import com.mrousavy.camera.types.CameraDeviceFormat ++import com.mrousavy.camera.types.CameraErrorEvent ++import com.mrousavy.camera.types.CameraInitializedEvent ++import com.mrousavy.camera.types.CameraShutterEvent ++import com.mrousavy.camera.types.CameraStartedEvent ++import com.mrousavy.camera.types.CameraStoppedEvent ++import com.mrousavy.camera.types.CameraViewReadyEvent import com.mrousavy.camera.types.CodeScannerOptions import com.mrousavy.camera.types.Orientation -@@ -16,10 +19,19 @@ import com.mrousavy.camera.types.Torch + import com.mrousavy.camera.types.PixelFormat +@@ -16,10 +26,19 @@ import com.mrousavy.camera.types.Torch import com.mrousavy.camera.types.VideoStabilizationMode @Suppress("unused") @@ -764,7 +772,28 @@ index f2b284c..e348e5c 100644 public override fun createViewInstance(context: ThemedReactContext): CameraView = CameraView(context) override fun onAfterUpdateTransaction(view: CameraView) { -@@ -46,37 +58,37 @@ class CameraViewManager : ViewGroupManager() { +@@ -29,13 +48,13 @@ class CameraViewManager : ViewGroupManager() { + + override fun getExportedCustomDirectEventTypeConstants(): MutableMap? = + MapBuilder.builder() +- .put("cameraViewReady", MapBuilder.of("registrationName", "onViewReady")) +- .put("cameraInitialized", MapBuilder.of("registrationName", "onInitialized")) +- .put("cameraStarted", MapBuilder.of("registrationName", "onStarted")) +- .put("cameraStopped", MapBuilder.of("registrationName", "onStopped")) +- .put("cameraShutter", MapBuilder.of("registrationName", "onShutter")) +- .put("cameraError", MapBuilder.of("registrationName", "onError")) +- .put("cameraCodeScanned", MapBuilder.of("registrationName", "onCodeScanned")) ++ .put(CameraViewReadyEvent.EVENT_NAME, MapBuilder.of("registrationName", "onViewReady")) ++ .put(CameraInitializedEvent.EVENT_NAME, MapBuilder.of("registrationName", "onInitialized")) ++ .put(CameraStartedEvent.EVENT_NAME, MapBuilder.of("registrationName", "onStarted")) ++ .put(CameraStoppedEvent.EVENT_NAME, MapBuilder.of("registrationName", "onStopped")) ++ .put(CameraShutterEvent.EVENT_NAME, MapBuilder.of("registrationName", "onShutter")) ++ .put(CameraErrorEvent.EVENT_NAME, MapBuilder.of("registrationName", "onError")) ++ .put(CameraCodeScannedEvent.EVENT_NAME, MapBuilder.of("registrationName", "onCodeScanned")) + .build() + + override fun getName(): String = TAG +@@ -46,37 +65,37 @@ class CameraViewManager : ViewGroupManager() { } @ReactProp(name = "cameraId") @@ -809,7 +838,7 @@ index f2b284c..e348e5c 100644 if (pixelFormat != null) { val newPixelFormat = PixelFormat.fromUnionValue(pixelFormat) view.pixelFormat = newPixelFormat -@@ -86,27 +98,27 @@ class CameraViewManager : ViewGroupManager() { +@@ -86,27 +105,27 @@ class CameraViewManager : ViewGroupManager() { } @ReactProp(name = "enableDepthData") @@ -842,7 +871,7 @@ index f2b284c..e348e5c 100644 if (videoStabilizationMode != null) { val newMode = VideoStabilizationMode.fromUnionValue(videoStabilizationMode) view.videoStabilizationMode = newMode -@@ -116,12 +128,12 @@ class CameraViewManager : ViewGroupManager() { +@@ -116,12 +135,12 @@ class CameraViewManager : ViewGroupManager() { } @ReactProp(name = "enablePortraitEffectsMatteDelivery") @@ -857,7 +886,7 @@ index f2b284c..e348e5c 100644 if (format != null) { val newFormat = CameraDeviceFormat.fromJSValue(format) view.format = newFormat -@@ -131,7 +143,7 @@ class CameraViewManager : ViewGroupManager() { +@@ -131,7 +150,7 @@ class CameraViewManager : ViewGroupManager() { } @ReactProp(name = "resizeMode") @@ -866,7 +895,7 @@ index f2b284c..e348e5c 100644 if (resizeMode != null) { val newMode = ResizeMode.fromUnionValue(resizeMode) view.resizeMode = newMode -@@ -141,7 +153,7 @@ class CameraViewManager : ViewGroupManager() { +@@ -141,7 +160,7 @@ class CameraViewManager : ViewGroupManager() { } @ReactProp(name = "androidPreviewViewType") @@ -875,7 +904,7 @@ index f2b284c..e348e5c 100644 if (androidPreviewViewType != null) { val newMode = PreviewViewType.fromUnionValue(androidPreviewViewType) view.androidPreviewViewType = newMode -@@ -154,17 +166,17 @@ class CameraViewManager : ViewGroupManager() { +@@ -154,17 +173,17 @@ class CameraViewManager : ViewGroupManager() { // We're treating -1 as "null" here, because when I make the fps parameter // of type "Int?" the react bridge throws an error. @ReactProp(name = "fps", defaultInt = -1) @@ -896,7 +925,7 @@ index f2b284c..e348e5c 100644 if (photoQualityBalance != null) { val newMode = QualityBalance.fromUnionValue(photoQualityBalance) view.photoQualityBalance = newMode -@@ -174,22 +186,22 @@ class CameraViewManager : ViewGroupManager() { +@@ -174,22 +193,22 @@ class CameraViewManager : ViewGroupManager() { } @ReactProp(name = "videoHdr") @@ -923,7 +952,7 @@ index f2b284c..e348e5c 100644 if (torch != null) { val newMode = Torch.fromUnionValue(torch) view.torch = newMode -@@ -199,17 +211,17 @@ class CameraViewManager : ViewGroupManager() { +@@ -199,17 +218,17 @@ class CameraViewManager : ViewGroupManager() { } @ReactProp(name = "zoom") @@ -944,7 +973,7 @@ index f2b284c..e348e5c 100644 if (orientation != null) { val newMode = Orientation.fromUnionValue(orientation) view.orientation = newMode -@@ -219,7 +231,7 @@ class CameraViewManager : ViewGroupManager() { +@@ -219,7 +238,7 @@ class CameraViewManager : ViewGroupManager() { } @ReactProp(name = "codeScannerOptions") @@ -953,7 +982,7 @@ index f2b284c..e348e5c 100644 if (codeScannerOptions != null) { val newCodeScannerOptions = CodeScannerOptions.fromJSValue(codeScannerOptions) view.codeScannerOptions = newCodeScannerOptions -@@ -227,4 +239,8 @@ class CameraViewManager : ViewGroupManager() { +@@ -227,4 +246,8 @@ class CameraViewManager : ViewGroupManager() { view.codeScannerOptions = null } } @@ -981,6 +1010,79 @@ index b9d3f67..cb70963 100644 @Suppress("KotlinJniMissingFunction") // we use fbjni. class VisionCameraProxy(private val reactContext: ReactApplicationContext) { companion object { +diff --git a/node_modules/react-native-vision-camera/android/src/main/java/com/mrousavy/camera/types/Events.kt b/node_modules/react-native-vision-camera/android/src/main/java/com/mrousavy/camera/types/Events.kt +index 1ed0355..b8ff7cf 100644 +--- a/node_modules/react-native-vision-camera/android/src/main/java/com/mrousavy/camera/types/Events.kt ++++ b/node_modules/react-native-vision-camera/android/src/main/java/com/mrousavy/camera/types/Events.kt +@@ -3,39 +3,61 @@ package com.mrousavy.camera.types + import com.facebook.react.bridge.Arguments + import com.facebook.react.bridge.WritableMap + import com.facebook.react.uimanager.events.Event ++import com.mrousavy.camera.types.CameraInitializedEvent.Companion.EVENT_NAME + + class CameraInitializedEvent(surfaceId: Int, viewId: Int) : Event(surfaceId, viewId) { +- override fun getEventName() = "cameraInitialized" ++ override fun getEventName() = EVENT_NAME + override fun getEventData(): WritableMap = Arguments.createMap() ++ companion object { ++ const val EVENT_NAME = "topInitialized" ++ } + } + + class CameraStartedEvent(surfaceId: Int, viewId: Int) : Event(surfaceId, viewId) { +- override fun getEventName() = "cameraStarted" ++ override fun getEventName() = EVENT_NAME + override fun getEventData(): WritableMap = Arguments.createMap() ++ companion object { ++ const val EVENT_NAME = "topStarted" ++ } + } + + class CameraStoppedEvent(surfaceId: Int, viewId: Int) : Event(surfaceId, viewId) { +- override fun getEventName() = "cameraStopped" ++ override fun getEventName() = EVENT_NAME + override fun getEventData(): WritableMap = Arguments.createMap() ++ companion object { ++ const val EVENT_NAME = "topStopped" ++ } + } + + class CameraShutterEvent(surfaceId: Int, viewId: Int, private val data: WritableMap) : Event(surfaceId, viewId) { +- override fun getEventName() = "cameraShutter" ++ override fun getEventName() = EVENT_NAME + override fun getEventData() = data ++ companion object { ++ const val EVENT_NAME = "topShutter" ++ } + } + + class CameraErrorEvent(surfaceId: Int, viewId: Int, private val data: WritableMap) : Event(surfaceId, viewId) { +- override fun getEventName() = "cameraError" ++ override fun getEventName() = EVENT_NAME + override fun getEventData() = data ++ companion object { ++ const val EVENT_NAME = "topError" ++ } + } + + class CameraViewReadyEvent(surfaceId: Int, viewId: Int) : Event(surfaceId, viewId) { +- override fun getEventName() = "cameraViewReady" ++ override fun getEventName() = EVENT_NAME + override fun getEventData(): WritableMap = Arguments.createMap() ++ companion object { ++ const val EVENT_NAME = "topViewReady" ++ } + } + + class CameraCodeScannedEvent(surfaceId: Int, viewId: Int, private val data: WritableMap) : + Event(surfaceId, viewId) { +- override fun getEventName() = "cameraCodeScanned" ++ override fun getEventName() = EVENT_NAME + override fun getEventData() = data ++ companion object { ++ const val EVENT_NAME = "topCodeScanned" ++ } + } diff --git a/node_modules/react-native-vision-camera/ios/.swift-version b/node_modules/react-native-vision-camera/ios/.swift-version new file mode 100644 index 0000000..ef425ca