react-native-macos 0.71.21 → 0.71.23

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.
@@ -12,6 +12,6 @@
12
12
  exports.version = {
13
13
  major: 0,
14
14
  minor: 71,
15
- patch: 21,
15
+ patch: 23,
16
16
  prerelease: null,
17
17
  };
@@ -23,7 +23,7 @@ NSDictionary* RCTGetReactNativeVersion(void)
23
23
  __rnVersion = @{
24
24
  RCTVersionMajor: @(0),
25
25
  RCTVersionMinor: @(71),
26
- RCTVersionPatch: @(21),
26
+ RCTVersionPatch: @(23),
27
27
  RCTVersionPrerelease: [NSNull null],
28
28
  };
29
29
  });
@@ -382,6 +382,7 @@
382
382
  BOOL _allowNextScrollNoMatterWhat;
383
383
  #if TARGET_OS_OSX // [macOS
384
384
  BOOL _notifyDidScroll;
385
+ NSPoint _lastScrollPosition;
385
386
  #endif // macOS]
386
387
  CGRect _lastClippedToRect;
387
388
  uint16_t _coalescingKey;
@@ -477,6 +478,7 @@ static inline UIViewAnimationOptions animationOptionsWithCurve(UIViewAnimationCu
477
478
  #else // [macOS
478
479
  _scrollView.drawsBackground = NO;
479
480
  _scrollView.postsBoundsChangedNotifications = YES;
481
+ _lastScrollPosition = NSZeroPoint;
480
482
  #endif // macOS]
481
483
 
482
484
  #if !TARGET_OS_OSX // [macOS]
@@ -925,6 +927,22 @@ RCT_SCROLL_EVENT_HANDLER(scrollViewDidScrollToTop, onScrollToTop)
925
927
  {
926
928
  NSTimeInterval now = CACurrentMediaTime();
927
929
  [self updateClippedSubviews];
930
+
931
+ #if TARGET_OS_OSX // [macOS
932
+ /**
933
+ * To check for effective scroll position changes, the comparison with lastScrollPosition should happen
934
+ * after updateClippedSubviews. updateClippedSubviews will update the display of the vertical/horizontal
935
+ * scrollers which can change the clipview bounds.
936
+ * This change also ensures that no onScroll events are sent when the React setFrame call is running,
937
+ * which could submit onScroll events while the content view was not setup yet.
938
+ */
939
+ BOOL didScroll = !NSEqualPoints(scrollView.contentView.bounds.origin, _lastScrollPosition);
940
+ if (!didScroll) {
941
+ return;
942
+ }
943
+ _lastScrollPosition = scrollView.contentView.bounds.origin;
944
+ #endif // macOS]
945
+
928
946
  /**
929
947
  * TODO: this logic looks wrong, and it may be because it is. Currently, if _scrollEventThrottle
930
948
  * is set to zero (the default), the "didScroll" event is only sent once per scroll, instead of repeatedly
@@ -1,4 +1,4 @@
1
- VERSION_NAME=0.71.21
1
+ VERSION_NAME=0.71.23
2
2
  GROUP=com.facebook.react
3
3
 
4
4
  # JVM Versions
@@ -17,6 +17,6 @@ public class ReactNativeVersion {
17
17
  public static final Map<String, Object> VERSION = MapBuilder.<String, Object>of(
18
18
  "major", 0,
19
19
  "minor", 71,
20
- "patch", 21,
20
+ "patch", 23,
21
21
  "prerelease", null);
22
22
  }
@@ -17,7 +17,7 @@ namespace facebook::react {
17
17
  constexpr struct {
18
18
  int32_t Major = 0;
19
19
  int32_t Minor = 71;
20
- int32_t Patch = 21;
20
+ int32_t Patch = 23;
21
21
  std::string_view Prerelease = "";
22
22
  } ReactNativeVersion;
23
23
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-macos",
3
- "version": "0.71.21",
3
+ "version": "0.71.23",
4
4
  "bin": "./cli.js",
5
5
  "description": "React Native for macOS",
6
6
  "license": "MIT",
@@ -202,6 +202,7 @@
202
202
  "shouldPublish": false
203
203
  },
204
204
  "resolutions": {
205
+ "@grpc/proto-loader": "^0.7.8",
205
206
  "async": "^3.2.2",
206
207
  "debug": ">=3.1.0",
207
208
  "es5-ext": "0.10.53",
@@ -211,6 +212,7 @@
211
212
  "tough-cookie": "^4.1.3"
212
213
  },
213
214
  "_justification": {
215
+ "@grpc/proto-loader": "Resolves a security issue with protobufjs, one of its dependencies",
214
216
  "async": "Versions of async prior to 3.2.2 are vulnerable to prototype pollution",
215
217
  "debug": "ReDoS vulnerability in older versions, plus the dependents that pull in debug@<1.0.0 haven't been updated in years",
216
218
  "es5-ext": "Packages after 0.10.54 and at the moment up until 0.10.59 contain a protest message. A policy prevents us from using packages with protestware, therefore downgrading to the latest release without the message.",
@@ -12,7 +12,7 @@
12
12
  },
13
13
  "dependencies": {
14
14
  "react": "18.2.0",
15
- "react-native-macos": "0.71.21"
15
+ "react-native-macos": "0.71.23"
16
16
  },
17
17
  "devDependencies": {
18
18
  "@babel/core": "^7.20.0",