react-native 0.78.0-rc.3 → 0.78.0-rc.4

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.
@@ -17,7 +17,7 @@ const version: $ReadOnly<{
17
17
  major: 0,
18
18
  minor: 78,
19
19
  patch: 0,
20
- prerelease: 'rc.3',
20
+ prerelease: 'rc.4',
21
21
  };
22
22
 
23
23
  module.exports = {version};
@@ -24,7 +24,7 @@ NSDictionary* RCTGetReactNativeVersion(void)
24
24
  RCTVersionMajor: @(0),
25
25
  RCTVersionMinor: @(78),
26
26
  RCTVersionPatch: @(0),
27
- RCTVersionPrerelease: @"rc.3",
27
+ RCTVersionPrerelease: @"rc.4",
28
28
  };
29
29
  });
30
30
  return __rnVersion;
@@ -54,13 +54,11 @@
54
54
  ]];
55
55
 
56
56
  UIButton *resumeButton = [UIButton buttonWithType:UIButtonTypeCustom];
57
- [resumeButton setImage:[UIImage systemImageNamed:@"forward.frame.fill"] forState:UIControlStateNormal];
57
+ UIImage *image = [UIImage systemImageNamed:@"forward.frame.fill"];
58
+ [resumeButton setImage:image forState:UIControlStateNormal];
59
+ [resumeButton setImage:image forState:UIControlStateDisabled];
58
60
  resumeButton.tintColor = [UIColor colorWithRed:0.37 green:0.37 blue:0.37 alpha:1];
59
61
 
60
- resumeButton.configurationUpdateHandler = ^(UIButton *button) {
61
- button.imageView.tintAdjustmentMode = UIViewTintAdjustmentModeNormal;
62
- };
63
-
64
62
  resumeButton.enabled = NO;
65
63
  [NSLayoutConstraint activateConstraints:@[
66
64
  [resumeButton.widthAnchor constraintEqualToConstant:48],
@@ -3482,6 +3482,14 @@ public class com/facebook/react/modules/network/ResponseUtil {
3482
3482
  public static fun onResponseReceived (Lcom/facebook/react/bridge/ReactApplicationContext;IILcom/facebook/react/bridge/WritableMap;Ljava/lang/String;)V
3483
3483
  }
3484
3484
 
3485
+ public final class com/facebook/react/modules/network/ReactCookieJarContainer : com/facebook/react/modules/network/CookieJarContainer {
3486
+ public fun <init> ()V
3487
+ public fun loadForRequest (Lokhttp3/HttpUrl;)Ljava/util/List;
3488
+ public fun removeCookieJar ()V
3489
+ public fun saveFromResponse (Lokhttp3/HttpUrl;Ljava/util/List;)V
3490
+ public fun setCookieJar (Lokhttp3/CookieJar;)V
3491
+ }
3492
+
3485
3493
  public class com/facebook/react/modules/network/TLSSocketFactory : javax/net/ssl/SSLSocketFactory {
3486
3494
  public fun <init> ()V
3487
3495
  public fun createSocket (Ljava/lang/String;I)Ljava/net/Socket;
@@ -7825,4 +7833,3 @@ public final class com/facebook/react/views/view/WindowUtilKt {
7825
7833
  public static final fun setStatusBarVisibility (Landroid/view/Window;Z)V
7826
7834
  public static final fun setSystemBarsTranslucency (Landroid/view/Window;Z)V
7827
7835
  }
7828
-
@@ -1,4 +1,4 @@
1
- VERSION_NAME=0.78.0-rc.3
1
+ VERSION_NAME=0.78.0-rc.4
2
2
  react.internal.publishingGroup=com.facebook.react
3
3
 
4
4
  android.useAndroidX=true
@@ -331,14 +331,11 @@ public class MountingManager {
331
331
  @AnyThread
332
332
  @ThreadConfined(ANY)
333
333
  public @Nullable EventEmitterWrapper getEventEmitter(int surfaceId, int reactTag) {
334
- SurfaceMountingManager surfaceMountingManager =
335
- (surfaceId == ViewUtil.NO_SURFACE_ID
336
- ? getSurfaceManagerForView(reactTag)
337
- : getSurfaceManager(surfaceId));
338
- if (surfaceMountingManager == null) {
334
+ SurfaceMountingManager smm = getSurfaceMountingManager(surfaceId, reactTag);
335
+ if (smm == null) {
339
336
  return null;
340
337
  }
341
- return surfaceMountingManager.getEventEmitter(reactTag);
338
+ return smm.getEventEmitter(reactTag);
342
339
  }
343
340
 
344
341
  /**
@@ -458,11 +455,21 @@ public class MountingManager {
458
455
  boolean canCoalesceEvent,
459
456
  @Nullable WritableMap params,
460
457
  @EventCategoryDef int eventCategory) {
461
- @Nullable SurfaceMountingManager smm = getSurfaceManager(surfaceId);
458
+ SurfaceMountingManager smm = getSurfaceMountingManager(surfaceId, reactTag);
462
459
  if (smm == null) {
463
- // Cannot queue event without valid surface mountng manager. Do nothing here.
460
+ FLog.d(
461
+ TAG,
462
+ "Cannot queue event without valid surface mounting manager for tag: %d, surfaceId: %d",
463
+ reactTag,
464
+ surfaceId);
464
465
  return;
465
466
  }
466
467
  smm.enqueuePendingEvent(reactTag, eventName, canCoalesceEvent, params, eventCategory);
467
468
  }
469
+
470
+ private @Nullable SurfaceMountingManager getSurfaceMountingManager(int surfaceId, int reactTag) {
471
+ return (surfaceId == ViewUtil.NO_SURFACE_ID
472
+ ? getSurfaceManagerForView(reactTag)
473
+ : getSurfaceManager(surfaceId));
474
+ }
468
475
  }
@@ -16,7 +16,7 @@ import okhttp3.Headers
16
16
  import okhttp3.HttpUrl
17
17
 
18
18
  /** Basic okhttp3 CookieJar container */
19
- internal class ReactCookieJarContainer : CookieJarContainer {
19
+ public class ReactCookieJarContainer : CookieJarContainer {
20
20
 
21
21
  private var cookieJar: CookieJar? = null
22
22
 
@@ -18,5 +18,5 @@ public class ReactNativeVersion {
18
18
  "major", 0,
19
19
  "minor", 78,
20
20
  "patch", 0,
21
- "prerelease", "rc.3");
21
+ "prerelease", "rc.4");
22
22
  }
@@ -17,5 +17,5 @@ public interface ReactOverflowView {
17
17
  * Gets the overflow state of a view. If set, this should be one of [ViewProps#HIDDEN],
18
18
  * [ViewProps#VISIBLE] or [ViewProps#SCROLL].
19
19
  */
20
- public fun getOverflow(): String?
20
+ public val overflow: String?
21
21
  }
@@ -13,6 +13,6 @@ package com.facebook.react.uimanager
13
13
  */
14
14
  public interface ReactPointerEventsView {
15
15
 
16
- /** Return the PointerEvents of the View. */
17
- public fun getPointerEvents(): PointerEvents
16
+ /** The PointerEvents of the View. */
17
+ public val pointerEvents: PointerEvents
18
18
  }
@@ -18,7 +18,7 @@ constexpr struct {
18
18
  int32_t Major = 0;
19
19
  int32_t Minor = 78;
20
20
  int32_t Patch = 0;
21
- std::string_view Prerelease = "rc.3";
21
+ std::string_view Prerelease = "rc.4";
22
22
  } ReactNativeVersion;
23
23
 
24
24
  } // namespace facebook::react
@@ -123,6 +123,15 @@ std::vector<ExportedMethod> parseExportedMethods(std::string moduleName, Class m
123
123
  NSArray<RCTMethodArgument *> *arguments;
124
124
  SEL objCMethodSelector = NSSelectorFromString(RCTParseMethodSignature(methodInfo->objcName, &arguments));
125
125
  NSMethodSignature *objCMethodSignature = [moduleClass instanceMethodSignatureForSelector:objCMethodSelector];
126
+ if (objCMethodSignature == nullptr) {
127
+ RCTLogWarn(
128
+ @"The objective-c `%s` method signature for the JS method `%@` can not be found in the ObjecitveC definition of the %s module.\nThe `%@` JS method will not be available.",
129
+ methodInfo->objcName,
130
+ jsMethodName,
131
+ moduleName.c_str(),
132
+ jsMethodName);
133
+ continue;
134
+ }
126
135
  std::string objCMethodReturnType = [objCMethodSignature methodReturnType];
127
136
 
128
137
  if (objCMethodSignature.numberOfArguments - 2 != [arguments count]) {
@@ -337,7 +346,7 @@ void ObjCInteropTurboModule::setInvocationArg(
337
346
  SEL selector = selectorForType(argumentType);
338
347
 
339
348
  if ([RCTConvert respondsToSelector:selector]) {
340
- id objCArg = TurboModuleConvertUtils::convertJSIValueToObjCObject(runtime, jsiArg, jsInvoker_);
349
+ id objCArg = TurboModuleConvertUtils::convertJSIValueToObjCObject(runtime, jsiArg, jsInvoker_, YES);
341
350
 
342
351
  if (objCArgType == @encode(char)) {
343
352
  char arg = RCTConvertTo<char>(selector, objCArg);
@@ -491,7 +500,7 @@ void ObjCInteropTurboModule::setInvocationArg(
491
500
  }
492
501
 
493
502
  RCTResponseSenderBlock arg =
494
- (RCTResponseSenderBlock)TurboModuleConvertUtils::convertJSIValueToObjCObject(runtime, jsiArg, jsInvoker_);
503
+ (RCTResponseSenderBlock)TurboModuleConvertUtils::convertJSIValueToObjCObject(runtime, jsiArg, jsInvoker_, YES);
495
504
  if (arg) {
496
505
  [retainedObjectsForInvocation addObject:arg];
497
506
  }
@@ -506,7 +515,7 @@ void ObjCInteropTurboModule::setInvocationArg(
506
515
  }
507
516
 
508
517
  RCTResponseSenderBlock senderBlock =
509
- (RCTResponseSenderBlock)TurboModuleConvertUtils::convertJSIValueToObjCObject(runtime, jsiArg, jsInvoker_);
518
+ (RCTResponseSenderBlock)TurboModuleConvertUtils::convertJSIValueToObjCObject(runtime, jsiArg, jsInvoker_, YES);
510
519
  RCTResponseErrorBlock arg = ^(NSError *error) {
511
520
  senderBlock(@[ RCTJSErrorFromNSError(error) ]);
512
521
  };
@@ -536,7 +545,7 @@ void ObjCInteropTurboModule::setInvocationArg(
536
545
  runtime, errorPrefix + "JavaScript argument must be a plain object. Got " + getType(runtime, jsiArg));
537
546
  }
538
547
 
539
- id arg = TurboModuleConvertUtils::convertJSIValueToObjCObject(runtime, jsiArg, jsInvoker_);
548
+ id arg = TurboModuleConvertUtils::convertJSIValueToObjCObject(runtime, jsiArg, jsInvoker_, YES);
540
549
 
541
550
  RCTManagedPointer *(*convert)(id, SEL, id) = (__typeof__(convert))objc_msgSend;
542
551
  RCTManagedPointer *box = convert([RCTCxxConvert class], selector, arg);
@@ -32,6 +32,7 @@ using EventEmitterCallback = std::function<void(const std::string &, id)>;
32
32
  namespace TurboModuleConvertUtils {
33
33
  jsi::Value convertObjCObjectToJSIValue(jsi::Runtime &runtime, id value);
34
34
  id convertJSIValueToObjCObject(jsi::Runtime &runtime, const jsi::Value &value, std::shared_ptr<CallInvoker> jsInvoker);
35
+ id convertJSIValueToObjCObject(jsi::Runtime &runtime, const jsi::Value &value, std::shared_ptr<CallInvoker> jsInvoker, BOOL useNSNull);
35
36
  } // namespace TurboModuleConvertUtils
36
37
 
37
38
  template <>
@@ -112,20 +112,20 @@ static NSString *convertJSIStringToNSString(jsi::Runtime &runtime, const jsi::St
112
112
  }
113
113
 
114
114
  static NSArray *
115
- convertJSIArrayToNSArray(jsi::Runtime &runtime, const jsi::Array &value, std::shared_ptr<CallInvoker> jsInvoker)
115
+ convertJSIArrayToNSArray(jsi::Runtime &runtime, const jsi::Array &value, std::shared_ptr<CallInvoker> jsInvoker, BOOL useNSNull)
116
116
  {
117
117
  size_t size = value.size(runtime);
118
118
  NSMutableArray *result = [NSMutableArray new];
119
119
  for (size_t i = 0; i < size; i++) {
120
120
  // Insert kCFNull when it's `undefined` value to preserve the indices.
121
- id convertedObject = convertJSIValueToObjCObject(runtime, value.getValueAtIndex(runtime, i), jsInvoker);
121
+ id convertedObject = convertJSIValueToObjCObject(runtime, value.getValueAtIndex(runtime, i), jsInvoker, useNSNull);
122
122
  [result addObject:convertedObject ? convertedObject : (id)kCFNull];
123
123
  }
124
124
  return [result copy];
125
125
  }
126
126
 
127
127
  static NSDictionary *
128
- convertJSIObjectToNSDictionary(jsi::Runtime &runtime, const jsi::Object &value, std::shared_ptr<CallInvoker> jsInvoker)
128
+ convertJSIObjectToNSDictionary(jsi::Runtime &runtime, const jsi::Object &value, std::shared_ptr<CallInvoker> jsInvoker, BOOL useNSNull)
129
129
  {
130
130
  jsi::Array propertyNames = value.getPropertyNames(runtime);
131
131
  size_t size = propertyNames.size(runtime);
@@ -133,7 +133,7 @@ convertJSIObjectToNSDictionary(jsi::Runtime &runtime, const jsi::Object &value,
133
133
  for (size_t i = 0; i < size; i++) {
134
134
  jsi::String name = propertyNames.getValueAtIndex(runtime, i).getString(runtime);
135
135
  NSString *k = convertJSIStringToNSString(runtime, name);
136
- id v = convertJSIValueToObjCObject(runtime, value.getProperty(runtime, name), jsInvoker);
136
+ id v = convertJSIValueToObjCObject(runtime, value.getProperty(runtime, name), jsInvoker, useNSNull);
137
137
  if (v) {
138
138
  result[k] = v;
139
139
  }
@@ -159,11 +159,14 @@ convertJSIFunctionToCallback(jsi::Runtime &rt, jsi::Function &&function, std::sh
159
159
  };
160
160
  }
161
161
 
162
- id convertJSIValueToObjCObject(jsi::Runtime &runtime, const jsi::Value &value, std::shared_ptr<CallInvoker> jsInvoker)
162
+ id convertJSIValueToObjCObject(jsi::Runtime &runtime, const jsi::Value &value, std::shared_ptr<CallInvoker> jsInvoker, BOOL useNSNull)
163
163
  {
164
- if (value.isUndefined() || value.isNull()) {
164
+ if (value.isUndefined() || (value.isNull() && !useNSNull)) {
165
165
  return nil;
166
166
  }
167
+ if (value.isNull() && useNSNull) {
168
+ return [NSNull null];
169
+ }
167
170
  if (value.isBool()) {
168
171
  return @(value.getBool());
169
172
  }
@@ -176,17 +179,22 @@ id convertJSIValueToObjCObject(jsi::Runtime &runtime, const jsi::Value &value, s
176
179
  if (value.isObject()) {
177
180
  jsi::Object o = value.getObject(runtime);
178
181
  if (o.isArray(runtime)) {
179
- return convertJSIArrayToNSArray(runtime, o.getArray(runtime), jsInvoker);
182
+ return convertJSIArrayToNSArray(runtime, o.getArray(runtime), jsInvoker, useNSNull);
180
183
  }
181
184
  if (o.isFunction(runtime)) {
182
185
  return convertJSIFunctionToCallback(runtime, o.getFunction(runtime), jsInvoker);
183
186
  }
184
- return convertJSIObjectToNSDictionary(runtime, o, jsInvoker);
187
+ return convertJSIObjectToNSDictionary(runtime, o, jsInvoker, useNSNull);
185
188
  }
186
189
 
187
190
  throw std::runtime_error("Unsupported jsi::Value kind");
188
191
  }
189
192
 
193
+ id convertJSIValueToObjCObject(jsi::Runtime &runtime, const jsi::Value &value, std::shared_ptr<CallInvoker> jsInvoker)
194
+ {
195
+ return convertJSIValueToObjCObject(runtime, value, jsInvoker, NO);
196
+ }
197
+
190
198
  static jsi::Value createJSRuntimeError(jsi::Runtime &runtime, const std::string &message)
191
199
  {
192
200
  return runtime.global().getPropertyAsFunction(runtime, "Error").call(runtime, message);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native",
3
- "version": "0.78.0-rc.3",
3
+ "version": "0.78.0-rc.4",
4
4
  "description": "A framework for building native apps using React",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -108,13 +108,13 @@
108
108
  },
109
109
  "dependencies": {
110
110
  "@jest/create-cache-key-function": "^29.6.3",
111
- "@react-native/assets-registry": "0.78.0-rc.3",
112
- "@react-native/codegen": "0.78.0-rc.3",
113
- "@react-native/community-cli-plugin": "0.78.0-rc.3",
114
- "@react-native/gradle-plugin": "0.78.0-rc.3",
115
- "@react-native/js-polyfills": "0.78.0-rc.3",
116
- "@react-native/normalize-colors": "0.78.0-rc.3",
117
- "@react-native/virtualized-lists": "0.78.0-rc.3",
111
+ "@react-native/assets-registry": "0.78.0-rc.4",
112
+ "@react-native/codegen": "0.78.0-rc.4",
113
+ "@react-native/community-cli-plugin": "0.78.0-rc.4",
114
+ "@react-native/gradle-plugin": "0.78.0-rc.4",
115
+ "@react-native/js-polyfills": "0.78.0-rc.4",
116
+ "@react-native/normalize-colors": "0.78.0-rc.4",
117
+ "@react-native/virtualized-lists": "0.78.0-rc.4",
118
118
  "abort-controller": "^3.0.0",
119
119
  "anser": "^1.4.9",
120
120
  "ansi-regex": "^5.0.0",
Binary file
Binary file
Binary file
Binary file