react-native-macos 0.68.60 → 0.68.62
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/Core/ReactNativeVersion.js +1 -1
- package/Libraries/Pressability/Pressability.js +23 -0
- package/React/Base/RCTVersion.m +1 -1
- package/React/Views/RCTView.m +6 -0
- 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/package.json +3 -1
- package/template/Gemfile +1 -1
- package/template/Gemfile.lock +3 -3
- package/template/_ruby-version +1 -1
- package/template/package.json +1 -1
|
@@ -628,12 +628,35 @@ export default class Pressability {
|
|
|
628
628
|
if (onKeyDown != null) {
|
|
629
629
|
onKeyDown(event);
|
|
630
630
|
}
|
|
631
|
+
// Pressables on macOS should respond to the enter/return and spacebar keys.
|
|
632
|
+
// The keyDown event triggers a press event as well as the pressIn effect mimicking a native control behavior.
|
|
633
|
+
if (
|
|
634
|
+
(event.nativeEvent.key === 'Enter' ||
|
|
635
|
+
event.nativeEvent.key === ' ') &&
|
|
636
|
+
event.defaultPrevented !== true
|
|
637
|
+
) {
|
|
638
|
+
const {onPress, onPressIn} = this._config;
|
|
639
|
+
// $FlowFixMe: PressEvents don't mesh with keyboarding APIs. Keep legacy behavior of passing KeyEvents instead
|
|
640
|
+
onPressIn && onPressIn(event);
|
|
641
|
+
// $FlowFixMe: PressEvents don't mesh with keyboarding APIs. Keep legacy behavior of passing KeyEvents instead
|
|
642
|
+
onPress && onPress(event);
|
|
643
|
+
}
|
|
631
644
|
},
|
|
632
645
|
onKeyUp: (event: KeyEvent): void => {
|
|
633
646
|
const {onKeyUp} = this._config;
|
|
634
647
|
if (onKeyUp != null) {
|
|
635
648
|
onKeyUp(event);
|
|
636
649
|
}
|
|
650
|
+
// The keyUp event triggers the pressOut effect.
|
|
651
|
+
if (
|
|
652
|
+
(event.nativeEvent.key === 'Enter' ||
|
|
653
|
+
event.nativeEvent.key === ' ') &&
|
|
654
|
+
event.defaultPrevented !== true
|
|
655
|
+
) {
|
|
656
|
+
const {onPressOut} = this._config;
|
|
657
|
+
// $FlowFixMe: PressEvents don't mesh with keyboarding APIs. Keep legacy behavior of passing KeyEvents instead
|
|
658
|
+
onPressOut && onPressOut(event);
|
|
659
|
+
}
|
|
637
660
|
},
|
|
638
661
|
};
|
|
639
662
|
// ]TODO(macOS GH#774)
|
package/React/Base/RCTVersion.m
CHANGED
package/React/Views/RCTView.m
CHANGED
|
@@ -1632,6 +1632,12 @@ setBorderColor() setBorderColor(Top) setBorderColor(Right) setBorderColor(Bottom
|
|
|
1632
1632
|
NSArray<NSString *> *validKeys = keyDown ? self.validKeysDown : self.validKeysUp;
|
|
1633
1633
|
NSString *key = [RCTViewKeyboardEvent keyFromEvent:event];
|
|
1634
1634
|
|
|
1635
|
+
// If the view is focusable and the component didn't explicity set the validKeysDown or Up,
|
|
1636
|
+
// allow enter/return and spacebar key events to mimic the behavior of native controls.
|
|
1637
|
+
if (self.focusable && validKeys == nil) {
|
|
1638
|
+
validKeys = @[@"Enter", @" "];
|
|
1639
|
+
}
|
|
1640
|
+
|
|
1635
1641
|
// Only post events for keys we care about
|
|
1636
1642
|
if (![validKeys containsObject:key]) {
|
|
1637
1643
|
return nil;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-macos",
|
|
3
|
-
"version": "0.68.
|
|
3
|
+
"version": "0.68.62",
|
|
4
4
|
"bin": "./cli.js",
|
|
5
5
|
"description": "React Native for macOS",
|
|
6
6
|
"license": "MIT",
|
|
@@ -177,6 +177,7 @@
|
|
|
177
177
|
},
|
|
178
178
|
"resolutions": {
|
|
179
179
|
"async": "^3.2.2",
|
|
180
|
+
"debug": ">=3.1.0",
|
|
180
181
|
"es5-ext": "0.10.53",
|
|
181
182
|
"micromatch": "^4.0.0",
|
|
182
183
|
"readable-stream": "^4.0.0",
|
|
@@ -184,6 +185,7 @@
|
|
|
184
185
|
},
|
|
185
186
|
"_justification": {
|
|
186
187
|
"async": "Versions of async prior to 3.2.2 are vulnerable to prototype pollution",
|
|
188
|
+
"debug": "ReDoS vulnerability in older versions, plus the dependents that pull in debug@<1.0.0 haven't been updated in years",
|
|
187
189
|
"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.",
|
|
188
190
|
"micromatch": "Version 3.x.x depends on decode-uri-component 0.2.0, which has a DoS vulnerability",
|
|
189
191
|
"readable-stream": "Eliminates dependency on outdated string_decoder component",
|
package/template/Gemfile
CHANGED
package/template/Gemfile.lock
CHANGED
|
@@ -3,7 +3,7 @@ GEM
|
|
|
3
3
|
specs:
|
|
4
4
|
CFPropertyList (3.0.5)
|
|
5
5
|
rexml
|
|
6
|
-
activesupport (6.1.7)
|
|
6
|
+
activesupport (6.1.7.1)
|
|
7
7
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
8
8
|
i18n (>= 1.6, < 2)
|
|
9
9
|
minitest (>= 5.1)
|
|
@@ -94,7 +94,7 @@ DEPENDENCIES
|
|
|
94
94
|
cocoapods (~> 1.11, >= 1.11.2)
|
|
95
95
|
|
|
96
96
|
RUBY VERSION
|
|
97
|
-
ruby 3.0.
|
|
97
|
+
ruby 3.0.5p211
|
|
98
98
|
|
|
99
99
|
BUNDLED WITH
|
|
100
|
-
2.
|
|
100
|
+
2.4.4
|
package/template/_ruby-version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
3.0.
|
|
1
|
+
3.0.5
|