react-native 0.74.0-rc.1 → 0.74.0-rc.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.
Files changed (77) hide show
  1. package/Libraries/AppDelegate/RCTAppDelegate.h +5 -8
  2. package/Libraries/AppDelegate/RCTAppDelegate.mm +57 -131
  3. package/Libraries/AppDelegate/RCTRootViewFactory.h +123 -0
  4. package/Libraries/AppDelegate/RCTRootViewFactory.mm +253 -0
  5. package/Libraries/Components/View/ReactNativeStyleAttributes.js +1 -0
  6. package/Libraries/Core/ReactNativeVersion.js +1 -1
  7. package/Libraries/LogBox/Data/parseLogBoxLog.js +1 -1
  8. package/Libraries/StyleSheet/StyleSheetTypes.d.ts +4 -0
  9. package/Libraries/StyleSheet/StyleSheetTypes.js +3 -0
  10. package/React/Base/RCTConvert.h +3 -0
  11. package/React/Base/RCTConvert.mm +9 -0
  12. package/React/Base/RCTVersion.m +1 -1
  13. package/React/CoreModules/RCTRedBox.mm +7 -1
  14. package/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm +32 -0
  15. package/React/Views/RCTCursor.h +13 -0
  16. package/React/Views/RCTView.h +3 -0
  17. package/React/Views/RCTView.m +30 -0
  18. package/React/Views/RCTViewManager.m +2 -0
  19. package/ReactAndroid/api/ReactAndroid.api +9 -56
  20. package/ReactAndroid/build.gradle.kts +26 -0
  21. package/ReactAndroid/cmake-utils/ReactNative-application.cmake +6 -0
  22. package/ReactAndroid/gradle.properties +1 -1
  23. package/ReactAndroid/src/main/java/com/facebook/react/CoreModulesPackage.java +1 -2
  24. package/ReactAndroid/src/main/java/com/facebook/react/DebugCorePackage.java +1 -2
  25. package/ReactAndroid/src/main/java/com/facebook/react/ReactDelegate.java +1 -2
  26. package/ReactAndroid/src/main/java/com/facebook/react/ReactHost.kt +9 -0
  27. package/ReactAndroid/src/main/java/com/facebook/react/ReactInstanceManager.java +5 -0
  28. package/ReactAndroid/src/main/java/com/facebook/react/ReactPackageTurboModuleManagerDelegate.java +3 -3
  29. package/ReactAndroid/src/main/java/com/facebook/react/bridge/JavaModuleWrapper.java +1 -1
  30. package/ReactAndroid/src/main/java/com/facebook/react/bridge/ModuleHolder.java +1 -2
  31. package/ReactAndroid/src/main/java/com/facebook/react/bridge/queue/MessageQueueThreadHandler.java +0 -11
  32. package/ReactAndroid/src/main/java/com/facebook/react/defaults/DefaultReactHostDelegate.kt +1 -1
  33. package/ReactAndroid/src/main/java/com/facebook/react/defaults/DefaultReactNativeHost.kt +11 -6
  34. package/ReactAndroid/src/main/java/com/facebook/react/internal/turbomodule/core/TurboModuleInteropUtils.java +1 -1
  35. package/ReactAndroid/src/main/java/com/facebook/react/internal/turbomodule/core/TurboModuleManager.java +1 -1
  36. package/ReactAndroid/src/main/java/com/facebook/react/internal/turbomodule/core/TurboModuleManagerDelegate.java +1 -1
  37. package/ReactAndroid/src/main/java/com/facebook/react/module/model/ReactModuleInfo.java +10 -0
  38. package/ReactAndroid/src/main/java/com/facebook/react/module/processing/ReactModuleSpecProcessor.java +2 -2
  39. package/ReactAndroid/src/main/java/com/facebook/react/modules/fresco/FrescoModule.java +1 -1
  40. package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/AndroidInfoModule.java +1 -1
  41. package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +1 -1
  42. package/ReactAndroid/src/main/java/com/facebook/react/runtime/CoreReactPackage.java +1 -2
  43. package/ReactAndroid/src/main/java/com/facebook/react/runtime/ReactHostImpl.java +32 -0
  44. package/ReactAndroid/src/main/java/com/facebook/react/shell/MainReactPackage.java +1 -5
  45. package/ReactAndroid/src/main/java/com/facebook/react/turbomodule/core/interfaces/TurboModule.kt +10 -11
  46. package/ReactAndroid/src/main/jni/react/fabric/CoreComponentsRegistry.cpp +0 -2
  47. package/ReactAndroid/src/main/jni/react/jni/JMessageQueueThread.cpp +0 -1
  48. package/ReactAndroid/src/main/jni/react/jni/JMessageQueueThread.h +0 -4
  49. package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
  50. package/ReactCommon/react/nativemodule/core/platform/android/ReactCommon/JavaTurboModule.h +1 -1
  51. package/ReactCommon/react/nativemodule/samples/platform/android/NativeSampleTurboModuleSpec.java +1 -1
  52. package/ReactCommon/react/renderer/components/view/BaseViewProps.cpp +9 -0
  53. package/ReactCommon/react/renderer/components/view/BaseViewProps.h +2 -0
  54. package/ReactCommon/react/renderer/components/view/ViewShadowNode.cpp +1 -1
  55. package/ReactCommon/react/renderer/components/view/conversions.h +22 -0
  56. package/ReactCommon/react/renderer/components/view/primitives.h +2 -0
  57. package/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTHost.h +6 -2
  58. package/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTHost.mm +16 -4
  59. package/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTInstance.mm +37 -6
  60. package/index.js +0 -5
  61. package/package.json +3 -3
  62. package/scripts/codegen/generate-artifacts-executor.js +1 -5
  63. package/sdks/hermes-engine/hermes-utils.rb +4 -3
  64. package/sdks/hermesc/osx-bin/hermes +0 -0
  65. package/sdks/hermesc/osx-bin/hermesc +0 -0
  66. package/sdks/hermesc/win64-bin/hermesc.exe +0 -0
  67. package/template/package.json +3 -3
  68. package/Libraries/Components/PopupMenuAndroid/PopupMenuAndroid.android.js +0 -69
  69. package/Libraries/Components/PopupMenuAndroid/PopupMenuAndroid.d.ts +0 -24
  70. package/Libraries/Components/PopupMenuAndroid/PopupMenuAndroid.js +0 -33
  71. package/Libraries/Components/PopupMenuAndroid/PopupMenuAndroidNativeComponent.js +0 -13
  72. package/ReactAndroid/src/main/java/com/facebook/react/defaults/DefaultBindingsInstaller.kt +0 -20
  73. package/ReactAndroid/src/main/java/com/facebook/react/internal/turbomodule/core/interfaces/TurboModule.kt +0 -19
  74. package/ReactAndroid/src/main/java/com/facebook/react/views/popupmenu/PopupMenuSelectionEvent.kt +0 -38
  75. package/ReactAndroid/src/main/java/com/facebook/react/views/popupmenu/ReactPopupMenuContainer.kt +0 -49
  76. package/ReactAndroid/src/main/java/com/facebook/react/views/popupmenu/ReactPopupMenuManager.kt +0 -54
  77. package/src/private/specs/components/PopupMenuAndroidNativeComponent.js +0 -47
@@ -192,7 +192,7 @@ export function parseComponentStack(message: string): ComponentStack {
192
192
  if (!s) {
193
193
  return null;
194
194
  }
195
- const match = s.match(/(.*) \(at (.*\.js):([\d]+)\)/);
195
+ const match = s.match(/(.*) \(at (.*\.(?:js|jsx|ts|tsx)):([\d]+)\)/);
196
196
  if (!match) {
197
197
  return null;
198
198
  }
@@ -27,6 +27,8 @@ export type DimensionValue =
27
27
  type AnimatableNumericValue = number | Animated.AnimatedNode;
28
28
  type AnimatableStringValue = string | Animated.AnimatedNode;
29
29
 
30
+ export type CursorValue = 'auto' | 'pointer';
31
+
30
32
  /**
31
33
  * Flex Prop Types
32
34
  * @see https://reactnative.dev/docs/flexbox
@@ -274,6 +276,7 @@ export interface ViewStyle extends FlexStyle, ShadowStyleIOS, TransformsStyle {
274
276
  * Controls whether the View can be the target of touch events.
275
277
  */
276
278
  pointerEvents?: 'box-none' | 'none' | 'box-only' | 'auto' | undefined;
279
+ cursor?: CursorValue | undefined;
277
280
  }
278
281
 
279
282
  export type FontVariant =
@@ -403,4 +406,5 @@ export interface ImageStyle extends FlexStyle, ShadowStyleIOS, TransformsStyle {
403
406
  tintColor?: ColorValue | undefined;
404
407
  opacity?: AnimatableNumericValue | undefined;
405
408
  objectFit?: 'cover' | 'contain' | 'fill' | 'scale-down' | undefined;
409
+ cursor?: CursorValue | undefined;
406
410
  }
@@ -37,6 +37,8 @@ export type EdgeInsetsValue = {
37
37
  export type DimensionValue = number | string | 'auto' | AnimatedNode | null;
38
38
  export type AnimatableNumericValue = number | AnimatedNode;
39
39
 
40
+ export type CursorValue = 'auto' | 'pointer';
41
+
40
42
  /**
41
43
  * React Native's layout system is based on Flexbox and is powered both
42
44
  * on iOS and Android by an open source project called `Yoga`:
@@ -729,6 +731,7 @@ export type ____ViewStyle_InternalCore = $ReadOnly<{
729
731
  opacity?: AnimatableNumericValue,
730
732
  elevation?: number,
731
733
  pointerEvents?: 'auto' | 'none' | 'box-none' | 'box-only',
734
+ cursor?: CursorValue,
732
735
  }>;
733
736
 
734
737
  export type ____ViewStyle_Internal = $ReadOnly<{
@@ -11,6 +11,7 @@
11
11
  #import <React/RCTAnimationType.h>
12
12
  #import <React/RCTBorderCurve.h>
13
13
  #import <React/RCTBorderStyle.h>
14
+ #import <React/RCTCursor.h>
14
15
  #import <React/RCTDefines.h>
15
16
  #import <React/RCTLog.h>
16
17
  #import <React/RCTPointerEvents.h>
@@ -80,6 +81,8 @@ typedef NSURL RCTFileURL;
80
81
  + (UIBarStyle)UIBarStyle:(id)json __deprecated;
81
82
  #endif
82
83
 
84
+ + (RCTCursor)RCTCursor:(id)json;
85
+
83
86
  + (CGFloat)CGFloat:(id)json;
84
87
  + (CGPoint)CGPoint:(id)json;
85
88
  + (CGSize)CGSize:(id)json;
@@ -545,6 +545,15 @@ RCT_ENUM_CONVERTER(
545
545
  UIBarStyleDefault,
546
546
  integerValue)
547
547
 
548
+ RCT_ENUM_CONVERTER(
549
+ RCTCursor,
550
+ (@{
551
+ @"auto" : @(RCTCursorAuto),
552
+ @"pointer" : @(RCTCursorPointer),
553
+ }),
554
+ RCTCursorAuto,
555
+ integerValue)
556
+
548
557
  static void convertCGStruct(const char *type, NSArray *fields, CGFloat *result, id json)
549
558
  {
550
559
  NSUInteger count = fields.count;
@@ -24,7 +24,7 @@ NSDictionary* RCTGetReactNativeVersion(void)
24
24
  RCTVersionMajor: @(0),
25
25
  RCTVersionMinor: @(74),
26
26
  RCTVersionPatch: @(0),
27
- RCTVersionPrerelease: @"rc.1",
27
+ RCTVersionPrerelease: @"rc.3",
28
28
  };
29
29
  });
30
30
  return __rnVersion;
@@ -274,7 +274,13 @@ RCT_NOT_IMPLEMENTED(-(instancetype)initWithCoder : (NSCoder *)aDecoder)
274
274
 
275
275
  - (void)reload
276
276
  {
277
- [_actionDelegate reloadFromRedBoxController:self];
277
+ if (_actionDelegate != nil) {
278
+ [_actionDelegate reloadFromRedBoxController:self];
279
+ } else {
280
+ // In bridgeless mode `RCTRedBox` gets deallocated, we need to notify listeners anyway.
281
+ RCTTriggerReloadCommandListeners(@"Redbox");
282
+ [self dismiss];
283
+ }
278
284
  }
279
285
 
280
286
  - (void)showExtraDataViewController
@@ -257,6 +257,11 @@ using namespace facebook::react;
257
257
  self.layer.doubleSided = newViewProps.backfaceVisibility == BackfaceVisibility::Visible;
258
258
  }
259
259
 
260
+ // `cursor`
261
+ if (oldViewProps.cursor != newViewProps.cursor) {
262
+ needsInvalidateLayer = YES;
263
+ }
264
+
260
265
  // `shouldRasterize`
261
266
  if (oldViewProps.shouldRasterize != newViewProps.shouldRasterize) {
262
267
  self.layer.shouldRasterize = newViewProps.shouldRasterize;
@@ -592,6 +597,33 @@ static RCTBorderStyle RCTBorderStyleFromBorderStyle(BorderStyle borderStyle)
592
597
  layer.shadowPath = nil;
593
598
  }
594
599
 
600
+ #if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 170000 /* __IPHONE_17_0 */
601
+ // Stage 1.5. Cursor / Hover Effects
602
+ if (@available(iOS 17.0, *)) {
603
+ UIHoverStyle *hoverStyle = nil;
604
+ if (_props->cursor == Cursor::Pointer) {
605
+ const RCTCornerInsets cornerInsets =
606
+ RCTGetCornerInsets(RCTCornerRadiiFromBorderRadii(borderMetrics.borderRadii), UIEdgeInsetsZero);
607
+ #if TARGET_OS_IOS
608
+ // Due to an Apple bug, it seems on iOS, UIShapes made with `[UIShape shapeWithBezierPath:]`
609
+ // evaluate their shape on the superviews' coordinate space. This leads to the hover shape
610
+ // rendering incorrectly on iOS, iOS apps in compatibility mode on visionOS, but not on visionOS.
611
+ // To work around this, for iOS, we can calculate the border path based on `view.frame` (the
612
+ // superview's coordinate space) instead of view.bounds.
613
+ CGPathRef borderPath = RCTPathCreateWithRoundedRect(self.frame, cornerInsets, NULL);
614
+ #else // TARGET_OS_VISION
615
+ CGPathRef borderPath = RCTPathCreateWithRoundedRect(self.bounds, cornerInsets, NULL);
616
+ #endif
617
+ UIBezierPath *bezierPath = [UIBezierPath bezierPathWithCGPath:borderPath];
618
+ CGPathRelease(borderPath);
619
+ UIShape *shape = [UIShape shapeWithBezierPath:bezierPath];
620
+
621
+ hoverStyle = [UIHoverStyle styleWithEffect:[UIHoverAutomaticEffect effect] shape:shape];
622
+ }
623
+ [self setHoverStyle:hoverStyle];
624
+ }
625
+ #endif
626
+
595
627
  // Stage 2. Border Rendering
596
628
  const bool useCoreAnimationBorderRendering =
597
629
  borderMetrics.borderColors.isUniform() && borderMetrics.borderWidths.isUniform() &&
@@ -0,0 +1,13 @@
1
+ /*
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+ #import <Foundation/Foundation.h>
9
+
10
+ typedef NS_ENUM(NSInteger, RCTCursor) {
11
+ RCTCursorAuto,
12
+ RCTCursorPointer,
13
+ };
@@ -10,6 +10,7 @@
10
10
  #import <React/RCTBorderCurve.h>
11
11
  #import <React/RCTBorderStyle.h>
12
12
  #import <React/RCTComponent.h>
13
+ #import <React/RCTCursor.h>
13
14
  #import <React/RCTPointerEvents.h>
14
15
 
15
16
  extern const UIAccessibilityTraits SwitchAccessibilityTrait;
@@ -120,6 +121,8 @@ extern const UIAccessibilityTraits SwitchAccessibilityTrait;
120
121
  */
121
122
  @property (nonatomic, assign) UIEdgeInsets hitTestEdgeInsets;
122
123
 
124
+ @property (nonatomic, assign) RCTCursor cursor;
125
+
123
126
  /**
124
127
  * (Experimental and unused for Paper) Pointer event handlers.
125
128
  */
@@ -136,6 +136,7 @@ static NSString *RCTRecursiveAccessibilityLabel(UIView *view)
136
136
  _borderCurve = RCTBorderCurveCircular;
137
137
  _borderStyle = RCTBorderStyleSolid;
138
138
  _hitTestEdgeInsets = UIEdgeInsetsZero;
139
+ _cursor = RCTCursorAuto;
139
140
 
140
141
  _backgroundColor = super.backgroundColor;
141
142
  }
@@ -796,6 +797,8 @@ static CGFloat RCTDefaultIfNegativeTo(CGFloat defaultValue, CGFloat x)
796
797
 
797
798
  RCTUpdateShadowPathForView(self);
798
799
 
800
+ RCTUpdateHoverStyleForView(self);
801
+
799
802
  const RCTCornerRadii cornerRadii = [self cornerRadii];
800
803
  const UIEdgeInsets borderInsets = [self bordersAsInsets];
801
804
  const RCTBorderColors borderColors = [self borderColorsWithTraitCollection:self.traitCollection];
@@ -891,6 +894,33 @@ static void RCTUpdateShadowPathForView(RCTView *view)
891
894
  }
892
895
  }
893
896
 
897
+ static void RCTUpdateHoverStyleForView(RCTView *view)
898
+ {
899
+ #if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 170000 /* __IPHONE_17_0 */
900
+ if (@available(iOS 17.0, *)) {
901
+ UIHoverStyle *hoverStyle = nil;
902
+ if ([view cursor] == RCTCursorPointer) {
903
+ const RCTCornerRadii cornerRadii = [view cornerRadii];
904
+ const RCTCornerInsets cornerInsets = RCTGetCornerInsets(cornerRadii, UIEdgeInsetsZero);
905
+ #if TARGET_OS_IOS
906
+ // Due to an Apple bug, it seems on iOS, `[UIShape shapeWithBezierPath:]` needs to
907
+ // be calculated in the superviews' coordinate space (view.frame). This is not true
908
+ // on other platforms like visionOS.
909
+ CGPathRef borderPath = RCTPathCreateWithRoundedRect(view.frame, cornerInsets, NULL);
910
+ #else // TARGET_OS_VISION
911
+ CGPathRef borderPath = RCTPathCreateWithRoundedRect(view.bounds, cornerInsets, NULL);
912
+ #endif
913
+ UIBezierPath *bezierPath = [UIBezierPath bezierPathWithCGPath:borderPath];
914
+ CGPathRelease(borderPath);
915
+ UIShape *shape = [UIShape shapeWithBezierPath:bezierPath];
916
+
917
+ hoverStyle = [UIHoverStyle styleWithEffect:[UIHoverHighlightEffect effect] shape:shape];
918
+ }
919
+ [view setHoverStyle:hoverStyle];
920
+ }
921
+ #endif
922
+ }
923
+
894
924
  - (void)updateClippingForLayer:(CALayer *)layer
895
925
  {
896
926
  CALayer *mask = nil;
@@ -13,6 +13,7 @@
13
13
  #import "RCTBridge.h"
14
14
  #import "RCTConvert+Transform.h"
15
15
  #import "RCTConvert.h"
16
+ #import "RCTCursor.h"
16
17
  #import "RCTLog.h"
17
18
  #import "RCTShadowView.h"
18
19
  #import "RCTUIManager.h"
@@ -195,6 +196,7 @@ RCT_REMAP_VIEW_PROPERTY(testID, reactAccessibilityElement.accessibilityIdentifie
195
196
 
196
197
  RCT_EXPORT_VIEW_PROPERTY(backgroundColor, UIColor)
197
198
  RCT_REMAP_VIEW_PROPERTY(backfaceVisibility, layer.doubleSided, css_backface_visibility_t)
199
+ RCT_EXPORT_VIEW_PROPERTY(cursor, RCTCursor)
198
200
  RCT_REMAP_VIEW_PROPERTY(opacity, alpha, CGFloat)
199
201
  RCT_REMAP_VIEW_PROPERTY(shadowColor, layer.shadowColor, CGColor)
200
202
  RCT_REMAP_VIEW_PROPERTY(shadowOffset, layer.shadowOffset, CGSize)
@@ -196,6 +196,7 @@ public abstract interface class com/facebook/react/ReactHost {
196
196
  public abstract fun getJsEngineResolutionAlgorithm ()Lcom/facebook/react/JSEngineResolutionAlgorithm;
197
197
  public abstract fun getLifecycleState ()Lcom/facebook/react/common/LifecycleState;
198
198
  public abstract fun getReactQueueConfiguration ()Lcom/facebook/react/bridge/queue/ReactQueueConfiguration;
199
+ public abstract fun onActivityResult (Landroid/app/Activity;IILandroid/content/Intent;)V
199
200
  public abstract fun onBackPressed ()Z
200
201
  public abstract fun onHostDestroy ()V
201
202
  public abstract fun onHostDestroy (Landroid/app/Activity;)V
@@ -322,7 +323,7 @@ public abstract class com/facebook/react/ReactPackageTurboModuleManagerDelegate
322
323
  protected fun <init> (Lcom/facebook/react/bridge/ReactApplicationContext;Ljava/util/List;Lcom/facebook/jni/HybridData;)V
323
324
  public fun getEagerInitModuleNames ()Ljava/util/List;
324
325
  public fun getLegacyModule (Ljava/lang/String;)Lcom/facebook/react/bridge/NativeModule;
325
- public fun getModule (Ljava/lang/String;)Lcom/facebook/react/internal/turbomodule/core/interfaces/TurboModule;
326
+ public fun getModule (Ljava/lang/String;)Lcom/facebook/react/turbomodule/core/interfaces/TurboModule;
326
327
  public fun unstable_enableSyncVoidMethods ()Z
327
328
  public fun unstable_isLegacyModuleRegistered (Ljava/lang/String;)Z
328
329
  public fun unstable_isModuleRegistered (Ljava/lang/String;)Z
@@ -2856,6 +2857,7 @@ public class com/facebook/react/module/model/ReactModuleInfo {
2856
2857
  public fun <init> (Ljava/lang/String;Ljava/lang/String;ZZZZ)V
2857
2858
  public fun <init> (Ljava/lang/String;Ljava/lang/String;ZZZZZ)V
2858
2859
  public fun canOverrideExistingModule ()Z
2860
+ public static fun classIsTurboModule (Ljava/lang/Class;)Z
2859
2861
  public fun className ()Ljava/lang/String;
2860
2862
  public fun hasConstants ()Z
2861
2863
  public fun isCxxModule ()Z
@@ -3199,7 +3201,7 @@ public class com/facebook/react/modules/dialog/DialogModule : com/facebook/fbrea
3199
3201
  public fun showAlert (Lcom/facebook/react/bridge/ReadableMap;Lcom/facebook/react/bridge/Callback;Lcom/facebook/react/bridge/Callback;)V
3200
3202
  }
3201
3203
 
3202
- public class com/facebook/react/modules/fresco/FrescoModule : com/facebook/react/bridge/ReactContextBaseJavaModule, com/facebook/react/bridge/LifecycleEventListener, com/facebook/react/internal/turbomodule/core/interfaces/TurboModule, com/facebook/react/modules/common/ModuleDataCleaner$Cleanable {
3204
+ public class com/facebook/react/modules/fresco/FrescoModule : com/facebook/react/bridge/ReactContextBaseJavaModule, com/facebook/react/bridge/LifecycleEventListener, com/facebook/react/modules/common/ModuleDataCleaner$Cleanable, com/facebook/react/turbomodule/core/interfaces/TurboModule {
3203
3205
  public static final field NAME Ljava/lang/String;
3204
3206
  public fun <init> (Lcom/facebook/react/bridge/ReactApplicationContext;)V
3205
3207
  public fun <init> (Lcom/facebook/react/bridge/ReactApplicationContext;Lcom/facebook/imagepipeline/core/ImagePipeline;Z)V
@@ -3440,7 +3442,7 @@ public class com/facebook/react/modules/systeminfo/AndroidInfoHelpers {
3440
3442
  public static fun getServerHost (Ljava/lang/Integer;)Ljava/lang/String;
3441
3443
  }
3442
3444
 
3443
- public class com/facebook/react/modules/systeminfo/AndroidInfoModule : com/facebook/fbreact/specs/NativePlatformConstantsAndroidSpec, com/facebook/react/internal/turbomodule/core/interfaces/TurboModule {
3445
+ public class com/facebook/react/modules/systeminfo/AndroidInfoModule : com/facebook/fbreact/specs/NativePlatformConstantsAndroidSpec, com/facebook/react/turbomodule/core/interfaces/TurboModule {
3444
3446
  public fun <init> (Lcom/facebook/react/bridge/ReactApplicationContext;)V
3445
3447
  public fun getAndroidID ()Ljava/lang/String;
3446
3448
  public fun getTypedExportedConstants ()Ljava/util/Map;
@@ -3601,6 +3603,7 @@ public class com/facebook/react/runtime/ReactHostImpl : com/facebook/react/React
3601
3603
  public fun getLifecycleState ()Lcom/facebook/react/common/LifecycleState;
3602
3604
  public fun getMemoryPressureRouter ()Lcom/facebook/react/MemoryPressureRouter;
3603
3605
  public fun getReactQueueConfiguration ()Lcom/facebook/react/bridge/queue/ReactQueueConfiguration;
3606
+ public fun onActivityResult (Landroid/app/Activity;IILandroid/content/Intent;)V
3604
3607
  public fun onBackPressed ()Z
3605
3608
  public fun onHostDestroy ()V
3606
3609
  public fun onHostDestroy (Landroid/app/Activity;)V
@@ -3806,7 +3809,9 @@ public abstract interface class com/facebook/react/turbomodule/core/interfaces/C
3806
3809
  public abstract interface class com/facebook/react/turbomodule/core/interfaces/NativeMethodCallInvokerHolder {
3807
3810
  }
3808
3811
 
3809
- public abstract interface class com/facebook/react/turbomodule/core/interfaces/TurboModule : com/facebook/react/internal/turbomodule/core/interfaces/TurboModule {
3812
+ public abstract interface class com/facebook/react/turbomodule/core/interfaces/TurboModule {
3813
+ public abstract fun initialize ()V
3814
+ public abstract fun invalidate ()V
3810
3815
  }
3811
3816
 
3812
3817
  public abstract class com/facebook/react/uimanager/BaseViewManager : com/facebook/react/uimanager/ViewManager, android/view/View$OnLayoutChangeListener, com/facebook/react/uimanager/BaseViewManagerInterface {
@@ -5673,17 +5678,6 @@ public abstract interface class com/facebook/react/viewmanagers/AndroidHorizonta
5673
5678
  public abstract fun setRemoveClippedSubviews (Landroid/view/View;Z)V
5674
5679
  }
5675
5680
 
5676
- public class com/facebook/react/viewmanagers/AndroidPopupMenuManagerDelegate : com/facebook/react/uimanager/BaseViewManagerDelegate {
5677
- public fun <init> (Lcom/facebook/react/uimanager/BaseViewManagerInterface;)V
5678
- public fun receiveCommand (Landroid/view/View;Ljava/lang/String;Lcom/facebook/react/bridge/ReadableArray;)V
5679
- public fun setProperty (Landroid/view/View;Ljava/lang/String;Ljava/lang/Object;)V
5680
- }
5681
-
5682
- public abstract interface class com/facebook/react/viewmanagers/AndroidPopupMenuManagerInterface {
5683
- public abstract fun setMenuItems (Landroid/view/View;Lcom/facebook/react/bridge/ReadableArray;)V
5684
- public abstract fun show (Landroid/view/View;)V
5685
- }
5686
-
5687
5681
  public class com/facebook/react/viewmanagers/AndroidProgressBarManagerDelegate : com/facebook/react/uimanager/BaseViewManagerDelegate {
5688
5682
  public fun <init> (Lcom/facebook/react/uimanager/BaseViewManagerInterface;)V
5689
5683
  public fun setProperty (Landroid/view/View;Ljava/lang/String;Ljava/lang/Object;)V
@@ -6153,47 +6147,6 @@ public abstract interface class com/facebook/react/views/modal/ReactModalHostVie
6153
6147
  public abstract fun onRequestClose (Landroid/content/DialogInterface;)V
6154
6148
  }
6155
6149
 
6156
- public final class com/facebook/react/views/popupmenu/PopupMenuSelectionEvent : com/facebook/react/uimanager/events/Event {
6157
- public static final field Companion Lcom/facebook/react/views/popupmenu/PopupMenuSelectionEvent$Companion;
6158
- public static final field EVENT_NAME Ljava/lang/String;
6159
- public fun <init> (III)V
6160
- public fun dispatch (Lcom/facebook/react/uimanager/events/RCTEventEmitter;)V
6161
- public fun getEventName ()Ljava/lang/String;
6162
- }
6163
-
6164
- public final class com/facebook/react/views/popupmenu/PopupMenuSelectionEvent$Companion {
6165
- }
6166
-
6167
- public final class com/facebook/react/views/popupmenu/ReactPopupMenuContainer : android/widget/FrameLayout {
6168
- public fun <init> (Landroid/content/Context;)V
6169
- public final fun setMenuItems (Lcom/facebook/react/bridge/ReadableArray;)V
6170
- public final fun showPopupMenu ()V
6171
- }
6172
-
6173
- public final class com/facebook/react/views/popupmenu/ReactPopupMenuManager : com/facebook/react/uimanager/ViewGroupManager, com/facebook/react/viewmanagers/AndroidPopupMenuManagerInterface {
6174
- public static final field Companion Lcom/facebook/react/views/popupmenu/ReactPopupMenuManager$Companion;
6175
- public static final field REACT_CLASS Ljava/lang/String;
6176
- public fun <init> ()V
6177
- public synthetic fun createViewInstance (Lcom/facebook/react/uimanager/ThemedReactContext;)Landroid/view/View;
6178
- public fun getName ()Ljava/lang/String;
6179
- public synthetic fun receiveCommand (Landroid/view/View;Ljava/lang/String;Lcom/facebook/react/bridge/ReadableArray;)V
6180
- public fun receiveCommand (Lcom/facebook/react/views/popupmenu/ReactPopupMenuContainer;Ljava/lang/String;Lcom/facebook/react/bridge/ReadableArray;)V
6181
- public synthetic fun setMenuItems (Landroid/view/View;Lcom/facebook/react/bridge/ReadableArray;)V
6182
- public fun setMenuItems (Lcom/facebook/react/views/popupmenu/ReactPopupMenuContainer;Lcom/facebook/react/bridge/ReadableArray;)V
6183
- public synthetic fun show (Landroid/view/View;)V
6184
- public fun show (Lcom/facebook/react/views/popupmenu/ReactPopupMenuContainer;)V
6185
- }
6186
-
6187
- public class com/facebook/react/views/popupmenu/ReactPopupMenuManager$$PropsSetter : com/facebook/react/uimanager/ViewManagerPropertyUpdater$ViewManagerSetter {
6188
- public fun <init> ()V
6189
- public fun getProperties (Ljava/util/Map;)V
6190
- public synthetic fun setProperty (Lcom/facebook/react/uimanager/ViewManager;Landroid/view/View;Ljava/lang/String;Ljava/lang/Object;)V
6191
- public fun setProperty (Lcom/facebook/react/views/popupmenu/ReactPopupMenuManager;Lcom/facebook/react/views/popupmenu/ReactPopupMenuContainer;Ljava/lang/String;Ljava/lang/Object;)V
6192
- }
6193
-
6194
- public final class com/facebook/react/views/popupmenu/ReactPopupMenuManager$Companion {
6195
- }
6196
-
6197
6150
  public class com/facebook/react/views/progressbar/ProgressBarShadowNode : com/facebook/react/uimanager/LayoutShadowNode, com/facebook/yoga/YogaMeasureFunction {
6198
6151
  public fun <init> ()V
6199
6152
  public fun getStyle ()Ljava/lang/String;
@@ -125,6 +125,16 @@ val preparePrefab by
125
125
  "react/renderer/components/view/"),
126
126
  Pair("../ReactCommon/react/renderer/components/view/platform/android/", ""),
127
127
  )),
128
+ PrefabPreprocessingEntry(
129
+ "rrc_text",
130
+ Pair(
131
+ "../ReactCommon/react/renderer/components/text/",
132
+ "react/renderer/components/text/")),
133
+ PrefabPreprocessingEntry(
134
+ "rrc_textinput",
135
+ Pair(
136
+ "../ReactCommon/react/renderer/components/textinput/",
137
+ "react/renderer/components/androidtextinput/")),
128
138
  PrefabPreprocessingEntry(
129
139
  "rrc_legacyviewmanagerinterop",
130
140
  Pair(
@@ -138,6 +148,14 @@ val preparePrefab by
138
148
  PrefabPreprocessingEntry(
139
149
  "react_render_mapbuffer",
140
150
  Pair("../ReactCommon/react/renderer/mapbuffer/", "react/renderer/mapbuffer/")),
151
+ PrefabPreprocessingEntry(
152
+ "react_render_textlayoutmanager",
153
+ listOf(
154
+ Pair(
155
+ "../ReactCommon/react/renderer/textlayoutmanager/",
156
+ "react/renderer/textlayoutmanager/"),
157
+ Pair("../ReactCommon/react/renderer/textlayoutmanager/platform/android/", ""),
158
+ )),
141
159
  PrefabPreprocessingEntry(
142
160
  "yoga",
143
161
  listOf(
@@ -538,11 +556,14 @@ android {
538
556
  "rrc_image",
539
557
  "rrc_root",
540
558
  "rrc_view",
559
+ "rrc_text",
560
+ "rrc_textinput",
541
561
  "rrc_legacyviewmanagerinterop",
542
562
  "jsi",
543
563
  "glog",
544
564
  "fabricjni",
545
565
  "react_render_mapbuffer",
566
+ "react_render_textlayoutmanager",
546
567
  "yoga",
547
568
  "folly_runtime",
548
569
  "react_nativemodule_core",
@@ -662,6 +683,8 @@ android {
662
683
  create("rrc_image") { headers = File(prefabHeadersDir, "rrc_image").absolutePath }
663
684
  create("rrc_root") { headers = File(prefabHeadersDir, "rrc_root").absolutePath }
664
685
  create("rrc_view") { headers = File(prefabHeadersDir, "rrc_view").absolutePath }
686
+ create("rrc_text") { headers = File(prefabHeadersDir, "rrc_text").absolutePath }
687
+ create("rrc_textinput") { headers = File(prefabHeadersDir, "rrc_textinput").absolutePath }
665
688
  create("rrc_legacyviewmanagerinterop") {
666
689
  headers = File(prefabHeadersDir, "rrc_legacyviewmanagerinterop").absolutePath
667
690
  }
@@ -671,6 +694,9 @@ android {
671
694
  create("react_render_mapbuffer") {
672
695
  headers = File(prefabHeadersDir, "react_render_mapbuffer").absolutePath
673
696
  }
697
+ create("react_render_textlayoutmanager") {
698
+ headers = File(prefabHeadersDir, "react_render_textlayoutmanager").absolutePath
699
+ }
674
700
  create("yoga") { headers = File(prefabHeadersDir, "yoga").absolutePath }
675
701
  create("folly_runtime") { headers = File(prefabHeadersDir, "folly_runtime").absolutePath }
676
702
  create("react_nativemodule_core") {
@@ -74,10 +74,13 @@ add_library(react_cxxreactpackage ALIAS ReactAndroid::react_cxxreactpackage)
74
74
  add_library(react_render_core ALIAS ReactAndroid::react_render_core)
75
75
  add_library(react_render_graphics ALIAS ReactAndroid::react_render_graphics)
76
76
  add_library(rrc_view ALIAS ReactAndroid::rrc_view)
77
+ add_library(rrc_text ALIAS ReactAndroid::rrc_text)
78
+ add_library(rrc_textinput ALIAS ReactAndroid::rrc_textinput)
77
79
  add_library(jsi ALIAS ReactAndroid::jsi)
78
80
  add_library(glog ALIAS ReactAndroid::glog)
79
81
  add_library(fabricjni ALIAS ReactAndroid::fabricjni)
80
82
  add_library(react_render_mapbuffer ALIAS ReactAndroid::react_render_mapbuffer)
83
+ add_library(react_render_textlayoutmanager ALIAS ReactAndroid::react_render_textlayoutmanager)
81
84
  add_library(yoga ALIAS ReactAndroid::yoga)
82
85
  add_library(folly_runtime ALIAS ReactAndroid::folly_runtime)
83
86
  add_library(react_nativemodule_core ALIAS ReactAndroid::react_nativemodule_core)
@@ -106,8 +109,11 @@ target_link_libraries(${CMAKE_PROJECT_NAME}
106
109
  react_render_graphics # prefab ready
107
110
  react_render_imagemanager # prefab ready
108
111
  react_render_mapbuffer # prefab ready
112
+ react_render_textlayoutmanager # prefab ready
109
113
  rrc_image # prefab ready
110
114
  rrc_view # prefab ready
115
+ rrc_text # prefab ready
116
+ rrc_textinput # prefab ready
111
117
  rrc_legacyviewmanagerinterop # prefab ready
112
118
  runtimeexecutor # prefab ready
113
119
  turbomodulejsijni # prefab ready
@@ -1,4 +1,4 @@
1
- VERSION_NAME=0.74.0-rc.1
1
+ VERSION_NAME=0.74.0-rc.3
2
2
  react.internal.publishingGroup=com.facebook.react
3
3
 
4
4
  android.useAndroidX=true
@@ -17,7 +17,6 @@ import com.facebook.react.bridge.NativeModule;
17
17
  import com.facebook.react.bridge.ReactApplicationContext;
18
18
  import com.facebook.react.bridge.ReactMarker;
19
19
  import com.facebook.react.devsupport.LogBoxModule;
20
- import com.facebook.react.internal.turbomodule.core.interfaces.TurboModule;
21
20
  import com.facebook.react.module.annotations.ReactModule;
22
21
  import com.facebook.react.module.annotations.ReactModuleList;
23
22
  import com.facebook.react.module.model.ReactModuleInfo;
@@ -115,7 +114,7 @@ class CoreModulesPackage extends TurboReactPackage implements ReactPackageLogger
115
114
  reactModule.canOverrideExistingModule(),
116
115
  reactModule.needsEagerInit(),
117
116
  reactModule.isCxxModule(),
118
- TurboModule.class.isAssignableFrom(moduleClass)));
117
+ ReactModuleInfo.classIsTurboModule(moduleClass)));
119
118
  }
120
119
 
121
120
  return () -> reactModuleInfoMap;
@@ -12,7 +12,6 @@ import com.facebook.react.bridge.ModuleSpec;
12
12
  import com.facebook.react.bridge.NativeModule;
13
13
  import com.facebook.react.bridge.ReactApplicationContext;
14
14
  import com.facebook.react.devsupport.JSCHeapCapture;
15
- import com.facebook.react.internal.turbomodule.core.interfaces.TurboModule;
16
15
  import com.facebook.react.module.annotations.ReactModule;
17
16
  import com.facebook.react.module.annotations.ReactModuleList;
18
17
  import com.facebook.react.module.model.ReactModuleInfo;
@@ -74,7 +73,7 @@ class DebugCorePackage extends TurboReactPackage implements ViewManagerOnDemandR
74
73
  reactModule.canOverrideExistingModule(),
75
74
  reactModule.needsEagerInit(),
76
75
  reactModule.isCxxModule(),
77
- TurboModule.class.isAssignableFrom(moduleClass)));
76
+ ReactModuleInfo.classIsTurboModule(moduleClass)));
78
77
  }
79
78
 
80
79
  return () -> reactModuleInfoMap;
@@ -139,8 +139,7 @@ public class ReactDelegate {
139
139
  public void onActivityResult(
140
140
  int requestCode, int resultCode, Intent data, boolean shouldForwardToReactInstance) {
141
141
  if (ReactFeatureFlags.enableBridgelessArchitecture) {
142
- // TODO T156475655: Implement onActivityResult for Bridgeless
143
- return;
142
+ mReactHost.onActivityResult(mActivity, requestCode, resultCode, data);
144
143
  } else {
145
144
  if (getReactNativeHost().hasInstance() && shouldForwardToReactInstance) {
146
145
  getReactNativeHost()
@@ -9,6 +9,7 @@ package com.facebook.react
9
9
 
10
10
  import android.app.Activity
11
11
  import android.content.Context
12
+ import android.content.Intent
12
13
  import android.os.Bundle
13
14
  import com.facebook.react.bridge.ReactContext
14
15
  import com.facebook.react.bridge.queue.ReactQueueConfiguration
@@ -111,6 +112,14 @@ public interface ReactHost {
111
112
  */
112
113
  public fun destroy(reason: String, ex: Exception?): TaskInterface<Void>
113
114
 
115
+ /* To be called when the host activity receives an activity result. */
116
+ public fun onActivityResult(
117
+ activity: Activity,
118
+ requestCode: Int,
119
+ resultCode: Int,
120
+ data: Intent?,
121
+ )
122
+
114
123
  public fun addBeforeDestroyListener(onBeforeDestroy: () -> Unit)
115
124
 
116
125
  public fun removeBeforeDestroyListener(onBeforeDestroy: () -> Unit)
@@ -998,6 +998,11 @@ public class ReactInstanceManager {
998
998
  if (names != null) {
999
999
  uniqueNames.addAll(names);
1000
1000
  }
1001
+ } else {
1002
+ FLog.w(
1003
+ ReactConstants.TAG,
1004
+ "Package %s is not a ViewManagerOnDemandReactPackage, view managers will not be loaded",
1005
+ reactPackage.getClass().getSimpleName());
1001
1006
  }
1002
1007
  Systrace.endSection(TRACE_TAG_REACT_JAVA_BRIDGE);
1003
1008
  }
@@ -18,9 +18,9 @@ import com.facebook.react.bridge.ReactApplicationContext;
18
18
  import com.facebook.react.common.ReactConstants;
19
19
  import com.facebook.react.config.ReactFeatureFlags;
20
20
  import com.facebook.react.internal.turbomodule.core.TurboModuleManagerDelegate;
21
- import com.facebook.react.internal.turbomodule.core.interfaces.TurboModule;
22
21
  import com.facebook.react.module.annotations.ReactModule;
23
22
  import com.facebook.react.module.model.ReactModuleInfo;
23
+ import com.facebook.react.turbomodule.core.interfaces.TurboModule;
24
24
  import java.util.ArrayList;
25
25
  import java.util.HashMap;
26
26
  import java.util.List;
@@ -123,14 +123,14 @@ public abstract class ReactPackageTurboModuleManagerDelegate extends TurboModule
123
123
  reactModule.canOverrideExistingModule(),
124
124
  true,
125
125
  reactModule.isCxxModule(),
126
- TurboModule.class.isAssignableFrom(moduleClass))
126
+ ReactModuleInfo.classIsTurboModule(moduleClass))
127
127
  : new ReactModuleInfo(
128
128
  moduleName,
129
129
  moduleClass.getName(),
130
130
  module.canOverrideExistingModule(),
131
131
  true,
132
132
  CxxModuleWrapper.class.isAssignableFrom(moduleClass),
133
- TurboModule.class.isAssignableFrom(moduleClass));
133
+ ReactModuleInfo.classIsTurboModule(moduleClass));
134
134
 
135
135
  reactModuleInfoMap.put(moduleName, moduleInfo);
136
136
  moduleMap.put(moduleName, module);
@@ -15,7 +15,7 @@ import static com.facebook.systrace.Systrace.TRACE_TAG_REACT_JAVA_BRIDGE;
15
15
 
16
16
  import androidx.annotation.Nullable;
17
17
  import com.facebook.proguard.annotations.DoNotStrip;
18
- import com.facebook.react.internal.turbomodule.core.interfaces.TurboModule;
18
+ import com.facebook.react.turbomodule.core.interfaces.TurboModule;
19
19
  import com.facebook.systrace.Systrace;
20
20
  import com.facebook.systrace.SystraceMessage;
21
21
  import java.lang.reflect.Method;
@@ -20,7 +20,6 @@ import com.facebook.debug.tags.ReactDebugOverlayTags;
20
20
  import com.facebook.infer.annotation.Assertions;
21
21
  import com.facebook.proguard.annotations.DoNotStrip;
22
22
  import com.facebook.react.common.ReactConstants;
23
- import com.facebook.react.internal.turbomodule.core.interfaces.TurboModule;
24
23
  import com.facebook.react.module.model.ReactModuleInfo;
25
24
  import com.facebook.systrace.SystraceMessage;
26
25
  import java.util.concurrent.atomic.AtomicInteger;
@@ -73,7 +72,7 @@ public class ModuleHolder {
73
72
  nativeModule.canOverrideExistingModule(),
74
73
  true,
75
74
  CxxModuleWrapper.class.isAssignableFrom(nativeModule.getClass()),
76
- TurboModule.class.isAssignableFrom(nativeModule.getClass()));
75
+ ReactModuleInfo.classIsTurboModule(nativeModule.getClass()));
77
76
 
78
77
  mModule = nativeModule;
79
78
  PrinterHolder.getPrinter()