react-native 0.0.0-20220102-2009-e22b760e5 → 0.0.0-20220106-2009-252b2a63c

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 (88) hide show
  1. package/Libraries/Core/ReactNativeVersion.js +1 -1
  2. package/Libraries/ReactNative/getNativeComponentAttributes.js +1 -7
  3. package/React/Base/RCTVersion.m +1 -1
  4. package/ReactAndroid/src/main/java/com/facebook/react/devsupport/BridgeDevSupportManager.java +1 -5
  5. package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +1 -1
  6. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManager.java +11 -3
  7. package/ReactAndroid/src/main/java/com/facebook/react/views/drawer/ReactDrawerLayoutManager.java +13 -6
  8. package/ReactAndroid/src/main/java/com/facebook/react/views/image/ReactImageManager.java +18 -11
  9. package/ReactAndroid/src/main/java/com/facebook/react/views/modal/ReactModalHostManager.java +11 -4
  10. package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollViewManager.java +7 -1
  11. package/ReactAndroid/src/main/java/com/facebook/react/views/slider/ReactSliderManager.java +10 -3
  12. package/ReactAndroid/src/main/java/com/facebook/react/views/swiperefresh/SwipeRefreshLayoutManager.java +10 -3
  13. package/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTextViewManager.java +10 -3
  14. package/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputManager.java +51 -37
  15. package/ReactAndroid/src/main/jni/react/jni/WritableNativeArray.cpp +7 -0
  16. package/ReactAndroid/src/main/jni/react/jni/WritableNativeArray.h +2 -0
  17. package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
  18. package/ReactCommon/react/renderer/.clang-tidy +12 -0
  19. package/ReactCommon/react/renderer/animations/LayoutAnimationKeyFrameManager.cpp +6 -5
  20. package/ReactCommon/react/renderer/animations/tests/LayoutAnimationTest.cpp +2 -1
  21. package/ReactCommon/react/renderer/attributedstring/AttributedStringBox.cpp +1 -1
  22. package/ReactCommon/react/renderer/attributedstring/AttributedStringBox.h +1 -1
  23. package/ReactCommon/react/renderer/componentregistry/ComponentDescriptorProviderRegistry.cpp +2 -1
  24. package/ReactCommon/react/renderer/components/progressbar/android/react/renderer/components/progressbar/AndroidProgressBarMeasurementsManager.cpp +1 -1
  25. package/ReactCommon/react/renderer/components/progressbar/android/react/renderer/components/progressbar/AndroidProgressBarMeasurementsManager.h +1 -1
  26. package/ReactCommon/react/renderer/components/text/BaseTextProps.cpp +4 -4
  27. package/ReactCommon/react/renderer/components/textinput/androidtextinput/react/renderer/components/androidtextinput/AndroidTextInputShadowNode.cpp +3 -1
  28. package/ReactCommon/react/renderer/components/textinput/androidtextinput/react/renderer/components/androidtextinput/AndroidTextInputState.cpp +0 -1
  29. package/ReactCommon/react/renderer/components/textinput/iostextinput/TextInputState.cpp +1 -1
  30. package/ReactCommon/react/renderer/components/textinput/iostextinput/TextInputState.h +3 -1
  31. package/ReactCommon/react/renderer/core/EventDispatcher.cpp +1 -1
  32. package/ReactCommon/react/renderer/core/EventDispatcher.h +1 -1
  33. package/ReactCommon/react/renderer/core/LayoutableShadowNode.cpp +1 -1
  34. package/ReactCommon/react/renderer/core/LayoutableShadowNode.h +1 -1
  35. package/ReactCommon/react/renderer/core/ShadowNode.cpp +4 -4
  36. package/ReactCommon/react/renderer/core/ShadowNode.h +2 -2
  37. package/ReactCommon/react/renderer/debug/DebugStringConvertible.cpp +2 -2
  38. package/ReactCommon/react/renderer/graphics/platform/cxx/react/renderer/graphics/Color.cpp +1 -1
  39. package/ReactCommon/react/renderer/graphics/platform/cxx/react/renderer/graphics/Color.h +1 -1
  40. package/ReactCommon/react/renderer/mounting/MountingCoordinator.cpp +1 -1
  41. package/ReactCommon/react/renderer/mounting/ShadowTree.cpp +5 -5
  42. package/ReactCommon/react/renderer/mounting/ShadowTreeRegistry.cpp +2 -2
  43. package/ReactCommon/react/renderer/mounting/ShadowTreeRegistry.h +2 -2
  44. package/ReactCommon/react/renderer/mounting/ShadowViewMutation.cpp +8 -8
  45. package/ReactCommon/react/renderer/mounting/TelemetryController.cpp +5 -4
  46. package/ReactCommon/react/renderer/mounting/TelemetryController.h +6 -3
  47. package/ReactCommon/react/renderer/mounting/tests/MountingTest.cpp +1 -1
  48. package/ReactCommon/react/renderer/mounting/tests/StackingContextTest.cpp +2 -2
  49. package/ReactCommon/react/renderer/templateprocessor/UITemplateProcessor.cpp +2 -2
  50. package/ReactCommon/react/renderer/templateprocessor/UITemplateProcessor.h +2 -2
  51. package/ReactCommon/react/renderer/textlayoutmanager/platform/android/react/renderer/textlayoutmanager/TextLayoutManager.cpp +11 -11
  52. package/ReactCommon/react/renderer/textlayoutmanager/platform/android/react/renderer/textlayoutmanager/TextLayoutManager.h +8 -8
  53. package/android/com/facebook/react/react-native/{0.0.0-20220102-2009-e22b760e5/react-native-0.0.0-20220102-2009-e22b760e5.aar → 0.0.0-20220106-2009-252b2a63c/react-native-0.0.0-20220106-2009-252b2a63c.aar} +0 -0
  54. package/android/com/facebook/react/react-native/0.0.0-20220106-2009-252b2a63c/react-native-0.0.0-20220106-2009-252b2a63c.aar.md5 +1 -0
  55. package/android/com/facebook/react/react-native/0.0.0-20220106-2009-252b2a63c/react-native-0.0.0-20220106-2009-252b2a63c.aar.sha1 +1 -0
  56. package/android/com/facebook/react/react-native/0.0.0-20220106-2009-252b2a63c/react-native-0.0.0-20220106-2009-252b2a63c.aar.sha256 +1 -0
  57. package/android/com/facebook/react/react-native/0.0.0-20220106-2009-252b2a63c/react-native-0.0.0-20220106-2009-252b2a63c.aar.sha512 +1 -0
  58. package/android/com/facebook/react/react-native/{0.0.0-20220102-2009-e22b760e5/react-native-0.0.0-20220102-2009-e22b760e5.module → 0.0.0-20220106-2009-252b2a63c/react-native-0.0.0-20220106-2009-252b2a63c.module} +16 -16
  59. package/android/com/facebook/react/react-native/0.0.0-20220106-2009-252b2a63c/react-native-0.0.0-20220106-2009-252b2a63c.module.md5 +1 -0
  60. package/android/com/facebook/react/react-native/0.0.0-20220106-2009-252b2a63c/react-native-0.0.0-20220106-2009-252b2a63c.module.sha1 +1 -0
  61. package/android/com/facebook/react/react-native/0.0.0-20220106-2009-252b2a63c/react-native-0.0.0-20220106-2009-252b2a63c.module.sha256 +1 -0
  62. package/android/com/facebook/react/react-native/0.0.0-20220106-2009-252b2a63c/react-native-0.0.0-20220106-2009-252b2a63c.module.sha512 +1 -0
  63. package/android/com/facebook/react/react-native/{0.0.0-20220102-2009-e22b760e5/react-native-0.0.0-20220102-2009-e22b760e5.pom → 0.0.0-20220106-2009-252b2a63c/react-native-0.0.0-20220106-2009-252b2a63c.pom} +1 -1
  64. package/android/com/facebook/react/react-native/0.0.0-20220106-2009-252b2a63c/react-native-0.0.0-20220106-2009-252b2a63c.pom.md5 +1 -0
  65. package/android/com/facebook/react/react-native/0.0.0-20220106-2009-252b2a63c/react-native-0.0.0-20220106-2009-252b2a63c.pom.sha1 +1 -0
  66. package/android/com/facebook/react/react-native/0.0.0-20220106-2009-252b2a63c/react-native-0.0.0-20220106-2009-252b2a63c.pom.sha256 +1 -0
  67. package/android/com/facebook/react/react-native/0.0.0-20220106-2009-252b2a63c/react-native-0.0.0-20220106-2009-252b2a63c.pom.sha512 +1 -0
  68. package/android/com/facebook/react/react-native/maven-metadata.xml +4 -4
  69. package/android/com/facebook/react/react-native/maven-metadata.xml.md5 +1 -1
  70. package/android/com/facebook/react/react-native/maven-metadata.xml.sha1 +1 -1
  71. package/android/com/facebook/react/react-native/maven-metadata.xml.sha256 +1 -1
  72. package/android/com/facebook/react/react-native/maven-metadata.xml.sha512 +1 -1
  73. package/package.json +1 -1
  74. package/template/android/build.gradle +2 -2
  75. package/template/android/gradle/wrapper/gradle-wrapper.properties +1 -1
  76. package/template/package.json +1 -1
  77. package/android/com/facebook/react/react-native/0.0.0-20220102-2009-e22b760e5/react-native-0.0.0-20220102-2009-e22b760e5.aar.md5 +0 -1
  78. package/android/com/facebook/react/react-native/0.0.0-20220102-2009-e22b760e5/react-native-0.0.0-20220102-2009-e22b760e5.aar.sha1 +0 -1
  79. package/android/com/facebook/react/react-native/0.0.0-20220102-2009-e22b760e5/react-native-0.0.0-20220102-2009-e22b760e5.aar.sha256 +0 -1
  80. package/android/com/facebook/react/react-native/0.0.0-20220102-2009-e22b760e5/react-native-0.0.0-20220102-2009-e22b760e5.aar.sha512 +0 -1
  81. package/android/com/facebook/react/react-native/0.0.0-20220102-2009-e22b760e5/react-native-0.0.0-20220102-2009-e22b760e5.module.md5 +0 -1
  82. package/android/com/facebook/react/react-native/0.0.0-20220102-2009-e22b760e5/react-native-0.0.0-20220102-2009-e22b760e5.module.sha1 +0 -1
  83. package/android/com/facebook/react/react-native/0.0.0-20220102-2009-e22b760e5/react-native-0.0.0-20220102-2009-e22b760e5.module.sha256 +0 -1
  84. package/android/com/facebook/react/react-native/0.0.0-20220102-2009-e22b760e5/react-native-0.0.0-20220102-2009-e22b760e5.module.sha512 +0 -1
  85. package/android/com/facebook/react/react-native/0.0.0-20220102-2009-e22b760e5/react-native-0.0.0-20220102-2009-e22b760e5.pom.md5 +0 -1
  86. package/android/com/facebook/react/react-native/0.0.0-20220102-2009-e22b760e5/react-native-0.0.0-20220102-2009-e22b760e5.pom.sha1 +0 -1
  87. package/android/com/facebook/react/react-native/0.0.0-20220102-2009-e22b760e5/react-native-0.0.0-20220102-2009-e22b760e5.pom.sha256 +0 -1
  88. package/android/com/facebook/react/react-native/0.0.0-20220102-2009-e22b760e5/react-native-0.0.0-20220102-2009-e22b760e5.pom.sha512 +0 -1
@@ -13,5 +13,5 @@ exports.version = {
13
13
  major: 0,
14
14
  minor: 0,
15
15
  patch: 0,
16
- prerelease: '20220102-2009-e22b760e5',
16
+ prerelease: '20220106-2009-252b2a63c',
17
17
  };
@@ -94,17 +94,11 @@ function getNativeComponentAttributes(uiViewClassName: string): any {
94
94
  directEventTypes,
95
95
  });
96
96
 
97
- if (!hasAttachedDefaultEventTypes) {
98
- attachDefaultEventTypes(viewConfig);
99
- hasAttachedDefaultEventTypes = true;
100
- }
97
+ attachDefaultEventTypes(viewConfig);
101
98
 
102
99
  return viewConfig;
103
100
  }
104
101
 
105
- // TODO: Figure out how this makes sense. We're using a global boolean to only
106
- // initialize this on the first eagerly initialized native component.
107
- let hasAttachedDefaultEventTypes = false;
108
102
  function attachDefaultEventTypes(viewConfig: any) {
109
103
  // This is supported on UIManager platforms (ex: Android),
110
104
  // as lazy view managers are not implemented for all platforms.
@@ -24,7 +24,7 @@ NSDictionary* RCTGetReactNativeVersion(void)
24
24
  RCTVersionMajor: @(0),
25
25
  RCTVersionMinor: @(0),
26
26
  RCTVersionPatch: @(0),
27
- RCTVersionPrerelease: @"20220102-2009-e22b760e5",
27
+ RCTVersionPrerelease: @"20220106-2009-252b2a63c",
28
28
  };
29
29
  });
30
30
  return __rnVersion;
@@ -99,11 +99,7 @@ public final class BridgeDevSupportManager extends DevSupportManagerBase {
99
99
  }
100
100
 
101
101
  addCustomDevOption(
102
- mIsSamplingProfilerEnabled
103
- ? applicationContext.getString(
104
- com.facebook.react.R.string.catalyst_sample_profiler_disable)
105
- : applicationContext.getString(
106
- com.facebook.react.R.string.catalyst_sample_profiler_enable),
102
+ mIsSamplingProfilerEnabled ? "Disable Sampling Profiler" : "Enable Sampling Profiler",
107
103
  new DevOptionHandler() {
108
104
  @Override
109
105
  public void onOptionSelected() {
@@ -18,5 +18,5 @@ public class ReactNativeVersion {
18
18
  "major", 0,
19
19
  "minor", 0,
20
20
  "patch", 0,
21
- "prerelease", "20220102-2009-e22b760e5");
21
+ "prerelease", "20220106-2009-252b2a63c");
22
22
  }
@@ -429,9 +429,17 @@ public abstract class BaseViewManager<T extends View, C extends LayoutShadowNode
429
429
 
430
430
  @Override
431
431
  public @Nullable Map<String, Object> getExportedCustomDirectEventTypeConstants() {
432
- return MapBuilder.<String, Object>builder()
433
- .put("topAccessibilityAction", MapBuilder.of("registrationName", "onAccessibilityAction"))
434
- .build();
432
+ @Nullable
433
+ Map<String, Object> baseEventTypeConstants = super.getExportedCustomDirectEventTypeConstants();
434
+ Map<String, Object> eventTypeConstants =
435
+ baseEventTypeConstants == null ? new HashMap<String, Object>() : baseEventTypeConstants;
436
+ eventTypeConstants.putAll(
437
+ MapBuilder.<String, Object>builder()
438
+ .put(
439
+ "topAccessibilityAction",
440
+ MapBuilder.of("registrationName", "onAccessibilityAction"))
441
+ .build());
442
+ return eventTypeConstants;
435
443
  }
436
444
 
437
445
  @Override
@@ -31,6 +31,7 @@ import com.facebook.react.views.drawer.events.DrawerClosedEvent;
31
31
  import com.facebook.react.views.drawer.events.DrawerOpenedEvent;
32
32
  import com.facebook.react.views.drawer.events.DrawerSlideEvent;
33
33
  import com.facebook.react.views.drawer.events.DrawerStateChangedEvent;
34
+ import java.util.HashMap;
34
35
  import java.util.Map;
35
36
 
36
37
  /** View Manager for {@link ReactDrawerLayout} components. */
@@ -210,12 +211,18 @@ public class ReactDrawerLayoutManager extends ViewGroupManager<ReactDrawerLayout
210
211
 
211
212
  @Override
212
213
  public @Nullable Map getExportedCustomDirectEventTypeConstants() {
213
- return MapBuilder.of(
214
- DrawerSlideEvent.EVENT_NAME, MapBuilder.of("registrationName", "onDrawerSlide"),
215
- DrawerOpenedEvent.EVENT_NAME, MapBuilder.of("registrationName", "onDrawerOpen"),
216
- DrawerClosedEvent.EVENT_NAME, MapBuilder.of("registrationName", "onDrawerClose"),
217
- DrawerStateChangedEvent.EVENT_NAME,
218
- MapBuilder.of("registrationName", "onDrawerStateChanged"));
214
+ @Nullable
215
+ Map<String, Object> baseEventTypeConstants = super.getExportedCustomDirectEventTypeConstants();
216
+ Map<String, Object> eventTypeConstants =
217
+ baseEventTypeConstants == null ? new HashMap<String, Object>() : baseEventTypeConstants;
218
+ eventTypeConstants.putAll(
219
+ MapBuilder.of(
220
+ DrawerSlideEvent.EVENT_NAME, MapBuilder.of("registrationName", "onDrawerSlide"),
221
+ DrawerOpenedEvent.EVENT_NAME, MapBuilder.of("registrationName", "onDrawerOpen"),
222
+ DrawerClosedEvent.EVENT_NAME, MapBuilder.of("registrationName", "onDrawerClose"),
223
+ DrawerStateChangedEvent.EVENT_NAME,
224
+ MapBuilder.of("registrationName", "onDrawerStateChanged")));
225
+ return eventTypeConstants;
219
226
  }
220
227
 
221
228
  /**
@@ -24,6 +24,7 @@ import com.facebook.react.uimanager.ViewProps;
24
24
  import com.facebook.react.uimanager.annotations.ReactProp;
25
25
  import com.facebook.react.uimanager.annotations.ReactPropGroup;
26
26
  import com.facebook.yoga.YogaConstants;
27
+ import java.util.HashMap;
27
28
  import java.util.Map;
28
29
 
29
30
  @ReactModule(name = ReactImageManager.REACT_CLASS)
@@ -245,17 +246,23 @@ public class ReactImageManager extends SimpleViewManager<ReactImageView> {
245
246
 
246
247
  @Override
247
248
  public @Nullable Map getExportedCustomDirectEventTypeConstants() {
248
- return MapBuilder.of(
249
- ImageLoadEvent.eventNameForType(ImageLoadEvent.ON_LOAD_START),
250
- MapBuilder.of("registrationName", "onLoadStart"),
251
- ImageLoadEvent.eventNameForType(ImageLoadEvent.ON_PROGRESS),
252
- MapBuilder.of("registrationName", "onProgress"),
253
- ImageLoadEvent.eventNameForType(ImageLoadEvent.ON_LOAD),
254
- MapBuilder.of("registrationName", "onLoad"),
255
- ImageLoadEvent.eventNameForType(ImageLoadEvent.ON_ERROR),
256
- MapBuilder.of("registrationName", "onError"),
257
- ImageLoadEvent.eventNameForType(ImageLoadEvent.ON_LOAD_END),
258
- MapBuilder.of("registrationName", "onLoadEnd"));
249
+ @Nullable
250
+ Map<String, Object> baseEventTypeConstants = super.getExportedCustomDirectEventTypeConstants();
251
+ Map<String, Object> eventTypeConstants =
252
+ baseEventTypeConstants == null ? new HashMap<String, Object>() : baseEventTypeConstants;
253
+ eventTypeConstants.putAll(
254
+ MapBuilder.of(
255
+ ImageLoadEvent.eventNameForType(ImageLoadEvent.ON_LOAD_START),
256
+ MapBuilder.of("registrationName", "onLoadStart"),
257
+ ImageLoadEvent.eventNameForType(ImageLoadEvent.ON_PROGRESS),
258
+ MapBuilder.of("registrationName", "onProgress"),
259
+ ImageLoadEvent.eventNameForType(ImageLoadEvent.ON_LOAD),
260
+ MapBuilder.of("registrationName", "onLoad"),
261
+ ImageLoadEvent.eventNameForType(ImageLoadEvent.ON_ERROR),
262
+ MapBuilder.of("registrationName", "onError"),
263
+ ImageLoadEvent.eventNameForType(ImageLoadEvent.ON_LOAD_END),
264
+ MapBuilder.of("registrationName", "onLoadEnd")));
265
+ return eventTypeConstants;
259
266
  }
260
267
 
261
268
  @Override
@@ -24,6 +24,7 @@ import com.facebook.react.uimanager.annotations.ReactProp;
24
24
  import com.facebook.react.uimanager.events.EventDispatcher;
25
25
  import com.facebook.react.viewmanagers.ModalHostViewManagerDelegate;
26
26
  import com.facebook.react.viewmanagers.ModalHostViewManagerInterface;
27
+ import java.util.HashMap;
27
28
  import java.util.Map;
28
29
 
29
30
  /** View manager for {@link ReactModalHostView} components. */
@@ -137,10 +138,16 @@ public class ReactModalHostManager extends ViewGroupManager<ReactModalHostView>
137
138
 
138
139
  @Override
139
140
  public Map<String, Object> getExportedCustomDirectEventTypeConstants() {
140
- return MapBuilder.<String, Object>builder()
141
- .put(RequestCloseEvent.EVENT_NAME, MapBuilder.of("registrationName", "onRequestClose"))
142
- .put(ShowEvent.EVENT_NAME, MapBuilder.of("registrationName", "onShow"))
143
- .build();
141
+ @Nullable
142
+ Map<String, Object> baseEventTypeConstants = super.getExportedCustomDirectEventTypeConstants();
143
+ Map<String, Object> eventTypeConstants =
144
+ baseEventTypeConstants == null ? new HashMap<String, Object>() : baseEventTypeConstants;
145
+ eventTypeConstants.putAll(
146
+ MapBuilder.<String, Object>builder()
147
+ .put(RequestCloseEvent.EVENT_NAME, MapBuilder.of("registrationName", "onRequestClose"))
148
+ .put(ShowEvent.EVENT_NAME, MapBuilder.of("registrationName", "onShow"))
149
+ .build());
150
+ return eventTypeConstants;
144
151
  }
145
152
 
146
153
  @Override
@@ -30,6 +30,7 @@ import com.facebook.react.uimanager.annotations.ReactProp;
30
30
  import com.facebook.react.uimanager.annotations.ReactPropGroup;
31
31
  import com.facebook.yoga.YogaConstants;
32
32
  import java.util.ArrayList;
33
+ import java.util.HashMap;
33
34
  import java.util.List;
34
35
  import java.util.Map;
35
36
 
@@ -335,7 +336,12 @@ public class ReactScrollViewManager extends ViewGroupManager<ReactScrollView>
335
336
 
336
337
  @Override
337
338
  public @Nullable Map<String, Object> getExportedCustomDirectEventTypeConstants() {
338
- return createExportedCustomDirectEventTypeConstants();
339
+ @Nullable
340
+ Map<String, Object> baseEventTypeConstants = super.getExportedCustomDirectEventTypeConstants();
341
+ Map<String, Object> eventTypeConstants =
342
+ baseEventTypeConstants == null ? new HashMap<String, Object>() : baseEventTypeConstants;
343
+ eventTypeConstants.putAll(createExportedCustomDirectEventTypeConstants());
344
+ return eventTypeConstants;
339
345
  }
340
346
 
341
347
  public static Map<String, Object> createExportedCustomDirectEventTypeConstants() {
@@ -37,6 +37,7 @@ import com.facebook.yoga.YogaMeasureFunction;
37
37
  import com.facebook.yoga.YogaMeasureMode;
38
38
  import com.facebook.yoga.YogaMeasureOutput;
39
39
  import com.facebook.yoga.YogaNode;
40
+ import java.util.HashMap;
40
41
  import java.util.Map;
41
42
 
42
43
  /**
@@ -246,9 +247,15 @@ public class ReactSliderManager extends SimpleViewManager<ReactSlider>
246
247
 
247
248
  @Override
248
249
  public Map getExportedCustomDirectEventTypeConstants() {
249
- return MapBuilder.of(
250
- ReactSlidingCompleteEvent.EVENT_NAME,
251
- MapBuilder.of("registrationName", "onSlidingComplete"));
250
+ @Nullable
251
+ Map<String, Object> baseEventTypeConstants = super.getExportedCustomDirectEventTypeConstants();
252
+ Map<String, Object> eventTypeConstants =
253
+ baseEventTypeConstants == null ? new HashMap<String, Object>() : baseEventTypeConstants;
254
+ eventTypeConstants.putAll(
255
+ MapBuilder.of(
256
+ ReactSlidingCompleteEvent.EVENT_NAME,
257
+ MapBuilder.of("registrationName", "onSlidingComplete")));
258
+ return eventTypeConstants;
252
259
  }
253
260
 
254
261
  @Override
@@ -29,6 +29,7 @@ import com.facebook.react.uimanager.annotations.ReactProp;
29
29
  import com.facebook.react.uimanager.events.EventDispatcher;
30
30
  import com.facebook.react.viewmanagers.AndroidSwipeRefreshLayoutManagerDelegate;
31
31
  import com.facebook.react.viewmanagers.AndroidSwipeRefreshLayoutManagerInterface;
32
+ import java.util.HashMap;
32
33
  import java.util.Map;
33
34
 
34
35
  /**
@@ -175,9 +176,15 @@ public class SwipeRefreshLayoutManager extends ViewGroupManager<ReactSwipeRefres
175
176
 
176
177
  @Override
177
178
  public Map<String, Object> getExportedCustomDirectEventTypeConstants() {
178
- return MapBuilder.<String, Object>builder()
179
- .put("topRefresh", MapBuilder.of("registrationName", "onRefresh"))
180
- .build();
179
+ @Nullable
180
+ Map<String, Object> baseEventTypeConstants = super.getExportedCustomDirectEventTypeConstants();
181
+ Map<String, Object> eventTypeConstants =
182
+ baseEventTypeConstants == null ? new HashMap<String, Object>() : baseEventTypeConstants;
183
+ eventTypeConstants.putAll(
184
+ MapBuilder.<String, Object>builder()
185
+ .put("topRefresh", MapBuilder.of("registrationName", "onRefresh"))
186
+ .build());
187
+ return eventTypeConstants;
181
188
  }
182
189
 
183
190
  @Override
@@ -22,6 +22,7 @@ import com.facebook.react.uimanager.ReactStylesDiffMap;
22
22
  import com.facebook.react.uimanager.StateWrapper;
23
23
  import com.facebook.react.uimanager.ThemedReactContext;
24
24
  import com.facebook.yoga.YogaMeasureMode;
25
+ import java.util.HashMap;
25
26
  import java.util.Map;
26
27
 
27
28
  /**
@@ -152,9 +153,15 @@ public class ReactTextViewManager
152
153
 
153
154
  @Override
154
155
  public @Nullable Map getExportedCustomDirectEventTypeConstants() {
155
- return MapBuilder.of(
156
- "topTextLayout", MapBuilder.of("registrationName", "onTextLayout"),
157
- "topInlineViewLayout", MapBuilder.of("registrationName", "onInlineViewLayout"));
156
+ @Nullable
157
+ Map<String, Object> baseEventTypeConstants = super.getExportedCustomDirectEventTypeConstants();
158
+ Map<String, Object> eventTypeConstants =
159
+ baseEventTypeConstants == null ? new HashMap<String, Object>() : baseEventTypeConstants;
160
+ eventTypeConstants.putAll(
161
+ MapBuilder.of(
162
+ "topTextLayout", MapBuilder.of("registrationName", "onTextLayout"),
163
+ "topInlineViewLayout", MapBuilder.of("registrationName", "onInlineViewLayout")));
164
+ return eventTypeConstants;
158
165
  }
159
166
 
160
167
  @Override
@@ -202,48 +202,62 @@ public class ReactTextInputManager extends BaseViewManager<ReactEditText, Layout
202
202
  @Nullable
203
203
  @Override
204
204
  public Map<String, Object> getExportedCustomBubblingEventTypeConstants() {
205
- return MapBuilder.<String, Object>builder()
206
- .put(
207
- "topSubmitEditing",
208
- MapBuilder.of(
209
- "phasedRegistrationNames",
210
- MapBuilder.of("bubbled", "onSubmitEditing", "captured", "onSubmitEditingCapture")))
211
- .put(
212
- "topEndEditing",
213
- MapBuilder.of(
214
- "phasedRegistrationNames",
215
- MapBuilder.of("bubbled", "onEndEditing", "captured", "onEndEditingCapture")))
216
- .put(
217
- "topTextInput",
218
- MapBuilder.of(
219
- "phasedRegistrationNames",
220
- MapBuilder.of("bubbled", "onTextInput", "captured", "onTextInputCapture")))
221
- .put(
222
- "topFocus",
223
- MapBuilder.of(
224
- "phasedRegistrationNames",
225
- MapBuilder.of("bubbled", "onFocus", "captured", "onFocusCapture")))
226
- .put(
227
- "topBlur",
228
- MapBuilder.of(
229
- "phasedRegistrationNames",
230
- MapBuilder.of("bubbled", "onBlur", "captured", "onBlurCapture")))
231
- .put(
232
- "topKeyPress",
233
- MapBuilder.of(
234
- "phasedRegistrationNames",
235
- MapBuilder.of("bubbled", "onKeyPress", "captured", "onKeyPressCapture")))
236
- .build();
205
+ @Nullable
206
+ Map<String, Object> baseEventTypeConstants =
207
+ super.getExportedCustomBubblingEventTypeConstants();
208
+ Map<String, Object> eventTypeConstants =
209
+ baseEventTypeConstants == null ? new HashMap<String, Object>() : baseEventTypeConstants;
210
+ eventTypeConstants.putAll(
211
+ MapBuilder.<String, Object>builder()
212
+ .put(
213
+ "topSubmitEditing",
214
+ MapBuilder.of(
215
+ "phasedRegistrationNames",
216
+ MapBuilder.of(
217
+ "bubbled", "onSubmitEditing", "captured", "onSubmitEditingCapture")))
218
+ .put(
219
+ "topEndEditing",
220
+ MapBuilder.of(
221
+ "phasedRegistrationNames",
222
+ MapBuilder.of("bubbled", "onEndEditing", "captured", "onEndEditingCapture")))
223
+ .put(
224
+ "topTextInput",
225
+ MapBuilder.of(
226
+ "phasedRegistrationNames",
227
+ MapBuilder.of("bubbled", "onTextInput", "captured", "onTextInputCapture")))
228
+ .put(
229
+ "topFocus",
230
+ MapBuilder.of(
231
+ "phasedRegistrationNames",
232
+ MapBuilder.of("bubbled", "onFocus", "captured", "onFocusCapture")))
233
+ .put(
234
+ "topBlur",
235
+ MapBuilder.of(
236
+ "phasedRegistrationNames",
237
+ MapBuilder.of("bubbled", "onBlur", "captured", "onBlurCapture")))
238
+ .put(
239
+ "topKeyPress",
240
+ MapBuilder.of(
241
+ "phasedRegistrationNames",
242
+ MapBuilder.of("bubbled", "onKeyPress", "captured", "onKeyPressCapture")))
243
+ .build());
244
+ return eventTypeConstants;
237
245
  }
238
246
 
239
247
  @Nullable
240
248
  @Override
241
249
  public Map<String, Object> getExportedCustomDirectEventTypeConstants() {
242
- return MapBuilder.<String, Object>builder()
243
- .put(
244
- ScrollEventType.getJSEventName(ScrollEventType.SCROLL),
245
- MapBuilder.of("registrationName", "onScroll"))
246
- .build();
250
+ @Nullable
251
+ Map<String, Object> baseEventTypeConstants = super.getExportedCustomDirectEventTypeConstants();
252
+ Map<String, Object> eventTypeConstants =
253
+ baseEventTypeConstants == null ? new HashMap<String, Object>() : baseEventTypeConstants;
254
+ eventTypeConstants.putAll(
255
+ MapBuilder.<String, Object>builder()
256
+ .put(
257
+ ScrollEventType.getJSEventName(ScrollEventType.SCROLL),
258
+ MapBuilder.of("registrationName", "onScroll"))
259
+ .build());
260
+ return eventTypeConstants;
247
261
  }
248
262
 
249
263
  @Override
@@ -17,6 +17,13 @@ namespace react {
17
17
  WritableNativeArray::WritableNativeArray()
18
18
  : HybridBase(folly::dynamic::array()) {}
19
19
 
20
+ WritableNativeArray::WritableNativeArray(folly::dynamic &&val)
21
+ : HybridBase(std::move(val)) {
22
+ if (!array_.isArray()) {
23
+ throw std::runtime_error("WritableNativeArray value must be an array.");
24
+ }
25
+ }
26
+
20
27
  local_ref<WritableNativeArray::jhybriddata> WritableNativeArray::initHybrid(
21
28
  alias_ref<jclass>) {
22
29
  return makeCxxInstance();
@@ -29,6 +29,8 @@ struct WritableNativeArray
29
29
  "Lcom/facebook/react/bridge/WritableNativeArray;";
30
30
 
31
31
  WritableNativeArray();
32
+ WritableNativeArray(folly::dynamic &&val);
33
+
32
34
  static jni::local_ref<jhybriddata> initHybrid(jni::alias_ref<jclass>);
33
35
 
34
36
  void pushNull();
@@ -18,7 +18,7 @@ constexpr struct {
18
18
  int32_t Major = 0;
19
19
  int32_t Minor = 0;
20
20
  int32_t Patch = 0;
21
- std::string_view Prerelease = "20220102-2009-e22b760e5";
21
+ std::string_view Prerelease = "20220106-2009-252b2a63c";
22
22
  } ReactNativeVersion;
23
23
 
24
24
  } // namespace facebook::react
@@ -28,5 +28,17 @@ modernize-use-equals-delete,
28
28
  modernize-use-override,
29
29
  modernize-use-using,
30
30
  modernize-use-transparent-functors,
31
+ performance-faster-string-find,
32
+ performance-for-range-copy,
33
+ performance-implicit-conversion-in-loop,
34
+ performance-inefficient-algorithm,
35
+ performance-inefficient-string-concatenation,
36
+ performance-inefficient-vector-operation,
37
+ performance-move-const-arg,
38
+ performance-move-constructor-init,
39
+ performance-noexcept-move-constructor,
40
+ performance-type-promotion-in-math-fn,
41
+ performance-unnecessary-copy-initialization,
42
+ performance-unnecessary-value-param,
31
43
  '
32
44
  ...
@@ -1075,7 +1075,7 @@ void LayoutAnimationKeyFrameManager::setLayoutAnimationStatusDelegate(
1075
1075
 
1076
1076
  void LayoutAnimationKeyFrameManager::setClockNow(
1077
1077
  std::function<uint64_t()> now) {
1078
- now_ = now;
1078
+ now_ = std::move(now);
1079
1079
  }
1080
1080
 
1081
1081
  void LayoutAnimationKeyFrameManager::enableSkipInvalidatedKeyFrames() {
@@ -1309,7 +1309,7 @@ void LayoutAnimationKeyFrameManager::
1309
1309
 
1310
1310
  // First, collect all final mutations that could impact this immediate
1311
1311
  // mutation.
1312
- std::vector<ShadowViewMutation *> candidateMutations{};
1312
+ std::vector<ShadowViewMutation const *> candidateMutations{};
1313
1313
 
1314
1314
  for (auto inflightAnimationIt =
1315
1315
  inflightAnimations_.rbegin() + (skipLastAnimation ? 1 : 0);
@@ -1323,7 +1323,7 @@ void LayoutAnimationKeyFrameManager::
1323
1323
  continue;
1324
1324
  }
1325
1325
 
1326
- for (auto &animatedKeyFrame : inflightAnimation.keyFrames) {
1326
+ for (auto const &animatedKeyFrame : inflightAnimation.keyFrames) {
1327
1327
  if (animatedKeyFrame.invalidated) {
1328
1328
  continue;
1329
1329
  }
@@ -1334,7 +1334,8 @@ void LayoutAnimationKeyFrameManager::
1334
1334
  continue;
1335
1335
  }
1336
1336
 
1337
- for (auto &delayedMutation : animatedKeyFrame.finalMutationsForKeyFrame) {
1337
+ for (auto const &delayedMutation :
1338
+ animatedKeyFrame.finalMutationsForKeyFrame) {
1338
1339
  if (delayedMutation.type != ShadowViewMutation::Type::Remove) {
1339
1340
  continue;
1340
1341
  }
@@ -1372,7 +1373,7 @@ void LayoutAnimationKeyFrameManager::
1372
1373
  candidateMutations.begin(),
1373
1374
  candidateMutations.end(),
1374
1375
  [&changed, &mutation, &adjustedDelta, &isRemoveMutation](
1375
- ShadowViewMutation *candidateMutation) {
1376
+ ShadowViewMutation const *candidateMutation) {
1376
1377
  bool indexConflicts =
1377
1378
  (candidateMutation->index < mutation.index ||
1378
1379
  (isRemoveMutation &&
@@ -64,7 +64,8 @@ static void testShadowNodeTreeLifeCycleLayoutAnimations(
64
64
  PropsParserContext parserContext{-1, *contextContainer};
65
65
 
66
66
  // Create a RuntimeExecutor
67
- RuntimeExecutor runtimeExecutor = [](std::function<void(jsi::Runtime &)>) {};
67
+ RuntimeExecutor runtimeExecutor =
68
+ [](std::function<void(jsi::Runtime &)> const &) {};
68
69
 
69
70
  // Create component descriptor registry for animation driver
70
71
  auto providerRegistry =
@@ -54,7 +54,7 @@ std::shared_ptr<void> AttributedStringBox::getOpaquePointer() const {
54
54
  }
55
55
 
56
56
  AttributedStringBox &AttributedStringBox::operator=(
57
- AttributedStringBox &&other) {
57
+ AttributedStringBox &&other) noexcept {
58
58
  if (this != &other) {
59
59
  mode_ = other.mode_;
60
60
  value_ = std::move(other.value_);
@@ -43,7 +43,7 @@ class AttributedStringBox final {
43
43
  AttributedStringBox(AttributedStringBox const &other) = default;
44
44
  AttributedStringBox(AttributedStringBox &&other) noexcept;
45
45
  AttributedStringBox &operator=(AttributedStringBox const &other) = default;
46
- AttributedStringBox &operator=(AttributedStringBox &&other);
46
+ AttributedStringBox &operator=(AttributedStringBox &&other) noexcept;
47
47
 
48
48
  /*
49
49
  * Getters.
@@ -46,7 +46,8 @@ void ComponentDescriptorProviderRegistry::setComponentDescriptorProviderRequest(
46
46
  ComponentDescriptorProviderRequest componentDescriptorProviderRequest)
47
47
  const {
48
48
  std::shared_lock<butter::shared_mutex> lock(mutex_);
49
- componentDescriptorProviderRequest_ = componentDescriptorProviderRequest;
49
+ componentDescriptorProviderRequest_ =
50
+ std::move(componentDescriptorProviderRequest);
50
51
  }
51
52
 
52
53
  void ComponentDescriptorProviderRegistry::request(
@@ -18,7 +18,7 @@ namespace react {
18
18
 
19
19
  Size AndroidProgressBarMeasurementsManager::measure(
20
20
  SurfaceId surfaceId,
21
- AndroidProgressBarProps props,
21
+ AndroidProgressBarProps const &props,
22
22
  LayoutConstraints layoutConstraints) const {
23
23
  {
24
24
  std::lock_guard<std::mutex> lock(mutex_);
@@ -24,7 +24,7 @@ class AndroidProgressBarMeasurementsManager {
24
24
 
25
25
  Size measure(
26
26
  SurfaceId surfaceId,
27
- AndroidProgressBarProps props,
27
+ AndroidProgressBarProps const &props,
28
28
  LayoutConstraints layoutConstraints) const;
29
29
 
30
30
  private:
@@ -16,10 +16,10 @@ namespace facebook {
16
16
  namespace react {
17
17
 
18
18
  static TextAttributes convertRawProp(
19
- const PropsParserContext &context,
20
- const RawProps &rawProps,
21
- const TextAttributes sourceTextAttributes,
22
- const TextAttributes defaultTextAttributes) {
19
+ PropsParserContext const &context,
20
+ RawProps const &rawProps,
21
+ TextAttributes const &sourceTextAttributes,
22
+ TextAttributes const &defaultTextAttributes) {
23
23
  auto textAttributes = TextAttributes{};
24
24
 
25
25
  // Color
@@ -17,6 +17,8 @@
17
17
  #include <react/renderer/core/LayoutContext.h>
18
18
  #include <react/renderer/core/conversions.h>
19
19
 
20
+ #include <utility>
21
+
20
22
  using namespace facebook::jni;
21
23
 
22
24
  namespace facebook {
@@ -91,7 +93,7 @@ AttributedString AndroidTextInputShadowNode::getPlaceholderAttributedString()
91
93
  void AndroidTextInputShadowNode::setTextLayoutManager(
92
94
  SharedTextLayoutManager textLayoutManager) {
93
95
  ensureUnsealed();
94
- textLayoutManager_ = textLayoutManager;
96
+ textLayoutManager_ = std::move(textLayoutManager);
95
97
  }
96
98
 
97
99
  AttributedString AndroidTextInputShadowNode::getMostRecentAttributedString()
@@ -27,7 +27,6 @@ AndroidTextInputState::AndroidTextInputState(
27
27
  float defaultThemePaddingTop,
28
28
  float defaultThemePaddingBottom)
29
29
  : mostRecentEventCount(mostRecentEventCount),
30
- cachedAttributedStringId(0),
31
30
  attributedString(std::move(attributedString)),
32
31
  reactTreeAttributedString(std::move(reactTreeAttributedString)),
33
32
  paragraphAttributes(std::move(paragraphAttributes)),
@@ -13,7 +13,7 @@ namespace react {
13
13
  #ifdef ANDROID
14
14
  TextInputState::TextInputState(
15
15
  TextInputState const &previousState,
16
- folly::dynamic data){};
16
+ folly::dynamic const &data){};
17
17
 
18
18
  /*
19
19
  * Empty implementation for Android because it doesn't use this class.
@@ -57,7 +57,9 @@ class TextInputState final {
57
57
  size_t mostRecentEventCount{0};
58
58
 
59
59
  #ifdef ANDROID
60
- TextInputState(TextInputState const &previousState, folly::dynamic data);
60
+ TextInputState(
61
+ TextInputState const &previousState,
62
+ folly::dynamic const &data);
61
63
 
62
64
  folly::dynamic getDynamic() const;
63
65
 
@@ -17,7 +17,7 @@ namespace facebook {
17
17
  namespace react {
18
18
 
19
19
  EventDispatcher::EventDispatcher(
20
- EventQueueProcessor eventProcessor,
20
+ EventQueueProcessor const &eventProcessor,
21
21
  EventBeat::Factory const &synchonousEventBeatFactory,
22
22
  EventBeat::Factory const &asynchonousEventBeatFactory,
23
23
  EventBeat::SharedOwnerBox const &ownerBox)