@office-iss/react-native-win32 0.84.0 → 0.85.0-preview.1

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 (310) hide show
  1. package/.eslintignore +1 -0
  2. package/.flowconfig +1 -5
  3. package/CHANGELOG.json +67 -22
  4. package/CHANGELOG.md +14 -17
  5. package/IntegrationTests/IntegrationTestHarnessTest.js +1 -1
  6. package/IntegrationTests/LayoutEventsTest.js +1 -1
  7. package/IntegrationTests/TimersTest.js +1 -1
  8. package/Libraries/ActionSheetIOS/ActionSheetIOS.js +3 -3
  9. package/Libraries/Animated/Animated.d.ts +8 -1
  10. package/Libraries/Animated/AnimatedEvent.js +4 -4
  11. package/Libraries/Animated/AnimatedImplementation.js +2 -2
  12. package/Libraries/Animated/animations/Animation.js +3 -3
  13. package/Libraries/Animated/animations/DecayAnimation.js +4 -4
  14. package/Libraries/Animated/animations/SpringAnimation.js +5 -5
  15. package/Libraries/Animated/animations/TimingAnimation.js +5 -5
  16. package/Libraries/Animated/createAnimatedComponent.js +7 -7
  17. package/Libraries/Animated/nodes/AnimatedColor.js +2 -2
  18. package/Libraries/Animated/nodes/AnimatedInterpolation.js +12 -12
  19. package/Libraries/Animated/nodes/AnimatedNode.js +3 -3
  20. package/Libraries/Animated/nodes/AnimatedObject.js +3 -3
  21. package/Libraries/Animated/nodes/AnimatedProps.js +6 -6
  22. package/Libraries/Animated/nodes/AnimatedStyle.js +7 -7
  23. package/Libraries/Animated/nodes/AnimatedTransform.js +13 -13
  24. package/Libraries/Animated/nodes/AnimatedValue.js +1 -1
  25. package/Libraries/Animated/nodes/AnimatedValueXY.js +1 -1
  26. package/Libraries/Animated/nodes/AnimatedWithChildren.js +1 -1
  27. package/Libraries/Animated/useAnimatedColor.d.ts +15 -0
  28. package/Libraries/Animated/useAnimatedColor.js +25 -0
  29. package/Libraries/Animated/useAnimatedValueXY.d.ts +15 -0
  30. package/Libraries/Animated/useAnimatedValueXY.js +26 -0
  31. package/Libraries/AppState/AppState.js +1 -1
  32. package/Libraries/BatchedBridge/MessageQueue.js +3 -3
  33. package/Libraries/BatchedBridge/NativeModules.js +12 -10
  34. package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.js +30 -26
  35. package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.win32.js +34 -30
  36. package/Libraries/Components/ActivityIndicator/ActivityIndicator.js +2 -2
  37. package/Libraries/Components/Button.js +2 -2
  38. package/Libraries/Components/Button.win32.js +2 -2
  39. package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroidTypes.js +2 -2
  40. package/Libraries/Components/EnterString.win32.js +2 -2
  41. package/Libraries/Components/EnterString.win32.js.map +1 -1
  42. package/Libraries/Components/Keyboard/Keyboard.js +6 -6
  43. package/Libraries/Components/Keyboard/KeyboardAvoidingView.js +1 -1
  44. package/Libraries/Components/LayoutConformance/LayoutConformance.js +1 -1
  45. package/Libraries/Components/LayoutConformance/LayoutConformanceNativeComponent.js +1 -1
  46. package/Libraries/Components/Pressable/Pressable.d.ts +5 -0
  47. package/Libraries/Components/Pressable/Pressable.js +3 -3
  48. package/Libraries/Components/Pressable/Pressable.win32.js +3 -3
  49. package/Libraries/Components/Pressable/useAndroidRippleForView.js +4 -4
  50. package/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.js +1 -1
  51. package/Libraries/Components/ProgressBarAndroid/ProgressBarAndroidTypes.js +3 -3
  52. package/Libraries/Components/RefreshControl/RefreshControl.js +5 -5
  53. package/Libraries/Components/ScrollView/AndroidHorizontalScrollViewNativeComponent.js +8 -12
  54. package/Libraries/Components/ScrollView/ScrollView.d.ts +9 -0
  55. package/Libraries/Components/ScrollView/ScrollView.js +19 -9
  56. package/Libraries/Components/ScrollView/ScrollViewNativeComponent.js +8 -18
  57. package/Libraries/Components/ScrollView/ScrollViewNativeComponentType.js +4 -3
  58. package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +1 -1
  59. package/Libraries/Components/StaticRenderer.js +1 -1
  60. package/Libraries/Components/StatusBar/StatusBar.js +8 -8
  61. package/Libraries/Components/Switch/Switch.js +3 -3
  62. package/Libraries/Components/TextInput/AndroidTextInputNativeComponent.js +33 -48
  63. package/Libraries/Components/TextInput/InputAccessoryView.js +1 -1
  64. package/Libraries/Components/TextInput/RCTTextInputViewConfig.js +6 -11
  65. package/Libraries/Components/TextInput/TextInput.flow.js +21 -20
  66. package/Libraries/Components/TextInput/TextInput.flow.win32.js +23 -22
  67. package/Libraries/Components/TextInput/TextInput.js +8 -4
  68. package/Libraries/Components/TextInput/TextInput.win32.js +3 -4
  69. package/Libraries/Components/Touchable/PooledClass.js +1 -1
  70. package/Libraries/Components/Touchable/Touchable.js +2 -2
  71. package/Libraries/Components/Touchable/Touchable.win32.js +2 -2
  72. package/Libraries/Components/Touchable/TouchableBounce.js +4 -4
  73. package/Libraries/Components/Touchable/TouchableHighlight.js +8 -8
  74. package/Libraries/Components/Touchable/TouchableNativeFeedback.js +7 -7
  75. package/Libraries/Components/Touchable/TouchableNativeFeedback.win32.js +7 -7
  76. package/Libraries/Components/Touchable/TouchableOpacity.js +4 -4
  77. package/Libraries/Components/Touchable/TouchableWin32.js +1 -1
  78. package/Libraries/Components/Touchable/TouchableWin32.js.map +1 -1
  79. package/Libraries/Components/Touchable/TouchableWithoutFeedback.js +1 -1
  80. package/Libraries/Components/UnimplementedViews/UnimplementedView.js +1 -1
  81. package/Libraries/Components/View/ReactNativeStyleAttributes.js +68 -31
  82. package/Libraries/Components/View/ViewAccessibility.js +7 -7
  83. package/Libraries/Components/View/ViewAccessibility.win32.js +7 -7
  84. package/Libraries/Components/View/ViewPropTypes.js +14 -14
  85. package/Libraries/Components/View/ViewPropTypes.win32.js +16 -16
  86. package/Libraries/Core/Devtools/parseHermesStack.js +8 -8
  87. package/Libraries/Core/Devtools/symbolicateStackTrace.js +2 -2
  88. package/Libraries/Core/ExceptionsManager.js +2 -2
  89. package/Libraries/Core/ExtendedError.js +3 -3
  90. package/Libraries/Core/RawEventEmitter.js +1 -1
  91. package/Libraries/Core/ReactNativeVersion.js +2 -2
  92. package/Libraries/Core/Timers/JSTimers.js +3 -2
  93. package/Libraries/Core/setUpDeveloperTools.js +1 -1
  94. package/Libraries/Core/setUpErrorHandling.js +4 -2
  95. package/Libraries/Core/setUpReactDevTools.js +23 -6
  96. package/Libraries/Core/setUpSegmentFetcher.js +1 -1
  97. package/Libraries/Debugging/DebuggingOverlay.js +2 -2
  98. package/Libraries/EventEmitter/NativeEventEmitter.js +7 -9
  99. package/Libraries/EventEmitter/RCTDeviceEventEmitter.js +1 -1
  100. package/Libraries/Image/AssetSourceResolver.js +1 -1
  101. package/Libraries/Image/Image.android.js +172 -306
  102. package/Libraries/Image/ImageProps.js +9 -11
  103. package/Libraries/Image/ImageSource.js +2 -2
  104. package/Libraries/Image/ImageSourceUtils.js +8 -4
  105. package/Libraries/Image/ImageTypes.flow.js +2 -2
  106. package/Libraries/Image/ImageViewNativeComponent.js +7 -16
  107. package/Libraries/Image/nativeImageSource.js +1 -1
  108. package/Libraries/Interaction/InteractionManager.js +5 -4
  109. package/Libraries/Interaction/PanResponder.js +1 -1
  110. package/Libraries/LayoutAnimation/LayoutAnimation.js +2 -2
  111. package/Libraries/Linking/Linking.js +1 -1
  112. package/Libraries/Lists/FlatList.js +3 -3
  113. package/Libraries/Lists/SectionList.js +1 -1
  114. package/Libraries/Lists/SectionListModern.js +2 -2
  115. package/Libraries/LogBox/Data/LogBoxData.js +38 -24
  116. package/Libraries/LogBox/Data/LogBoxLog.js +43 -112
  117. package/Libraries/LogBox/Data/parseLogBoxLog.js +21 -117
  118. package/Libraries/LogBox/LogBox.js +42 -19
  119. package/Libraries/LogBox/LogBoxInspectorContainer.js +2 -2
  120. package/Libraries/LogBox/LogBoxNotificationContainer.js +2 -2
  121. package/Libraries/LogBox/UI/LogBoxButton.js +14 -16
  122. package/Libraries/LogBox/UI/LogBoxInspector.js +2 -2
  123. package/Libraries/LogBox/UI/LogBoxInspectorCodeFrame.js +6 -9
  124. package/Libraries/LogBox/UI/LogBoxInspectorCodeFrame.win32.js +6 -9
  125. package/Libraries/LogBox/UI/LogBoxInspectorFooter.js +1 -1
  126. package/Libraries/LogBox/UI/LogBoxInspectorFooterButton.js +1 -1
  127. package/Libraries/LogBox/UI/LogBoxInspectorHeader.js +1 -1
  128. package/Libraries/LogBox/UI/LogBoxInspectorHeader.win32.js +1 -1
  129. package/Libraries/LogBox/UI/LogBoxInspectorHeaderButton.js +1 -1
  130. package/Libraries/LogBox/UI/LogBoxInspectorMessageHeader.js +10 -15
  131. package/Libraries/LogBox/UI/LogBoxInspectorReactFrames.js +25 -18
  132. package/Libraries/LogBox/UI/LogBoxInspectorReactFrames.win32.js +15 -16
  133. package/Libraries/LogBox/UI/LogBoxInspectorSection.js +5 -7
  134. package/Libraries/LogBox/UI/LogBoxInspectorSourceMapStatus.js +8 -10
  135. package/Libraries/LogBox/UI/LogBoxInspectorSourceMapStatus.win32.js +11 -13
  136. package/Libraries/LogBox/UI/LogBoxInspectorStackFrame.js +8 -6
  137. package/Libraries/LogBox/UI/LogBoxInspectorStackFrame.win32.js +3 -5
  138. package/Libraries/LogBox/UI/LogBoxInspectorStackFrames.js +17 -29
  139. package/Libraries/LogBox/UI/LogBoxMessage.js +28 -37
  140. package/Libraries/LogBox/UI/LogBoxNotification.js +1 -1
  141. package/Libraries/Modal/Modal.js +3 -3
  142. package/Libraries/NativeComponent/BaseViewConfig.android.js +28 -52
  143. package/Libraries/NativeComponent/BaseViewConfig.ios.js +19 -21
  144. package/Libraries/NativeComponent/BaseViewConfig.win32.js +16 -16
  145. package/Libraries/Network/RCTNetworking.android.js +1 -1
  146. package/Libraries/Network/RCTNetworking.ios.js +1 -1
  147. package/Libraries/Network/RCTNetworking.js.flow +1 -1
  148. package/Libraries/Network/RCTNetworking.win32.js +1 -1
  149. package/Libraries/Network/RCTNetworkingEventDefinitions.flow.js +1 -1
  150. package/Libraries/Network/XMLHttpRequest.js +1 -1
  151. package/Libraries/PermissionsAndroid/PermissionsAndroid.js +3 -3
  152. package/Libraries/Pressability/Pressability.js +5 -5
  153. package/Libraries/Pressability/Pressability.win32.js +5 -5
  154. package/Libraries/Pressability/PressabilityDebug.js +1 -1
  155. package/Libraries/Pressability/PressabilityPerformanceEventEmitter.js +1 -1
  156. package/Libraries/Pressability/usePressability.js +3 -14
  157. package/Libraries/PushNotificationIOS/PushNotificationIOS.js +2 -2
  158. package/Libraries/ReactNative/AppContainer-dev.js +18 -1
  159. package/Libraries/ReactNative/AppContainer.js +1 -1
  160. package/Libraries/ReactNative/AppRegistry.flow.js +2 -2
  161. package/Libraries/ReactNative/AppRegistryImpl.js +2 -2
  162. package/Libraries/ReactNative/FabricUIManager.js +1 -1
  163. package/Libraries/ReactNative/RendererImplementation.js +4 -4
  164. package/Libraries/ReactNative/UIManagerProperties.js +1 -1
  165. package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +3 -2
  166. package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +3 -2
  167. package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js +3 -2
  168. package/Libraries/Renderer/shims/ReactFabric.js +1 -3
  169. package/Libraries/Renderer/shims/ReactFeatureFlags.js +1 -3
  170. package/Libraries/Renderer/shims/ReactNative.js +3 -2
  171. package/Libraries/Renderer/shims/ReactNativeTypes.js +1 -3
  172. package/Libraries/Renderer/shims/ReactNativeTypes.win32.js +1 -3
  173. package/Libraries/Renderer/shims/ReactNativeViewConfigRegistry.js +1 -3
  174. package/Libraries/Renderer/shims/createReactNativeComponentClass.js +1 -3
  175. package/Libraries/StyleSheet/PointPropType.js +1 -1
  176. package/Libraries/StyleSheet/Rect.js +1 -1
  177. package/Libraries/StyleSheet/StyleSheet.d.ts +0 -5
  178. package/Libraries/StyleSheet/StyleSheet.js +1 -1
  179. package/Libraries/StyleSheet/StyleSheet.js.flow +1 -1
  180. package/Libraries/StyleSheet/StyleSheetExports.js +16 -25
  181. package/Libraries/StyleSheet/StyleSheetExports.js.flow +2 -7
  182. package/Libraries/StyleSheet/StyleSheetTypes.js +33 -35
  183. package/Libraries/StyleSheet/private/_StyleSheetTypesOverrides.js +5 -5
  184. package/Libraries/StyleSheet/private/_TransformStyle.js +7 -7
  185. package/Libraries/StyleSheet/processBackgroundImage.js +7 -7
  186. package/Libraries/StyleSheet/processBackgroundPosition.js +4 -4
  187. package/Libraries/StyleSheet/processBackgroundRepeat.js +4 -4
  188. package/Libraries/StyleSheet/processBackgroundSize.js +4 -4
  189. package/Libraries/StyleSheet/processBoxShadow.js +44 -4
  190. package/Libraries/StyleSheet/processColorArray.js +2 -2
  191. package/Libraries/StyleSheet/processFilter.js +2 -2
  192. package/Libraries/Text/Text.js +295 -627
  193. package/Libraries/Text/Text.win32.js +360 -744
  194. package/Libraries/Text/TextNativeComponent.js +14 -7
  195. package/Libraries/Text/TextNativeComponent.win32.js +14 -7
  196. package/Libraries/Text/TextProps.js +4 -4
  197. package/Libraries/Text/TextProps.win32.js +4 -4
  198. package/Libraries/Types/CodegenTypes.js +1 -1
  199. package/Libraries/Types/CoreEventTypes.js +21 -21
  200. package/Libraries/Types/CoreEventTypes.win32.js +22 -21
  201. package/Libraries/Types/ReactDevToolsTypes.js +2 -2
  202. package/Libraries/Utilities/Appearance.js +6 -1
  203. package/Libraries/Utilities/Dimensions.js +1 -1
  204. package/Libraries/Utilities/Dimensions.win32.js +1 -1
  205. package/Libraries/Utilities/HMRClient.js +32 -5
  206. package/Libraries/Utilities/IPerformanceLogger.js +4 -4
  207. package/Libraries/Utilities/codegenNativeCommands.js +4 -4
  208. package/Libraries/Utilities/codegenNativeComponent.d.ts +2 -0
  209. package/Libraries/Utilities/codegenNativeComponent.js +2 -2
  210. package/Libraries/Utilities/logError.js +1 -1
  211. package/Libraries/Utilities/stringifySafe.js +3 -3
  212. package/Libraries/Utilities/useMergeRefs.js +2 -2
  213. package/Libraries/vendor/core/ErrorUtils.js +4 -4
  214. package/Libraries/vendor/emitter/EventEmitter.js +16 -20
  215. package/flow/bom.js.flow +18 -17
  216. package/flow/dom.js.flow +12 -5
  217. package/flow/global.js +1 -1
  218. package/index.js +9 -0
  219. package/index.win32.js +9 -0
  220. package/index.win32.js.flow +8 -1
  221. package/jest/RefreshControlMock.js +2 -2
  222. package/jest/assetFileTransformer.js +8 -3
  223. package/jest/mockComponent.js +3 -4
  224. package/jest/mockNativeComponent.js +1 -1
  225. package/jest/mocks/ActivityIndicator.js +2 -2
  226. package/jest/mocks/Image.js +2 -2
  227. package/jest/mocks/Modal.js +2 -2
  228. package/jest/mocks/RefreshControl.js +3 -3
  229. package/jest/mocks/RendererProxy.js +2 -2
  230. package/jest/mocks/ScrollView.js +5 -5
  231. package/jest/mocks/Text.js +2 -2
  232. package/jest/mocks/TextInput.js +2 -2
  233. package/jest/mocks/View.js +2 -2
  234. package/jest/mocks/ViewNativeComponent.js +1 -1
  235. package/jest/mocks/requireNativeComponent.js +1 -1
  236. package/jest/mocks/useColorScheme.js +1 -1
  237. package/jest/setup.js +68 -31
  238. package/overrides.json +30 -36
  239. package/package.json +22 -19
  240. package/src/private/animated/NativeAnimatedHelper.js +2 -2
  241. package/src/private/animated/NativeAnimatedHelper.win32.js +2 -2
  242. package/src/private/animated/createAnimatedPropsMemoHook.js +19 -19
  243. package/src/private/components/virtualview/VirtualView.js +14 -21
  244. package/src/private/components/virtualview/VirtualViewExperimentalNativeComponent.js +11 -10
  245. package/src/private/components/virtualview/VirtualViewNativeComponent.js +4 -4
  246. package/src/private/devsupport/devmenu/elementinspector/BorderBox.js +2 -2
  247. package/src/private/devsupport/devmenu/elementinspector/BoxInspector.js +3 -3
  248. package/src/private/devsupport/devmenu/elementinspector/ElementBox.js +4 -4
  249. package/src/private/devsupport/devmenu/elementinspector/ElementProperties.js +1 -1
  250. package/src/private/devsupport/devmenu/elementinspector/Inspector.js +39 -17
  251. package/src/private/devsupport/devmenu/elementinspector/InspectorOverlay.js +15 -3
  252. package/src/private/devsupport/devmenu/elementinspector/InspectorPanel.js +2 -2
  253. package/src/private/devsupport/devmenu/elementinspector/ReactDevToolsOverlay.js +2 -8
  254. package/src/private/devsupport/devmenu/elementinspector/StyleInspector.js +1 -1
  255. package/src/private/devsupport/devmenu/elementinspector/resolveBoxStyle.js +1 -1
  256. package/src/private/devsupport/devmenu/elementinspector/useExternalInspection.js +102 -0
  257. package/src/private/devsupport/rndevtools/FuseboxSessionObserver.js +12 -25
  258. package/src/private/devsupport/rndevtools/GlobalStateObserver.js +56 -0
  259. package/src/private/devsupport/rndevtools/TracingStateObserver.js +28 -0
  260. package/src/private/featureflags/ReactNativeFeatureFlags.js +71 -79
  261. package/src/private/featureflags/ReactNativeFeatureFlagsBase.js +2 -2
  262. package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +14 -12
  263. package/src/private/setup/setUpDefaultReactNativeEnvironment.js +6 -0
  264. package/src/private/specs_DEPRECATED/components/ActivityIndicatorViewNativeComponent.js +1 -1
  265. package/src/private/specs_DEPRECATED/components/AndroidDrawerLayoutNativeComponent.js +3 -3
  266. package/src/private/specs_DEPRECATED/components/AndroidHorizontalScrollContentViewNativeComponent.js +1 -1
  267. package/src/private/specs_DEPRECATED/components/AndroidSwipeRefreshLayoutNativeComponent.js +2 -2
  268. package/src/private/specs_DEPRECATED/components/AndroidSwitchNativeComponent.js +2 -2
  269. package/src/private/specs_DEPRECATED/components/DebuggingOverlayNativeComponent.js +3 -3
  270. package/src/private/specs_DEPRECATED/components/ProgressBarAndroidNativeComponent.js +1 -1
  271. package/src/private/specs_DEPRECATED/components/PullToRefreshViewNativeComponent.js +1 -1
  272. package/src/private/specs_DEPRECATED/components/RCTInputAccessoryViewNativeComponent.js +1 -1
  273. package/src/private/specs_DEPRECATED/components/RCTModalHostViewNativeComponent.js +3 -3
  274. package/src/private/specs_DEPRECATED/components/RCTSafeAreaViewNativeComponent.js +1 -1
  275. package/src/private/specs_DEPRECATED/components/SwitchNativeComponent.js +2 -2
  276. package/src/private/specs_DEPRECATED/components/UnimplementedNativeViewNativeComponent.js +1 -1
  277. package/src/private/specs_DEPRECATED/modules/NativeImageLoaderIOS.js +1 -1
  278. package/src/private/styles/composeStyles.js +1 -1
  279. package/src/private/utilities/toError.js +27 -0
  280. package/src/private/utilities/toExtendedError.js +30 -0
  281. package/src/private/webapis/dom/events/Event.js +1 -1
  282. package/src/private/webapis/dom/events/EventHandlerAttributes.js +2 -2
  283. package/src/private/webapis/dom/events/EventTarget.js +3 -3
  284. package/src/private/webapis/dom/events/internals/EventInternals.js +2 -2
  285. package/src/private/webapis/dom/nodes/ReadOnlyElement.js +1 -1
  286. package/src/private/webapis/dom/nodes/ReadOnlyNode.js +2 -2
  287. package/src/private/webapis/dom/nodes/specs/NativeDOM.js +14 -14
  288. package/src/private/webapis/dom/oldstylecollections/HTMLCollection.js +2 -2
  289. package/src/private/webapis/dom/oldstylecollections/NodeList.js +2 -2
  290. package/src/private/webapis/geometry/DOMRectList.js +2 -2
  291. package/src/private/webapis/intersectionobserver/IntersectionObserver.js +8 -8
  292. package/src/private/webapis/intersectionobserver/specs/NativeIntersectionObserver.js +6 -6
  293. package/src/private/webapis/mutationobserver/MutationObserver.js +2 -2
  294. package/src/private/webapis/mutationobserver/MutationRecord.js +2 -2
  295. package/src/private/webapis/mutationobserver/internals/MutationObserverManager.js +1 -1
  296. package/src/private/webapis/mutationobserver/specs/NativeMutationObserver.js +3 -3
  297. package/src/private/webapis/performance/LongTasks.js +3 -3
  298. package/src/private/webapis/performance/Performance.js +4 -4
  299. package/src/private/webapis/performance/PerformanceEntry.js +1 -1
  300. package/src/private/webapis/performance/PerformanceObserver.js +2 -2
  301. package/src/private/webapis/performance/specs/NativePerformance.js +8 -8
  302. package/src/private/webapis/structuredClone/structuredClone.js +2 -2
  303. package/src/types/globals.d.ts +4 -4
  304. package/src-win/Libraries/Components/EnterString.win32.tsx +2 -2
  305. package/src-win/Libraries/Components/Touchable/TouchableWin32.tsx +14 -14
  306. package/src-win/index.win32.js.flow +8 -1
  307. package/types/index.d.ts +2 -0
  308. package/Libraries/Components/View/ReactNativeViewAttributes.js +0 -60
  309. package/Libraries/Components/View/ReactNativeViewAttributes.win32.js +0 -94
  310. package/Libraries/Image/TextInlineImageNativeComponent.js +0 -49
@@ -16,11 +16,11 @@ import requireNativeComponent from '../../Libraries/ReactNative/requireNativeCom
16
16
  import UIManager from '../ReactNative/UIManager';
17
17
 
18
18
  // TODO: import from CodegenSchema once workspaces are enabled
19
- type NativeComponentOptions = $ReadOnly<{
19
+ type NativeComponentOptions = Readonly<{
20
20
  interfaceOnly?: boolean,
21
21
  paperComponentName?: string,
22
22
  paperComponentNameDeprecated?: string,
23
- excludedPlatforms?: $ReadOnlyArray<'iOS' | 'android'>,
23
+ excludedPlatforms?: ReadonlyArray<'iOS' | 'android'>,
24
24
  }>;
25
25
 
26
26
  export type NativeComponentType<T: {...}> = HostComponent<T>;
@@ -15,7 +15,7 @@
15
15
  * `console.error` as a failure callback - it's not properly bound. If passes an
16
16
  * `Error` object, it will print the message and stack.
17
17
  */
18
- const logError = function (...args: $ReadOnlyArray<unknown>) {
18
+ const logError = function (...args: ReadonlyArray<unknown>) {
19
19
  if (args.length === 1 && args[0] instanceof Error) {
20
20
  const err = args[0];
21
21
  console.error('Error: "' + err.message + '". Stack:\n' + err.stack);
@@ -84,7 +84,7 @@ export function createStringifySafeWithLimits(limits: {
84
84
  } else if (typeof arg === 'function') {
85
85
  try {
86
86
  return arg.toString();
87
- } catch (e) {
87
+ } catch {
88
88
  return '[function unknown]';
89
89
  }
90
90
  } else if (arg instanceof Error) {
@@ -98,12 +98,12 @@ export function createStringifySafeWithLimits(limits: {
98
98
  return '["' + typeof arg + '" failed to stringify]';
99
99
  }
100
100
  return ret;
101
- } catch (e) {
101
+ } catch {
102
102
  if (typeof arg.toString === 'function') {
103
103
  try {
104
104
  // $FlowFixMe[incompatible-use] : toString shouldn't take any arguments in general.
105
105
  return arg.toString();
106
- } catch (E) {}
106
+ } catch {}
107
107
  }
108
108
  }
109
109
  }
@@ -22,11 +22,11 @@ import {useCallback} from 'react';
22
22
  * lead to problems with the given refs being invoked more times than desired.
23
23
  */
24
24
  export default function useMergeRefs<Instance>(
25
- ...refs: $ReadOnlyArray<?React.RefSetter<Instance>>
25
+ ...refs: ReadonlyArray<?React.RefSetter<Instance>>
26
26
  ): React.RefSetter<Instance> {
27
27
  const refEffect = useCallback(
28
28
  (current: Instance) => {
29
- const cleanups: $ReadOnlyArray<void | (() => void)> = refs.map(ref => {
29
+ const cleanups: ReadonlyArray<void | (() => void)> = refs.map(ref => {
30
30
  if (ref == null) {
31
31
  return undefined;
32
32
  } else {
@@ -10,22 +10,22 @@
10
10
 
11
11
  // From @react-native/js-polyfills
12
12
  type ErrorHandler = (error: unknown, isFatal: boolean) => void;
13
- type Fn<Args: $ReadOnlyArray<unknown>, Return> = (...Args) => Return;
13
+ type Fn<Args: ReadonlyArray<unknown>, Return> = (...Args) => Return;
14
14
  export type ErrorUtils = {
15
- applyWithGuard<TArgs: $ReadOnlyArray<unknown>, TOut>(
15
+ applyWithGuard<TArgs: ReadonlyArray<unknown>, TOut>(
16
16
  fun: Fn<TArgs, TOut>,
17
17
  context?: unknown,
18
18
  args?: ?TArgs,
19
19
  unused_onError?: null,
20
20
  unused_name?: ?string,
21
21
  ): ?TOut,
22
- applyWithGuardIfNeeded<TArgs: $ReadOnlyArray<unknown>, TOut>(
22
+ applyWithGuardIfNeeded<TArgs: ReadonlyArray<unknown>, TOut>(
23
23
  fun: Fn<TArgs, TOut>,
24
24
  context?: unknown,
25
25
  args?: ?TArgs,
26
26
  ): ?TOut,
27
27
  getGlobalHandler(): ErrorHandler,
28
- guard<TArgs: $ReadOnlyArray<unknown>, TOut>(
28
+ guard<TArgs: ReadonlyArray<unknown>, TOut>(
29
29
  fun: Fn<TArgs, TOut>,
30
30
  name?: ?string,
31
31
  context?: unknown,
@@ -16,22 +16,22 @@ export interface EventSubscription {
16
16
  }
17
17
 
18
18
  export interface IEventEmitter<
19
- TEventToArgsMap: $ReadOnly<Record<string, $ReadOnlyArray<UnsafeEventObject>>>,
19
+ TEventToArgsMap: Readonly<Record<string, ReadonlyArray<UnsafeEventObject>>>,
20
20
  > {
21
- addListener<TEvent: $Keys<TEventToArgsMap>>(
21
+ addListener<TEvent: keyof TEventToArgsMap>(
22
22
  eventType: TEvent,
23
23
  listener: (...args: TEventToArgsMap[TEvent]) => unknown,
24
24
  context?: unknown,
25
25
  ): EventSubscription;
26
26
 
27
- emit<TEvent: $Keys<TEventToArgsMap>>(
27
+ emit<TEvent: keyof TEventToArgsMap>(
28
28
  eventType: TEvent,
29
29
  ...args: TEventToArgsMap[TEvent]
30
30
  ): void;
31
31
 
32
- removeAllListeners<TEvent: $Keys<TEventToArgsMap>>(eventType?: ?TEvent): void;
32
+ removeAllListeners<TEvent: keyof TEventToArgsMap>(eventType?: ?TEvent): void;
33
33
 
34
- listenerCount<TEvent: $Keys<TEventToArgsMap>>(eventType: TEvent): number;
34
+ listenerCount<TEvent: keyof TEventToArgsMap>(eventType: TEvent): number;
35
35
  }
36
36
 
37
37
  interface Registration<TArgs> {
@@ -41,7 +41,7 @@ interface Registration<TArgs> {
41
41
  }
42
42
 
43
43
  type Registry<
44
- TEventToArgsMap: $ReadOnly<Record<string, $ReadOnlyArray<UnsafeEventObject>>>,
44
+ TEventToArgsMap: Readonly<Record<string, ReadonlyArray<UnsafeEventObject>>>,
45
45
  > = {
46
46
  [K in keyof TEventToArgsMap]: Set<Registration<TEventToArgsMap[K]>>,
47
47
  };
@@ -67,9 +67,9 @@ type Registry<
67
67
  *
68
68
  */
69
69
  export default class EventEmitter<
70
- TEventToArgsMap: $ReadOnly<
71
- Record<string, $ReadOnlyArray<UnsafeEventObject>>,
72
- > = $ReadOnly<Record<string, $ReadOnlyArray<UnsafeEventObject>>>,
70
+ TEventToArgsMap: Readonly<
71
+ Record<string, ReadonlyArray<UnsafeEventObject>>,
72
+ > = Readonly<Record<string, ReadonlyArray<UnsafeEventObject>>>,
73
73
  > implements IEventEmitter<TEventToArgsMap>
74
74
  {
75
75
  #registry: Registry<TEventToArgsMap>;
@@ -83,7 +83,7 @@ export default class EventEmitter<
83
83
  * Registers a listener that is called when the supplied event is emitted.
84
84
  * Returns a subscription that has a `remove` method to undo registration.
85
85
  */
86
- addListener<TEvent: $Keys<TEventToArgsMap>>(
86
+ addListener<TEvent: keyof TEventToArgsMap>(
87
87
  eventType: TEvent,
88
88
  listener: (...args: TEventToArgsMap[TEvent]) => unknown,
89
89
  context: unknown,
@@ -95,7 +95,7 @@ export default class EventEmitter<
95
95
  }
96
96
  const registrations = allocate<
97
97
  TEventToArgsMap,
98
- $Keys<TEventToArgsMap>,
98
+ keyof TEventToArgsMap,
99
99
  TEventToArgsMap[TEvent],
100
100
  >(this.#registry, eventType);
101
101
  const registration: Registration<TEventToArgsMap[TEvent]> = {
@@ -116,7 +116,7 @@ export default class EventEmitter<
116
116
  * If a listener modifies the listeners registered for the same event, those
117
117
  * changes will not be reflected in the current invocation of `emit`.
118
118
  */
119
- emit<TEvent: $Keys<TEventToArgsMap>>(
119
+ emit<TEvent: keyof TEventToArgsMap>(
120
120
  eventType: TEvent,
121
121
  ...args: TEventToArgsMap[TEvent]
122
122
  ): void {
@@ -126,7 +126,6 @@ export default class EventEmitter<
126
126
  // Copy `registrations` to take a snapshot when we invoke `emit`, in case
127
127
  // registrations are added or removed when listeners are invoked.
128
128
  for (const registration of Array.from(registrations)) {
129
- // $FlowFixMe[incompatible-type]
130
129
  registration.listener.apply(registration.context, args);
131
130
  }
132
131
  }
@@ -135,9 +134,7 @@ export default class EventEmitter<
135
134
  /**
136
135
  * Removes all registered listeners.
137
136
  */
138
- removeAllListeners<TEvent: $Keys<TEventToArgsMap>>(
139
- eventType?: ?TEvent,
140
- ): void {
137
+ removeAllListeners<TEvent: keyof TEventToArgsMap>(eventType?: ?TEvent): void {
141
138
  if (eventType == null) {
142
139
  // $FlowFixMe[incompatible-type]
143
140
  this.#registry = {};
@@ -149,7 +146,7 @@ export default class EventEmitter<
149
146
  /**
150
147
  * Returns the number of registered listeners for the supplied event.
151
148
  */
152
- listenerCount<TEvent: $Keys<TEventToArgsMap>>(eventType: TEvent): number {
149
+ listenerCount<TEvent: keyof TEventToArgsMap>(eventType: TEvent): number {
153
150
  const registrations: ?Set<Registration<TEventToArgsMap[TEvent]>> =
154
151
  this.#registry[eventType];
155
152
  return registrations == null ? 0 : registrations.size;
@@ -157,9 +154,8 @@ export default class EventEmitter<
157
154
  }
158
155
 
159
156
  function allocate<
160
- TEventToArgsMap: $ReadOnly<Record<string, $ReadOnlyArray<UnsafeEventObject>>>,
161
- TEvent: $Keys<TEventToArgsMap>,
162
- TEventArgs: TEventToArgsMap[TEvent],
157
+ TEventToArgsMap: Readonly<Record<string, ReadonlyArray<UnsafeEventObject>>>,
158
+ TEvent: keyof TEventToArgsMap,
163
159
  >(
164
160
  registry: Registry<TEventToArgsMap>,
165
161
  eventType: TEvent,
package/flow/bom.js.flow CHANGED
@@ -32,31 +32,31 @@ declare interface ConsoleTask {
32
32
  // $FlowExpectedError[libdef-override] Flow core definitions are incomplete.
33
33
  declare var console: {
34
34
  // Logging
35
- log(...data: $ReadOnlyArray<unknown>): void,
36
- trace(...data: $ReadOnlyArray<unknown>): void,
37
- debug(...data: $ReadOnlyArray<unknown>): void,
38
- info(...data: $ReadOnlyArray<unknown>): void,
39
- warn(...data: $ReadOnlyArray<unknown>): void,
40
- error(...data: $ReadOnlyArray<unknown>): void,
35
+ log(...data: ReadonlyArray<unknown>): void,
36
+ trace(...data: ReadonlyArray<unknown>): void,
37
+ debug(...data: ReadonlyArray<unknown>): void,
38
+ info(...data: ReadonlyArray<unknown>): void,
39
+ warn(...data: ReadonlyArray<unknown>): void,
40
+ error(...data: ReadonlyArray<unknown>): void,
41
41
 
42
42
  // Grouping
43
- group(...data: $ReadOnlyArray<unknown>): void,
44
- groupCollapsed(...data: $ReadOnlyArray<unknown>): void,
43
+ group(...data: ReadonlyArray<unknown>): void,
44
+ groupCollapsed(...data: ReadonlyArray<unknown>): void,
45
45
  groupEnd(): void,
46
46
 
47
47
  // Printing
48
48
  table(
49
49
  tabularData:
50
- | $ReadOnly<{[key: string]: unknown, ...}>
51
- | $ReadOnlyArray<$ReadOnly<{[key: string]: unknown, ...}>>
52
- | $ReadOnlyArray<$ReadOnlyArray<unknown>>,
50
+ | Readonly<{[key: string]: unknown, ...}>
51
+ | ReadonlyArray<Readonly<{[key: string]: unknown, ...}>>
52
+ | ReadonlyArray<ReadonlyArray<unknown>>,
53
53
  ): void,
54
- dir(...data: $ReadOnlyArray<unknown>): void,
55
- dirxml(...data: $ReadOnlyArray<unknown>): void,
54
+ dir(...data: ReadonlyArray<unknown>): void,
55
+ dirxml(...data: ReadonlyArray<unknown>): void,
56
56
  clear(): void,
57
57
 
58
58
  // Utilities
59
- assert(condition: unknown, ...data: $ReadOnlyArray<unknown>): void,
59
+ assert(condition: unknown, ...data: ReadonlyArray<unknown>): void,
60
60
 
61
61
  // Profiling
62
62
  profile(name?: string): void,
@@ -172,7 +172,7 @@ declare class TaskAttributionTiming extends PerformanceEntry {
172
172
 
173
173
  // https://w3c.github.io/longtasks/#sec-PerformanceLongTaskTiming
174
174
  declare class PerformanceLongTaskTiming extends PerformanceEntry {
175
- attribution: $ReadOnlyArray<TaskAttributionTiming>;
175
+ attribution: ReadonlyArray<TaskAttributionTiming>;
176
176
  }
177
177
 
178
178
  // https://www.w3.org/TR/user-timing/#extensions-performance-interface
@@ -609,12 +609,13 @@ declare class AbortController {
609
609
  }
610
610
 
611
611
  declare class AbortSignal extends EventTarget {
612
- abort(reason?: $FlowFixMe): AbortSignal;
612
+ static abort(reason?: $FlowFixMe): AbortSignal;
613
+ static any(signals: Iterable<AbortSignal>): AbortSignal;
613
614
  +aborted: boolean;
614
615
  onabort: (event: Event) => unknown;
615
616
  +reason: $FlowFixMe;
616
617
  throwIfAborted(): void;
617
- timeout(time: number): AbortSignal;
618
+ static timeout(time: number): AbortSignal;
618
619
  }
619
620
 
620
621
  declare function fetch(
package/flow/dom.js.flow CHANGED
@@ -58,7 +58,7 @@ declare type FilePropertyBag = {
58
58
  };
59
59
  declare class File extends Blob {
60
60
  constructor(
61
- fileBits: $ReadOnlyArray<string | BufferDataSource | Blob>,
61
+ fileBits: ReadonlyArray<string | BufferDataSource | Blob>,
62
62
  filename: string,
63
63
  options?: FilePropertyBag,
64
64
  ): void;
@@ -1216,7 +1216,7 @@ type ClipboardItemOptions = {
1216
1216
  };
1217
1217
 
1218
1218
  declare class ClipboardItem {
1219
- +types: $ReadOnlyArray<string>;
1219
+ +types: ReadonlyArray<string>;
1220
1220
  getType(type: string): Promise<Blob>;
1221
1221
  constructor(
1222
1222
  items: {[type: string]: ClipboardItemData},
@@ -1315,7 +1315,7 @@ declare class Node extends EventTarget {
1315
1315
  normalize(): void;
1316
1316
  removeChild<T: Node>(oldChild: T): T;
1317
1317
  replaceChild<T: Node>(newChild: Node, oldChild: T): T;
1318
- replaceChildren(...nodes: $ReadOnlyArray<Node | string>): void;
1318
+ replaceChildren(...nodes: ReadonlyArray<Node | string>): void;
1319
1319
  static ATTRIBUTE_NODE: number;
1320
1320
  static CDATA_SECTION_NODE: number;
1321
1321
  static COMMENT_NODE: number;
@@ -3797,7 +3797,7 @@ declare class CanvasRenderingContext2D {
3797
3797
  y: number,
3798
3798
  w: number,
3799
3799
  h: number,
3800
- radii?: number | DOMPointInit | $ReadOnlyArray<number | DOMPointInit>,
3800
+ radii?: number | DOMPointInit | ReadonlyArray<number | DOMPointInit>,
3801
3801
  ): void;
3802
3802
  strokeRect(x: number, y: number, w: number, h: number): void;
3803
3803
 
@@ -5948,12 +5948,19 @@ declare class Comment extends CharacterData {
5948
5948
  text: string;
5949
5949
  }
5950
5950
 
5951
+ interface StringLike {
5952
+ toString(): string;
5953
+ }
5954
+
5951
5955
  declare class URL {
5952
5956
  static canParse(url: string, base?: string): boolean;
5953
5957
  static createObjectURL(blob: Blob): string;
5954
5958
  static createObjectURL(mediaSource: MediaSource): string;
5955
5959
  static revokeObjectURL(url: string): void;
5956
- constructor(url: string, base?: string | URL): void;
5960
+ constructor(
5961
+ url: string | URL | StringLike,
5962
+ base?: string | URL | StringLike,
5963
+ ): void;
5957
5964
  hash: string;
5958
5965
  host: string;
5959
5966
  hostname: string;
package/flow/global.js CHANGED
@@ -24,7 +24,7 @@ declare var global: {
24
24
  +env: {
25
25
  +NODE_ENV: 'development' | 'production',
26
26
  },
27
- +argv?: $ReadOnlyArray<string>,
27
+ +argv?: ReadonlyArray<string>,
28
28
  },
29
29
 
30
30
  // setUpPerformance
package/index.js CHANGED
@@ -42,6 +42,9 @@ module.exports = {
42
42
  return require('./Libraries/Components/DrawerAndroid/DrawerLayoutAndroid')
43
43
  .default;
44
44
  },
45
+ get EventEmitter() {
46
+ return require('./Libraries/vendor/emitter/EventEmitter').default;
47
+ },
45
48
  get FlatList() {
46
49
  return require('./Libraries/Lists/FlatList').default;
47
50
  },
@@ -338,6 +341,12 @@ module.exports = {
338
341
  get useAnimatedValue() {
339
342
  return require('./Libraries/Animated/useAnimatedValue').default;
340
343
  },
344
+ get useAnimatedValueXY() {
345
+ return require('./Libraries/Animated/useAnimatedValueXY').default;
346
+ },
347
+ get useAnimatedColor() {
348
+ return require('./Libraries/Animated/useAnimatedColor').default;
349
+ },
341
350
  get useColorScheme() {
342
351
  return require('./Libraries/Utilities/useColorScheme').default;
343
352
  },
package/index.win32.js CHANGED
@@ -42,6 +42,9 @@ module.exports = {
42
42
  return require('./Libraries/Components/DrawerAndroid/DrawerLayoutAndroid')
43
43
  .default;
44
44
  },
45
+ get EventEmitter() {
46
+ return require('./Libraries/vendor/emitter/EventEmitter').default;
47
+ },
45
48
  get FlatList() {
46
49
  return require('./Libraries/Lists/FlatList').default;
47
50
  },
@@ -341,6 +344,12 @@ module.exports = {
341
344
  get useAnimatedValue() {
342
345
  return require('./Libraries/Animated/useAnimatedValue').default;
343
346
  },
347
+ get useAnimatedValueXY() {
348
+ return require('./Libraries/Animated/useAnimatedValueXY').default;
349
+ },
350
+ get useAnimatedColor() {
351
+ return require('./Libraries/Animated/useAnimatedColor').default;
352
+ },
344
353
  get useColorScheme() {
345
354
  return require('./Libraries/Utilities/useColorScheme').default;
346
355
  },
@@ -324,7 +324,6 @@ export * as NativeComponentRegistry from './Libraries/NativeComponent/NativeComp
324
324
  export {default as NativeDialogManagerAndroid} from './Libraries/NativeModules/specs/NativeDialogManagerAndroid';
325
325
 
326
326
  export type {
327
- EventSubscription,
328
327
  EmitterSubscription,
329
328
  NativeEventSubscription,
330
329
  } from './Libraries/EventEmitter/NativeEventEmitter';
@@ -412,6 +411,8 @@ export * as TurboModuleRegistry from './Libraries/TurboModule/TurboModuleRegistr
412
411
  export {default as UIManager} from './Libraries/ReactNative/UIManager';
413
412
  export {unstable_batchedUpdates} from './Libraries/ReactNative/RendererProxy';
414
413
  export {default as useAnimatedValue} from './Libraries/Animated/useAnimatedValue';
414
+ export {default as useAnimatedValueXY} from './Libraries/Animated/useAnimatedValueXY';
415
+ export {default as useAnimatedColor} from './Libraries/Animated/useAnimatedColor';
415
416
  export type {
416
417
  PressabilityConfig,
417
418
  EventHandlers as PressabilityEventHandlers,
@@ -467,6 +468,12 @@ export type {
467
468
  PublicTextInstance,
468
469
  } from './Libraries/ReactPrivate/ReactNativePrivateInterface';
469
470
 
471
+ export type {
472
+ EventSubscription,
473
+ IEventEmitter,
474
+ } from './Libraries/vendor/emitter/EventEmitter';
475
+ export {default as EventEmitter} from './Libraries/vendor/emitter/EventEmitter';
476
+
470
477
  export {
471
478
  default as unstable_VirtualView,
472
479
  VirtualViewMode,
@@ -10,10 +10,10 @@
10
10
 
11
11
  'use strict';
12
12
 
13
- import type {HostComponent} from '../src/private/types/HostComponent';
13
+ import type {HostComponent} from 'react-native/src/private/types/HostComponent';
14
14
 
15
- import requireNativeComponent from '../Libraries/ReactNative/requireNativeComponent';
16
15
  import * as React from 'react';
16
+ import requireNativeComponent from 'react-native/Libraries/ReactNative/requireNativeComponent';
17
17
 
18
18
  const RCTRefreshControl: HostComponent<{}> = requireNativeComponent<{}>(
19
19
  'RCTRefreshControl',
@@ -16,6 +16,13 @@ const createCacheKeyFunction =
16
16
  require('@jest/create-cache-key-function').default;
17
17
  const path = require('path');
18
18
 
19
+ // NOTE: This file used to be at `react-native/jest/assetFileTransformer.js`
20
+ // To keep the mock `testUri` paths the same, we create a fake path that outputs the same relative path as before
21
+ const basePath = path.resolve(
22
+ require.resolve('react-native/package.json'),
23
+ '../jest/',
24
+ );
25
+
19
26
  module.exports = {
20
27
  // Mocks asset requires to return the filename. Makes it possible to test that
21
28
  // the correct images are loaded for components. Essentially
@@ -24,9 +31,7 @@ module.exports = {
24
31
  process: (_, filename) => ({
25
32
  code: `module.exports = {
26
33
  testUri:
27
- ${JSON.stringify(
28
- path.relative(__dirname, filename).replace(/\\/g, '/'),
29
- )}
34
+ ${JSON.stringify(path.relative(basePath, filename).replace(/\\/g, '/'))}
30
35
  };`,
31
36
  }),
32
37
  getCacheKey: createCacheKeyFunction([__filename]),
@@ -11,7 +11,7 @@
11
11
  import * as React from 'react';
12
12
  import {createElement} from 'react';
13
13
 
14
- type Modulish<T> = T | $ReadOnly<{default: T}>;
14
+ type Modulish<T> = T | Readonly<{default: T}>;
15
15
  type ModuleDefault<T> = T['default'];
16
16
 
17
17
  type TComponentType = React.ComponentType<{...}>;
@@ -27,9 +27,8 @@ export default function mockComponent<
27
27
  moduleName: string,
28
28
  instanceMethods: ?interface {},
29
29
  isESModule: TIsESModule,
30
- ): TIsESModule extends true
31
- ? // $FlowFixMe[incompatible-use]
32
- ModuleDefault<TComponentModule & typeof instanceMethods>
30
+ ): TIsESModule extends true // $FlowFixMe[incompatible-use]
31
+ ? ModuleDefault<TComponentModule & typeof instanceMethods>
33
32
  : TComponentModule & typeof instanceMethods {
34
33
  const RealComponent: TComponentType = isESModule
35
34
  ? // $FlowFixMe[prop-missing]
@@ -8,7 +8,7 @@
8
8
  * @format
9
9
  */
10
10
 
11
- import type {HostInstance} from '../src/private/types/HostInstance';
11
+ import type {HostInstance} from 'react-native/src/private/types/HostInstance';
12
12
 
13
13
  import * as React from 'react';
14
14
  import {createElement} from 'react';
@@ -8,14 +8,14 @@
8
8
  * @format
9
9
  */
10
10
 
11
- import typeof TActivityIndicator from '../../Libraries/Components/ActivityIndicator/ActivityIndicator';
12
11
  import typeof * as TmockComponent from '../mockComponent';
12
+ import typeof TActivityIndicator from 'react-native/Libraries/Components/ActivityIndicator/ActivityIndicator';
13
13
 
14
14
  const mockComponent =
15
15
  jest.requireActual<TmockComponent>('../mockComponent').default;
16
16
 
17
17
  const ActivityIndicator = mockComponent(
18
- '../Libraries/Components/ActivityIndicator/ActivityIndicator',
18
+ 'react-native/Libraries/Components/ActivityIndicator/ActivityIndicator',
19
19
  null, // instanceMethods
20
20
  true, // isESModule
21
21
  ) as TActivityIndicator;
@@ -8,14 +8,14 @@
8
8
  * @format
9
9
  */
10
10
 
11
- import typeof TImage from '../../Libraries/Image/Image';
12
11
  import typeof * as TmockComponent from '../mockComponent';
12
+ import typeof TImage from 'react-native/Libraries/Image/Image';
13
13
 
14
14
  const mockComponent =
15
15
  jest.requireActual<TmockComponent>('../mockComponent').default;
16
16
 
17
17
  const Image = mockComponent(
18
- '../Libraries/Image/Image',
18
+ 'react-native/Libraries/Image/Image',
19
19
  null, // instanceMethods
20
20
  true, // isESModule
21
21
  ) as TImage;
@@ -8,8 +8,8 @@
8
8
  * @format
9
9
  */
10
10
 
11
- import type {ModalProps} from '../../Libraries/Modal/Modal';
12
11
  import typeof * as TmockComponent from '../mockComponent';
12
+ import type {ModalProps} from 'react-native/Libraries/Modal/Modal';
13
13
 
14
14
  const mockComponent =
15
15
  jest.requireActual<TmockComponent>('../mockComponent').default;
@@ -17,7 +17,7 @@ const mockComponent =
17
17
  type TModal = component(...ModalProps);
18
18
 
19
19
  const BaseComponent = mockComponent(
20
- '../Libraries/Modal/Modal',
20
+ 'react-native/Libraries/Modal/Modal',
21
21
  null, // instanceMethods
22
22
  true, // isESModule
23
23
  ) as TModal;
@@ -8,11 +8,11 @@
8
8
  * @format
9
9
  */
10
10
 
11
- import type {RefreshControlProps} from '../../Libraries/Components/RefreshControl/RefreshControl';
12
- import type {HostComponent} from '../../src/private/types/HostComponent';
11
+ import type {RefreshControlProps} from 'react-native/Libraries/Components/RefreshControl/RefreshControl';
12
+ import type {HostComponent} from 'react-native/src/private/types/HostComponent';
13
13
 
14
- import requireNativeComponent from '../../Libraries/ReactNative/requireNativeComponent';
15
14
  import * as React from 'react';
15
+ import requireNativeComponent from 'react-native/Libraries/ReactNative/requireNativeComponent';
16
16
 
17
17
  const RCTRefreshControl: HostComponent<{}> = requireNativeComponent<{}>(
18
18
  'RCTRefreshControl',
@@ -10,7 +10,7 @@
10
10
 
11
11
  // In tests, we can use the default version without dependency injection.
12
12
 
13
- import typeof * as TRendererImplementation from '../../Libraries/ReactNative/RendererImplementation';
13
+ import typeof * as TRendererImplementation from 'react-native/Libraries/ReactNative/RendererImplementation';
14
14
 
15
15
  const {
16
16
  dispatchCommand,
@@ -26,7 +26,7 @@ const {
26
26
  unmountComponentAtNodeAndRemoveContainer,
27
27
  unstable_batchedUpdates,
28
28
  } = jest.requireActual<TRendererImplementation>(
29
- '../../Libraries/ReactNative/RendererImplementation',
29
+ 'react-native/Libraries/ReactNative/RendererImplementation',
30
30
  ) as TRendererImplementation;
31
31
 
32
32
  export {
@@ -8,14 +8,14 @@
8
8
  * @format
9
9
  */
10
10
 
11
- import typeof TScrollView from '../../Libraries/Components/ScrollView/ScrollView';
12
- import type {ScrollViewNativeProps} from '../../Libraries/Components/ScrollView/ScrollViewNativeComponentType';
13
11
  import typeof * as TmockComponent from '../mockComponent';
14
12
  import typeof * as TMockNativeMethods from '../MockNativeMethods';
13
+ import typeof TScrollView from 'react-native/Libraries/Components/ScrollView/ScrollView';
14
+ import type {ScrollViewNativeProps} from 'react-native/Libraries/Components/ScrollView/ScrollViewNativeComponentType';
15
15
 
16
- import View from '../../Libraries/Components/View/View';
17
- import requireNativeComponent from '../../Libraries/ReactNative/requireNativeComponent';
18
16
  import * as React from 'react';
17
+ import View from 'react-native/Libraries/Components/View/View';
18
+ import requireNativeComponent from 'react-native/Libraries/ReactNative/requireNativeComponent';
19
19
 
20
20
  const mockComponent =
21
21
  jest.requireActual<TmockComponent>('../mockComponent').default;
@@ -27,7 +27,7 @@ const RCTScrollView =
27
27
  requireNativeComponent<ScrollViewNativeProps>('RCTScrollView');
28
28
 
29
29
  const BaseComponent = mockComponent(
30
- '../Libraries/Components/ScrollView/ScrollView',
30
+ 'react-native/Libraries/Components/ScrollView/ScrollView',
31
31
  {
32
32
  ...MockNativeMethods,
33
33
  getScrollResponder: jest.fn(),
@@ -8,9 +8,9 @@
8
8
  * @format
9
9
  */
10
10
 
11
- import typeof TText from '../../Libraries/Text/Text';
12
11
  import typeof * as TmockComponent from '../mockComponent';
13
12
  import typeof * as TMockNativeMethods from '../MockNativeMethods';
13
+ import typeof TText from 'react-native/Libraries/Text/Text';
14
14
 
15
15
  const mockComponent =
16
16
  jest.requireActual<TmockComponent>('../mockComponent').default;
@@ -19,7 +19,7 @@ const MockNativeMethods = jest.requireActual<TMockNativeMethods>(
19
19
  ).default;
20
20
 
21
21
  const Text = mockComponent(
22
- '../Libraries/Text/Text',
22
+ 'react-native/Libraries/Text/Text',
23
23
  MockNativeMethods, // instanceMethods
24
24
  true, // isESModule
25
25
  ) as TText;
@@ -8,9 +8,9 @@
8
8
  * @format
9
9
  */
10
10
 
11
- import typeof TTextInput from '../../Libraries/Components/TextInput/TextInput';
12
11
  import typeof * as TmockComponent from '../mockComponent';
13
12
  import typeof * as TMockNativeMethods from '../MockNativeMethods';
13
+ import typeof TTextInput from 'react-native/Libraries/Components/TextInput/TextInput';
14
14
 
15
15
  const mockComponent =
16
16
  jest.requireActual<TmockComponent>('../mockComponent').default;
@@ -19,7 +19,7 @@ const MockNativeMethods = jest.requireActual<TMockNativeMethods>(
19
19
  ).default;
20
20
 
21
21
  const TextInput = mockComponent(
22
- '../Libraries/Components/TextInput/TextInput',
22
+ 'react-native/Libraries/Components/TextInput/TextInput',
23
23
  {
24
24
  ...MockNativeMethods,
25
25
  isFocused: jest.fn(),