react-native-macos 0.0.0-e28e9e314 → 0.0.0-e2ffa3f99

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 (165) hide show
  1. package/Libraries/Blob/React-RCTBlob.podspec +1 -1
  2. package/Libraries/Core/ReactNativeVersion.js +1 -1
  3. package/Libraries/Image/React-RCTImage.podspec +1 -1
  4. package/Libraries/LinkingIOS/React-RCTLinking.podspec +1 -1
  5. package/Libraries/NativeAnimation/Nodes/RCTColorAnimatedNode.h +14 -0
  6. package/Libraries/NativeAnimation/Nodes/RCTColorAnimatedNode.m +30 -0
  7. package/Libraries/NativeAnimation/Nodes/RCTPropsAnimatedNode.m +11 -6
  8. package/Libraries/NativeAnimation/Nodes/RCTStyleAnimatedNode.m +8 -4
  9. package/Libraries/NativeAnimation/RCTNativeAnimatedNodesManager.m +2 -0
  10. package/Libraries/NativeAnimation/React-RCTAnimation.podspec +2 -2
  11. package/Libraries/Network/React-RCTNetwork.podspec +1 -1
  12. package/Libraries/PushNotificationIOS/React-RCTPushNotification.podspec +1 -1
  13. package/Libraries/Settings/React-RCTSettings.podspec +1 -1
  14. package/Libraries/Text/BaseText/RCTBaseTextViewManager.m +7 -0
  15. package/Libraries/Text/RCTTextAttributes.h +9 -3
  16. package/Libraries/Text/RCTTextAttributes.m +17 -0
  17. package/Libraries/Text/Text/RCTTextView.m +5 -11
  18. package/Libraries/TypeSafety/RCTTypeSafety.podspec +1 -1
  19. package/Libraries/Vibration/React-RCTVibration.podspec +1 -1
  20. package/React/Base/RCTConstants.h +6 -0
  21. package/React/Base/RCTConstants.m +15 -0
  22. package/React/Base/RCTVersion.m +1 -1
  23. package/React/Base/Surface/SurfaceHostingView/RCTSurfaceHostingView.mm +0 -1
  24. package/React/CoreModules/RCTLogBox.h +1 -1
  25. package/React/CoreModules/RCTLogBox.mm +35 -19
  26. package/React/CoreModules/RCTLogBoxView.h +8 -5
  27. package/React/CoreModules/RCTLogBoxView.mm +64 -23
  28. package/React/CoreModules/React-CoreModules.podspec +1 -1
  29. package/React/FBReactNativeSpec/FBReactNativeSpec.podspec +1 -1
  30. package/React/Fabric/Mounting/ComponentViews/ActivityIndicator/RCTActivityIndicatorViewComponentView.h +1 -1
  31. package/React/Fabric/Mounting/ComponentViews/InputAccessory/RCTInputAccessoryComponentView.h +1 -1
  32. package/React/Fabric/Mounting/ComponentViews/InputAccessory/RCTInputAccessoryContentView.h +1 -1
  33. package/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropComponentView.h +1 -1
  34. package/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropComponentView.mm +0 -8
  35. package/React/Fabric/Mounting/ComponentViews/Modal/RCTFabricModalHostViewController.h +1 -1
  36. package/React/Fabric/Mounting/ComponentViews/Root/RCTRootComponentView.h +1 -1
  37. package/React/Fabric/Mounting/ComponentViews/SafeAreaView/RCTSafeAreaViewComponentView.h +1 -1
  38. package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTEnhancedScrollView.h +2 -2
  39. package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTEnhancedScrollView.mm +3 -3
  40. package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTPullToRefreshViewComponentView.h +1 -1
  41. package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.h +2 -2
  42. package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.mm +14 -14
  43. package/React/Fabric/Mounting/ComponentViews/Slider/RCTSliderComponentView.h +1 -1
  44. package/React/Fabric/Mounting/ComponentViews/Switch/RCTSwitchComponentView.h +1 -1
  45. package/React/Fabric/Mounting/ComponentViews/Text/RCTAccessibilityElement.h +1 -1
  46. package/React/Fabric/Mounting/ComponentViews/Text/RCTParagraphComponentAccessibilityProvider.h +1 -1
  47. package/React/Fabric/Mounting/ComponentViews/Text/RCTParagraphComponentView.h +1 -1
  48. package/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.h +1 -1
  49. package/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm +3 -3
  50. package/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputUtils.h +5 -4
  51. package/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputUtils.mm +2 -2
  52. package/React/Fabric/Mounting/ComponentViews/UnimplementedComponent/RCTUnimplementedNativeComponentView.h +2 -1
  53. package/React/Fabric/Mounting/ComponentViews/UnimplementedView/RCTUnimplementedViewComponentView.h +1 -1
  54. package/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.h +1 -1
  55. package/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm +5 -4
  56. package/React/Fabric/Mounting/RCTComponentViewClassDescriptor.h +1 -1
  57. package/React/Fabric/Mounting/RCTComponentViewDescriptor.h +1 -1
  58. package/React/Fabric/Mounting/RCTComponentViewFactory.h +1 -1
  59. package/React/Fabric/Mounting/RCTComponentViewFactory.mm +17 -1
  60. package/React/Fabric/Mounting/RCTComponentViewProtocol.h +2 -2
  61. package/React/Fabric/Mounting/RCTComponentViewRegistry.h +6 -1
  62. package/React/Fabric/Mounting/RCTComponentViewRegistry.mm +39 -0
  63. package/React/Fabric/Mounting/RCTMountingManager.h +1 -1
  64. package/React/Fabric/Mounting/RCTMountingManager.mm +9 -2
  65. package/React/Fabric/Mounting/RCTMountingManagerDelegate.h +1 -1
  66. package/React/Fabric/Mounting/RCTMountingTransactionObserving.h +1 -1
  67. package/React/Fabric/Mounting/UIView+ComponentViewProtocol.h +2 -2
  68. package/React/Fabric/Mounting/UIView+ComponentViewProtocol.mm +1 -1
  69. package/React/Fabric/RCTConversions.h +1 -1
  70. package/React/Fabric/RCTImageResponseDelegate.h +1 -1
  71. package/React/Fabric/RCTLocalizationProvider.h +1 -1
  72. package/React/Fabric/RCTScheduler.h +1 -1
  73. package/React/Fabric/RCTSurfacePresenter.h +7 -1
  74. package/React/Fabric/RCTSurfacePresenter.mm +13 -1
  75. package/React/Fabric/RCTSurfacePresenterBridgeAdapter.h +1 -1
  76. package/React/Fabric/RCTSurfaceRegistry.h +1 -1
  77. package/React/Fabric/RCTSurfaceTouchHandler.h +1 -1
  78. package/React/Fabric/RCTTouchableComponentViewProtocol.h +1 -1
  79. package/React/Fabric/Surface/RCTFabricSurface.mm +1 -1
  80. package/React/Fabric/Utils/RCTGenericDelegateSplitter.h +1 -1
  81. package/React/Modules/RCTSurfacePresenterStub.h +4 -0
  82. package/React/React-RCTFabric.podspec +1 -1
  83. package/React/Tests/Mounting/RCTComponentViewRegistryTests.mm +0 -1
  84. package/React/Views/RCTMaskedView.h +1 -1
  85. package/React/Views/RCTModalHostView.h +1 -1
  86. package/React/Views/RCTModalHostViewController.h +1 -1
  87. package/React/Views/RCTModalManager.h +1 -1
  88. package/React/Views/RCTView.m +1 -1
  89. package/React/Views/RCTWrapperViewController.h +1 -1
  90. package/React/Views/RefreshControl/RCTRefreshControl.h +2 -2
  91. package/React/Views/RefreshControl/RCTRefreshableProtocol.h +1 -1
  92. package/React/Views/SafeAreaView/RCTSafeAreaView.h +1 -1
  93. package/React/Views/SafeAreaView/RCTSafeAreaViewLocalData.h +1 -1
  94. package/React/Views/ScrollView/RCTScrollView.m +0 -30
  95. package/React/Views/ScrollView/RCTScrollableProtocol.h +1 -1
  96. package/ReactAndroid/gradle.properties +1 -1
  97. package/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/viewPropConversions.h +527 -0
  98. package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +1 -1
  99. package/ReactAndroid/src/main/jni/Application.mk +1 -1
  100. package/ReactAndroid/src/main/jni/first-party/fb/BUCK +1 -1
  101. package/ReactAndroid/src/main/jni/react/jni/Android.mk +2 -2
  102. package/ReactCommon/ReactCommon.podspec +1 -1
  103. package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
  104. package/ReactCommon/cxxreact/tests/BUCK +1 -1
  105. package/ReactCommon/microprofiler/BUCK +1 -1
  106. package/ReactCommon/react/debug/react_native_assert.h +1 -1
  107. package/ReactCommon/react/renderer/animations/LayoutAnimationKeyFrameManager.cpp +6 -6
  108. package/ReactCommon/react/renderer/animations/LayoutAnimationKeyFrameManager.h +4 -3
  109. package/ReactCommon/react/renderer/animations/conversions.h +11 -11
  110. package/ReactCommon/react/renderer/animations/tests/LayoutAnimationTest.cpp +1 -1
  111. package/ReactCommon/react/renderer/attributedstring/TextAttributes.cpp +16 -16
  112. package/ReactCommon/react/renderer/attributedstring/TextAttributes.h +14 -14
  113. package/ReactCommon/react/renderer/attributedstring/conversions.h +1 -1
  114. package/ReactCommon/react/renderer/components/legacyviewmanagerinterop/RCTLegacyViewManagerInteropCoordinator.h +1 -1
  115. package/ReactCommon/react/renderer/components/text/ParagraphShadowNode.h +1 -1
  116. package/ReactCommon/react/renderer/components/textinput/androidtextinput/react/renderer/components/androidtextinput/AndroidTextInputShadowNode.h +1 -1
  117. package/ReactCommon/react/renderer/components/textinput/iostextinput/TextInputProps.cpp +1 -1
  118. package/ReactCommon/react/renderer/components/textinput/iostextinput/TextInputProps.h +1 -1
  119. package/ReactCommon/react/renderer/components/textinput/iostextinput/primitives.h +3 -4
  120. package/ReactCommon/react/renderer/components/view/AccessibilityPrimitives.h +6 -6
  121. package/ReactCommon/react/renderer/components/view/ViewProps.h +3 -1
  122. package/ReactCommon/react/renderer/components/view/ViewPropsInterpolation.h +3 -3
  123. package/ReactCommon/react/renderer/components/view/YogaLayoutableShadowNode.cpp +16 -16
  124. package/ReactCommon/react/renderer/components/view/conversions.h +5 -6
  125. package/ReactCommon/react/renderer/components/view/primitives.h +4 -3
  126. package/ReactCommon/react/renderer/components/view/propsConversions.h +2 -0
  127. package/ReactCommon/react/renderer/core/ComponentDescriptor.h +5 -5
  128. package/ReactCommon/react/renderer/core/ConcreteComponentDescriptor.h +7 -7
  129. package/ReactCommon/react/renderer/core/ConcreteShadowNode.h +2 -2
  130. package/ReactCommon/react/renderer/core/Props.h +0 -4
  131. package/ReactCommon/react/renderer/core/RawProps.h +1 -1
  132. package/ReactCommon/react/renderer/core/ShadowNode.cpp +2 -2
  133. package/ReactCommon/react/renderer/core/ShadowNode.h +5 -5
  134. package/ReactCommon/react/renderer/core/propsConversions.h +6 -5
  135. package/ReactCommon/react/renderer/core/tests/ComponentDescriptorTest.cpp +3 -3
  136. package/ReactCommon/react/renderer/debug/debugStringConvertibleUtils.h +3 -3
  137. package/ReactCommon/react/renderer/graphics/platform/ios/Color.h +1 -1
  138. package/ReactCommon/react/renderer/graphics/platform/ios/RCTPlatformColorUtils.mm +1 -1
  139. package/ReactCommon/react/renderer/imagemanager/platform/ios/RCTImageManager.h +1 -1
  140. package/ReactCommon/react/renderer/imagemanager/platform/ios/RCTImagePrimitivesConversions.h +1 -1
  141. package/ReactCommon/react/renderer/imagemanager/platform/ios/RCTSyncImageManager.h +1 -1
  142. package/ReactCommon/react/renderer/mounting/MountingCoordinator.cpp +2 -2
  143. package/ReactCommon/react/renderer/mounting/MountingCoordinator.h +3 -3
  144. package/ReactCommon/react/renderer/mounting/MountingOverrideDelegate.h +1 -1
  145. package/ReactCommon/react/renderer/mounting/ShadowTreeRevision.h +0 -2
  146. package/ReactCommon/react/renderer/mounting/StubView.h +1 -1
  147. package/ReactCommon/react/renderer/mounting/StubViewTree.cpp +1 -1
  148. package/ReactCommon/react/renderer/runtimescheduler/Task.h +3 -2
  149. package/ReactCommon/react/renderer/scheduler/Scheduler.cpp +1 -2
  150. package/ReactCommon/react/renderer/scheduler/Scheduler.h +1 -1
  151. package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/NSTextStorage+FontScaling.h +1 -1
  152. package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/RCTAttributedTextUtils.h +1 -1
  153. package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/RCTAttributedTextUtils.mm +8 -8
  154. package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/RCTFontProperties.h +1 -1
  155. package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/RCTFontUtils.h +1 -1
  156. package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/RCTTextLayoutManager.h +1 -1
  157. package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/RCTTextPrimitivesConversions.h +1 -1
  158. package/ReactCommon/react/utils/ContextContainer.h +2 -2
  159. package/ReactCommon/react/utils/SimpleThreadSafeCache.h +2 -2
  160. package/ReactCommon/yoga/Yoga.podspec +1 -1
  161. package/package.json +4 -1
  162. package/scripts/react_native_pods.rb +1 -1
  163. package/template/Gemfile.lock +1 -1
  164. package/template/package.json +1 -1
  165. package/ReactCommon/butter/optional.h +0 -38
@@ -9,10 +9,11 @@
9
9
 
10
10
  #import <React/RCTLog.h>
11
11
  #import <React/RCTSurface.h>
12
+ #import <React/RCTSurfaceHostingView.h>
12
13
 
13
14
  #if !TARGET_OS_OSX // TODO(macOS GH#774)
14
15
 
15
- @implementation RCTLogBoxWindow { // TODO(macOS GH#774) Renamed from _view to _window
16
+ @implementation RCTLogBoxView {
16
17
  RCTSurface *_surface;
17
18
  }
18
19
 
@@ -34,35 +35,53 @@
34
35
  self.rootViewController = _rootViewController;
35
36
  }
36
37
 
37
- - (instancetype)initWithFrame:(CGRect)frame bridge:(RCTBridge *)bridge
38
+ - (instancetype)initWithFrame:(CGRect)frame surfacePresenter:(id<RCTSurfacePresenterStub>)surfacePresenter
38
39
  {
39
- if ((self = [super initWithFrame:frame])) {
40
- self.windowLevel = UIWindowLevelStatusBar - 1;
41
- self.backgroundColor = [UIColor clearColor];
40
+ if (self = [super initWithFrame:frame]) {
41
+ id<RCTSurfaceProtocol> surface = [surfacePresenter createFabricSurfaceForModuleName:@"LogBox"
42
+ initialProperties:@{}];
43
+ [surface start];
44
+ RCTSurfaceHostingView *rootView = [[RCTSurfaceHostingView alloc]
45
+ initWithSurface:surface
46
+ sizeMeasureMode:RCTSurfaceSizeMeasureModeWidthExact | RCTSurfaceSizeMeasureModeHeightExact];
47
+
48
+ [self createRootViewController:rootView];
49
+ }
50
+ return self;
51
+ }
42
52
 
43
- _surface = [[RCTSurface alloc] initWithBridge:bridge moduleName:@"LogBox" initialProperties:@{}];
53
+ - (instancetype)initWithWindow:(UIWindow *)window bridge:(RCTBridge *)bridge
54
+ {
55
+ if (@available(iOS 13.0, *)) {
56
+ self = [super initWithWindowScene:window.windowScene];
57
+ } else {
58
+ self = [super initWithFrame:window.frame];
59
+ }
44
60
 
45
- [_surface start];
46
- [_surface setSize:frame.size];
61
+ self.windowLevel = UIWindowLevelStatusBar - 1;
62
+ self.backgroundColor = [UIColor clearColor];
47
63
 
48
- if (![_surface synchronouslyWaitForStage:RCTSurfaceStageSurfaceDidInitialMounting timeout:1]) {
49
- RCTLogInfo(@"Failed to mount LogBox within 1s");
50
- }
64
+ _surface = [[RCTSurface alloc] initWithBridge:bridge moduleName:@"LogBox" initialProperties:@{}];
65
+ [_surface start];
51
66
 
52
- [self createRootViewController:(UIView *)_surface.view];
67
+ if (![_surface synchronouslyWaitForStage:RCTSurfaceStageSurfaceDidInitialMounting timeout:1]) {
68
+ RCTLogInfo(@"Failed to mount LogBox within 1s");
53
69
  }
70
+ [self createRootViewController:(UIView *)_surface.view];
71
+
54
72
  return self;
55
73
  }
56
74
 
57
- - (void)dealloc
75
+ - (void)layoutSubviews
58
76
  {
59
- [RCTSharedApplication().delegate.window makeKeyWindow];
77
+ [super layoutSubviews];
78
+ [_surface setSize:self.frame.size];
60
79
  }
61
80
 
62
- - (void)hide // [TODO(macOS GH#774)
81
+ - (void)dealloc
63
82
  {
64
- [self setHidden:YES];
65
- } // ]TODO(macOS GH#774)
83
+ [RCTSharedApplication().delegate.window makeKeyWindow];
84
+ }
66
85
 
67
86
  - (void)show
68
87
  {
@@ -74,10 +93,30 @@
74
93
 
75
94
  #else // [TODO(macOS GH#774)
76
95
 
77
- @implementation RCTLogBoxWindow { // TODO(macOS GH#774) Renamed from _view to _window
96
+ @implementation RCTLogBoxView {
78
97
  RCTSurface *_surface;
79
98
  }
80
99
 
100
+ - (instancetype)initWithSurfacePresenter:(id<RCTSurfacePresenterStub>)surfacePresenter
101
+ {
102
+ NSRect bounds = NSMakeRect(0, 0, 600, 800);
103
+ if ((self = [self initWithContentRect:bounds
104
+ styleMask:NSWindowStyleMaskTitled
105
+ backing:NSBackingStoreBuffered
106
+ defer:YES])) {
107
+ id<RCTSurfaceProtocol> surface = [surfacePresenter createFabricSurfaceForModuleName:@"LogBox"
108
+ initialProperties:@{}];
109
+ [surface start];
110
+ RCTSurfaceHostingView *rootView = [[RCTSurfaceHostingView alloc]
111
+ initWithSurface:surface
112
+ sizeMeasureMode:RCTSurfaceSizeMeasureModeWidthExact | RCTSurfaceSizeMeasureModeHeightExact];
113
+
114
+ self.contentView = rootView;
115
+ self.contentView.autoresizingMask = NSViewWidthSizable | NSViewHeightSizable;
116
+ }
117
+ return self;
118
+ }
119
+
81
120
  - (instancetype)initWithBridge:(RCTBridge *)bridge
82
121
  {
83
122
  NSRect bounds = NSMakeRect(0, 0, 600, 800);
@@ -100,13 +139,15 @@
100
139
  return self;
101
140
  }
102
141
 
103
- - (void)hide
142
+ - (void)setHidden:(BOOL)hidden // [TODO(macOS GH#774)
104
143
  {
105
- if (NSApp.modalWindow == self) {
106
- [NSApp stopModal];
144
+ if (hidden) {
145
+ if (NSApp.modalWindow == self) {
146
+ [NSApp stopModal];
147
+ }
148
+ [self orderOut:nil];
107
149
  }
108
- [self orderOut:nil];
109
- }
150
+ } // ]TODO(macOS GH#774)
110
151
 
111
152
  - (void)show
112
153
  {
@@ -37,7 +37,7 @@ Pod::Spec.new do |s|
37
37
  s.header_dir = "CoreModules"
38
38
  s.pod_target_xcconfig = {
39
39
  "USE_HEADERMAP" => "YES",
40
- "CLANG_CXX_LANGUAGE_STANDARD" => "c++14",
40
+ "CLANG_CXX_LANGUAGE_STANDARD" => "c++17",
41
41
  "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/React/CoreModules\" \"$(PODS_ROOT)/RCT-Folly\" \"${PODS_ROOT}/Headers/Public/React-Codegen/react/renderer/components\""
42
42
  }
43
43
 
@@ -39,7 +39,7 @@ Pod::Spec.new do |s|
39
39
 
40
40
  s.pod_target_xcconfig = {
41
41
  "USE_HEADERMAP" => "YES",
42
- "CLANG_CXX_LANGUAGE_STANDARD" => "c++14",
42
+ "CLANG_CXX_LANGUAGE_STANDARD" => "c++17",
43
43
  "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/RCT-Folly\""
44
44
  }
45
45
 
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
- #import <UIKit/UIKit.h>
8
+ #import <React/RCTUIKit.h> // TODO(macOS GH#774)
9
9
 
10
10
  #import <React/RCTViewComponentView.h>
11
11
 
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
- #import <UIKit/UIKit.h>
8
+ #import <React/RCTUIKit.h> // TODO(macOS GH#774)
9
9
 
10
10
  #import <React/RCTViewComponentView.h>
11
11
 
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
- #import <UIKit/UIKit.h>
8
+ #import <React/RCTUIKit.h> // TODO(macOS GH#774)
9
9
 
10
10
  @interface RCTInputAccessoryContentView : UIView
11
11
 
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
- #import <UIKit/UIKit.h>
8
+ #import <React/RCTUIKit.h> // TODO(macOS GH#774)
9
9
 
10
10
  #import <React/RCTViewComponentView.h>
11
11
 
@@ -109,14 +109,6 @@ static NSString *const kRCTLegacyInteropChildIndexKey = @"index";
109
109
 
110
110
  + (BOOL)isSupported:(NSString *)componentName
111
111
  {
112
- RCTLogNewArchitectureValidation(
113
- RCTNotAllowedInBridgeless,
114
- self,
115
- [NSString
116
- stringWithFormat:
117
- @"Legacy ViewManagers should be migrated to Fabric ComponentViews in the new architecture to reduce risk. Component using interop layer: %@",
118
- componentName]);
119
-
120
112
  // Step 1: check if ViewManager with specified name is supported.
121
113
  BOOL isComponentNameSupported =
122
114
  [[RCTLegacyViewManagerInteropComponentView supportedViewManagers] containsObject:componentName];
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
- #import <UIKit/UIKit.h>
8
+ #import <React/RCTUIKit.h> // TODO(macOS GH#774)
9
9
 
10
10
  @protocol RCTFabricModalHostViewControllerDelegate <NSObject>
11
11
  - (void)boundsDidChange:(CGRect)newBounds;
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
- #import <UIKit/UIKit.h>
8
+ #import <React/RCTUIKit.h> // TODO(macOS GH#774)
9
9
 
10
10
  #import <React/RCTViewComponentView.h>
11
11
 
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
- #import <UIKit/UIKit.h>
8
+ #import <React/RCTUIKit.h> // TODO(macOS GH#774)
9
9
 
10
10
  #import <React/RCTViewComponentView.h>
11
11
 
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
- #import <UIKit/UIKit.h>
8
+ #import <React/RCTUIKit.h> // TODO(macOS GH#774)
9
9
 
10
10
  #import <React/RCTGenericDelegateSplitter.h>
11
11
  #import <React/RCTViewComponentView.h>
@@ -27,7 +27,7 @@ NS_ASSUME_NONNULL_BEGIN
27
27
  * `UIScrollView` subclass which has some improvements and tweaks
28
28
  * which are not directly related to React Native.
29
29
  */
30
- @interface RCTEnhancedScrollView : UIScrollView
30
+ @interface RCTEnhancedScrollView : RCTUIScrollView // TODO(macOS GH#774)
31
31
 
32
32
  /*
33
33
  * Returns a delegate splitter that can be used to create as many `UIScrollView` delegates as needed.
@@ -130,9 +130,9 @@
130
130
 
131
131
  #pragma mark - UIScrollViewDelegate
132
132
 
133
- - (void)scrollViewWillEndDragging:(UIScrollView *)scrollView
133
+ - (void)scrollViewWillEndDragging:(RCTUIScrollView *)scrollView
134
134
  withVelocity:(CGPoint)velocity
135
- targetContentOffset:(inout CGPoint *)targetContentOffset
135
+ targetContentOffset:(inout CGPoint *)targetContentOffset // TODO(macOS GH#774)
136
136
  {
137
137
  if (self.snapToOffsets && self.snapToOffsets.count > 0) {
138
138
  // An alternative to enablePaging and snapToInterval which allows setting custom
@@ -259,7 +259,7 @@
259
259
 
260
260
  #pragma mark -
261
261
 
262
- - (BOOL)isHorizontal:(UIScrollView *)scrollView
262
+ - (BOOL)isHorizontal:(RCTUIScrollView *)scrollView // TODO(macOS GH#774)
263
263
  {
264
264
  return scrollView.contentSize.width > self.frame.size.width;
265
265
  }
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
- #import <UIKit/UIKit.h>
8
+ #import <React/RCTUIKit.h> // TODO(macOS GH#774)
9
9
 
10
10
  #import <React/RCTViewComponentView.h>
11
11
 
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
- #import <UIKit/UIKit.h>
8
+ #import <React/RCTUIKit.h> // TODO(macOS GH#774)
9
9
 
10
10
  #import <React/RCTDefines.h>
11
11
  #import <React/RCTGenericDelegateSplitter.h>
@@ -33,7 +33,7 @@ NS_ASSUME_NONNULL_BEGIN
33
33
  /*
34
34
  * Returns an actual UIScrollView that this component uses under the hood.
35
35
  */
36
- @property (nonatomic, strong, readonly) UIScrollView *scrollView;
36
+ @property (nonatomic, strong, readonly) RCTUIScrollView *scrollView; // TODO(macOS GH#774)
37
37
 
38
38
  /*
39
39
  * Returns the subview of the scroll view that the component uses to mount all subcomponents into. That's useful to
@@ -56,7 +56,7 @@ static UIScrollViewIndicatorStyle RCTUIScrollViewIndicatorStyleFromProps(ScrollV
56
56
  // This is just a workaround to allow animations based on onScroll event.
57
57
  // This is only used to animate sticky headers in ScrollViews, and only the contentOffset and tag is used.
58
58
  // TODO: T116850910 [Fabric][iOS] Make Fabric not use legacy RCTEventDispatcher for native-driven AnimatedEvents
59
- static void RCTSendScrollEventForNativeAnimations_DEPRECATED(UIScrollView *scrollView, NSInteger tag)
59
+ static void RCTSendScrollEventForNativeAnimations_DEPRECATED(RCTUIScrollView *scrollView, NSInteger tag) // TODO(macOS GH#774)
60
60
  {
61
61
  static uint16_t coalescingKey = 0;
62
62
  RCTScrollEvent *scrollEvent = [[RCTScrollEvent alloc] initWithEventName:@"onScroll"
@@ -416,7 +416,7 @@ static void RCTSendScrollEventForNativeAnimations_DEPRECATED(UIScrollView *scrol
416
416
  return ![self _shouldDisableScrollInteraction];
417
417
  }
418
418
 
419
- - (void)scrollViewDidScroll:(UIScrollView *)scrollView
419
+ - (void)scrollViewDidScroll:(RCTUIScrollView *)scrollView // TODO(macOS GH#774)
420
420
  {
421
421
  if (!_isUserTriggeredScrolling) {
422
422
  [self _updateStateWithContentOffset];
@@ -435,24 +435,24 @@ static void RCTSendScrollEventForNativeAnimations_DEPRECATED(UIScrollView *scrol
435
435
  [self _remountChildrenIfNeeded];
436
436
  }
437
437
 
438
- - (void)scrollViewDidZoom:(UIScrollView *)scrollView
438
+ - (void)scrollViewDidZoom:(RCTUIScrollView *)scrollView // TODO(macOS GH#774)
439
439
  {
440
440
  [self scrollViewDidScroll:scrollView];
441
441
  }
442
442
 
443
- - (BOOL)scrollViewShouldScrollToTop:(UIScrollView *)scrollView
443
+ - (BOOL)scrollViewShouldScrollToTop:(RCTUIScrollView *)scrollView // TODO(macOS GH#774)
444
444
  {
445
445
  _isUserTriggeredScrolling = YES;
446
446
  return YES;
447
447
  }
448
448
 
449
- - (void)scrollViewDidScrollToTop:(UIScrollView *)scrollView
449
+ - (void)scrollViewDidScrollToTop:(RCTUIScrollView *)scrollView // TODO(macOS GH#774)
450
450
  {
451
451
  _isUserTriggeredScrolling = NO;
452
452
  [self _updateStateWithContentOffset];
453
453
  }
454
454
 
455
- - (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView
455
+ - (void)scrollViewWillBeginDragging:(RCTUIScrollView *)scrollView // TODO(macOS GH#774)
456
456
  {
457
457
  [self _forceDispatchNextScrollEvent];
458
458
 
@@ -464,7 +464,7 @@ static void RCTSendScrollEventForNativeAnimations_DEPRECATED(UIScrollView *scrol
464
464
  _isUserTriggeredScrolling = YES;
465
465
  }
466
466
 
467
- - (void)scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL)decelerate
467
+ - (void)scrollViewDidEndDragging:(RCTUIScrollView *)scrollView willDecelerate:(BOOL)decelerate // TODO(macOS GH#774)
468
468
  {
469
469
  [self _forceDispatchNextScrollEvent];
470
470
 
@@ -476,7 +476,7 @@ static void RCTSendScrollEventForNativeAnimations_DEPRECATED(UIScrollView *scrol
476
476
  [self _updateStateWithContentOffset];
477
477
  }
478
478
 
479
- - (void)scrollViewWillBeginDecelerating:(UIScrollView *)scrollView
479
+ - (void)scrollViewWillBeginDecelerating:(RCTUIScrollView *)scrollView // TODO(macOS GH#774)
480
480
  {
481
481
  [self _forceDispatchNextScrollEvent];
482
482
 
@@ -488,7 +488,7 @@ static void RCTSendScrollEventForNativeAnimations_DEPRECATED(UIScrollView *scrol
488
488
  ->onMomentumScrollBegin([self _scrollViewMetrics]);
489
489
  }
490
490
 
491
- - (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView
491
+ - (void)scrollViewDidEndDecelerating:(RCTUIScrollView *)scrollView // TODO(macOS GH#774)
492
492
  {
493
493
  [self _forceDispatchNextScrollEvent];
494
494
 
@@ -501,12 +501,12 @@ static void RCTSendScrollEventForNativeAnimations_DEPRECATED(UIScrollView *scrol
501
501
  _isUserTriggeredScrolling = NO;
502
502
  }
503
503
 
504
- - (void)scrollViewDidEndScrollingAnimation:(UIScrollView *)scrollView
504
+ - (void)scrollViewDidEndScrollingAnimation:(RCTUIScrollView *)scrollView // TODO(macOS GH#774)
505
505
  {
506
506
  [self _handleFinishedScrolling:scrollView];
507
507
  }
508
508
 
509
- - (void)_handleFinishedScrolling:(UIScrollView *)scrollView
509
+ - (void)_handleFinishedScrolling:(RCTUIScrollView *)scrollView // TODO(macOS GH#774)
510
510
  {
511
511
  [self _forceDispatchNextScrollEvent];
512
512
  [self scrollViewDidScroll:scrollView];
@@ -519,7 +519,7 @@ static void RCTSendScrollEventForNativeAnimations_DEPRECATED(UIScrollView *scrol
519
519
  [self _updateStateWithContentOffset];
520
520
  }
521
521
 
522
- - (void)scrollViewWillBeginZooming:(UIScrollView *)scrollView withView:(nullable UIView *)view
522
+ - (void)scrollViewWillBeginZooming:(RCTUIScrollView *)scrollView withView:(nullable UIView *)view // TODO(macOS GH#774)
523
523
  {
524
524
  [self _forceDispatchNextScrollEvent];
525
525
 
@@ -530,7 +530,7 @@ static void RCTSendScrollEventForNativeAnimations_DEPRECATED(UIScrollView *scrol
530
530
  std::static_pointer_cast<ScrollViewEventEmitter const>(_eventEmitter)->onScrollBeginDrag([self _scrollViewMetrics]);
531
531
  }
532
532
 
533
- - (void)scrollViewDidEndZooming:(UIScrollView *)scrollView withView:(nullable UIView *)view atScale:(CGFloat)scale
533
+ - (void)scrollViewDidEndZooming:(RCTUIScrollView *)scrollView withView:(nullable UIView *)view atScale:(CGFloat)scale // TODO(macOS GH#774)
534
534
  {
535
535
  [self _forceDispatchNextScrollEvent];
536
536
 
@@ -542,7 +542,7 @@ static void RCTSendScrollEventForNativeAnimations_DEPRECATED(UIScrollView *scrol
542
542
  [self _updateStateWithContentOffset];
543
543
  }
544
544
 
545
- - (UIView *)viewForZoomingInScrollView:(__unused UIScrollView *)scrollView
545
+ - (UIView *)viewForZoomingInScrollView:(__unused RCTUIScrollView *)scrollView // TODO(macOS GH#774)
546
546
  {
547
547
  return _containerView;
548
548
  }
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
- #import <UIKit/UIKit.h>
8
+ #import <React/RCTUIKit.h> // TODO(macOS GH#774)
9
9
 
10
10
  #import <React/RCTViewComponentView.h>
11
11
 
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
- #import <UIKit/UIKit.h>
8
+ #import <React/RCTUIKit.h> // TODO(macOS GH#774)
9
9
 
10
10
  #import <React/RCTViewComponentView.h>
11
11
 
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
- #import <UIKit/UIKit.h>
8
+ #import <React/RCTUIKit.h> // TODO(macOS GH#774)
9
9
 
10
10
  NS_ASSUME_NONNULL_BEGIN
11
11
 
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
- #import <UIKit/UIKit.h>
8
+ #import <React/RCTUIKit.h> // TODO(macOS GH#774)
9
9
 
10
10
  #import <react/renderer/attributedstring/AttributedString.h>
11
11
  #import <react/renderer/attributedstring/ParagraphAttributes.h>
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
- #import <UIKit/UIKit.h>
8
+ #import <React/RCTUIKit.h> // TODO(macOS GH#774)
9
9
 
10
10
  #import <React/RCTViewComponentView.h>
11
11
 
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
- #import <UIKit/UIKit.h>
8
+ #import <React/RCTUIKit.h> // TODO(macOS GH#774)
9
9
 
10
10
  #import <React/RCTViewComponentView.h>
11
11
 
@@ -409,7 +409,7 @@ using namespace facebook::react;
409
409
 
410
410
  #pragma mark - RCTBackedTextInputDelegate (UIScrollViewDelegate)
411
411
 
412
- - (void)scrollViewDidScroll:(UIScrollView *)scrollView
412
+ - (void)scrollViewDidScroll:(RCTUIScrollView *)scrollView // TODO(macOS GH#774)
413
413
  {
414
414
  if (_eventEmitter) {
415
415
  std::static_pointer_cast<TextInputEventEmitter const>(_eventEmitter)->onScroll([self _textInputMetrics]);
@@ -566,8 +566,8 @@ using namespace facebook::react;
566
566
 
567
567
  - (void)_restoreTextSelection
568
568
  {
569
- const auto selection = std::dynamic_pointer_cast<TextInputProps const>(_props)->selection.get_pointer();
570
- if (selection == nullptr) {
569
+ auto const selection = std::dynamic_pointer_cast<TextInputProps const>(_props)->selection;
570
+ if (!selection.has_value()) {
571
571
  return;
572
572
  }
573
573
  auto start = [_backedTextInputView positionFromPosition:_backedTextInputView.beginningOfDocument
@@ -5,10 +5,11 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
- #import <UIKit/UIKit.h>
8
+ #import <React/RCTUIKit.h> // TODO(macOS GH#774)
9
+
10
+ #import <optional>
9
11
 
10
12
  #import <React/RCTBackedTextInputViewProtocol.h>
11
- #import <butter/optional.h>
12
13
  #import <react/renderer/components/iostextinput/primitives.h>
13
14
 
14
15
  NS_ASSUME_NONNULL_BEGIN
@@ -17,7 +18,7 @@ void RCTCopyBackedTextInput(
17
18
  UIView<RCTBackedTextInputViewProtocol> *fromTextInput,
18
19
  UIView<RCTBackedTextInputViewProtocol> *toTextInput);
19
20
 
20
- UITextAutocorrectionType RCTUITextAutocorrectionTypeFromOptionalBool(facebook::butter::optional<bool> autoCorrect);
21
+ UITextAutocorrectionType RCTUITextAutocorrectionTypeFromOptionalBool(std::optional<bool> autoCorrect);
21
22
 
22
23
  UITextAutocapitalizationType RCTUITextAutocapitalizationTypeFromAutocapitalizationType(
23
24
  facebook::react::AutocapitalizationType autocapitalizationType);
@@ -25,7 +26,7 @@ UITextAutocapitalizationType RCTUITextAutocapitalizationTypeFromAutocapitalizati
25
26
  UIKeyboardAppearance RCTUIKeyboardAppearanceFromKeyboardAppearance(
26
27
  facebook::react::KeyboardAppearance keyboardAppearance);
27
28
 
28
- UITextSpellCheckingType RCTUITextSpellCheckingTypeFromOptionalBool(facebook::butter::optional<bool> spellCheck);
29
+ UITextSpellCheckingType RCTUITextSpellCheckingTypeFromOptionalBool(std::optional<bool> spellCheck);
29
30
 
30
31
  UITextFieldViewMode RCTUITextFieldViewModeFromTextInputAccessoryVisibilityMode(
31
32
  facebook::react::TextInputAccessoryVisibilityMode mode);
@@ -51,7 +51,7 @@ void RCTCopyBackedTextInput(
51
51
  [toTextInput setSelectedTextRange:fromTextInput.selectedTextRange notifyDelegate:NO];
52
52
  }
53
53
 
54
- UITextAutocorrectionType RCTUITextAutocorrectionTypeFromOptionalBool(facebook::butter::optional<bool> autoCorrect)
54
+ UITextAutocorrectionType RCTUITextAutocorrectionTypeFromOptionalBool(std::optional<bool> autoCorrect)
55
55
  {
56
56
  return autoCorrect.has_value() ? (*autoCorrect ? UITextAutocorrectionTypeYes : UITextAutocorrectionTypeNo)
57
57
  : UITextAutocorrectionTypeDefault;
@@ -84,7 +84,7 @@ UIKeyboardAppearance RCTUIKeyboardAppearanceFromKeyboardAppearance(KeyboardAppea
84
84
  }
85
85
  }
86
86
 
87
- UITextSpellCheckingType RCTUITextSpellCheckingTypeFromOptionalBool(facebook::butter::optional<bool> spellCheck)
87
+ UITextSpellCheckingType RCTUITextSpellCheckingTypeFromOptionalBool(std::optional<bool> spellCheck)
88
88
  {
89
89
  return spellCheck.has_value() ? (*spellCheck ? UITextSpellCheckingTypeYes : UITextSpellCheckingTypeNo)
90
90
  : UITextSpellCheckingTypeDefault;
@@ -5,7 +5,8 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
- #import <UIKit/UIKit.h>
8
+ #import <React/RCTUIKit.h> // TODO(macOS GH#774)
9
+ #import "React/RCTUITextView.h"
9
10
 
10
11
  #import <React/RCTViewComponentView.h>
11
12
 
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
- #import <UIKit/UIKit.h>
8
+ #import <React/RCTUIKit.h> // TODO(macOS GH#774)
9
9
 
10
10
  #import <React/RCTViewComponentView.h>
11
11
 
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
- #import <UIKit/UIKit.h>
8
+ #import <React/RCTUIKit.h> // TODO(macOS GH#774)
9
9
 
10
10
  #import <React/RCTComponentViewProtocol.h>
11
11
  #import <React/RCTConstants.h>
@@ -8,6 +8,7 @@
8
8
  #import "RCTViewComponentView.h"
9
9
 
10
10
  #import <CoreGraphics/CoreGraphics.h>
11
+ #import <QuartzCore/QuartzCore.h>
11
12
  #import <objc/runtime.h>
12
13
 
13
14
  #import <React/RCTAssert.h>
@@ -42,7 +43,7 @@ using namespace facebook::react;
42
43
  return self;
43
44
  }
44
45
 
45
- - (facebook::react::SharedProps)props
46
+ - (facebook::react::Props::Shared)props
46
47
  {
47
48
  return _props;
48
49
  }
@@ -335,12 +336,12 @@ using namespace facebook::react;
335
336
 
336
337
  // `accessibilityValue`
337
338
  if (oldViewProps.accessibilityValue != newViewProps.accessibilityValue) {
338
- if (newViewProps.accessibilityValue.text.hasValue()) {
339
+ if (newViewProps.accessibilityValue.text.has_value()) {
339
340
  self.accessibilityElement.accessibilityValue =
340
341
  RCTNSStringFromStringNilIfEmpty(newViewProps.accessibilityValue.text.value());
341
342
  } else if (
342
- newViewProps.accessibilityValue.now.hasValue() && newViewProps.accessibilityValue.min.hasValue() &&
343
- newViewProps.accessibilityValue.max.hasValue()) {
343
+ newViewProps.accessibilityValue.now.has_value() && newViewProps.accessibilityValue.min.has_value() &&
344
+ newViewProps.accessibilityValue.max.has_value()) {
344
345
  CGFloat val = (CGFloat)(newViewProps.accessibilityValue.now.value()) /
345
346
  (newViewProps.accessibilityValue.max.value() - newViewProps.accessibilityValue.min.value());
346
347
  self.accessibilityElement.accessibilityValue =
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
- #import <UIKit/UIKit.h>
8
+ #import <React/RCTUIKit.h> // TODO(macOS GH#774)
9
9
 
10
10
  #import <React/RCTComponentViewProtocol.h>
11
11
 
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
- #import <UIKit/UIKit.h>
8
+ #import <React/RCTUIKit.h> // TODO(macOS GH#774)
9
9
 
10
10
  #import <React/RCTComponentViewProtocol.h>
11
11
 
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
- #import <UIKit/UIKit.h>
8
+ #import <React/RCTUIKit.h> // TODO(macOS GH#774)
9
9
 
10
10
  #import <React/RCTComponentViewDescriptor.h>
11
11
  #import <React/RCTComponentViewProtocol.h>