@office-iss/react-native-win32 0.0.0-canary.301 → 0.0.0-canary.303

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 (132) hide show
  1. package/.flowconfig +2 -2
  2. package/CHANGELOG.json +49 -1
  3. package/CHANGELOG.md +24 -5
  4. package/IntegrationTests/IntegrationTestsApp.js +1 -1
  5. package/IntegrationTests/LayoutEventsTest.js +3 -3
  6. package/Libraries/ActionSheetIOS/ActionSheetIOS.js +3 -3
  7. package/Libraries/Alert/RCTAlertManager.android.js +2 -2
  8. package/Libraries/Animated/AnimatedEvent.js +1 -1
  9. package/Libraries/Animated/AnimatedImplementation.js +2 -2
  10. package/Libraries/Animated/AnimatedMock.js +1 -1
  11. package/Libraries/Animated/NativeAnimatedAllowlist.js +1 -0
  12. package/Libraries/Animated/animations/Animation.js +5 -6
  13. package/Libraries/Animated/components/AnimatedScrollView.js +1 -1
  14. package/Libraries/Animated/nodes/AnimatedColor.js +9 -9
  15. package/Libraries/Animated/nodes/AnimatedInterpolation.js +4 -4
  16. package/Libraries/Animated/nodes/AnimatedProps.js +2 -2
  17. package/Libraries/Animated/nodes/AnimatedStyle.js +6 -4
  18. package/Libraries/Animated/nodes/AnimatedTransform.js +1 -1
  19. package/Libraries/AppState/AppState.js +5 -1
  20. package/Libraries/BatchedBridge/NativeModules.js +1 -1
  21. package/Libraries/Blob/BlobManager.js +1 -1
  22. package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.js +1 -1
  23. package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.win32.js +1 -1
  24. package/Libraries/Components/Button.js +1 -1
  25. package/Libraries/Components/Button.win32.js +1 -1
  26. package/Libraries/Components/Pressable/useAndroidRippleForView.js +2 -2
  27. package/Libraries/Components/ScrollView/ScrollView.js +3 -2
  28. package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +1 -1
  29. package/Libraries/Components/TextInput/TextInput.flow.js +12 -5
  30. package/Libraries/Components/TextInput/TextInput.flow.win32.js +12 -5
  31. package/Libraries/Components/TextInput/TextInput.js +9 -4
  32. package/Libraries/Components/TextInput/TextInput.win32.js +9 -6
  33. package/Libraries/Components/TextInput/Win32TextInputNativeComponent.js +2 -3
  34. package/Libraries/Components/Touchable/TouchableWithoutFeedback.js +1 -1
  35. package/Libraries/Components/View/View.win32.js +3 -1
  36. package/Libraries/Core/Devtools/loadBundleFromServer.js +1 -1
  37. package/Libraries/Core/Devtools/loadBundleFromServer.win32.js +1 -1
  38. package/Libraries/Core/ExceptionsManager.js +2 -2
  39. package/Libraries/Core/ReactFiberErrorDialog.js +3 -3
  40. package/Libraries/Core/ReactNativeVersion.js +1 -1
  41. package/Libraries/Core/Timers/JSTimers.js +1 -1
  42. package/Libraries/Core/Timers/immediateShim.js +1 -1
  43. package/Libraries/Debugging/DebuggingOverlayRegistry.js +5 -3
  44. package/Libraries/Image/Image.android.js +318 -111
  45. package/Libraries/Image/ImageSourceUtils.js +8 -2
  46. package/Libraries/Image/resolveAssetSource.js +1 -1
  47. package/Libraries/Interaction/InteractionManager.js +1 -1
  48. package/Libraries/Interaction/PanResponder.js +1 -1
  49. package/Libraries/Lists/FlatList.js +5 -6
  50. package/Libraries/LogBox/Data/LogBoxData.js +1 -1
  51. package/Libraries/LogBox/Data/parseLogBoxLog.js +1 -1
  52. package/Libraries/LogBox/UI/LogBoxInspectorSourceMapStatus.js +1 -1
  53. package/Libraries/LogBox/UI/LogBoxInspectorSourceMapStatus.win32.js +1 -1
  54. package/Libraries/Modal/Modal.js +2 -2
  55. package/Libraries/NativeComponent/NativeComponentRegistry.js +1 -1
  56. package/Libraries/NativeComponent/ViewConfig.js +1 -1
  57. package/Libraries/Network/RCTNetworking.android.js +1 -1
  58. package/Libraries/Network/RCTNetworking.ios.js +1 -1
  59. package/Libraries/Network/RCTNetworking.win32.js +1 -1
  60. package/Libraries/Network/convertRequestBody.js +1 -1
  61. package/Libraries/PermissionsAndroid/PermissionsAndroid.js +10 -9
  62. package/Libraries/Pressability/HoverState.js +2 -0
  63. package/Libraries/Pressability/HoverState.win32.js +2 -0
  64. package/Libraries/PushNotificationIOS/PushNotificationIOS.js +2 -2
  65. package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricHostComponent.js +2 -0
  66. package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance.js +3 -3
  67. package/Libraries/ReactNative/RendererImplementation.js +116 -116
  68. package/Libraries/ReactNative/UIManager.js +3 -3
  69. package/Libraries/ReactPrivate/ReactNativePrivateInterface.js +1 -1
  70. package/Libraries/Renderer/shims/ReactFabric.js +1 -3
  71. package/Libraries/Renderer/shims/ReactFeatureFlags.js +1 -3
  72. package/Libraries/Renderer/shims/ReactNative.js +1 -3
  73. package/Libraries/Renderer/shims/ReactNativeViewConfigRegistry.js +1 -3
  74. package/Libraries/Renderer/shims/createReactNativeComponentClass.js +1 -3
  75. package/Libraries/StyleSheet/PlatformColorValueTypes.android.js +2 -2
  76. package/Libraries/StyleSheet/PlatformColorValueTypes.ios.js +2 -2
  77. package/Libraries/StyleSheet/PlatformColorValueTypes.win32.js +4 -0
  78. package/Libraries/StyleSheet/flattenStyle.js +2 -2
  79. package/Libraries/StyleSheet/splitLayoutProps.js +2 -2
  80. package/Libraries/Text/Text.js +509 -235
  81. package/Libraries/Text/Text.win32.js +622 -275
  82. package/Libraries/Text/TextNativeComponent.js +2 -2
  83. package/Libraries/Text/TextNativeComponent.win32.js +2 -2
  84. package/Libraries/Utilities/HMRClient.js +0 -1
  85. package/Libraries/Utilities/Platform.android.js +3 -3
  86. package/Libraries/Utilities/Platform.d.ts +1 -0
  87. package/Libraries/Utilities/Platform.ios.js +1 -1
  88. package/Libraries/Utilities/Platform.win32.js +3 -3
  89. package/Libraries/Utilities/PlatformTypes.js +1 -1
  90. package/Libraries/Utilities/ReactNativeTestTools.js +12 -0
  91. package/Libraries/Utilities/codegenNativeCommands.js +1 -1
  92. package/Libraries/Utilities/codegenNativeComponent.js +1 -1
  93. package/Libraries/Utilities/differ/pointsDiffer.js +1 -1
  94. package/Libraries/vendor/emitter/EventEmitter.js +1 -1
  95. package/index.js +3 -0
  96. package/index.win32.js +4 -0
  97. package/jest/local-setup.js +2 -2
  98. package/jest/mock.js +1 -1
  99. package/jest/mockComponent.js +8 -8
  100. package/jest/mockNativeComponent.js +3 -2
  101. package/jest/mocks/Modal.js +1 -1
  102. package/jest/mocks/ScrollView.js +1 -1
  103. package/jest/mocks/ViewNativeComponent.js +1 -1
  104. package/jest/setup.js +12 -12
  105. package/overrides.json +16 -16
  106. package/package.json +12 -12
  107. package/src/private/animated/NativeAnimatedHelper.js +3 -3
  108. package/src/private/animated/NativeAnimatedHelper.win32.js +3 -3
  109. package/src/private/animated/createAnimatedPropsHook.js +9 -11
  110. package/src/private/animated/createAnimatedPropsMemoHook.js +6 -6
  111. package/src/private/components/virtualview/VirtualView.js +7 -4
  112. package/src/private/components/virtualview/VirtualViewNativeComponent.js +6 -0
  113. package/src/private/devsupport/devmenu/elementinspector/Inspector.js +2 -2
  114. package/src/private/featureflags/ReactNativeFeatureFlags.js +9 -8
  115. package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +1 -2
  116. package/src/private/renderer/errorhandling/ErrorHandlers.js +3 -3
  117. package/src/private/types/HostInstance.js +4 -1
  118. package/src/private/webapis/dom/nodes/ReactNativeDocument.js +22 -2
  119. package/src/private/webapis/dom/nodes/ReactNativeElement.js +1 -1
  120. package/src/private/webapis/dom/nodes/ReadOnlyElement.js +5 -3
  121. package/src/private/webapis/dom/nodes/ReadOnlyNode.js +16 -13
  122. package/src/private/webapis/dom/nodes/internals/NodeInternals.js +45 -22
  123. package/src/private/webapis/dom/nodes/internals/ReactNativeDocumentInstanceHandle.js +1 -1
  124. package/src/private/webapis/dom/nodes/specs/NativeDOM.js +26 -192
  125. package/src/private/webapis/dom/oldstylecollections/HTMLCollection.js +14 -11
  126. package/src/private/webapis/dom/oldstylecollections/NodeList.js +13 -10
  127. package/src/private/webapis/geometry/DOMRectList.js +1 -1
  128. package/src/private/webapis/mutationobserver/internals/MutationObserverManager.js +1 -1
  129. package/src/private/webapis/performance/EventTiming.js +1 -1
  130. package/src/private/webapis/performance/Performance.js +12 -30
  131. package/src/private/webapis/performance/specs/NativePerformance.js +4 -4
  132. package/src/private/webapis/structuredClone/structuredClone.js +9 -9
@@ -487,7 +487,7 @@ function InternalTextInput(props: TextInputProps): React.Node {
487
487
  [mostRecentEventCount, viewCommands],
488
488
  );
489
489
 
490
- // $FlowExpectedError[incompatible-call]
490
+ // $FlowExpectedError[incompatible-type]
491
491
  const ref = useMergeRefs<HostInstance>(setLocalRef, props.forwardedRef);
492
492
 
493
493
  const _onChange = (event: TextInputChangeEvent) => {
@@ -618,6 +618,9 @@ function InternalTextInput(props: TextInputProps): React.Node {
618
618
  // so omitting onBlur and onFocus pressability handlers here.
619
619
  const {onBlur, onFocus, ...eventHandlers} = usePressability(config);
620
620
 
621
+ const _accessibilityLabel =
622
+ props?.['aria-label'] ?? props?.accessibilityLabel;
623
+
621
624
  let _accessibilityState;
622
625
  if (
623
626
  accessibilityState != null ||
@@ -644,7 +647,7 @@ function InternalTextInput(props: TextInputProps): React.Node {
644
647
  if (typeof flattenedStyle?.fontWeight === 'number') {
645
648
  overrides = overrides || ({}: {...TextStyleInternal});
646
649
  overrides.fontWeight =
647
- // $FlowFixMe[incompatible-cast]
650
+ // $FlowFixMe[incompatible-type]
648
651
  (flattenedStyle.fontWeight.toString(): TextStyleInternal['fontWeight']);
649
652
  }
650
653
 
@@ -681,6 +684,7 @@ function InternalTextInput(props: TextInputProps): React.Node {
681
684
  {...otherProps}
682
685
  {...eventHandlers}
683
686
  acceptDragAndDropTypes={props.experimental_acceptDragAndDropTypes}
687
+ accessibilityLabel={_accessibilityLabel}
684
688
  accessibilityState={_accessibilityState}
685
689
  accessible={accessible}
686
690
  submitBehavior={submitBehavior}
@@ -744,8 +748,9 @@ function InternalTextInput(props: TextInputProps): React.Node {
744
748
  {...otherProps}
745
749
  {...colorProps}
746
750
  {...eventHandlers}
747
- accessibilityState={_accessibilityState}
751
+ accessibilityLabel={_accessibilityLabel}
748
752
  accessibilityLabelledBy={_accessibilityLabelledBy}
753
+ accessibilityState={_accessibilityState}
749
754
  accessible={accessible}
750
755
  acceptDragAndDropTypes={props.experimental_acceptDragAndDropTypes}
751
756
  autoCapitalize={autoCapitalize}
@@ -763,7 +768,7 @@ function InternalTextInput(props: TextInputProps): React.Node {
763
768
  /* $FlowFixMe[prop-missing] the types for AndroidTextInput don't match
764
769
  * up exactly with the props for TextInput. This will need to get fixed
765
770
  */
766
- /* $FlowFixMe[incompatible-type-arg] the types for AndroidTextInput
771
+ /* $FlowFixMe[incompatible-type] the types for AndroidTextInput
767
772
  * don't match up exactly with the props for TextInput. This will need
768
773
  * to get fixed */
769
774
  onScroll={_onScroll}
@@ -508,7 +508,7 @@ function InternalTextInput(props: TextInputProps): React.Node {
508
508
  [mostRecentEventCount, viewCommands],
509
509
  );
510
510
 
511
- // $FlowExpectedError[incompatible-call]
511
+ // $FlowExpectedError[incompatible-type]
512
512
  const ref = useMergeRefs<HostInstance>(setLocalRef, props.forwardedRef);
513
513
 
514
514
  const _onChange = (event: TextInputChangeEvent) => {
@@ -721,6 +721,9 @@ function InternalTextInput(props: TextInputProps): React.Node {
721
721
  props.onKeyUpCapture && props.onKeyUpCapture(event);
722
722
  };
723
723
 
724
+ const _accessibilityLabel =
725
+ props?.['aria-label'] ?? props?.accessibilityLabel;
726
+
724
727
  let _accessibilityState;
725
728
  if (
726
729
  accessibilityState != null ||
@@ -752,7 +755,7 @@ function InternalTextInput(props: TextInputProps): React.Node {
752
755
  if (typeof flattenedStyle?.fontWeight === 'number') {
753
756
  overrides = overrides || ({}: {...TextStyleInternal});
754
757
  overrides.fontWeight =
755
- // $FlowFixMe[incompatible-cast]
758
+ // $FlowFixMe[incompatible-type]
756
759
  (flattenedStyle.fontWeight.toString(): TextStyleInternal['fontWeight']);
757
760
  }
758
761
 
@@ -789,7 +792,7 @@ function InternalTextInput(props: TextInputProps): React.Node {
789
792
  {...otherProps}
790
793
  {...eventHandlers}
791
794
  acceptDragAndDropTypes={props.experimental_acceptDragAndDropTypes}
792
- accessibilityErrorMessage={accessibilityErrorMessage}
795
+ accessibilityLabel={_accessibilityLabel}
793
796
  accessibilityState={_accessibilityState}
794
797
  accessible={accessible}
795
798
  submitBehavior={submitBehavior}
@@ -853,9 +856,9 @@ function InternalTextInput(props: TextInputProps): React.Node {
853
856
  {...otherProps}
854
857
  {...colorProps}
855
858
  {...eventHandlers}
856
- accessibilityErrorMessage={accessibilityErrorMessage}
857
- accessibilityState={_accessibilityState}
859
+ accessibilityLabel={_accessibilityLabel}
858
860
  accessibilityLabelledBy={_accessibilityLabelledBy}
861
+ accessibilityState={_accessibilityState}
859
862
  accessible={accessible}
860
863
  acceptDragAndDropTypes={props.experimental_acceptDragAndDropTypes}
861
864
  autoCapitalize={autoCapitalize}
@@ -873,7 +876,7 @@ function InternalTextInput(props: TextInputProps): React.Node {
873
876
  /* $FlowFixMe[prop-missing] the types for AndroidTextInput don't match
874
877
  * up exactly with the props for TextInput. This will need to get fixed
875
878
  */
876
- /* $FlowFixMe[incompatible-type-arg] the types for AndroidTextInput
879
+ /* $FlowFixMe[incompatible-type] the types for AndroidTextInput
877
880
  * don't match up exactly with the props for TextInput. This will need
878
881
  * to get fixed */
879
882
  onScroll={_onScroll}
@@ -9,8 +9,7 @@ import requireNativeComponent from '../../ReactNative/requireNativeComponent';
9
9
  import codegenNativeCommands from '../../Utilities/codegenNativeCommands';
10
10
  import type {TextInputNativeCommands} from './TextInputNativeCommands';
11
11
 
12
- // $FlowFixMe[incompatible-type-arg]
13
- type NativeType = HostComponent<mixed>;
12
+ type NativeType = HostComponent<{...}>;
14
13
 
15
14
  type NativeCommands = TextInputNativeCommands<NativeType>;
16
15
 
@@ -20,7 +19,7 @@ export const Commands: NativeCommands = codegenNativeCommands<NativeCommands>({
20
19
 
21
20
  const WindowsTextInputComponent: NativeType =
22
21
  // $FlowFixMe[incompatible-call]
23
- requireNativeComponent<mixed>('RCTTextInput');
22
+ requireNativeComponent<{...}>('RCTTextInput');
24
23
 
25
24
  export default WindowsTextInputComponent;
26
25
  // [Windows]
@@ -282,6 +282,6 @@ export default function TouchableWithoutFeedback(
282
282
  }
283
283
  }
284
284
 
285
- // $FlowFixMe[incompatible-call]
285
+ // $FlowFixMe[incompatible-type]
286
286
  return cloneElement(element, elementProps, ...children);
287
287
  }
@@ -194,7 +194,8 @@ const View: component(
194
194
  if (React.isValidElement(child)) {
195
195
  // $FlowFixMe[incompatible-use]
196
196
  if (child.props.children) {
197
- // $FlowFixMe[incompatible-call]
197
+ // $FlowFixMe[incompatible-call] - React.Children.map types child as mixed
198
+ // $FlowFixMe[incompatible-type]
198
199
  return React.cloneElement(child, {
199
200
  accessible: false,
200
201
  children: childrenWithImportantForAccessibility(
@@ -203,6 +204,7 @@ const View: component(
203
204
  });
204
205
  } else {
205
206
  // $FlowFixMe[incompatible-call]
207
+ // $FlowFixMe[incompatible-type]
206
208
  return React.cloneElement(child, {accessible: false});
207
209
  }
208
210
  }
@@ -103,7 +103,7 @@ function asyncRequest(
103
103
  ),
104
104
  );
105
105
  } else {
106
- //$FlowFixMe[incompatible-call]
106
+ //$FlowFixMe[incompatible-type]
107
107
  resolve({body: responseText, headers});
108
108
  }
109
109
  }
@@ -103,7 +103,7 @@ function asyncRequest(
103
103
  ),
104
104
  );
105
105
  } else {
106
- //$FlowFixMe[incompatible-call]
106
+ //$FlowFixMe[incompatible-type]
107
107
  resolve({body: responseText, headers});
108
108
  }
109
109
  }
@@ -169,7 +169,7 @@ function handleException(e: mixed, isFatal: boolean) {
169
169
  inExceptionHandler = true;
170
170
  /* $FlowFixMe[class-object-subtyping] added when improving typing for this
171
171
  * parameters */
172
- // $FlowFixMe[incompatible-call]
172
+ // $FlowFixMe[incompatible-type]
173
173
  reportException(error, isFatal, reportToConsole);
174
174
  } finally {
175
175
  inExceptionHandler = false;
@@ -259,7 +259,7 @@ function reactConsoleErrorHandler(...args) {
259
259
  reportException(
260
260
  /* $FlowFixMe[class-object-subtyping] added when improving typing for this
261
261
  * parameters */
262
- // $FlowFixMe[incompatible-call]
262
+ // $FlowFixMe[incompatible-type]
263
263
  error,
264
264
  isFatal,
265
265
  reportToConsole,
@@ -32,17 +32,17 @@ const ReactFiberErrorDialog = {
32
32
  if (errorValue instanceof Error) {
33
33
  /* $FlowFixMe[class-object-subtyping] added when improving typing for
34
34
  * this parameters */
35
- // $FlowFixMe[incompatible-cast]
35
+ // $FlowFixMe[incompatible-type]
36
36
  error = (errorValue: ExtendedError);
37
37
  } else if (typeof errorValue === 'string') {
38
38
  /* $FlowFixMe[class-object-subtyping] added when improving typing for
39
39
  * this parameters */
40
- // $FlowFixMe[incompatible-cast]
40
+ // $FlowFixMe[incompatible-type]
41
41
  error = (new SyntheticError(errorValue): ExtendedError);
42
42
  } else {
43
43
  /* $FlowFixMe[class-object-subtyping] added when improving typing for
44
44
  * this parameters */
45
- // $FlowFixMe[incompatible-cast]
45
+ // $FlowFixMe[incompatible-type]
46
46
  error = (new SyntheticError('Unspecified error'): ExtendedError);
47
47
  }
48
48
  try {
@@ -29,7 +29,7 @@ export default class ReactNativeVersion {
29
29
  static major: number = 0;
30
30
  static minor: number = 82;
31
31
  static patch: number = 0;
32
- static prerelease: string | null = 'nightly-20250806-5936f29d6';
32
+ static prerelease: string | null = 'nightly-20250821-0ef21bf8a';
33
33
 
34
34
  static getVersionString(): string {
35
35
  return `${this.major}.${this.minor}.${this.patch}${this.prerelease != null ? `-${this.prerelease}` : ''}`;
@@ -473,7 +473,7 @@ let ExportedJSTimers: {
473
473
 
474
474
  if (!NativeTiming) {
475
475
  console.warn("Timing native module is not available, can't set timers.");
476
- // $FlowFixMe[prop-missing] : we can assume timers are generally available
476
+ // $FlowFixMe[incompatible-type] : we can assume timers are generally available
477
477
  ExportedJSTimers = ({
478
478
  callReactNativeMicrotasks: JSTimers.callReactNativeMicrotasks,
479
479
  queueReactNativeMicrotask: JSTimers.queueReactNativeMicrotask,
@@ -40,7 +40,7 @@ export function setImmediate(callback: Function, ...args: any): number {
40
40
  clearedImmediates.delete(id);
41
41
  }
42
42
 
43
- // $FlowFixMe[incompatible-call]
43
+ // $FlowFixMe[incompatible-type]
44
44
  global.queueMicrotask(() => {
45
45
  if (!clearedImmediates.has(id)) {
46
46
  callback.apply(undefined, args);
@@ -98,13 +98,13 @@ class DebuggingOverlayRegistry {
98
98
  // `canonical.publicInstance` => Fabric
99
99
  // $FlowExpectedError[prop-missing]
100
100
  if (instanceHandle.canonical?.publicInstance != null) {
101
- // $FlowExpectedError[incompatible-return]
101
+ // $FlowExpectedError[incompatible-type]
102
102
  return instanceHandle.canonical?.publicInstance;
103
103
  }
104
104
 
105
105
  // `canonical` => Legacy Fabric
106
106
  if (instanceHandle.canonical != null) {
107
- // $FlowFixMe[incompatible-return]
107
+ // $FlowFixMe[incompatible-type]
108
108
  return instanceHandle.canonical;
109
109
  }
110
110
 
@@ -124,6 +124,8 @@ class DebuggingOverlayRegistry {
124
124
  let iterator: ?ReadOnlyElement = instance;
125
125
  while (iterator != null) {
126
126
  for (const subscriber of this.#registry) {
127
+ /* $FlowFixMe[invalid-compare] Error discovered during Constant
128
+ * Condition roll out. See https://fburl.com/workplace/4oq3zi07. */
127
129
  if (subscriber.rootViewRef.current === iterator) {
128
130
  return subscriber;
129
131
  }
@@ -182,7 +184,7 @@ class DebuggingOverlayRegistry {
182
184
 
183
185
  if (
184
186
  isChildPublicInstance(
185
- // $FlowFixMe[incompatible-call] There is a lot of stuff to untangle to make types for refs work.
187
+ // $FlowFixMe[incompatible-type] There is a lot of stuff to untangle to make types for refs work.
186
188
  potentialParent.rootViewRef.current,
187
189
  // $FlowFixMe[incompatible-call] There is a lot of stuff to untangle to make types for refs work.
188
190
  potentialChild.rootViewRef.current,