react-native-macos 0.0.0-5ad4444cf → 0.0.0-643b056e8
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/Image/RCTImageView.mm +2 -8
- package/README.md +1 -1
- package/React/Base/RCTVersion.m +1 -1
- package/React/Base/macOS/RCTDynamicColor.m +4 -6
- package/React/CoreModules/RCTAppearance.mm +18 -23
- package/React-Core.podspec +1 -1
- 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
|
@@ -649,18 +649,12 @@ RCT_NOT_IMPLEMENTED(- (instancetype)initWithFrame:(CGRect)frame)
|
|
|
649
649
|
|
|
650
650
|
- (NSColor *)tintColor
|
|
651
651
|
{
|
|
652
|
-
|
|
653
|
-
if (@available(macOS 10.14, *)) {
|
|
654
|
-
tintColor = _imageView.contentTintColor;
|
|
655
|
-
}
|
|
656
|
-
return tintColor;
|
|
652
|
+
return _imageView.contentTintColor;
|
|
657
653
|
}
|
|
658
654
|
|
|
659
655
|
- (void)setTintColor:(NSColor *)tintColor
|
|
660
656
|
{
|
|
661
|
-
|
|
662
|
-
_imageView.contentTintColor = tintColor;
|
|
663
|
-
}
|
|
657
|
+
_imageView.contentTintColor = tintColor;
|
|
664
658
|
}
|
|
665
659
|
#endif // ]TODO(macOS GH#774)
|
|
666
660
|
|
package/README.md
CHANGED
|
@@ -62,7 +62,7 @@ You can read more about the macOS implementation on our website - [React Native
|
|
|
62
62
|
|
|
63
63
|
## Requirements
|
|
64
64
|
|
|
65
|
-
You can run React Native for macOS apps on Mac devices with versions
|
|
65
|
+
You can run React Native for macOS apps on Mac devices with versions Catalina (10.15) or newer.
|
|
66
66
|
|
|
67
67
|
For a full and detailed list of the system requirements and how to set up your development platform, see our [System Requirements](https://microsoft.github.io/react-native-windows/docs/rnm-dependencies) documentation on our website.
|
|
68
68
|
|
package/React/Base/RCTVersion.m
CHANGED
|
@@ -59,14 +59,12 @@ static NSString *const RCTDarkAquaColor = @"darkAquaColor";
|
|
|
59
59
|
- (NSColor *)effectiveColor
|
|
60
60
|
{
|
|
61
61
|
NSColor *effectiveColor = _aquaColor;
|
|
62
|
-
|
|
63
|
-
NSAppearance *appearance = [NSAppearance currentAppearance] ?: [NSApp effectiveAppearance];
|
|
62
|
+
NSAppearance *appearance = [NSAppearance currentAppearance] ?: [NSApp effectiveAppearance];
|
|
64
63
|
|
|
65
|
-
|
|
64
|
+
NSAppearanceName appearanceName = [appearance bestMatchFromAppearancesWithNames:@[NSAppearanceNameAqua, NSAppearanceNameDarkAqua]];
|
|
66
65
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
}
|
|
66
|
+
if (_darkAquaColor != nil && [appearanceName isEqualToString:NSAppearanceNameDarkAqua]) {
|
|
67
|
+
effectiveColor = _darkAquaColor;
|
|
70
68
|
}
|
|
71
69
|
return effectiveColor;
|
|
72
70
|
}
|
|
@@ -66,29 +66,24 @@ NSString *RCTColorSchemePreference(UITraitCollection *traitCollection)
|
|
|
66
66
|
#else // [TODO(macOS GH#774)
|
|
67
67
|
NSString *RCTColorSchemePreference(NSAppearance *appearance)
|
|
68
68
|
{
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
if
|
|
81
|
-
|
|
82
|
-
return RCTAppearanceColorSchemeLight;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
appearance = appearance ?: [NSAppearance currentAppearance];
|
|
86
|
-
NSAppearanceName appearanceName = [appearance bestMatchFromAppearancesWithNames:@[NSAppearanceNameAqua, NSAppearanceNameDarkAqua]];
|
|
87
|
-
return appearances[appearanceName] ?: RCTAppearanceColorSchemeLight;
|
|
69
|
+
static NSDictionary *appearances;
|
|
70
|
+
static dispatch_once_t onceToken;
|
|
71
|
+
|
|
72
|
+
dispatch_once(&onceToken, ^{
|
|
73
|
+
appearances = @{
|
|
74
|
+
NSAppearanceNameAqua: RCTAppearanceColorSchemeLight,
|
|
75
|
+
NSAppearanceNameDarkAqua: RCTAppearanceColorSchemeDark
|
|
76
|
+
};
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
if (!sAppearancePreferenceEnabled) {
|
|
80
|
+
// Return the default if the app doesn't allow different color schemes.
|
|
81
|
+
return RCTAppearanceColorSchemeLight;
|
|
88
82
|
}
|
|
89
83
|
|
|
90
|
-
|
|
91
|
-
|
|
84
|
+
appearance = appearance ?: [NSAppearance currentAppearance];
|
|
85
|
+
NSAppearanceName appearanceName = [appearance bestMatchFromAppearancesWithNames:@[NSAppearanceNameAqua, NSAppearanceNameDarkAqua]];
|
|
86
|
+
return appearances[appearanceName] ?: RCTAppearanceColorSchemeLight;
|
|
92
87
|
}
|
|
93
88
|
#endif // ]TODO(macOS GH#774)
|
|
94
89
|
|
|
@@ -165,7 +160,7 @@ RCT_EXPORT_SYNCHRONOUS_TYPED_METHOD(NSString *, getColorScheme)
|
|
|
165
160
|
|
|
166
161
|
- (void)startObserving
|
|
167
162
|
{
|
|
168
|
-
if (@available(
|
|
163
|
+
if (@available(iOS 13.0, *)) {
|
|
169
164
|
[[NSNotificationCenter defaultCenter] addObserver:self
|
|
170
165
|
selector:@selector(appearanceChanged:)
|
|
171
166
|
name:RCTUserInterfaceStyleDidChangeNotification
|
|
@@ -175,7 +170,7 @@ RCT_EXPORT_SYNCHRONOUS_TYPED_METHOD(NSString *, getColorScheme)
|
|
|
175
170
|
|
|
176
171
|
- (void)stopObserving
|
|
177
172
|
{
|
|
178
|
-
if (@available(
|
|
173
|
+
if (@available(iOS 13.0, *)) {
|
|
179
174
|
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
|
180
175
|
}
|
|
181
176
|
}
|
package/React-Core.podspec
CHANGED
|
@@ -78,7 +78,7 @@ Pod::Spec.new do |s|
|
|
|
78
78
|
end
|
|
79
79
|
|
|
80
80
|
s.subspec "Hermes" do |ss|
|
|
81
|
-
ss.platforms = { :osx => "10.15" }
|
|
81
|
+
ss.platforms = { :osx => "10.15", :ios => "11.0" }
|
|
82
82
|
ss.source_files = "ReactCommon/hermes/executor/*.{cpp,h}",
|
|
83
83
|
"ReactCommon/hermes/inspector/*.{cpp,h}",
|
|
84
84
|
"ReactCommon/hermes/inspector/chrome/*.{cpp,h}",
|
package/package.json
CHANGED