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.
- package/Libraries/Components/Pressable/Pressable.js +33 -8
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/React/Base/RCTVersion.m +1 -1
- package/React/CoreModules/RCTActionSheetManager.mm +8 -9
- 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/ReactCommon/jsi/jsi/jsi.h +2 -0
- package/package.json +1 -1
- package/template/package.json +1 -1
|
@@ -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,
|
|
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
|
-
|
|
174
|
-
|
|
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
|
|
214
|
-
onHoverOut
|
|
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
|
-
|
|
244
|
-
|
|
268
|
+
onHoverIn,
|
|
269
|
+
onHoverOut,
|
|
245
270
|
onLongPress,
|
|
246
271
|
onPress,
|
|
247
272
|
onPressIn,
|
package/React/Base/RCTVersion.m
CHANGED
|
@@ -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
|
-
|
|
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)
|
|
@@ -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