react-native-macos 0.0.0-081d66e4e → 0.0.0-0c343d926

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 (251) hide show
  1. package/Libraries/Alert/Alert.js +115 -6
  2. package/Libraries/Alert/NativeAlertManager.js +1 -19
  3. package/Libraries/Blob/React-RCTBlob.podspec +1 -1
  4. package/Libraries/Components/TextInput/RCTTextInputViewConfig.js +1 -0
  5. package/Libraries/Components/TextInput/TextInput.js +77 -1
  6. package/Libraries/Components/View/ReactNativeViewAttributes.js +1 -0
  7. package/Libraries/Components/View/ViewAccessibility.js +0 -5
  8. package/Libraries/Components/View/ViewPropTypes.js +95 -115
  9. package/Libraries/Core/ReactNativeVersion.js +1 -1
  10. package/Libraries/Image/RCTImageView.mm +14 -10
  11. package/Libraries/Image/React-RCTImage.podspec +1 -1
  12. package/Libraries/LinkingIOS/React-RCTLinking.podspec +1 -1
  13. package/Libraries/Lists/VirtualizedList.js +13 -1
  14. package/{ReactCommon/react/renderer/mounting/MountingTransactionMetadata.cpp → Libraries/NativeAnimation/Nodes/RCTColorAnimatedNode.h} +6 -4
  15. package/Libraries/NativeAnimation/Nodes/RCTColorAnimatedNode.m +30 -0
  16. package/Libraries/NativeAnimation/Nodes/RCTPropsAnimatedNode.m +11 -6
  17. package/Libraries/NativeAnimation/Nodes/RCTStyleAnimatedNode.m +8 -4
  18. package/Libraries/NativeAnimation/RCTNativeAnimatedNodesManager.m +2 -0
  19. package/Libraries/NativeAnimation/React-RCTAnimation.podspec +2 -2
  20. package/Libraries/Network/React-RCTNetwork.podspec +1 -1
  21. package/Libraries/PushNotificationIOS/React-RCTPushNotification.podspec +1 -1
  22. package/Libraries/Settings/React-RCTSettings.podspec +1 -1
  23. package/Libraries/Text/BaseText/RCTBaseTextViewManager.m +8 -0
  24. package/Libraries/Text/RCTTextAttributes.h +11 -3
  25. package/Libraries/Text/RCTTextAttributes.m +26 -0
  26. package/Libraries/Text/Text/RCTDynamicTypeRamp.h +40 -0
  27. package/Libraries/Text/Text/RCTDynamicTypeRamp.m +77 -0
  28. package/Libraries/Text/Text/RCTTextView.m +123 -58
  29. package/Libraries/Text/Text.js +0 -14
  30. package/Libraries/Text/TextInput/Multiline/RCTMultilineTextInputView.h +8 -0
  31. package/Libraries/Text/TextInput/Multiline/RCTMultilineTextInputView.m +57 -4
  32. package/Libraries/Text/TextInput/Multiline/RCTMultilineTextInputViewManager.m +13 -0
  33. package/Libraries/Text/TextInput/Multiline/RCTUITextView.h +2 -1
  34. package/Libraries/Text/TextInput/Multiline/RCTUITextView.m +36 -4
  35. package/Libraries/Text/TextInput/RCTBackedTextInputDelegate.h +2 -0
  36. package/Libraries/Text/TextInput/RCTBackedTextInputDelegateAdapter.m +6 -1
  37. package/Libraries/Text/TextInput/RCTBackedTextInputViewProtocol.h +2 -2
  38. package/Libraries/Text/TextInput/RCTBaseTextInputView.h +4 -1
  39. package/Libraries/Text/TextInput/RCTBaseTextInputView.m +57 -0
  40. package/Libraries/Text/TextInput/RCTBaseTextInputViewManager.m +6 -1
  41. package/Libraries/Text/TextInput/Singleline/RCTUITextField.m +16 -0
  42. package/Libraries/Text/TextNativeComponent.js +2 -0
  43. package/Libraries/Text/TextProps.js +29 -0
  44. package/Libraries/TypeSafety/RCTTypeSafety.podspec +1 -1
  45. package/Libraries/Vibration/React-RCTVibration.podspec +1 -1
  46. package/React/Base/RCTAssert.h +30 -15
  47. package/React/Base/RCTAssert.m +59 -19
  48. package/React/Base/RCTBridge.m +5 -3
  49. package/React/Base/RCTConstants.h +6 -0
  50. package/React/Base/RCTConstants.m +15 -0
  51. package/React/Base/RCTConvert.m +7 -4
  52. package/React/Base/RCTEventDispatcherProtocol.h +5 -0
  53. package/React/Base/RCTTouchHandler.m +4 -0
  54. package/React/Base/RCTUIKit.h +62 -13
  55. package/React/Base/RCTUtils.m +6 -3
  56. package/React/Base/RCTVersion.m +1 -1
  57. package/React/Base/Surface/SurfaceHostingView/RCTSurfaceHostingView.mm +0 -1
  58. package/React/Base/macOS/RCTUIKit.m +71 -0
  59. package/React/CoreModules/RCTAlertManager.mm +1 -1
  60. package/React/CoreModules/RCTEventDispatcher.mm +6 -1
  61. package/React/CoreModules/RCTLogBox.h +1 -1
  62. package/React/CoreModules/RCTLogBox.mm +35 -19
  63. package/React/CoreModules/RCTLogBoxView.h +8 -5
  64. package/React/CoreModules/RCTLogBoxView.mm +64 -23
  65. package/React/CoreModules/RCTPerfMonitor.mm +1 -1
  66. package/React/CoreModules/React-CoreModules.podspec +1 -1
  67. package/React/FBReactNativeSpec/FBReactNativeSpec.podspec +1 -1
  68. package/React/Fabric/Mounting/ComponentViews/ActivityIndicator/RCTActivityIndicatorViewComponentView.h +1 -1
  69. package/React/Fabric/Mounting/ComponentViews/ActivityIndicator/RCTActivityIndicatorViewComponentView.mm +3 -2
  70. package/React/Fabric/Mounting/ComponentViews/InputAccessory/RCTInputAccessoryComponentView.h +1 -1
  71. package/React/Fabric/Mounting/ComponentViews/InputAccessory/RCTInputAccessoryComponentView.mm +8 -8
  72. package/React/Fabric/Mounting/ComponentViews/InputAccessory/RCTInputAccessoryContentView.h +2 -2
  73. package/React/Fabric/Mounting/ComponentViews/InputAccessory/RCTInputAccessoryContentView.mm +3 -3
  74. package/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropComponentView.h +2 -1
  75. package/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropComponentView.mm +75 -25
  76. package/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropCoordinatorAdapter.h +1 -1
  77. package/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropCoordinatorAdapter.mm +1 -1
  78. package/React/Fabric/Mounting/ComponentViews/Modal/RCTFabricModalHostViewController.h +1 -1
  79. package/React/Fabric/Mounting/ComponentViews/Modal/RCTModalHostViewComponentView.h +2 -0
  80. package/React/Fabric/Mounting/ComponentViews/Modal/RCTModalHostViewComponentView.mm +10 -5
  81. package/React/Fabric/Mounting/ComponentViews/Root/RCTRootComponentView.h +1 -1
  82. package/React/Fabric/Mounting/ComponentViews/SafeAreaView/RCTSafeAreaViewComponentView.h +1 -1
  83. package/React/Fabric/Mounting/ComponentViews/SafeAreaView/RCTSafeAreaViewComponentView.mm +0 -1
  84. package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTEnhancedScrollView.h +5 -3
  85. package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTEnhancedScrollView.mm +23 -6
  86. package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTPullToRefreshViewComponentView.h +1 -1
  87. package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTPullToRefreshViewComponentView.mm +17 -1
  88. package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.h +6 -4
  89. package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.mm +98 -34
  90. package/React/Fabric/Mounting/ComponentViews/Slider/RCTSliderComponentView.h +1 -1
  91. package/React/Fabric/Mounting/ComponentViews/Slider/RCTSliderComponentView.mm +5 -5
  92. package/React/Fabric/Mounting/ComponentViews/Switch/RCTSwitchComponentView.h +1 -1
  93. package/React/Fabric/Mounting/ComponentViews/Switch/RCTSwitchComponentView.mm +3 -3
  94. package/React/Fabric/Mounting/ComponentViews/Text/RCTAccessibilityElement.h +1 -1
  95. package/React/Fabric/Mounting/ComponentViews/Text/RCTAccessibilityElement.mm +1 -1
  96. package/React/Fabric/Mounting/ComponentViews/Text/RCTParagraphComponentAccessibilityProvider.h +2 -2
  97. package/React/Fabric/Mounting/ComponentViews/Text/RCTParagraphComponentAccessibilityProvider.mm +2 -2
  98. package/React/Fabric/Mounting/ComponentViews/Text/RCTParagraphComponentView.h +1 -1
  99. package/React/Fabric/Mounting/ComponentViews/Text/RCTParagraphComponentView.mm +3 -0
  100. package/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.h +1 -1
  101. package/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm +39 -5
  102. package/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputUtils.h +9 -6
  103. package/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputUtils.mm +16 -4
  104. package/React/Fabric/Mounting/ComponentViews/UnimplementedComponent/RCTUnimplementedNativeComponentView.h +2 -1
  105. package/React/Fabric/Mounting/ComponentViews/UnimplementedComponent/RCTUnimplementedNativeComponentView.mm +6 -4
  106. package/React/Fabric/Mounting/ComponentViews/UnimplementedView/RCTUnimplementedViewComponentView.h +1 -1
  107. package/React/Fabric/Mounting/ComponentViews/UnimplementedView/RCTUnimplementedViewComponentView.mm +14 -4
  108. package/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.h +5 -5
  109. package/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm +31 -23
  110. package/React/Fabric/Mounting/RCTComponentViewClassDescriptor.h +1 -1
  111. package/React/Fabric/Mounting/RCTComponentViewDescriptor.h +2 -2
  112. package/React/Fabric/Mounting/RCTComponentViewFactory.h +1 -1
  113. package/React/Fabric/Mounting/RCTComponentViewFactory.mm +12 -3
  114. package/React/Fabric/Mounting/RCTComponentViewProtocol.h +4 -4
  115. package/React/Fabric/Mounting/RCTComponentViewRegistry.h +2 -2
  116. package/React/Fabric/Mounting/RCTComponentViewRegistry.mm +3 -1
  117. package/React/Fabric/Mounting/RCTMountingManager.h +4 -4
  118. package/React/Fabric/Mounting/RCTMountingManager.mm +28 -19
  119. package/React/Fabric/Mounting/RCTMountingManagerDelegate.h +1 -1
  120. package/React/Fabric/Mounting/RCTMountingTransactionObserverCoordinator.h +5 -3
  121. package/React/Fabric/Mounting/RCTMountingTransactionObserverCoordinator.mm +10 -8
  122. package/React/Fabric/Mounting/RCTMountingTransactionObserving.h +6 -4
  123. package/React/Fabric/Mounting/UIView+ComponentViewProtocol.h +6 -6
  124. package/React/Fabric/Mounting/UIView+ComponentViewProtocol.mm +6 -6
  125. package/React/Fabric/RCTConversions.h +15 -7
  126. package/React/Fabric/RCTImageResponseDelegate.h +1 -1
  127. package/React/Fabric/RCTLocalizationProvider.h +1 -1
  128. package/React/Fabric/RCTLocalizationProvider.mm +10 -4
  129. package/React/Fabric/RCTScheduler.h +8 -1
  130. package/React/Fabric/RCTScheduler.mm +15 -0
  131. package/React/Fabric/RCTSurfacePresenter.h +10 -2
  132. package/React/Fabric/RCTSurfacePresenter.mm +59 -27
  133. package/React/Fabric/RCTSurfacePresenterBridgeAdapter.h +1 -1
  134. package/React/Fabric/RCTSurfaceRegistry.h +1 -1
  135. package/React/Fabric/RCTSurfaceTouchHandler.h +3 -3
  136. package/React/Fabric/RCTSurfaceTouchHandler.mm +8 -9
  137. package/React/Fabric/RCTTouchableComponentViewProtocol.h +1 -1
  138. package/React/Fabric/Surface/RCTFabricSurface.mm +1 -1
  139. package/React/Fabric/Utils/RCTGenericDelegateSplitter.h +1 -1
  140. package/React/Modules/RCTSurfacePresenterStub.h +4 -0
  141. package/React/Modules/RCTUIManager.m +2 -1
  142. package/React/React-RCTFabric.podspec +2 -2
  143. package/React/Views/RCTMaskedView.h +1 -1
  144. package/React/Views/RCTModalHostView.h +2 -2
  145. package/React/Views/RCTModalHostViewController.h +1 -1
  146. package/React/Views/RCTModalManager.h +1 -1
  147. package/React/Views/RCTSwitch.h +1 -10
  148. package/React/Views/RCTSwitch.m +0 -20
  149. package/React/Views/RCTSwitchManager.m +0 -4
  150. package/React/Views/RCTView.h +1 -0
  151. package/React/Views/RCTView.m +48 -17
  152. package/React/Views/RCTViewManager.m +2 -1
  153. package/React/Views/RCTWeakViewHolder.h +1 -1
  154. package/React/Views/RCTWrapperViewController.h +2 -2
  155. package/React/Views/RefreshControl/RCTRefreshControl.h +2 -2
  156. package/React/Views/RefreshControl/RCTRefreshableProtocol.h +1 -1
  157. package/React/Views/SafeAreaView/RCTSafeAreaView.h +1 -1
  158. package/React/Views/SafeAreaView/RCTSafeAreaViewLocalData.h +1 -1
  159. package/React/Views/ScrollView/RCTScrollView.m +1 -31
  160. package/React/Views/ScrollView/RCTScrollableProtocol.h +1 -1
  161. package/ReactAndroid/gradle.properties +1 -1
  162. package/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/viewPropConversions.h +527 -0
  163. package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +1 -1
  164. package/ReactAndroid/src/main/jni/Application.mk +1 -1
  165. package/ReactAndroid/src/main/jni/first-party/fb/BUCK +1 -1
  166. package/ReactAndroid/src/main/jni/react/jni/Android.mk +2 -2
  167. package/ReactCommon/React-Fabric.podspec +1 -1
  168. package/ReactCommon/React-rncore.podspec +1 -1
  169. package/ReactCommon/ReactCommon.podspec +1 -1
  170. package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
  171. package/ReactCommon/cxxreact/tests/BUCK +1 -1
  172. package/ReactCommon/hermes/inspector/tools/msggen/yarn.lock +3 -3
  173. package/ReactCommon/microprofiler/BUCK +1 -1
  174. package/ReactCommon/react/debug/react_native_assert.h +1 -1
  175. package/ReactCommon/react/renderer/animations/LayoutAnimationKeyFrameManager.cpp +6 -6
  176. package/ReactCommon/react/renderer/animations/LayoutAnimationKeyFrameManager.h +4 -3
  177. package/ReactCommon/react/renderer/animations/conversions.h +11 -11
  178. package/ReactCommon/react/renderer/animations/tests/LayoutAnimationTest.cpp +1 -1
  179. package/ReactCommon/react/renderer/attributedstring/TextAttributes.cpp +16 -16
  180. package/ReactCommon/react/renderer/attributedstring/TextAttributes.h +14 -14
  181. package/ReactCommon/react/renderer/attributedstring/conversions.h +1 -1
  182. package/ReactCommon/react/renderer/components/legacyviewmanagerinterop/LegacyViewManagerInteropComponentDescriptor.mm +5 -0
  183. package/ReactCommon/react/renderer/components/legacyviewmanagerinterop/RCTLegacyViewManagerInteropCoordinator.h +3 -3
  184. package/ReactCommon/react/renderer/components/legacyviewmanagerinterop/RCTLegacyViewManagerInteropCoordinator.mm +7 -5
  185. package/ReactCommon/react/renderer/components/text/ParagraphShadowNode.h +1 -1
  186. package/ReactCommon/react/renderer/components/textinput/androidtextinput/react/renderer/components/androidtextinput/AndroidTextInputShadowNode.h +1 -1
  187. package/ReactCommon/react/renderer/components/textinput/iostextinput/TextInputProps.cpp +1 -1
  188. package/ReactCommon/react/renderer/components/textinput/iostextinput/TextInputProps.h +1 -1
  189. package/ReactCommon/react/renderer/components/textinput/iostextinput/primitives.h +3 -4
  190. package/ReactCommon/react/renderer/components/view/AccessibilityPrimitives.h +6 -6
  191. package/ReactCommon/react/renderer/components/view/ViewProps.h +3 -1
  192. package/ReactCommon/react/renderer/components/view/ViewPropsInterpolation.h +3 -3
  193. package/ReactCommon/react/renderer/components/view/YogaLayoutableShadowNode.cpp +16 -16
  194. package/ReactCommon/react/renderer/components/view/conversions.h +5 -6
  195. package/ReactCommon/react/renderer/components/view/primitives.h +4 -3
  196. package/ReactCommon/react/renderer/components/view/propsConversions.h +2 -0
  197. package/ReactCommon/react/renderer/core/ComponentDescriptor.h +5 -5
  198. package/ReactCommon/react/renderer/core/ConcreteComponentDescriptor.h +7 -7
  199. package/ReactCommon/react/renderer/core/ConcreteShadowNode.h +2 -2
  200. package/ReactCommon/react/renderer/core/EventDispatcher.cpp +21 -0
  201. package/ReactCommon/react/renderer/core/EventDispatcher.h +15 -0
  202. package/ReactCommon/react/renderer/core/EventListener.cpp +39 -0
  203. package/ReactCommon/react/renderer/core/EventListener.h +44 -0
  204. package/ReactCommon/react/renderer/core/Props.h +0 -4
  205. package/ReactCommon/react/renderer/core/RawProps.h +1 -1
  206. package/ReactCommon/react/renderer/core/ShadowNode.cpp +2 -2
  207. package/ReactCommon/react/renderer/core/ShadowNode.h +5 -5
  208. package/ReactCommon/react/renderer/core/propsConversions.h +6 -5
  209. package/ReactCommon/react/renderer/core/tests/ComponentDescriptorTest.cpp +3 -3
  210. package/ReactCommon/react/renderer/debug/debugStringConvertibleUtils.h +3 -3
  211. package/ReactCommon/react/renderer/graphics/React-graphics.podspec +1 -1
  212. package/ReactCommon/react/renderer/graphics/platform/ios/Color.h +1 -1
  213. package/ReactCommon/react/renderer/graphics/platform/ios/RCTPlatformColorUtils.mm +9 -9
  214. package/ReactCommon/react/renderer/imagemanager/platform/ios/RCTImageManager.h +1 -1
  215. package/ReactCommon/react/renderer/imagemanager/platform/ios/RCTImagePrimitivesConversions.h +1 -1
  216. package/ReactCommon/react/renderer/imagemanager/platform/ios/RCTSyncImageManager.h +1 -1
  217. package/ReactCommon/react/renderer/mounting/MountingCoordinator.cpp +2 -2
  218. package/ReactCommon/react/renderer/mounting/MountingCoordinator.h +3 -3
  219. package/ReactCommon/react/renderer/mounting/MountingOverrideDelegate.h +1 -1
  220. package/ReactCommon/react/renderer/mounting/ShadowTreeRevision.h +0 -2
  221. package/ReactCommon/react/renderer/mounting/StubView.h +1 -1
  222. package/ReactCommon/react/renderer/mounting/StubViewTree.cpp +1 -1
  223. package/ReactCommon/react/renderer/mounting/TelemetryController.cpp +6 -9
  224. package/ReactCommon/react/renderer/mounting/TelemetryController.h +7 -7
  225. package/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler.cpp +3 -2
  226. package/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler.h +7 -1
  227. package/ReactCommon/react/renderer/runtimescheduler/Task.h +3 -2
  228. package/ReactCommon/react/renderer/scheduler/Scheduler.cpp +19 -2
  229. package/ReactCommon/react/renderer/scheduler/Scheduler.h +10 -1
  230. package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/NSTextStorage+FontScaling.h +1 -1
  231. package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/RCTAttributedTextUtils.h +1 -1
  232. package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/RCTAttributedTextUtils.mm +15 -15
  233. package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/RCTFontProperties.h +1 -1
  234. package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/RCTFontUtils.h +1 -1
  235. package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/RCTTextLayoutManager.h +1 -1
  236. package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/RCTTextPrimitivesConversions.h +6 -6
  237. package/ReactCommon/react/utils/ContextContainer.h +2 -2
  238. package/ReactCommon/react/utils/ManagedObjectWrapper.h +1 -1
  239. package/ReactCommon/react/utils/ManagedObjectWrapper.mm +1 -3
  240. package/ReactCommon/react/utils/SimpleThreadSafeCache.h +2 -2
  241. package/ReactCommon/yoga/Yoga.podspec +1 -1
  242. package/index.js +0 -11
  243. package/local-cli/generator-macos/templates/macos/HelloWorld-macOS/ViewController.m +1 -1
  244. package/package.json +4 -1
  245. package/scripts/react_native_pods.rb +1 -4
  246. package/template/Gemfile.lock +5 -5
  247. package/template/package.json +1 -1
  248. package/Libraries/Alert/AlertMacOS.js +0 -211
  249. package/ReactCommon/butter/optional.h +0 -38
  250. package/ReactCommon/react/renderer/mounting/MountingTransactionMetadata.h +0 -32
  251. package/third-party-podspecs/boost-for-react-native.podspec +0 -20
@@ -7,7 +7,7 @@
7
7
 
8
8
  #import "RCTView.h"
9
9
 
10
- #import <QuartzCore/QuartzCore.h> // TODO(macOS GH#774) - import needed on macOS to prevent compiler error on invocation of CAShapeLayer further down
10
+ #import <QuartzCore/QuartzCore.h>
11
11
 
12
12
  #import "RCTAutoInsetsProtocol.h"
13
13
  #import "RCTBorderDrawing.h"
@@ -1440,9 +1440,14 @@ setBorderColor() setBorderColor(Top) setBorderColor(Right) setBorderColor(Bottom
1440
1440
  }
1441
1441
  }
1442
1442
 
1443
+ - (BOOL)needsPanelToBecomeKey {
1444
+ // We need to override this so that mouse clicks don't move keyboard focus on focusable views by default.
1445
+ return false;
1446
+ }
1447
+
1443
1448
  - (BOOL)acceptsFirstResponder
1444
1449
  {
1445
- return ([self focusable] && [NSApp isFullKeyboardAccessEnabled]) || [super acceptsFirstResponder];
1450
+ return [self focusable] || [super acceptsFirstResponder];
1446
1451
  }
1447
1452
 
1448
1453
  - (void)updateTrackingAreas
@@ -1527,13 +1532,9 @@ setBorderColor() setBorderColor(Top) setBorderColor(Right) setBorderColor(Bottom
1527
1532
  block(body);
1528
1533
  }
1529
1534
 
1530
- - (NSDictionary*)dataTransferInfoFromPastboard:(NSPasteboard*)pastboard
1535
+ - (NSDictionary*)dataTransferInfoFromPasteboard:(NSPasteboard*)pasteboard
1531
1536
  {
1532
- if (![pastboard.types containsObject:NSFilenamesPboardType]) {
1533
- return @{};
1534
- }
1535
-
1536
- NSArray *fileNames = [pastboard propertyListForType:NSFilenamesPboardType];
1537
+ NSArray *fileNames = [pasteboard propertyListForType:NSFilenamesPboardType] ?: @[];
1537
1538
  NSMutableArray *files = [[NSMutableArray alloc] initWithCapacity:fileNames.count];
1538
1539
  NSMutableArray *items = [[NSMutableArray alloc] initWithCapacity:fileNames.count];
1539
1540
  NSMutableArray *types = [[NSMutableArray alloc] initWithCapacity:fileNames.count];
@@ -1559,11 +1560,21 @@ setBorderColor() setBorderColor(Top) setBorderColor(Right) setBorderColor(Bottom
1559
1560
  BOOL success = [fileURL getResourceValue:&fileSizeValue
1560
1561
  forKey:NSURLFileSizeKey
1561
1562
  error:&fileSizeError];
1562
-
1563
+
1564
+ NSNumber *width = nil;
1565
+ NSNumber *height = nil;
1566
+ if ([MIMETypeString hasPrefix:@"image/"]) {
1567
+ NSImage *image = [[NSImage alloc] initWithContentsOfURL:fileURL];
1568
+ width = @(image.size.width);
1569
+ height = @(image.size.height);
1570
+ }
1571
+
1563
1572
  [files addObject:@{@"name": RCTNullIfNil(fileURL.lastPathComponent),
1564
1573
  @"type": RCTNullIfNil(MIMETypeString),
1565
- @"uri": RCTNullIfNil(fileURL.absoluteString),
1566
- @"size": success ? fileSizeValue : (id)kCFNull
1574
+ @"uri": RCTNullIfNil(fileURL.path),
1575
+ @"size": success ? fileSizeValue : (id)kCFNull,
1576
+ @"width": RCTNullIfNil(width),
1577
+ @"height": RCTNullIfNil(height)
1567
1578
  }];
1568
1579
 
1569
1580
  [items addObject:@{@"kind": @"file",
@@ -1573,7 +1584,27 @@ setBorderColor() setBorderColor(Top) setBorderColor(Right) setBorderColor(Bottom
1573
1584
  [types addObject:RCTNullIfNil(MIMETypeString)];
1574
1585
  }
1575
1586
  }
1576
-
1587
+
1588
+ NSPasteboardType imageType = [pasteboard availableTypeFromArray:@[NSPasteboardTypePNG, NSPasteboardTypeTIFF]];
1589
+ if (imageType && fileNames.count == 0) {
1590
+ NSString *MIMETypeString = imageType == NSPasteboardTypePNG ? @"image/png" : @"image/tiff";
1591
+ NSData *imageData = [pasteboard dataForType:imageType];
1592
+ NSImage *image = [[NSImage alloc] initWithData:imageData];
1593
+
1594
+ [files addObject:@{@"type": RCTNullIfNil(MIMETypeString),
1595
+ @"uri": RCTDataURL(MIMETypeString, imageData).absoluteString,
1596
+ @"size": @(imageData.length),
1597
+ @"width": @(image.size.width),
1598
+ @"height": @(image.size.height),
1599
+ }];
1600
+
1601
+ [items addObject:@{@"kind": @"image",
1602
+ @"type": RCTNullIfNil(MIMETypeString),
1603
+ }];
1604
+
1605
+ [types addObject:RCTNullIfNil(MIMETypeString)];
1606
+ }
1607
+
1577
1608
  return @{@"dataTransfer": @{@"files": files,
1578
1609
  @"items": items,
1579
1610
  @"types": types}};
@@ -1598,9 +1629,9 @@ setBorderColor() setBorderColor(Top) setBorderColor(Right) setBorderColor(Bottom
1598
1629
  [self sendMouseEventWithBlock:self.onDragEnter
1599
1630
  locationInfo:[self locationInfoFromDraggingLocation:sender.draggingLocation]
1600
1631
  modifierFlags:0
1601
- additionalData:[self dataTransferInfoFromPastboard:pboard]];
1602
-
1603
- if ([pboard.types containsObject:NSFilenamesPboardType]) {
1632
+ additionalData:[self dataTransferInfoFromPasteboard:pboard]];
1633
+
1634
+ if ([pboard availableTypeFromArray:self.registeredDraggedTypes]) {
1604
1635
  if (sourceDragMask & NSDragOperationLink) {
1605
1636
  return NSDragOperationLink;
1606
1637
  } else if (sourceDragMask & NSDragOperationCopy) {
@@ -1615,7 +1646,7 @@ setBorderColor() setBorderColor(Top) setBorderColor(Right) setBorderColor(Bottom
1615
1646
  [self sendMouseEventWithBlock:self.onDragLeave
1616
1647
  locationInfo:[self locationInfoFromDraggingLocation:sender.draggingLocation]
1617
1648
  modifierFlags:0
1618
- additionalData:[self dataTransferInfoFromPastboard:sender.draggingPasteboard]];
1649
+ additionalData:[self dataTransferInfoFromPasteboard:sender.draggingPasteboard]];
1619
1650
  }
1620
1651
 
1621
1652
  - (BOOL)performDragOperation:(id <NSDraggingInfo>)sender
@@ -1623,7 +1654,7 @@ setBorderColor() setBorderColor(Top) setBorderColor(Right) setBorderColor(Bottom
1623
1654
  [self sendMouseEventWithBlock:self.onDrop
1624
1655
  locationInfo:[self locationInfoFromDraggingLocation:sender.draggingLocation]
1625
1656
  modifierFlags:0
1626
- additionalData:[self dataTransferInfoFromPastboard:[sender draggingPasteboard]]];
1657
+ additionalData:[self dataTransferInfoFromPasteboard:sender.draggingPasteboard]];
1627
1658
  return YES;
1628
1659
  }
1629
1660
  #endif // ]TODO(macOS GH#774)
@@ -95,7 +95,8 @@ RCT_EXPORT_MODULE()
95
95
 
96
96
  - (void)setBridge:(RCTBridge *)bridge
97
97
  {
98
- RCTWarnNotAllowedForNewArchitecture(self, @"RCTViewManager must not be initialized for the new architecture");
98
+ RCTErrorNewArchitectureValidation(
99
+ RCTNotAllowedInBridgeless, self, @"RCTViewManager must not be initialized for the new architecture");
99
100
  _bridge = bridge;
100
101
  }
101
102
 
@@ -14,6 +14,6 @@
14
14
  */
15
15
  @protocol RCTWeakViewHolder
16
16
 
17
- @property (nonatomic, strong) NSMapTable<NSNumber *, UIView *> *weakViews;
17
+ @property (nonatomic, strong) NSMapTable<NSNumber *, RCTUIView *> *weakViews; // TODO(macOS GH#774)
18
18
 
19
19
  @end
@@ -5,12 +5,12 @@
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
  @class RCTWrapperViewController;
11
11
 
12
12
  @interface RCTWrapperViewController : UIViewController
13
13
 
14
- - (instancetype)initWithContentView:(UIView *)contentView NS_DESIGNATED_INITIALIZER;
14
+ - (instancetype)initWithContentView:(RCTUIView *)contentView NS_DESIGNATED_INITIALIZER; // TODO(macOS GH#774)
15
15
 
16
16
  @end
@@ -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/RCTComponent.h>
11
11
  #import <React/RCTScrollableProtocol.h>
@@ -14,6 +14,6 @@
14
14
 
15
15
  @property (nonatomic, copy) NSString *title;
16
16
  @property (nonatomic, copy) RCTDirectEventBlock onRefresh;
17
- @property (nonatomic, weak) UIScrollView *scrollView;
17
+ @property (nonatomic, weak) RCTUIScrollView *scrollView; // TODO(macOS GH#774)
18
18
 
19
19
  @end
@@ -6,7 +6,7 @@
6
6
  */
7
7
 
8
8
  #import <React/RCTComponent.h>
9
- #import <UIKit/UIKit.h>
9
+ #import <React/RCTUIKit.h> // TODO(macOS GH#774)
10
10
 
11
11
  /**
12
12
  * Protocol used to dispatch commands in `RCTRefreshControlManager.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/RCTView.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
 
@@ -116,7 +116,7 @@
116
116
 
117
117
  - (void)scrollWheel:(NSEvent *)theEvent
118
118
  {
119
- if (!self.scrollEnabled) {
119
+ if (!self.isScrollEnabled) {
120
120
  [[self nextResponder] scrollWheel:theEvent];
121
121
  return;
122
122
  }
@@ -339,21 +339,6 @@
339
339
  #endif // TODO(macOS GH#774)
340
340
 
341
341
  #if TARGET_OS_OSX // [TODO(macOS GH#774)
342
- - (BOOL)canBecomeFirstResponder
343
- {
344
- return YES;
345
- }
346
-
347
- - (BOOL)becomeFirstResponder
348
- {
349
- return YES;
350
- }
351
-
352
- - (BOOL)resignFirstResponder
353
- {
354
- return YES;
355
- }
356
-
357
342
  - (void)setAccessibilityLabel:(NSString *)accessibilityLabel
358
343
  {
359
344
  [super setAccessibilityLabel:accessibilityLabel];
@@ -538,21 +523,6 @@ static inline UIViewAnimationOptions animationOptionsWithCurve(UIViewAnimationCu
538
523
  return _scrollView.documentView;
539
524
  }
540
525
 
541
- - (BOOL)canBecomeFirstResponder
542
- {
543
- return [_scrollView canBecomeFirstResponder];
544
- }
545
-
546
- - (BOOL)becomeFirstResponder
547
- {
548
- return [_scrollView becomeFirstResponder];
549
- }
550
-
551
- - (BOOL)resignFirstResponder
552
- {
553
- return [_scrollView resignFirstResponder];
554
- }
555
-
556
526
  - (void)setAccessibilityLabel:(NSString *)accessibilityLabel
557
527
  {
558
528
  [_scrollView setAccessibilityLabel:accessibilityLabel];
@@ -42,7 +42,7 @@
42
42
 
43
43
  #if !TARGET_OS_OSX // TODO(macOS GH#774)
44
44
  @optional
45
- @property (nonatomic, weak) UIScrollView *scrollView;
45
+ @property (nonatomic, weak) RCTUIScrollView *scrollView;
46
46
  #endif // TODO(macOS GH#774)
47
47
 
48
48
  @end
@@ -1,4 +1,4 @@
1
- VERSION_NAME=0.0.0-081d66e4e
1
+ VERSION_NAME=0.0.0-0c343d926
2
2
  GROUP=com.facebook.react
3
3
 
4
4
  POM_NAME=ReactNative