react-native-macos 0.71.5 → 0.71.7
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/NativeModules/specs/NativeDevSettings.js +3 -0
- package/Libraries/Text/TextInput/Multiline/RCTMultilineTextInputView.m +2 -0
- package/Libraries/Text/TextInput/RCTBackedTextInputDelegateAdapter.m +2 -2
- package/React/Base/RCTVersion.m +1 -1
- package/React/CoreModules/RCTDevSettings.mm +14 -0
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/debug/DevSettingsModule.java +7 -0
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +1 -1
- package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
- package/package.json +1 -1
- package/template/package.json +1 -1
|
@@ -28,6 +28,9 @@ export interface Spec extends TurboModule {
|
|
|
28
28
|
|
|
29
29
|
// iOS only.
|
|
30
30
|
+setIsShakeToShowDevMenuEnabled: (enabled: boolean) => void;
|
|
31
|
+
|
|
32
|
+
// macOS only.
|
|
33
|
+
+setIsSecondaryClickToShowDevMenuEnabled: (enabled: boolean) => void; // [macOS]
|
|
31
34
|
}
|
|
32
35
|
|
|
33
36
|
export default (TurboModuleRegistry.getEnforcing<Spec>('DevSettings'): Spec);
|
|
@@ -198,7 +198,7 @@ static void *TextFieldSelectionObservingContext = &TextFieldSelectionObservingCo
|
|
|
198
198
|
// enter/return
|
|
199
199
|
if (commandSelector == @selector(insertNewline:) || commandSelector == @selector(insertNewlineIgnoringFieldEditor:)) {
|
|
200
200
|
[self textFieldDidEndEditingOnExit];
|
|
201
|
-
if ([textInputDelegate
|
|
201
|
+
if ([textInputDelegate textInputShouldSubmitOnReturn]) {
|
|
202
202
|
[[_backedTextInputView window] makeFirstResponder:nil];
|
|
203
203
|
}
|
|
204
204
|
commandHandled = YES;
|
|
@@ -434,7 +434,7 @@ static void *TextFieldSelectionObservingContext = &TextFieldSelectionObservingCo
|
|
|
434
434
|
id<RCTBackedTextInputDelegate> textInputDelegate = [_backedTextInputView textInputDelegate];
|
|
435
435
|
// enter/return
|
|
436
436
|
if ((commandSelector == @selector(insertNewline:) || commandSelector == @selector(insertNewlineIgnoringFieldEditor:))) {
|
|
437
|
-
if (textInputDelegate
|
|
437
|
+
if ([textInputDelegate textInputShouldSubmitOnReturn]) {
|
|
438
438
|
[_backedTextInputView.window makeFirstResponder:nil];
|
|
439
439
|
commandHandled = YES;
|
|
440
440
|
}
|
package/React/Base/RCTVersion.m
CHANGED
|
@@ -31,6 +31,7 @@ static NSString *const kRCTDevSettingIsDebuggingRemotely = @"isDebuggingRemotely
|
|
|
31
31
|
static NSString *const kRCTDevSettingExecutorOverrideClass = @"executor-override";
|
|
32
32
|
static NSString *const kRCTDevSettingShakeToShowDevMenu = @"shakeToShow";
|
|
33
33
|
static NSString *const kRCTDevSettingIsPerfMonitorShown = @"RCTPerfMonitorKey";
|
|
34
|
+
static NSString *const kRCTDevSettingSecondClickToShowDevMenu = @"secondClickToShow"; // [macOS]
|
|
34
35
|
|
|
35
36
|
static NSString *const kRCTDevSettingsUserDefaultsKey = @"RCTDevMenu";
|
|
36
37
|
|
|
@@ -157,6 +158,7 @@ RCT_EXPORT_MODULE()
|
|
|
157
158
|
NSDictionary *defaultValues = @{
|
|
158
159
|
kRCTDevSettingShakeToShowDevMenu : @YES,
|
|
159
160
|
kRCTDevSettingHotLoadingEnabled : @YES,
|
|
161
|
+
kRCTDevSettingSecondClickToShowDevMenu: @YES, // [macOS]
|
|
160
162
|
};
|
|
161
163
|
RCTDevSettingsUserDefaultsDataSource *dataSource =
|
|
162
164
|
[[RCTDevSettingsUserDefaultsDataSource alloc] initWithDefaultValues:defaultValues];
|
|
@@ -332,6 +334,18 @@ RCT_EXPORT_METHOD(setIsShakeToShowDevMenuEnabled : (BOOL)enabled)
|
|
|
332
334
|
return [[self settingForKey:kRCTDevSettingShakeToShowDevMenu] boolValue];
|
|
333
335
|
}
|
|
334
336
|
|
|
337
|
+
// [macOS
|
|
338
|
+
RCT_EXPORT_METHOD(setIsSecondaryClickToShowDevMenuEnabled:(BOOL)enabled)
|
|
339
|
+
{
|
|
340
|
+
[self _updateSettingWithValue:@(enabled) forKey:kRCTDevSettingSecondClickToShowDevMenu];
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
- (BOOL)isSecondaryClickToShowDevMenuEnabled
|
|
344
|
+
{
|
|
345
|
+
return [[self settingForKey:kRCTDevSettingSecondClickToShowDevMenu] boolValue];
|
|
346
|
+
}
|
|
347
|
+
// macOS]
|
|
348
|
+
|
|
335
349
|
RCT_EXPORT_METHOD(setIsDebuggingRemotely:(BOOL)enabled)
|
|
336
350
|
{
|
|
337
351
|
[self _updateSettingWithValue:@(enabled) forKey:kRCTDevSettingIsDebuggingRemotely];
|
|
@@ -109,6 +109,13 @@ public class DevSettingsModule extends NativeDevSettingsSpec {
|
|
|
109
109
|
// iOS only
|
|
110
110
|
}
|
|
111
111
|
|
|
112
|
+
// [macOS
|
|
113
|
+
@Override
|
|
114
|
+
public void setIsShakeToShowDevMenuEnabled(boolean enabled) {
|
|
115
|
+
// macOS only
|
|
116
|
+
}
|
|
117
|
+
// macOS]
|
|
118
|
+
|
|
112
119
|
@Override
|
|
113
120
|
public void addListener(String eventName) {
|
|
114
121
|
// iOS only
|
package/package.json
CHANGED