react-native-windows 0.69.5 → 0.70.0-preview.2

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 (298) hide show
  1. package/.flowconfig +5 -1
  2. package/Chakra/ChakraHelpers.cpp +1 -1
  3. package/Chakra/ChakraPlatform.cpp +1 -1
  4. package/Chakra/ChakraValue.cpp +6 -3
  5. package/Chakra/ChakraValue.h +1 -1
  6. package/Directory.Build.props +7 -7
  7. package/Folly/Folly.vcxproj +20 -13
  8. package/Folly/cgmanifest.json +14 -0
  9. package/Libraries/Alert/Alert.js +18 -4
  10. package/Libraries/Alert/Alert.windows.js +4 -0
  11. package/Libraries/Alert/NativeAlertManager.js +1 -0
  12. package/Libraries/Animated/Animated.js +2 -2
  13. package/Libraries/Animated/AnimatedEvent.js +7 -4
  14. package/Libraries/Animated/AnimatedImplementation.js +17 -3
  15. package/Libraries/Animated/AnimatedMock.js +7 -2
  16. package/Libraries/Animated/NativeAnimatedHelper.js +220 -95
  17. package/Libraries/Animated/NativeAnimatedModule.js +3 -0
  18. package/Libraries/Animated/NativeAnimatedTurboModule.js +3 -0
  19. package/Libraries/Animated/animations/SpringAnimation.js +3 -3
  20. package/Libraries/Animated/animations/TimingAnimation.js +3 -3
  21. package/Libraries/Animated/createAnimatedComponent.js +8 -1
  22. package/Libraries/Animated/nodes/AnimatedAddition.js +3 -1
  23. package/Libraries/Animated/nodes/AnimatedColor.js +50 -29
  24. package/Libraries/Animated/nodes/AnimatedDiffClamp.js +3 -1
  25. package/Libraries/Animated/nodes/AnimatedDivision.js +3 -1
  26. package/Libraries/Animated/nodes/AnimatedInterpolation.js +22 -21
  27. package/Libraries/Animated/nodes/AnimatedModulo.js +3 -1
  28. package/Libraries/Animated/nodes/AnimatedMultiplication.js +3 -2
  29. package/Libraries/Animated/nodes/AnimatedProps.js +20 -12
  30. package/Libraries/Animated/nodes/AnimatedStyle.js +19 -16
  31. package/Libraries/Animated/nodes/AnimatedSubtraction.js +3 -1
  32. package/Libraries/Animated/nodes/AnimatedTransform.js +5 -5
  33. package/Libraries/Animated/nodes/AnimatedValue.js +14 -5
  34. package/Libraries/Animated/nodes/AnimatedValueXY.js +28 -1
  35. package/Libraries/Animated/useAnimatedProps.js +1 -0
  36. package/Libraries/AppState/AppState.js +0 -32
  37. package/Libraries/AppTheme/AppTheme.js +14 -8
  38. package/Libraries/AppTheme/AppThemeTypes.d.ts +0 -3
  39. package/Libraries/BatchedBridge/MessageQueue.js +21 -15
  40. package/Libraries/BatchedBridge/NativeModules.js +3 -4
  41. package/Libraries/Blob/FileReader.js +0 -6
  42. package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.js +0 -20
  43. package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.windows.js +0 -20
  44. package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js +4 -0
  45. package/Libraries/Components/Keyboard/Keyboard.js +0 -11
  46. package/Libraries/Components/Pressable/Pressable.js +2 -0
  47. package/Libraries/Components/Pressable/Pressable.windows.js +2 -0
  48. package/Libraries/Components/SafeAreaView/RCTSafeAreaViewNativeComponent.js +1 -3
  49. package/Libraries/Components/SafeAreaView/SafeAreaView.js +3 -30
  50. package/Libraries/Components/SafeAreaView/SafeAreaView.windows.js +4 -30
  51. package/Libraries/Components/ScrollView/ScrollView.js +13 -11
  52. package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +5 -3
  53. package/Libraries/Components/StatusBar/StatusBar.js +10 -7
  54. package/Libraries/Components/TextInput/InputAccessoryView.js +14 -13
  55. package/Libraries/Components/TextInput/TextInput.js +12 -2
  56. package/Libraries/Components/TextInput/TextInput.windows.js +12 -2
  57. package/Libraries/Components/Touchable/PooledClass.js +16 -4
  58. package/Libraries/Components/Touchable/Touchable.js +50 -1
  59. package/Libraries/Components/Touchable/Touchable.windows.js +972 -0
  60. package/Libraries/Components/Touchable/TouchableNativeFeedback.js +6 -2
  61. package/Libraries/Components/View/ReactNativeStyleAttributes.js +0 -7
  62. package/Libraries/Components/View/ViewPropTypes.js +3 -8
  63. package/Libraries/Components/View/ViewPropTypes.windows.js +3 -8
  64. package/Libraries/Core/ExceptionsManager.js +2 -0
  65. package/Libraries/Core/ReactNativeVersion.js +2 -2
  66. package/Libraries/Core/Timers/JSTimers.js +2 -2
  67. package/Libraries/Core/polyfillPromise.js +0 -32
  68. package/Libraries/Core/setUpBatchedBridge.js +5 -1
  69. package/Libraries/Core/setUpPerformance.js +1 -1
  70. package/Libraries/EventEmitter/NativeEventEmitter.js +0 -13
  71. package/Libraries/Image/AssetSourceResolver.js +2 -2
  72. package/Libraries/Image/Image.android.js +5 -3
  73. package/Libraries/Image/Image.ios.js +6 -3
  74. package/Libraries/Image/Image.windows.js +6 -3
  75. package/Libraries/Image/ImageSource.js +7 -5
  76. package/Libraries/Inspector/ElementBox.js +2 -2
  77. package/Libraries/Inspector/NetworkOverlay.js +13 -8
  78. package/Libraries/Interaction/PanResponder.js +16 -14
  79. package/Libraries/Linking/Linking.js +0 -11
  80. package/Libraries/Lists/FlatList.js +3 -2
  81. package/Libraries/Lists/SectionList.js +2 -0
  82. package/Libraries/Lists/ViewabilityHelper.js +7 -3
  83. package/Libraries/Lists/VirtualizeUtils.js +33 -20
  84. package/Libraries/Lists/VirtualizedList.js +93 -47
  85. package/Libraries/Lists/VirtualizedListContext.js +1 -0
  86. package/Libraries/Lists/VirtualizedSectionList.js +14 -9
  87. package/Libraries/Lists/__tests__/VirtualizeUtils-test.js +19 -18
  88. package/Libraries/Lists/__tests__/VirtualizedList-test.js +10 -6
  89. package/Libraries/LogBox/Data/LogBoxData.js +1 -1
  90. package/Libraries/LogBox/Data/parseLogBoxLog.js +1 -1
  91. package/Libraries/LogBox/LogBox.js +3 -1
  92. package/Libraries/LogBox/UI/AnsiHighlight.js +2 -0
  93. package/Libraries/LogBox/UI/LogBoxInspectorCodeFrame.js +3 -0
  94. package/Libraries/LogBox/UI/LogBoxInspectorSourceMapStatus.js +0 -3
  95. package/Libraries/LogBox/UI/LogBoxInspectorStackFrames.js +8 -3
  96. package/Libraries/NativeComponent/BaseViewConfig.android.js +9 -18
  97. package/Libraries/NativeComponent/BaseViewConfig.ios.js +26 -12
  98. package/Libraries/NativeComponent/BaseViewConfig.windows.js +26 -12
  99. package/Libraries/Network/XMLHttpRequest.js +9 -11
  100. package/Libraries/Performance/PureComponentDebug.js +1 -0
  101. package/Libraries/PermissionsAndroid/NativePermissionsAndroid.js +9 -1
  102. package/Libraries/PermissionsAndroid/PermissionsAndroid.js +16 -0
  103. package/Libraries/Pressability/Pressability.js +26 -16
  104. package/Libraries/Pressability/Pressability.windows.js +30 -17
  105. package/Libraries/Promise.js +0 -1
  106. package/Libraries/ReactNative/AppRegistry.js +16 -13
  107. package/Libraries/ReactNative/BridgelessUIManager.js +2 -0
  108. package/Libraries/ReactNative/PaperUIManager.js +9 -9
  109. package/Libraries/ReactNative/PaperUIManager.windows.js +7 -8
  110. package/Libraries/ReactNative/ReactNativeFeatureFlags.js +12 -0
  111. package/Libraries/ReactNative/ReactNativeRuntimeDiagnostics.js +68 -0
  112. package/Libraries/ReactNative/getNativeComponentAttributes.js +6 -7
  113. package/Libraries/ReactNative/renderApplication.js +1 -1
  114. package/Libraries/Renderer/implementations/ReactFabric-dev.js +4443 -3615
  115. package/Libraries/Renderer/implementations/ReactFabric-prod.js +1496 -1170
  116. package/Libraries/Renderer/implementations/ReactFabric-profiling.js +1694 -1356
  117. package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +4439 -3588
  118. package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +1583 -1249
  119. package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js +1719 -1372
  120. package/Libraries/Storage/AsyncStorage.js +7 -1
  121. package/Libraries/StyleSheet/PlatformColorValueTypes.ios.js +8 -0
  122. package/Libraries/StyleSheet/flattenStyle.js +1 -1
  123. package/Libraries/StyleSheet/processTransform.js +2 -0
  124. package/Libraries/StyleSheet/processTransform.windows.js +2 -0
  125. package/Libraries/StyleSheet/splitLayoutProps.js +2 -0
  126. package/Libraries/Text/Text.js +15 -7
  127. package/Libraries/Text/Text.windows.js +14 -7
  128. package/Libraries/Types/CoreEventTypes.js +137 -11
  129. package/Libraries/Types/CoreEventTypes.windows.js +147 -22
  130. package/Libraries/Utilities/Dimensions.js +0 -13
  131. package/Libraries/Utilities/HMRClient.js +3 -3
  132. package/Libraries/Utilities/Platform.ios.js +0 -7
  133. package/Libraries/Utilities/ReactNativeTestTools.js +3 -1
  134. package/Libraries/Utilities/codegenNativeCommands.js +11 -2
  135. package/Libraries/Utilities/deepFreezeAndThrowOnMutationInDev.js +2 -0
  136. package/Libraries/Utilities/stringifySafe.js +3 -1
  137. package/Libraries/Utilities/truncate.js +1 -1
  138. package/Libraries/Utilities/verifyComponentAttributeEquivalence.js +2 -2
  139. package/Libraries/Vibration/Vibration.js +1 -1
  140. package/Libraries/WebSocket/WebSocket.js +1 -0
  141. package/Libraries/vendor/emitter/EventEmitter.js +105 -12
  142. package/Libraries/vendor/emitter/__flowtests__/EventEmitter-flowtest.js +73 -117
  143. package/Microsoft.ReactNative/Base/CoreNativeModules.cpp +24 -12
  144. package/Microsoft.ReactNative/CoreApp.cpp +303 -0
  145. package/Microsoft.ReactNative/CoreAppPage.cpp +21 -0
  146. package/Microsoft.ReactNative/CoreAppPage.h +15 -0
  147. package/Microsoft.ReactNative/CoreAppPage.idl +12 -0
  148. package/Microsoft.ReactNative/CoreAppPage.xaml +14 -0
  149. package/Microsoft.ReactNative/Fabric/ActivityIndicatorComponentView.cpp +1 -2
  150. package/Microsoft.ReactNative/Fabric/ActivityIndicatorComponentView.h +1 -1
  151. package/Microsoft.ReactNative/Fabric/ComponentView.h +1 -1
  152. package/Microsoft.ReactNative/Fabric/ImageComponentView.cpp +1 -1
  153. package/Microsoft.ReactNative/Fabric/ImageComponentView.h +1 -1
  154. package/Microsoft.ReactNative/Fabric/ParagraphComponentView.cpp +1 -1
  155. package/Microsoft.ReactNative/Fabric/ParagraphComponentView.h +1 -1
  156. package/Microsoft.ReactNative/Fabric/ScrollViewComponentView.cpp +1 -1
  157. package/Microsoft.ReactNative/Fabric/ScrollViewComponentView.h +1 -1
  158. package/Microsoft.ReactNative/Fabric/SliderComponentView.cpp +1 -1
  159. package/Microsoft.ReactNative/Fabric/SliderComponentView.h +1 -1
  160. package/Microsoft.ReactNative/Fabric/SwitchComponentView.cpp +1 -1
  161. package/Microsoft.ReactNative/Fabric/SwitchComponentView.h +1 -1
  162. package/Microsoft.ReactNative/Fabric/TextComponentView.cpp +1 -1
  163. package/Microsoft.ReactNative/Fabric/TextComponentView.h +1 -1
  164. package/Microsoft.ReactNative/Fabric/TextInput/WindowsTextInputComponentView.cpp +1 -1
  165. package/Microsoft.ReactNative/Fabric/TextInput/WindowsTextInputComponentView.h +1 -1
  166. package/Microsoft.ReactNative/Fabric/ViewComponentView.cpp +1 -1
  167. package/Microsoft.ReactNative/Fabric/ViewComponentView.h +1 -1
  168. package/Microsoft.ReactNative/GlyphViewManager.cpp +1 -0
  169. package/Microsoft.ReactNative/IReactDispatcher.cpp +18 -0
  170. package/Microsoft.ReactNative/IReactDispatcher.h +18 -3
  171. package/Microsoft.ReactNative/IReactDispatcher.idl +15 -0
  172. package/Microsoft.ReactNative/IReactNotificationService.cpp +197 -70
  173. package/Microsoft.ReactNative/IReactNotificationService.h +11 -30
  174. package/Microsoft.ReactNative/IReactPropertyBag.cpp +9 -0
  175. package/Microsoft.ReactNative/IReactPropertyBag.h +3 -0
  176. package/Microsoft.ReactNative/IReactPropertyBag.idl +3 -0
  177. package/Microsoft.ReactNative/JsiApi.cpp +41 -1
  178. package/Microsoft.ReactNative/JsiApi.h +3 -0
  179. package/Microsoft.ReactNative/JsiApi.idl +19 -1
  180. package/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj +18 -2
  181. package/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj.filters +7 -7
  182. package/Microsoft.ReactNative/Modules/AccessibilityInfoModule.h +1 -1
  183. package/Microsoft.ReactNative/Modules/AlertModule.cpp +15 -12
  184. package/Microsoft.ReactNative/Modules/AlertModule.h +1 -1
  185. package/Microsoft.ReactNative/Modules/AppStateModule.cpp +45 -9
  186. package/Microsoft.ReactNative/Modules/AppStateModule.h +9 -3
  187. package/Microsoft.ReactNative/Modules/AppThemeModuleUwp.h +1 -1
  188. package/Microsoft.ReactNative/Modules/ClipboardModule.h +1 -1
  189. package/Microsoft.ReactNative/Modules/DevSettingsModule.h +1 -1
  190. package/Microsoft.ReactNative/Modules/DeviceInfoModule.h +1 -1
  191. package/Microsoft.ReactNative/Modules/I18nManagerModule.h +1 -1
  192. package/Microsoft.ReactNative/Modules/ImageViewManagerModule.cpp +1 -1
  193. package/Microsoft.ReactNative/Modules/ImageViewManagerModule.h +1 -1
  194. package/Microsoft.ReactNative/Modules/LinkingManagerModule.h +1 -1
  195. package/Microsoft.ReactNative/Modules/LogBoxModule.h +1 -1
  196. package/Microsoft.ReactNative/Modules/NativeUIManager.cpp +66 -39
  197. package/Microsoft.ReactNative/Modules/PaperUIManagerModule.cpp +41 -11
  198. package/Microsoft.ReactNative/Modules/PaperUIManagerModule.h +1 -1
  199. package/Microsoft.ReactNative/QuirkSettings.cpp +22 -0
  200. package/Microsoft.ReactNative/QuirkSettings.h +10 -0
  201. package/Microsoft.ReactNative/QuirkSettings.idl +7 -0
  202. package/Microsoft.ReactNative/ReactApplication.cpp +44 -0
  203. package/Microsoft.ReactNative/ReactApplication.h +40 -5
  204. package/Microsoft.ReactNative/ReactHost/JSCallInvokerScheduler.cpp +5 -2
  205. package/Microsoft.ReactNative/ReactHost/JSCallInvokerScheduler.h +1 -0
  206. package/Microsoft.ReactNative/ReactHost/ReactInstanceWin.cpp +23 -4
  207. package/Microsoft.ReactNative/ReactHost/ReactInstanceWin.h +1 -1
  208. package/Microsoft.ReactNative/ReactPointerEventArgs.cpp +12 -2
  209. package/Microsoft.ReactNative/Utils/BatchingEventEmitter.cpp +1 -0
  210. package/Microsoft.ReactNative/Utils/Helpers.cpp +1 -1
  211. package/Microsoft.ReactNative/Utils/Helpers.h +1 -1
  212. package/Microsoft.ReactNative/Utils/PropertyUtils.h +1 -1
  213. package/Microsoft.ReactNative/Utils/TransformableText.h +1 -1
  214. package/Microsoft.ReactNative/Utils/ValueUtils.cpp +0 -1
  215. package/Microsoft.ReactNative/Views/DynamicAutomationPeer.cpp +9 -7
  216. package/Microsoft.ReactNative/Views/DynamicAutomationProperties.cpp +3 -3
  217. package/Microsoft.ReactNative/Views/FlyoutViewManager.cpp +13 -1
  218. package/Microsoft.ReactNative/Views/FrameworkElementTransferProperties.cpp +1 -1
  219. package/Microsoft.ReactNative/Views/FrameworkElementViewManager.cpp +63 -13
  220. package/Microsoft.ReactNative/Views/Image/ImageViewManager.cpp +1 -1
  221. package/Microsoft.ReactNative/Views/Image/ReactImage.cpp +5 -6
  222. package/Microsoft.ReactNative/Views/Image/ReactImage.h +4 -4
  223. package/Microsoft.ReactNative/Views/Text/TextTransformParentVisitor.h +1 -1
  224. package/Microsoft.ReactNative/Views/TextInputViewManager.cpp +21 -2
  225. package/Microsoft.ReactNative/Views/TextViewManager.cpp +6 -3
  226. package/Microsoft.ReactNative/Views/TouchEventHandler.cpp +1 -1
  227. package/Microsoft.ReactNative/Views/ViewManagerBase.cpp +7 -1
  228. package/Microsoft.ReactNative/Views/ViewPanel.cpp +4 -0
  229. package/Microsoft.ReactNative/Views/ViewViewManager.cpp +8 -3
  230. package/Microsoft.ReactNative/Views/cppwinrt/DynamicAutomationPeer.idl +2 -0
  231. package/Microsoft.ReactNative/microsoft.reactnative.def +4 -1
  232. package/Microsoft.ReactNative.Cxx/AppModelHelpers.h +17 -0
  233. package/Microsoft.ReactNative.Cxx/CoreApp.h +60 -0
  234. package/Microsoft.ReactNative.Cxx/JSI/JsiAbiApi.cpp +65 -0
  235. package/Microsoft.ReactNative.Cxx/JSI/JsiAbiApi.h +13 -0
  236. package/Microsoft.ReactNative.Cxx/JSI/JsiValueHelpers.cpp +53 -0
  237. package/Microsoft.ReactNative.Cxx/JSI/JsiValueHelpers.h +32 -0
  238. package/Microsoft.ReactNative.Cxx/JSI/NodeApiJsiRuntime.cpp +14 -2
  239. package/Microsoft.ReactNative.Cxx/Microsoft.ReactNative.Cxx.vcxitems +3 -0
  240. package/Microsoft.ReactNative.Cxx/Microsoft.ReactNative.Cxx.vcxitems.filters +7 -0
  241. package/Microsoft.ReactNative.Managed/packages.lock.json +1 -24
  242. package/Mso/dispatchQueue/dispatchQueue.h +12 -4
  243. package/Mso/src/dispatchQueue/looperScheduler.cpp +36 -9
  244. package/Mso/src/dispatchQueue/queueService.cpp +2 -2
  245. package/Mso/src/dispatchQueue/queueService.h +2 -2
  246. package/Mso/src/memoryApi/memoryApi.cpp +3 -0
  247. package/PropertySheets/Generated/PackageVersion.g.props +3 -3
  248. package/PropertySheets/JSEngine.props +1 -1
  249. package/PropertySheets/Release.props +6 -0
  250. package/ReactCommon/ReactCommon.vcxproj +11 -21
  251. package/ReactCommon/ReactCommon.vcxproj.filters +64 -46
  252. package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/JSExecutor.h +145 -0
  253. package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/NativeToJsBridge.cpp +344 -0
  254. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/text/BaseTextProps.cpp +313 -0
  255. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/ViewProps.cpp +455 -0
  256. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/core/ConcreteComponentDescriptor.h +216 -0
  257. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/core/PropsMacros.h +91 -0
  258. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/graphics/RectangleEdges.h +100 -0
  259. package/ReactCommon/TEMP_UntilReactCommonUpdate/yoga/yoga/CompactValue.h +3 -1
  260. package/Scripts/Microsoft.ReactNative.nuspec +6 -0
  261. package/Scripts/Microsoft.ReactNative.targets +7 -0
  262. package/Shared/DevSettings.h +4 -0
  263. package/Shared/JSI/ChakraRuntime.cpp +11 -2
  264. package/Shared/JSI/ChakraRuntime.h +2 -0
  265. package/Shared/Modules/BlobModule.cpp +4 -4
  266. package/Shared/Modules/BlobModule.h +1 -1
  267. package/Shared/Modules/FileReaderModule.cpp +3 -2
  268. package/Shared/Modules/IBlobPersistor.h +1 -1
  269. package/Shared/Networking/IHttpResource.h +1 -0
  270. package/Shared/Networking/OriginPolicyHttpFilter.cpp +16 -10
  271. package/Shared/Networking/WinRTHttpResource.cpp +34 -2
  272. package/Shared/OInstance.cpp +14 -6
  273. package/Shared/Threading/BatchingQueueThread.cpp +23 -12
  274. package/Shared/Utils.cpp +2 -5
  275. package/codegen/NativeAlertManagerSpec.g.h +2 -0
  276. package/codegen/NativeAnimatedModuleSpec.g.h +6 -0
  277. package/codegen/NativeAnimatedTurboModuleSpec.g.h +6 -0
  278. package/codegen/react/components/rnwcore/Props.cpp +2 -2
  279. package/codegen/react/components/rnwcore/Props.h +1 -1
  280. package/fmt/cgmanifest.json +14 -0
  281. package/fmt/fmt.vcxproj +25 -11
  282. package/jest/assetFileTransformer.js +3 -2
  283. package/jest/setup.js +4 -0
  284. package/package.json +27 -28
  285. package/rntypes/index.d.ts +0 -1
  286. package/template/cs-app-WinAppSDK/proj/{NuGet.Config → NuGet_Config} +0 -0
  287. package/template/metro.devMode.config.js +49 -2
  288. package/template/shared-app/proj/{NuGet.Config → NuGet_Config} +0 -0
  289. package/template/shared-lib/proj/{NuGet.Config → NuGet_Config} +0 -0
  290. package/Libraries/vendor/emitter/EventSubscription.js +0 -19
  291. package/Libraries/vendor/emitter/_EmitterSubscription.js +0 -62
  292. package/Libraries/vendor/emitter/_EventEmitter.js +0 -184
  293. package/Libraries/vendor/emitter/_EventSubscription.js +0 -45
  294. package/Libraries/vendor/emitter/_EventSubscriptionVendor.js +0 -108
  295. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/nativemodule/core/ReactCommon/TurboModule.h +0 -87
  296. package/Scripts/copyRNLibraries.js +0 -99
  297. package/jest/preprocessor.js +0 -40
  298. package/jest/preprocessor_DO_NOT_USE.js +0 -122
@@ -99,10 +99,10 @@ const bubblingEventTypes = {
99
99
  bubbled: 'onPointerDown',
100
100
  },
101
101
  },
102
- topPointerMove2: {
102
+ topPointerMove: {
103
103
  phasedRegistrationNames: {
104
- captured: 'onPointerMove2Capture',
105
- bubbled: 'onPointerMove2',
104
+ captured: 'onPointerMoveCapture',
105
+ bubbled: 'onPointerMove',
106
106
  },
107
107
  },
108
108
  topPointerUp: {
@@ -111,20 +111,32 @@ const bubblingEventTypes = {
111
111
  bubbled: 'onPointerUp',
112
112
  },
113
113
  },
114
- topPointerEnter2: {
114
+ topPointerEnter: {
115
115
  phasedRegistrationNames: {
116
- captured: 'onPointerEnter2Capture',
117
- bubbled: 'onPointerEnter2',
116
+ captured: 'onPointerEnterCapture',
117
+ bubbled: 'onPointerEnter',
118
118
  skipBubbling: true,
119
119
  },
120
120
  },
121
- topPointerLeave2: {
121
+ topPointerLeave: {
122
122
  phasedRegistrationNames: {
123
- captured: 'onPointerLeave2Capture',
124
- bubbled: 'onPointerLeave2',
123
+ captured: 'onPointerLeaveCapture',
124
+ bubbled: 'onPointerLeave',
125
125
  skipBubbling: true,
126
126
  },
127
127
  },
128
+ topPointerOver: {
129
+ phasedRegistrationNames: {
130
+ captured: 'onPointerOverCapture',
131
+ bubbled: 'onPointerOver',
132
+ },
133
+ },
134
+ topPointerOut: {
135
+ phasedRegistrationNames: {
136
+ captured: 'onPointerOutCapture',
137
+ bubbled: 'onPointerOut',
138
+ },
139
+ },
128
140
  };
129
141
 
130
142
  const directEventTypes = {
@@ -312,9 +324,11 @@ const validAttributesForEventProps = ConditionallyIgnoredEventHandlers({
312
324
  onPointerUp: true,
313
325
  onPointerDown: true,
314
326
  onPointerCancel: true,
315
- onPointerEnter2: true,
316
- onPointerMove2: true,
317
- onPointerLeave2: true,
327
+ onPointerEnter: true,
328
+ onPointerMove: true,
329
+ onPointerLeave: true,
330
+ onPointerOver: true,
331
+ onPointerOut: true,
318
332
  });
319
333
 
320
334
  /**
@@ -99,10 +99,10 @@ const bubblingEventTypes = {
99
99
  bubbled: 'onPointerDown',
100
100
  },
101
101
  },
102
- topPointerMove2: {
102
+ topPointerMove: {
103
103
  phasedRegistrationNames: {
104
- captured: 'onPointerMove2Capture',
105
- bubbled: 'onPointerMove2',
104
+ captured: 'onPointerMoveCapture',
105
+ bubbled: 'onPointerMove',
106
106
  },
107
107
  },
108
108
  topPointerUp: {
@@ -111,20 +111,32 @@ const bubblingEventTypes = {
111
111
  bubbled: 'onPointerUp',
112
112
  },
113
113
  },
114
- topPointerEnter2: {
114
+ topPointerEnter: {
115
115
  phasedRegistrationNames: {
116
- captured: 'onPointerEnter2Capture',
117
- bubbled: 'onPointerEnter2',
116
+ captured: 'onPointerEnterCapture',
117
+ bubbled: 'onPointerEnter',
118
118
  skipBubbling: true,
119
119
  },
120
120
  },
121
- topPointerLeave2: {
121
+ topPointerLeave: {
122
122
  phasedRegistrationNames: {
123
- captured: 'onPointerLeave2Capture',
124
- bubbled: 'onPointerLeave2',
123
+ captured: 'onPointerLeaveCapture',
124
+ bubbled: 'onPointerLeave',
125
125
  skipBubbling: true,
126
126
  },
127
127
  },
128
+ topPointerOver: {
129
+ phasedRegistrationNames: {
130
+ captured: 'onPointerOverCapture',
131
+ bubbled: 'onPointerOver',
132
+ },
133
+ },
134
+ topPointerOut: {
135
+ phasedRegistrationNames: {
136
+ captured: 'onPointerOutCapture',
137
+ bubbled: 'onPointerOut',
138
+ },
139
+ },
128
140
  };
129
141
 
130
142
  const directEventTypes = {
@@ -312,9 +324,11 @@ const validAttributesForEventProps = ConditionallyIgnoredEventHandlers({
312
324
  onPointerUp: true,
313
325
  onPointerDown: true,
314
326
  onPointerCancel: true,
315
- onPointerEnter2: true,
316
- onPointerMove2: true,
317
- onPointerLeave2: true,
327
+ onPointerEnter: true,
328
+ onPointerMove: true,
329
+ onPointerLeave: true,
330
+ onPointerOver: true,
331
+ onPointerOut: true,
318
332
  });
319
333
 
320
334
  /**
@@ -10,16 +10,15 @@
10
10
 
11
11
  'use strict';
12
12
 
13
- import {type EventSubscription} from '../vendor/emitter/EventEmitter';
14
-
15
13
  import type {IPerformanceLogger} from '../Utilities/createPerformanceLogger';
16
14
 
15
+ import {type EventSubscription} from '../vendor/emitter/EventEmitter';
16
+
17
17
  const BlobManager = require('../Blob/BlobManager');
18
- const EventTarget = require('event-target-shim');
19
18
  const GlobalPerformanceLogger = require('../Utilities/GlobalPerformanceLogger');
20
19
  const RCTNetworking = require('./RCTNetworking');
21
-
22
20
  const base64 = require('base64-js');
21
+ const EventTarget = require('event-target-shim');
23
22
  const invariant = require('invariant');
24
23
 
25
24
  const DEBUG_NETWORK_SEND_DELAY: false = false; // Set to a number of milliseconds when debugging
@@ -625,13 +624,12 @@ class XMLHttpRequest extends (EventTarget(...XHR_EVENTS): any) {
625
624
  setResponseHeaders(responseHeaders: ?Object): void {
626
625
  this.responseHeaders = responseHeaders || null;
627
626
  const headers = responseHeaders || {};
628
- this._lowerCaseResponseHeaders = Object.keys(headers).reduce(
629
- (lcaseHeaders, headerName) => {
630
- lcaseHeaders[headerName.toLowerCase()] = headers[headerName];
631
- return lcaseHeaders;
632
- },
633
- {},
634
- );
627
+ this._lowerCaseResponseHeaders = Object.keys(headers).reduce<{
628
+ [string]: any,
629
+ }>((lcaseHeaders, headerName) => {
630
+ lcaseHeaders[headerName.toLowerCase()] = headers[headerName];
631
+ return lcaseHeaders;
632
+ }, {});
635
633
  }
636
634
 
637
635
  setReadyState(newState: number): void {
@@ -61,6 +61,7 @@ class PureComponentDebug<
61
61
  }
62
62
  }
63
63
  for (const key in this.state) {
64
+ // $FlowFixMe[incompatible-use]
64
65
  if (this.state[key] !== (nextState || {})[key]) {
65
66
  ret = true;
66
67
  console.warn('PureComponentDebug: different state values', tag, key);
@@ -32,15 +32,21 @@ export type PermissionType =
32
32
  | 'android.permission.READ_CALL_LOG'
33
33
  | 'android.permission.WRITE_CALL_LOG'
34
34
  | 'com.android.voicemail.permission.ADD_VOICEMAIL'
35
+ | 'com.android.voicemail.permission.READ_VOICEMAIL'
36
+ | 'com.android.voicemail.permission.WRITE_VOICEMAIL'
35
37
  | 'android.permission.USE_SIP'
36
38
  | 'android.permission.PROCESS_OUTGOING_CALLS'
37
39
  | 'android.permission.BODY_SENSORS'
40
+ | 'android.permission.BODY_SENSORS_BACKGROUND'
38
41
  | 'android.permission.SEND_SMS'
39
42
  | 'android.permission.RECEIVE_SMS'
40
43
  | 'android.permission.READ_SMS'
41
44
  | 'android.permission.RECEIVE_WAP_PUSH'
42
45
  | 'android.permission.RECEIVE_MMS'
43
46
  | 'android.permission.READ_EXTERNAL_STORAGE'
47
+ | 'android.permission.READ_MEDIA_IMAGES',
48
+ | 'android.permission.READ_MEDIA_VIDEO',
49
+ | 'android.permission.READ_MEDIA_AUDIO',
44
50
  | 'android.permission.WRITE_EXTERNAL_STORAGE'
45
51
  | 'android.permission.BLUETOOTH_CONNECT'
46
52
  | 'android.permission.BLUETOOTH_SCAN'
@@ -50,7 +56,9 @@ export type PermissionType =
50
56
  | 'android.permission.ACTIVITY_RECOGNITION'
51
57
  | 'android.permission.ANSWER_PHONE_CALLS'
52
58
  | 'android.permission.READ_PHONE_NUMBERS'
53
- | 'android.permission.UWB_RANGING';
59
+ | 'android.permission.UWB_RANGING'
60
+ | 'android.permission.POST_NOTIFICATIONS'
61
+ | 'android.permission.NEARBY_WIFI_DEVICES';
54
62
  */
55
63
 
56
64
  export interface Spec extends TurboModule {
@@ -49,15 +49,21 @@ const PERMISSIONS = Object.freeze({
49
49
  READ_CALL_LOG: 'android.permission.READ_CALL_LOG',
50
50
  WRITE_CALL_LOG: 'android.permission.WRITE_CALL_LOG',
51
51
  ADD_VOICEMAIL: 'com.android.voicemail.permission.ADD_VOICEMAIL',
52
+ READ_VOICEMAIL: 'com.android.voicemail.permission.READ_VOICEMAIL',
53
+ WRITE_VOICEMAIL: 'com.android.voicemail.permission.WRITE_VOICEMAIL',
52
54
  USE_SIP: 'android.permission.USE_SIP',
53
55
  PROCESS_OUTGOING_CALLS: 'android.permission.PROCESS_OUTGOING_CALLS',
54
56
  BODY_SENSORS: 'android.permission.BODY_SENSORS',
57
+ BODY_SENSORS_BACKGROUND: 'android.permission.BODY_SENSORS_BACKGROUND',
55
58
  SEND_SMS: 'android.permission.SEND_SMS',
56
59
  RECEIVE_SMS: 'android.permission.RECEIVE_SMS',
57
60
  READ_SMS: 'android.permission.READ_SMS',
58
61
  RECEIVE_WAP_PUSH: 'android.permission.RECEIVE_WAP_PUSH',
59
62
  RECEIVE_MMS: 'android.permission.RECEIVE_MMS',
60
63
  READ_EXTERNAL_STORAGE: 'android.permission.READ_EXTERNAL_STORAGE',
64
+ READ_MEDIA_IMAGES: 'android.permission.READ_MEDIA_IMAGES',
65
+ READ_MEDIA_VIDEO: 'android.permission.READ_MEDIA_VIDEO',
66
+ READ_MEDIA_AUDIO: 'android.permission.READ_MEDIA_AUDIO',
61
67
  WRITE_EXTERNAL_STORAGE: 'android.permission.WRITE_EXTERNAL_STORAGE',
62
68
  BLUETOOTH_CONNECT: 'android.permission.BLUETOOTH_CONNECT',
63
69
  BLUETOOTH_SCAN: 'android.permission.BLUETOOTH_SCAN',
@@ -68,6 +74,8 @@ const PERMISSIONS = Object.freeze({
68
74
  ANSWER_PHONE_CALLS: 'android.permission.ANSWER_PHONE_CALLS',
69
75
  READ_PHONE_NUMBERS: 'android.permission.READ_PHONE_NUMBERS',
70
76
  UWB_RANGING: 'android.permission.UWB_RANGING',
77
+ POST_NOTIFICATION: 'android.permission.POST_NOTIFICATIONS',
78
+ NEARBY_WIFI_DEVICES: 'android.permission.NEARBY_WIFI_DEVICES',
71
79
  });
72
80
 
73
81
  /**
@@ -85,19 +93,27 @@ class PermissionsAndroid {
85
93
  ACCESS_MEDIA_LOCATION: string,
86
94
  ACTIVITY_RECOGNITION: string,
87
95
  ADD_VOICEMAIL: string,
96
+ READ_VOICEMAIL: string,
97
+ WRITE_VOICEMAIL: string,
88
98
  ANSWER_PHONE_CALLS: string,
89
99
  BLUETOOTH_ADVERTISE: string,
90
100
  BLUETOOTH_CONNECT: string,
91
101
  BLUETOOTH_SCAN: string,
92
102
  BODY_SENSORS: string,
103
+ BODY_SENSORS_BACKGROUND: string,
93
104
  CALL_PHONE: string,
94
105
  CAMERA: string,
95
106
  GET_ACCOUNTS: string,
107
+ NEARBY_WIFI_DEVICES: string,
108
+ POST_NOTIFICATION: string,
96
109
  PROCESS_OUTGOING_CALLS: string,
97
110
  READ_CALENDAR: string,
98
111
  READ_CALL_LOG: string,
99
112
  READ_CONTACTS: string,
100
113
  READ_EXTERNAL_STORAGE: string,
114
+ READ_MEDIA_IMAGES: string,
115
+ READ_MEDIA_VIDEO: string,
116
+ READ_MEDIA_AUDIO: string,
101
117
  READ_PHONE_NUMBERS: string,
102
118
  READ_PHONE_STATE: string,
103
119
  READ_SMS: string,
@@ -160,8 +160,8 @@ export type EventHandlers = $ReadOnly<{|
160
160
  onFocus: (event: FocusEvent) => void,
161
161
  onMouseEnter?: (event: MouseEvent) => void,
162
162
  onMouseLeave?: (event: MouseEvent) => void,
163
- onPointerEnter2?: (event: PointerEvent) => void,
164
- onPointerLeave2?: (event: PointerEvent) => void,
163
+ onPointerEnter?: (event: PointerEvent) => void,
164
+ onPointerLeave?: (event: PointerEvent) => void,
165
165
  onResponderGrant: (event: PressEvent) => void,
166
166
  onResponderMove: (event: PressEvent) => void,
167
167
  onResponderRelease: (event: PressEvent) => void,
@@ -255,20 +255,20 @@ const Transitions = Object.freeze({
255
255
  },
256
256
  });
257
257
 
258
- const isActiveSignal = signal =>
258
+ const isActiveSignal = (signal: TouchState) =>
259
259
  signal === 'RESPONDER_ACTIVE_PRESS_IN' ||
260
260
  signal === 'RESPONDER_ACTIVE_LONG_PRESS_IN';
261
261
 
262
- const isActivationSignal = signal =>
262
+ const isActivationSignal = (signal: TouchState) =>
263
263
  signal === 'RESPONDER_ACTIVE_PRESS_OUT' ||
264
264
  signal === 'RESPONDER_ACTIVE_PRESS_IN';
265
265
 
266
- const isPressInSignal = signal =>
266
+ const isPressInSignal = (signal: TouchState) =>
267
267
  signal === 'RESPONDER_INACTIVE_PRESS_IN' ||
268
268
  signal === 'RESPONDER_ACTIVE_PRESS_IN' ||
269
269
  signal === 'RESPONDER_ACTIVE_LONG_PRESS_IN';
270
270
 
271
- const isTerminalSignal = signal =>
271
+ const isTerminalSignal = (signal: TouchSignal) =>
272
272
  signal === 'RESPONDER_TERMINATED' || signal === 'RESPONDER_RELEASE';
273
273
 
274
274
  const DEFAULT_LONG_PRESS_DELAY_MS = 500;
@@ -557,12 +557,12 @@ export default class Pressability {
557
557
  ReactNativeFeatureFlags.shouldPressibilityUseW3CPointerEventsForHover()
558
558
  ) {
559
559
  const hoverPointerEvents = {
560
- onPointerEnter2: undefined,
561
- onPointerLeave2: undefined,
560
+ onPointerEnter: undefined,
561
+ onPointerLeave: undefined,
562
562
  };
563
563
  const {onHoverIn, onHoverOut} = this._config;
564
564
  if (onHoverIn != null) {
565
- hoverPointerEvents.onPointerEnter2 = (event: PointerEvent) => {
565
+ hoverPointerEvents.onPointerEnter = (event: PointerEvent) => {
566
566
  this._isHovered = true;
567
567
  this._cancelHoverOutDelayTimeout();
568
568
  if (onHoverIn != null) {
@@ -579,7 +579,7 @@ export default class Pressability {
579
579
  };
580
580
  }
581
581
  if (onHoverOut != null) {
582
- hoverPointerEvents.onPointerLeave2 = (event: PointerEvent) => {
582
+ hoverPointerEvents.onPointerLeave = (event: PointerEvent) => {
583
583
  if (this._isHovered) {
584
584
  this._isHovered = false;
585
585
  this._cancelHoverInDelayTimeout();
@@ -808,7 +808,14 @@ export default class Pressability {
808
808
  }
809
809
  }
810
810
 
811
- _measureCallback = (left, top, width, height, pageX, pageY) => {
811
+ _measureCallback = (
812
+ left: number,
813
+ top: number,
814
+ width: number,
815
+ height: number,
816
+ pageX: number,
817
+ pageY: number,
818
+ ) => {
812
819
  if (!left && !top && !width && !height && !pageX && !pageY) {
813
820
  return;
814
821
  }
@@ -918,7 +925,11 @@ export default class Pressability {
918
925
  }
919
926
  }
920
927
 
921
- function normalizeDelay(delay: ?number, min = 0, fallback = 0): number {
928
+ function normalizeDelay(
929
+ delay: ?number,
930
+ min: number = 0,
931
+ fallback: number = 0,
932
+ ): number {
922
933
  return Math.max(min, delay ?? fallback);
923
934
  }
924
935
 
@@ -935,16 +946,15 @@ const getTouchFromPressEvent = (event: PressEvent) => {
935
946
  };
936
947
 
937
948
  function convertPointerEventToMouseEvent(input: PointerEvent): MouseEvent {
938
- const {touchHistory: _, ...synthEvent} = input;
939
- const {clientX, clientY, timestamp} = input.nativeEvent;
949
+ const {clientX, clientY} = input.nativeEvent;
940
950
  return {
941
- ...synthEvent,
951
+ ...input,
942
952
  nativeEvent: {
943
953
  clientX,
944
954
  clientY,
945
955
  pageX: clientX,
946
956
  pageY: clientY,
947
- timestamp,
957
+ timestamp: input.timeStamp,
948
958
  },
949
959
  };
950
960
  }
@@ -187,8 +187,8 @@ export type EventHandlers = $ReadOnly<{|
187
187
  onFocus: (event: FocusEvent) => void,
188
188
  onMouseEnter?: (event: MouseEvent) => void,
189
189
  onMouseLeave?: (event: MouseEvent) => void,
190
- onPointerEnter2?: (event: PointerEvent) => void,
191
- onPointerLeave2?: (event: PointerEvent) => void,
190
+ onPointerEnter?: (event: PointerEvent) => void,
191
+ onPointerLeave?: (event: PointerEvent) => void,
192
192
  onResponderGrant: (event: PressEvent) => void,
193
193
  onResponderMove: (event: PressEvent) => void,
194
194
  onResponderRelease: (event: PressEvent) => void,
@@ -286,20 +286,20 @@ const Transitions = Object.freeze({
286
286
  },
287
287
  });
288
288
 
289
- const isActiveSignal = signal =>
289
+ const isActiveSignal = (signal: TouchState) =>
290
290
  signal === 'RESPONDER_ACTIVE_PRESS_IN' ||
291
291
  signal === 'RESPONDER_ACTIVE_LONG_PRESS_IN';
292
292
 
293
- const isActivationSignal = signal =>
293
+ const isActivationSignal = (signal: TouchState) =>
294
294
  signal === 'RESPONDER_ACTIVE_PRESS_OUT' ||
295
295
  signal === 'RESPONDER_ACTIVE_PRESS_IN';
296
296
 
297
- const isPressInSignal = signal =>
297
+ const isPressInSignal = (signal: TouchState) =>
298
298
  signal === 'RESPONDER_INACTIVE_PRESS_IN' ||
299
299
  signal === 'RESPONDER_ACTIVE_PRESS_IN' ||
300
300
  signal === 'RESPONDER_ACTIVE_LONG_PRESS_IN';
301
301
 
302
- const isTerminalSignal = signal =>
302
+ const isTerminalSignal = (signal: TouchSignal) =>
303
303
  signal === 'RESPONDER_TERMINATED' || signal === 'RESPONDER_RELEASE';
304
304
 
305
305
  const DEFAULT_LONG_PRESS_DELAY_MS = 500;
@@ -624,12 +624,12 @@ export default class Pressability {
624
624
  ReactNativeFeatureFlags.shouldPressibilityUseW3CPointerEventsForHover()
625
625
  ) {
626
626
  const hoverPointerEvents = {
627
- onPointerEnter2: undefined,
628
- onPointerLeave2: undefined,
627
+ onPointerEnter: undefined,
628
+ onPointerLeave: undefined,
629
629
  };
630
630
  const {onHoverIn, onHoverOut} = this._config;
631
631
  if (onHoverIn != null) {
632
- hoverPointerEvents.onPointerEnter2 = (event: PointerEvent) => {
632
+ hoverPointerEvents.onPointerEnter = (event: PointerEvent) => {
633
633
  this._isHovered = true;
634
634
  this._cancelHoverOutDelayTimeout();
635
635
  if (onHoverIn != null) {
@@ -646,7 +646,7 @@ export default class Pressability {
646
646
  };
647
647
  }
648
648
  if (onHoverOut != null) {
649
- hoverPointerEvents.onPointerLeave2 = (event: PointerEvent) => {
649
+ hoverPointerEvents.onPointerLeave = (event: PointerEvent) => {
650
650
  if (this._isHovered) {
651
651
  this._isHovered = false;
652
652
  this._cancelHoverInDelayTimeout();
@@ -810,7 +810,10 @@ export default class Pressability {
810
810
 
811
811
  if (isPressInSignal(prevState) && signal === 'LONG_PRESS_DETECTED') {
812
812
  const {onLongPress} = this._config;
813
- if (onLongPress != null) {
813
+ if (
814
+ onLongPress != null &&
815
+ this._isDefaultPressButton(getTouchFromPressEvent(event).button)
816
+ ) {
814
817
  onLongPress(event);
815
818
  }
816
819
  }
@@ -902,7 +905,14 @@ export default class Pressability {
902
905
  }
903
906
  }
904
907
 
905
- _measureCallback = (left, top, width, height, pageX, pageY) => {
908
+ _measureCallback = (
909
+ left: number,
910
+ top: number,
911
+ width: number,
912
+ height: number,
913
+ pageX: number,
914
+ pageY: number,
915
+ ) => {
906
916
  if (!left && !top && !width && !height && !pageX && !pageY) {
907
917
  return;
908
918
  }
@@ -1012,7 +1022,11 @@ export default class Pressability {
1012
1022
  }
1013
1023
  }
1014
1024
 
1015
- function normalizeDelay(delay: ?number, min = 0, fallback = 0): number {
1025
+ function normalizeDelay(
1026
+ delay: ?number,
1027
+ min: number = 0,
1028
+ fallback: number = 0,
1029
+ ): number {
1016
1030
  return Math.max(min, delay ?? fallback);
1017
1031
  }
1018
1032
 
@@ -1029,8 +1043,7 @@ const getTouchFromPressEvent = (event: PressEvent) => {
1029
1043
  };
1030
1044
 
1031
1045
  function convertPointerEventToMouseEvent(input: PointerEvent): MouseEvent {
1032
- const {touchHistory: _, ...synthEvent} = input;
1033
- const {clientX, clientY, timestamp} = input.nativeEvent;
1046
+ const {clientX, clientY} = input.nativeEvent;
1034
1047
  // [Windows
1035
1048
  const {
1036
1049
  pointerType,
@@ -1047,13 +1060,13 @@ function convertPointerEventToMouseEvent(input: PointerEvent): MouseEvent {
1047
1060
  } = input.nativeEvent;
1048
1061
  // Windows]
1049
1062
  return {
1050
- ...synthEvent,
1063
+ ...input,
1051
1064
  nativeEvent: {
1052
1065
  clientX,
1053
1066
  clientY,
1054
1067
  pageX: clientX,
1055
1068
  pageY: clientY,
1056
- timestamp,
1069
+ timestamp: input.timeStamp,
1057
1070
  // [Windows
1058
1071
  target:
1059
1072
  input.nativeEvent.target ??
@@ -12,7 +12,6 @@
12
12
 
13
13
  const Promise = require('promise/setimmediate/es6-extensions');
14
14
 
15
- require('promise/setimmediate/done');
16
15
  require('promise/setimmediate/finally');
17
16
 
18
17
  if (__DEV__) {
@@ -338,19 +338,22 @@ const AppRegistry = {
338
338
  },
339
339
  };
340
340
 
341
- BatchedBridge.registerCallableModule('AppRegistry', AppRegistry);
342
-
343
- if (__DEV__) {
344
- const LogBoxInspector = require('../LogBox/LogBoxInspectorContainer').default;
345
- AppRegistry.registerComponent('LogBox', () => LogBoxInspector);
346
- } else {
347
- AppRegistry.registerComponent(
348
- 'LogBox',
349
- () =>
350
- function NoOp() {
351
- return null;
352
- },
353
- );
341
+ if (!(global.RN$Bridgeless === true)) {
342
+ BatchedBridge.registerCallableModule('AppRegistry', AppRegistry);
343
+
344
+ if (__DEV__) {
345
+ const LogBoxInspector =
346
+ require('../LogBox/LogBoxInspectorContainer').default;
347
+ AppRegistry.registerComponent('LogBox', () => LogBoxInspector);
348
+ } else {
349
+ AppRegistry.registerComponent(
350
+ 'LogBox',
351
+ () =>
352
+ function NoOp() {
353
+ return null;
354
+ },
355
+ );
356
+ }
354
357
  }
355
358
 
356
359
  module.exports = AppRegistry;
@@ -146,6 +146,8 @@ module.exports = {
146
146
  errorMessageForMethod('setLayoutAnimationEnabledExperimental'),
147
147
  );
148
148
  },
149
+ // Please use AccessibilityInfo.sendAccessibilityEvent_unstable instead.
150
+ // See SetAccessibilityFocusExample in AccessibilityExample.js for a migration example.
149
151
  sendAccessibilityEvent: (reactTag: ?number, eventType: number): void =>
150
152
  console.error(errorMessageForMethod('sendAccessibilityEvent')),
151
153
  showPopupMenu: (
@@ -8,16 +8,16 @@
8
8
  * @format
9
9
  */
10
10
 
11
+ import type {RootTag} from 'react-native/Libraries/Types/RootTagTypes';
12
+
13
+ import NativeUIManager from './NativeUIManager';
14
+
11
15
  const NativeModules = require('../BatchedBridge/NativeModules');
16
+ const defineLazyObjectProperty = require('../Utilities/defineLazyObjectProperty');
12
17
  const Platform = require('../Utilities/Platform');
13
18
  const UIManagerProperties = require('./UIManagerProperties');
14
19
 
15
- const defineLazyObjectProperty = require('../Utilities/defineLazyObjectProperty');
16
-
17
- import NativeUIManager from './NativeUIManager';
18
- import type {RootTag} from 'react-native/Libraries/Types/RootTagTypes';
19
-
20
- const viewManagerConfigs = {};
20
+ const viewManagerConfigs: {[string]: any | null} = {};
21
21
 
22
22
  const triedLoadingConfig = new Set();
23
23
 
@@ -114,14 +114,14 @@ const UIManagerJS = {
114
114
  // $FlowFixMe[prop-missing]
115
115
  NativeUIManager.getViewManagerConfig = UIManagerJS.getViewManagerConfig;
116
116
 
117
- function lazifyViewManagerConfig(viewName) {
117
+ function lazifyViewManagerConfig(viewName: string) {
118
118
  const viewConfig = getConstants()[viewName];
119
119
  viewManagerConfigs[viewName] = viewConfig;
120
120
  if (viewConfig.Manager) {
121
121
  defineLazyObjectProperty(viewConfig, 'Constants', {
122
122
  get: () => {
123
123
  const viewManager = NativeModules[viewConfig.Manager];
124
- const constants = {};
124
+ const constants: {[string]: mixed} = {};
125
125
  viewManager &&
126
126
  Object.keys(viewManager).forEach(key => {
127
127
  const value = viewManager[key];
@@ -135,7 +135,7 @@ function lazifyViewManagerConfig(viewName) {
135
135
  defineLazyObjectProperty(viewConfig, 'Commands', {
136
136
  get: () => {
137
137
  const viewManager = NativeModules[viewConfig.Manager];
138
- const commands = {};
138
+ const commands: {[string]: number} = {};
139
139
  let index = 0;
140
140
  viewManager &&
141
141
  Object.keys(viewManager).forEach(key => {
@@ -9,15 +9,14 @@
9
9
  */
10
10
 
11
11
  const NativeModules = require('../BatchedBridge/NativeModules');
12
+ const defineLazyObjectProperty = require('../Utilities/defineLazyObjectProperty');
12
13
  const Platform = require('../Utilities/Platform');
13
14
  const UIManagerProperties = require('./UIManagerProperties');
14
15
 
15
- const defineLazyObjectProperty = require('../Utilities/defineLazyObjectProperty');
16
-
17
16
  import NativeUIManager from './NativeUIManager';
18
17
  // import type {RootTag} from 'react-native/Libraries/Types/RootTagTypes'; [Windows]
19
18
 
20
- const viewManagerConfigs = {};
19
+ const viewManagerConfigs: {[string]: any | null} = {};
21
20
 
22
21
  const triedLoadingConfig = new Set();
23
22
 
@@ -97,7 +96,7 @@ UIManagerJS.getConstants = getConstants;
97
96
  // },
98
97
  // $FlowFixMe
99
98
  UIManagerJS.getViewManagerConfig = getViewManagerConfig;
100
-
99
+ // $FlowFixMe
101
100
  UIManagerJS.hasViewManagerConfig = (viewManagerName: string) =>
102
101
  getViewManagerConfig(viewManagerName) != null;
103
102
 
@@ -114,14 +113,14 @@ if (!global.nativeCallSyncHook)
114
113
  // $FlowFixMe
115
114
  NativeUIManager.getViewManagerConfig = UIManagerJS.getViewManagerConfig;
116
115
 
117
- function lazifyViewManagerConfig(viewName) {
116
+ function lazifyViewManagerConfig(viewName: string) {
118
117
  const viewConfig = getConstants()[viewName];
119
118
  viewManagerConfigs[viewName] = viewConfig;
120
119
  if (viewConfig.Manager) {
121
120
  defineLazyObjectProperty(viewConfig, 'Constants', {
122
121
  get: () => {
123
122
  const viewManager = NativeModules[viewConfig.Manager];
124
- const constants = {};
123
+ const constants: {[string]: mixed} = {};
125
124
  viewManager &&
126
125
  Object.keys(viewManager).forEach(key => {
127
126
  const value = viewManager[key];
@@ -135,7 +134,7 @@ function lazifyViewManagerConfig(viewName) {
135
134
  defineLazyObjectProperty(viewConfig, 'Commands', {
136
135
  get: () => {
137
136
  const viewManager = NativeModules[viewConfig.Manager];
138
- const commands = {};
137
+ const commands: {[string]: number} = {};
139
138
  let index = 0;
140
139
  viewManager &&
141
140
  Object.keys(viewManager).forEach(key => {
@@ -179,7 +178,7 @@ if (!global.nativeCallSyncHook) {
179
178
  `Accessing view manager configs directly off UIManager via UIManager['${viewManagerName}'] ` +
180
179
  `is no longer supported. Use UIManager.getViewManagerConfig('${viewManagerName}') instead.`,
181
180
  );
182
-
181
+ // $FlowFixMe
183
182
  return UIManagerJS.getViewManagerConfig(viewManagerName);
184
183
  },
185
184
  });