react-native-macos 0.68.27 → 0.68.30

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.
@@ -16,6 +16,6 @@
16
16
  exports.version = {
17
17
  major: 0,
18
18
  minor: 68,
19
- patch: 27,
19
+ patch: 30,
20
20
  prerelease: null,
21
21
  };
@@ -106,7 +106,9 @@
106
106
  - (void)scrollViewDidScroll:(RCTUIScrollView *)scrollView // TODO(macOS ISS#3536887)
107
107
  {
108
108
  RCTDirectEventBlock onScroll = self.onScroll;
109
-
109
+ #if TARGET_OS_OSX // [TODO(macOS GH#774)
110
+ [_scrollView setHasVerticalScroller:YES];
111
+ #endif // ]TODO(macOS GH#774)
110
112
  if (onScroll) {
111
113
  CGPoint contentOffset = scrollView.contentOffset;
112
114
  CGSize contentSize = scrollView.contentSize;
@@ -27,7 +27,7 @@ NSDictionary* RCTGetReactNativeVersion(void)
27
27
  __rnVersion = @{
28
28
  RCTVersionMajor: @(0),
29
29
  RCTVersionMinor: @(68),
30
- RCTVersionPatch: @(27),
30
+ RCTVersionPatch: @(30),
31
31
  RCTVersionPrerelease: [NSNull null],
32
32
  };
33
33
  });
@@ -135,6 +135,12 @@ extern const UIAccessibilityTraits SwitchAccessibilityTrait;
135
135
  @property (nonatomic, copy) RCTDirectEventBlock onKeyUp;
136
136
  @property (nonatomic, copy) NSArray<NSString*> *validKeysDown;
137
137
  @property (nonatomic, copy) NSArray<NSString*> *validKeysUp;
138
+
139
+ // Shadow Properties
140
+ @property (nonatomic, strong) NSColor *shadowColor;
141
+ @property (nonatomic, assign) CGFloat shadowOpacity;
142
+ @property (nonatomic, assign) CGFloat shadowRadius;
143
+ @property (nonatomic, assign) CGSize shadowOffset;
138
144
  #endif // ]TODO(macOS GH#774)
139
145
 
140
146
  /**
@@ -165,6 +165,7 @@ static NSString *RCTRecursiveAccessibilityLabel(RCTUIView *view) // TODO(macOS I
165
165
  _hitTestEdgeInsets = UIEdgeInsetsZero;
166
166
  #if TARGET_OS_OSX // TODO(macOS GH#774)
167
167
  _transform3D = CATransform3DIdentity;
168
+ _shadowColor = nil;
168
169
  #endif // TODO(macOS GH#774)
169
170
 
170
171
  _backgroundColor = super.backgroundColor;
@@ -716,20 +717,49 @@ RCT_NOT_IMPLEMENTED(-(instancetype)initWithCoder : unused)
716
717
  #endif // TODO(macOS GH#774)
717
718
 
718
719
  #if TARGET_OS_OSX // [TODO(macOS GH#774)
719
- // Workaround AppKit issue with directly manipulating the view layer's shadow.
720
- - (NSShadow*)shadow
720
+ - (void)setShadowColor:(NSColor *)shadowColor
721
721
  {
722
- CALayer *layer = self.layer;
723
- NSShadow *shadow = nil;
722
+ if (_shadowColor != shadowColor)
723
+ {
724
+ _shadowColor = shadowColor;
725
+ [self didUpdateShadow];
726
+ }
727
+ }
724
728
 
725
- if (layer.shadowColor != nil && layer.shadowOpacity > 0) {
726
- shadow = [NSShadow new];
729
+ - (void)setShadowOffset:(CGSize)shadowOffset
730
+ {
731
+ if (!CGSizeEqualToSize(_shadowOffset, shadowOffset))
732
+ {
733
+ _shadowOffset = shadowOffset;
734
+ [self didUpdateShadow];
735
+ }
736
+ }
727
737
 
728
- shadow.shadowColor = [[NSColor colorWithCGColor:layer.shadowColor] colorWithAlphaComponent:layer.shadowOpacity];
729
- shadow.shadowOffset = layer.shadowOffset;
730
- shadow.shadowBlurRadius = layer.shadowRadius;
731
- }
732
- return shadow;
738
+ - (void)setShadowOpacity:(CGFloat)shadowOpacity
739
+ {
740
+ if (_shadowOpacity != shadowOpacity)
741
+ {
742
+ _shadowOpacity = shadowOpacity;
743
+ [self didUpdateShadow];
744
+ }
745
+ }
746
+
747
+ - (void)setShadowRadius:(CGFloat)shadowRadius
748
+ {
749
+ if (_shadowRadius != shadowRadius)
750
+ {
751
+ _shadowRadius = shadowRadius;
752
+ [self didUpdateShadow];
753
+ }
754
+ }
755
+
756
+ -(void)didUpdateShadow
757
+ {
758
+ NSShadow *shadow = [NSShadow new];
759
+ shadow.shadowColor = [[self shadowColor] colorWithAlphaComponent:[self shadowOpacity]];
760
+ shadow.shadowOffset = [self shadowOffset];
761
+ shadow.shadowBlurRadius = [self shadowRadius];
762
+ [self setShadow:shadow];
733
763
  }
734
764
 
735
765
  - (void)viewDidMoveToWindow
@@ -192,10 +192,19 @@ RCT_REMAP_VIEW_PROPERTY(opacity, alpha, CGFloat)
192
192
  #else // [TODO(macOS GH#774)
193
193
  RCT_REMAP_VIEW_PROPERTY(opacity, alphaValue, CGFloat)
194
194
  #endif // ]TODO(macOS GH#774)
195
+
196
+ #if TARGET_OS_OSX // TODO(macOS GH#774)
195
197
  RCT_REMAP_VIEW_PROPERTY(shadowColor, layer.shadowColor, CGColor)
196
198
  RCT_REMAP_VIEW_PROPERTY(shadowOffset, layer.shadowOffset, CGSize)
197
199
  RCT_REMAP_VIEW_PROPERTY(shadowOpacity, layer.shadowOpacity, float)
198
200
  RCT_REMAP_VIEW_PROPERTY(shadowRadius, layer.shadowRadius, CGFloat)
201
+ #else // [TODO(macOS GH#774)
202
+ RCT_EXPORT_VIEW_PROPERTY(shadowColor, NSColor)
203
+ RCT_EXPORT_VIEW_PROPERTY(shadowOffset, CGSize)
204
+ RCT_EXPORT_VIEW_PROPERTY(shadowOpacity, CGFloat)
205
+ RCT_EXPORT_VIEW_PROPERTY(shadowRadius, CGFloat)
206
+ #endif // ]TODO(macOS GH#774)
207
+
199
208
  RCT_REMAP_VIEW_PROPERTY(needsOffscreenAlphaCompositing, layer.allowsGroupOpacity, BOOL)
200
209
  RCT_CUSTOM_VIEW_PROPERTY(overflow, YGOverflow, RCTView)
201
210
  {
@@ -1,4 +1,4 @@
1
- VERSION_NAME=0.68.27
1
+ VERSION_NAME=0.68.30
2
2
  GROUP=com.facebook.react
3
3
 
4
4
  POM_NAME=ReactNative
@@ -21,6 +21,6 @@ public class ReactNativeVersion {
21
21
  public static final Map<String, Object> VERSION = MapBuilder.<String, Object>of(
22
22
  "major", 0,
23
23
  "minor", 68,
24
- "patch", 27,
24
+ "patch", 30,
25
25
  "prerelease", null);
26
26
  }
@@ -21,7 +21,7 @@ namespace facebook::react {
21
21
  constexpr struct {
22
22
  int32_t Major = 0;
23
23
  int32_t Minor = 68;
24
- int32_t Patch = 27;
24
+ int32_t Patch = 30;
25
25
  std::string_view Prerelease = "";
26
26
  } ReactNativeVersion;
27
27
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-macos",
3
- "version": "0.68.27",
3
+ "version": "0.68.30",
4
4
  "bin": "./cli.js",
5
5
  "description": "React Native for macOS",
6
6
  "license": "MIT",
@@ -9,8 +9,8 @@ GEM
9
9
  minitest (>= 5.1)
10
10
  tzinfo (~> 2.0)
11
11
  zeitwerk (~> 2.3)
12
- addressable (2.8.0)
13
- public_suffix (>= 2.0.2, < 5.0)
12
+ addressable (2.8.1)
13
+ public_suffix (>= 2.0.2, < 6.0)
14
14
  algoliasearch (1.27.5)
15
15
  httpclient (~> 2.8, >= 2.8.3)
16
16
  json (>= 1.5.1)
@@ -66,7 +66,7 @@ GEM
66
66
  i18n (1.12.0)
67
67
  concurrent-ruby (~> 1.0)
68
68
  json (2.6.2)
69
- minitest (5.16.2)
69
+ minitest (5.16.3)
70
70
  molinillo (0.8.0)
71
71
  nanaimo (0.3.0)
72
72
  nap (1.1.0)
@@ -97,4 +97,4 @@ RUBY VERSION
97
97
  ruby 3.0.4p208
98
98
 
99
99
  BUNDLED WITH
100
- 2.3.19
100
+ 2.3.20
@@ -12,7 +12,7 @@
12
12
  },
13
13
  "dependencies": {
14
14
  "react": "17.0.2",
15
- "react-native-macos": "0.68.27"
15
+ "react-native-macos": "0.68.30"
16
16
  },
17
17
  "devDependencies": {
18
18
  "@babel/core": "^7.12.9",