react-native-windows 0.69.4 → 0.70.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 (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 +12 -8
  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 +2 -2
  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
package/.flowconfig CHANGED
@@ -15,6 +15,7 @@
15
15
  <PROJECT_ROOT>/Libraries/Components/SafeAreaView/SafeAreaView.js
16
16
  <PROJECT_ROOT>/Libraries/Components/TextInput/TextInput.js
17
17
  <PROJECT_ROOT>/Libraries/Components/TextInput/TextInputState.js
18
+ <PROJECT_ROOT>/Libraries/Components/Touchable/Touchable.js
18
19
  <PROJECT_ROOT>/Libraries/Components/Touchable/TouchableBounce.js
19
20
  <PROJECT_ROOT>/Libraries/Components/Touchable/TouchableHighlight.js
20
21
  <PROJECT_ROOT>/Libraries/Components/Touchable/TouchableOpacity.js
@@ -76,6 +77,7 @@ flow/
76
77
  emoji=true
77
78
 
78
79
  exact_by_default=true
80
+ exact_empty_objects=true
79
81
 
80
82
  format.bracket_spacing=false
81
83
 
@@ -98,6 +100,8 @@ suppress_type=$FlowFixMeProps
98
100
  suppress_type=$FlowFixMeState
99
101
  suppress_type=$FlowFixMeEmpty
100
102
 
103
+ experimental.env_mode=ssa
104
+
101
105
  [lints]
102
106
  sketchy-null-number=warn
103
107
  sketchy-null-mixed=warn
@@ -118,4 +122,4 @@ untyped-import
118
122
  untyped-type-import
119
123
 
120
124
  [version]
121
- ^0.176.3
125
+ ^0.182.0
@@ -459,7 +459,7 @@ JsValueRef JSValueToStringCopy(JsValueRef obj, JsValueRef *exception) {
459
459
  }
460
460
 
461
461
  JsValueRef ValueMakeUndefined() {
462
- JsValueRef value;
462
+ JsValueRef value = nullptr;
463
463
  JsGetUndefinedValue(&value);
464
464
  return value;
465
465
  }
@@ -27,7 +27,7 @@ JsValueRef __stdcall nowHookJNF(
27
27
  void * /*callbackState*/) {
28
28
  assert(argumentCount == 1);
29
29
  double now = nowHook != nullptr ? nowHook() : 0;
30
- JsValueRef value;
30
+ JsValueRef value = nullptr;
31
31
  CHAKRA_ASSERTDO(JsDoubleToNumber(now, &value));
32
32
  return value;
33
33
  }
@@ -245,9 +245,12 @@ std::unordered_map<std::string, std::string> ChakraObject::toJSONMap() const {
245
245
  /* static */
246
246
  ChakraObject ChakraObject::create() {
247
247
  JsValueRef value;
248
- JsCreateObject(&value);
249
-
250
- return ChakraObject(value);
248
+ if (JsCreateObject(&value) == JsNoError) {
249
+ return ChakraObject(value);
250
+ } else {
251
+ assert(false && "JsCreateObject() failed.");
252
+ std::terminate();
253
+ }
251
254
  }
252
255
 
253
256
  } // namespace react
@@ -178,7 +178,7 @@ class ChakraObject {
178
178
  }
179
179
 
180
180
  static ChakraObject getGlobalObject() {
181
- JsValueRef value;
181
+ JsValueRef value = nullptr;
182
182
  JsGetGlobalObject(&value);
183
183
  return ChakraObject(value);
184
184
  }
@@ -15,12 +15,12 @@
15
15
  The PR (windows-vs-pr.yml) and CI (publish.yml() turn it back on.
16
16
  -->
17
17
  <EnableSourceLink Condition="'$(EnableSourceLink)' == ''">false</EnableSourceLink>
18
- <!-- When bumping the Folly version, be sure to bump the git hash of that version's commit too. -->
19
- <FollyVersion>2021.06.28.00</FollyVersion>
20
- <FollyCommitHash>f434460f8a98e85f3ddb75390ddd1cc330c8f658</FollyCommitHash>
21
- <!-- When bumping the fmt version, be sure to bump the git hash of that version's commit too. -->
22
- <FmtVersion>7.1.3</FmtVersion>
23
- <FmtCommitHash>7bdf0628b1276379886c7f6dda2cef2b3b374f0b</FmtCommitHash>
18
+ <!-- When bumping the Folly version, be sure to bump the git hash of that version's commit and build Folly.vcxproj (to update its cgmanifest.json) too. -->
19
+ <FollyVersion>2021.07.22.00</FollyVersion>
20
+ <FollyCommitHash>4baba28200d7446c870e96f3cdbeb492f54625d0</FollyCommitHash>
21
+ <!-- When bumping the fmt version, be sure to bump the git hash of that version's commit and build fmt.vcxproj (to update its cgmanifest.json) too. -->
22
+ <FmtVersion>8.0.0</FmtVersion>
23
+ <FmtCommitHash>9e8b86fd2d9806672cc73133d21780dd182bfd24</FmtCommitHash>
24
24
  </PropertyGroup>
25
25
 
26
26
  <PropertyGroup Label="Configuration">
@@ -70,4 +70,4 @@
70
70
  <RestoreUseStaticGraphEvaluation Condition="'$(BuildingInsideVisualStudio)' == 'true'">true</RestoreUseStaticGraphEvaluation>
71
71
  </PropertyGroup>
72
72
 
73
- </Project>
73
+ </Project>
@@ -267,23 +267,28 @@
267
267
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
268
268
  <ImportGroup Label="ExtensionTargets">
269
269
  </ImportGroup>
270
- <Target Name="DownloadFolly" BeforeTargets="PrepareForBuild">
271
- <PropertyGroup>
272
- <FollyZipDir>$(IntDir)\.follyzip</FollyZipDir>
273
- </PropertyGroup>
274
- <Message Importance="High" Text="Downloading folly..." Condition="!Exists('$(FollyZipDir)\folly-$(FollyVersion).zip')" />
275
- <DownloadFile Condition="!Exists('$(FollyZipDir)\folly-$(FollyVersion).zip')"
270
+ <PropertyGroup>
271
+ <FollyZipDir>$(FollyDir)..\.follyzip</FollyZipDir>
272
+ <FollyZipFile>$(FollyZipDir)\folly-$(FollyVersion).zip</FollyZipFile>
273
+ <CGManifestFile>$(MSBuildThisFileDirectory)cgmanifest.json</CGManifestFile>
274
+ </PropertyGroup>
275
+ <Target Name="DownloadFolly" BeforeTargets="PrepareForBuild" Inputs="$(FollyZipFile)" Outputs="$(FollyZipFile)">
276
+ <Message Importance="High" Text="Downloading folly..." />
277
+ <DownloadFile
276
278
  SourceUrl="https://github.com/facebook/folly/archive/v$(FollyVersion).zip"
277
- DestinationFileName="folly-$(FollyVersion).zip"
279
+ DestinationFileName="$(FollyZipFile)"
278
280
  DestinationFolder="$(FollyZipDir)"
279
281
  Retries="10"/>
280
282
  </Target>
281
283
  <Target Name="UnzipFolly" BeforeTargets="PrepareForBuild" DependsOnTargets="DownloadFolly">
282
- <Message Importance="High" Text="Unzipping folly to $([MSBuild]::NormalizePath($(FollyDir)..))." Condition="!Exists('$(FollyDir)folly\dynamic.h')" />
283
- <Unzip Condition="!Exists('$(FollyDir)')" SourceFiles="$(FollyZipDir)\folly-$(FollyVersion).zip" DestinationFolder="$([MSBuild]::NormalizePath($(FollyDir)..))" OverwriteReadOnlyFiles="true" />
284
+ <Message Condition="!Exists('$(FollyDir)folly\dynamic.h')" Importance="High" Text="Unzipping folly to $([MSBuild]::NormalizePath($(FollyDir)..))." />
285
+ <Unzip
286
+ Condition="!Exists('$(FollyDir)folly\dynamic.h')"
287
+ SourceFiles="$(FollyZipFile)"
288
+ DestinationFolder="$([MSBuild]::NormalizePath($(FollyDir)..))"
289
+ OverwriteReadOnlyFiles="true" />
284
290
  </Target>
285
- <Target Name="WriteCGManifest" BeforeTargets="PrepareForBuild" DependsOnTargets="UnzipFolly">
286
- <Message Importance="High" Text="Generating $([MSBuild]::NormalizePath($(FollyDir)..))\cgmanifest.json." Condition="!Exists('$([MSBuild]::NormalizePath($(FollyDir)..))\cgmanifest.json')" />
291
+ <Target Name="WriteCGManifest" BeforeTargets="PrepareForBuild" DependsOnTargets="DownloadFolly" Inputs="$(FollyZipFile)" Outputs="$(CGManifestFile)">
287
292
  <PropertyGroup>
288
293
  <CGManifestText>{
289
294
  "Registrations": [
@@ -300,8 +305,9 @@
300
305
  ]
301
306
  }</CGManifestText>
302
307
  </PropertyGroup>
308
+ <Message Importance="High" Text="Generating $(CGManifestFile)." />
303
309
  <WriteLinesToFile
304
- File="$([MSBuild]::NormalizePath($(FollyDir)..))\cgmanifest.json"
310
+ File="$(CGManifestFile)"
305
311
  Overwrite="true"
306
312
  Lines="$(CGManifestText)" />
307
313
  </Target>
@@ -313,7 +319,8 @@
313
319
  </ItemGroup>
314
320
  <Target Name="Deploy" />
315
321
  <!-- Reenable this task if we need to temporarily replace any folly files for fixes, while we wait for PRs to land in folly -->
316
- <Target Name="ApplyFollyTemporaryPatch" BeforeTargets="PrepareForBuild" DependsOnTargets="UnzipFolly">
322
+ <Target Name="ApplyFollyTemporaryPatch" BeforeTargets="PrepareForBuild" DependsOnTargets="UnzipFolly" Inputs="@(TemporaryFollyPatchFiles)" Outputs="@(TemporaryFollyPatchFiles->'$(FollyDir)folly\%(RecursiveDir)%(Filename)%(Extension)')">
323
+ <Message Importance="High" Text="Applying temporary patches to folly." />
317
324
  <Copy DestinationFiles="@(TemporaryFollyPatchFiles->'$(FollyDir)folly\%(RecursiveDir)%(Filename)%(Extension)')" SourceFiles="@(TemporaryFollyPatchFiles)" />
318
325
  </Target>
319
326
  <ItemGroup>
@@ -0,0 +1,14 @@
1
+ {
2
+ "Registrations": [
3
+ {
4
+ "Component": {
5
+ "Type": "git",
6
+ "Git": {
7
+ "RepositoryUrl": "https://github.com/facebook/folly",
8
+ "CommitHash": "4baba28200d7446c870e96f3cdbeb492f54625d0"
9
+ }
10
+ },
11
+ "DevelopmentDependency": false
12
+ }
13
+ ]
14
+ }
@@ -8,8 +8,9 @@
8
8
  * @flow
9
9
  */
10
10
 
11
- import Platform from '../Utilities/Platform';
12
11
  import type {DialogOptions} from '../NativeModules/specs/NativeDialogManagerAndroid';
12
+
13
+ import Platform from '../Utilities/Platform';
13
14
  import RCTAlertManager from './RCTAlertManager';
14
15
 
15
16
  export type AlertType =
@@ -27,6 +28,7 @@ export type Buttons = Array<{
27
28
 
28
29
  type Options = {
29
30
  cancelable?: ?boolean,
31
+ userInterfaceStyle?: 'unspecified' | 'light' | 'dark',
30
32
  onDismiss?: ?() => void,
31
33
  ...
32
34
  };
@@ -44,7 +46,15 @@ class Alert {
44
46
  options?: Options,
45
47
  ): void {
46
48
  if (Platform.OS === 'ios') {
47
- Alert.prompt(title, message, buttons, 'default');
49
+ Alert.prompt(
50
+ title,
51
+ message,
52
+ buttons,
53
+ 'default',
54
+ undefined,
55
+ undefined,
56
+ options,
57
+ );
48
58
  } else if (Platform.OS === 'android') {
49
59
  const NativeDialogManagerAndroid =
50
60
  require('../NativeModules/specs/NativeDialogManagerAndroid').default;
@@ -82,6 +92,8 @@ class Alert {
82
92
  config.buttonPositive = buttonPositive.text || defaultPositiveText;
83
93
  }
84
94
 
95
+ /* $FlowFixMe[missing-local-annot] The type annotation(s) required by
96
+ * Flow's LTI update could not be added via codemod */
85
97
  const onAction = (action, buttonKey) => {
86
98
  if (action === constants.buttonClicked) {
87
99
  if (buttonKey === constants.buttonNeutral) {
@@ -95,7 +107,7 @@ class Alert {
95
107
  options && options.onDismiss && options.onDismiss();
96
108
  }
97
109
  };
98
- const onError = errorMessage => console.warn(errorMessage);
110
+ const onError = (errorMessage: string) => console.warn(errorMessage);
99
111
  NativeDialogManagerAndroid.showAlert(config, onError, onAction);
100
112
  }
101
113
  }
@@ -107,6 +119,7 @@ class Alert {
107
119
  type?: ?AlertType = 'plain-text',
108
120
  defaultValue?: string,
109
121
  keyboardType?: string,
122
+ options?: Options,
110
123
  ): void {
111
124
  if (Platform.OS === 'ios') {
112
125
  let callbacks = [];
@@ -124,7 +137,7 @@ class Alert {
124
137
  destructiveButtonKey = String(index);
125
138
  }
126
139
  if (btn.text || index < (callbackOrButtons || []).length - 1) {
127
- const btnDef = {};
140
+ const btnDef: {[number]: string} = {};
128
141
  btnDef[index] = btn.text || '';
129
142
  buttons.push(btnDef);
130
143
  }
@@ -141,6 +154,7 @@ class Alert {
141
154
  cancelButtonKey,
142
155
  destructiveButtonKey,
143
156
  keyboardType,
157
+ userInterfaceStyle: options?.userInterfaceStyle || undefined,
144
158
  },
145
159
  (id, value) => {
146
160
  const cb = callbacks[id];
@@ -24,6 +24,7 @@ export type Buttons = Array<{
24
24
 
25
25
  type Options = {
26
26
  cancelable?: ?boolean,
27
+ userInterfaceStyle?: 'unspecified' | 'light' | 'dark',
27
28
  onDismiss?: ?() => void,
28
29
  ...
29
30
  };
@@ -88,6 +89,8 @@ class Alert {
88
89
  config.buttonPositive = buttonPositive.text || defaultPositiveText;
89
90
  }
90
91
 
92
+ /* $FlowFixMe[missing-local-annot] The type annotation(s) required by
93
+ * Flow's LTI update could not be added via codemod */
91
94
  const onAction = (action, buttonKey) => {
92
95
  if (action === constants.buttonClicked) {
93
96
  if (buttonKey === constants.buttonNeutral) {
@@ -112,6 +115,7 @@ class Alert {
112
115
  type?: ?AlertType = 'plain-text',
113
116
  defaultValue?: string,
114
117
  keyboardType?: string,
118
+ options?: Options,
115
119
  ): void {
116
120
  throw new Error(
117
121
  'Alert.prompt not currently implemented in react-native-windows',
@@ -20,6 +20,7 @@ export type Args = {|
20
20
  cancelButtonKey?: string,
21
21
  destructiveButtonKey?: string,
22
22
  keyboardType?: string,
23
+ userInterfaceStyle?: string,
23
24
  |};
24
25
 
25
26
  export interface Spec extends TurboModule {
@@ -16,8 +16,8 @@ import typeof AnimatedSectionList from './components/AnimatedSectionList';
16
16
  import typeof AnimatedText from './components/AnimatedText';
17
17
  import typeof AnimatedView from './components/AnimatedView';
18
18
 
19
- const AnimatedMock = require('./AnimatedMock');
20
- const AnimatedImplementation = require('./AnimatedImplementation');
19
+ import * as AnimatedMock from './AnimatedMock';
20
+ import * as AnimatedImplementation from './AnimatedImplementation';
21
21
 
22
22
  const Animated = ((Platform.isTesting
23
23
  ? AnimatedMock
@@ -41,7 +41,7 @@ function attachNativeEvent(
41
41
  // key path inside the `nativeEvent` object. Ex.: ['contentOffset', 'x'].
42
42
  const eventMappings = [];
43
43
 
44
- const traverse = (value, path) => {
44
+ const traverse = (value: mixed, path: Array<string>) => {
45
45
  if (value instanceof AnimatedValue) {
46
46
  value.__makeNative(platformConfig);
47
47
 
@@ -94,8 +94,8 @@ function attachNativeEvent(
94
94
  };
95
95
  }
96
96
 
97
- function validateMapping(argMapping, args) {
98
- const validate = (recMapping, recEvt, key) => {
97
+ function validateMapping(argMapping: $ReadOnlyArray<?Mapping>, args: any) {
98
+ const validate = (recMapping: ?Mapping, recEvt: any, key: string) => {
99
99
  if (recMapping instanceof AnimatedValue) {
100
100
  invariant(
101
101
  typeof recEvt === 'number',
@@ -223,7 +223,10 @@ class AnimatedEvent {
223
223
  validatedMapping = true;
224
224
  }
225
225
 
226
- const traverse = (recMapping, recEvt) => {
226
+ const traverse = (
227
+ recMapping: ?(Mapping | AnimatedValue),
228
+ recEvt: any,
229
+ ) => {
227
230
  if (recMapping instanceof AnimatedValue) {
228
231
  if (typeof recEvt === 'number') {
229
232
  recMapping.setValue(recEvt);
@@ -94,7 +94,7 @@ const _combineCallbacks = function (
94
94
  config: $ReadOnly<{...AnimationConfig, ...}>,
95
95
  ) {
96
96
  if (callback && config.onComplete) {
97
- return (...args) => {
97
+ return (...args: Array<EndResult>) => {
98
98
  config.onComplete && config.onComplete(...args);
99
99
  callback && callback(...args);
100
100
  };
@@ -308,7 +308,7 @@ const sequence = function (
308
308
  let current = 0;
309
309
  return {
310
310
  start: function (callback?: ?EndCallback) {
311
- const onComplete = function (result) {
311
+ const onComplete = function (result: EndResult) {
312
312
  if (!result.finished) {
313
313
  callback && callback(result);
314
314
  return;
@@ -380,7 +380,7 @@ const parallel = function (
380
380
  }
381
381
 
382
382
  animations.forEach((animation, idx) => {
383
- const cb = function (endResult) {
383
+ const cb = function (endResult: EndResult | {finished: boolean}) {
384
384
  hasEnded[idx] = true;
385
385
  doneCount++;
386
386
  if (doneCount === animations.length) {
@@ -460,6 +460,7 @@ type LoopAnimationConfig = {
460
460
 
461
461
  const loop = function (
462
462
  animation: CompositeAnimation,
463
+ // $FlowFixMe[prop-missing]
463
464
  {iterations = -1, resetBeforeIteration = true}: LoopAnimationConfig = {},
464
465
  ): CompositeAnimation {
465
466
  let isFinished = false;
@@ -551,6 +552,19 @@ const event = function (
551
552
  }
552
553
  };
553
554
 
555
+ // All types of animated nodes that represent scalar numbers and can be interpolated (etc)
556
+ type AnimatedNumeric =
557
+ | AnimatedAddition
558
+ | AnimatedDiffClamp
559
+ | AnimatedDivision
560
+ | AnimatedInterpolation<number>
561
+ | AnimatedModulo
562
+ | AnimatedMultiplication
563
+ | AnimatedSubtraction
564
+ | AnimatedValue;
565
+
566
+ export type {AnimatedNumeric as Numeric};
567
+
554
568
  /**
555
569
  * The `Animated` library is designed to make animations fluid, powerful, and
556
570
  * easy to build and maintain. `Animated` focuses on declarative relationships
@@ -10,6 +10,8 @@
10
10
 
11
11
  'use strict';
12
12
 
13
+ import type {EndResult} from './animations/Animation';
14
+
13
15
  const {AnimatedEvent, attachNativeEvent} = require('./AnimatedEvent');
14
16
  const AnimatedImplementation = require('./AnimatedImplementation');
15
17
  const AnimatedInterpolation = require('./nodes/AnimatedInterpolation');
@@ -23,7 +25,7 @@ import type {EndCallback} from './animations/Animation';
23
25
  import type {TimingAnimationConfig} from './animations/TimingAnimation';
24
26
  import type {DecayAnimationConfig} from './animations/DecayAnimation';
25
27
  import type {SpringAnimationConfig} from './animations/SpringAnimation';
26
-
28
+ import type {Numeric as AnimatedNumeric} from './AnimatedImplementation';
27
29
  import AnimatedColor from './nodes/AnimatedColor';
28
30
 
29
31
  /**
@@ -43,7 +45,7 @@ function mockAnimationStart(
43
45
  const guardedCallback =
44
46
  callback == null
45
47
  ? callback
46
- : (...args) => {
48
+ : (...args: Array<EndResult>) => {
47
49
  if (inAnimationCallback) {
48
50
  console.warn(
49
51
  'Ignoring recursive animation callback when running mock animations',
@@ -158,11 +160,14 @@ type LoopAnimationConfig = {
158
160
 
159
161
  const loop = function (
160
162
  animation: CompositeAnimation,
163
+ // $FlowFixMe[prop-missing]
161
164
  {iterations = -1}: LoopAnimationConfig = {},
162
165
  ): CompositeAnimation {
163
166
  return emptyAnimation;
164
167
  };
165
168
 
169
+ export type {AnimatedNumeric as Numeric};
170
+
166
171
  module.exports = {
167
172
  Value: AnimatedValue,
168
173
  ValueXY: AnimatedValueXY,