react-native-macos 0.71.22 → 0.71.24

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: 22,
15
+ patch: 24,
16
16
  prerelease: null,
17
17
  };
@@ -1502,7 +1502,7 @@ RCT_ENUM_CONVERTER(
1502
1502
  return NSAccessibilityUnknownRole;
1503
1503
  }
1504
1504
 
1505
- RCT_JSON_ARRAY_CONVERTER(RCTHandledKey);
1505
+ RCT_ARRAY_CONVERTER(RCTHandledKey);
1506
1506
 
1507
1507
  #endif // macOS]
1508
1508
 
@@ -23,7 +23,7 @@ NSDictionary* RCTGetReactNativeVersion(void)
23
23
  __rnVersion = @{
24
24
  RCTVersionMajor: @(0),
25
25
  RCTVersionMinor: @(71),
26
- RCTVersionPatch: @(22),
26
+ RCTVersionPatch: @(24),
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.22
1
+ VERSION_NAME=0.71.24
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", 22,
20
+ "patch", 24,
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 = 22;
20
+ int32_t Patch = 24;
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.22",
3
+ "version": "0.71.24",
4
4
  "bin": "./cli.js",
5
5
  "description": "React Native for macOS",
6
6
  "license": "MIT",
@@ -12,7 +12,7 @@
12
12
  },
13
13
  "dependencies": {
14
14
  "react": "18.2.0",
15
- "react-native-macos": "0.71.22"
15
+ "react-native-macos": "0.71.24"
16
16
  },
17
17
  "devDependencies": {
18
18
  "@babel/core": "^7.20.0",