react-native-macos 0.64.16 → 0.64.20

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.
@@ -25,10 +25,9 @@ import type {
25
25
  import {PressabilityDebugView} from '../../Pressability/PressabilityDebug';
26
26
  import usePressability from '../../Pressability/usePressability';
27
27
  import {normalizeRect, type RectOrSize} from '../../StyleSheet/Rect';
28
- import type {ColorValue} from '../../StyleSheet/StyleSheet';
29
28
  import type {
30
29
  LayoutEvent,
31
- MouseEvent, // TODO(macOS GH#774)
30
+ MouseEvent,
32
31
  PressEvent,
33
32
  } from '../../Types/CoreEventTypes';
34
33
  import type {DraggedTypesType} from '../View/DraggedType'; // TODO(macOS GH#774)
@@ -65,6 +64,16 @@ type Props = $ReadOnly<{|
65
64
  */
66
65
  children: React.Node | ((state: StateCallbackType) => React.Node),
67
66
 
67
+ /**
68
+ * Duration to wait after hover in before calling `onHoverIn`.
69
+ */
70
+ delayHoverIn?: ?number,
71
+
72
+ /**
73
+ * Duration to wait after hover out before calling `onHoverOut`.
74
+ */
75
+ delayHoverOut?: ?number,
76
+
68
77
  /**
69
78
  * Duration (in milliseconds) from `onPressIn` before `onLongPress` is called.
70
79
  */
@@ -91,6 +100,16 @@ type Props = $ReadOnly<{|
91
100
  */
92
101
  onLayout?: ?(event: LayoutEvent) => void,
93
102
 
103
+ /**
104
+ * Called when the hover is activated to provide visual feedback.
105
+ */
106
+ onHoverIn?: ?(event: MouseEvent) => mixed,
107
+
108
+ /**
109
+ * Called when the hover is deactivated to undo visual feedback.
110
+ */
111
+ onHoverOut?: ?(event: MouseEvent) => mixed,
112
+
94
113
  /**
95
114
  * Called when a long-tap gesture is detected.
96
115
  */
@@ -167,11 +186,13 @@ function Pressable(props: Props, forwardedRef): React.Node {
167
186
  android_disableSound,
168
187
  android_ripple,
169
188
  children,
189
+ delayHoverIn,
190
+ delayHoverOut,
170
191
  delayLongPress,
171
192
  disabled,
172
193
  focusable,
173
- onMouseEnter, // [TODO(macOS GH#774)
174
- onMouseLeave, // ]TODO(macOS GH#774)
194
+ onHoverIn,
195
+ onHoverOut,
175
196
  onLongPress,
176
197
  onPress,
177
198
  onPressIn,
@@ -208,10 +229,12 @@ function Pressable(props: Props, forwardedRef): React.Node {
208
229
  hitSlop,
209
230
  pressRectOffset: pressRetentionOffset,
210
231
  android_disableSound,
232
+ delayHoverIn,
233
+ delayHoverOut,
211
234
  delayLongPress,
212
235
  delayPressIn: unstable_pressDelay,
213
- onHoverIn: onMouseEnter, // [TODO(macOS GH#774)
214
- onHoverOut: onMouseLeave, // ]TODO(macOS GH#774)
236
+ onHoverIn,
237
+ onHoverOut,
215
238
  onLongPress,
216
239
  onPress,
217
240
  onPressIn(event: PressEvent): void {
@@ -237,11 +260,13 @@ function Pressable(props: Props, forwardedRef): React.Node {
237
260
  [
238
261
  android_disableSound,
239
262
  android_rippleConfig,
263
+ delayHoverIn,
264
+ delayHoverOut,
240
265
  delayLongPress,
241
266
  disabled,
242
267
  hitSlop,
243
- onMouseEnter, // [TODO(macOS GH#774)
244
- onMouseLeave, // ]TODO(macOS GH#774)
268
+ onHoverIn,
269
+ onHoverOut,
245
270
  onLongPress,
246
271
  onPress,
247
272
  onPressIn,
@@ -12,6 +12,6 @@
12
12
  exports.version = {
13
13
  major: 0,
14
14
  minor: 64,
15
- patch: 16,
15
+ patch: 20,
16
16
  prerelease: null,
17
17
  };
@@ -23,7 +23,7 @@ NSDictionary* RCTGetReactNativeVersion(void)
23
23
  __rnVersion = @{
24
24
  RCTVersionMajor: @(0),
25
25
  RCTVersionMinor: @(64),
26
- RCTVersionPatch: @(16),
26
+ RCTVersionPatch: @(20),
27
27
  RCTVersionPrerelease: [NSNull null],
28
28
  };
29
29
  });
@@ -118,16 +118,15 @@ RCT_EXPORT_METHOD(showActionSheetWithOptions
118
118
  UIColor *tintColor = [RCTConvert UIColor:options.tintColor() ? @(*options.tintColor()) : nil];
119
119
 
120
120
  if (controller == nil) {
121
- RCTLogError(@"Tried to display action sheet but there is no application window. options: %@", @{
122
- @"title" : title,
123
- @"message" : message,
124
- @"options" : buttons,
121
+ RCTLogError(@"Tried to display action sheet but there is no application window. options: %@", @{ /* // [ TODO(macOS GH#774): nil check our dict values before inserting them or we may crash */
122
+ @"title" : title ?: [NSNull null],
123
+ @"message" : message ?: [NSNull null],
124
+ @"options" : buttons ?: [NSNull null],
125
125
  @"cancelButtonIndex" : @(cancelButtonIndex),
126
- @"destructiveButtonIndices" : destructiveButtonIndices,
127
- @"anchor" : anchor,
128
- @"tintColor" : tintColor,
129
- @"disabledButtonIndices" : disabledButtonIndices,
130
- });
126
+ @"destructiveButtonIndices" : destructiveButtonIndices ?: [NSNull null],
127
+ @"anchor" : anchor ?: [NSNull null],
128
+ @"tintColor" : tintColor ?: [NSNull null],
129
+ }); /* // TODO(macOS GH#774): nil check our dict values before inserting them or we may crash ] */
131
130
  return;
132
131
  }
133
132
  #endif // TODO(macOS GH#774)
@@ -1,5 +1,5 @@
1
1
  # TODO :: ANDROID patch to stay consistant with the npm version.
2
- VERSION_NAME=0.64.16
2
+ VERSION_NAME=0.64.20
3
3
  GROUP=com.facebook.react
4
4
 
5
5
  POM_NAME=ReactNative
@@ -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", 64,
20
- "patch", 16,
20
+ "patch", 20,
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 = 64;
20
- int32_t Patch = 16;
20
+ int32_t Patch = 20;
21
21
  std::string_view Prerelease = "";
22
22
  } ReactNativeVersion;
23
23
 
@@ -937,7 +937,9 @@ class JSI_EXPORT Value {
937
937
  std::is_base_of<String, T>::value ||
938
938
  std::is_base_of<Object, T>::value,
939
939
  "Value cannot be implicitly move-constructed from this type");
940
+ #ifndef __clang_analyzer__ // TODO(macOS GH#774) Disable [bugprone-move-forwarding-reference] when running clang static analysis
940
941
  new (&data_.pointer) T(std::move(other));
942
+ #endif // __clang_analyzer__
941
943
  }
942
944
 
943
945
  /// Value("foo") will treat foo as a bool. This makes doing that a
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-macos",
3
- "version": "0.64.16",
3
+ "version": "0.64.20",
4
4
  "bin": "./cli.js",
5
5
  "description": "[Microsoft Fork] A framework for building native apps using React",
6
6
  "license": "MIT",
@@ -11,7 +11,7 @@
11
11
  },
12
12
  "dependencies": {
13
13
  "react": "17.0.1",
14
- "react-native": "0.64.16"
14
+ "react-native": "0.64.20"
15
15
  },
16
16
  "devDependencies": {
17
17
  "@babel/core": "^7.12.9",