@office-iss/react-native-win32 0.71.4 → 0.72.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 (323) hide show
  1. package/.flowconfig +15 -3
  2. package/CHANGELOG.json +310 -40
  3. package/CHANGELOG.md +145 -23
  4. package/IntegrationTests/IntegrationTestHarnessTest.js +1 -0
  5. package/Libraries/ActionSheetIOS/ActionSheetIOS.js +1 -1
  6. package/Libraries/Alert/Alert.d.ts +4 -4
  7. package/Libraries/Alert/Alert.win32.js +1 -0
  8. package/Libraries/Animated/Animated.d.ts +17 -6
  9. package/Libraries/Animated/NativeAnimatedHelper.js +18 -6
  10. package/Libraries/Animated/NativeAnimatedHelper.win32.js +606 -0
  11. package/Libraries/Animated/bezier.js +1 -1
  12. package/Libraries/Animated/components/AnimatedFlatList.js +8 -3
  13. package/Libraries/Animated/components/AnimatedScrollView.js +4 -1
  14. package/Libraries/Animated/components/AnimatedSectionList.js +12 -3
  15. package/Libraries/Animated/createAnimatedComponent.js +26 -239
  16. package/Libraries/Animated/nodes/AnimatedColor.js +47 -80
  17. package/Libraries/Animated/nodes/AnimatedInterpolation.js +167 -121
  18. package/Libraries/Animated/nodes/AnimatedNode.js +3 -5
  19. package/Libraries/Animated/nodes/AnimatedProps.js +7 -6
  20. package/Libraries/Animated/nodes/AnimatedStyle.js +42 -8
  21. package/Libraries/Animated/nodes/AnimatedTransform.js +1 -1
  22. package/Libraries/Animated/nodes/AnimatedValue.js +8 -12
  23. package/Libraries/Animated/nodes/AnimatedWithChildren.js +1 -1
  24. package/Libraries/Animated/useAnimatedProps.js +7 -10
  25. package/Libraries/BatchedBridge/MessageQueue.js +2 -1
  26. package/Libraries/BatchedBridge/NativeModules.d.ts +1 -1
  27. package/Libraries/BatchedBridge/NativeModules.js +1 -0
  28. package/Libraries/Blob/Blob.js +4 -0
  29. package/Libraries/Blob/FileReader.js +30 -2
  30. package/Libraries/Blob/URL.js +3 -1
  31. package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.d.ts +2 -2
  32. package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.js +2 -3
  33. package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.win32.js +2 -3
  34. package/Libraries/Components/ActivityIndicator/ActivityIndicator.js +6 -4
  35. package/Libraries/Components/Button.js +3 -2
  36. package/Libraries/Components/Button.win32.js +451 -0
  37. package/Libraries/Components/Clipboard/Clipboard.js +1 -1
  38. package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js +4 -0
  39. package/Libraries/Components/Keyboard/KeyboardAvoidingView.js +1 -0
  40. package/Libraries/Components/Pressable/Pressable.d.ts +1 -1
  41. package/Libraries/Components/Pressable/Pressable.js +1 -1
  42. package/Libraries/Components/RefreshControl/RefreshControl.js +1 -0
  43. package/Libraries/Components/SafeAreaView/SafeAreaView.js +1 -2
  44. package/Libraries/Components/SafeAreaView/SafeAreaView.win32.js +1 -2
  45. package/Libraries/Components/ScrollView/AndroidHorizontalScrollViewNativeComponent.js +12 -6
  46. package/Libraries/Components/ScrollView/ScrollView.d.ts +2 -2
  47. package/Libraries/Components/ScrollView/ScrollView.js +149 -91
  48. package/Libraries/Components/ScrollView/ScrollView.win32.js +1939 -0
  49. package/Libraries/Components/ScrollView/ScrollViewNativeComponent.js +16 -6
  50. package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +5 -7
  51. package/Libraries/Components/ScrollView/ScrollViewViewConfig.js +1 -1
  52. package/Libraries/Components/StatusBar/StatusBar.js +3 -0
  53. package/Libraries/Components/Switch/Switch.js +3 -1
  54. package/Libraries/Components/TextInput/AndroidTextInputNativeComponent.js +21 -11
  55. package/Libraries/Components/TextInput/InputAccessoryView.d.ts +1 -1
  56. package/Libraries/Components/TextInput/RCTTextInputViewConfig.js +11 -5
  57. package/Libraries/Components/TextInput/TextInput.Types.win32.d.ts +51 -0
  58. package/Libraries/Components/TextInput/TextInput.Types.win32.js +3 -0
  59. package/Libraries/Components/TextInput/TextInput.Types.win32.js.map +1 -0
  60. package/Libraries/Components/TextInput/TextInput.d.ts +15 -5
  61. package/Libraries/Components/TextInput/TextInput.flow.js +1 -1
  62. package/Libraries/Components/TextInput/TextInput.js +130 -103
  63. package/Libraries/Components/TextInput/TextInput.win32.js +202 -890
  64. package/Libraries/Components/Touchable/Touchable.d.ts +1 -1
  65. package/Libraries/Components/Touchable/Touchable.flow.js +30 -4
  66. package/Libraries/Components/Touchable/Touchable.js +6 -3
  67. package/Libraries/Components/Touchable/Touchable.win32.js +6 -3
  68. package/Libraries/Components/Touchable/TouchableHighlight.js +1 -1
  69. package/Libraries/Components/Touchable/TouchableNativeFeedback.js +2 -2
  70. package/Libraries/Components/Touchable/TouchableOpacity.js +3 -0
  71. package/Libraries/Components/Touchable/TouchableWithoutFeedback.d.ts +1 -1
  72. package/Libraries/Components/Touchable/TouchableWithoutFeedback.js +2 -2
  73. package/Libraries/Components/TraceUpdateOverlay/TraceUpdateOverlay.js +189 -0
  74. package/Libraries/Components/TraceUpdateOverlay/TraceUpdateOverlayNativeComponent.js +43 -0
  75. package/Libraries/Components/View/ReactNativeStyleAttributes.js +26 -0
  76. package/Libraries/Components/View/View.js +71 -45
  77. package/Libraries/Components/View/View.win32.js +38 -16
  78. package/Libraries/Components/View/ViewAccessibility.d.ts +6 -6
  79. package/Libraries/Components/View/ViewAccessibility.js +10 -1
  80. package/Libraries/Components/View/ViewAccessibility.win32.d.ts +5 -5
  81. package/Libraries/Components/View/ViewNativeComponent.js +32 -8
  82. package/Libraries/Components/View/ViewPropTypes.d.ts +1 -1
  83. package/Libraries/Components/View/ViewPropTypes.js +1 -1
  84. package/Libraries/Components/View/ViewPropTypes.win32.d.ts +1 -1
  85. package/Libraries/Components/View/ViewPropTypes.win32.js +1 -1
  86. package/Libraries/Core/Devtools/openFileInEditor.js +1 -0
  87. package/Libraries/Core/Devtools/openURLInBrowser.js +1 -0
  88. package/Libraries/Core/Devtools/parseErrorStack.js +2 -2
  89. package/Libraries/Core/Devtools/parseHermesStack.js +54 -34
  90. package/Libraries/Core/ExceptionsManager.js +2 -2
  91. package/Libraries/Core/InitializeCore.js +2 -1
  92. package/Libraries/Core/ReactNativeVersion.js +3 -3
  93. package/Libraries/Core/ReactNativeVersionCheck.js +1 -9
  94. package/Libraries/Core/ReactNativeVersionCheck.win32.js +1 -9
  95. package/Libraries/Core/Timers/JSTimers.js +1 -1
  96. package/Libraries/Core/Timers/immediateShim.js +1 -0
  97. package/Libraries/Core/Timers/queueMicrotask.js +1 -1
  98. package/Libraries/Core/setUpAlert.js +1 -1
  99. package/Libraries/Core/setUpDOM.js +18 -0
  100. package/Libraries/Core/setUpDeveloperTools.js +1 -1
  101. package/Libraries/Core/setUpGlobals.js +5 -2
  102. package/Libraries/Core/setUpNavigator.js +6 -5
  103. package/Libraries/Core/setUpPerformance.js +23 -13
  104. package/Libraries/Core/setUpReactDevTools.js +2 -0
  105. package/Libraries/Core/setUpSegmentFetcher.js +0 -41
  106. package/Libraries/Core/setUpTimers.js +2 -2
  107. package/Libraries/DOM/Geometry/DOMRect.js +82 -0
  108. package/Libraries/DOM/Geometry/DOMRectReadOnly.js +188 -0
  109. package/Libraries/DOM/Nodes/ReactNativeElement.js +75 -0
  110. package/Libraries/DOM/Nodes/ReadOnlyElement.js +89 -0
  111. package/Libraries/DOM/Nodes/ReadOnlyNode.js +167 -0
  112. package/Libraries/DOM/OldStyleCollections/ArrayLikeUtils.js +46 -0
  113. package/Libraries/DOM/OldStyleCollections/DOMRectList.js +76 -0
  114. package/Libraries/DOM/OldStyleCollections/HTMLCollection.js +82 -0
  115. package/Libraries/DOM/OldStyleCollections/NodeList.js +104 -0
  116. package/Libraries/DevToolsSettings/DevToolsSettingsManager.android.js +35 -0
  117. package/Libraries/DevToolsSettings/DevToolsSettingsManager.d.ts +20 -0
  118. package/Libraries/DevToolsSettings/DevToolsSettingsManager.ios.js +49 -0
  119. package/Libraries/DevToolsSettings/DevToolsSettingsManager.win32.js +35 -0
  120. package/Libraries/{Utilities/NativeDevSplitBundleLoader.js → DevToolsSettings/NativeDevToolsSettingsManager.js} +7 -2
  121. package/Libraries/EventEmitter/NativeEventEmitter.d.ts +1 -2
  122. package/Libraries/EventEmitter/RCTDeviceEventEmitter.d.ts +1 -2
  123. package/Libraries/EventEmitter/RCTDeviceEventEmitter.js +9 -1
  124. package/Libraries/Events/EventPolyfill.js +1 -1
  125. package/Libraries/Image/AssetRegistry.js +1 -1
  126. package/Libraries/Image/AssetSourceResolver.js +3 -3
  127. package/Libraries/Image/Image.android.js +4 -1
  128. package/Libraries/Image/Image.d.ts +63 -2
  129. package/Libraries/Image/Image.ios.js +3 -0
  130. package/Libraries/Image/Image.win32.js +3 -0
  131. package/Libraries/Image/ImageBackground.js +1 -0
  132. package/Libraries/Image/ImageProps.js +1 -1
  133. package/Libraries/Image/ImageViewNativeComponent.js +4 -4
  134. package/Libraries/Image/RelativeImageStub.js +1 -1
  135. package/Libraries/Image/TextInlineImageNativeComponent.js +1 -1
  136. package/Libraries/Image/resolveAssetSource.js +1 -1
  137. package/Libraries/Inspector/DevtoolsOverlay.js +29 -19
  138. package/Libraries/Inspector/ElementBox.js +4 -1
  139. package/Libraries/Inspector/Inspector.js +5 -6
  140. package/Libraries/Inspector/Inspector.win32.js +7 -6
  141. package/Libraries/Inspector/InspectorOverlay.js +3 -3
  142. package/Libraries/Inspector/InspectorOverlay.win32.js +2 -1
  143. package/Libraries/Inspector/NetworkOverlay.js +1 -1
  144. package/Libraries/Interaction/JSEventLoopWatchdog.js +1 -1
  145. package/Libraries/Interaction/PanResponder.js +5 -6
  146. package/Libraries/LayoutAnimation/LayoutAnimation.js +2 -1
  147. package/Libraries/Linking/Linking.js +1 -4
  148. package/Libraries/Lists/FillRateHelper.js +4 -238
  149. package/Libraries/Lists/FlatList.d.ts +15 -22
  150. package/Libraries/Lists/FlatList.js +9 -6
  151. package/Libraries/Lists/SectionList.d.ts +10 -6
  152. package/Libraries/Lists/SectionList.js +5 -3
  153. package/Libraries/Lists/SectionListModern.js +3 -3
  154. package/Libraries/Lists/ViewabilityHelper.js +8 -344
  155. package/Libraries/Lists/VirtualizeUtils.js +4 -244
  156. package/Libraries/Lists/VirtualizedList.js +10 -1867
  157. package/Libraries/Lists/VirtualizedListContext.js +6 -104
  158. package/Libraries/Lists/VirtualizedSectionList.js +9 -602
  159. package/Libraries/Lists/__flowtests__/FlatList-flowtest.js +1 -0
  160. package/Libraries/Lists/__flowtests__/SectionList-flowtest.js +1 -1
  161. package/Libraries/LogBox/Data/LogBoxData.js +1 -1
  162. package/Libraries/LogBox/Data/parseLogBoxLog.js +1 -1
  163. package/Libraries/LogBox/LogBox.js +1 -1
  164. package/Libraries/LogBox/UI/LogBoxInspector.js +1 -3
  165. package/Libraries/LogBox/UI/LogBoxInspectorCodeFrame.win32.js +168 -0
  166. package/Libraries/LogBox/UI/LogBoxInspectorHeader.win32.js +3 -0
  167. package/Libraries/LogBox/UI/LogBoxInspectorReactFrames.win32.js +193 -0
  168. package/Libraries/LogBox/UI/LogBoxInspectorSourceMapStatus.js +1 -0
  169. package/Libraries/LogBox/UI/LogBoxInspectorStackFrame.js +2 -2
  170. package/Libraries/LogBox/UI/LogBoxInspectorStackFrame.win32.js +7 -3
  171. package/Libraries/LogBox/UI/LogBoxMessage.js +87 -5
  172. package/Libraries/LogBox/UI/LogBoxNotification.js +5 -7
  173. package/Libraries/Modal/Modal.js +2 -2
  174. package/Libraries/NativeComponent/BaseViewConfig.android.js +32 -12
  175. package/Libraries/NativeComponent/BaseViewConfig.ios.js +43 -19
  176. package/Libraries/NativeComponent/BaseViewConfig.win32.js +43 -19
  177. package/Libraries/NativeComponent/NativeComponentRegistryUnstable.js +4 -1
  178. package/Libraries/NativeComponent/ViewConfig.js +1 -0
  179. package/Libraries/NativeComponent/ViewConfigIgnore.js +1 -4
  180. package/Libraries/Network/RCTNetworking.android.js +2 -2
  181. package/Libraries/Network/RCTNetworking.ios.js +1 -1
  182. package/Libraries/Network/RCTNetworking.win32.js +1 -1
  183. package/Libraries/Network/XMLHttpRequest.js +1 -1
  184. package/Libraries/Pressability/Pressability.js +11 -5
  185. package/Libraries/Pressability/Pressability.win32.js +9 -3
  186. package/Libraries/ReactNative/AppContainer.js +7 -1
  187. package/Libraries/ReactNative/AppRegistry.d.ts +1 -1
  188. package/Libraries/ReactNative/AppRegistry.js +10 -13
  189. package/Libraries/ReactNative/FabricUIManager.js +24 -8
  190. package/Libraries/ReactNative/NativeUIManager.js +5 -5
  191. package/Libraries/ReactNative/ReactNativeFeatureFlags.js +10 -10
  192. package/Libraries/ReactNative/UIManager.js +142 -1
  193. package/Libraries/ReactNative/getCachedComponentWithDebugName.js +5 -5
  194. package/Libraries/ReactNative/getNativeComponentAttributes.js +1 -1
  195. package/Libraries/ReactNative/requireNativeComponent.d.ts +1 -1
  196. package/Libraries/ReactNative/requireNativeComponent.js +1 -1
  197. package/Libraries/ReactPrivate/ReactNativePrivateInterface.js +1 -0
  198. package/Libraries/Renderer/implementations/ReactFabric-dev.js +26 -3
  199. package/Libraries/Renderer/implementations/ReactFabric-prod.js +13 -1
  200. package/Libraries/Renderer/implementations/ReactFabric-profiling.js +13 -1
  201. package/Libraries/Renderer/public/ReactFabricPublicInstanceUtils.js +38 -0
  202. package/Libraries/Renderer/shims/ReactNativeTypes.js +38 -20
  203. package/Libraries/Renderer/shims/ReactNativeViewConfigRegistry.js +7 -7
  204. package/Libraries/Renderer/shims/createReactNativeComponentClass.js +2 -2
  205. package/Libraries/Share/Share.js +1 -1
  206. package/Libraries/StyleSheet/PlatformColorValueTypes.ios.js +1 -1
  207. package/Libraries/StyleSheet/StyleSheet.js +1 -1
  208. package/Libraries/StyleSheet/StyleSheet.win32.js +1 -1
  209. package/Libraries/StyleSheet/StyleSheetTypes.d.ts +115 -76
  210. package/Libraries/StyleSheet/StyleSheetTypes.js +188 -33
  211. package/Libraries/StyleSheet/flattenStyle.js +2 -0
  212. package/Libraries/StyleSheet/normalizeColor.js +1 -1
  213. package/Libraries/StyleSheet/processColor.js +1 -1
  214. package/Libraries/Text/Text.d.ts +12 -2
  215. package/Libraries/Text/Text.js +50 -41
  216. package/Libraries/Text/TextProps.js +3 -4
  217. package/Libraries/TurboModule/samples/NativeSampleTurboModule.js +6 -0
  218. package/Libraries/Types/CodegenTypes.js +1 -0
  219. package/Libraries/UTFSequence.js +3 -1
  220. package/Libraries/Utilities/Appearance.d.ts +10 -0
  221. package/Libraries/Utilities/Appearance.js +13 -0
  222. package/Libraries/Utilities/Dimensions.js +1 -1
  223. package/Libraries/Utilities/Dimensions.win32.js +1 -1
  224. package/Libraries/Utilities/GlobalPerformanceLogger.js +12 -1
  225. package/Libraries/Utilities/HMRClient.js +16 -10
  226. package/Libraries/Utilities/{createPerformanceLogger.d.ts → IPerformanceLogger.d.ts} +4 -4
  227. package/Libraries/Utilities/IPerformanceLogger.js +49 -0
  228. package/Libraries/Utilities/LoadingView.android.js +28 -11
  229. package/Libraries/Utilities/NativeAppearance.js +1 -0
  230. package/Libraries/Utilities/NativePlatformConstantsWin.js +1 -1
  231. package/Libraries/Utilities/PixelRatio.js +2 -2
  232. package/Libraries/Utilities/Platform.win32.js +1 -1
  233. package/Libraries/Utilities/ReactNativeTestTools.js +1 -1
  234. package/Libraries/Utilities/__mocks__/PixelRatio.js +1 -1
  235. package/Libraries/Utilities/codegenNativeCommands.js +2 -0
  236. package/Libraries/Utilities/createPerformanceLogger.js +55 -43
  237. package/Libraries/Utilities/stringifySafe.js +2 -7
  238. package/Libraries/Utilities/useColorScheme.js +1 -1
  239. package/Libraries/Utilities/useWindowDimensions.js +3 -3
  240. package/Libraries/WebPerformance/EventCounts.js +78 -0
  241. package/Libraries/WebPerformance/MemoryInfo.js +54 -0
  242. package/Libraries/WebPerformance/NativePerformance.js +38 -0
  243. package/Libraries/WebPerformance/NativePerformanceObserver.js +22 -7
  244. package/Libraries/WebPerformance/Performance.js +312 -0
  245. package/Libraries/WebPerformance/PerformanceEntry.js +45 -0
  246. package/Libraries/WebPerformance/PerformanceEventTiming.js +38 -0
  247. package/Libraries/WebPerformance/PerformanceObserver.js +196 -101
  248. package/Libraries/WebPerformance/RawPerformanceEntry.js +87 -0
  249. package/Libraries/WebPerformance/ReactNativeStartupTiming.js +65 -0
  250. package/Libraries/WebPerformance/__mocks__/NativePerformance.js +65 -0
  251. package/Libraries/WebPerformance/__mocks__/NativePerformanceObserver.js +101 -0
  252. package/Libraries/YellowBox/YellowBoxDeprecated.js +1 -1
  253. package/Libraries/vendor/core/ErrorUtils.js +1 -1
  254. package/Libraries/vendor/emitter/EventEmitter.d.ts +2 -2
  255. package/Libraries/vendor/emitter/EventEmitter.js +9 -1
  256. package/flow/global.js +29 -4
  257. package/flow/jest.js +258 -164
  258. package/index.js +56 -42
  259. package/index.win32.js +56 -42
  260. package/interface.js +1 -1
  261. package/jest/local-setup.js +33 -0
  262. package/jest/mockComponent.js +4 -2
  263. package/jest/mockNativeComponent.js +1 -1
  264. package/jest/mockScrollView.js +2 -1
  265. package/jest/react-native-env.js +1 -3
  266. package/jest/setup.js +11 -8
  267. package/overrides.json +115 -85
  268. package/package.json +38 -28
  269. package/rn-get-polyfills.js +1 -1
  270. package/src/Libraries/Components/TextInput/TextInput.Types.win32.ts +68 -0
  271. package/src/Libraries/Components/View/ViewAccessibility.win32.d.ts +5 -5
  272. package/src/Libraries/Components/View/ViewPropTypes.win32.d.ts +1 -1
  273. package/types/index.d.ts +2 -6
  274. package/types/modules/Codegen.d.ts +4 -4
  275. package/types/modules/globals.d.ts +27 -25
  276. package/types/public/DeprecatedPropertiesAlias.d.ts +0 -20
  277. package/types/public/ReactNativeRenderer.d.ts +2 -7
  278. package/Libraries/Animated/createAnimatedComponentInjection.js +0 -48
  279. package/Libraries/Animated/createAnimatedComponent_EXPERIMENTAL.js +0 -48
  280. package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.flow.js +0 -208
  281. package/Libraries/Components/ActivityIndicator/ActivityIndicator.flow.js +0 -58
  282. package/Libraries/Components/DatePicker/DatePickerIOS.android.js +0 -47
  283. package/Libraries/Components/DatePicker/DatePickerIOS.d.ts +0 -92
  284. package/Libraries/Components/DatePicker/DatePickerIOS.flow.android.js +0 -14
  285. package/Libraries/Components/DatePicker/DatePickerIOS.flow.ios.js +0 -113
  286. package/Libraries/Components/DatePicker/DatePickerIOS.ios.js +0 -242
  287. package/Libraries/Components/DatePicker/DatePickerIOS.win32.js +0 -47
  288. package/Libraries/Components/DatePicker/RCTDatePickerNativeComponent.js +0 -60
  289. package/Libraries/Components/DatePickerAndroid/NativeDatePickerAndroid.js +0 -26
  290. package/Libraries/Components/ProgressViewIOS/ProgressViewIOS.android.js +0 -45
  291. package/Libraries/Components/ProgressViewIOS/ProgressViewIOS.d.ts +0 -62
  292. package/Libraries/Components/ProgressViewIOS/ProgressViewIOS.ios.js +0 -75
  293. package/Libraries/Components/ProgressViewIOS/ProgressViewIOS.win32.js +0 -45
  294. package/Libraries/Components/ProgressViewIOS/RCTProgressViewNativeComponent.js +0 -33
  295. package/Libraries/Components/SafeAreaView/SafeAreaView.flow.js +0 -19
  296. package/Libraries/Components/Slider/Slider.d.ts +0 -132
  297. package/Libraries/Components/Slider/Slider.js +0 -282
  298. package/Libraries/Components/Slider/SliderNativeComponent.js +0 -56
  299. package/Libraries/Components/TextInput/Win32TextInputNativeComponent.js +0 -23
  300. package/Libraries/Interaction/Batchinator.js +0 -76
  301. package/Libraries/Interaction/BridgeSpyStallHandler.js +0 -63
  302. package/Libraries/Interaction/InteractionStallDebugger.js +0 -23
  303. package/Libraries/Interaction/PanResponder.flow.js +0 -257
  304. package/Libraries/Lists/CellRenderMask.js +0 -155
  305. package/Libraries/Lists/ChildListCollection.js +0 -72
  306. package/Libraries/Lists/StateSafePureComponent.js +0 -85
  307. package/Libraries/Lists/VirtualizedList.d.ts +0 -347
  308. package/Libraries/Lists/VirtualizedListCellRenderer.js +0 -259
  309. package/Libraries/Lists/VirtualizedListProps.js +0 -279
  310. package/Libraries/Performance/PureComponentDebug.js +0 -74
  311. package/Libraries/Reliability/UserFlow.js +0 -158
  312. package/Libraries/Renderer/implementations/ReactNativeRenderer.d.ts +0 -149
  313. package/Libraries/Renderer/shims/ReactNativeTypes.d.ts +0 -141
  314. package/Libraries/Utilities/MatrixMath.js +0 -748
  315. package/Libraries/Utilities/buildStyleInterpolator.js +0 -209
  316. package/Libraries/Utilities/clamp.js +0 -23
  317. package/Libraries/Utilities/deprecatedPropType.js +0 -36
  318. package/Libraries/Utilities/groupByEveryN.js +0 -51
  319. package/Libraries/Utilities/mergeIntoFast.js +0 -26
  320. package/Libraries/Utilities/setAndForwardRef.js +0 -71
  321. package/Libraries/Utilities/truncate.js +0 -51
  322. package/flow/JSITimerInternalType.js +0 -30
  323. package/flow/use-sync-external-store.js +0 -19
@@ -9,8 +9,12 @@
9
9
  */
10
10
 
11
11
  import type {RootTag} from '../Types/RootTagTypes';
12
+ import type {Spec as FabricUIManagerSpec} from './FabricUIManager';
12
13
  import type {Spec} from './NativeUIManager';
13
14
 
15
+ import {getFabricUIManager} from './FabricUIManager';
16
+ import nullthrows from 'nullthrows';
17
+
14
18
  export interface UIManagerJSInterface extends Spec {
15
19
  +getViewManagerConfig: (viewManagerName: string) => Object;
16
20
  +hasViewManagerConfig: (viewManagerName: string) => boolean;
@@ -31,9 +35,146 @@ export interface UIManagerJSInterface extends Spec {
31
35
  ) => void;
32
36
  }
33
37
 
34
- const UIManager: UIManagerJSInterface =
38
+ function isFabricReactTag(reactTag: number): boolean {
39
+ // React reserves even numbers for Fabric.
40
+ return reactTag % 2 === 0;
41
+ }
42
+
43
+ const UIManagerImpl: UIManagerJSInterface =
35
44
  global.RN$Bridgeless === true
36
45
  ? require('./BridgelessUIManager')
37
46
  : require('./PaperUIManager');
38
47
 
48
+ // $FlowFixMe[cannot-spread-interface]
49
+ const UIManager = {
50
+ ...UIManagerImpl,
51
+ measure(
52
+ reactTag: number,
53
+ callback: (
54
+ left: number,
55
+ top: number,
56
+ width: number,
57
+ height: number,
58
+ pageX: number,
59
+ pageY: number,
60
+ ) => void,
61
+ ): void {
62
+ if (isFabricReactTag(reactTag)) {
63
+ const FabricUIManager = nullthrows(getFabricUIManager());
64
+ const shadowNode =
65
+ FabricUIManager.findShadowNodeByTag_DEPRECATED(reactTag);
66
+ if (shadowNode) {
67
+ FabricUIManager.measure(shadowNode, callback);
68
+ } else {
69
+ console.warn(`measure cannot find view with tag #${reactTag}`);
70
+ // $FlowFixMe[incompatible-call]
71
+ callback();
72
+ }
73
+ } else {
74
+ // Paper
75
+ UIManagerImpl.measure(reactTag, callback);
76
+ }
77
+ },
78
+
79
+ measureInWindow(
80
+ reactTag: number,
81
+ callback: (
82
+ left: number,
83
+ top: number,
84
+ width: number,
85
+ height: number,
86
+ ) => void,
87
+ ): void {
88
+ if (isFabricReactTag(reactTag)) {
89
+ const FabricUIManager = nullthrows(getFabricUIManager());
90
+ const shadowNode =
91
+ FabricUIManager.findShadowNodeByTag_DEPRECATED(reactTag);
92
+ if (shadowNode) {
93
+ FabricUIManager.measureInWindow(shadowNode, callback);
94
+ } else {
95
+ console.warn(`measure cannot find view with tag #${reactTag}`);
96
+ // $FlowFixMe[incompatible-call]
97
+ callback();
98
+ }
99
+ } else {
100
+ // Paper
101
+ UIManagerImpl.measureInWindow(reactTag, callback);
102
+ }
103
+ },
104
+
105
+ measureLayout(
106
+ reactTag: number,
107
+ ancestorReactTag: number,
108
+ errorCallback: (error: Object) => void,
109
+ callback: (
110
+ left: number,
111
+ top: number,
112
+ width: number,
113
+ height: number,
114
+ ) => void,
115
+ ): void {
116
+ if (isFabricReactTag(reactTag)) {
117
+ const FabricUIManager = nullthrows(getFabricUIManager());
118
+ const shadowNode =
119
+ FabricUIManager.findShadowNodeByTag_DEPRECATED(reactTag);
120
+ const ancestorShadowNode =
121
+ FabricUIManager.findShadowNodeByTag_DEPRECATED(ancestorReactTag);
122
+
123
+ if (!shadowNode || !ancestorShadowNode) {
124
+ return;
125
+ }
126
+
127
+ FabricUIManager.measureLayout(
128
+ shadowNode,
129
+ ancestorShadowNode,
130
+ errorCallback,
131
+ callback,
132
+ );
133
+ } else {
134
+ // Paper
135
+ UIManagerImpl.measureLayout(
136
+ reactTag,
137
+ ancestorReactTag,
138
+ errorCallback,
139
+ callback,
140
+ );
141
+ }
142
+ },
143
+
144
+ measureLayoutRelativeToParent(
145
+ reactTag: number,
146
+ errorCallback: (error: Object) => void,
147
+ callback: (
148
+ left: number,
149
+ top: number,
150
+ width: number,
151
+ height: number,
152
+ ) => void,
153
+ ): void {
154
+ if (isFabricReactTag(reactTag)) {
155
+ console.warn(
156
+ 'RCTUIManager.measureLayoutRelativeToParent method is deprecated and it will not be implemented in newer versions of RN (Fabric) - T47686450',
157
+ );
158
+ const FabricUIManager = nullthrows(getFabricUIManager());
159
+ const shadowNode =
160
+ FabricUIManager.findShadowNodeByTag_DEPRECATED(reactTag);
161
+ if (shadowNode) {
162
+ FabricUIManager.measure(
163
+ shadowNode,
164
+ (left, top, width, height, pageX, pageY) => {
165
+ callback(left, top, width, height);
166
+ },
167
+ );
168
+ }
169
+ } else {
170
+ // Paper
171
+ UIManagerImpl.measureLayoutRelativeToParent(
172
+ reactTag,
173
+ errorCallback,
174
+ callback,
175
+ );
176
+ }
177
+ },
178
+ };
179
+
39
180
  module.exports = UIManager;
@@ -8,9 +8,11 @@
8
8
  * @format
9
9
  */
10
10
 
11
- import type {AbstractComponent, Node} from 'react';
11
+ import type {AbstractComponent} from 'react';
12
12
 
13
- type NoopComponent = AbstractComponent<{children: Node}>;
13
+ import * as React from 'react';
14
+
15
+ type NoopComponent = AbstractComponent<{children: React.Node}>;
14
16
 
15
17
  const cache: Map<
16
18
  string, // displayName
@@ -23,9 +25,7 @@ export default function getCachedComponentWithDisplayName(
23
25
  let ComponentWithDisplayName = cache.get(displayName);
24
26
 
25
27
  if (!ComponentWithDisplayName) {
26
- ComponentWithDisplayName = ({
27
- children,
28
- }: $TEMPORARY$object<{children: Node}>) => children;
28
+ ComponentWithDisplayName = ({children}: {children: React.Node}) => children;
29
29
  // $FlowFixMe[prop-missing]
30
30
  ComponentWithDisplayName.displayName = displayName;
31
31
  cache.set(displayName, ComponentWithDisplayName);
@@ -12,7 +12,7 @@
12
12
 
13
13
  const ReactNativeStyleAttributes = require('../Components/View/ReactNativeStyleAttributes');
14
14
  const resolveAssetSource = require('../Image/resolveAssetSource');
15
- const processColor = require('../StyleSheet/processColor');
15
+ const processColor = require('../StyleSheet/processColor').default;
16
16
  const processColorArray = require('../StyleSheet/processColorArray');
17
17
  const insetsDiffer = require('../Utilities/differ/insetsDiffer');
18
18
  const matricesDiffer = require('../Utilities/differ/matricesDiffer');
@@ -7,7 +7,7 @@
7
7
  * @format
8
8
  */
9
9
 
10
- import {HostComponent} from '../../types/public//ReactNativeTypes';
10
+ import {HostComponent} from '../../types/public/ReactNativeTypes';
11
11
 
12
12
  /**
13
13
  * Creates values that can be used like React components which represent native
@@ -29,4 +29,4 @@ const requireNativeComponent = <T>(uiViewClassName: string): HostComponent<T> =>
29
29
  getNativeComponentAttributes(uiViewClassName),
30
30
  ): any): HostComponent<T>);
31
31
 
32
- module.exports = requireNativeComponent;
32
+ export default requireNativeComponent;
@@ -57,6 +57,7 @@ module.exports = {
57
57
  return require('../Utilities/deepFreezeAndThrowOnMutationInDev');
58
58
  },
59
59
  get flattenStyle(): flattenStyle<DangerouslyImpreciseStyleProp> {
60
+ // $FlowFixMe[underconstrained-implicit-instantiation]
60
61
  return require('../StyleSheet/flattenStyle');
61
62
  },
62
63
  get ReactFiberErrorDialog(): ReactFiberErrorDialog {
@@ -3419,6 +3419,23 @@ function mountSafeCallback_NOT_REALLY_SAFE(context, callback) {
3419
3419
  return callback.apply(context, arguments);
3420
3420
  };
3421
3421
  }
3422
+ function warnForStyleProps(props, validAttributes) {
3423
+ {
3424
+ for (var key in validAttributes.style) {
3425
+ if (!(validAttributes[key] || props[key] === undefined)) {
3426
+ error(
3427
+ "You are setting the style `{ %s" +
3428
+ ": ... }` as a prop. You " +
3429
+ "should nest it in a style object. " +
3430
+ "E.g. `{ style: { %s" +
3431
+ ": ... } }`",
3432
+ key,
3433
+ key
3434
+ );
3435
+ }
3436
+ }
3437
+ }
3438
+ }
3422
3439
 
3423
3440
  // Modules provided by RN:
3424
3441
  var emptyObject = {};
@@ -5100,7 +5117,8 @@ var _nativeFabricUIManage = nativeFabricUIManager,
5100
5117
  FabricDefaultPriority = _nativeFabricUIManage.unstable_DefaultEventPriority,
5101
5118
  FabricDiscretePriority = _nativeFabricUIManage.unstable_DiscreteEventPriority,
5102
5119
  fabricGetCurrentEventPriority =
5103
- _nativeFabricUIManage.unstable_getCurrentEventPriority;
5120
+ _nativeFabricUIManage.unstable_getCurrentEventPriority,
5121
+ _setNativeProps = _nativeFabricUIManage.setNativeProps;
5104
5122
  var getViewConfigForType =
5105
5123
  ReactNativePrivateInterface.ReactNativeViewConfigRegistry.get; // Counter for uniquely identifying views.
5106
5124
  // % 10 === 1 means it is a rootTag.
@@ -5199,10 +5217,15 @@ var ReactFabricHostComponent = /*#__PURE__*/ (function() {
5199
5217
 
5200
5218
  _proto.setNativeProps = function setNativeProps(nativeProps) {
5201
5219
  {
5202
- error("Warning: setNativeProps is not currently supported in Fabric");
5220
+ warnForStyleProps(nativeProps, this.viewConfig.validAttributes);
5203
5221
  }
5204
5222
 
5205
- return;
5223
+ var updatePayload = create(nativeProps, this.viewConfig.validAttributes);
5224
+ var stateNode = this._internalInstanceHandle.stateNode;
5225
+
5226
+ if (stateNode != null && updatePayload != null) {
5227
+ _setNativeProps(stateNode.node, updatePayload);
5228
+ }
5206
5229
  }; // This API (addEventListener, removeEventListener) attempts to adhere to the
5207
5230
  // w3 Level2 Events spec as much as possible, treating HostComponent as a DOM node.
5208
5231
  //
@@ -1922,6 +1922,7 @@ var _nativeFabricUIManage = nativeFabricUIManager,
1922
1922
  FabricDiscretePriority = _nativeFabricUIManage.unstable_DiscreteEventPriority,
1923
1923
  fabricGetCurrentEventPriority =
1924
1924
  _nativeFabricUIManage.unstable_getCurrentEventPriority,
1925
+ _setNativeProps = _nativeFabricUIManage.setNativeProps,
1925
1926
  getViewConfigForType =
1926
1927
  ReactNativePrivateInterface.ReactNativeViewConfigRegistry.get,
1927
1928
  nextReactTag = 2;
@@ -1979,7 +1980,18 @@ var ReactFabricHostComponent = (function() {
1979
1980
  );
1980
1981
  }
1981
1982
  };
1982
- _proto.setNativeProps = function() {};
1983
+ _proto.setNativeProps = function(nativeProps) {
1984
+ nativeProps = diffProperties(
1985
+ null,
1986
+ emptyObject,
1987
+ nativeProps,
1988
+ this.viewConfig.validAttributes
1989
+ );
1990
+ var stateNode = this._internalInstanceHandle.stateNode;
1991
+ null != stateNode &&
1992
+ null != nativeProps &&
1993
+ _setNativeProps(stateNode.node, nativeProps);
1994
+ };
1983
1995
  _proto.addEventListener_unstable = function(eventType, listener, options) {
1984
1996
  if ("string" !== typeof eventType)
1985
1997
  throw Error("addEventListener_unstable eventType must be a string");
@@ -1981,6 +1981,7 @@ var _nativeFabricUIManage = nativeFabricUIManager,
1981
1981
  FabricDiscretePriority = _nativeFabricUIManage.unstable_DiscreteEventPriority,
1982
1982
  fabricGetCurrentEventPriority =
1983
1983
  _nativeFabricUIManage.unstable_getCurrentEventPriority,
1984
+ _setNativeProps = _nativeFabricUIManage.setNativeProps,
1984
1985
  getViewConfigForType =
1985
1986
  ReactNativePrivateInterface.ReactNativeViewConfigRegistry.get,
1986
1987
  nextReactTag = 2;
@@ -2038,7 +2039,18 @@ var ReactFabricHostComponent = (function() {
2038
2039
  );
2039
2040
  }
2040
2041
  };
2041
- _proto.setNativeProps = function() {};
2042
+ _proto.setNativeProps = function(nativeProps) {
2043
+ nativeProps = diffProperties(
2044
+ null,
2045
+ emptyObject,
2046
+ nativeProps,
2047
+ this.viewConfig.validAttributes
2048
+ );
2049
+ var stateNode = this._internalInstanceHandle.stateNode;
2050
+ null != stateNode &&
2051
+ null != nativeProps &&
2052
+ _setNativeProps(stateNode.node, nativeProps);
2053
+ };
2042
2054
  _proto.addEventListener_unstable = function(eventType, listener, options) {
2043
2055
  if ("string" !== typeof eventType)
2044
2056
  throw Error("addEventListener_unstable eventType must be a string");
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ * @format
8
+ * @flow strict
9
+ */
10
+
11
+ /**
12
+ * IMPORTANT!!
13
+ *
14
+ * This module cannot import `ReactFabric` (directly or indirectly)
15
+ * because it can be used by apps only using the legacy renderer.
16
+ * In that case `nativeFabricUIManager` isn't defined and `ReactFabric` throws.
17
+ */
18
+
19
+ export function isPublicInstance(maybeInstance: mixed): boolean {
20
+ return (
21
+ maybeInstance != null &&
22
+ // TODO: implement a better check when the instance is defined in the React Native repository.
23
+ (maybeInstance.__nativeTag != null ||
24
+ // TODO: remove this check when syncing the new version of the renderer from React to React Native.
25
+ isLegacyFabricInstance(maybeInstance))
26
+ );
27
+ }
28
+
29
+ function isLegacyFabricInstance(maybeInstance: mixed): boolean {
30
+ /* eslint-disable dot-notation */
31
+ return (
32
+ maybeInstance != null &&
33
+ // $FlowExpectedError[incompatible-use]
34
+ maybeInstance['_internalInstanceHandle'] != null &&
35
+ maybeInstance['_internalInstanceHandle'].stateNode != null &&
36
+ maybeInstance['_internalInstanceHandle'].stateNode.canonical != null
37
+ );
38
+ }
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * @noformat
8
8
  * @flow strict
9
- * @generated SignedSource<<d9fed8e0aacc3113ceaf7d8e266300c6>>
9
+ * @generated SignedSource<<7dc3ed81183377055bac08760fcd775b>>
10
10
  *
11
11
  * This file was sync'd from the facebook/react repository.
12
12
  */
@@ -51,7 +51,7 @@ export type AttributeConfiguration = $ReadOnly<{
51
51
  [propName: string]: AnyAttributeType,
52
52
  style: $ReadOnly<{
53
53
  [propName: string]: AnyAttributeType,
54
- ...,
54
+ ...
55
55
  }>,
56
56
  ...
57
57
  }>;
@@ -60,7 +60,7 @@ export type PartialAttributeConfiguration = $ReadOnly<{
60
60
  [propName: string]: AnyAttributeType,
61
61
  style?: $ReadOnly<{
62
62
  [propName: string]: AnyAttributeType,
63
- ...,
63
+ ...
64
64
  }>,
65
65
  ...
66
66
  }>;
@@ -79,13 +79,13 @@ export type ViewConfig = $ReadOnly<{
79
79
  skipBubbling?: ?boolean,
80
80
  }>,
81
81
  }>,
82
- ...,
82
+ ...
83
83
  }>,
84
84
  directEventTypes?: $ReadOnly<{
85
85
  [eventName: string]: $ReadOnly<{
86
86
  registrationName: string,
87
87
  }>,
88
- ...,
88
+ ...
89
89
  }>,
90
90
  uiViewClassName: string,
91
91
  validAttributes: AttributeConfiguration,
@@ -98,7 +98,23 @@ export type PartialViewConfig = $ReadOnly<{
98
98
  validAttributes?: PartialAttributeConfiguration,
99
99
  }>;
100
100
 
101
- export type NativeMethods = $ReadOnly<{
101
+ /**
102
+ * Current usages should migrate to this definition
103
+ */
104
+ export interface INativeMethods {
105
+ blur(): void;
106
+ focus(): void;
107
+ measure(callback: MeasureOnSuccessCallback): void;
108
+ measureInWindow(callback: MeasureInWindowOnSuccessCallback): void;
109
+ measureLayout(
110
+ relativeToNativeNode: number | ElementRef<HostComponent<mixed>>,
111
+ onSuccess: MeasureLayoutOnSuccessCallback,
112
+ onFail?: () => void,
113
+ ): void;
114
+ setNativeProps(nativeProps: {...}): void;
115
+ }
116
+
117
+ export type NativeMethods = $ReadOnly<{|
102
118
  blur(): void,
103
119
  focus(): void,
104
120
  measure(callback: MeasureOnSuccessCallback): void,
@@ -109,7 +125,11 @@ export type NativeMethods = $ReadOnly<{
109
125
  onFail?: () => void,
110
126
  ): void,
111
127
  setNativeProps(nativeProps: {...}): void,
112
- }>;
128
+ |}>;
129
+
130
+ // This validates that INativeMethods and NativeMethods stay in sync using Flow!
131
+ declare var ensureNativeMethodsAreSynced: NativeMethods;
132
+ (ensureNativeMethodsAreSynced: INativeMethods);
113
133
 
114
134
  export type HostComponent<T> = AbstractComponent<T, $ReadOnly<NativeMethods>>;
115
135
 
@@ -122,7 +142,7 @@ type SecretInternalsType = {
122
142
 
123
143
  type InspectorDataProps = $ReadOnly<{
124
144
  [propName: string]: string,
125
- ...,
145
+ ...
126
146
  }>;
127
147
 
128
148
  type InspectorDataSource = $ReadOnly<{
@@ -195,6 +215,10 @@ export type ReactNativeType = {
195
215
  ...
196
216
  };
197
217
 
218
+ export opaque type Node = mixed;
219
+ type InternalInstanceHandle = mixed;
220
+ type PublicInstance = mixed;
221
+
198
222
  export type ReactFabricType = {
199
223
  findHostInstance_DEPRECATED<TElementType: ElementType>(
200
224
  componentOrHandle: ?(ElementRef<TElementType> | number),
@@ -218,18 +242,12 @@ export type ReactFabricType = {
218
242
  concurrentRoot: ?boolean,
219
243
  ): ?ElementRef<ElementType>,
220
244
  unmountComponentAtNode(containerTag: number): void,
221
- ...
222
- };
223
-
224
- export type ReactNativeEventTarget = {
225
- node: {...},
226
- canonical: {
227
- _nativeTag: number,
228
- viewConfig: ViewConfig,
229
- currentProps: {...},
230
- _internalInstanceHandle: {...},
231
- ...
232
- },
245
+ getNodeFromInternalInstanceHandle(
246
+ internalInstanceHandle: InternalInstanceHandle,
247
+ ): ?Node,
248
+ getPublicInstanceFromInternalInstanceHandle(
249
+ internalInstanceHandle: InternalInstanceHandle,
250
+ ): PublicInstance,
233
251
  ...
234
252
  };
235
253
 
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * @noformat
8
8
  * @flow strict-local
9
- * @generated SignedSource<<bda490a01513d4526005c1e029d5ce93>>
9
+ * @generated SignedSource<<47ba85d7f43c9b591d6804827322d00e>>
10
10
  *
11
11
  * This file was sync'd from the facebook/react repository.
12
12
  */
@@ -25,20 +25,20 @@ const customBubblingEventTypes: {
25
25
  skipBubbling?: ?boolean,
26
26
  }>,
27
27
  }>,
28
- ...,
28
+ ...
29
29
  } = {};
30
30
  const customDirectEventTypes: {
31
31
  [eventName: string]: $ReadOnly<{
32
32
  registrationName: string,
33
33
  }>,
34
- ...,
34
+ ...
35
35
  } = {};
36
36
 
37
37
  exports.customBubblingEventTypes = customBubblingEventTypes;
38
38
  exports.customDirectEventTypes = customDirectEventTypes;
39
39
 
40
- const viewConfigCallbacks = new Map();
41
- const viewConfigs = new Map();
40
+ const viewConfigCallbacks = new Map<string, ?() => ViewConfig>();
41
+ const viewConfigs = new Map<string, ViewConfig>();
42
42
 
43
43
  function processEventTypes(viewConfig: ViewConfig): void {
44
44
  const {bubblingEventTypes, directEventTypes} = viewConfig;
@@ -78,7 +78,7 @@ function processEventTypes(viewConfig: ViewConfig): void {
78
78
  * A callback is provided to load the view config from UIManager.
79
79
  * The callback is deferred until the view is actually rendered.
80
80
  */
81
- exports.register = function(name: string, callback: () => ViewConfig): string {
81
+ exports.register = function (name: string, callback: () => ViewConfig): string {
82
82
  invariant(
83
83
  !viewConfigCallbacks.has(name),
84
84
  'Tried to register two views with the same name %s',
@@ -99,7 +99,7 @@ exports.register = function(name: string, callback: () => ViewConfig): string {
99
99
  * If this is the first time the view has been used,
100
100
  * This configuration will be lazy-loaded from UIManager.
101
101
  */
102
- exports.get = function(name: string): ViewConfig {
102
+ exports.get = function (name: string): ViewConfig {
103
103
  let viewConfig;
104
104
  if (!viewConfigs.has(name)) {
105
105
  const callback = viewConfigCallbacks.get(name);
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * @noformat
8
8
  * @flow strict-local
9
- * @generated SignedSource<<7d3d4090dadea2daa09d92e5e66f6e5d>>
9
+ * @generated SignedSource<<e5e369f149ed8206141b7a3c2855bb85>>
10
10
  *
11
11
  * This file was sync'd from the facebook/react repository.
12
12
  */
@@ -26,7 +26,7 @@ const {register} = ReactNativeViewConfigRegistry;
26
26
  * @param {string} config iOS View configuration.
27
27
  * @private
28
28
  */
29
- const createReactNativeComponentClass = function(
29
+ const createReactNativeComponentClass = function (
30
30
  name: string,
31
31
  callback: () => ViewConfig,
32
32
  ): string {
@@ -11,7 +11,7 @@
11
11
  import NativeActionSheetManager from '../ActionSheetIOS/NativeActionSheetManager';
12
12
  import NativeShareModule from './NativeShareModule';
13
13
 
14
- const processColor = require('../StyleSheet/processColor');
14
+ const processColor = require('../StyleSheet/processColor').default;
15
15
  const Platform = require('../Utilities/Platform');
16
16
  const invariant = require('invariant');
17
17
 
@@ -78,7 +78,7 @@ export const processColorObject = (
78
78
  color: NativeColorValue,
79
79
  ): ?NativeColorValue => {
80
80
  if ('dynamic' in color && color.dynamic != null) {
81
- const processColor = require('./processColor');
81
+ const processColor = require('./processColor').default;
82
82
  const dynamic = color.dynamic;
83
83
  const dynamicColor: NativeColorValue = {
84
84
  dynamic: {
@@ -24,7 +24,7 @@ import type {
24
24
  } from './StyleSheetTypes';
25
25
 
26
26
  const ReactNativeStyleAttributes = require('../Components/View/ReactNativeStyleAttributes');
27
- const PixelRatio = require('../Utilities/PixelRatio');
27
+ const PixelRatio = require('../Utilities/PixelRatio').default;
28
28
  const flatten = require('./flattenStyle');
29
29
 
30
30
  /**
@@ -24,7 +24,7 @@ import type {
24
24
  } from './StyleSheetTypes';
25
25
 
26
26
  const ReactNativeStyleAttributes = require('../Components/View/ReactNativeStyleAttributes');
27
- const PixelRatio = require('../Utilities/PixelRatio');
27
+ const PixelRatio = require('../Utilities/PixelRatio').default;
28
28
  const Platform = require('../Utilities/Platform'); // [Win32]
29
29
  const flatten = require('./flattenStyle');
30
30