react-native 0.76.0-rc.4 → 0.76.0-rc.6

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 (23) hide show
  1. package/Libraries/Core/ReactNativeVersion.js +1 -1
  2. package/React/Base/RCTVersion.m +1 -1
  3. package/ReactAndroid/api/ReactAndroid.api +3 -3
  4. package/ReactAndroid/build.gradle.kts +0 -1
  5. package/ReactAndroid/gradle.properties +1 -1
  6. package/ReactAndroid/src/main/java/com/facebook/react/bridge/UIManager.kt +2 -1
  7. package/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricUIManager.java +0 -1
  8. package/ReactAndroid/src/main/java/com/facebook/react/modules/dialog/AlertFragment.java +5 -57
  9. package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +1 -1
  10. package/ReactAndroid/src/main/java/com/facebook/react/packagerconnection/PackagerConnectionSettings.kt +2 -2
  11. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManagerDelegate.kt +2 -2
  12. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ViewManagerDelegate.kt +19 -2
  13. package/ReactAndroid/src/main/java/com/facebook/react/views/modal/ReactModalHostView.kt +26 -16
  14. package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
  15. package/package.json +10 -10
  16. package/scripts/cocoapods/new_architecture.rb +16 -2
  17. package/sdks/hermesc/osx-bin/hermes +0 -0
  18. package/sdks/hermesc/osx-bin/hermesc +0 -0
  19. package/sdks/hermesc/win64-bin/hermesc.exe +0 -0
  20. package/sdks/hermesc/win64-bin/msvcp140.dll +0 -0
  21. package/sdks/hermesc/win64-bin/vcruntime140.dll +0 -0
  22. package/sdks/hermesc/win64-bin/vcruntime140_1.dll +0 -0
  23. package/ReactAndroid/src/main/res/views/alert/layout/alert_title_layout.xml +0 -22
@@ -17,7 +17,7 @@ const version: $ReadOnly<{
17
17
  major: 0,
18
18
  minor: 76,
19
19
  patch: 0,
20
- prerelease: 'rc.4',
20
+ prerelease: 'rc.6',
21
21
  };
22
22
 
23
23
  module.exports = {version};
@@ -24,7 +24,7 @@ NSDictionary* RCTGetReactNativeVersion(void)
24
24
  RCTVersionMajor: @(0),
25
25
  RCTVersionMinor: @(76),
26
26
  RCTVersionPatch: @(0),
27
- RCTVersionPrerelease: @"rc.4",
27
+ RCTVersionPrerelease: @"rc.6",
28
28
  };
29
29
  });
30
30
  return __rnVersion;
@@ -3798,13 +3798,13 @@ public abstract class com/facebook/react/packagerconnection/NotificationOnlyHand
3798
3798
  public final fun onRequest (Ljava/lang/Object;Lcom/facebook/react/packagerconnection/Responder;)V
3799
3799
  }
3800
3800
 
3801
- public final class com/facebook/react/packagerconnection/PackagerConnectionSettings {
3801
+ public class com/facebook/react/packagerconnection/PackagerConnectionSettings {
3802
3802
  public fun <init> (Landroid/content/Context;)V
3803
3803
  public final fun getAdditionalOptionsForPackager ()Ljava/util/Map;
3804
- public final fun getDebugServerHost ()Ljava/lang/String;
3804
+ public fun getDebugServerHost ()Ljava/lang/String;
3805
3805
  public final fun getPackageName ()Ljava/lang/String;
3806
3806
  public final fun setAdditionalOptionForPackager (Ljava/lang/String;Ljava/lang/String;)V
3807
- public final fun setDebugServerHost (Ljava/lang/String;)V
3807
+ public fun setDebugServerHost (Ljava/lang/String;)V
3808
3808
  }
3809
3809
 
3810
3810
  public final class com/facebook/react/packagerconnection/ReconnectingWebSocket : okhttp3/WebSocketListener {
@@ -557,7 +557,6 @@ android {
557
557
  listOf(
558
558
  "src/main/res/devsupport",
559
559
  "src/main/res/shell",
560
- "src/main/res/views/alert",
561
560
  "src/main/res/views/modal",
562
561
  "src/main/res/views/uimanager"))
563
562
  java.exclude("com/facebook/react/processing")
@@ -1,4 +1,4 @@
1
- VERSION_NAME=0.76.0-rc.4
1
+ VERSION_NAME=0.76.0-rc.6
2
2
  react.internal.publishingGroup=com.facebook.react
3
3
 
4
4
  android.useAndroidX=true
@@ -12,6 +12,7 @@ import androidx.annotation.AnyThread
12
12
  import androidx.annotation.UiThread
13
13
  import com.facebook.infer.annotation.ThreadConfined
14
14
  import com.facebook.react.common.annotations.UnstableReactNativeAPI
15
+ import com.facebook.react.uimanager.events.EventDispatcher
15
16
 
16
17
  @OptIn(UnstableReactNativeAPI::class)
17
18
  public interface UIManager : PerformanceCounter {
@@ -78,7 +79,7 @@ public interface UIManager : PerformanceCounter {
78
79
  public fun dispatchCommand(reactTag: Int, commandId: String, commandArgs: ReadableArray?)
79
80
 
80
81
  /** @return the [EventDispatcher] object that is used by this class. */
81
- public fun <T> getEventDispatcher(): T
82
+ public val eventDispatcher: EventDispatcher
82
83
 
83
84
  /**
84
85
  * Used by native animated module to bypass the process of updating the values through the shadow
@@ -1021,7 +1021,6 @@ public class FabricUIManager
1021
1021
 
1022
1022
  @Override
1023
1023
  @NonNull
1024
- @SuppressWarnings("unchecked")
1025
1024
  public EventDispatcher getEventDispatcher() {
1026
1025
  return mEventDispatcher;
1027
1026
  }
@@ -12,20 +12,11 @@ import android.app.Dialog;
12
12
  import android.content.Context;
13
13
  import android.content.DialogInterface;
14
14
  import android.content.res.TypedArray;
15
- import android.os.Build;
16
15
  import android.os.Bundle;
17
- import android.view.LayoutInflater;
18
- import android.view.View;
19
- import android.widget.TextView;
20
16
  import androidx.annotation.Nullable;
21
17
  import androidx.appcompat.app.AlertDialog;
22
- import androidx.core.view.AccessibilityDelegateCompat;
23
- import androidx.core.view.ViewCompat;
24
- import androidx.core.view.accessibility.AccessibilityNodeInfoCompat;
25
18
  import androidx.fragment.app.DialogFragment;
26
- import com.facebook.infer.annotation.Assertions;
27
19
  import com.facebook.infer.annotation.Nullsafe;
28
- import com.facebook.react.R;
29
20
 
30
21
  /** A fragment used to display the dialog. */
31
22
  @Nullsafe(Nullsafe.Mode.LOCAL)
@@ -75,55 +66,15 @@ public class AlertFragment extends DialogFragment implements DialogInterface.OnC
75
66
  return isAppCompat;
76
67
  }
77
68
 
78
- /**
79
- * Creates a custom dialog title View that has the role of "Heading" and focusable for
80
- * accessibility purposes.
81
- *
82
- * @returns accessible TextView title
83
- */
84
- private static View getAccessibleTitle(Context activityContext, String titleText) {
85
- LayoutInflater inflater = LayoutInflater.from(activityContext);
86
-
87
- // This layout matches the sizing and styling of AlertDialog's title_template (minus the icon)
88
- // since the whole thing gets tossed out when setting a custom title
89
- View titleContainer = inflater.inflate(R.layout.alert_title_layout, null);
90
-
91
- TextView accessibleTitle =
92
- Assertions.assertNotNull(titleContainer.findViewById(R.id.alert_title));
93
- accessibleTitle.setText(titleText);
94
- accessibleTitle.setFocusable(true);
95
-
96
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
97
- accessibleTitle.setAccessibilityHeading(true);
98
- } else {
99
- ViewCompat.setAccessibilityDelegate(
100
- accessibleTitle,
101
- new AccessibilityDelegateCompat() {
102
- @Override
103
- public void onInitializeAccessibilityNodeInfo(
104
- View view, AccessibilityNodeInfoCompat info) {
105
- super.onInitializeAccessibilityNodeInfo(accessibleTitle, info);
106
- info.setHeading(true);
107
- }
108
- });
109
- }
110
-
111
- return titleContainer;
112
- }
113
-
114
69
  /**
115
70
  * Creates a dialog compatible only with AppCompat activities. This function should be kept in
116
71
  * sync with {@link createAppDialog}.
117
72
  */
118
73
  private static Dialog createAppCompatDialog(
119
74
  Context activityContext, Bundle arguments, DialogInterface.OnClickListener fragment) {
120
- AlertDialog.Builder builder = new AlertDialog.Builder(activityContext);
75
+ AlertDialog.Builder builder =
76
+ new AlertDialog.Builder(activityContext).setTitle(arguments.getString(ARG_TITLE));
121
77
 
122
- if (arguments.containsKey(ARG_TITLE)) {
123
- String title = Assertions.assertNotNull(arguments.getString(ARG_TITLE));
124
- View accessibleTitle = getAccessibleTitle(activityContext, title);
125
- builder.setCustomTitle(accessibleTitle);
126
- }
127
78
  if (arguments.containsKey(ARG_BUTTON_POSITIVE)) {
128
79
  builder.setPositiveButton(arguments.getString(ARG_BUTTON_POSITIVE), fragment);
129
80
  }
@@ -154,13 +105,10 @@ public class AlertFragment extends DialogFragment implements DialogInterface.OnC
154
105
  @Deprecated(since = "0.75.0", forRemoval = true)
155
106
  private static Dialog createAppDialog(
156
107
  Context activityContext, Bundle arguments, DialogInterface.OnClickListener fragment) {
157
- android.app.AlertDialog.Builder builder = new android.app.AlertDialog.Builder(activityContext);
108
+ android.app.AlertDialog.Builder builder =
109
+ new android.app.AlertDialog.Builder(activityContext)
110
+ .setTitle(arguments.getString(ARG_TITLE));
158
111
 
159
- if (arguments.containsKey(ARG_TITLE)) {
160
- String title = Assertions.assertNotNull(arguments.getString(ARG_TITLE));
161
- View accessibleTitle = getAccessibleTitle(activityContext, title);
162
- builder.setCustomTitle(accessibleTitle);
163
- }
164
112
  if (arguments.containsKey(ARG_BUTTON_POSITIVE)) {
165
113
  builder.setPositiveButton(arguments.getString(ARG_BUTTON_POSITIVE), fragment);
166
114
  }
@@ -18,5 +18,5 @@ public class ReactNativeVersion {
18
18
  "major", 0,
19
19
  "minor", 76,
20
20
  "patch", 0,
21
- "prerelease", "rc.4");
21
+ "prerelease", "rc.6");
22
22
  }
@@ -15,13 +15,13 @@ import android.preference.PreferenceManager
15
15
  import com.facebook.common.logging.FLog
16
16
  import com.facebook.react.modules.systeminfo.AndroidInfoHelpers
17
17
 
18
- public class PackagerConnectionSettings(private val appContext: Context) {
18
+ public open class PackagerConnectionSettings(private val appContext: Context) {
19
19
  private val preferences: SharedPreferences =
20
20
  PreferenceManager.getDefaultSharedPreferences(appContext)
21
21
  public val packageName: String = appContext.packageName
22
22
  private val _additionalOptionsForPackager: MutableMap<String, String> = mutableMapOf()
23
23
 
24
- public var debugServerHost: String
24
+ public open var debugServerHost: String
25
25
  get() {
26
26
  // Check host setting first. If empty try to detect emulator type and use default
27
27
  // hostname for those
@@ -22,7 +22,7 @@ import com.facebook.yoga.YogaConstants
22
22
  public abstract class BaseViewManagerDelegate<T : View, U : BaseViewManagerInterface<T>>(
23
23
  @Suppress("NoHungarianNotation") @JvmField protected val mViewManager: U
24
24
  ) : ViewManagerDelegate<T> {
25
- override public fun setProperty(view: T, propName: String, value: Any?) {
25
+ override public fun setProperty(view: T, propName: String?, value: Any?) {
26
26
  when (propName) {
27
27
  ViewProps.ACCESSIBILITY_ACTIONS ->
28
28
  mViewManager.setAccessibilityActions(view, value as ReadableArray?)
@@ -104,6 +104,6 @@ public abstract class BaseViewManagerDelegate<T : View, U : BaseViewManagerInter
104
104
  }
105
105
  }
106
106
 
107
- override public fun receiveCommand(view: T, commandName: String, args: ReadableArray?): Unit =
107
+ override public fun receiveCommand(view: T, commandName: String?, args: ReadableArray?): Unit =
108
108
  Unit
109
109
  }
@@ -18,7 +18,24 @@ import com.facebook.react.bridge.ReadableArray
18
18
  * @param <T> the type of the view supported by this delegate </T>
19
19
  */
20
20
  public interface ViewManagerDelegate<T : View?> {
21
- public fun setProperty(view: T, propName: String, value: Any?)
22
21
 
23
- public fun receiveCommand(view: T, commandName: String, args: ReadableArray?)
22
+ /**
23
+ * Sets a property on a view managed by this view manager.
24
+ *
25
+ * @param view the view to set the property on
26
+ * @param propName the name of the property to set (NOTE: should be `String` but is kept as
27
+ * `String?` to avoid breaking changes)
28
+ * @param value the value to set the property to
29
+ */
30
+ public fun setProperty(view: T, propName: String?, value: Any?)
31
+
32
+ /**
33
+ * Executes a command from JS to the view
34
+ *
35
+ * @param view the view to execute the command on
36
+ * @param commandName the name of the command to execute (NOTE: should be `String` but is kept as
37
+ * `String?` to avoid breaking changes)
38
+ * @param args the arguments to pass to the command
39
+ */
40
+ public fun receiveCommand(view: T, commandName: String?, args: ReadableArray?)
24
41
  }
@@ -26,6 +26,7 @@ import android.view.WindowManager
26
26
  import android.view.accessibility.AccessibilityEvent
27
27
  import android.widget.FrameLayout
28
28
  import androidx.annotation.UiThread
29
+ import com.facebook.common.logging.FLog
29
30
  import com.facebook.react.R
30
31
  import com.facebook.react.bridge.GuardedRunnable
31
32
  import com.facebook.react.bridge.LifecycleEventListener
@@ -33,6 +34,7 @@ import com.facebook.react.bridge.ReactContext
33
34
  import com.facebook.react.bridge.UiThreadUtil
34
35
  import com.facebook.react.bridge.WritableMap
35
36
  import com.facebook.react.bridge.WritableNativeMap
37
+ import com.facebook.react.common.ReactConstants
36
38
  import com.facebook.react.common.annotations.VisibleForTesting
37
39
  import com.facebook.react.config.ReactFeatureFlags
38
40
  import com.facebook.react.uimanager.JSPointerDispatcher
@@ -306,29 +308,37 @@ public class ReactModalHostView(context: ThemedReactContext) :
306
308
  val dialogWindow =
307
309
  checkNotNull(dialog.window) { "dialog must have window when we call updateProperties" }
308
310
  val currentActivity = getCurrentActivity()
309
- if (currentActivity == null || currentActivity.isFinishing) {
311
+ if (currentActivity == null || currentActivity.isFinishing || currentActivity.isDestroyed) {
310
312
  // If the activity has disappeared, then we shouldn't update the window associated to the
311
313
  // Dialog.
312
314
  return
313
315
  }
314
- val activityWindow = currentActivity.window
315
- if (activityWindow != null) {
316
- val activityWindowFlags = activityWindow.attributes.flags
317
- if ((activityWindowFlags and WindowManager.LayoutParams.FLAG_FULLSCREEN) != 0) {
318
- dialogWindow.addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN)
319
- } else {
320
- dialogWindow.clearFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN)
316
+ try {
317
+ val activityWindow = currentActivity.window
318
+ if (activityWindow != null) {
319
+ val activityWindowFlags = activityWindow.attributes.flags
320
+ if ((activityWindowFlags and WindowManager.LayoutParams.FLAG_FULLSCREEN) != 0) {
321
+ dialogWindow.addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN)
322
+ } else {
323
+ dialogWindow.clearFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN)
324
+ }
321
325
  }
322
- }
323
326
 
324
- dialogWindow.setStatusBarTranslucency(statusBarTranslucent)
327
+ dialogWindow.setStatusBarTranslucency(statusBarTranslucent)
325
328
 
326
- if (transparent) {
327
- dialogWindow.clearFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND)
328
- } else {
329
- dialogWindow.setDimAmount(0.5f)
330
- dialogWindow.setFlags(
331
- WindowManager.LayoutParams.FLAG_DIM_BEHIND, WindowManager.LayoutParams.FLAG_DIM_BEHIND)
329
+ if (transparent) {
330
+ dialogWindow.clearFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND)
331
+ } else {
332
+ dialogWindow.setDimAmount(0.5f)
333
+ dialogWindow.setFlags(
334
+ WindowManager.LayoutParams.FLAG_DIM_BEHIND, WindowManager.LayoutParams.FLAG_DIM_BEHIND)
335
+ }
336
+ } catch (e: IllegalArgumentException) {
337
+ // This is to prevent a crash from the following error, without a clear repro steps:
338
+ // java.lang.IllegalArgumentException: View=DecorView@c94931b[XxxActivity] not attached to
339
+ // window manager
340
+ FLog.e(
341
+ ReactConstants.TAG, "ReactModalHostView: error while setting window flags: ", e.message)
332
342
  }
333
343
  }
334
344
 
@@ -18,7 +18,7 @@ constexpr struct {
18
18
  int32_t Major = 0;
19
19
  int32_t Minor = 76;
20
20
  int32_t Patch = 0;
21
- std::string_view Prerelease = "rc.4";
21
+ std::string_view Prerelease = "rc.6";
22
22
  } ReactNativeVersion;
23
23
 
24
24
  } // namespace facebook::react
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native",
3
- "version": "0.76.0-rc.4",
3
+ "version": "0.76.0-rc.6",
4
4
  "description": "A framework for building native apps using React",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -109,13 +109,13 @@
109
109
  },
110
110
  "dependencies": {
111
111
  "@jest/create-cache-key-function": "^29.6.3",
112
- "@react-native/assets-registry": "0.76.0-rc.4",
113
- "@react-native/codegen": "0.76.0-rc.4",
114
- "@react-native/community-cli-plugin": "0.76.0-rc.4",
115
- "@react-native/gradle-plugin": "0.76.0-rc.4",
116
- "@react-native/js-polyfills": "0.76.0-rc.4",
117
- "@react-native/normalize-colors": "0.76.0-rc.4",
118
- "@react-native/virtualized-lists": "0.76.0-rc.4",
112
+ "@react-native/assets-registry": "0.76.0-rc.6",
113
+ "@react-native/codegen": "0.76.0-rc.6",
114
+ "@react-native/community-cli-plugin": "0.76.0-rc.6",
115
+ "@react-native/gradle-plugin": "0.76.0-rc.6",
116
+ "@react-native/js-polyfills": "0.76.0-rc.6",
117
+ "@react-native/normalize-colors": "0.76.0-rc.6",
118
+ "@react-native/virtualized-lists": "0.76.0-rc.6",
119
119
  "abort-controller": "^3.0.0",
120
120
  "anser": "^1.4.9",
121
121
  "ansi-regex": "^5.0.0",
@@ -131,8 +131,8 @@
131
131
  "jest-environment-node": "^29.6.3",
132
132
  "jsc-android": "^250231.0.0",
133
133
  "memoize-one": "^5.0.0",
134
- "metro-runtime": "^0.81.0-alpha.2",
135
- "metro-source-map": "^0.81.0-alpha.2",
134
+ "metro-runtime": "^0.81.0",
135
+ "metro-source-map": "^0.81.0",
136
136
  "mkdirp": "^0.5.1",
137
137
  "nullthrows": "^1.1.1",
138
138
  "pretty-format": "^29.7.0",
@@ -12,19 +12,33 @@ class NewArchitectureHelper
12
12
  @@NewArchWarningEmitted = false # Used not to spam warnings to the user.
13
13
 
14
14
  def self.set_clang_cxx_language_standard_if_needed(installer)
15
+ cxxBuildsettingsName = "CLANG_CXX_LANGUAGE_STANDARD"
15
16
  projects = installer.aggregate_targets
16
17
  .map{ |t| t.user_project }
17
18
  .uniq{ |p| p.path }
18
19
 
19
20
  projects.each do |project|
20
- Pod::UI.puts("Setting CLANG_CXX_LANGUAGE_STANDARD to #{ Helpers::Constants::cxx_language_standard } on #{ project.path }")
21
+ Pod::UI.puts("Setting #{cxxBuildsettingsName} to #{ Helpers::Constants::cxx_language_standard } on #{ project.path }")
21
22
 
22
23
  project.build_configurations.each do |config|
23
- config.build_settings["CLANG_CXX_LANGUAGE_STANDARD"] = Helpers::Constants::cxx_language_standard
24
+ config.build_settings[cxxBuildsettingsName] = Helpers::Constants::cxx_language_standard
24
25
  end
25
26
 
26
27
  project.save()
27
28
  end
29
+
30
+ installer.target_installation_results.pod_target_installation_results.each do |pod_name, target_installation_result|
31
+ target_installation_result.native_target.build_configurations.each do |config|
32
+ config.build_settings[cxxBuildsettingsName] = Helpers::Constants::cxx_language_standard
33
+ end
34
+ end
35
+
36
+ # Override targets that would set spec.xcconfig to define c++ version
37
+ installer.aggregate_targets.each do |aggregate_target|
38
+ aggregate_target.xcconfigs.each do |config_name, config_file|
39
+ config_file.attributes[cxxBuildsettingsName] = Helpers::Constants::cxx_language_standard
40
+ end
41
+ end
28
42
  end
29
43
 
30
44
  def self.computeFlags(is_new_arch_enabled)
Binary file
Binary file
Binary file
Binary file
@@ -1,22 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
3
- android:layout_width="match_parent"
4
- android:layout_height="wrap_content"
5
- android:gravity="center_vertical|start"
6
- android:orientation="horizontal"
7
- android:paddingStart="?android:attr/dialogPreferredPadding"
8
- android:paddingTop="18dp"
9
- android:paddingEnd="?android:attr/dialogPreferredPadding">
10
-
11
- <TextView
12
- android:id="@+id/alert_title"
13
- style="?android:attr/windowTitleStyle"
14
- android:layout_width="match_parent"
15
- android:layout_height="wrap_content"
16
- android:ellipsize="end"
17
- android:singleLine="true"
18
- android:textAlignment="viewStart"
19
- android:textAppearance="?android:attr/textAppearanceMedium"
20
- android:textSize="18sp" />
21
-
22
- </LinearLayout>