react-native-macos 0.66.45 → 0.66.48
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/Core/ReactNativeVersion.js +1 -1
- package/Libraries/WebSocket/RCTSRWebSocket.m +23 -0
- package/React/Base/RCTVersion.m +1 -1
- package/React/Views/ScrollView/MacOS/RCTScrollContentLocalData.h +2 -2
- package/React/Views/ScrollView/MacOS/RCTScrollContentLocalData.m +4 -4
- package/React/Views/ScrollView/RCTScrollContentView.m +10 -24
- package/React/Views/ScrollView/RCTScrollView.m +1 -5
- 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
|
@@ -540,10 +540,33 @@ RCT_NOT_IMPLEMENTED(- (instancetype)init)
|
|
|
540
540
|
// ]TODO(macOS ISS#2323203)
|
|
541
541
|
}
|
|
542
542
|
|
|
543
|
+
// [TODO(macOS GH#774)
|
|
544
|
+
// We've seen a rare ASan crash where _inputStream seems to be invalid. This is just a safety check.
|
|
545
|
+
#if DEBUG
|
|
546
|
+
[self _validateStream:_outputStream name:@"_outputStream"];
|
|
547
|
+
[self _validateStream:_inputStream name:@"_inputStream"];
|
|
548
|
+
#endif
|
|
549
|
+
// ]TODO(macOS GH#774)
|
|
550
|
+
|
|
543
551
|
[_outputStream open];
|
|
544
552
|
[_inputStream open];
|
|
545
553
|
}
|
|
546
554
|
|
|
555
|
+
// [TODO(macOS GH#774)
|
|
556
|
+
#if DEBUG
|
|
557
|
+
- (void)_validateStream:(NSStream *)stream name:(NSString *)name {
|
|
558
|
+
NSStreamStatus status = stream.streamStatus;
|
|
559
|
+
if (status != NSStreamStatusNotOpen) {
|
|
560
|
+
RCTLogWarn(@"%@ was already opened, why are we opening it again? status=%@", name, @(status));
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
if (stream.delegate == nil) {
|
|
564
|
+
RCTLogError(@"%@'s delegate is nil, did we clean it up too early?", name);
|
|
565
|
+
}
|
|
566
|
+
}
|
|
567
|
+
#endif
|
|
568
|
+
// ]TODO(macOS GH#774)
|
|
569
|
+
|
|
547
570
|
- (void)scheduleInRunLoop:(NSRunLoop *)aRunLoop forMode:(NSString *)mode
|
|
548
571
|
{
|
|
549
572
|
[_outputStream scheduleInRunLoop:aRunLoop forMode:mode];
|
package/React/Base/RCTVersion.m
CHANGED
|
@@ -14,8 +14,8 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
14
14
|
@property (nonatomic, assign) CGFloat horizontalScrollerHeight;
|
|
15
15
|
@property (nonatomic, assign) CGFloat verticalScrollerWidth;
|
|
16
16
|
|
|
17
|
-
- (instancetype)
|
|
18
|
-
|
|
17
|
+
- (instancetype)initWithVerticalScrollerWidth:(CGFloat)verticalScrollerWidth
|
|
18
|
+
horizontalScrollerHeight:(CGFloat)horizontalScrollerHeight;
|
|
19
19
|
|
|
20
20
|
@end
|
|
21
21
|
|
|
@@ -9,12 +9,12 @@
|
|
|
9
9
|
|
|
10
10
|
@implementation RCTScrollContentLocalData
|
|
11
11
|
|
|
12
|
-
- (instancetype)
|
|
13
|
-
|
|
12
|
+
- (instancetype)initWithVerticalScrollerWidth:(CGFloat)verticalScrollerWidth
|
|
13
|
+
horizontalScrollerHeight:(CGFloat)horizontalScrollerHeight;
|
|
14
14
|
{
|
|
15
15
|
if (self = [super init]) {
|
|
16
|
-
_verticalScrollerWidth =
|
|
17
|
-
_horizontalScrollerHeight =
|
|
16
|
+
_verticalScrollerWidth = verticalScrollerWidth;
|
|
17
|
+
_horizontalScrollerHeight = horizontalScrollerHeight;
|
|
18
18
|
}
|
|
19
19
|
return self;
|
|
20
20
|
}
|
|
@@ -18,15 +18,11 @@
|
|
|
18
18
|
#import "RCTScrollView.h"
|
|
19
19
|
|
|
20
20
|
@implementation RCTScrollContentView
|
|
21
|
-
#if TARGET_OS_OSX // [TODO(macOS GH#774)
|
|
22
|
-
{
|
|
23
|
-
BOOL _hasHorizontalScroller;
|
|
24
|
-
BOOL _hasVerticalScroller;
|
|
25
|
-
}
|
|
26
|
-
#endif // ]TODO(macOS GH#774)
|
|
27
21
|
|
|
28
22
|
- (void)reactSetFrame:(CGRect)frame
|
|
29
23
|
{
|
|
24
|
+
[super reactSetFrame:frame];
|
|
25
|
+
|
|
30
26
|
#if !TARGET_OS_OSX // TODO(macOS GH#774)
|
|
31
27
|
RCTScrollView *scrollView = (RCTScrollView *)self.superview.superview;
|
|
32
28
|
#else // [TODO(macOS GH#774)
|
|
@@ -34,8 +30,6 @@
|
|
|
34
30
|
RCTScrollView *scrollView = (RCTScrollView *)self.superview.superview.superview;
|
|
35
31
|
#endif // ]TODO(macOS GH#774)
|
|
36
32
|
|
|
37
|
-
[super reactSetFrame:frame];
|
|
38
|
-
|
|
39
33
|
if (!scrollView) {
|
|
40
34
|
return;
|
|
41
35
|
}
|
|
@@ -43,7 +37,6 @@
|
|
|
43
37
|
RCTAssert([scrollView isKindOfClass:[RCTScrollView class]], @"Unexpected view hierarchy of RCTScrollView component.");
|
|
44
38
|
|
|
45
39
|
[scrollView updateContentSizeIfNeeded];
|
|
46
|
-
|
|
47
40
|
#if TARGET_OS_OSX // [TODO(macOS GH#774)
|
|
48
41
|
// On macOS scroll indicators may float over the content view like they do in iOS
|
|
49
42
|
// or depending on system preferences they may be outside of the content view
|
|
@@ -52,21 +45,14 @@
|
|
|
52
45
|
// the contents will overflow causing the scroll indicators to appear unnecessarily.
|
|
53
46
|
NSScrollView *platformScrollView = [scrollView scrollView];
|
|
54
47
|
if ([platformScrollView scrollerStyle] == NSScrollerStyleLegacy) {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
RCTScrollContentLocalData *localData =
|
|
65
|
-
[[RCTScrollContentLocalData alloc]
|
|
66
|
-
initWithVerticalScroller:[platformScrollView verticalScroller]
|
|
67
|
-
horizontalScroller:[platformScrollView horizontalScroller]];
|
|
68
|
-
[[[scrollView bridge] uiManager] setLocalData:localData forView:self];
|
|
69
|
-
}
|
|
48
|
+
CGFloat horizontalScrollerHeight = [platformScrollView hasHorizontalScroller] ? NSHeight([[platformScrollView horizontalScroller] frame]) : 0;
|
|
49
|
+
CGFloat verticalScrollerWidth = [platformScrollView hasVerticalScroller] ? NSWidth([[platformScrollView verticalScroller] frame]) : 0;
|
|
50
|
+
|
|
51
|
+
RCTScrollContentLocalData *localData =
|
|
52
|
+
[[RCTScrollContentLocalData alloc]
|
|
53
|
+
initWithVerticalScrollerWidth:horizontalScrollerHeight
|
|
54
|
+
horizontalScrollerHeight:verticalScrollerWidth];
|
|
55
|
+
[[[scrollView bridge] uiManager] setLocalData:localData forView:self];
|
|
70
56
|
}
|
|
71
57
|
#endif // ]TODO(macOS GH#774)
|
|
72
58
|
}
|
|
@@ -56,6 +56,7 @@
|
|
|
56
56
|
self.scrollEnabled = YES;
|
|
57
57
|
self.hasHorizontalScroller = YES;
|
|
58
58
|
self.hasVerticalScroller = YES;
|
|
59
|
+
self.autohidesScrollers = YES;
|
|
59
60
|
self.panGestureRecognizer = [[NSPanGestureRecognizer alloc] initWithTarget:self action:@selector(handleCustomPan:)];
|
|
60
61
|
#else // ]TODO(macOS GH#774)
|
|
61
62
|
[self.panGestureRecognizer addTarget:self action:@selector(handleCustomPan:)];
|
|
@@ -642,11 +643,6 @@ static inline void RCTApplyTransformationAccordingLayoutDirection(
|
|
|
642
643
|
[self react_updateClippedSubviewsWithClipRect:clipRect relativeToView:clipView];
|
|
643
644
|
_lastClippedToRect = bounds;
|
|
644
645
|
}
|
|
645
|
-
|
|
646
|
-
#if TARGET_OS_OSX // [TODO(macOS GH#774)
|
|
647
|
-
[[self scrollView] setHasHorizontalScroller:[self isHorizontal:_scrollView]];
|
|
648
|
-
[[self scrollView] setHasVerticalScroller:[self isVertical:_scrollView]];
|
|
649
|
-
#endif // ]TODO(macOS GH#774)
|
|
650
646
|
}
|
|
651
647
|
|
|
652
648
|
#if TARGET_OS_OSX // [TODO(macOS GH#774)
|
package/package.json
CHANGED