react-native-macos 0.71.30 → 0.71.32
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.
- package/Libraries/Components/Pressable/Pressable.js +10 -0
- package/Libraries/Components/View/ViewPropTypes.d.ts +1 -0
- package/Libraries/Components/View/ViewPropTypes.js +10 -0
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/Libraries/NativeComponent/BaseViewConfig.macos.js +1 -0
- package/React/Base/RCTTouchHandler.m +2 -3
- package/React/Base/RCTVersion.m +1 -1
- package/React/Views/RCTView.h +4 -0
- package/React/Views/RCTView.m +3 -0
- package/React/Views/RCTViewManager.m +2 -0
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +1 -1
- package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
- package/package.json +1 -1
- package/template/package.json +1 -1
|
@@ -232,6 +232,16 @@ type Props = $ReadOnly<{|
|
|
|
232
232
|
*/
|
|
233
233
|
enableFocusRing?: ?boolean,
|
|
234
234
|
|
|
235
|
+
/**
|
|
236
|
+
* Specifies whether the view ensures it is vibrant on top of other content.
|
|
237
|
+
* For more information, see the following apple documentation:
|
|
238
|
+
* https://developer.apple.com/documentation/appkit/nsview/1483793-allowsvibrancy
|
|
239
|
+
* https://developer.apple.com/documentation/appkit/nsvisualeffectview#1674177
|
|
240
|
+
*
|
|
241
|
+
* @platform macos
|
|
242
|
+
*/
|
|
243
|
+
allowsVibrancy?: ?boolean,
|
|
244
|
+
|
|
235
245
|
/**
|
|
236
246
|
* Specifies the Tooltip for the Pressable.
|
|
237
247
|
* @platform macos
|
|
@@ -173,6 +173,7 @@ export type DraggedTypesType = DraggedType | DraggedType[];
|
|
|
173
173
|
|
|
174
174
|
export interface ViewPropsMacOS {
|
|
175
175
|
acceptsFirstMouse?: boolean | undefined;
|
|
176
|
+
allowsVibrancy?: boolean | undefined;
|
|
176
177
|
mouseDownCanMoveWindow?: boolean | undefined;
|
|
177
178
|
enableFocusRing?: boolean | undefined;
|
|
178
179
|
onMouseEnter?: ((event: MouseEvent) => void) | undefined;
|
|
@@ -553,6 +553,16 @@ type MacOSViewProps = $ReadOnly<{|
|
|
|
553
553
|
*/
|
|
554
554
|
mouseDownCanMoveWindow?: ?boolean,
|
|
555
555
|
|
|
556
|
+
/**
|
|
557
|
+
* Specifies whether the view ensures it is vibrant on top of other content.
|
|
558
|
+
* For more information, see the following apple documentation:
|
|
559
|
+
* https://developer.apple.com/documentation/appkit/nsview/1483793-allowsvibrancy
|
|
560
|
+
* https://developer.apple.com/documentation/appkit/nsvisualeffectview#1674177
|
|
561
|
+
*
|
|
562
|
+
* @platform macos
|
|
563
|
+
*/
|
|
564
|
+
allowsVibrancy?: ?boolean,
|
|
565
|
+
|
|
556
566
|
/**
|
|
557
567
|
* Specifies whether system focus ring should be drawn when the view has keyboard focus.
|
|
558
568
|
*
|
|
@@ -229,11 +229,10 @@ RCT_NOT_IMPLEMENTED(- (instancetype)initWithCoder:(NSCoder *)coder)
|
|
|
229
229
|
NSEvent *nativeTouch = _nativeTouches[touchIndex];
|
|
230
230
|
CGPoint location = nativeTouch.locationInWindow;
|
|
231
231
|
RCTAssert(_cachedRootView, @"We were unable to find a root view for the touch");
|
|
232
|
-
CGPoint rootViewLocation = [_cachedRootView
|
|
232
|
+
CGPoint rootViewLocation = [_cachedRootView convertPoint:location fromView:nil];
|
|
233
|
+
|
|
233
234
|
NSView *touchView = _touchViews[touchIndex];
|
|
234
235
|
CGPoint touchViewLocation = [touchView convertPoint:location fromView:nil];
|
|
235
|
-
// JavaScript expects coordinates to have (0,0) at top left, unlike the macOS coordinate system
|
|
236
|
-
rootViewLocation.y = NSHeight([[_cachedRootView window] frame]) - rootViewLocation.y;
|
|
237
236
|
#endif // macOS]
|
|
238
237
|
|
|
239
238
|
NSMutableDictionary *reactTouch = _reactTouches[touchIndex];
|
package/React/Base/RCTVersion.m
CHANGED
package/React/Views/RCTView.h
CHANGED
|
@@ -152,6 +152,10 @@ extern const UIAccessibilityTraits SwitchAccessibilityTrait;
|
|
|
152
152
|
|
|
153
153
|
@property (nonatomic, assign) CATransform3D transform3D;
|
|
154
154
|
|
|
155
|
+
// `allowsVibrancy` is readonly on NSView, so let's create a new property to make it assignable
|
|
156
|
+
// that we can set through JS and the getter for `allowsVibrancy` can read in RCTView.
|
|
157
|
+
@property (nonatomic, assign) BOOL allowsVibrancyInternal;
|
|
158
|
+
|
|
155
159
|
@property (nonatomic, copy) RCTDirectEventBlock onMouseEnter;
|
|
156
160
|
@property (nonatomic, copy) RCTDirectEventBlock onMouseLeave;
|
|
157
161
|
@property (nonatomic, copy) RCTDirectEventBlock onDragEnter;
|
package/React/Views/RCTView.m
CHANGED
|
@@ -1509,6 +1509,9 @@ setBorderColor() setBorderColor(Top) setBorderColor(Right) setBorderColor(Bottom
|
|
|
1509
1509
|
_mouseDownCanMoveWindow = mouseDownCanMoveWindow;
|
|
1510
1510
|
}
|
|
1511
1511
|
|
|
1512
|
+
- (BOOL)allowsVibrancy {
|
|
1513
|
+
return _allowsVibrancyInternal;
|
|
1514
|
+
}
|
|
1512
1515
|
|
|
1513
1516
|
- (NSDictionary*)locationInfoFromEvent:(NSEvent*)event
|
|
1514
1517
|
{
|
|
@@ -420,6 +420,8 @@ RCT_CUSTOM_VIEW_PROPERTY(acceptsFirstMouse, BOOL, RCTView)
|
|
|
420
420
|
|
|
421
421
|
RCT_EXPORT_VIEW_PROPERTY(mouseDownCanMoveWindow, BOOL)
|
|
422
422
|
|
|
423
|
+
RCT_REMAP_VIEW_PROPERTY(allowsVibrancy, allowsVibrancyInternal, BOOL)
|
|
424
|
+
|
|
423
425
|
RCT_CUSTOM_VIEW_PROPERTY(focusable, BOOL, RCTView)
|
|
424
426
|
{
|
|
425
427
|
if ([view respondsToSelector:@selector(setFocusable:)]) {
|
package/package.json
CHANGED