react-native-macos 0.0.0-c2e966d13 → 0.0.0-c647671b0

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.
Files changed (51) hide show
  1. package/Libraries/Animated/nodes/AnimatedValue.js +0 -1
  2. package/Libraries/Components/Button.js +1 -1
  3. package/Libraries/Components/CheckBox/CheckBox.macos.js +8 -4
  4. package/Libraries/Components/Keyboard/Keyboard.js +2 -2
  5. package/Libraries/Components/Touchable/TouchableBounce.js +11 -22
  6. package/Libraries/Components/Touchable/TouchableHighlight.js +19 -30
  7. package/Libraries/Components/Touchable/TouchableOpacity.js +14 -29
  8. package/Libraries/Components/Touchable/TouchableWithoutFeedback.js +8 -18
  9. package/Libraries/Components/View/ReactNativeViewAttributes.js +8 -7
  10. package/Libraries/Components/View/ReactNativeViewViewConfigMacOS.js +1 -2
  11. package/Libraries/Components/View/View.js +8 -10
  12. package/Libraries/Components/View/ViewAccessibility.js +0 -1
  13. package/Libraries/Components/View/ViewPropTypes.js +1 -7
  14. package/Libraries/Core/ReactNativeVersion.js +5 -1
  15. package/Libraries/LogBox/Data/LogBoxData.js +18 -18
  16. package/Libraries/Text/Text/RCTTextView.m +7 -1
  17. package/Libraries/Types/RootTagTypes.js~merged +23 -0
  18. package/React/Base/RCTVersion.m +5 -1
  19. package/React/Base/Surface/SurfaceHostingView/RCTSurfaceHostingView.mm +1 -1
  20. package/React/CoreModules/RCTAlertController.m +8 -4
  21. package/React/FBReactNativeSpec/FBReactNativeSpec/FBReactNativeSpec-generated.mm +2126 -0
  22. package/React/FBReactNativeSpec/FBReactNativeSpec/FBReactNativeSpec.h +2682 -0
  23. package/React/Modules/RCTEventEmitter.h +2 -2
  24. package/React/Views/RCTViewManager.m +0 -7
  25. package/React-Core.podspec +0 -11
  26. package/ReactAndroid/gradle.properties +1 -1
  27. package/ReactAndroid/src/main/java/com/facebook/react/ReactActivity.java +7 -0
  28. package/ReactAndroid/src/main/java/com/facebook/react/ReactActivityDelegate.java +7 -0
  29. package/ReactAndroid/src/main/java/com/facebook/react/devsupport/interfaces/BundleLoadCallback.java +3 -1
  30. package/ReactAndroid/src/main/java/com/facebook/react/modules/appearance/AppearanceModule.java +10 -1
  31. package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +5 -1
  32. package/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputManager.java +0 -8
  33. package/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewBackgroundDrawable.java +8 -8
  34. package/ReactAndroid/src/main/jni/third-party/libevent/event-config.h +339 -339
  35. package/ReactCommon/cxxreact/ReactNativeVersion.h +5 -1
  36. package/jest/preprocessor.js +7 -75
  37. package/local-cli/cli.js +0 -0
  38. package/local-cli/generator-macos/templates/macos/Podfile +2 -7
  39. package/package.json +8 -13
  40. package/scripts/react-native-xcode.sh +1 -1
  41. package/scripts/react_native_pods.rb +1 -1
  42. package/template/package.json +3 -1
  43. package/third-party-podspecs/RCT-Folly.podspec +1 -1
  44. package/CHANGELOG.json +0 -500
  45. package/CHANGELOG.md +0 -240
  46. package/Libraries/.npmignore +0 -1
  47. package/ReactAndroid/.npmignore +0 -5
  48. package/ReactAndroid/src/main/jni/first-party/fbjni/.gitignore +0 -2
  49. package/ReactCommon/hermes/inspector/tools/msggen/.gitignore +0 -3
  50. package/scripts/fixmacscripts.sh +0 -9
  51. package/scripts/postInstall.js +0 -6
@@ -14,8 +14,8 @@
14
14
  @interface RCTEventEmitter : NSObject <RCTBridgeModule, RCTInvalidating>
15
15
 
16
16
  @property (nonatomic, weak) RCTBridge * _Nullable bridge; // TODO(macOS GH#774)
17
- @property (nonatomic, weak) RCTModuleRegistry *moduleRegistry;
18
- @property (nonatomic, weak) RCTViewRegistry *viewRegistry_DEPRECATED;
17
+ @property (nonatomic, weak) RCTModuleRegistry * _Nullable moduleRegistry; // TODO(macOS GH#774)
18
+ @property (nonatomic, weak) RCTViewRegistry * _Nullable viewRegistry_DEPRECATED; // TODO(macOS GH#774)
19
19
 
20
20
  - (instancetype _Nullable)initWithDisabledObservation; // TODO(macOS GH#774)
21
21
 
@@ -51,7 +51,6 @@ RCT_MULTI_ENUM_CONVERTER(
51
51
  // a set of RN accessibilityTraits are macOS specific accessiblity roles and map to nothing on iOS:
52
52
  @"disclosure" : @(UIAccessibilityTraitNone),
53
53
  @"group" : @(UIAccessibilityTraitNone),
54
- @"list" : @(UIAccessibilityTraitNone),
55
54
  // ]TODO(macOS GH#774)
56
55
  @"alert" : @(UIAccessibilityTraitNone),
57
56
  @"checkbox" : @(UIAccessibilityTraitNone),
@@ -386,12 +385,6 @@ RCT_CUSTOM_VIEW_PROPERTY(acceptsFirstMouse, BOOL, RCTView)
386
385
  view.acceptsFirstMouse = json ? [RCTConvert BOOL:json] : defaultView.acceptsFirstMouse;
387
386
  }
388
387
  }
389
- RCT_CUSTOM_VIEW_PROPERTY(acceptsKeyboardFocus, BOOL, RCTView)
390
- {
391
- if ([view respondsToSelector:@selector(setFocusable:)]) {
392
- view.focusable = json ? [RCTConvert BOOL:json] : defaultView.focusable;
393
- }
394
- }
395
388
  RCT_CUSTOM_VIEW_PROPERTY(focusable, BOOL, RCTView)
396
389
  {
397
390
  if ([view respondsToSelector:@selector(setFocusable:)]) {
@@ -77,17 +77,6 @@ Pod::Spec.new do |s|
77
77
  ss.private_header_files = "React/Cxx*/*.h"
78
78
  end
79
79
 
80
- s.subspec "Hermes" do |ss|
81
- ss.platforms = { :osx => "10.15", :ios => "11.0" }
82
- ss.source_files = "ReactCommon/hermes/executor/*.{cpp,h}",
83
- "ReactCommon/hermes/inspector/*.{cpp,h}",
84
- "ReactCommon/hermes/inspector/chrome/*.{cpp,h}",
85
- "ReactCommon/hermes/inspector/detail/*.{cpp,h}"
86
- ss.pod_target_xcconfig = { "GCC_PREPROCESSOR_DEFINITIONS" => "HERMES_ENABLE_DEBUGGER=1" }
87
- ss.dependency "RCT-Folly/Futures"
88
- ss.dependency "hermes-engine"
89
- end
90
-
91
80
  s.subspec "DevSupport" do |ss|
92
81
  ss.source_files = "React/DevSupport/*.{h,mm,m}",
93
82
  "React/Inspector/*.{h,mm,m}"
@@ -1,4 +1,4 @@
1
- VERSION_NAME=0.0.0-c2e966d13
1
+ VERSION_NAME=0.0.0-c647671b0
2
2
  GROUP=com.facebook.react
3
3
 
4
4
  POM_NAME=ReactNative
@@ -8,6 +8,7 @@
8
8
  package com.facebook.react;
9
9
 
10
10
  import android.content.Intent;
11
+ import android.content.res.Configuration;
11
12
  import android.os.Bundle;
12
13
  import android.view.KeyEvent;
13
14
  import androidx.annotation.Nullable;
@@ -121,6 +122,12 @@ public abstract class ReactActivity extends AppCompatActivity
121
122
  mDelegate.onWindowFocusChanged(hasFocus);
122
123
  }
123
124
 
125
+ @Override
126
+ public void onConfigurationChanged(Configuration newConfig) {
127
+ super.onConfigurationChanged(newConfig);
128
+ mDelegate.onConfigurationChanged(newConfig);
129
+ }
130
+
124
131
  protected final ReactNativeHost getReactNativeHost() {
125
132
  return mDelegate.getReactNativeHost();
126
133
  }
@@ -11,6 +11,7 @@ import android.annotation.TargetApi;
11
11
  import android.app.Activity;
12
12
  import android.content.Context;
13
13
  import android.content.Intent;
14
+ import android.content.res.Configuration;
14
15
  import android.os.Build;
15
16
  import android.os.Bundle;
16
17
  import android.view.KeyEvent;
@@ -154,6 +155,12 @@ public class ReactActivityDelegate {
154
155
  }
155
156
  }
156
157
 
158
+ public void onConfigurationChanged(Configuration newConfig) {
159
+ if (getReactNativeHost().hasInstance()) {
160
+ getReactInstanceManager().onConfigurationChanged(getContext(), newConfig);
161
+ }
162
+ }
163
+
157
164
  @TargetApi(Build.VERSION_CODES.M)
158
165
  public void requestPermissions(
159
166
  String[] permissions, int requestCode, PermissionListener listener) {
@@ -5,8 +5,10 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
+ // TODO(macOS GH#774)
9
+
8
10
  package com.facebook.react.devsupport.interfaces;
9
11
 
10
12
  public interface BundleLoadCallback {
11
13
  void onSuccess();
12
- }
14
+ }
@@ -7,6 +7,7 @@
7
7
 
8
8
  package com.facebook.react.modules.appearance;
9
9
 
10
+ import android.app.Activity;
10
11
  import android.content.Context;
11
12
  import android.content.res.Configuration;
12
13
  import androidx.annotation.Nullable;
@@ -74,7 +75,15 @@ public class AppearanceModule extends NativeAppearanceSpec {
74
75
 
75
76
  @Override
76
77
  public String getColorScheme() {
77
- mColorScheme = colorSchemeForCurrentConfiguration(getReactApplicationContext());
78
+ // Attempt to use the Activity context first in order to get the most up to date
79
+ // scheme. This covers the scenario when AppCompatDelegate.setDefaultNightMode()
80
+ // is called directly (which can occur in Brownfield apps for example).
81
+ Activity activity = getCurrentActivity();
82
+
83
+ mColorScheme =
84
+ colorSchemeForCurrentConfiguration(
85
+ activity != null ? activity : getReactApplicationContext());
86
+
78
87
  return mColorScheme;
79
88
  }
80
89
 
@@ -13,10 +13,14 @@ import com.facebook.react.common.MapBuilder;
13
13
 
14
14
  import java.util.Map;
15
15
 
16
+ // [TODO(macOS GH#944)
17
+ // Note: Be careful not to override these version numbers
18
+ // when we merge upstream stable branches into main
19
+ // TODO(macOS GH#944)]
16
20
  public class ReactNativeVersion {
17
21
  public static final Map<String, Object> VERSION = MapBuilder.<String, Object>of(
18
22
  "major", 0,
19
23
  "minor", 0,
20
24
  "patch", 0,
21
- "prerelease", "c2e966d13");
25
+ "prerelease", "c647671b0");
22
26
  }
@@ -828,16 +828,8 @@ public class ReactTextInputManager extends BaseViewManager<ReactEditText, Layout
828
828
  // This will supercede secureTextEntry={false}. If it doesn't, due to the way
829
829
  // the flags work out, the underlying field will end up a URI-type field.
830
830
  flagsToSet = InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD;
831
- <<<<<<< HEAD
832
- } else if ((view.getStagedInputType() & AUTOCAPITALIZE_FLAGS) != 0) {
833
- // This prevents KEYBOARD_TYPE_FLAGS from being unset when the keyboardType is
834
- // default, null, or unsupported, and autocapitalize is on.
835
- // Unsetting these flags breaks the autoCapitalize functionality.
836
- unsettingFlagsBreaksAutocomplete = true;
837
- =======
838
831
  } else if (KEYBOARD_TYPE_URI.equalsIgnoreCase(keyboardType)) {
839
832
  flagsToSet = InputType.TYPE_TEXT_VARIATION_URI;
840
- >>>>>>> v0.66.0
841
833
  }
842
834
 
843
835
  updateStagedInputTypeFlag(view, InputType.TYPE_MASK_CLASS, flagsToSet);
@@ -1098,8 +1098,8 @@ public class ReactViewBackgroundDrawable extends Drawable {
1098
1098
  int width = Math.round(borderWidth.left);
1099
1099
  updatePathEffect(width);
1100
1100
  mPaint.setStrokeWidth(width);
1101
- mPathForSingleBorder.moveTo(left, top - borderWidth.top / 2);
1102
- mPathForSingleBorder.lineTo(left, bottom + borderWidth.bottom / 2);
1101
+ mPathForSingleBorder.moveTo(left + width / 2, top);
1102
+ mPathForSingleBorder.lineTo(left + width / 2, bottom);
1103
1103
  canvas.drawPath(mPathForSingleBorder, mPaint);
1104
1104
  }
1105
1105
  if (borderTop > 0) {
@@ -1107,8 +1107,8 @@ public class ReactViewBackgroundDrawable extends Drawable {
1107
1107
  int width = Math.round(borderWidth.top);
1108
1108
  updatePathEffect(width);
1109
1109
  mPaint.setStrokeWidth(width);
1110
- mPathForSingleBorder.moveTo(left, top);
1111
- mPathForSingleBorder.lineTo(right, top);
1110
+ mPathForSingleBorder.moveTo(left, top + width / 2);
1111
+ mPathForSingleBorder.lineTo(right, top + width / 2);
1112
1112
  canvas.drawPath(mPathForSingleBorder, mPaint);
1113
1113
  }
1114
1114
  if (borderRight > 0) {
@@ -1116,8 +1116,8 @@ public class ReactViewBackgroundDrawable extends Drawable {
1116
1116
  int width = Math.round(borderWidth.right);
1117
1117
  updatePathEffect(width);
1118
1118
  mPaint.setStrokeWidth(width);
1119
- mPathForSingleBorder.moveTo(right, top - borderWidth.top / 2);
1120
- mPathForSingleBorder.lineTo(right, bottom + borderWidth.bottom / 2);
1119
+ mPathForSingleBorder.moveTo(right - width / 2, top);
1120
+ mPathForSingleBorder.lineTo(right - width / 2, bottom);
1121
1121
  canvas.drawPath(mPathForSingleBorder, mPaint);
1122
1122
  }
1123
1123
  if (borderBottom > 0) {
@@ -1125,8 +1125,8 @@ public class ReactViewBackgroundDrawable extends Drawable {
1125
1125
  int width = Math.round(borderWidth.bottom);
1126
1126
  updatePathEffect(width);
1127
1127
  mPaint.setStrokeWidth(width);
1128
- mPathForSingleBorder.moveTo(left, bottom);
1129
- mPathForSingleBorder.lineTo(right, bottom);
1128
+ mPathForSingleBorder.moveTo(left, bottom - width / 2);
1129
+ mPathForSingleBorder.lineTo(right, bottom - width / 2);
1130
1130
  canvas.drawPath(mPathForSingleBorder, mPaint);
1131
1131
  }
1132
1132
  }