react-native 0.81.4 → 0.81.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 (35) hide show
  1. package/Libraries/Core/ReactNativeVersion.js +1 -1
  2. package/Libraries/Renderer/implementations/ReactFabric-dev.js +38 -35
  3. package/Libraries/Renderer/implementations/ReactFabric-prod.js +51 -22
  4. package/Libraries/Renderer/implementations/ReactFabric-profiling.js +54 -24
  5. package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +36 -33
  6. package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +5 -5
  7. package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js +5 -5
  8. package/Libraries/Renderer/shims/ReactNativeTypes.js +23 -11
  9. package/React/Base/RCTUtils.mm +5 -1
  10. package/React/Base/RCTVersion.m +1 -1
  11. package/React/CoreModules/RCTDeviceInfo.mm +3 -4
  12. package/React/Fabric/RCTSurfacePointerHandler.mm +1 -1
  13. package/React/Fabric/RCTSurfaceTouchHandler.mm +1 -1
  14. package/React/Views/RCTSwitchManager.m +24 -0
  15. package/ReactAndroid/gradle.properties +1 -1
  16. package/ReactAndroid/src/main/java/com/facebook/react/ReactActivityDelegate.java +25 -1
  17. package/ReactAndroid/src/main/java/com/facebook/react/ReactInstanceManager.java +2 -2
  18. package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.kt +1 -1
  19. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/NativeViewHierarchyManager.java +0 -3
  20. package/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTextShadowNode.kt +1 -1
  21. package/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTextViewManager.kt +2 -2
  22. package/ReactAndroid/src/main/jni/react/jni/TransformHelper.cpp +3 -1
  23. package/ReactCommon/cxxreact/ReactNativeVersion.h +2 -2
  24. package/ReactCommon/react/renderer/components/view/BaseViewProps.cpp +0 -3
  25. package/ReactCommon/react/renderer/components/view/tests/ResolveTransformTest.cpp +377 -0
  26. package/package.json +10 -10
  27. package/scripts/codegen/generate-artifacts-executor/generateReactCodegenPodspec.js +7 -3
  28. package/scripts/codegen/generate-artifacts-executor/index.js +48 -22
  29. package/scripts/codegen/generate-artifacts-executor/utils.js +15 -3
  30. package/scripts/react_native_pods_utils/script_phases.sh +1 -3
  31. package/sdks/hermesc/osx-bin/hermes +0 -0
  32. package/sdks/hermesc/osx-bin/hermesc +0 -0
  33. package/sdks/hermesc/win64-bin/hermesc.exe +0 -0
  34. package/third-party-podspecs/ReactNativeDependencies.podspec +1 -1
  35. package/types_generated/Libraries/Renderer/shims/ReactNativeTypes.d.ts +17 -10
@@ -7,7 +7,7 @@
7
7
  * @noflow
8
8
  * @nolint
9
9
  * @preventMunge
10
- * @generated SignedSource<<cff8afb4533b426f7c26ccb0475bdf8c>>
10
+ * @generated SignedSource<<918f2971ff54304721b755a22da3df6d>>
11
11
  *
12
12
  * This file was sync'd from the facebook/react repository.
13
13
  */
@@ -405,7 +405,7 @@ __DEV__ &&
405
405
  prevPrepareStackTrace = error.indexOf("\n");
406
406
  -1 !== prevPrepareStackTrace &&
407
407
  (error = error.slice(prevPrepareStackTrace + 1));
408
- prevPrepareStackTrace = error.indexOf("react-stack-bottom-frame");
408
+ prevPrepareStackTrace = error.indexOf("react_stack_bottom_frame");
409
409
  -1 !== prevPrepareStackTrace &&
410
410
  (prevPrepareStackTrace = error.lastIndexOf(
411
411
  "\n",
@@ -16385,7 +16385,7 @@ __DEV__ &&
16385
16385
  }
16386
16386
  };
16387
16387
  var callComponent = {
16388
- "react-stack-bottom-frame": function (Component, props, secondArg) {
16388
+ react_stack_bottom_frame: function (Component, props, secondArg) {
16389
16389
  var wasRendering = isRendering;
16390
16390
  isRendering = !0;
16391
16391
  try {
@@ -16396,9 +16396,9 @@ __DEV__ &&
16396
16396
  }
16397
16397
  },
16398
16398
  callComponentInDEV =
16399
- callComponent["react-stack-bottom-frame"].bind(callComponent),
16399
+ callComponent.react_stack_bottom_frame.bind(callComponent),
16400
16400
  callRender = {
16401
- "react-stack-bottom-frame": function (instance) {
16401
+ react_stack_bottom_frame: function (instance) {
16402
16402
  var wasRendering = isRendering;
16403
16403
  isRendering = !0;
16404
16404
  try {
@@ -16408,9 +16408,9 @@ __DEV__ &&
16408
16408
  }
16409
16409
  }
16410
16410
  },
16411
- callRenderInDEV = callRender["react-stack-bottom-frame"].bind(callRender),
16411
+ callRenderInDEV = callRender.react_stack_bottom_frame.bind(callRender),
16412
16412
  callComponentDidMount = {
16413
- "react-stack-bottom-frame": function (finishedWork, instance) {
16413
+ react_stack_bottom_frame: function (finishedWork, instance) {
16414
16414
  try {
16415
16415
  instance.componentDidMount();
16416
16416
  } catch (error) {
@@ -16418,11 +16418,12 @@ __DEV__ &&
16418
16418
  }
16419
16419
  }
16420
16420
  },
16421
- callComponentDidMountInDEV = callComponentDidMount[
16422
- "react-stack-bottom-frame"
16423
- ].bind(callComponentDidMount),
16421
+ callComponentDidMountInDEV =
16422
+ callComponentDidMount.react_stack_bottom_frame.bind(
16423
+ callComponentDidMount
16424
+ ),
16424
16425
  callComponentDidUpdate = {
16425
- "react-stack-bottom-frame": function (
16426
+ react_stack_bottom_frame: function (
16426
16427
  finishedWork,
16427
16428
  instance,
16428
16429
  prevProps,
@@ -16436,22 +16437,24 @@ __DEV__ &&
16436
16437
  }
16437
16438
  }
16438
16439
  },
16439
- callComponentDidUpdateInDEV = callComponentDidUpdate[
16440
- "react-stack-bottom-frame"
16441
- ].bind(callComponentDidUpdate),
16440
+ callComponentDidUpdateInDEV =
16441
+ callComponentDidUpdate.react_stack_bottom_frame.bind(
16442
+ callComponentDidUpdate
16443
+ ),
16442
16444
  callComponentDidCatch = {
16443
- "react-stack-bottom-frame": function (instance, errorInfo) {
16445
+ react_stack_bottom_frame: function (instance, errorInfo) {
16444
16446
  var stack = errorInfo.stack;
16445
16447
  instance.componentDidCatch(errorInfo.value, {
16446
16448
  componentStack: null !== stack ? stack : ""
16447
16449
  });
16448
16450
  }
16449
16451
  },
16450
- callComponentDidCatchInDEV = callComponentDidCatch[
16451
- "react-stack-bottom-frame"
16452
- ].bind(callComponentDidCatch),
16452
+ callComponentDidCatchInDEV =
16453
+ callComponentDidCatch.react_stack_bottom_frame.bind(
16454
+ callComponentDidCatch
16455
+ ),
16453
16456
  callComponentWillUnmount = {
16454
- "react-stack-bottom-frame": function (
16457
+ react_stack_bottom_frame: function (
16455
16458
  current,
16456
16459
  nearestMountedAncestor,
16457
16460
  instance
@@ -16463,11 +16466,12 @@ __DEV__ &&
16463
16466
  }
16464
16467
  }
16465
16468
  },
16466
- callComponentWillUnmountInDEV = callComponentWillUnmount[
16467
- "react-stack-bottom-frame"
16468
- ].bind(callComponentWillUnmount),
16469
+ callComponentWillUnmountInDEV =
16470
+ callComponentWillUnmount.react_stack_bottom_frame.bind(
16471
+ callComponentWillUnmount
16472
+ ),
16469
16473
  callCreate = {
16470
- "react-stack-bottom-frame": function (effect) {
16474
+ react_stack_bottom_frame: function (effect) {
16471
16475
  null != effect.resourceKind &&
16472
16476
  console.error(
16473
16477
  "Expected only SimpleEffects when enableUseEffectCRUDOverload is disabled, got %s",
@@ -16479,9 +16483,9 @@ __DEV__ &&
16479
16483
  return (effect.destroy = create);
16480
16484
  }
16481
16485
  },
16482
- callCreateInDEV = callCreate["react-stack-bottom-frame"].bind(callCreate),
16486
+ callCreateInDEV = callCreate.react_stack_bottom_frame.bind(callCreate),
16483
16487
  callDestroy = {
16484
- "react-stack-bottom-frame": function (
16488
+ react_stack_bottom_frame: function (
16485
16489
  current,
16486
16490
  nearestMountedAncestor,
16487
16491
  destroy
@@ -16493,16 +16497,15 @@ __DEV__ &&
16493
16497
  }
16494
16498
  }
16495
16499
  },
16496
- callDestroyInDEV =
16497
- callDestroy["react-stack-bottom-frame"].bind(callDestroy),
16500
+ callDestroyInDEV = callDestroy.react_stack_bottom_frame.bind(callDestroy),
16498
16501
  callLazyInit = {
16499
- "react-stack-bottom-frame": function (lazy) {
16502
+ react_stack_bottom_frame: function (lazy) {
16500
16503
  var init = lazy._init;
16501
16504
  return init(lazy._payload);
16502
16505
  }
16503
16506
  },
16504
16507
  callLazyInitInDEV =
16505
- callLazyInit["react-stack-bottom-frame"].bind(callLazyInit),
16508
+ callLazyInit.react_stack_bottom_frame.bind(callLazyInit),
16506
16509
  thenableState = null,
16507
16510
  thenableIndexCounter = 0,
16508
16511
  currentDebugInfo = null,
@@ -16868,11 +16871,11 @@ __DEV__ &&
16868
16871
  shouldSuspendImpl = newShouldSuspendImpl;
16869
16872
  };
16870
16873
  var isomorphicReactPackageVersion = React.version;
16871
- if ("19.1.0" !== isomorphicReactPackageVersion)
16874
+ if ("19.1.4" !== isomorphicReactPackageVersion)
16872
16875
  throw Error(
16873
16876
  'Incompatible React versions: The "react" and "react-native-renderer" packages must have the exact same version. Instead got:\n - react: ' +
16874
16877
  (isomorphicReactPackageVersion +
16875
- "\n - react-native-renderer: 19.1.0\nLearn more: https://react.dev/warnings/version-mismatch")
16878
+ "\n - react-native-renderer: 19.1.4\nLearn more: https://react.dev/warnings/version-mismatch")
16876
16879
  );
16877
16880
  if (
16878
16881
  "function" !==
@@ -16898,10 +16901,10 @@ __DEV__ &&
16898
16901
  (function () {
16899
16902
  var internals = {
16900
16903
  bundleType: 1,
16901
- version: "19.1.0",
16904
+ version: "19.1.4",
16902
16905
  rendererPackageName: "react-native-renderer",
16903
16906
  currentDispatcherRef: ReactSharedInternals,
16904
- reconcilerVersion: "19.1.0"
16907
+ reconcilerVersion: "19.1.4"
16905
16908
  };
16906
16909
  null !== extraDevToolsConfig &&
16907
16910
  (internals.rendererConfig = extraDevToolsConfig);
@@ -7,7 +7,7 @@
7
7
  * @noflow
8
8
  * @nolint
9
9
  * @preventMunge
10
- * @generated SignedSource<<43be62d6fc9b622e265e2acb066ed13c>>
10
+ * @generated SignedSource<<0129ab1b7de2122366e60b1d68de6e4a>>
11
11
  *
12
12
  * This file was sync'd from the facebook/react repository.
13
13
  */
@@ -10603,11 +10603,11 @@ function updateContainer(element, container, parentComponent, callback) {
10603
10603
  return lane;
10604
10604
  }
10605
10605
  var isomorphicReactPackageVersion = React.version;
10606
- if ("19.1.0" !== isomorphicReactPackageVersion)
10606
+ if ("19.1.4" !== isomorphicReactPackageVersion)
10607
10607
  throw Error(
10608
10608
  'Incompatible React versions: The "react" and "react-native-renderer" packages must have the exact same version. Instead got:\n - react: ' +
10609
10609
  (isomorphicReactPackageVersion +
10610
- "\n - react-native-renderer: 19.1.0\nLearn more: https://react.dev/warnings/version-mismatch")
10610
+ "\n - react-native-renderer: 19.1.4\nLearn more: https://react.dev/warnings/version-mismatch")
10611
10611
  );
10612
10612
  if (
10613
10613
  "function" !==
@@ -10656,10 +10656,10 @@ batchedUpdatesImpl = function (fn, a) {
10656
10656
  var roots = new Map(),
10657
10657
  internals$jscomp$inline_1269 = {
10658
10658
  bundleType: 0,
10659
- version: "19.1.0",
10659
+ version: "19.1.4",
10660
10660
  rendererPackageName: "react-native-renderer",
10661
10661
  currentDispatcherRef: ReactSharedInternals,
10662
- reconcilerVersion: "19.1.0"
10662
+ reconcilerVersion: "19.1.4"
10663
10663
  };
10664
10664
  null !== extraDevToolsConfig &&
10665
10665
  (internals$jscomp$inline_1269.rendererConfig = extraDevToolsConfig);
@@ -7,7 +7,7 @@
7
7
  * @noflow
8
8
  * @nolint
9
9
  * @preventMunge
10
- * @generated SignedSource<<d0e536371839f0311bec769f15162a4b>>
10
+ * @generated SignedSource<<d09a614d44bd133ffd789d5236ba611a>>
11
11
  *
12
12
  * This file was sync'd from the facebook/react repository.
13
13
  */
@@ -11245,11 +11245,11 @@ function updateContainer(element, container, parentComponent, callback) {
11245
11245
  return lane;
11246
11246
  }
11247
11247
  var isomorphicReactPackageVersion = React.version;
11248
- if ("19.1.0" !== isomorphicReactPackageVersion)
11248
+ if ("19.1.4" !== isomorphicReactPackageVersion)
11249
11249
  throw Error(
11250
11250
  'Incompatible React versions: The "react" and "react-native-renderer" packages must have the exact same version. Instead got:\n - react: ' +
11251
11251
  (isomorphicReactPackageVersion +
11252
- "\n - react-native-renderer: 19.1.0\nLearn more: https://react.dev/warnings/version-mismatch")
11252
+ "\n - react-native-renderer: 19.1.4\nLearn more: https://react.dev/warnings/version-mismatch")
11253
11253
  );
11254
11254
  if (
11255
11255
  "function" !==
@@ -11298,10 +11298,10 @@ batchedUpdatesImpl = function (fn, a) {
11298
11298
  var roots = new Map(),
11299
11299
  internals$jscomp$inline_1362 = {
11300
11300
  bundleType: 0,
11301
- version: "19.1.0",
11301
+ version: "19.1.4",
11302
11302
  rendererPackageName: "react-native-renderer",
11303
11303
  currentDispatcherRef: ReactSharedInternals,
11304
- reconcilerVersion: "19.1.0"
11304
+ reconcilerVersion: "19.1.4"
11305
11305
  };
11306
11306
  null !== extraDevToolsConfig &&
11307
11307
  (internals$jscomp$inline_1362.rendererConfig = extraDevToolsConfig);
@@ -7,9 +7,14 @@
7
7
  * @noformat
8
8
  * @nolint
9
9
  * @flow strict
10
- * @generated SignedSource<<deb7924d11c790f99448a1c2f0edddb9>>
10
+ * @generated SignedSource<<9564768e65343249f5e5ee5074826c7f>>
11
11
  */
12
12
 
13
+ import type {
14
+ Component as ReactComponent,
15
+ ElementRef,
16
+ ElementType,
17
+ } from 'react';
13
18
  import type {
14
19
  // $FlowFixMe[nonstrict-import] TODO(@rubennorte)
15
20
  HostInstance as PublicInstance,
@@ -21,8 +26,6 @@ import type {
21
26
  PublicTextInstance,
22
27
  } from 'react-native';
23
28
 
24
- import * as React from 'react';
25
-
26
29
  export type AttributeType<T, V> =
27
30
  | true
28
31
  | $ReadOnly<{
@@ -35,7 +38,16 @@ export type AttributeType<T, V> =
35
38
  export type AnyAttributeType = AttributeType<$FlowFixMe, $FlowFixMe>;
36
39
 
37
40
  export type AttributeConfiguration = $ReadOnly<{
38
- [propName: string]: AnyAttributeType | void,
41
+ [propName: string]: AnyAttributeType,
42
+ style?: $ReadOnly<{
43
+ [propName: string]: AnyAttributeType,
44
+ ...
45
+ }>,
46
+ ...
47
+ }>;
48
+
49
+ export type PartialAttributeConfiguration = $ReadOnly<{
50
+ [propName: string]: AnyAttributeType,
39
51
  style?: $ReadOnly<{
40
52
  [propName: string]: AnyAttributeType,
41
53
  ...
@@ -75,7 +87,7 @@ export type PartialViewConfig = $ReadOnly<{
75
87
  directEventTypes?: ViewConfig['directEventTypes'],
76
88
  supportsRawText?: boolean,
77
89
  uiViewClassName: string,
78
- validAttributes?: AttributeConfiguration,
90
+ validAttributes?: PartialAttributeConfiguration,
79
91
  }>;
80
92
 
81
93
  type InspectorDataProps = $ReadOnly<{
@@ -84,7 +96,7 @@ type InspectorDataProps = $ReadOnly<{
84
96
  }>;
85
97
 
86
98
  type InspectorDataGetter = (
87
- <TElementType: React.ElementType>(
99
+ <TElementType: ElementType>(
88
100
  componentOrHandle: React.ElementRef<TElementType> | number,
89
101
  ) => ?number,
90
102
  ) => $ReadOnly<{
@@ -128,7 +140,7 @@ export type RenderRootOptions = {
128
140
  +componentStack?: ?string,
129
141
  // $FlowFixMe[unclear-type] unknown props and state.
130
142
  // $FlowFixMe[value-as-type] Component in react repo is any-typed, but it will be well typed externally.
131
- +errorBoundary?: ?React.Component<any, any>,
143
+ +errorBoundary?: ?ReactComponent<any, any>,
132
144
  },
133
145
  ) => void,
134
146
  onRecoverableError?: (
@@ -142,10 +154,10 @@ export type RenderRootOptions = {
142
154
  * Provide minimal Flow typing for the high-level RN API and call it a day.
143
155
  */
144
156
  export type ReactNativeType = {
145
- findHostInstance_DEPRECATED<TElementType: React.ElementType>(
157
+ findHostInstance_DEPRECATED<TElementType: ElementType>(
146
158
  componentOrHandle: ?(React.ElementRef<TElementType> | number),
147
159
  ): ?PublicInstance,
148
- findNodeHandle<TElementType: React.ElementType>(
160
+ findNodeHandle<TElementType: ElementType>(
149
161
  componentOrHandle: ?(React.ElementRef<TElementType> | number),
150
162
  ): ?number,
151
163
  isChildPublicInstance(parent: PublicInstance, child: PublicInstance): boolean,
@@ -171,10 +183,10 @@ export opaque type Node = mixed;
171
183
  export opaque type InternalInstanceHandle = mixed;
172
184
 
173
185
  export type ReactFabricType = {
174
- findHostInstance_DEPRECATED<TElementType: React.ElementType>(
186
+ findHostInstance_DEPRECATED<TElementType: ElementType>(
175
187
  componentOrHandle: ?(React.ElementRef<TElementType> | number),
176
188
  ): ?PublicInstance,
177
- findNodeHandle<TElementType: React.ElementType>(
189
+ findNodeHandle<TElementType: ElementType>(
178
190
  componentOrHandle: ?(React.ElementRef<TElementType> | number),
179
191
  ): ?number,
180
192
  dispatchCommand(
@@ -432,7 +432,11 @@ CGSize RCTSwitchSize(void)
432
432
  static dispatch_once_t onceToken;
433
433
  dispatch_once(&onceToken, ^{
434
434
  RCTUnsafeExecuteOnMainQueueSync(^{
435
- rctSwitchSize = [UISwitch new].intrinsicContentSize;
435
+ CGSize switchSize = [UISwitch new].intrinsicContentSize;
436
+ // Apple does not take into account the thumb border when returning the
437
+ // width of the UISwitch component, so we are adding 2 pixels for the border
438
+ // which is not customizable and it is the same for legacy and liquid glass.
439
+ rctSwitchSize = CGSizeMake(switchSize.width + 2, switchSize.height);
436
440
  });
437
441
  });
438
442
  return rctSwitchSize;
@@ -23,7 +23,7 @@ NSDictionary* RCTGetReactNativeVersion(void)
23
23
  __rnVersion = @{
24
24
  RCTVersionMajor: @(0),
25
25
  RCTVersionMinor: @(81),
26
- RCTVersionPatch: @(4),
26
+ RCTVersionPatch: @(6),
27
27
  RCTVersionPrerelease: [NSNull null],
28
28
  };
29
29
  });
@@ -238,11 +238,10 @@ static NSDictionary *RCTExportedDimensions(CGFloat fontScale)
238
238
  - (void)interfaceOrientationDidChange
239
239
  {
240
240
  #if TARGET_OS_IOS && !TARGET_OS_MACCATALYST
241
- UIApplication *application = RCTSharedApplication();
242
- UIInterfaceOrientation nextOrientation = RCTKeyWindow().windowScene.interfaceOrientation;
241
+ UIWindow *window = RCTKeyWindow();
242
+ UIInterfaceOrientation nextOrientation = window.windowScene.interfaceOrientation;
243
243
 
244
- BOOL isRunningInFullScreen =
245
- CGRectEqualToRect(application.delegate.window.frame, application.delegate.window.screen.bounds);
244
+ BOOL isRunningInFullScreen = window ? CGRectEqualToRect(window.frame, window.screen.bounds) : YES;
246
245
  // We are catching here two situations for multitasking view:
247
246
  // a) The app is in Split View and the container gets resized -> !isRunningInFullScreen
248
247
  // b) The app changes to/from fullscreen example: App runs in slide over mode and goes into fullscreen->
@@ -437,7 +437,7 @@ struct PointerHasher {
437
437
  * We hold the view weakly to prevent a retain cycle.
438
438
  */
439
439
  __weak UIView *_rootComponentView;
440
- RCTIdentifierPool<11> _identifierPool;
440
+ RCTIdentifierPool<17> _identifierPool;
441
441
 
442
442
  UIHoverGestureRecognizer *_mouseHoverRecognizer API_AVAILABLE(ios(13.0));
443
443
  UIHoverGestureRecognizer *_penHoverRecognizer API_AVAILABLE(ios(13.0));
@@ -137,7 +137,7 @@ struct PointerHasher {
137
137
  * We hold the view weakly to prevent a retain cycle.
138
138
  */
139
139
  __weak UIView *_rootComponentView;
140
- RCTIdentifierPool<11> _identifierPool;
140
+ RCTIdentifierPool<17> _identifierPool;
141
141
 
142
142
  RCTSurfacePointerHandler *_pointerHandler;
143
143
  }
@@ -8,10 +8,29 @@
8
8
  #import "RCTSwitchManager.h"
9
9
 
10
10
  #import <React/RCTUIManager.h>
11
+ #import <React/RCTUtils.h>
11
12
  #import "RCTBridge.h"
13
+ #import "RCTShadowView.h"
12
14
  #import "RCTSwitch.h"
13
15
  #import "UIView+React.h"
14
16
 
17
+ @interface RCTSwitchShadowView : RCTShadowView
18
+
19
+ @end
20
+
21
+ @implementation RCTSwitchShadowView
22
+
23
+ - (instancetype)init
24
+ {
25
+ if (self = [super init]) {
26
+ self.intrinsicContentSize = RCTSwitchSize();
27
+ }
28
+
29
+ return self;
30
+ }
31
+
32
+ @end
33
+
15
34
  @implementation RCTSwitchManager
16
35
 
17
36
  RCT_EXPORT_MODULE()
@@ -33,6 +52,11 @@ RCT_EXPORT_MODULE()
33
52
  }
34
53
  }
35
54
 
55
+ - (RCTShadowView *)shadowView
56
+ {
57
+ return [RCTSwitchShadowView new];
58
+ }
59
+
36
60
  RCT_EXPORT_METHOD(setValue : (nonnull NSNumber *)viewTag toValue : (BOOL)value)
37
61
  {
38
62
  [self.bridge.uiManager addUIBlock:^(RCTUIManager *uiManager, NSDictionary<NSNumber *, UIView *> *viewRegistry) {
@@ -1,4 +1,4 @@
1
- VERSION_NAME=0.81.4
1
+ VERSION_NAME=0.81.6
2
2
  react.internal.publishingGroup=com.facebook.react
3
3
 
4
4
  android.useAndroidX=true
@@ -21,6 +21,7 @@ import com.facebook.infer.annotation.Assertions;
21
21
  import com.facebook.infer.annotation.Nullsafe;
22
22
  import com.facebook.react.bridge.Callback;
23
23
  import com.facebook.react.bridge.ReactContext;
24
+ import com.facebook.react.common.LifecycleState;
24
25
  import com.facebook.react.interfaces.fabric.ReactSurface;
25
26
  import com.facebook.react.internal.featureflags.ReactNativeNewArchitectureFeatureFlags;
26
27
  import com.facebook.react.modules.core.PermissionListener;
@@ -247,7 +248,7 @@ public class ReactActivityDelegate {
247
248
 
248
249
  public void onRequestPermissionsResult(
249
250
  final int requestCode, final String[] permissions, final int[] grantResults) {
250
- mPermissionsCallback =
251
+ Callback permissionsCallback =
251
252
  args -> {
252
253
  if (mPermissionListener != null
253
254
  && mPermissionListener.onRequestPermissionsResult(
@@ -255,6 +256,29 @@ public class ReactActivityDelegate {
255
256
  mPermissionListener = null;
256
257
  }
257
258
  };
259
+
260
+ LifecycleState lifecycle;
261
+ if (isFabricEnabled()) {
262
+ ReactHost reactHost = getReactHost();
263
+ lifecycle = reactHost != null ? reactHost.getLifecycleState() : LifecycleState.BEFORE_CREATE;
264
+ } else {
265
+ ReactNativeHost reactNativeHost = getReactNativeHost();
266
+ if (!reactNativeHost.hasInstance()) {
267
+ lifecycle = LifecycleState.BEFORE_CREATE;
268
+ } else {
269
+ lifecycle = reactNativeHost.getReactInstanceManager().getLifecycleState();
270
+ }
271
+ }
272
+
273
+ // If the permission request didn't show a dialog to the user, we can call the callback
274
+ // immediately.
275
+ // Otherwise, we need to wait until onResume to call it.
276
+ if (lifecycle == LifecycleState.RESUMED) {
277
+ permissionsCallback.invoke();
278
+ return;
279
+ }
280
+
281
+ mPermissionsCallback = permissionsCallback;
258
282
  }
259
283
 
260
284
  protected Context getContext() {
@@ -1404,14 +1404,14 @@ public class ReactInstanceManager {
1404
1404
  new RuntimeException(
1405
1405
  "detachRootViewFromInstance called with ReactRootView with invalid id"));
1406
1406
  }
1407
-
1408
- clearReactRoot(reactRoot);
1409
1407
  } else {
1410
1408
  reactContext
1411
1409
  .getCatalystInstance()
1412
1410
  .getJSModule(AppRegistry.class)
1413
1411
  .unmountApplicationComponentAtRootTag(reactRoot.getRootViewTag());
1414
1412
  }
1413
+
1414
+ clearReactRoot(reactRoot);
1415
1415
  }
1416
1416
 
1417
1417
  @ThreadConfined(UI)
@@ -14,7 +14,7 @@ public object ReactNativeVersion {
14
14
  public val VERSION: Map<String, Any?> = mapOf(
15
15
  "major" to 0,
16
16
  "minor" to 81,
17
- "patch" to 4,
17
+ "patch" to 6,
18
18
  "prerelease" to null
19
19
  )
20
20
  }
@@ -679,9 +679,6 @@ public class NativeViewHierarchyManager {
679
679
  View rootView = mTagsToViews.get(rootViewTag);
680
680
  dropView(rootView);
681
681
  mRootTags.delete(rootViewTag);
682
- if (rootView != null) {
683
- rootView.setId(View.NO_ID);
684
- }
685
682
  }
686
683
 
687
684
  /**
@@ -51,7 +51,7 @@ import kotlin.math.min
51
51
  * constructed in superclass.
52
52
  */
53
53
  @LegacyArchitecture(logLevel = LegacyArchitectureLogLevel.ERROR)
54
- public class ReactTextShadowNode
54
+ public open class ReactTextShadowNode
55
55
  @JvmOverloads
56
56
  public constructor(reactTextViewManagerCallback: ReactTextViewManagerCallback? = null) :
57
57
  ReactBaseTextShadowNode(reactTextViewManagerCallback) {
@@ -29,7 +29,7 @@ import java.util.HashMap
29
29
  */
30
30
  @ReactModule(name = ReactTextViewManager.REACT_CLASS)
31
31
  @OptIn(UnstableReactNativeAPI::class)
32
- public class ReactTextViewManager
32
+ public open class ReactTextViewManager
33
33
  @JvmOverloads
34
34
  public constructor(
35
35
  protected var reactTextViewManagerCallback: ReactTextViewManagerCallback? = null
@@ -92,7 +92,7 @@ public constructor(
92
92
  override fun createShadowNodeInstance(): ReactTextShadowNode =
93
93
  ReactTextShadowNode(reactTextViewManagerCallback)
94
94
 
95
- public fun createShadowNodeInstance(
95
+ public open fun createShadowNodeInstance(
96
96
  reactTextViewManagerCallback: ReactTextViewManagerCallback?
97
97
  ): ReactTextShadowNode = ReactTextShadowNode(reactTextViewManagerCallback)
98
98
 
@@ -39,7 +39,9 @@ void processTransform(
39
39
  }
40
40
 
41
41
  auto result = BaseViewProps::resolveTransform(
42
- Size(viewWidth, viewHeight), transform, transformOrigin);
42
+ Size{.width = viewWidth, .height = viewHeight},
43
+ transform,
44
+ transformOrigin);
43
45
 
44
46
  // Convert from matrix of floats to double matrix
45
47
  constexpr size_t MatrixSize = std::tuple_size_v<decltype(result.matrix)>;
@@ -14,14 +14,14 @@
14
14
 
15
15
  #define REACT_NATIVE_VERSION_MAJOR 0
16
16
  #define REACT_NATIVE_VERSION_MINOR 81
17
- #define REACT_NATIVE_VERSION_PATCH 4
17
+ #define REACT_NATIVE_VERSION_PATCH 6
18
18
 
19
19
  namespace facebook::react {
20
20
 
21
21
  constexpr struct {
22
22
  int32_t Major = 0;
23
23
  int32_t Minor = 81;
24
- int32_t Patch = 4;
24
+ int32_t Patch = 6;
25
25
  std::string_view Prerelease = "";
26
26
  } ReactNativeVersion;
27
27
 
@@ -558,9 +558,6 @@ Transform BaseViewProps::resolveTransform(
558
558
  const Transform& transform,
559
559
  const TransformOrigin& transformOrigin) {
560
560
  auto transformMatrix = Transform{};
561
- if (frameSize.width == 0 && frameSize.height == 0) {
562
- return transformMatrix;
563
- }
564
561
 
565
562
  // transform is matrix
566
563
  if (transform.operations.size() == 1 &&