react-native-macos 0.66.43 → 0.66.46
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/React/Base/RCTVersion.m +1 -1
- package/React/DevSupport/RCTInspectorDevServerHelper.mm +12 -0
- package/React/Views/ScrollView/MacOS/RCTScrollContentLocalData.h +2 -2
- package/React/Views/ScrollView/MacOS/RCTScrollContentLocalData.m +4 -4
- package/React/Views/ScrollView/RCTScrollContentView.m +5 -2
- 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
package/React/Base/RCTVersion.m
CHANGED
|
@@ -110,9 +110,21 @@ static void sendEventToAllConnections(NSString *event)
|
|
|
110
110
|
}
|
|
111
111
|
|
|
112
112
|
NSString *key = [inspectorURL absoluteString];
|
|
113
|
+
// [TODO(macOS GH#774) - safety check to avoid a crash
|
|
114
|
+
if (key == nil) {
|
|
115
|
+
RCTLogError(@"failed to get inspector URL");
|
|
116
|
+
return nil;
|
|
117
|
+
}
|
|
118
|
+
// ]TODO(macOS GH#774)
|
|
113
119
|
RCTInspectorPackagerConnection *connection = socketConnections[key];
|
|
114
120
|
if (!connection || !connection.isConnected) {
|
|
115
121
|
connection = [[RCTInspectorPackagerConnection alloc] initWithURL:inspectorURL];
|
|
122
|
+
// [TODO(macOS GH#774) - safety check to avoid a crash
|
|
123
|
+
if (connection == nil) {
|
|
124
|
+
RCTLogError(@"failed to initialize RCTInspectorPackagerConnection");
|
|
125
|
+
return nil;
|
|
126
|
+
}
|
|
127
|
+
// ]TODO(macOS GH#774)
|
|
116
128
|
socketConnections[key] = connection;
|
|
117
129
|
[connection connect];
|
|
118
130
|
}
|
|
@@ -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
|
}
|
|
@@ -61,10 +61,13 @@
|
|
|
61
61
|
_hasHorizontalScroller = nextHasHorizontalScroller;
|
|
62
62
|
_hasVerticalScroller = nextHasVerticalScroller;
|
|
63
63
|
|
|
64
|
+
CGFloat horizontalScrollerHeight = _hasHorizontalScroller ? NSHeight([[platformScrollView horizontalScroller] frame]) : 0;
|
|
65
|
+
CGFloat verticalScrollerWidth = _hasVerticalScroller ? NSWidth([[platformScrollView verticalScroller] frame]) : 0;
|
|
66
|
+
|
|
64
67
|
RCTScrollContentLocalData *localData =
|
|
65
68
|
[[RCTScrollContentLocalData alloc]
|
|
66
|
-
|
|
67
|
-
|
|
69
|
+
initWithVerticalScrollerWidth:horizontalScrollerHeight
|
|
70
|
+
horizontalScrollerHeight:verticalScrollerWidth];
|
|
68
71
|
[[[scrollView bridge] uiManager] setLocalData:localData forView:self];
|
|
69
72
|
}
|
|
70
73
|
}
|
package/package.json
CHANGED