react-native-windows 0.0.0 → 0.0.1-0

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 (2073) hide show
  1. package/.flowconfig +42 -17
  2. package/Chakra/Chakra.vcxitems +0 -5
  3. package/Chakra/Chakra.vcxitems.filters +2 -17
  4. package/Chakra/ChakraHelpers.cpp +2 -268
  5. package/Chakra/ChakraInstanceArgs.h +0 -29
  6. package/Chakra/ChakraPlatform.cpp +1 -1
  7. package/Chakra/ChakraPlatform.h +0 -4
  8. package/Chakra/ChakraTracing.cpp +0 -33
  9. package/Chakra/ChakraUtils.cpp +10 -14
  10. package/Chakra/ChakraUtils.h +2 -2
  11. package/Chakra/ChakraValue.cpp +6 -3
  12. package/Chakra/ChakraValue.h +2 -6
  13. package/Chakra/Utf8DebugExtensions.cpp +0 -5
  14. package/Chakra/Utf8DebugExtensions.h +0 -6
  15. package/Common/Common.vcxproj +7 -10
  16. package/Common/Common.vcxproj.filters +4 -1
  17. package/Common/Utilities.cpp +59 -0
  18. package/Common/packages.lock.json +26 -0
  19. package/Common/utilities.h +11 -0
  20. package/Directory.Build.props +53 -28
  21. package/Directory.Build.targets +13 -71
  22. package/Folly/.clang-format +2 -0
  23. package/Folly/Folly.vcxproj +75 -33
  24. package/Folly/Folly.vcxproj.filters +24 -5
  25. package/Folly/TEMP_UntilFollyUpdate/dynamic-inl.h +1439 -0
  26. package/Folly/TEMP_UntilFollyUpdate/lang/SafeAssert.h +195 -0
  27. package/Folly/TEMP_UntilFollyUpdate/lang/ToAscii.cpp +338 -0
  28. package/Folly/TEMP_UntilFollyUpdate/lang/ToAscii.h +182 -0
  29. package/Folly/TEMP_UntilFollyUpdate/portability/Unistd.cpp +33 -0
  30. package/Folly/cgmanifest.json +15 -0
  31. package/Folly/packages.lock.json +23 -0
  32. package/Folly/pch.cpp +4 -0
  33. package/Folly/pch.h +18 -0
  34. package/Libraries/ActionSheetIOS/ActionSheetIOS.d.ts +86 -0
  35. package/Libraries/ActionSheetIOS/ActionSheetIOS.js +36 -9
  36. package/Libraries/ActionSheetIOS/NativeActionSheetManager.js +5 -43
  37. package/Libraries/Alert/Alert.d.ts +91 -0
  38. package/Libraries/Alert/Alert.js +28 -10
  39. package/Libraries/Alert/Alert.windows.js +68 -21
  40. package/Libraries/Alert/NativeAlertManager.js +5 -26
  41. package/Libraries/Alert/RCTAlertManager.android.js +2 -4
  42. package/Libraries/Alert/RCTAlertManager.ios.js +2 -3
  43. package/Libraries/Animated/Animated.d.ts +626 -0
  44. package/Libraries/Animated/Animated.js +14 -14
  45. package/Libraries/Animated/AnimatedEvent.js +53 -30
  46. package/Libraries/Animated/AnimatedImplementation.js +152 -111
  47. package/Libraries/Animated/AnimatedMock.js +79 -40
  48. package/Libraries/Animated/AnimatedPlatformConfig.js +13 -0
  49. package/Libraries/Animated/AnimatedWeb.js +9 -6
  50. package/Libraries/Animated/Easing.d.ts +37 -0
  51. package/Libraries/Animated/Easing.js +40 -42
  52. package/Libraries/Animated/NativeAnimatedHelper.js +352 -146
  53. package/Libraries/Animated/NativeAnimatedModule.js +5 -62
  54. package/Libraries/Animated/NativeAnimatedTurboModule.js +5 -64
  55. package/Libraries/Animated/SpringConfig.js +13 -18
  56. package/Libraries/Animated/animations/Animation.js +55 -15
  57. package/Libraries/Animated/animations/DecayAnimation.js +22 -9
  58. package/Libraries/Animated/animations/SpringAnimation.js +37 -18
  59. package/Libraries/Animated/animations/TimingAnimation.js +35 -20
  60. package/Libraries/Animated/bezier.js +23 -12
  61. package/Libraries/Animated/components/AnimatedFlatList.js +5 -17
  62. package/Libraries/Animated/components/AnimatedImage.js +5 -8
  63. package/Libraries/Animated/components/AnimatedScrollView.js +120 -16
  64. package/Libraries/Animated/components/AnimatedSectionList.js +5 -17
  65. package/Libraries/Animated/components/AnimatedText.js +5 -8
  66. package/Libraries/Animated/components/AnimatedView.js +5 -8
  67. package/Libraries/Animated/createAnimatedComponent.js +46 -265
  68. package/Libraries/Animated/nodes/AnimatedAddition.js +15 -14
  69. package/Libraries/Animated/nodes/AnimatedColor.js +320 -0
  70. package/Libraries/Animated/nodes/AnimatedDiffClamp.js +13 -12
  71. package/Libraries/Animated/nodes/AnimatedDivision.js +15 -14
  72. package/Libraries/Animated/nodes/AnimatedInterpolation.js +200 -158
  73. package/Libraries/Animated/nodes/AnimatedModulo.js +13 -12
  74. package/Libraries/Animated/nodes/AnimatedMultiplication.js +15 -15
  75. package/Libraries/Animated/nodes/AnimatedNode.js +38 -25
  76. package/Libraries/Animated/nodes/AnimatedObject.js +146 -0
  77. package/Libraries/Animated/nodes/AnimatedProps.js +51 -41
  78. package/Libraries/Animated/nodes/AnimatedStyle.js +57 -54
  79. package/Libraries/Animated/nodes/AnimatedSubtraction.js +15 -14
  80. package/Libraries/Animated/nodes/AnimatedTracking.js +16 -18
  81. package/Libraries/Animated/nodes/AnimatedTransform.js +45 -36
  82. package/Libraries/Animated/nodes/AnimatedValue.js +66 -34
  83. package/Libraries/Animated/nodes/AnimatedValueXY.js +48 -38
  84. package/Libraries/Animated/nodes/AnimatedWithChildren.js +12 -11
  85. package/Libraries/Animated/shouldUseTurboAnimatedModule.js +17 -0
  86. package/Libraries/Animated/useAnimatedProps.js +220 -0
  87. package/Libraries/Animated/useAnimatedValue.d.ts +15 -0
  88. package/Libraries/Animated/useAnimatedValue.js +25 -0
  89. package/Libraries/AppState/AppState.d.ts +58 -0
  90. package/Libraries/AppState/AppState.js +91 -142
  91. package/Libraries/AppState/NativeAppState.js +5 -22
  92. package/Libraries/AppTheme/AppTheme.js +90 -90
  93. package/Libraries/AppTheme/AppThemeTypes.d.ts +44 -23
  94. package/Libraries/AppTheme/NativeAppTheme.js +11 -0
  95. package/Libraries/BatchedBridge/BatchedBridge.js +1 -1
  96. package/Libraries/BatchedBridge/MessageQueue.js +77 -54
  97. package/Libraries/BatchedBridge/NativeModules.d.ts +25 -0
  98. package/Libraries/BatchedBridge/NativeModules.js +11 -6
  99. package/Libraries/BatchedBridge/__mocks__/MessageQueueTestConfig.js +1 -1
  100. package/Libraries/BatchedBridge/__mocks__/MessageQueueTestModule.js +3 -3
  101. package/Libraries/Blob/Blob.js +13 -2
  102. package/Libraries/Blob/BlobManager.js +7 -10
  103. package/Libraries/Blob/BlobRegistry.js +15 -10
  104. package/Libraries/Blob/BlobTypes.js +1 -1
  105. package/Libraries/Blob/File.js +3 -4
  106. package/Libraries/Blob/FileReader.js +35 -15
  107. package/Libraries/Blob/NativeBlobModule.js +5 -52
  108. package/Libraries/Blob/NativeFileReaderModule.js +5 -15
  109. package/Libraries/Blob/URL.js +60 -47
  110. package/Libraries/Blob/__mocks__/BlobModule.js +1 -1
  111. package/Libraries/Blob/__mocks__/FileReaderModule.js +1 -1
  112. package/Libraries/BugReporting/BugReporting.js +3 -3
  113. package/Libraries/BugReporting/NativeBugReporting.js +5 -12
  114. package/Libraries/BugReporting/dumpReactTree.js +1 -1
  115. package/Libraries/BugReporting/getReactData.js +17 -8
  116. package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.d.ts +157 -0
  117. package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.js +421 -0
  118. package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.windows.js +350 -81
  119. package/Libraries/Components/AccessibilityInfo/NativeAccessibilityInfo.js +4 -18
  120. package/Libraries/Components/AccessibilityInfo/NativeAccessibilityManager.js +5 -51
  121. package/Libraries/Components/AccessibilityInfo/legacySendAccessibilityEvent.android.js +36 -0
  122. package/Libraries/Components/AccessibilityInfo/legacySendAccessibilityEvent.ios.js +26 -0
  123. package/Libraries/Components/AccessibilityInfo/legacySendAccessibilityEvent.windows.js +36 -0
  124. package/Libraries/Components/ActivityIndicator/ActivityIndicator.d.ts +86 -0
  125. package/Libraries/Components/ActivityIndicator/ActivityIndicator.js +18 -50
  126. package/Libraries/Components/ActivityIndicator/ActivityIndicatorViewNativeComponent.js +4 -47
  127. package/Libraries/Components/Button.d.ts +42 -0
  128. package/Libraries/Components/Button.js +152 -78
  129. package/Libraries/Components/Button.windows.js +273 -69
  130. package/Libraries/Components/Clipboard/Clipboard.d.ts +28 -0
  131. package/Libraries/Components/Clipboard/Clipboard.js +2 -4
  132. package/Libraries/Components/Clipboard/NativeClipboard.js +4 -13
  133. package/Libraries/Components/DrawerAndroid/AndroidDrawerLayoutNativeComponent.js +4 -116
  134. package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js +30 -29
  135. package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.d.ts +141 -0
  136. package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.js +12 -0
  137. package/Libraries/Components/Flyout/Flyout.d.ts +55 -20
  138. package/Libraries/Components/Flyout/Flyout.js +110 -75
  139. package/Libraries/Components/Flyout/FlyoutNativeComponent.js +45 -0
  140. package/Libraries/Components/Glyph/Glyph.d.ts +29 -13
  141. package/Libraries/Components/Glyph/Glyph.js +43 -56
  142. package/Libraries/Components/Glyph/GlyphNativeComponent.js +31 -0
  143. package/Libraries/Components/Keyboard/Keyboard.d.ts +109 -0
  144. package/Libraries/Components/Keyboard/Keyboard.js +78 -66
  145. package/Libraries/Components/Keyboard/KeyboardAvoidingView.d.ts +46 -0
  146. package/Libraries/Components/Keyboard/KeyboardAvoidingView.js +81 -37
  147. package/Libraries/Components/Keyboard/KeyboardExt.d.ts +8 -6
  148. package/Libraries/Components/Keyboard/KeyboardExt.js +27 -60
  149. package/Libraries/Components/Keyboard/KeyboardExt.js.map +1 -1
  150. package/Libraries/Components/Keyboard/KeyboardExtProps.d.ts +17 -43
  151. package/Libraries/Components/Keyboard/KeyboardExtProps.js +7 -24
  152. package/Libraries/Components/Keyboard/KeyboardExtProps.js.map +1 -1
  153. package/Libraries/Components/Keyboard/NativeKeyboardObserver.js +4 -12
  154. package/Libraries/Components/Popup/Popup.d.ts +41 -20
  155. package/Libraries/Components/Popup/Popup.js +86 -76
  156. package/Libraries/Components/Popup/PopupNativeComponent.js +49 -0
  157. package/Libraries/Components/Pressable/Pressable.d.ts +167 -0
  158. package/Libraries/Components/Pressable/Pressable.js +128 -18
  159. package/Libraries/Components/Pressable/Pressable.windows.js +169 -44
  160. package/Libraries/Components/Pressable/useAndroidRippleForView.js +27 -22
  161. package/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.android.js +9 -10
  162. package/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.d.ts +83 -0
  163. package/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.js +20 -0
  164. package/Libraries/Components/ProgressBarAndroid/ProgressBarAndroidNativeComponent.js +5 -27
  165. package/Libraries/Components/RefreshControl/AndroidSwipeRefreshLayoutNativeComponent.js +4 -77
  166. package/Libraries/Components/RefreshControl/PullToRefreshViewNativeComponent.js +4 -56
  167. package/Libraries/Components/RefreshControl/RefreshControl.d.ts +87 -0
  168. package/Libraries/Components/RefreshControl/RefreshControl.js +15 -37
  169. package/Libraries/Components/RefreshControl/RefreshControl.windows.js +15 -37
  170. package/Libraries/Components/RefreshControl/__mocks__/RefreshControlMock.js +6 -9
  171. package/Libraries/Components/SafeAreaView/RCTSafeAreaViewNativeComponent.js +4 -20
  172. package/Libraries/Components/SafeAreaView/SafeAreaView.d.ts +24 -0
  173. package/Libraries/Components/SafeAreaView/SafeAreaView.js +12 -39
  174. package/Libraries/Components/ScrollView/AndroidHorizontalScrollContentViewNativeComponent.js +5 -32
  175. package/Libraries/Components/ScrollView/AndroidHorizontalScrollViewNativeComponent.js +34 -21
  176. package/Libraries/Components/ScrollView/ScrollContentViewNativeComponent.js +13 -20
  177. package/Libraries/Components/ScrollView/ScrollView.d.ts +910 -0
  178. package/Libraries/Components/ScrollView/ScrollView.js +1062 -410
  179. package/Libraries/Components/ScrollView/ScrollViewCommands.js +4 -4
  180. package/Libraries/Components/ScrollView/ScrollViewContext.js +1 -3
  181. package/Libraries/Components/ScrollView/ScrollViewNativeComponent.js +164 -18
  182. package/Libraries/Components/ScrollView/ScrollViewNativeComponent.windows.js +179 -0
  183. package/Libraries/Components/ScrollView/ScrollViewNativeComponentType.js +11 -16
  184. package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +237 -247
  185. package/Libraries/Components/ScrollView/processDecelerationRate.js +1 -3
  186. package/Libraries/Components/Sound/NativeSoundManager.js +4 -14
  187. package/Libraries/Components/Sound/SoundManager.js +2 -3
  188. package/Libraries/Components/StaticRenderer.js +1 -1
  189. package/Libraries/Components/StatusBar/NativeStatusBarManagerAndroid.js +4 -60
  190. package/Libraries/Components/StatusBar/NativeStatusBarManagerIOS.js +4 -81
  191. package/Libraries/Components/StatusBar/StatusBar.d.ts +138 -0
  192. package/Libraries/Components/StatusBar/StatusBar.js +33 -33
  193. package/Libraries/Components/Switch/AndroidSwitchNativeComponent.js +5 -56
  194. package/Libraries/Components/Switch/Switch.d.ts +115 -0
  195. package/Libraries/Components/Switch/Switch.js +119 -127
  196. package/Libraries/Components/Switch/Switch.windows.js +257 -0
  197. package/Libraries/Components/Switch/SwitchNativeComponent.js +5 -50
  198. package/Libraries/Components/TextInput/AndroidTextInputNativeComponent.js +241 -36
  199. package/Libraries/Components/TextInput/InputAccessoryView.d.ts +34 -0
  200. package/Libraries/Components/TextInput/InputAccessoryView.js +20 -24
  201. package/Libraries/Components/TextInput/RCTInputAccessoryViewNativeComponent.js +5 -20
  202. package/Libraries/Components/TextInput/RCTMultilineTextInputNativeComponent.js +24 -9
  203. package/Libraries/Components/TextInput/RCTSingelineTextInputNativeComponent.js +16 -16
  204. package/Libraries/Components/TextInput/RCTTextInputViewConfig.js +169 -0
  205. package/Libraries/Components/TextInput/TextInput.d.ts +973 -0
  206. package/Libraries/Components/TextInput/TextInput.flow.js +1092 -0
  207. package/Libraries/Components/TextInput/TextInput.js +935 -372
  208. package/Libraries/Components/TextInput/TextInput.windows.js +1096 -378
  209. package/Libraries/Components/TextInput/TextInputNativeCommands.js +2 -4
  210. package/Libraries/Components/TextInput/TextInputState.js +33 -10
  211. package/Libraries/Components/TextInput/TextInputState.windows.js +42 -16
  212. package/Libraries/Components/TextInput/WindowsTextInputNativeComponent.js +772 -9
  213. package/Libraries/Components/ToastAndroid/NativeToastAndroid.js +4 -30
  214. package/Libraries/Components/ToastAndroid/ToastAndroid.android.js +4 -5
  215. package/Libraries/Components/ToastAndroid/ToastAndroid.d.ts +47 -0
  216. package/Libraries/Components/ToastAndroid/ToastAndroid.js +45 -0
  217. package/Libraries/Components/Touchable/BoundingDimensions.js +4 -5
  218. package/Libraries/Components/Touchable/PooledClass.js +26 -15
  219. package/Libraries/Components/Touchable/Position.js +3 -4
  220. package/Libraries/Components/Touchable/Touchable.d.ts +90 -0
  221. package/Libraries/Components/Touchable/Touchable.js +99 -90
  222. package/Libraries/Components/Touchable/Touchable.windows.js +974 -0
  223. package/Libraries/Components/Touchable/TouchableBounce.js +52 -18
  224. package/Libraries/Components/Touchable/TouchableHighlight.d.ts +68 -0
  225. package/Libraries/Components/Touchable/TouchableHighlight.js +60 -22
  226. package/Libraries/Components/Touchable/TouchableHighlight.windows.js +59 -17
  227. package/Libraries/Components/Touchable/TouchableNativeFeedback.d.ts +114 -0
  228. package/Libraries/Components/Touchable/TouchableNativeFeedback.js +85 -37
  229. package/Libraries/Components/Touchable/TouchableOpacity.d.ts +109 -0
  230. package/Libraries/Components/Touchable/TouchableOpacity.js +89 -26
  231. package/Libraries/Components/Touchable/TouchableOpacity.windows.js +88 -21
  232. package/Libraries/Components/Touchable/TouchableWithoutFeedback.d.ts +143 -0
  233. package/Libraries/Components/Touchable/TouchableWithoutFeedback.js +87 -20
  234. package/Libraries/Components/Touchable/TouchableWithoutFeedback.windows.js +87 -20
  235. package/Libraries/Components/UnimplementedViews/UnimplementedNativeViewNativeComponent.js +4 -19
  236. package/Libraries/Components/UnimplementedViews/UnimplementedView.js +3 -4
  237. package/Libraries/Components/View/ReactNativeStyleAttributes.js +167 -69
  238. package/Libraries/Components/View/ReactNativeViewAttributes.js +4 -3
  239. package/Libraries/Components/View/ReactNativeViewAttributes.windows.js +61 -0
  240. package/Libraries/Components/View/View.d.ts +29 -0
  241. package/Libraries/Components/View/View.js +116 -13
  242. package/Libraries/Components/View/View.windows.js +250 -30
  243. package/Libraries/Components/View/ViewAccessibility.d.ts +415 -0
  244. package/Libraries/Components/View/ViewAccessibility.js +84 -3
  245. package/Libraries/Components/View/ViewAccessibility.windows.js +86 -3
  246. package/Libraries/Components/View/ViewNativeComponent.js +96 -57
  247. package/Libraries/Components/View/ViewPropTypes.d.ts +363 -0
  248. package/Libraries/Components/View/ViewPropTypes.js +200 -59
  249. package/Libraries/Components/View/ViewPropTypes.windows.js +221 -61
  250. package/Libraries/Core/Devtools/getDevServer.js +1 -3
  251. package/Libraries/Core/Devtools/loadBundleFromServer.js +152 -0
  252. package/Libraries/Core/Devtools/openFileInEditor.js +5 -1
  253. package/Libraries/Core/Devtools/openURLInBrowser.js +2 -1
  254. package/Libraries/Core/Devtools/parseErrorStack.js +8 -17
  255. package/Libraries/Core/Devtools/parseHermesStack.js +70 -43
  256. package/Libraries/Core/Devtools/symbolicateStackTrace.js +5 -4
  257. package/Libraries/Core/ExceptionsManager.js +90 -98
  258. package/Libraries/Core/ExtendedError.js +33 -0
  259. package/Libraries/Core/InitializeCore.js +5 -4
  260. package/Libraries/Core/NativeExceptionsManager.js +4 -98
  261. package/Libraries/Core/RawEventEmitter.js +39 -0
  262. package/Libraries/Core/ReactFiberErrorDialog.js +45 -35
  263. package/Libraries/Core/ReactNativeVersion.js +12 -6
  264. package/Libraries/Core/ReactNativeVersionCheck.js +10 -7
  265. package/Libraries/Core/SegmentFetcher/NativeSegmentFetcher.js +4 -20
  266. package/Libraries/Core/Timers/JSTimers.js +82 -77
  267. package/Libraries/Core/Timers/NativeTiming.js +4 -18
  268. package/Libraries/Core/Timers/immediateShim.js +68 -0
  269. package/Libraries/Core/Timers/queueMicrotask.js +41 -0
  270. package/Libraries/Core/__mocks__/ErrorUtils.js +1 -1
  271. package/Libraries/Core/__mocks__/NativeExceptionsManager.js +20 -0
  272. package/Libraries/Core/checkNativeVersion.js +1 -1
  273. package/Libraries/Core/polyfillPromise.js +2 -2
  274. package/Libraries/Core/registerCallableModule.js +42 -0
  275. package/Libraries/Core/setUpAlert.js +2 -2
  276. package/Libraries/Core/setUpBatchedBridge.js +21 -9
  277. package/Libraries/Core/setUpDeveloperTools.js +57 -60
  278. package/Libraries/Core/setUpErrorHandling.js +2 -2
  279. package/Libraries/Core/setUpGlobals.js +6 -5
  280. package/Libraries/Core/setUpIntersectionObserver.js +16 -0
  281. package/Libraries/Core/setUpMutationObserver.js +16 -0
  282. package/Libraries/Core/setUpNavigator.js +7 -6
  283. package/Libraries/Core/setUpPerformance.js +18 -15
  284. package/Libraries/Core/setUpPerformanceObserver.js +18 -0
  285. package/Libraries/Core/setUpReactDevTools.js +28 -5
  286. package/Libraries/Core/setUpReactRefresh.js +4 -2
  287. package/Libraries/Core/setUpRegeneratorRuntime.js +28 -9
  288. package/Libraries/Core/setUpSegmentFetcher.js +3 -44
  289. package/Libraries/Core/setUpTimers.js +77 -8
  290. package/Libraries/Core/setUpXHR.js +5 -5
  291. package/Libraries/Debugging/DebuggingOverlay.js +111 -0
  292. package/Libraries/Debugging/DebuggingOverlayNativeComponent.js +13 -0
  293. package/Libraries/Debugging/DebuggingOverlayRegistry.js +513 -0
  294. package/Libraries/Debugging/useSubscribeToDebuggingOverlayRegistry.js +32 -0
  295. package/Libraries/DevToolsSettings/DevToolsSettingsManager.android.js +35 -0
  296. package/Libraries/DevToolsSettings/DevToolsSettingsManager.d.ts +20 -0
  297. package/Libraries/DevToolsSettings/DevToolsSettingsManager.ios.js +49 -0
  298. package/Libraries/DevToolsSettings/DevToolsSettingsManager.windows.js +35 -0
  299. package/Libraries/DevToolsSettings/NativeDevToolsSettingsManager.js +13 -0
  300. package/Libraries/EventEmitter/NativeEventEmitter.d.ts +63 -0
  301. package/Libraries/EventEmitter/NativeEventEmitter.js +90 -48
  302. package/Libraries/EventEmitter/RCTDeviceEventEmitter.d.ts +29 -0
  303. package/Libraries/EventEmitter/RCTDeviceEventEmitter.js +26 -66
  304. package/Libraries/EventEmitter/RCTEventEmitter.js +6 -2
  305. package/Libraries/EventEmitter/RCTNativeAppEventEmitter.d.ts +32 -0
  306. package/Libraries/EventEmitter/RCTNativeAppEventEmitter.js +1 -3
  307. package/Libraries/EventEmitter/__mocks__/NativeEventEmitter.js +33 -8
  308. package/Libraries/Events/CustomEvent.js +32 -0
  309. package/Libraries/Events/EventPolyfill.js +239 -0
  310. package/Libraries/HeapCapture/HeapCapture.js +2 -4
  311. package/Libraries/HeapCapture/NativeJSCHeapCapture.js +4 -11
  312. package/Libraries/Image/AssetRegistry.js +2 -2
  313. package/Libraries/Image/AssetSourceResolver.js +20 -32
  314. package/Libraries/Image/AssetSourceResolver.windows.js +186 -0
  315. package/Libraries/Image/AssetUtils.js +47 -0
  316. package/Libraries/Image/Image.android.js +200 -298
  317. package/Libraries/Image/Image.d.ts +382 -0
  318. package/Libraries/Image/Image.ios.js +122 -105
  319. package/Libraries/Image/Image.windows.js +123 -106
  320. package/Libraries/Image/ImageAnalyticsTagContext.js +3 -6
  321. package/Libraries/Image/ImageBackground.js +38 -12
  322. package/Libraries/Image/ImageInjection.js +87 -0
  323. package/Libraries/Image/ImageProps.js +133 -22
  324. package/Libraries/Image/ImageResizeMode.d.ts +49 -0
  325. package/Libraries/Image/ImageResizeMode.js +1 -1
  326. package/Libraries/Image/ImageSource.d.ts +76 -0
  327. package/Libraries/Image/ImageSource.js +60 -17
  328. package/Libraries/Image/ImageSourceUtils.js +80 -0
  329. package/Libraries/Image/ImageTypes.flow.js +76 -0
  330. package/Libraries/Image/ImageUtils.js +21 -0
  331. package/Libraries/Image/ImageViewNativeComponent.js +143 -29
  332. package/Libraries/Image/NativeImageEditor.js +4 -44
  333. package/Libraries/Image/NativeImageLoaderAndroid.js +5 -32
  334. package/Libraries/Image/NativeImageLoaderIOS.js +5 -29
  335. package/Libraries/Image/NativeImageStoreAndroid.js +4 -18
  336. package/Libraries/Image/NativeImageStoreIOS.js +4 -25
  337. package/Libraries/Image/RelativeImageStub.js +2 -2
  338. package/Libraries/Image/TextInlineImageNativeComponent.js +38 -7
  339. package/Libraries/Image/assetPaths.js +36 -0
  340. package/Libraries/Image/nativeImageSource.js +4 -6
  341. package/Libraries/Image/resolveAssetSource.js +65 -31
  342. package/Libraries/Image/resolveAssetSource.windows.js +148 -0
  343. package/Libraries/Inspector/BorderBox.js +2 -2
  344. package/Libraries/Inspector/BoxInspector.js +4 -5
  345. package/Libraries/Inspector/ElementBox.js +10 -8
  346. package/Libraries/Inspector/ElementProperties.js +34 -61
  347. package/Libraries/Inspector/Inspector.js +131 -275
  348. package/Libraries/Inspector/InspectorOverlay.js +26 -38
  349. package/Libraries/Inspector/InspectorPanel.js +15 -27
  350. package/Libraries/Inspector/NetworkOverlay.js +24 -18
  351. package/Libraries/Inspector/PerformanceOverlay.js +4 -4
  352. package/Libraries/Inspector/ReactDevToolsOverlay.js +171 -0
  353. package/Libraries/Inspector/StyleInspector.js +3 -3
  354. package/Libraries/Inspector/getInspectorDataForViewAtPoint.js +83 -0
  355. package/Libraries/Inspector/resolveBoxStyle.js +1 -1
  356. package/Libraries/Interaction/FrameRateLogger.js +10 -22
  357. package/Libraries/Interaction/InteractionManager.d.ts +74 -0
  358. package/Libraries/Interaction/InteractionManager.js +17 -29
  359. package/Libraries/Interaction/JSEventLoopWatchdog.js +7 -11
  360. package/Libraries/Interaction/NativeFrameRateLogger.js +5 -16
  361. package/Libraries/Interaction/PanResponder.d.ts +202 -0
  362. package/Libraries/Interaction/PanResponder.js +26 -28
  363. package/Libraries/Interaction/TaskQueue.js +6 -5
  364. package/Libraries/Interaction/TouchHistoryMath.js +12 -12
  365. package/Libraries/IntersectionObserver/IntersectionObserver.js +252 -0
  366. package/Libraries/IntersectionObserver/IntersectionObserverEntry.js +141 -0
  367. package/Libraries/IntersectionObserver/IntersectionObserverManager.js +299 -0
  368. package/Libraries/IntersectionObserver/NativeIntersectionObserver.js +13 -0
  369. package/Libraries/IntersectionObserver/__mocks__/NativeIntersectionObserver.js +172 -0
  370. package/Libraries/JSInspector/InspectorAgent.js +1 -1
  371. package/Libraries/JSInspector/JSInspector.js +1 -4
  372. package/Libraries/JSInspector/NetworkAgent.js +5 -10
  373. package/Libraries/LayoutAnimation/LayoutAnimation.d.ts +84 -0
  374. package/Libraries/LayoutAnimation/LayoutAnimation.js +71 -21
  375. package/Libraries/Linking/Linking.d.ts +61 -0
  376. package/Libraries/Linking/Linking.js +23 -27
  377. package/Libraries/Linking/NativeIntentAndroid.js +4 -22
  378. package/Libraries/Linking/NativeLinkingManager.js +4 -19
  379. package/Libraries/Lists/FillRateHelper.js +6 -228
  380. package/Libraries/Lists/FlatList.d.ts +245 -0
  381. package/Libraries/Lists/FlatList.js +193 -113
  382. package/Libraries/Lists/FlatList.windows.js +717 -0
  383. package/Libraries/Lists/SectionList.d.ts +267 -0
  384. package/Libraries/Lists/SectionList.js +36 -31
  385. package/Libraries/Lists/SectionListModern.js +249 -0
  386. package/Libraries/Lists/ViewabilityHelper.js +10 -327
  387. package/Libraries/Lists/VirtualizeUtils.js +6 -235
  388. package/Libraries/Lists/VirtualizedList.js +10 -2109
  389. package/Libraries/Lists/VirtualizedListContext.js +5 -142
  390. package/Libraries/Lists/VirtualizedSectionList.js +9 -565
  391. package/Libraries/Lists/__flowtests__/FlatList-flowtest.js +2 -1
  392. package/Libraries/Lists/__flowtests__/SectionList-flowtest.js +8 -8
  393. package/Libraries/LogBox/Data/LogBoxData.js +37 -34
  394. package/Libraries/LogBox/Data/LogBoxLog.js +11 -10
  395. package/Libraries/LogBox/Data/LogBoxSymbolication.js +10 -9
  396. package/Libraries/LogBox/Data/parseLogBoxLog.js +97 -61
  397. package/Libraries/LogBox/LogBox.d.ts +28 -0
  398. package/Libraries/LogBox/LogBox.js +124 -76
  399. package/Libraries/LogBox/LogBoxInspectorContainer.js +6 -6
  400. package/Libraries/LogBox/LogBoxNotificationContainer.js +3 -5
  401. package/Libraries/LogBox/UI/AnsiHighlight.js +17 -8
  402. package/Libraries/LogBox/UI/LogBoxButton.js +6 -7
  403. package/Libraries/LogBox/UI/LogBoxImages/alert-triangle.png +0 -0
  404. package/Libraries/LogBox/UI/LogBoxImages/chevron-left.png +0 -0
  405. package/Libraries/LogBox/UI/LogBoxImages/chevron-right.png +0 -0
  406. package/Libraries/LogBox/UI/LogBoxImages/close.png +0 -0
  407. package/Libraries/LogBox/UI/LogBoxImages/loader.png +0 -0
  408. package/Libraries/LogBox/UI/LogBoxInspector.js +8 -10
  409. package/Libraries/LogBox/UI/LogBoxInspectorCodeFrame.js +12 -10
  410. package/Libraries/LogBox/UI/LogBoxInspectorCodeFrame.windows.js +167 -0
  411. package/Libraries/LogBox/UI/LogBoxInspectorFooter.js +27 -35
  412. package/Libraries/LogBox/UI/LogBoxInspectorHeader.js +9 -9
  413. package/Libraries/LogBox/UI/LogBoxInspectorHeader.windows.js +172 -0
  414. package/Libraries/LogBox/UI/LogBoxInspectorMessageHeader.js +6 -7
  415. package/Libraries/LogBox/UI/LogBoxInspectorReactFrames.js +8 -9
  416. package/Libraries/LogBox/UI/LogBoxInspectorReactFrames.windows.js +193 -0
  417. package/Libraries/LogBox/UI/LogBoxInspectorSection.js +3 -5
  418. package/Libraries/LogBox/UI/LogBoxInspectorSourceMapStatus.js +4 -8
  419. package/Libraries/LogBox/UI/LogBoxInspectorStackFrame.js +8 -10
  420. package/Libraries/LogBox/UI/LogBoxInspectorStackFrame.windows.js +118 -0
  421. package/Libraries/LogBox/UI/LogBoxInspectorStackFrames.js +19 -11
  422. package/Libraries/LogBox/UI/LogBoxMessage.js +100 -19
  423. package/Libraries/LogBox/UI/LogBoxNotification.js +15 -14
  424. package/Libraries/LogBox/UI/LogBoxStyle.js +1 -3
  425. package/Libraries/Modal/Modal.d.ts +104 -0
  426. package/Libraries/Modal/Modal.js +107 -49
  427. package/Libraries/Modal/ModalInjection.js +15 -0
  428. package/Libraries/Modal/NativeModalManager.js +4 -13
  429. package/Libraries/Modal/RCTModalHostViewNativeComponent.js +4 -126
  430. package/Libraries/MutationObserver/MutationObserver.js +184 -0
  431. package/Libraries/MutationObserver/MutationObserverManager.js +218 -0
  432. package/Libraries/MutationObserver/MutationRecord.js +84 -0
  433. package/Libraries/MutationObserver/NativeMutationObserver.js +13 -0
  434. package/Libraries/MutationObserver/__mocks__/NativeMutationObserver.js +327 -0
  435. package/Libraries/NativeComponent/BaseViewConfig.android.js +339 -0
  436. package/Libraries/NativeComponent/BaseViewConfig.ios.js +401 -0
  437. package/Libraries/NativeComponent/BaseViewConfig.windows.js +454 -0
  438. package/Libraries/NativeComponent/NativeComponentRegistry.js +157 -0
  439. package/Libraries/NativeComponent/NativeComponentRegistryUnstable.js +30 -0
  440. package/Libraries/NativeComponent/PlatformBaseViewConfig.js +25 -0
  441. package/Libraries/NativeComponent/StaticViewConfigValidator.js +163 -0
  442. package/Libraries/NativeComponent/ViewConfig.js +52 -0
  443. package/Libraries/NativeComponent/ViewConfigIgnore.js +51 -0
  444. package/Libraries/NativeModules/specs/NativeAnimationsDebugModule.js +4 -12
  445. package/Libraries/NativeModules/specs/NativeDevMenu.js +4 -15
  446. package/Libraries/NativeModules/specs/NativeDevSettings.js +4 -25
  447. package/Libraries/NativeModules/specs/NativeDeviceEventManager.js +4 -11
  448. package/Libraries/NativeModules/specs/NativeDialogManagerAndroid.js +4 -40
  449. package/Libraries/NativeModules/specs/NativeDialogManagerWindows.js +11 -0
  450. package/Libraries/NativeModules/specs/NativeLogBox.js +4 -12
  451. package/Libraries/NativeModules/specs/NativeRedBox.js +5 -13
  452. package/Libraries/NativeModules/specs/NativeSourceCode.js +3 -27
  453. package/Libraries/Network/FormData.js +11 -3
  454. package/Libraries/Network/NativeNetworkingAndroid.js +5 -30
  455. package/Libraries/Network/NativeNetworkingIOS.js +5 -30
  456. package/Libraries/Network/RCTNetworking.android.js +15 -9
  457. package/Libraries/Network/RCTNetworking.ios.js +65 -21
  458. package/Libraries/Network/RCTNetworking.windows.js +112 -1
  459. package/Libraries/Network/XHRInterceptor.js +6 -7
  460. package/Libraries/Network/XMLHttpRequest.js +61 -22
  461. package/Libraries/Network/convertRequestBody.js +4 -4
  462. package/Libraries/Network/fetch.js +1 -1
  463. package/Libraries/NewAppScreen/components/Colors.js +1 -3
  464. package/Libraries/NewAppScreen/components/DebugInstructions.js +9 -6
  465. package/Libraries/NewAppScreen/components/DebugInstructions.windows.js +7 -5
  466. package/Libraries/NewAppScreen/components/Header.js +8 -4
  467. package/Libraries/NewAppScreen/components/HermesBadge.js +11 -4
  468. package/Libraries/NewAppScreen/components/LearnMoreLinks.js +18 -13
  469. package/Libraries/NewAppScreen/components/ReloadInstructions.js +5 -2
  470. package/Libraries/NewAppScreen/components/ReloadInstructions.windows.js +4 -2
  471. package/Libraries/NewAppScreen/components/logo.png +0 -0
  472. package/Libraries/NewAppScreen/index.js +2 -4
  473. package/Libraries/Performance/NativeJSCSamplingProfiler.js +4 -11
  474. package/Libraries/Performance/SamplingProfiler.js +4 -4
  475. package/Libraries/Performance/Systrace.d.ts +66 -0
  476. package/Libraries/Performance/Systrace.js +114 -194
  477. package/Libraries/PermissionsAndroid/NativePermissionsAndroid.js +5 -52
  478. package/Libraries/PermissionsAndroid/PermissionsAndroid.d.ts +116 -0
  479. package/Libraries/PermissionsAndroid/PermissionsAndroid.js +59 -22
  480. package/Libraries/Pressability/HoverState.js +5 -3
  481. package/Libraries/Pressability/Pressability.js +211 -135
  482. package/Libraries/Pressability/Pressability.windows.js +318 -167
  483. package/Libraries/Pressability/PressabilityDebug.js +30 -26
  484. package/Libraries/Pressability/PressabilityPerformanceEventEmitter.js +49 -0
  485. package/Libraries/Pressability/PressabilityTypes.js +18 -0
  486. package/Libraries/Pressability/usePressability.js +8 -3
  487. package/Libraries/Promise.js +1 -2
  488. package/Libraries/PushNotificationIOS/NativePushNotificationManagerIOS.js +5 -66
  489. package/Libraries/PushNotificationIOS/PushNotificationIOS.d.ts +295 -0
  490. package/Libraries/PushNotificationIOS/PushNotificationIOS.js +132 -81
  491. package/Libraries/ReactNative/AppContainer-dev.js +192 -0
  492. package/Libraries/ReactNative/AppContainer-prod.js +53 -0
  493. package/Libraries/ReactNative/AppContainer.js +9 -136
  494. package/Libraries/ReactNative/AppRegistry.d.ts +114 -0
  495. package/Libraries/ReactNative/AppRegistry.js +130 -71
  496. package/Libraries/ReactNative/BridgelessUIManager.js +438 -0
  497. package/Libraries/ReactNative/DisplayMode.js +32 -0
  498. package/Libraries/ReactNative/FabricUIManager.js +164 -32
  499. package/Libraries/ReactNative/HeadlessJsTaskError.js +1 -3
  500. package/Libraries/ReactNative/I18nManager.d.ts +25 -0
  501. package/Libraries/ReactNative/I18nManager.js +17 -12
  502. package/Libraries/ReactNative/NativeHeadlessJsTaskSupport.js +4 -12
  503. package/Libraries/ReactNative/NativeI18nManager.js +4 -17
  504. package/Libraries/ReactNative/NativeUIManager.js +5 -113
  505. package/Libraries/ReactNative/PaperUIManager.js +79 -52
  506. package/Libraries/ReactNative/PaperUIManager.windows.js +71 -40
  507. package/Libraries/ReactNative/ReactFabricInternals.js +2 -2
  508. package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricHostComponent.js +151 -0
  509. package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance.js +100 -0
  510. package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstanceUtils.js +38 -0
  511. package/Libraries/ReactNative/ReactFabricPublicInstance/ReactNativeAttributePayload.js +492 -0
  512. package/Libraries/ReactNative/ReactFabricPublicInstance/warnForStyleProps.js +32 -0
  513. package/Libraries/ReactNative/ReactNativeFeatureFlags.js +31 -0
  514. package/Libraries/ReactNative/ReactNativeRuntimeDiagnostics.js +68 -0
  515. package/Libraries/ReactNative/RendererImplementation.js +123 -0
  516. package/Libraries/ReactNative/RendererProxy.d.ts +20 -0
  517. package/Libraries/ReactNative/RendererProxy.js +26 -0
  518. package/Libraries/ReactNative/RootTag.d.ts +13 -0
  519. package/Libraries/ReactNative/RootTag.js +5 -9
  520. package/Libraries/ReactNative/UIManager.d.ts +134 -0
  521. package/Libraries/ReactNative/UIManager.js +178 -24
  522. package/Libraries/ReactNative/UIManagerProperties.js +2 -3
  523. package/Libraries/ReactNative/__mocks__/FabricUIManager.js +670 -0
  524. package/Libraries/ReactNative/getCachedComponentWithDebugName.js +35 -0
  525. package/Libraries/ReactNative/getNativeComponentAttributes.js +34 -18
  526. package/Libraries/ReactNative/renderApplication.js +62 -19
  527. package/Libraries/ReactNative/requireNativeComponent.d.ts +23 -0
  528. package/Libraries/ReactNative/requireNativeComponent.js +4 -4
  529. package/Libraries/ReactPrivate/ReactNativePrivateInitializeCore.js +1 -1
  530. package/Libraries/ReactPrivate/ReactNativePrivateInterface.js +66 -11
  531. package/Libraries/Renderer/implementations/ReactFabric-dev.js +25088 -18550
  532. package/Libraries/Renderer/implementations/ReactFabric-prod.js +5698 -3917
  533. package/Libraries/Renderer/implementations/ReactFabric-profiling.js +6388 -4402
  534. package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +25418 -19040
  535. package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +5768 -3968
  536. package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js +6269 -4235
  537. package/Libraries/Renderer/shims/ReactFabric.js +9 -8
  538. package/Libraries/Renderer/shims/ReactFeatureFlags.js +4 -2
  539. package/Libraries/Renderer/shims/ReactNative.js +4 -2
  540. package/Libraries/Renderer/shims/ReactNativeTypes.js +160 -100
  541. package/Libraries/Renderer/shims/ReactNativeViewConfigRegistry.js +23 -32
  542. package/Libraries/Renderer/shims/createReactNativeComponentClass.js +7 -6
  543. package/Libraries/Settings/NativeSettingsManager.js +5 -18
  544. package/Libraries/Settings/Settings.d.ts +18 -0
  545. package/Libraries/Settings/Settings.ios.js +5 -3
  546. package/Libraries/Settings/Settings.js +33 -0
  547. package/Libraries/Share/NativeShareModule.js +4 -15
  548. package/Libraries/Share/Share.d.ts +74 -0
  549. package/Libraries/Share/Share.js +8 -8
  550. package/Libraries/StyleSheet/EdgeInsetsPropType.js +5 -2
  551. package/Libraries/StyleSheet/PlatformColorValueTypes.android.js +10 -7
  552. package/Libraries/StyleSheet/PlatformColorValueTypes.d.ts +18 -0
  553. package/Libraries/StyleSheet/PlatformColorValueTypes.ios.js +52 -16
  554. package/Libraries/StyleSheet/PlatformColorValueTypes.windows.js +11 -7
  555. package/Libraries/StyleSheet/PlatformColorValueTypesIOS.d.ts +25 -0
  556. package/Libraries/StyleSheet/PlatformColorValueTypesIOS.ios.js +11 -5
  557. package/Libraries/StyleSheet/PlatformColorValueTypesIOS.js +3 -3
  558. package/Libraries/StyleSheet/PointPropType.js +1 -1
  559. package/Libraries/StyleSheet/Rect.js +1 -3
  560. package/Libraries/StyleSheet/StyleSheet.d.ts +150 -0
  561. package/Libraries/StyleSheet/StyleSheet.js +29 -46
  562. package/Libraries/StyleSheet/StyleSheetTypes.d.ts +410 -0
  563. package/Libraries/StyleSheet/StyleSheetTypes.js +362 -114
  564. package/Libraries/StyleSheet/__flowtests__/StyleSheet-flowtest.js +3 -3
  565. package/Libraries/StyleSheet/flattenStyle.js +13 -9
  566. package/Libraries/StyleSheet/normalizeColor.js +7 -9
  567. package/Libraries/StyleSheet/private/_StyleSheetTypesOverrides.js +15 -0
  568. package/Libraries/StyleSheet/private/_TransformStyle.js +69 -0
  569. package/Libraries/StyleSheet/processAspectRatio.js +63 -0
  570. package/Libraries/StyleSheet/processColor.d.ts +16 -0
  571. package/Libraries/StyleSheet/processColor.js +6 -8
  572. package/Libraries/StyleSheet/processColorArray.js +18 -7
  573. package/Libraries/StyleSheet/processFontVariant.js +30 -0
  574. package/Libraries/StyleSheet/processTransform.js +141 -111
  575. package/Libraries/StyleSheet/processTransformOrigin.js +136 -0
  576. package/Libraries/StyleSheet/setNormalizedColorAlpha.js +1 -1
  577. package/Libraries/StyleSheet/splitLayoutProps.js +57 -49
  578. package/Libraries/Text/Text.d.ts +219 -0
  579. package/Libraries/Text/Text.js +283 -224
  580. package/Libraries/Text/Text.windows.js +395 -292
  581. package/Libraries/Text/TextAncestor.js +3 -4
  582. package/Libraries/Text/TextNativeComponent.js +56 -43
  583. package/Libraries/Text/TextProps.js +97 -31
  584. package/Libraries/Text/TextProps.windows.js +275 -0
  585. package/Libraries/TurboModule/RCTExport.d.ts +12 -0
  586. package/Libraries/TurboModule/RCTExport.js +2 -2
  587. package/Libraries/TurboModule/TurboModuleRegistry.d.ts +13 -0
  588. package/Libraries/TurboModule/TurboModuleRegistry.js +55 -36
  589. package/Libraries/TurboModule/samples/NativeSampleTurboModule.js +5 -29
  590. package/Libraries/Types/CodegenTypes.js +4 -2
  591. package/Libraries/Types/CoreEventTypes.d.ts +266 -0
  592. package/Libraries/Types/CoreEventTypes.js +142 -5
  593. package/Libraries/Types/CoreEventTypes.windows.js +154 -5
  594. package/Libraries/Types/ReactDevToolsTypes.js +58 -0
  595. package/Libraries/Types/RootTagTypes.js +11 -0
  596. package/Libraries/Types/UIManagerJSInterface.js +16 -0
  597. package/Libraries/UTFSequence.js +5 -3
  598. package/Libraries/Utilities/Appearance.d.ts +53 -0
  599. package/Libraries/Utilities/Appearance.js +35 -15
  600. package/Libraries/Utilities/BackHandler.android.js +8 -12
  601. package/Libraries/Utilities/BackHandler.d.ts +38 -0
  602. package/Libraries/Utilities/BackHandler.ios.js +1 -1
  603. package/Libraries/Utilities/BackHandler.windows.js +8 -12
  604. package/Libraries/Utilities/DebugEnvironment.js +3 -8
  605. package/Libraries/Utilities/DevSettings.d.ts +32 -0
  606. package/Libraries/Utilities/DevSettings.js +55 -58
  607. package/Libraries/Utilities/DeviceInfo.js +1 -3
  608. package/Libraries/Utilities/Dimensions.d.ts +79 -0
  609. package/Libraries/Utilities/Dimensions.js +29 -49
  610. package/Libraries/Utilities/FeatureDetection.js +31 -0
  611. package/Libraries/Utilities/GlobalPerformanceLogger.js +2 -3
  612. package/Libraries/Utilities/HMRClient.js +51 -25
  613. package/Libraries/Utilities/HMRClientProdShim.js +1 -1
  614. package/Libraries/Utilities/IPerformanceLogger.d.ts +48 -0
  615. package/Libraries/Utilities/IPerformanceLogger.js +49 -0
  616. package/Libraries/Utilities/LoadingView.android.js +29 -14
  617. package/Libraries/Utilities/LoadingView.ios.js +2 -4
  618. package/Libraries/Utilities/LoadingView.js +1 -1
  619. package/Libraries/Utilities/NativeAppearance.js +4 -27
  620. package/Libraries/Utilities/NativeDevLoadingView.js +4 -16
  621. package/Libraries/Utilities/NativeDeviceInfo.js +3 -50
  622. package/Libraries/Utilities/NativePlatformConstantsAndroid.js +4 -31
  623. package/Libraries/Utilities/NativePlatformConstantsIOS.js +4 -25
  624. package/Libraries/Utilities/NativePlatformConstantsWin.js +3 -21
  625. package/Libraries/Utilities/PerformanceLoggerContext.js +14 -10
  626. package/Libraries/Utilities/PixelRatio.d.ts +64 -0
  627. package/Libraries/Utilities/PixelRatio.js +3 -3
  628. package/Libraries/Utilities/Platform.android.js +29 -14
  629. package/Libraries/Utilities/Platform.d.ts +106 -0
  630. package/Libraries/Utilities/Platform.flow.js +91 -0
  631. package/Libraries/Utilities/Platform.flow.windows.js +120 -0
  632. package/Libraries/Utilities/Platform.ios.js +32 -18
  633. package/Libraries/Utilities/Platform.windows.js +31 -14
  634. package/Libraries/Utilities/PolyfillFunctions.js +3 -3
  635. package/Libraries/Utilities/RCTLog.js +1 -1
  636. package/Libraries/Utilities/ReactNativeTestTools.js +29 -44
  637. package/Libraries/Utilities/SceneTracker.js +6 -5
  638. package/Libraries/Utilities/__mocks__/BackHandler.js +4 -4
  639. package/Libraries/Utilities/__mocks__/GlobalPerformanceLogger.js +1 -1
  640. package/Libraries/Utilities/__mocks__/PixelRatio.js +2 -2
  641. package/Libraries/Utilities/binaryToBase64.js +2 -2
  642. package/Libraries/Utilities/codegenNativeCommands.js +6 -6
  643. package/Libraries/Utilities/codegenNativeComponent.js +21 -11
  644. package/Libraries/Utilities/createPerformanceLogger.js +21 -53
  645. package/Libraries/Utilities/deepFreezeAndThrowOnMutationInDev.js +6 -3
  646. package/Libraries/Utilities/defineLazyObjectProperty.js +2 -2
  647. package/Libraries/Utilities/differ/deepDiffer.js +3 -3
  648. package/Libraries/Utilities/differ/insetsDiffer.js +2 -2
  649. package/Libraries/Utilities/differ/matricesDiffer.js +6 -2
  650. package/Libraries/Utilities/differ/pointsDiffer.js +2 -2
  651. package/Libraries/Utilities/differ/sizesDiffer.js +11 -5
  652. package/Libraries/Utilities/dismissKeyboard.js +1 -1
  653. package/Libraries/Utilities/infoLog.js +1 -1
  654. package/Libraries/Utilities/logError.js +2 -2
  655. package/Libraries/Utilities/mapWithSeparator.js +1 -1
  656. package/Libraries/Utilities/stringifySafe.js +7 -7
  657. package/Libraries/Utilities/useColorScheme.js +10 -16
  658. package/Libraries/Utilities/useMergeRefs.js +40 -0
  659. package/Libraries/Utilities/useRefEffect.js +45 -0
  660. package/Libraries/Utilities/useWindowDimensions.js +15 -8
  661. package/Libraries/Utilities/verifyComponentAttributeEquivalence.js +31 -35
  662. package/Libraries/Utilities/warnOnce.js +1 -1
  663. package/Libraries/Vibration/NativeVibration.js +4 -16
  664. package/Libraries/Vibration/Vibration.d.ts +43 -0
  665. package/Libraries/Vibration/Vibration.js +8 -9
  666. package/Libraries/WebSocket/NativeWebSocketModule.js +5 -27
  667. package/Libraries/WebSocket/WebSocket.js +38 -16
  668. package/Libraries/WebSocket/WebSocketEvent.js +1 -1
  669. package/Libraries/WebSocket/WebSocketInterceptor.js +13 -10
  670. package/Libraries/WebSocket/__mocks__/event-target-shim.js +1 -1
  671. package/Libraries/YellowBox/YellowBoxDeprecated.d.ts +19 -0
  672. package/Libraries/YellowBox/YellowBoxDeprecated.js +6 -6
  673. package/Libraries/__flowtests__/ReactNativeTypes-flowtest.js +2 -3
  674. package/Libraries/__tests__/ViewWindows-test.js +16 -0
  675. package/Libraries/platform-types.d.ts +19 -0
  676. package/Libraries/promiseRejectionTrackingOptions.js +29 -12
  677. package/Libraries/vendor/core/ErrorUtils.d.ts +15 -0
  678. package/Libraries/vendor/core/ErrorUtils.js +2 -2
  679. package/Libraries/vendor/emitter/EventEmitter.d.ts +164 -0
  680. package/Libraries/vendor/emitter/EventEmitter.js +145 -8
  681. package/Libraries/vendor/emitter/__flowtests__/EventEmitter-flowtest.js +81 -0
  682. package/Microsoft.ReactNative/ABIViewManager.cpp +82 -5
  683. package/Microsoft.ReactNative/ABIViewManager.h +25 -1
  684. package/Microsoft.ReactNative/AsynchronousEventBeat.cpp +50 -0
  685. package/Microsoft.ReactNative/AsynchronousEventBeat.h +23 -0
  686. package/Microsoft.ReactNative/Base/CoreUIManagers.cpp +4 -4
  687. package/Microsoft.ReactNative/Base/CxxReactIncludes.h +4 -6
  688. package/Microsoft.ReactNative/Base/FollyIncludes.h +2 -2
  689. package/Microsoft.ReactNative/ComponentView.idl +106 -0
  690. package/Microsoft.ReactNative/Composition.Input.idl +117 -0
  691. package/Microsoft.ReactNative/CompositionComponentView.idl +132 -0
  692. package/Microsoft.ReactNative/CompositionContext.idl +54 -0
  693. package/Microsoft.ReactNative/CompositionHwndHost.idl +39 -0
  694. package/Microsoft.ReactNative/CompositionRootView.idl +106 -0
  695. package/Microsoft.ReactNative/CompositionSwitcher.idl +164 -0
  696. package/Microsoft.ReactNative/CompositionUIService.idl +26 -0
  697. package/Microsoft.ReactNative/DesktopWindowMessage.idl +15 -0
  698. package/Microsoft.ReactNative/DevMenuControl.idl +6 -3
  699. package/Microsoft.ReactNative/DevMenuControl.xaml +15 -15
  700. package/Microsoft.ReactNative/DynamicReader.cpp +8 -2
  701. package/Microsoft.ReactNative/Fabric/AbiComponentDescriptor.cpp +189 -0
  702. package/Microsoft.ReactNative/Fabric/AbiComponentDescriptor.h +80 -0
  703. package/Microsoft.ReactNative/Fabric/AbiShadowNode.cpp +83 -0
  704. package/Microsoft.ReactNative/Fabric/AbiShadowNode.h +83 -0
  705. package/Microsoft.ReactNative/Fabric/AbiState.cpp +71 -0
  706. package/Microsoft.ReactNative/Fabric/AbiState.h +38 -0
  707. package/Microsoft.ReactNative/Fabric/AbiViewComponentDescriptor.cpp +190 -0
  708. package/Microsoft.ReactNative/Fabric/AbiViewComponentDescriptor.h +80 -0
  709. package/Microsoft.ReactNative/Fabric/AbiViewProps.cpp +152 -0
  710. package/Microsoft.ReactNative/Fabric/AbiViewProps.h +92 -0
  711. package/Microsoft.ReactNative/Fabric/AbiViewShadowNode.cpp +90 -0
  712. package/Microsoft.ReactNative/Fabric/AbiViewShadowNode.h +87 -0
  713. package/Microsoft.ReactNative/Fabric/ComponentView.cpp +340 -0
  714. package/Microsoft.ReactNative/Fabric/ComponentView.h +176 -0
  715. package/Microsoft.ReactNative/Fabric/Composition/ActivityIndicatorComponentView.cpp +162 -0
  716. package/Microsoft.ReactNative/Fabric/Composition/ActivityIndicatorComponentView.h +63 -0
  717. package/Microsoft.ReactNative/Fabric/Composition/ComponentViewRegistry.cpp +125 -0
  718. package/Microsoft.ReactNative/Fabric/Composition/ComponentViewRegistry.h +37 -0
  719. package/Microsoft.ReactNative/Fabric/Composition/Composition.Input.cpp +670 -0
  720. package/Microsoft.ReactNative/Fabric/Composition/Composition.Input.h +226 -0
  721. package/Microsoft.ReactNative/Fabric/Composition/CompositionContextHelper.cpp +1971 -0
  722. package/Microsoft.ReactNative/Fabric/Composition/CompositionContextHelper.h +65 -0
  723. package/Microsoft.ReactNative/Fabric/Composition/CompositionContextHelper_emptyimpl.cpp +79 -0
  724. package/Microsoft.ReactNative/Fabric/Composition/CompositionDynamicAutomationProvider.cpp +419 -0
  725. package/Microsoft.ReactNative/Fabric/Composition/CompositionDynamicAutomationProvider.h +53 -0
  726. package/Microsoft.ReactNative/Fabric/Composition/CompositionEventHandler.cpp +1183 -0
  727. package/Microsoft.ReactNative/Fabric/Composition/CompositionEventHandler.h +175 -0
  728. package/Microsoft.ReactNative/Fabric/Composition/CompositionHelpers.cpp +137 -0
  729. package/Microsoft.ReactNative/Fabric/Composition/CompositionHelpers.h +81 -0
  730. package/Microsoft.ReactNative/Fabric/Composition/CompositionHwndHost.cpp +160 -0
  731. package/Microsoft.ReactNative/Fabric/Composition/CompositionHwndHost.h +48 -0
  732. package/Microsoft.ReactNative/Fabric/Composition/CompositionRootAutomationProvider.cpp +444 -0
  733. package/Microsoft.ReactNative/Fabric/Composition/CompositionRootAutomationProvider.h +82 -0
  734. package/Microsoft.ReactNative/Fabric/Composition/CompositionRootView.cpp +701 -0
  735. package/Microsoft.ReactNative/Fabric/Composition/CompositionRootView.h +158 -0
  736. package/Microsoft.ReactNative/Fabric/Composition/CompositionRootView_emptyimpl.cpp +138 -0
  737. package/Microsoft.ReactNative/Fabric/Composition/CompositionUIService.cpp +42 -0
  738. package/Microsoft.ReactNative/Fabric/Composition/CompositionUIService.h +25 -0
  739. package/Microsoft.ReactNative/Fabric/Composition/CompositionUIService_emptyimpl.cpp +21 -0
  740. package/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.cpp +1836 -0
  741. package/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.h +236 -0
  742. package/Microsoft.ReactNative/Fabric/Composition/DebuggingOverlayComponentView.cpp +113 -0
  743. package/Microsoft.ReactNative/Fabric/Composition/DebuggingOverlayComponentView.h +39 -0
  744. package/Microsoft.ReactNative/Fabric/Composition/ImageComponentView.cpp +432 -0
  745. package/Microsoft.ReactNative/Fabric/Composition/ImageComponentView.h +101 -0
  746. package/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewComponentDescriptor.h +39 -0
  747. package/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewComponentView.cpp +342 -0
  748. package/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewComponentView.h +67 -0
  749. package/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewShadowNode.cpp +18 -0
  750. package/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewShadowNode.h +39 -0
  751. package/Microsoft.ReactNative/Fabric/Composition/ParagraphComponentView.cpp +361 -0
  752. package/Microsoft.ReactNative/Fabric/Composition/ParagraphComponentView.h +76 -0
  753. package/Microsoft.ReactNative/Fabric/Composition/ReactCompositionViewComponentBuilder.cpp +114 -0
  754. package/Microsoft.ReactNative/Fabric/Composition/ReactCompositionViewComponentBuilder.h +61 -0
  755. package/Microsoft.ReactNative/Fabric/Composition/RootComponentView.cpp +196 -0
  756. package/Microsoft.ReactNative/Fabric/Composition/RootComponentView.h +62 -0
  757. package/Microsoft.ReactNative/Fabric/Composition/ScrollViewComponentView.cpp +1219 -0
  758. package/Microsoft.ReactNative/Fabric/Composition/ScrollViewComponentView.h +145 -0
  759. package/Microsoft.ReactNative/Fabric/Composition/SwitchComponentView.cpp +390 -0
  760. package/Microsoft.ReactNative/Fabric/Composition/SwitchComponentView.h +83 -0
  761. package/Microsoft.ReactNative/Fabric/Composition/TextDrawing.cpp +179 -0
  762. package/Microsoft.ReactNative/Fabric/Composition/TextDrawing.h +25 -0
  763. package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentDescriptor.h +170 -0
  764. package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.cpp +1567 -0
  765. package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.h +143 -0
  766. package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputEventEmitter.cpp +49 -0
  767. package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputEventEmitter.h +45 -0
  768. package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputProps.cpp +61 -0
  769. package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputProps.h +123 -0
  770. package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputShadowNode.cpp +198 -0
  771. package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputShadowNode.h +82 -0
  772. package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputState.cpp +47 -0
  773. package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputState.h +74 -0
  774. package/Microsoft.ReactNative/Fabric/Composition/Theme.cpp +560 -0
  775. package/Microsoft.ReactNative/Fabric/Composition/Theme.h +81 -0
  776. package/Microsoft.ReactNative/Fabric/Composition/Theme_emptyimpl.cpp +85 -0
  777. package/Microsoft.ReactNative/Fabric/Composition/UiaHelpers.cpp +165 -0
  778. package/Microsoft.ReactNative/Fabric/Composition/UiaHelpers.h +32 -0
  779. package/Microsoft.ReactNative/Fabric/Composition/UnimplementedNativeViewComponentView.cpp +124 -0
  780. package/Microsoft.ReactNative/Fabric/Composition/UnimplementedNativeViewComponentView.h +41 -0
  781. package/Microsoft.ReactNative/Fabric/DWriteHelpers.cpp +19 -0
  782. package/Microsoft.ReactNative/Fabric/DWriteHelpers.h +13 -0
  783. package/Microsoft.ReactNative/Fabric/FabricUIManagerModule.cpp +446 -0
  784. package/Microsoft.ReactNative/Fabric/FabricUIManagerModule.h +99 -0
  785. package/Microsoft.ReactNative/Fabric/IComponentViewRegistry.h +35 -0
  786. package/Microsoft.ReactNative/Fabric/ImageManager.cpp +25 -0
  787. package/Microsoft.ReactNative/Fabric/ImageRequest.cpp +40 -0
  788. package/Microsoft.ReactNative/Fabric/ReactNativeConfigProperties.cpp +53 -0
  789. package/Microsoft.ReactNative/Fabric/ReactNativeConfigProperties.h +26 -0
  790. package/Microsoft.ReactNative/Fabric/ReactTaggedView.h +39 -0
  791. package/Microsoft.ReactNative/Fabric/WindowsComponentDescriptorRegistry.cpp +108 -0
  792. package/Microsoft.ReactNative/Fabric/WindowsComponentDescriptorRegistry.h +48 -0
  793. package/Microsoft.ReactNative/Fabric/WindowsImageManager.cpp +125 -0
  794. package/Microsoft.ReactNative/Fabric/WindowsImageManager.h +20 -0
  795. package/Microsoft.ReactNative/Fabric/platform/react/renderer/components/view/HostPlatformTouch.h +10 -0
  796. package/Microsoft.ReactNative/Fabric/platform/react/renderer/components/view/HostPlatformViewEventEmitter.cpp +57 -0
  797. package/Microsoft.ReactNative/Fabric/platform/react/renderer/components/view/HostPlatformViewEventEmitter.h +31 -0
  798. package/Microsoft.ReactNative/Fabric/platform/react/renderer/components/view/HostPlatformViewProps.cpp +69 -0
  799. package/Microsoft.ReactNative/Fabric/platform/react/renderer/components/view/HostPlatformViewProps.h +33 -0
  800. package/Microsoft.ReactNative/Fabric/platform/react/renderer/components/view/HostPlatformViewTraitsInitializer.h +27 -0
  801. package/Microsoft.ReactNative/Fabric/platform/react/renderer/components/view/KeyEvent.h +113 -0
  802. package/Microsoft.ReactNative/Fabric/platform/react/renderer/components/view/WindowsViewEvents.h +73 -0
  803. package/Microsoft.ReactNative/Fabric/platform/react/renderer/graphics/Float.h +20 -0
  804. package/Microsoft.ReactNative/Fabric/platform/react/renderer/graphics/HostPlatformColor.h +86 -0
  805. package/Microsoft.ReactNative/Fabric/platform/react/renderer/graphics/PlatformColorParser.h +38 -0
  806. package/Microsoft.ReactNative/Fabric/platform/react/renderer/graphics/PlatformColorUtils.cpp +145 -0
  807. package/Microsoft.ReactNative/Fabric/platform/react/renderer/graphics/PlatformColorUtils.h +12 -0
  808. package/Microsoft.ReactNative/Fabric/platform/react/renderer/textlayoutmanager/TextLayoutManager.cpp +315 -0
  809. package/Microsoft.ReactNative/Fabric/platform/react/renderer/textlayoutmanager/TextLayoutManager.h +97 -0
  810. package/Microsoft.ReactNative/GlyphViewManager.cpp +10 -9
  811. package/Microsoft.ReactNative/GlyphViewManager.h +1 -1
  812. package/Microsoft.ReactNative/IJSValueReader.idl +62 -14
  813. package/Microsoft.ReactNative/IJSValueWriter.idl +39 -19
  814. package/Microsoft.ReactNative/INativeUIManager.h +1 -1
  815. package/Microsoft.ReactNative/IReactCompositionViewComponentBuilder.idl +28 -0
  816. package/Microsoft.ReactNative/IReactContext.cpp +32 -15
  817. package/Microsoft.ReactNative/IReactContext.h +7 -8
  818. package/Microsoft.ReactNative/IReactContext.idl +158 -26
  819. package/Microsoft.ReactNative/IReactDispatcher.cpp +79 -4
  820. package/Microsoft.ReactNative/IReactDispatcher.h +35 -3
  821. package/Microsoft.ReactNative/IReactDispatcher.idl +40 -12
  822. package/Microsoft.ReactNative/IReactModuleBuilder.cpp +57 -0
  823. package/Microsoft.ReactNative/IReactModuleBuilder.idl +25 -20
  824. package/Microsoft.ReactNative/IReactNonAbiValue.idl +8 -10
  825. package/Microsoft.ReactNative/IReactNotificationService.cpp +220 -65
  826. package/Microsoft.ReactNative/IReactNotificationService.h +47 -26
  827. package/Microsoft.ReactNative/IReactNotificationService.idl +56 -54
  828. package/Microsoft.ReactNative/IReactPackageBuilder.idl +14 -13
  829. package/Microsoft.ReactNative/IReactPackageBuilderFabric.idl +23 -0
  830. package/Microsoft.ReactNative/IReactPackageProvider.idl +8 -6
  831. package/Microsoft.ReactNative/IReactPropertyBag.cpp +10 -1
  832. package/Microsoft.ReactNative/IReactPropertyBag.h +3 -0
  833. package/Microsoft.ReactNative/IReactPropertyBag.idl +48 -43
  834. package/Microsoft.ReactNative/IReactViewComponentBuilder.idl +93 -0
  835. package/Microsoft.ReactNative/IViewManager.idl +73 -2
  836. package/Microsoft.ReactNative/IViewManagerCore.idl +2 -0
  837. package/Microsoft.ReactNative/JSDispatcherWriter.cpp +146 -0
  838. package/Microsoft.ReactNative/JSDispatcherWriter.h +47 -0
  839. package/Microsoft.ReactNative/JsiApi.cpp +565 -255
  840. package/Microsoft.ReactNative/JsiApi.h +55 -12
  841. package/Microsoft.ReactNative/JsiApi.idl +148 -9
  842. package/Microsoft.ReactNative/JsiWriter.cpp +1 -13
  843. package/Microsoft.ReactNative/JsiWriter.h +0 -3
  844. package/Microsoft.ReactNative/LayoutService.cpp +51 -0
  845. package/Microsoft.ReactNative/LayoutService.h +32 -0
  846. package/Microsoft.ReactNative/LayoutService.idl +41 -0
  847. package/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj +130 -173
  848. package/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj.filters +111 -87
  849. package/Microsoft.ReactNative/Modules/AccessibilityInfoModule.cpp +24 -20
  850. package/Microsoft.ReactNative/Modules/AccessibilityInfoModule.h +13 -4
  851. package/Microsoft.ReactNative/Modules/AlertModule.cpp +215 -54
  852. package/Microsoft.ReactNative/Modules/AlertModule.h +32 -21
  853. package/Microsoft.ReactNative/Modules/Animated/AdditionAnimatedNode.cpp +35 -18
  854. package/Microsoft.ReactNative/Modules/Animated/AdditionAnimatedNode.h +5 -4
  855. package/Microsoft.ReactNative/Modules/Animated/AnimatedNode.cpp +19 -4
  856. package/Microsoft.ReactNative/Modules/Animated/AnimatedNode.h +21 -3
  857. package/Microsoft.ReactNative/Modules/Animated/AnimatedPlatformConfig.cpp +23 -0
  858. package/Microsoft.ReactNative/Modules/Animated/AnimatedPlatformConfig.h +17 -0
  859. package/Microsoft.ReactNative/Modules/Animated/AnimationDriver.cpp +74 -38
  860. package/Microsoft.ReactNative/Modules/Animated/AnimationDriver.h +37 -11
  861. package/Microsoft.ReactNative/Modules/Animated/AnimationUtils.h +45 -0
  862. package/Microsoft.ReactNative/Modules/Animated/CalculatedAnimationDriver.cpp +13 -10
  863. package/Microsoft.ReactNative/Modules/Animated/CalculatedAnimationDriver.h +4 -6
  864. package/Microsoft.ReactNative/Modules/Animated/DecayAnimationDriver.cpp +33 -17
  865. package/Microsoft.ReactNative/Modules/Animated/DecayAnimationDriver.h +6 -6
  866. package/Microsoft.ReactNative/Modules/Animated/DiffClampAnimatedNode.cpp +31 -16
  867. package/Microsoft.ReactNative/Modules/Animated/DiffClampAnimatedNode.h +6 -4
  868. package/Microsoft.ReactNative/Modules/Animated/DivisionAnimatedNode.cpp +44 -21
  869. package/Microsoft.ReactNative/Modules/Animated/DivisionAnimatedNode.h +5 -4
  870. package/Microsoft.ReactNative/Modules/Animated/EventAnimationDriver.cpp +4 -4
  871. package/Microsoft.ReactNative/Modules/Animated/EventAnimationDriver.h +3 -3
  872. package/Microsoft.ReactNative/Modules/Animated/FacadeType.h +8 -3
  873. package/Microsoft.ReactNative/Modules/Animated/FrameAnimationDriver.cpp +51 -12
  874. package/Microsoft.ReactNative/Modules/Animated/FrameAnimationDriver.h +9 -4
  875. package/Microsoft.ReactNative/Modules/Animated/InterpolationAnimatedNode.cpp +82 -42
  876. package/Microsoft.ReactNative/Modules/Animated/InterpolationAnimatedNode.h +8 -7
  877. package/Microsoft.ReactNative/Modules/Animated/ModulusAnimatedNode.cpp +27 -15
  878. package/Microsoft.ReactNative/Modules/Animated/ModulusAnimatedNode.h +6 -4
  879. package/Microsoft.ReactNative/Modules/Animated/MultiplicationAnimatedNode.cpp +35 -18
  880. package/Microsoft.ReactNative/Modules/Animated/MultiplicationAnimatedNode.h +5 -4
  881. package/Microsoft.ReactNative/Modules/Animated/NativeAnimatedModule.cpp +251 -206
  882. package/Microsoft.ReactNative/Modules/Animated/NativeAnimatedModule.h +95 -43
  883. package/Microsoft.ReactNative/Modules/Animated/NativeAnimatedNodeManager.cpp +395 -65
  884. package/Microsoft.ReactNative/Modules/Animated/NativeAnimatedNodeManager.h +50 -15
  885. package/Microsoft.ReactNative/Modules/Animated/PropsAnimatedNode.cpp +213 -59
  886. package/Microsoft.ReactNative/Modules/Animated/PropsAnimatedNode.h +30 -7
  887. package/Microsoft.ReactNative/Modules/Animated/SpringAnimationDriver.cpp +78 -23
  888. package/Microsoft.ReactNative/Modules/Animated/SpringAnimationDriver.h +12 -8
  889. package/Microsoft.ReactNative/Modules/Animated/StyleAnimatedNode.cpp +27 -8
  890. package/Microsoft.ReactNative/Modules/Animated/StyleAnimatedNode.h +5 -4
  891. package/Microsoft.ReactNative/Modules/Animated/SubtractionAnimatedNode.cpp +44 -22
  892. package/Microsoft.ReactNative/Modules/Animated/SubtractionAnimatedNode.h +5 -3
  893. package/Microsoft.ReactNative/Modules/Animated/TrackingAnimatedNode.cpp +25 -13
  894. package/Microsoft.ReactNative/Modules/Animated/TrackingAnimatedNode.h +7 -8
  895. package/Microsoft.ReactNative/Modules/Animated/TransformAnimatedNode.cpp +42 -12
  896. package/Microsoft.ReactNative/Modules/Animated/TransformAnimatedNode.h +7 -4
  897. package/Microsoft.ReactNative/Modules/Animated/ValueAnimatedNode.cpp +62 -34
  898. package/Microsoft.ReactNative/Modules/Animated/ValueAnimatedNode.h +14 -6
  899. package/Microsoft.ReactNative/Modules/AppStateModule.cpp +82 -32
  900. package/Microsoft.ReactNative/Modules/AppStateModule.h +19 -13
  901. package/Microsoft.ReactNative/Modules/AppThemeModuleUwp.cpp +83 -48
  902. package/Microsoft.ReactNative/Modules/AppThemeModuleUwp.h +26 -26
  903. package/Microsoft.ReactNative/Modules/AppearanceModule.cpp +71 -36
  904. package/Microsoft.ReactNative/Modules/AppearanceModule.h +30 -30
  905. package/Microsoft.ReactNative/Modules/ClipboardModule.cpp +4 -4
  906. package/Microsoft.ReactNative/Modules/ClipboardModule.h +5 -2
  907. package/Microsoft.ReactNative/Modules/CreateModules.cpp +5 -15
  908. package/Microsoft.ReactNative/Modules/DevSettingsModule.h +3 -0
  909. package/Microsoft.ReactNative/Modules/DeviceInfoModule.cpp +151 -54
  910. package/Microsoft.ReactNative/Modules/DeviceInfoModule.h +22 -12
  911. package/Microsoft.ReactNative/Modules/ExceptionsManager.cpp +110 -0
  912. package/Microsoft.ReactNative/Modules/ExceptionsManager.h +54 -0
  913. package/Microsoft.ReactNative/Modules/I18nManagerModule.cpp +8 -6
  914. package/Microsoft.ReactNative/Modules/I18nManagerModule.h +5 -2
  915. package/Microsoft.ReactNative/Modules/ImageViewManagerModule.cpp +109 -104
  916. package/Microsoft.ReactNative/Modules/ImageViewManagerModule.h +37 -19
  917. package/Microsoft.ReactNative/Modules/LinkingManagerModule.cpp +57 -67
  918. package/Microsoft.ReactNative/Modules/LinkingManagerModule.h +39 -15
  919. package/Microsoft.ReactNative/Modules/LogBoxModule.cpp +156 -38
  920. package/Microsoft.ReactNative/Modules/LogBoxModule.h +12 -3
  921. package/Microsoft.ReactNative/Modules/NativeUIManager.cpp +216 -160
  922. package/Microsoft.ReactNative/Modules/NativeUIManager.h +19 -9
  923. package/Microsoft.ReactNative/Modules/PaperUIManagerModule.cpp +148 -100
  924. package/Microsoft.ReactNative/Modules/PaperUIManagerModule.h +13 -3
  925. package/Microsoft.ReactNative/Modules/PlatformConstantsWinModule.cpp +49 -0
  926. package/Microsoft.ReactNative/Modules/PlatformConstantsWinModule.h +18 -0
  927. package/Microsoft.ReactNative/Modules/ReactRootViewTagGenerator.h +0 -3
  928. package/Microsoft.ReactNative/Modules/SourceCode.cpp +31 -0
  929. package/Microsoft.ReactNative/Modules/SourceCode.h +28 -0
  930. package/Microsoft.ReactNative/Modules/StatusBarManager.h +12 -0
  931. package/Microsoft.ReactNative/Modules/Timing.cpp +325 -0
  932. package/Microsoft.ReactNative/Modules/Timing.h +121 -0
  933. package/Microsoft.ReactNative/NativeModulesProvider.cpp +1 -1
  934. package/Microsoft.ReactNative/Pch/pch.h +30 -4
  935. package/Microsoft.ReactNative/PropertySheet.props +1 -1
  936. package/Microsoft.ReactNative/QuirkSettings.cpp +109 -12
  937. package/Microsoft.ReactNative/QuirkSettings.h +36 -2
  938. package/Microsoft.ReactNative/QuirkSettings.idl +54 -14
  939. package/Microsoft.ReactNative/ReactApplication.cpp +74 -22
  940. package/Microsoft.ReactNative/ReactApplication.h +47 -12
  941. package/Microsoft.ReactNative/ReactApplication.idl +24 -12
  942. package/Microsoft.ReactNative/ReactCoreInjection.cpp +209 -0
  943. package/Microsoft.ReactNative/ReactCoreInjection.h +86 -0
  944. package/Microsoft.ReactNative/ReactCoreInjection.idl +116 -0
  945. package/Microsoft.ReactNative/ReactHost/AsyncActionQueue.cpp +1 -2
  946. package/Microsoft.ReactNative/ReactHost/CrashManager.cpp +125 -0
  947. package/Microsoft.ReactNative/ReactHost/CrashManager.h +25 -0
  948. package/Microsoft.ReactNative/ReactHost/IReactInstance.h +4 -7
  949. package/Microsoft.ReactNative/ReactHost/JSCallInvokerScheduler.cpp +7 -4
  950. package/Microsoft.ReactNative/ReactHost/JSCallInvokerScheduler.h +2 -0
  951. package/Microsoft.ReactNative/ReactHost/MsoReactContext.cpp +238 -0
  952. package/Microsoft.ReactNative/ReactHost/MsoReactContext.h +71 -0
  953. package/Microsoft.ReactNative/ReactHost/MsoUtils.cpp +4 -5
  954. package/Microsoft.ReactNative/ReactHost/MsoUtils.h +2 -2
  955. package/Microsoft.ReactNative/ReactHost/React.h +38 -14
  956. package/Microsoft.ReactNative/ReactHost/ReactHost.cpp +108 -34
  957. package/Microsoft.ReactNative/ReactHost/ReactHost.h +24 -7
  958. package/Microsoft.ReactNative/ReactHost/ReactInstanceWin.cpp +921 -348
  959. package/Microsoft.ReactNative/ReactHost/ReactInstanceWin.h +65 -28
  960. package/Microsoft.ReactNative/ReactHost/ReactNativeHeaders.h +1 -3
  961. package/Microsoft.ReactNative/ReactHost/ViewManagerProvider.h +2 -6
  962. package/Microsoft.ReactNative/ReactInstanceSettings.cpp +14 -22
  963. package/Microsoft.ReactNative/ReactInstanceSettings.h +68 -31
  964. package/Microsoft.ReactNative/ReactInstanceSettings.idl +207 -53
  965. package/Microsoft.ReactNative/ReactNativeHost.cpp +36 -10
  966. package/Microsoft.ReactNative/ReactNativeHost.h +4 -4
  967. package/Microsoft.ReactNative/ReactNativeHost.idl +32 -7
  968. package/Microsoft.ReactNative/ReactPackageBuilder.cpp +26 -3
  969. package/Microsoft.ReactNative/ReactPackageBuilder.h +27 -3
  970. package/Microsoft.ReactNative/ReactPointerEventArgs.cpp +55 -0
  971. package/Microsoft.ReactNative/ReactPointerEventArgs.h +32 -0
  972. package/Microsoft.ReactNative/ReactPointerEventArgs.idl +79 -0
  973. package/Microsoft.ReactNative/ReactRootView.cpp +410 -13
  974. package/Microsoft.ReactNative/ReactRootView.h +71 -7
  975. package/Microsoft.ReactNative/ReactRootView.idl +21 -3
  976. package/Microsoft.ReactNative/ReactSupport.h +1 -1
  977. package/Microsoft.ReactNative/RedBox.cpp +121 -46
  978. package/Microsoft.ReactNative/RedBox.h +4 -3
  979. package/Microsoft.ReactNative/RedBoxHandler.cpp +7 -1
  980. package/Microsoft.ReactNative/RedBoxHandler.idl +56 -32
  981. package/Microsoft.ReactNative/SchedulerSettings.cpp +74 -0
  982. package/Microsoft.ReactNative/SchedulerSettings.h +35 -0
  983. package/Microsoft.ReactNative/SynchronousEventBeat.cpp +41 -0
  984. package/Microsoft.ReactNative/SynchronousEventBeat.h +29 -0
  985. package/Microsoft.ReactNative/TestHook.cpp +1 -1
  986. package/Microsoft.ReactNative/Theme.idl +68 -0
  987. package/Microsoft.ReactNative/Timer.cpp +63 -0
  988. package/Microsoft.ReactNative/Timer.h +22 -0
  989. package/Microsoft.ReactNative/Timer.idl +32 -0
  990. package/Microsoft.ReactNative/TurboModulesProvider.cpp +300 -169
  991. package/Microsoft.ReactNative/TurboModulesProvider.h +14 -12
  992. package/Microsoft.ReactNative/Utils/AccessibilityUtils.cpp +2 -2
  993. package/Microsoft.ReactNative/Utils/AccessibilityUtils.h +2 -2
  994. package/Microsoft.ReactNative/Utils/BatchingEventEmitter.cpp +171 -0
  995. package/Microsoft.ReactNative/Utils/BatchingEventEmitter.h +72 -0
  996. package/Microsoft.ReactNative/Utils/Helpers.cpp +31 -34
  997. package/Microsoft.ReactNative/Utils/Helpers.h +7 -11
  998. package/Microsoft.ReactNative/Utils/ImageUtils.cpp +191 -0
  999. package/Microsoft.ReactNative/Utils/ImageUtils.h +36 -0
  1000. package/Microsoft.ReactNative/Utils/KeyboardUtils.cpp +416 -0
  1001. package/Microsoft.ReactNative/Utils/KeyboardUtils.h +15 -0
  1002. package/Microsoft.ReactNative/Utils/LocalBundleReader.cpp +53 -12
  1003. package/Microsoft.ReactNative/Utils/LocalBundleReader.h +5 -5
  1004. package/Microsoft.ReactNative/Utils/PropertyUtils.h +52 -23
  1005. package/Microsoft.ReactNative/Utils/ResourceBrushUtils.cpp +54 -22
  1006. package/Microsoft.ReactNative/Utils/ResourceBrushUtils.h +12 -4
  1007. package/Microsoft.ReactNative/Utils/ShadowNodeTypeUtils.h +26 -0
  1008. package/Microsoft.ReactNative/Utils/TextTransform.h +8 -0
  1009. package/Microsoft.ReactNative/Utils/ThemeUtils.cpp +33 -0
  1010. package/Microsoft.ReactNative/Utils/ThemeUtils.h +13 -0
  1011. package/Microsoft.ReactNative/Utils/TransformableText.h +10 -15
  1012. package/Microsoft.ReactNative/Utils/UwpPreparedScriptStore.cpp +2 -2
  1013. package/Microsoft.ReactNative/Utils/UwpPreparedScriptStore.h +4 -4
  1014. package/Microsoft.ReactNative/Utils/UwpScriptStore.cpp +2 -2
  1015. package/Microsoft.ReactNative/Utils/UwpScriptStore.h +3 -3
  1016. package/Microsoft.ReactNative/Utils/ValueUtils.cpp +140 -56
  1017. package/Microsoft.ReactNative/Utils/ValueUtils.h +11 -8
  1018. package/Microsoft.ReactNative/Utils/XamlIslandUtils.cpp +93 -0
  1019. package/Microsoft.ReactNative/Utils/XamlIslandUtils.h +48 -0
  1020. package/Microsoft.ReactNative/Version.rc +8 -25
  1021. package/Microsoft.ReactNative/ViewProps.idl +57 -0
  1022. package/Microsoft.ReactNative/Views/ActivityIndicatorViewManager.cpp +11 -1
  1023. package/Microsoft.ReactNative/Views/ActivityIndicatorViewManager.h +2 -1
  1024. package/Microsoft.ReactNative/Views/ConfigureBundlerDlg.cpp +6 -7
  1025. package/Microsoft.ReactNative/Views/ControlViewManager.cpp +48 -1
  1026. package/Microsoft.ReactNative/Views/ControlViewManager.h +9 -0
  1027. package/Microsoft.ReactNative/Views/DebuggingOverlayViewManager.cpp +54 -0
  1028. package/Microsoft.ReactNative/Views/DebuggingOverlayViewManager.h +30 -0
  1029. package/Microsoft.ReactNative/Views/DevMenu.cpp +356 -182
  1030. package/Microsoft.ReactNative/Views/DevMenu.h +3 -14
  1031. package/Microsoft.ReactNative/Views/DynamicAutomationPeer.cpp +271 -140
  1032. package/Microsoft.ReactNative/Views/DynamicAutomationPeer.h +19 -15
  1033. package/Microsoft.ReactNative/Views/DynamicAutomationProperties.cpp +61 -71
  1034. package/Microsoft.ReactNative/Views/DynamicAutomationProperties.h +24 -37
  1035. package/Microsoft.ReactNative/Views/DynamicValueProvider.cpp +2 -2
  1036. package/Microsoft.ReactNative/Views/DynamicValueProvider.h +4 -4
  1037. package/Microsoft.ReactNative/Views/ExpressionAnimationStore.cpp +2 -2
  1038. package/Microsoft.ReactNative/Views/ExpressionAnimationStore.h +2 -2
  1039. package/Microsoft.ReactNative/Views/FlyoutViewManager.cpp +88 -20
  1040. package/Microsoft.ReactNative/Views/FlyoutViewManager.h +1 -2
  1041. package/Microsoft.ReactNative/Views/FrameworkElementTransferProperties.cpp +126 -0
  1042. package/Microsoft.ReactNative/Views/FrameworkElementTransferProperties.h +23 -0
  1043. package/Microsoft.ReactNative/Views/FrameworkElementViewManager.cpp +538 -257
  1044. package/Microsoft.ReactNative/Views/FrameworkElementViewManager.h +0 -8
  1045. package/Microsoft.ReactNative/Views/ICompositionRootView.h +18 -0
  1046. package/Microsoft.ReactNative/Views/IXamlRootView.h +2 -15
  1047. package/Microsoft.ReactNative/Views/Image/Effects.h +4 -6
  1048. package/Microsoft.ReactNative/Views/Image/ImageViewManager.cpp +66 -37
  1049. package/Microsoft.ReactNative/Views/Image/ImageViewManager.h +13 -2
  1050. package/Microsoft.ReactNative/Views/Image/Microsoft.UI.Composition.Effects_Impl.h +7 -13
  1051. package/Microsoft.ReactNative/Views/Image/ReactImage.cpp +179 -157
  1052. package/Microsoft.ReactNative/Views/Image/ReactImage.h +14 -29
  1053. package/Microsoft.ReactNative/Views/Image/ReactImageBrush.cpp +39 -37
  1054. package/Microsoft.ReactNative/Views/Image/ReactImageBrush.h +6 -7
  1055. package/Microsoft.ReactNative/Views/Impl/ScrollViewUWPImplementation.cpp +2 -2
  1056. package/Microsoft.ReactNative/Views/Impl/ScrollViewUWPImplementation.h +2 -2
  1057. package/Microsoft.ReactNative/Views/Impl/SnapPointManagingContentControl.cpp +2 -2
  1058. package/Microsoft.ReactNative/Views/Impl/SnapPointManagingContentControl.h +2 -2
  1059. package/Microsoft.ReactNative/Views/KeyboardEventHandler.cpp +35 -413
  1060. package/Microsoft.ReactNative/Views/KeyboardEventHandler.h +3 -6
  1061. package/Microsoft.ReactNative/Views/PaperShadowNode.h +2 -1
  1062. package/Microsoft.ReactNative/Views/PopupViewManager.cpp +7 -10
  1063. package/Microsoft.ReactNative/Views/PopupViewManager.h +1 -1
  1064. package/Microsoft.ReactNative/Views/RawTextViewManager.cpp +8 -39
  1065. package/Microsoft.ReactNative/Views/RawTextViewManager.h +10 -5
  1066. package/Microsoft.ReactNative/Views/ReactViewInstance.cpp +43 -0
  1067. package/Microsoft.ReactNative/Views/ReactViewInstance.h +53 -0
  1068. package/Microsoft.ReactNative/Views/RefreshControlManager.cpp +9 -7
  1069. package/Microsoft.ReactNative/Views/RefreshControlManager.h +1 -1
  1070. package/Microsoft.ReactNative/Views/RootViewManager.cpp +9 -10
  1071. package/Microsoft.ReactNative/Views/RootViewManager.h +1 -1
  1072. package/Microsoft.ReactNative/Views/SIPEventHandler.cpp +7 -8
  1073. package/Microsoft.ReactNative/Views/SIPEventHandler.h +1 -1
  1074. package/Microsoft.ReactNative/Views/ScrollViewManager.cpp +79 -50
  1075. package/Microsoft.ReactNative/Views/ScrollViewManager.h +4 -1
  1076. package/Microsoft.ReactNative/Views/ShadowNodeBase.cpp +40 -5
  1077. package/Microsoft.ReactNative/Views/ShadowNodeBase.h +33 -6
  1078. package/Microsoft.ReactNative/Views/ShadowNodeRegistry.cpp +0 -12
  1079. package/Microsoft.ReactNative/Views/ShadowNodeRegistry.h +2 -4
  1080. package/Microsoft.ReactNative/Views/SliderViewManager.cpp +16 -8
  1081. package/Microsoft.ReactNative/Views/SliderViewManager.h +1 -1
  1082. package/Microsoft.ReactNative/Views/SwitchViewManager.cpp +70 -23
  1083. package/Microsoft.ReactNative/Views/SwitchViewManager.h +1 -1
  1084. package/Microsoft.ReactNative/Views/Text/TextHighlighterVisitor.cpp +52 -0
  1085. package/Microsoft.ReactNative/Views/Text/TextHighlighterVisitor.h +37 -0
  1086. package/Microsoft.ReactNative/Views/Text/TextHitTestUtils.cpp +348 -0
  1087. package/Microsoft.ReactNative/Views/Text/TextHitTestUtils.h +13 -0
  1088. package/Microsoft.ReactNative/Views/Text/TextHitTestVisitor.cpp +76 -0
  1089. package/Microsoft.ReactNative/Views/Text/TextHitTestVisitor.h +32 -0
  1090. package/Microsoft.ReactNative/Views/Text/TextParentVisitor.cpp +12 -0
  1091. package/Microsoft.ReactNative/Views/Text/TextParentVisitor.h +19 -0
  1092. package/Microsoft.ReactNative/Views/Text/TextPropertyChangedParentVisitor.cpp +75 -0
  1093. package/Microsoft.ReactNative/Views/Text/TextPropertyChangedParentVisitor.h +43 -0
  1094. package/Microsoft.ReactNative/Views/Text/TextTransformParentVisitor.cpp +21 -0
  1095. package/Microsoft.ReactNative/Views/Text/TextTransformParentVisitor.h +23 -0
  1096. package/Microsoft.ReactNative/Views/Text/TextTransformVisitor.cpp +70 -0
  1097. package/Microsoft.ReactNative/Views/Text/TextTransformVisitor.h +34 -0
  1098. package/Microsoft.ReactNative/Views/Text/TextVisitor.cpp +56 -0
  1099. package/Microsoft.ReactNative/Views/Text/TextVisitor.h +34 -0
  1100. package/Microsoft.ReactNative/Views/Text/TextVisitorScope.h +35 -0
  1101. package/Microsoft.ReactNative/Views/Text/TextVisitors.h +47 -0
  1102. package/Microsoft.ReactNative/Views/TextInputViewManager.cpp +320 -119
  1103. package/Microsoft.ReactNative/Views/TextInputViewManager.h +1 -1
  1104. package/Microsoft.ReactNative/Views/TextViewManager.cpp +245 -89
  1105. package/Microsoft.ReactNative/Views/TextViewManager.h +12 -2
  1106. package/Microsoft.ReactNative/Views/TouchEventHandler.cpp +261 -165
  1107. package/Microsoft.ReactNative/Views/TouchEventHandler.h +34 -21
  1108. package/Microsoft.ReactNative/Views/UnimplementedViewManager.cpp +79 -0
  1109. package/Microsoft.ReactNative/Views/UnimplementedViewManager.h +27 -0
  1110. package/Microsoft.ReactNative/Views/ViewControl.cpp +5 -5
  1111. package/Microsoft.ReactNative/Views/ViewControl.h +5 -5
  1112. package/Microsoft.ReactNative/Views/ViewManager.h +4 -0
  1113. package/Microsoft.ReactNative/Views/ViewManagerBase.cpp +161 -43
  1114. package/Microsoft.ReactNative/Views/ViewManagerBase.h +20 -6
  1115. package/Microsoft.ReactNative/Views/ViewPanel.cpp +28 -243
  1116. package/Microsoft.ReactNative/Views/ViewPanel.h +12 -52
  1117. package/Microsoft.ReactNative/Views/ViewViewManager.cpp +110 -206
  1118. package/Microsoft.ReactNative/Views/ViewViewManager.h +3 -2
  1119. package/Microsoft.ReactNative/Views/VirtualTextViewManager.cpp +64 -25
  1120. package/Microsoft.ReactNative/Views/VirtualTextViewManager.h +14 -12
  1121. package/Microsoft.ReactNative/Views/XamlFeatures.cpp +2 -2
  1122. package/Microsoft.ReactNative/Views/XamlFeatures.h +2 -2
  1123. package/Microsoft.ReactNative/Views/cppwinrt/DynamicAutomationPeer.idl +88 -13
  1124. package/Microsoft.ReactNative/Views/cppwinrt/ViewPanel.idl +4 -12
  1125. package/Microsoft.ReactNative/XamlHelper.cpp +52 -3
  1126. package/Microsoft.ReactNative/XamlHelper.h +32 -1
  1127. package/Microsoft.ReactNative/XamlHelper.idl +18 -5
  1128. package/Microsoft.ReactNative/XamlLoadState.cpp +6 -5
  1129. package/Microsoft.ReactNative/XamlLoadState.h +2 -2
  1130. package/Microsoft.ReactNative/XamlUIService.cpp +54 -6
  1131. package/Microsoft.ReactNative/XamlUIService.h +9 -2
  1132. package/Microsoft.ReactNative/XamlUIService.idl +43 -10
  1133. package/Microsoft.ReactNative/XamlView.cpp +18 -11
  1134. package/Microsoft.ReactNative/XamlView.h +20 -6
  1135. package/Microsoft.ReactNative/microsoft.reactnative.def +1 -1
  1136. package/Microsoft.ReactNative/packages.lock.json +159 -0
  1137. package/Microsoft.ReactNative.Cxx/AppModelHelpers.h +17 -0
  1138. package/Microsoft.ReactNative.Cxx/AutoDraw.h +40 -0
  1139. package/Microsoft.ReactNative.Cxx/CompositionSwitcher.Experimental.interop.h +34 -0
  1140. package/Microsoft.ReactNative.Cxx/CppWinRTIncludes.h +3 -5
  1141. package/Microsoft.ReactNative.Cxx/DesktopWindowBridge.h +114 -0
  1142. package/Microsoft.ReactNative.Cxx/JSI/JsiAbiApi.cpp +231 -165
  1143. package/Microsoft.ReactNative.Cxx/JSI/JsiAbiApi.h +39 -56
  1144. package/Microsoft.ReactNative.Cxx/JSI/JsiApiContext.cpp +69 -0
  1145. package/Microsoft.ReactNative.Cxx/JSI/JsiApiContext.h +64 -0
  1146. package/Microsoft.ReactNative.Cxx/JSI/JsiValueHelpers.cpp +53 -0
  1147. package/Microsoft.ReactNative.Cxx/JSI/JsiValueHelpers.h +32 -0
  1148. package/Microsoft.ReactNative.Cxx/JSI/LongLivedJsiValue.h +84 -0
  1149. package/Microsoft.ReactNative.Cxx/JSI/NodeApiJsiLoader.cpp +16 -0
  1150. package/Microsoft.ReactNative.Cxx/JSValue.cpp +5 -6
  1151. package/Microsoft.ReactNative.Cxx/JSValue.h +14 -2
  1152. package/Microsoft.ReactNative.Cxx/JSValueComposition.h +22 -0
  1153. package/Microsoft.ReactNative.Cxx/JSValueReader.h +47 -3
  1154. package/Microsoft.ReactNative.Cxx/JSValueWriter.h +18 -12
  1155. package/Microsoft.ReactNative.Cxx/JSValueXaml.h +48 -3
  1156. package/Microsoft.ReactNative.Cxx/Microsoft.ReactNative.Cxx.vcxitems +102 -12
  1157. package/Microsoft.ReactNative.Cxx/Microsoft.ReactNative.Cxx.vcxitems.filters +70 -5
  1158. package/Microsoft.ReactNative.Cxx/ModuleRegistration.cpp +14 -4
  1159. package/Microsoft.ReactNative.Cxx/ModuleRegistration.h +28 -3
  1160. package/Microsoft.ReactNative.Cxx/NamespaceRedirect.h +2 -0
  1161. package/Microsoft.ReactNative.Cxx/NativeModules.h +189 -39
  1162. package/Microsoft.ReactNative.Cxx/ReactContext.h +6 -5
  1163. package/Microsoft.ReactNative.Cxx/ReactHandleHelper.h +1 -1
  1164. package/Microsoft.ReactNative.Cxx/ReactNonAbiValue.h +5 -5
  1165. package/Microsoft.ReactNative.Cxx/ReactNotificationService.h +20 -11
  1166. package/Microsoft.ReactNative.Cxx/ReactPromise.cpp +21 -1
  1167. package/Microsoft.ReactNative.Cxx/ReactPromise.h +27 -0
  1168. package/Microsoft.ReactNative.Cxx/ReactPropertyBag.h +15 -13
  1169. package/Microsoft.ReactNative.Cxx/StructInfo.h +4 -4
  1170. package/Microsoft.ReactNative.Cxx/TurboModuleProvider.cpp +32 -0
  1171. package/Microsoft.ReactNative.Cxx/TurboModuleProvider.h +34 -0
  1172. package/Microsoft.ReactNative.Cxx/VersionMacros.h +19 -0
  1173. package/Microsoft.ReactNative.Cxx/XamlUtils.h +44 -5
  1174. package/Microsoft.ReactNative.Cxx/cppapi.md.mustache +13 -0
  1175. package/Microsoft.ReactNative.Cxx/doxysaurus.json +53 -0
  1176. package/Microsoft.ReactNative.Managed/IReactPromise.cs +0 -20
  1177. package/Microsoft.ReactNative.Managed/JSValue.cs +1 -1
  1178. package/Microsoft.ReactNative.Managed/JSValueReader.cs +438 -444
  1179. package/Microsoft.ReactNative.Managed/JSValueReaderGenerator.cs +5 -5
  1180. package/Microsoft.ReactNative.Managed/JSValueWriter.cs +8 -7
  1181. package/Microsoft.ReactNative.Managed/JSValueWriterGenerator.cs +5 -5
  1182. package/Microsoft.ReactNative.Managed/Microsoft.ReactNative.Managed.csproj +39 -35
  1183. package/Microsoft.ReactNative.Managed/ReactAttributes.cs +16 -0
  1184. package/Microsoft.ReactNative.Managed/ReactConstantProvider.cs +5 -0
  1185. package/Microsoft.ReactNative.Managed/ReactContext.cs +21 -4
  1186. package/Microsoft.ReactNative.Managed/ReactDispatcher.cs +34 -0
  1187. package/Microsoft.ReactNative.Managed/ReactError.cs +36 -0
  1188. package/Microsoft.ReactNative.Managed/ReactNotificationArgsOf.cs +23 -0
  1189. package/Microsoft.ReactNative.Managed/ReactNotificationHandlerOf.cs +7 -0
  1190. package/Microsoft.ReactNative.Managed/ReactNotificationIdOf.cs +44 -0
  1191. package/Microsoft.ReactNative.Managed/ReactNotificationService.cs +146 -0
  1192. package/Microsoft.ReactNative.Managed/ReactNotificationSubscription.cs +43 -0
  1193. package/Microsoft.ReactNative.Managed/ReactNotificationSubscriptionRevoker.cs +64 -0
  1194. package/Microsoft.ReactNative.Managed/ReactPackageBuilderExtensions.cs +1 -1
  1195. package/Microsoft.ReactNative.Managed/ReactPromise.cs +123 -81
  1196. package/Microsoft.ReactNative.Managed/ReactPropertyBag.cs +91 -0
  1197. package/Microsoft.ReactNative.Managed/ReactPropertyIdOf.cs +44 -0
  1198. package/Microsoft.ReactNative.Managed/ReactPropertyName.cs +39 -0
  1199. package/Microsoft.ReactNative.Managed/ReactPropertyNamespace.cs +26 -0
  1200. package/Microsoft.ReactNative.Managed/ReactSettingsSnapshot.cs +50 -0
  1201. package/Microsoft.ReactNative.Managed/ReactTaskExtensions.cs +15 -4
  1202. package/Microsoft.ReactNative.Managed/ReflectionReactPackageProvider.cs +1 -1
  1203. package/Microsoft.ReactNative.Managed/packages.lock.json +373 -0
  1204. package/Microsoft.ReactNative.Managed.CodeGen/App.cs +1 -1
  1205. package/Microsoft.ReactNative.Managed.CodeGen/CodeAnalyzer.cs +795 -731
  1206. package/Microsoft.ReactNative.Managed.CodeGen/CodeGenerator.Module.cs +96 -61
  1207. package/Microsoft.ReactNative.Managed.CodeGen/CodeGenerator.Serializers.cs +57 -18
  1208. package/Microsoft.ReactNative.Managed.CodeGen/CodeGenerator.ViewManager.cs +1 -1
  1209. package/Microsoft.ReactNative.Managed.CodeGen/DiagnosticDescriptors.cs +37 -5
  1210. package/Microsoft.ReactNative.Managed.CodeGen/Microsoft.ReactNative.Managed.CodeGen.csproj +7 -7
  1211. package/Microsoft.ReactNative.Managed.CodeGen/Model/ReactAssembly.cs +3 -3
  1212. package/Microsoft.ReactNative.Managed.CodeGen/Model/ReactGetConstants.cs +17 -0
  1213. package/Microsoft.ReactNative.Managed.CodeGen/Model/ReactMethod.cs +11 -2
  1214. package/Microsoft.ReactNative.Managed.CodeGen/Model/ReactModule.cs +2 -0
  1215. package/Microsoft.ReactNative.Managed.CodeGen/Model/ReactTypes.cs +10 -4
  1216. package/Microsoft.ReactNative.Managed.CodeGen/Properties/PublishProfiles/DeployAsTool-Debug.pubxml +4 -4
  1217. package/Microsoft.ReactNative.Managed.CodeGen/Properties/PublishProfiles/DeployAsTool-Release.pubxml +4 -4
  1218. package/Microsoft.ReactNative.Managed.CodeGen/ReactNativeNames.cs +29 -3
  1219. package/Microsoft.ReactNative.Managed.CodeGen/SyntaxHelpers.cs +18 -4
  1220. package/Microsoft.ReactNative.Managed.CodeGen/packages.lock.json +3197 -0
  1221. package/Mso/Mso.vcxitems.filters +2 -2
  1222. package/Mso/activeObject/activeObject.h +8 -14
  1223. package/Mso/comUtil/IUnknownShim.h +4 -0
  1224. package/Mso/comUtil/qiCastCore.h +0 -6
  1225. package/Mso/compilerAdapters/compilerFeatures.h +1 -1
  1226. package/Mso/compilerAdapters/cppMacros.h +3 -5
  1227. package/Mso/compilerAdapters/functionDecorations.h +6 -6
  1228. package/Mso/cppExtensions/autoRestore.h +1 -6
  1229. package/Mso/debugAssertApi/debugAssertApi.h +1 -3
  1230. package/Mso/debugAssertApi/debugAssertDetails.h +4 -6
  1231. package/Mso/dispatchQueue/dispatchQueue.h +21 -8
  1232. package/Mso/errorCode/errorProvider.h +2 -2
  1233. package/Mso/errorCode/maybe.h +4 -4
  1234. package/Mso/functional/functor.h +6 -6
  1235. package/Mso/functional/functorRef.h +2 -2
  1236. package/Mso/future/details/executor.h +3 -3
  1237. package/Mso/future/details/futureFuncInl.h +4 -4
  1238. package/Mso/future/details/ifuture.h +3 -3
  1239. package/Mso/future/details/maybeInvoker.h +6 -6
  1240. package/Mso/future/details/promiseGroupInl.h +4 -4
  1241. package/Mso/future/details/promiseInl.h +4 -4
  1242. package/Mso/future/details/resultTraits.h +4 -4
  1243. package/Mso/future/details/whenAllInl.h +1 -1
  1244. package/Mso/future/future.h +13 -13
  1245. package/Mso/future/futureWait.h +1 -1
  1246. package/Mso/future/futureWinRT.h +11 -7
  1247. package/Mso/guid/msoGuidDetails.h +16 -15
  1248. package/Mso/memoryApi/memoryApi.h +13 -7
  1249. package/Mso/motifCpp/assert_IgnorePlat_emptyImpl.h +2 -0
  1250. package/Mso/motifCpp/assert_motifApi.h +2 -0
  1251. package/Mso/motifCpp/gTestAdapter.h +3 -1
  1252. package/Mso/motifCpp/libletAwareMemLeakDetection.h +2 -0
  1253. package/Mso/motifCpp/motifCppTest.h +5 -1
  1254. package/Mso/motifCpp/motifCppTestBase.h +2 -0
  1255. package/Mso/motifCpp/testCheck.h +9 -4
  1256. package/Mso/motifCpp/testInfo.h +9 -9
  1257. package/Mso/oacr/oacr.h +1 -1
  1258. package/Mso/object/make.h +8 -8
  1259. package/Mso/object/objectRefCount.h +3 -5
  1260. package/Mso/object/objectWithWeakRef.h +10 -14
  1261. package/Mso/object/queryCast.h +4 -6
  1262. package/Mso/object/refCountedObject.h +4 -4
  1263. package/Mso/object/unknownObject.h +7 -7
  1264. package/Mso/platformAdapters/windowsFirst.h +1 -1
  1265. package/Mso/smartPtr/cntPtr.h +21 -21
  1266. package/Mso/smartPtr/smartPointerBase.h +1 -5
  1267. package/Mso/src/debugAssertApi/debugAssertApi.cpp +1 -1
  1268. package/Mso/src/dispatchQueue/looperScheduler.cpp +38 -11
  1269. package/Mso/src/dispatchQueue/queueService.cpp +4 -6
  1270. package/Mso/src/dispatchQueue/queueService.h +2 -2
  1271. package/Mso/src/dispatchQueue/taskQueue.h +1 -1
  1272. package/Mso/src/dispatchQueue/threadPoolScheduler_win.cpp +98 -6
  1273. package/Mso/src/dispatchQueue/uiScheduler_winrt.cpp +135 -44
  1274. package/Mso/src/eventWaitHandle/eventWaitHandleImpl_win.cpp +2 -3
  1275. package/Mso/src/future/futureImpl.cpp +5 -5
  1276. package/Mso/src/future/futureImpl.h +2 -2
  1277. package/Mso/src/memoryApi/memoryApi.cpp +7 -4
  1278. package/PropertySheets/Appx.props +19 -0
  1279. package/PropertySheets/Autolink.props +1 -1
  1280. package/PropertySheets/Bundle.Common.targets +5 -4
  1281. package/PropertySheets/Bundle.props +9 -10
  1282. package/PropertySheets/Codegen.props +15 -0
  1283. package/PropertySheets/Codegen.targets +19 -0
  1284. package/PropertySheets/CppAppConsumeCSharpModule.props +18 -3
  1285. package/PropertySheets/CppAppConsumeCSharpModule.targets +0 -3
  1286. package/PropertySheets/Debug.props +1 -0
  1287. package/PropertySheets/External/Microsoft.ReactNative.CSharp.Dependencies.props +17 -0
  1288. package/PropertySheets/External/Microsoft.ReactNative.CSharp.PackageReferences.props +12 -0
  1289. package/PropertySheets/External/Microsoft.ReactNative.CSharp.ProjectReferences.props +20 -0
  1290. package/PropertySheets/External/Microsoft.ReactNative.Common.props +33 -3
  1291. package/PropertySheets/External/Microsoft.ReactNative.Common.targets +34 -0
  1292. package/PropertySheets/External/Microsoft.ReactNative.Composition.Common.props +28 -0
  1293. package/PropertySheets/External/Microsoft.ReactNative.Composition.CppApp.props +25 -0
  1294. package/PropertySheets/External/Microsoft.ReactNative.Composition.CppApp.targets +19 -0
  1295. package/PropertySheets/External/Microsoft.ReactNative.Composition.CppLib.props +24 -0
  1296. package/PropertySheets/External/Microsoft.ReactNative.Composition.CppLib.targets +20 -0
  1297. package/PropertySheets/External/Microsoft.ReactNative.Composition.Package.props +14 -0
  1298. package/PropertySheets/External/Microsoft.ReactNative.Composition.Package.targets +18 -0
  1299. package/PropertySheets/External/Microsoft.ReactNative.Cpp.Dependencies.props +26 -0
  1300. package/PropertySheets/External/Microsoft.ReactNative.Cpp.PackageReferences.props +12 -0
  1301. package/PropertySheets/External/Microsoft.ReactNative.Cpp.ProjectReferences.props +22 -0
  1302. package/PropertySheets/External/Microsoft.ReactNative.Uwp.CSharpApp.props +3 -0
  1303. package/PropertySheets/External/Microsoft.ReactNative.Uwp.CSharpApp.targets +26 -12
  1304. package/PropertySheets/External/Microsoft.ReactNative.Uwp.CSharpLib.props +1 -0
  1305. package/PropertySheets/External/Microsoft.ReactNative.Uwp.CSharpLib.targets +13 -12
  1306. package/PropertySheets/External/Microsoft.ReactNative.Uwp.CppApp.props +4 -0
  1307. package/PropertySheets/External/Microsoft.ReactNative.Uwp.CppApp.targets +23 -10
  1308. package/PropertySheets/External/Microsoft.ReactNative.Uwp.CppLib.props +11 -1
  1309. package/PropertySheets/External/Microsoft.ReactNative.Uwp.CppLib.targets +18 -9
  1310. package/PropertySheets/External/Microsoft.ReactNative.WindowsSdk.Default.props +32 -0
  1311. package/PropertySheets/FastBuild.targets +64 -0
  1312. package/PropertySheets/FixupRoslynCscWarnings.targets +38 -0
  1313. package/PropertySheets/Generated/PackageVersion.g.props +20 -0
  1314. package/PropertySheets/HybridCRT.props +34 -0
  1315. package/PropertySheets/JSEngine.props +17 -9
  1316. package/PropertySheets/ManagedCodeGen/Microsoft.ReactNative.Managed.CodeGen.targets +1 -1
  1317. package/PropertySheets/NewAPIDeclarations.props +25 -0
  1318. package/PropertySheets/NuGet.CSharp.props +15 -0
  1319. package/PropertySheets/NuGet.Cpp.props +32 -0
  1320. package/PropertySheets/OutputMSBuildProperties.targets +31 -0
  1321. package/PropertySheets/PackageVersionDefinitions.props +46 -0
  1322. package/PropertySheets/React.Cpp.props +45 -13
  1323. package/PropertySheets/ReactCommunity.cpp.props +2 -2
  1324. package/PropertySheets/Release.props +8 -1
  1325. package/PropertySheets/Warnings.props +8 -3
  1326. package/PropertySheets/WinUI.props +30 -11
  1327. package/PropertySheets/x64.props +3 -0
  1328. package/PropertySheets/x86.props +3 -0
  1329. package/README.md +6 -6
  1330. package/ReactCommon/ReactCommon.vcxproj +110 -48
  1331. package/ReactCommon/ReactCommon.vcxproj.filters +100 -41
  1332. package/ReactCommon/TEMP_UntilReactCommonUpdate/jsi/jsi/test/testlib.cpp +1556 -0
  1333. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/bridging/Bridging.h +20 -0
  1334. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/bridging/CallbackWrapper.h +103 -0
  1335. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/nativemodule/core/ReactCommon/TurboModule.cpp +66 -0
  1336. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/nativemodule/core/ReactCommon/TurboModuleUtils.h +59 -0
  1337. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/scrollview/ScrollViewProps.cpp +535 -0
  1338. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/utils/jsi-utils.cpp +39 -0
  1339. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/utils/jsi-utils.h +31 -0
  1340. package/ReactCommon/cgmanifest.json +15 -0
  1341. package/ReactCommon/packages.lock.json +30 -0
  1342. package/ReactCommon/pch.h +11 -1
  1343. package/Scripts/Analyze-Crash.ps1 +116 -0
  1344. package/Scripts/EnableInternalWinAppSDKFeed.ps1 +21 -0
  1345. package/Scripts/Install-WindowsSDKISO.ps1 +1 -1
  1346. package/Scripts/IntegrationTests.ps1 +26 -11
  1347. package/Scripts/JustMyXaml.ps1 +8 -8
  1348. package/Scripts/Microsoft.ReactNative.Managed.nuspec +23 -30
  1349. package/Scripts/Microsoft.ReactNative.nuspec +16 -17
  1350. package/Scripts/Microsoft.ReactNative.targets +3 -2
  1351. package/Scripts/NuGetRestoreForceEvaluateAllSolutions.ps1 +22 -0
  1352. package/Scripts/OfficeReact.Win32.nuspec +23 -9
  1353. package/Scripts/OpenSSL.targets +1 -1
  1354. package/Scripts/StripAdditionalPlatformsFromNuspec.ps1 +1 -1
  1355. package/Scripts/TestServers.ps1 +2 -28
  1356. package/Scripts/Tfs/Layout-Desktop-Headers.ps1 +132 -0
  1357. package/Scripts/Tfs/Layout-MSRN-Headers.ps1 +110 -0
  1358. package/Scripts/Tfs/Make-AnyCPU-RefAssemblies.ps1 +39 -0
  1359. package/Scripts/Tfs/Start-TestServers.ps1 +2 -14
  1360. package/Scripts/Tfs/Stop-TestServers.ps1 +0 -5
  1361. package/Scripts/Tracing/Start-Tracing.ps1 +28 -0
  1362. package/Scripts/Tracing/Stop-Tracing.ps1 +57 -0
  1363. package/Scripts/Tracing/rnw.wprp +27 -0
  1364. package/Scripts/UnitTest.ps1 +3 -3
  1365. package/Scripts/rnw-dependencies.ps1 +485 -143
  1366. package/Scripts/utils.js +1 -1
  1367. package/Shared/AbiSafe.h +3 -3
  1368. package/Shared/BaseFileReaderResource.cpp +89 -0
  1369. package/Shared/BaseFileReaderResource.h +41 -0
  1370. package/Shared/BaseScriptStoreImpl.cpp +69 -25
  1371. package/Shared/BaseScriptStoreImpl.h +2 -2
  1372. package/Shared/BatchingMessageQueueThread.h +3 -0
  1373. package/Shared/ChakraRuntimeHolder.cpp +5 -3
  1374. package/Shared/ChakraRuntimeHolder.h +4 -3
  1375. package/Shared/CppRuntimeOptions.h +50 -0
  1376. package/Shared/CreateInstance.h +25 -0
  1377. package/Shared/CreateModules.h +46 -14
  1378. package/Shared/CxxMessageQueue.cpp +1 -1
  1379. package/Shared/DevServerHelper.h +33 -6
  1380. package/Shared/DevSettings.h +30 -25
  1381. package/Shared/DevSupportManager.cpp +64 -15
  1382. package/Shared/DevSupportManager.h +27 -1
  1383. package/Shared/Executors/WebSocketJSExecutor.cpp +17 -22
  1384. package/Shared/Executors/WebSocketJSExecutor.h +2 -6
  1385. package/Shared/Executors/WebSocketJSExecutorFactory.cpp +2 -1
  1386. package/Shared/Hasher.cpp +64 -0
  1387. package/Shared/Hasher.h +24 -0
  1388. package/Shared/HermesRuntimeHolder.cpp +397 -17
  1389. package/Shared/HermesRuntimeHolder.h +59 -12
  1390. package/Shared/HermesSamplingProfiler.cpp +115 -0
  1391. package/Shared/HermesSamplingProfiler.h +26 -0
  1392. package/Shared/IBlobPersistor.h +30 -0
  1393. package/Shared/IDevSupportManager.h +7 -2
  1394. package/Shared/IFileReaderResource.h +36 -0
  1395. package/Shared/IReactRootView.h +0 -1
  1396. package/Shared/InspectorPackagerConnection.cpp +235 -0
  1397. package/Shared/InspectorPackagerConnection.h +61 -0
  1398. package/Shared/InstanceManager.cpp +40 -9
  1399. package/Shared/InstanceManager.h +9 -5
  1400. package/Shared/JSI/ChakraApi.cpp +436 -0
  1401. package/Shared/JSI/ChakraApi.h +474 -0
  1402. package/Shared/JSI/ChakraJsiRuntime_edgemode.cpp +100 -0
  1403. package/Shared/JSI/ChakraRuntime.cpp +1128 -0
  1404. package/Shared/JSI/ChakraRuntime.h +510 -0
  1405. package/Shared/JSI/ChakraRuntimeArgs.h +45 -0
  1406. package/Shared/JSI/ChakraRuntimeFactory.h +15 -0
  1407. package/Shared/JSI/JSExecutorFactoryDelegate.h +12 -0
  1408. package/Shared/JSI/JSExecutorFactorySettings.cpp +30 -0
  1409. package/Shared/JSI/JSExecutorFactorySettings.h +21 -0
  1410. package/Shared/JSI/RuntimeHolder.h +28 -0
  1411. package/Shared/JSI/ScriptStore.h +77 -0
  1412. package/Shared/JSI/V8RuntimeHolder.cpp +260 -0
  1413. package/Shared/JSI/V8RuntimeHolder.h +37 -0
  1414. package/Shared/Logging.cpp +1 -1
  1415. package/Shared/MemoryMappedBuffer.cpp +2 -36
  1416. package/Shared/MemoryMappedBuffer.h +1 -1
  1417. package/Shared/Modules/BlobCollector.cpp +21 -0
  1418. package/Shared/Modules/BlobCollector.h +23 -0
  1419. package/Shared/Modules/BlobModule.cpp +191 -0
  1420. package/Shared/Modules/BlobModule.h +91 -0
  1421. package/Shared/Modules/CxxModuleUtilities.cpp +51 -0
  1422. package/Shared/Modules/CxxModuleUtilities.h +40 -0
  1423. package/Shared/Modules/ExceptionsManagerModule.cpp +57 -55
  1424. package/Shared/Modules/FileReaderModule.cpp +218 -0
  1425. package/Shared/Modules/FileReaderModule.h +80 -0
  1426. package/Shared/Modules/HttpModule.cpp +329 -0
  1427. package/Shared/Modules/HttpModule.h +92 -0
  1428. package/Shared/Modules/I18nModule.cpp +3 -2
  1429. package/Shared/Modules/IHttpModuleProxy.h +30 -0
  1430. package/Shared/Modules/IRequestBodyHandler.h +54 -0
  1431. package/Shared/Modules/IResponseHandler.h +27 -0
  1432. package/Shared/Modules/IUriHandler.h +37 -0
  1433. package/Shared/Modules/IWebSocketModuleContentHandler.h +28 -0
  1434. package/Shared/Modules/IWebSocketModuleProxy.h +22 -0
  1435. package/Shared/Modules/NetworkingModule.cpp +2 -5
  1436. package/Shared/Modules/PlatformConstantsModule.cpp +6 -16
  1437. package/Shared/Modules/SourceCodeModule.h +0 -3
  1438. package/Shared/Modules/WebSocketModule.cpp +415 -106
  1439. package/Shared/Modules/WebSocketModule.h +54 -15
  1440. package/Shared/Modules/WebSocketTurboModule.h +71 -0
  1441. package/Shared/Networking/DefaultBlobResource.cpp +331 -0
  1442. package/Shared/Networking/DefaultBlobResource.h +133 -0
  1443. package/Shared/Networking/IBlobResource.h +56 -0
  1444. package/Shared/Networking/IHttpResource.h +229 -0
  1445. package/Shared/Networking/IRedirectEventSource.h +18 -0
  1446. package/Shared/Networking/IWebSocketResource.h +185 -0
  1447. package/Shared/Networking/IWinRTHttpRequestFactory.h +22 -0
  1448. package/Shared/Networking/OriginPolicy.h +15 -0
  1449. package/Shared/Networking/OriginPolicyHttpFilter.cpp +798 -0
  1450. package/Shared/Networking/OriginPolicyHttpFilter.h +123 -0
  1451. package/Shared/Networking/RedirectHttpFilter.cpp +292 -0
  1452. package/Shared/Networking/RedirectHttpFilter.h +97 -0
  1453. package/Shared/Networking/WinRTHttpResource.cpp +692 -0
  1454. package/Shared/Networking/WinRTHttpResource.h +110 -0
  1455. package/Shared/Networking/WinRTTypes.h +33 -0
  1456. package/Shared/Networking/WinRTWebSocketResource.cpp +461 -0
  1457. package/Shared/Networking/WinRTWebSocketResource.h +129 -0
  1458. package/Shared/OInstance.cpp +346 -247
  1459. package/Shared/OInstance.h +31 -17
  1460. package/Shared/PackagerConnection.cpp +7 -5
  1461. package/Shared/PackagerConnection.h +2 -2
  1462. package/Shared/RuntimeOptions.cpp +126 -0
  1463. package/Shared/RuntimeOptions.h +32 -8
  1464. package/Shared/SafeLoadLibrary.cpp +77 -0
  1465. package/Shared/SafeLoadLibrary.h +19 -0
  1466. package/Shared/Shared.vcxitems +566 -32
  1467. package/Shared/Shared.vcxitems.filters +596 -99
  1468. package/Shared/SystemChakraRuntime.h +38 -0
  1469. package/Shared/Threading/BatchingQueueThread.cpp +73 -25
  1470. package/Shared/Threading/BatchingQueueThread.h +30 -15
  1471. package/Shared/Threading/MessageDispatchQueue.cpp +83 -4
  1472. package/Shared/Threading/MessageDispatchQueue.h +31 -0
  1473. package/Shared/Threading/MessageQueueThreadFactory.cpp +2 -2
  1474. package/Shared/Threading/MessageQueueThreadFactory.h +3 -3
  1475. package/Shared/TurboModuleManager.cpp +1 -1
  1476. package/Shared/Utils/CppWinrtLessExceptions.h +10 -4
  1477. package/Shared/Utils/WinRTConversions.cpp +22 -0
  1478. package/Shared/Utils/WinRTConversions.h +15 -0
  1479. package/Shared/Utils.cpp +58 -1
  1480. package/Shared/Utils.h +3 -0
  1481. package/Shared/V8JSIRuntimeHolder.cpp +13 -133
  1482. package/Shared/V8JSIRuntimeHolder.h +14 -6
  1483. package/Shared/WebSocketJSExecutorFactory.h +1 -0
  1484. package/Shared/tracing/fbsystrace.h +3 -3
  1485. package/Shared/tracing/tracing.cpp +105 -34
  1486. package/Shared/tracing/tracing.h +20 -0
  1487. package/codegen/.clang-format +2 -0
  1488. package/codegen/NativeAccessibilityInfoSpec.g.h +27 -14
  1489. package/codegen/NativeAccessibilityManagerSpec.g.h +89 -32
  1490. package/codegen/NativeActionSheetManagerSpec.g.h +85 -7
  1491. package/codegen/NativeAlertManagerSpec.g.h +34 -4
  1492. package/codegen/NativeAnimatedModuleSpec.g.h +122 -83
  1493. package/codegen/NativeAnimatedTurboModuleSpec.g.h +122 -83
  1494. package/codegen/NativeAnimationsDebugModuleSpec.g.h +6 -5
  1495. package/codegen/NativeAppStateSpec.g.h +31 -8
  1496. package/codegen/NativeAppThemeSpec.g.h +68 -0
  1497. package/codegen/NativeAppearanceSpec.g.h +18 -11
  1498. package/codegen/NativeBlobModuleSpec.g.h +29 -15
  1499. package/codegen/NativeBugReportingSpec.g.h +7 -12
  1500. package/codegen/NativeClipboardSpec.g.h +7 -6
  1501. package/codegen/NativeDevLoadingViewSpec.g.h +7 -6
  1502. package/codegen/NativeDevMenuSpec.g.h +12 -11
  1503. package/codegen/NativeDevSettingsSpec.g.h +24 -23
  1504. package/codegen/NativeDevToolsSettingsManagerSpec.g.h +52 -0
  1505. package/codegen/NativeDeviceEventManagerSpec.g.h +4 -3
  1506. package/codegen/NativeDeviceInfoSpec.g.h +68 -1
  1507. package/codegen/NativeDialogManagerAndroidSpec.g.h +57 -4
  1508. package/codegen/NativeDialogManagerWindowsSpec.g.h +90 -0
  1509. package/codegen/NativeExceptionsManagerSpec.g.h +60 -15
  1510. package/codegen/NativeFileReaderModuleSpec.g.h +8 -7
  1511. package/codegen/NativeFrameRateLoggerSpec.g.h +22 -10
  1512. package/codegen/NativeHeadlessJsTaskSupportSpec.g.h +7 -6
  1513. package/codegen/NativeI18nManagerSpec.g.h +23 -7
  1514. package/codegen/NativeImageEditorSpec.g.h +63 -4
  1515. package/codegen/NativeImageLoaderAndroidSpec.g.h +29 -15
  1516. package/codegen/NativeImageLoaderIOSSpec.g.h +30 -16
  1517. package/codegen/NativeImageStoreAndroidSpec.g.h +5 -4
  1518. package/codegen/NativeImageStoreIOSSpec.g.h +35 -12
  1519. package/codegen/NativeIntentAndroidSpec.g.h +17 -16
  1520. package/codegen/NativeIntersectionObserverSpec.g.h +96 -0
  1521. package/codegen/NativeJSCHeapCaptureSpec.g.h +5 -4
  1522. package/codegen/NativeJSCSamplingProfilerSpec.g.h +5 -4
  1523. package/codegen/NativeKeyboardObserverSpec.g.h +6 -5
  1524. package/codegen/NativeLinkingManagerSpec.g.h +18 -17
  1525. package/codegen/NativeLogBoxSpec.g.h +6 -5
  1526. package/codegen/NativeModalManagerSpec.g.h +6 -5
  1527. package/codegen/NativeMutationObserverSpec.g.h +90 -0
  1528. package/codegen/NativeNetworkingAndroidSpec.g.h +14 -13
  1529. package/codegen/NativeNetworkingIOSSpec.g.h +39 -13
  1530. package/codegen/NativePerformanceObserverSpec.g.h +130 -0
  1531. package/codegen/NativePerformanceSpec.g.h +52 -0
  1532. package/codegen/NativePermissionsAndroidSpec.g.h +14 -13
  1533. package/codegen/NativePlatformConstantsAndroidSpec.g.h +54 -3
  1534. package/codegen/NativePlatformConstantsIOSSpec.g.h +44 -1
  1535. package/codegen/NativePlatformConstantsWinSpec.g.h +53 -1
  1536. package/codegen/NativePushNotificationManagerIOSSpec.g.h +112 -48
  1537. package/codegen/NativeReactNativeFeatureFlagsSpec.g.h +100 -0
  1538. package/codegen/NativeRedBoxSpec.g.h +7 -6
  1539. package/codegen/NativeSampleTurboModuleSpec.g.h +110 -36
  1540. package/codegen/NativeSegmentFetcherSpec.g.h +8 -7
  1541. package/codegen/NativeSettingsManagerSpec.g.h +29 -7
  1542. package/codegen/NativeShareModuleSpec.g.h +29 -4
  1543. package/codegen/NativeSoundManagerSpec.g.h +4 -3
  1544. package/codegen/NativeSourceCodeSpec.g.h +13 -1
  1545. package/codegen/NativeStatusBarManagerAndroidSpec.g.h +34 -10
  1546. package/codegen/NativeStatusBarManagerIOSSpec.g.h +50 -15
  1547. package/codegen/NativeTimingSpec.g.h +8 -7
  1548. package/codegen/NativeToastAndroidSpec.g.h +37 -7
  1549. package/codegen/NativeUIManagerSpec.g.h +94 -105
  1550. package/codegen/NativeVibrationSpec.g.h +9 -8
  1551. package/codegen/NativeWebSocketModuleSpec.g.h +28 -16
  1552. package/codegen/react/components/rnwcore/ComponentDescriptors.h +31 -0
  1553. package/codegen/react/components/rnwcore/EventEmitters.cpp +132 -0
  1554. package/codegen/react/components/rnwcore/EventEmitters.h +169 -0
  1555. package/codegen/react/components/rnwcore/Props.cpp +155 -0
  1556. package/codegen/react/components/rnwcore/Props.h +392 -0
  1557. package/codegen/react/components/rnwcore/ShadowNodes.cpp +24 -0
  1558. package/codegen/react/components/rnwcore/ShadowNodes.h +109 -0
  1559. package/codegen/react/components/rnwcore/States.cpp +16 -0
  1560. package/codegen/react/components/rnwcore/States.h +139 -0
  1561. package/codegen/rnwcoreJSI-generated.cpp +2939 -0
  1562. package/codegen/rnwcoreJSI.h +10018 -0
  1563. package/fmt/.clang-format +2 -0
  1564. package/fmt/cgmanifest.json +15 -0
  1565. package/fmt/fmt.vcxproj +153 -0
  1566. package/fmt/fmt.vcxproj.filters +59 -0
  1567. package/fmt/packages.lock.json +13 -0
  1568. package/fmt/pch.cpp +4 -0
  1569. package/fmt/pch.h +2 -0
  1570. package/generate.js +6 -1
  1571. package/include/Include.vcxitems +0 -1
  1572. package/include/Include.vcxitems.filters +1 -4
  1573. package/include/Shared/cdebug.h +43 -34
  1574. package/index.js +319 -233
  1575. package/index.windows.js +335 -253
  1576. package/interface.js +9 -9
  1577. package/jest/MockNativeMethods.js +21 -0
  1578. package/jest/ReactNativeInternalFeatureFlagsMock.js +13 -0
  1579. package/jest/__tests__/setup-test.js +18 -0
  1580. package/jest/assetFileTransformer.js +32 -0
  1581. package/jest/local-setup.js +28 -0
  1582. package/jest/mockComponent.js +64 -0
  1583. package/jest/mockModal.js +34 -0
  1584. package/jest/mockNativeComponent.js +40 -0
  1585. package/jest/mockScrollView.js +35 -0
  1586. package/jest/react-native-env.js +16 -0
  1587. package/jest/renderer.js +30 -0
  1588. package/jest/setup.js +411 -0
  1589. package/just-task.js +25 -35
  1590. package/metro.config.js +3 -62
  1591. package/package.json +75 -60
  1592. package/react-native.config.js +47 -10
  1593. package/rn-get-polyfills.js +2 -2
  1594. package/src/private/core/setUpDOM.js +18 -0
  1595. package/src/private/featureflags/NativeReactNativeFeatureFlags.js +44 -0
  1596. package/src/private/featureflags/ReactNativeFeatureFlags.js +150 -0
  1597. package/src/private/featureflags/ReactNativeFeatureFlagsBase.js +101 -0
  1598. package/src/private/specs/components/ActivityIndicatorViewNativeComponent.js +53 -0
  1599. package/src/private/specs/components/AndroidDrawerLayoutNativeComponent.js +124 -0
  1600. package/src/private/specs/components/AndroidHorizontalScrollContentViewNativeComponent.js +26 -0
  1601. package/src/private/specs/components/AndroidSwipeRefreshLayoutNativeComponent.js +74 -0
  1602. package/src/private/specs/components/AndroidSwitchNativeComponent.js +62 -0
  1603. package/src/private/specs/components/DebuggingOverlayNativeComponent.js +61 -0
  1604. package/src/private/specs/components/ProgressBarAndroidNativeComponent.js +36 -0
  1605. package/src/private/specs/components/PullToRefreshViewNativeComponent.js +71 -0
  1606. package/src/private/specs/components/RCTInputAccessoryViewNativeComponent.js +26 -0
  1607. package/src/private/specs/components/RCTModalHostViewNativeComponent.js +139 -0
  1608. package/src/private/specs/components/RCTSafeAreaViewNativeComponent.js +25 -0
  1609. package/src/private/specs/components/SwitchNativeComponent.js +61 -0
  1610. package/src/private/specs/components/UnimplementedNativeViewNativeComponent.js +26 -0
  1611. package/src/private/specs/modules/NativeAccessibilityInfo.js +33 -0
  1612. package/src/private/specs/modules/NativeAccessibilityManager.js +66 -0
  1613. package/src/private/specs/modules/NativeActionSheetManager.js +54 -0
  1614. package/src/private/specs/modules/NativeAlertManager.js +35 -0
  1615. package/src/private/specs/modules/NativeAnimatedModule.js +77 -0
  1616. package/src/private/specs/modules/NativeAnimatedTurboModule.js +78 -0
  1617. package/src/private/specs/modules/NativeAnimationsDebugModule.js +20 -0
  1618. package/src/private/specs/modules/NativeAppState.js +33 -0
  1619. package/src/private/specs/modules/NativeAppTheme.js +33 -0
  1620. package/src/private/specs/modules/NativeAppearance.js +36 -0
  1621. package/src/private/specs/modules/NativeBlobModule.js +61 -0
  1622. package/src/private/specs/modules/NativeBugReporting.js +20 -0
  1623. package/src/private/specs/modules/NativeClipboard.js +21 -0
  1624. package/src/private/specs/modules/NativeDevLoadingView.js +24 -0
  1625. package/src/private/specs/modules/NativeDevMenu.js +23 -0
  1626. package/src/private/specs/modules/NativeDevSettings.js +33 -0
  1627. package/src/private/specs/modules/NativeDevToolsSettingsManager.js +24 -0
  1628. package/src/private/specs/modules/NativeDeviceEventManager.js +19 -0
  1629. package/src/private/specs/modules/NativeDeviceInfo.js +58 -0
  1630. package/src/private/specs/modules/NativeDialogManagerAndroid.js +48 -0
  1631. package/src/private/specs/modules/NativeDialogManagerWindows.js +51 -0
  1632. package/src/private/specs/modules/NativeExceptionsManager.js +103 -0
  1633. package/src/private/specs/modules/NativeFileReaderModule.js +22 -0
  1634. package/src/private/specs/modules/NativeFrameRateLogger.js +22 -0
  1635. package/src/private/specs/modules/NativeHeadlessJsTaskSupport.js +20 -0
  1636. package/src/private/specs/modules/NativeI18nManager.js +28 -0
  1637. package/src/private/specs/modules/NativeImageEditor.js +52 -0
  1638. package/src/private/specs/modules/NativeImageLoaderAndroid.js +30 -0
  1639. package/src/private/specs/modules/NativeImageLoaderIOS.js +37 -0
  1640. package/src/private/specs/modules/NativeImageStoreAndroid.js +26 -0
  1641. package/src/private/specs/modules/NativeImageStoreIOS.js +33 -0
  1642. package/src/private/specs/modules/NativeIntentAndroid.js +30 -0
  1643. package/src/private/specs/modules/NativeIntersectionObserver.js +41 -0
  1644. package/src/private/specs/modules/NativeJSCHeapCapture.js +19 -0
  1645. package/src/private/specs/modules/NativeJSCSamplingProfiler.js +19 -0
  1646. package/src/private/specs/modules/NativeKeyboardObserver.js +20 -0
  1647. package/src/private/specs/modules/NativeLinkingManager.js +27 -0
  1648. package/src/private/specs/modules/NativeLogBox.js +20 -0
  1649. package/src/private/specs/modules/NativeModalManager.js +21 -0
  1650. package/src/private/specs/modules/NativeMutationObserver.js +58 -0
  1651. package/src/private/specs/modules/NativeNetworkingAndroid.js +37 -0
  1652. package/src/private/specs/modules/NativeNetworkingIOS.js +37 -0
  1653. package/src/private/specs/modules/NativePermissionsAndroid.js +77 -0
  1654. package/src/private/specs/modules/NativePlatformConstantsAndroid.js +44 -0
  1655. package/src/private/specs/modules/NativePlatformConstantsIOS.js +37 -0
  1656. package/src/private/specs/modules/NativePlatformConstantsWin.js +38 -0
  1657. package/src/private/specs/modules/NativePushNotificationManagerIOS.js +103 -0
  1658. package/src/private/specs/modules/NativeRedBox.js +20 -0
  1659. package/src/private/specs/modules/NativeSampleTurboModule.js +53 -0
  1660. package/src/private/specs/modules/NativeSegmentFetcher.js +28 -0
  1661. package/src/private/specs/modules/NativeSettingsManager.js +25 -0
  1662. package/src/private/specs/modules/NativeShareModule.js +23 -0
  1663. package/src/private/specs/modules/NativeSoundManager.js +22 -0
  1664. package/src/private/specs/modules/NativeSourceCode.js +36 -0
  1665. package/src/private/specs/modules/NativeStatusBarManagerAndroid.js +68 -0
  1666. package/src/private/specs/modules/NativeStatusBarManagerIOS.js +89 -0
  1667. package/src/private/specs/modules/NativeTiming.js +26 -0
  1668. package/src/private/specs/modules/NativeToastAndroid.js +38 -0
  1669. package/src/private/specs/modules/NativeUIManager.js +118 -0
  1670. package/src/private/specs/modules/NativeVibration.js +24 -0
  1671. package/src/private/specs/modules/NativeWebSocketModule.js +34 -0
  1672. package/src/private/webapis/dom/geometry/DOMRect.js +82 -0
  1673. package/src/private/webapis/dom/geometry/DOMRectReadOnly.js +188 -0
  1674. package/src/private/webapis/dom/nodes/ReactNativeElement.js +192 -0
  1675. package/src/private/webapis/dom/nodes/ReadOnlyCharacterData.js +72 -0
  1676. package/src/private/webapis/dom/nodes/ReadOnlyElement.js +275 -0
  1677. package/src/private/webapis/dom/nodes/ReadOnlyNode.js +363 -0
  1678. package/src/private/webapis/dom/nodes/ReadOnlyText.js +30 -0
  1679. package/src/private/webapis/dom/nodes/utilities/Traversal.js +54 -0
  1680. package/src/private/webapis/dom/oldstylecollections/ArrayLikeUtils.js +46 -0
  1681. package/src/private/webapis/dom/oldstylecollections/DOMRectList.js +76 -0
  1682. package/src/private/webapis/dom/oldstylecollections/HTMLCollection.js +82 -0
  1683. package/src/private/webapis/dom/oldstylecollections/NodeList.js +104 -0
  1684. package/src/private/webapis/performance/EventCounts.js +78 -0
  1685. package/src/private/webapis/performance/MemoryInfo.js +54 -0
  1686. package/src/private/webapis/performance/NativePerformance.js +33 -0
  1687. package/src/private/webapis/performance/NativePerformanceObserver.js +61 -0
  1688. package/src/private/webapis/performance/Performance.js +339 -0
  1689. package/src/private/webapis/performance/PerformanceEntry.js +53 -0
  1690. package/src/private/webapis/performance/PerformanceEventTiming.js +55 -0
  1691. package/src/private/webapis/performance/PerformanceObserver.js +337 -0
  1692. package/src/private/webapis/performance/RawPerformanceEntry.js +87 -0
  1693. package/src/private/webapis/performance/ReactNativeStartupTiming.js +91 -0
  1694. package/src/private/webapis/performance/__mocks__/NativePerformance.js +67 -0
  1695. package/src/private/webapis/performance/__mocks__/NativePerformanceObserver.js +128 -0
  1696. package/stubs/double-conversion/double-conversion.h +23 -6
  1697. package/stubs/glog/logging.h +7 -0
  1698. package/template/.clang-format +4 -0
  1699. package/template/cpp-app/proj/MyApp.sln +21 -52
  1700. package/template/cpp-app/proj/MyApp.vcxproj +12 -57
  1701. package/template/cpp-app/proj/MyApp.vcxproj.filters +1 -2
  1702. package/template/cpp-app/src/App.cpp +23 -10
  1703. package/template/cpp-app/src/App.h +5 -9
  1704. package/template/cpp-app/src/MainPage.cpp +1 -5
  1705. package/template/cpp-app/src/MainPage.h +0 -2
  1706. package/template/cpp-app/src/MainPage.idl +3 -1
  1707. package/template/cpp-app/src/PropertySheet.props +3 -3
  1708. package/template/cpp-app/src/ReactPackageProvider.cpp +1 -4
  1709. package/template/cpp-app/src/ReactPackageProvider.h +0 -2
  1710. package/template/cpp-app/src/pch.h +6 -9
  1711. package/template/cpp-lib/proj/MyLib.sln +21 -52
  1712. package/template/cpp-lib/proj/MyLib.vcxproj +19 -50
  1713. package/template/cpp-lib/proj/MyLib.vcxproj.filters +1 -2
  1714. package/template/cpp-lib/src/PropertySheet.props +3 -3
  1715. package/template/cpp-lib/src/ReactNativeModule.h +0 -4
  1716. package/template/cpp-lib/src/ReactPackageProvider.cpp +1 -4
  1717. package/template/cpp-lib/src/ReactPackageProvider.h +0 -3
  1718. package/template/cpp-lib/src/pch.h +4 -9
  1719. package/template/cs-app/proj/MyApp.csproj +18 -47
  1720. package/template/cs-app/proj/MyApp.sln +21 -60
  1721. package/template/cs-app/src/App.xaml.cs +22 -11
  1722. package/template/cs-app/src/AutolinkedNativeModules.g.cs +1 -1
  1723. package/template/cs-app/src/MainPage.xaml.cs +8 -7
  1724. package/template/cs-lib/proj/MyLib.csproj +17 -35
  1725. package/template/cs-lib/proj/MyLib.sln +21 -60
  1726. package/template/metro.config.js +22 -8
  1727. package/template/metro.devMode.config.js +33 -18
  1728. package/template/shared-app/proj/ExperimentalFeatures.props +40 -0
  1729. package/template/shared-app/proj/NuGet_Config +19 -0
  1730. package/template/shared-app/src/MainPage.xaml +1 -1
  1731. package/template/shared-lib/proj/ExperimentalFeatures.props +40 -0
  1732. package/template/shared-lib/proj/NuGet_Config +17 -0
  1733. package/templates/.clang-format +4 -0
  1734. package/templates/cpp-app/jest.config.windows.js +3 -0
  1735. package/templates/cpp-app/metro.config.js +54 -0
  1736. package/templates/cpp-app/template.config.js +134 -0
  1737. package/templates/cpp-app/windows/ExperimentalFeatures.props +11 -0
  1738. package/templates/cpp-app/windows/MyApp/AutolinkedNativeModules.g.cpp +13 -0
  1739. package/templates/cpp-app/windows/MyApp/AutolinkedNativeModules.g.h +10 -0
  1740. package/templates/cpp-app/windows/MyApp/MyApp.cpp +164 -0
  1741. package/templates/cpp-app/windows/MyApp/MyApp.h +3 -0
  1742. package/templates/cpp-app/windows/MyApp/MyApp.ico +0 -0
  1743. package/templates/cpp-app/windows/MyApp/MyApp.rc +0 -0
  1744. package/templates/cpp-app/windows/MyApp/MyApp.vcxproj +143 -0
  1745. package/templates/cpp-app/windows/MyApp/MyApp.vcxproj.filters +58 -0
  1746. package/templates/cpp-app/windows/MyApp/_gitignore +1 -0
  1747. package/templates/cpp-app/windows/MyApp/pch.cpp +1 -0
  1748. package/templates/cpp-app/windows/MyApp/pch.h +38 -0
  1749. package/templates/cpp-app/windows/MyApp/resource.h +17 -0
  1750. package/templates/cpp-app/windows/MyApp/small.ico +0 -0
  1751. package/templates/cpp-app/windows/MyApp/targetver.h +8 -0
  1752. package/templates/cpp-app/windows/MyApp.Package/Images/LockScreenLogo.scale-200.png +0 -0
  1753. package/templates/cpp-app/windows/MyApp.Package/Images/SplashScreen.scale-200.png +0 -0
  1754. package/templates/cpp-app/windows/MyApp.Package/Images/Square150x150Logo.scale-200.png +0 -0
  1755. package/templates/cpp-app/windows/MyApp.Package/Images/Square44x44Logo.scale-200.png +0 -0
  1756. package/templates/cpp-app/windows/MyApp.Package/Images/Square44x44Logo.targetsize-24_altform-unplated.png +0 -0
  1757. package/templates/cpp-app/windows/MyApp.Package/Images/StoreLogo.png +0 -0
  1758. package/templates/cpp-app/windows/MyApp.Package/Images/Wide310x150Logo.scale-200.png +0 -0
  1759. package/templates/cpp-app/windows/MyApp.Package/MyApp.Package.wapproj +78 -0
  1760. package/templates/cpp-app/windows/MyApp.Package/Package.appxmanifest +49 -0
  1761. package/templates/cpp-app/windows/MyApp.sln +176 -0
  1762. package/templates/cpp-app/windows/_gitignore +41 -0
  1763. package/templates/cpp-lib/example/metro.config.js +74 -0
  1764. package/templates/cpp-lib/template.config.js +235 -0
  1765. package/templates/cpp-lib/windows/ExperimentalFeatures.props +11 -0
  1766. package/templates/cpp-lib/windows/MyLib/MyLib.cpp +18 -0
  1767. package/templates/cpp-lib/windows/MyLib/MyLib.def +3 -0
  1768. package/templates/cpp-lib/windows/MyLib/MyLib.h +31 -0
  1769. package/templates/cpp-lib/windows/MyLib/MyLib.rc +0 -0
  1770. package/templates/cpp-lib/windows/MyLib/MyLib.vcxproj +148 -0
  1771. package/templates/cpp-lib/windows/MyLib/MyLib.vcxproj.filters +44 -0
  1772. package/templates/cpp-lib/windows/MyLib/ReactPackageProvider.cpp +20 -0
  1773. package/templates/cpp-lib/windows/MyLib/ReactPackageProvider.h +24 -0
  1774. package/templates/cpp-lib/windows/MyLib/ReactPackageProvider.idl +9 -0
  1775. package/templates/cpp-lib/windows/MyLib/pch.cpp +1 -0
  1776. package/templates/cpp-lib/windows/MyLib/pch.h +30 -0
  1777. package/templates/cpp-lib/windows/MyLib/resource.h +5 -0
  1778. package/templates/cpp-lib/windows/MyLib/targetver.h +8 -0
  1779. package/templates/cpp-lib/windows/MyLib.sln +156 -0
  1780. package/templates/cpp-lib/windows/_gitignore +41 -0
  1781. package/templates/old/generateWrapper.js +67 -0
  1782. package/templates/old/uwp-cpp-app/template.config.js +15 -0
  1783. package/templates/old/uwp-cpp-lib/template.config.js +15 -0
  1784. package/templates/old/uwp-cs-app/template.config.js +15 -0
  1785. package/templates/old/uwp-cs-lib/template.config.js +15 -0
  1786. package/templates/templateUtils.js +137 -0
  1787. package/types/experimental.d.ts +145 -0
  1788. package/types/index.d.ts +217 -0
  1789. package/types/modules/BatchedBridge.d.ts +32 -0
  1790. package/types/modules/Codegen.d.ts +74 -0
  1791. package/types/modules/Devtools.d.ts +32 -0
  1792. package/types/modules/LaunchScreen.d.ts +18 -0
  1793. package/types/modules/globals.d.ts +599 -0
  1794. package/types/private/TimerMixin.d.ts +19 -0
  1795. package/types/private/Utilities.d.ts +10 -0
  1796. package/types/public/DeprecatedPropertiesAlias.d.ts +185 -0
  1797. package/types/public/Insets.d.ts +15 -0
  1798. package/types/public/ReactNativeRenderer.d.ts +144 -0
  1799. package/types/public/ReactNativeTypes.d.ts +143 -0
  1800. package/CHANGELOG.json +0 -10261
  1801. package/CHANGELOG.md +0 -3715
  1802. package/Chakra/ChakraCoreDebugger.h +0 -147
  1803. package/Chakra/ChakraExecutor.cpp +0 -802
  1804. package/Chakra/ChakraExecutor.h +0 -163
  1805. package/Chakra/ChakraNativeModules.cpp +0 -67
  1806. package/Chakra/ChakraNativeModules.h +0 -36
  1807. package/Folly/TEMP_UntilFollyUpdate/portability/Builtins.h +0 -153
  1808. package/Folly/packages.config +0 -4
  1809. package/JSI/Desktop/ChakraJsiRuntime_core.cpp +0 -328
  1810. package/JSI/Desktop/JSI.Desktop.vcxproj +0 -97
  1811. package/JSI/Desktop/JSI.Desktop.vcxproj.filters +0 -19
  1812. package/JSI/Desktop/packages.config +0 -6
  1813. package/JSI/Shared/ChakraApi.cpp +0 -458
  1814. package/JSI/Shared/ChakraApi.h +0 -478
  1815. package/JSI/Shared/ChakraRuntime.cpp +0 -972
  1816. package/JSI/Shared/ChakraRuntime.h +0 -501
  1817. package/JSI/Shared/ChakraRuntimeArgs.h +0 -50
  1818. package/JSI/Shared/ChakraRuntimeFactory.h +0 -14
  1819. package/JSI/Shared/JSI.Shared.vcxitems +0 -29
  1820. package/JSI/Shared/JSI.Shared.vcxitems.filters +0 -42
  1821. package/JSI/Shared/RuntimeHolder.h +0 -21
  1822. package/JSI/Shared/ScriptStore.h +0 -79
  1823. package/JSI/Universal/ChakraJsiRuntime_edgemode.cpp +0 -90
  1824. package/JSI/Universal/JSI.Universal.vcxproj +0 -100
  1825. package/JSI/Universal/JSI.Universal.vcxproj.filters +0 -16
  1826. package/Libraries/AppTheme/AppTheme.d.ts +0 -25
  1827. package/Libraries/AppTheme/AppTheme.d.ts.map +0 -1
  1828. package/Libraries/AppTheme/AppTheme.js.map +0 -1
  1829. package/Libraries/AppTheme/AppThemeTypes.d.ts.map +0 -1
  1830. package/Libraries/AppTheme/AppThemeTypes.js +0 -8
  1831. package/Libraries/AppTheme/AppThemeTypes.js.map +0 -1
  1832. package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.android.js +0 -158
  1833. package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.ios.js +0 -273
  1834. package/Libraries/Components/DatePicker/DatePicker.d.ts +0 -11
  1835. package/Libraries/Components/DatePicker/DatePicker.d.ts.map +0 -1
  1836. package/Libraries/Components/DatePicker/DatePicker.js +0 -96
  1837. package/Libraries/Components/DatePicker/DatePicker.js.map +0 -1
  1838. package/Libraries/Components/DatePicker/DatePickerIOS.android.js +0 -46
  1839. package/Libraries/Components/DatePicker/DatePickerIOS.ios.js +0 -189
  1840. package/Libraries/Components/DatePicker/DatePickerIOS.windows.js +0 -8
  1841. package/Libraries/Components/DatePicker/DatePickerProps.d.ts +0 -33
  1842. package/Libraries/Components/DatePicker/DatePickerProps.d.ts.map +0 -1
  1843. package/Libraries/Components/DatePicker/DatePickerProps.js +0 -16
  1844. package/Libraries/Components/DatePicker/DatePickerProps.js.map +0 -1
  1845. package/Libraries/Components/DatePicker/RCTDatePickerNativeComponent.js +0 -60
  1846. package/Libraries/Components/DatePickerAndroid/DatePickerAndroid.android.js +0 -89
  1847. package/Libraries/Components/DatePickerAndroid/DatePickerAndroid.ios.js +0 -30
  1848. package/Libraries/Components/DatePickerAndroid/DatePickerAndroid.windows.js +0 -8
  1849. package/Libraries/Components/DatePickerAndroid/DatePickerAndroidTypes.js +0 -30
  1850. package/Libraries/Components/DatePickerAndroid/NativeDatePickerAndroid.js +0 -22
  1851. package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.ios.js +0 -12
  1852. package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.windows.js +0 -8
  1853. package/Libraries/Components/Flyout/Flyout.d.ts.map +0 -1
  1854. package/Libraries/Components/Flyout/Flyout.js.map +0 -1
  1855. package/Libraries/Components/Flyout/FlyoutProps.d.ts +0 -22
  1856. package/Libraries/Components/Flyout/FlyoutProps.d.ts.map +0 -1
  1857. package/Libraries/Components/Flyout/FlyoutProps.js +0 -3
  1858. package/Libraries/Components/Flyout/FlyoutProps.js.map +0 -1
  1859. package/Libraries/Components/Glyph/Glyph.d.ts.map +0 -1
  1860. package/Libraries/Components/Glyph/Glyph.js.map +0 -1
  1861. package/Libraries/Components/Glyph/GlyphProps.d.ts +0 -17
  1862. package/Libraries/Components/Glyph/GlyphProps.d.ts.map +0 -1
  1863. package/Libraries/Components/Glyph/GlyphProps.js +0 -8
  1864. package/Libraries/Components/Glyph/GlyphProps.js.map +0 -1
  1865. package/Libraries/Components/Keyboard/KeyboardExt.d.ts.map +0 -1
  1866. package/Libraries/Components/Keyboard/KeyboardExtProps.d.ts.map +0 -1
  1867. package/Libraries/Components/MaskedView/MaskedViewIOS.android.js +0 -13
  1868. package/Libraries/Components/MaskedView/MaskedViewIOS.ios.js +0 -93
  1869. package/Libraries/Components/MaskedView/MaskedViewIOS.windows.js +0 -9
  1870. package/Libraries/Components/MaskedView/RCTMaskedViewNativeComponent.js +0 -21
  1871. package/Libraries/Components/Picker/AndroidDialogPickerNativeComponent.js +0 -82
  1872. package/Libraries/Components/Picker/AndroidDialogPickerViewConfig.js +0 -30
  1873. package/Libraries/Components/Picker/AndroidDropdownPickerNativeComponent.js +0 -69
  1874. package/Libraries/Components/Picker/Picker.js +0 -165
  1875. package/Libraries/Components/Picker/Picker.windows.js +0 -170
  1876. package/Libraries/Components/Picker/PickerAndroid.android.js +0 -145
  1877. package/Libraries/Components/Picker/PickerAndroid.ios.js +0 -12
  1878. package/Libraries/Components/Picker/PickerAndroid.windows.js +0 -8
  1879. package/Libraries/Components/Picker/PickerIOS.android.js +0 -14
  1880. package/Libraries/Components/Picker/PickerIOS.ios.js +0 -164
  1881. package/Libraries/Components/Picker/PickerIOS.windows.js +0 -8
  1882. package/Libraries/Components/Picker/PickerProps.d.ts +0 -30
  1883. package/Libraries/Components/Picker/PickerProps.d.ts.map +0 -1
  1884. package/Libraries/Components/Picker/PickerProps.js +0 -8
  1885. package/Libraries/Components/Picker/PickerProps.js.map +0 -1
  1886. package/Libraries/Components/Picker/PickerWindows.d.ts +0 -38
  1887. package/Libraries/Components/Picker/PickerWindows.d.ts.map +0 -1
  1888. package/Libraries/Components/Picker/PickerWindows.js +0 -118
  1889. package/Libraries/Components/Picker/PickerWindows.js.map +0 -1
  1890. package/Libraries/Components/Picker/RCTPickerNativeComponent.js +0 -72
  1891. package/Libraries/Components/Picker/RCTPickerViewConfig.js +0 -41
  1892. package/Libraries/Components/Popup/Popup.d.ts.map +0 -1
  1893. package/Libraries/Components/Popup/Popup.js.map +0 -1
  1894. package/Libraries/Components/Popup/PopupProps.d.ts +0 -27
  1895. package/Libraries/Components/Popup/PopupProps.d.ts.map +0 -1
  1896. package/Libraries/Components/Popup/PopupProps.js +0 -8
  1897. package/Libraries/Components/Popup/PopupProps.js.map +0 -1
  1898. package/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.ios.js +0 -12
  1899. package/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.windows.js +0 -8
  1900. package/Libraries/Components/ProgressViewIOS/ProgressViewIOS.android.js +0 -46
  1901. package/Libraries/Components/ProgressViewIOS/ProgressViewIOS.ios.js +0 -77
  1902. package/Libraries/Components/ProgressViewIOS/ProgressViewIOS.windows.js +0 -8
  1903. package/Libraries/Components/ProgressViewIOS/RCTProgressViewNativeComponent.js +0 -35
  1904. package/Libraries/Components/SafeAreaView/SafeAreaView.windows.js +0 -63
  1905. package/Libraries/Components/ScrollResponder.js +0 -772
  1906. package/Libraries/Components/ScrollView/ScrollViewViewConfig.js +0 -75
  1907. package/Libraries/Components/SegmentedControlIOS/RCTSegmentedControlNativeComponent.js +0 -46
  1908. package/Libraries/Components/SegmentedControlIOS/SegmentedControlIOS.android.js +0 -46
  1909. package/Libraries/Components/SegmentedControlIOS/SegmentedControlIOS.ios.js +0 -123
  1910. package/Libraries/Components/SegmentedControlIOS/SegmentedControlIOS.windows.js +0 -8
  1911. package/Libraries/Components/Slider/Slider.js +0 -273
  1912. package/Libraries/Components/Slider/SliderNativeComponent.js +0 -60
  1913. package/Libraries/Components/StaticContainer.react.js +0 -51
  1914. package/Libraries/Components/StatusBar/StatusBarIOS.js +0 -21
  1915. package/Libraries/Components/TextInput/AndroidTextInputViewConfig.js +0 -114
  1916. package/Libraries/Components/TextInput/RCTSinglelineTextInputViewConfig.js +0 -134
  1917. package/Libraries/Components/ToastAndroid/ToastAndroid.ios.js +0 -37
  1918. package/Libraries/Components/ToastAndroid/ToastAndroid.windows.js +0 -37
  1919. package/Libraries/Components/Touchable/__mocks__/ensureComponentIsNative.js +0 -12
  1920. package/Libraries/Components/Touchable/ensurePositiveDelayProps.js +0 -26
  1921. package/Libraries/Components/View/ReactNativeViewViewConfig.js +0 -347
  1922. package/Libraries/Components/View/ReactNativeViewViewConfig.windows.js +0 -377
  1923. package/Libraries/Components/View/ReactNativeViewViewConfigAndroid.js +0 -83
  1924. package/Libraries/Components/View/ViewWindows.d.ts +0 -20
  1925. package/Libraries/Components/View/ViewWindows.d.ts.map +0 -1
  1926. package/Libraries/Components/View/ViewWindows.js +0 -30
  1927. package/Libraries/Components/View/ViewWindows.js.map +0 -1
  1928. package/Libraries/Components/View/ViewWindowsProps.d.ts +0 -30
  1929. package/Libraries/Components/View/ViewWindowsProps.d.ts.map +0 -1
  1930. package/Libraries/Components/View/ViewWindowsProps.js +0 -8
  1931. package/Libraries/Components/View/ViewWindowsProps.js.map +0 -1
  1932. package/Libraries/Core/setUpSystrace.js +0 -21
  1933. package/Libraries/DeprecatedPropTypes/DeprecatedColorPropType.js +0 -76
  1934. package/Libraries/DeprecatedPropTypes/DeprecatedEdgeInsetsPropType.js +0 -28
  1935. package/Libraries/DeprecatedPropTypes/DeprecatedImagePropType.js +0 -82
  1936. package/Libraries/DeprecatedPropTypes/DeprecatedImageSourcePropType.js +0 -40
  1937. package/Libraries/DeprecatedPropTypes/DeprecatedImageStylePropTypes.js +0 -76
  1938. package/Libraries/DeprecatedPropTypes/DeprecatedLayoutPropTypes.js +0 -233
  1939. package/Libraries/DeprecatedPropTypes/DeprecatedPointPropType.js +0 -24
  1940. package/Libraries/DeprecatedPropTypes/DeprecatedShadowPropTypesIOS.js +0 -30
  1941. package/Libraries/DeprecatedPropTypes/DeprecatedStyleSheetPropType.js +0 -32
  1942. package/Libraries/DeprecatedPropTypes/DeprecatedTextInputPropTypes.js +0 -622
  1943. package/Libraries/DeprecatedPropTypes/DeprecatedTextPropTypes.js +0 -158
  1944. package/Libraries/DeprecatedPropTypes/DeprecatedTextStylePropTypes.js +0 -157
  1945. package/Libraries/DeprecatedPropTypes/DeprecatedTransformPropTypes.js +0 -99
  1946. package/Libraries/DeprecatedPropTypes/DeprecatedViewAccessibility.js +0 -44
  1947. package/Libraries/DeprecatedPropTypes/DeprecatedViewAccessibility.windows.js +0 -71
  1948. package/Libraries/DeprecatedPropTypes/DeprecatedViewPropTypes.js +0 -408
  1949. package/Libraries/DeprecatedPropTypes/DeprecatedViewStylePropTypes.js +0 -68
  1950. package/Libraries/DeprecatedPropTypes/deprecatedCreateStrictShapeTypeChecker.js +0 -86
  1951. package/Libraries/Image/ImagePickerIOS.js +0 -105
  1952. package/Libraries/Image/ImageViewViewConfig.js +0 -68
  1953. package/Libraries/Image/NativeImagePickerIOS.js +0 -40
  1954. package/Libraries/Interaction/Batchinator.js +0 -76
  1955. package/Libraries/Interaction/BridgeSpyStallHandler.js +0 -62
  1956. package/Libraries/Interaction/InteractionMixin.js +0 -55
  1957. package/Libraries/Interaction/InteractionStallDebugger.js +0 -23
  1958. package/Libraries/Network/RCTNetworkingWinShared.js +0 -69
  1959. package/Libraries/Performance/PureComponentDebug.js +0 -73
  1960. package/Libraries/Performance/QuickPerformanceLogger.js +0 -101
  1961. package/Libraries/ReactNative/DummyUIManager.js +0 -122
  1962. package/Libraries/ReactNative/queryLayoutByID.js +0 -58
  1963. package/Libraries/Reliability/UserFlow.js +0 -136
  1964. package/Libraries/Renderer/implementations/ReactFabric-dev.fb.js +0 -21758
  1965. package/Libraries/Renderer/implementations/ReactFabric-prod.fb.js +0 -7714
  1966. package/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js +0 -8009
  1967. package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js +0 -22404
  1968. package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js +0 -7938
  1969. package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js +0 -8230
  1970. package/Libraries/Settings/Settings.android.js +0 -33
  1971. package/Libraries/Settings/Settings.windows.js +0 -28
  1972. package/Libraries/Storage/AsyncStorage.js +0 -361
  1973. package/Libraries/Storage/NativeAsyncLocalStorage.js +0 -43
  1974. package/Libraries/Storage/NativeAsyncSQLiteDBStorage.js +0 -43
  1975. package/Libraries/StyleSheet/StyleSheetValidation.js +0 -100
  1976. package/Libraries/Text/TextInjection.js +0 -17
  1977. package/Libraries/Utilities/JSDevSupportModule.js +0 -40
  1978. package/Libraries/Utilities/MatrixMath.js +0 -748
  1979. package/Libraries/Utilities/NativeDevSplitBundleLoader.js +0 -20
  1980. package/Libraries/Utilities/NativeJSDevSupport.js +0 -25
  1981. package/Libraries/Utilities/buildStyleInterpolator.js +0 -209
  1982. package/Libraries/Utilities/clamp.js +0 -23
  1983. package/Libraries/Utilities/deprecatedPropType.js +0 -38
  1984. package/Libraries/Utilities/groupByEveryN.js +0 -51
  1985. package/Libraries/Utilities/mergeIntoFast.js +0 -26
  1986. package/Libraries/Utilities/registerGeneratedViewConfig.js +0 -83
  1987. package/Libraries/Utilities/setAndForwardRef.js +0 -71
  1988. package/Libraries/Utilities/truncate.js +0 -51
  1989. package/Libraries/promiseRejectionIsError.js +0 -24
  1990. package/Libraries/vendor/emitter/_EmitterSubscription.js +0 -60
  1991. package/Libraries/vendor/emitter/_EventEmitter.js +0 -173
  1992. package/Libraries/vendor/emitter/_EventSubscription.js +0 -40
  1993. package/Libraries/vendor/emitter/_EventSubscriptionVendor.js +0 -101
  1994. package/Microsoft.ReactNative/Base/CoreNativeModules.cpp +0 -112
  1995. package/Microsoft.ReactNative/Base/CoreNativeModules.h +0 -34
  1996. package/Microsoft.ReactNative/Modules/TimingModule.cpp +0 -215
  1997. package/Microsoft.ReactNative/Modules/TimingModule.h +0 -91
  1998. package/Microsoft.ReactNative/Modules/WebSocketModuleUwp.cpp +0 -321
  1999. package/Microsoft.ReactNative/Modules/WebSocketModuleUwp.h +0 -28
  2000. package/Microsoft.ReactNative/ReactHost/ReactContext.cpp +0 -190
  2001. package/Microsoft.ReactNative/ReactHost/ReactContext.h +0 -73
  2002. package/Microsoft.ReactNative/Views/DatePickerViewManager.cpp +0 -176
  2003. package/Microsoft.ReactNative/Views/DatePickerViewManager.h +0 -28
  2004. package/Microsoft.ReactNative/Views/PickerViewManager.cpp +0 -212
  2005. package/Microsoft.ReactNative/Views/PickerViewManager.h +0 -29
  2006. package/Microsoft.ReactNative/Views/ReactRootControl.cpp +0 -489
  2007. package/Microsoft.ReactNative/Views/ReactRootControl.h +0 -154
  2008. package/Microsoft.ReactNative/packages.config +0 -12
  2009. package/Microsoft.ReactNative.Cxx/JSI/JsiApi.h +0 -31
  2010. package/PropertySheets/ARM.props +0 -13
  2011. package/PropertySheets/Application/ARM.props +0 -13
  2012. package/PropertySheets/DynamicLibrary/ARM.props +0 -13
  2013. package/PropertySheets/External/Microsoft.ReactNative.Uwp.CSharpApp.SourceReferences.targets +0 -20
  2014. package/PropertySheets/StaticLibrary/ARM.props +0 -13
  2015. package/ReactCommon/Yoga.cpp +0 -4424
  2016. package/ReactCommon/packages.config +0 -4
  2017. package/Scripts/Microsoft.ChakraCore.ARM64.nuspec +0 -50
  2018. package/Scripts/Microsoft.ChakraCore.ARM64.targets +0 -15
  2019. package/Scripts/Microsoft.ReactNative.Cxx.NugetSignConfig.xml +0 -6
  2020. package/Scripts/Microsoft.ReactNative.Managed.CodeGen.NugetSignConfig.xml +0 -6
  2021. package/Scripts/Microsoft.ReactNative.Managed.CodeGen.SignConfig.xml +0 -12
  2022. package/Scripts/Microsoft.ReactNative.Managed.NugetSignConfig.xml +0 -6
  2023. package/Scripts/Microsoft.ReactNative.Managed.SignConfig.xml +0 -26
  2024. package/Scripts/Microsoft.ReactNative.NugetSignConfig.xml +0 -6
  2025. package/Scripts/Microsoft.ReactNative.SignConfig.xml +0 -32
  2026. package/Scripts/Tfs/Install-VSFeatures.ps1 +0 -112
  2027. package/Scripts/Tfs/Layout-Headers.ps1 +0 -155
  2028. package/Scripts/copyRNLibraries.js +0 -87
  2029. package/Shared/AsyncStorage/AsyncStorageManager.cpp +0 -149
  2030. package/Shared/AsyncStorage/AsyncStorageManager.h +0 -71
  2031. package/Shared/AsyncStorage/FollyDynamicConverter.cpp +0 -51
  2032. package/Shared/AsyncStorage/FollyDynamicConverter.h +0 -24
  2033. package/Shared/AsyncStorage/KeyValueStorage.cpp +0 -248
  2034. package/Shared/AsyncStorage/KeyValueStorage.h +0 -50
  2035. package/Shared/AsyncStorage/StorageFileIO.cpp +0 -160
  2036. package/Shared/AsyncStorage/StorageFileIO.h +0 -40
  2037. package/Shared/AsyncStorageModule.h +0 -25
  2038. package/Shared/IHttpResource.h +0 -34
  2039. package/Shared/IUIManager.h +0 -90
  2040. package/Shared/IWebSocketResource.h +0 -184
  2041. package/Shared/MemoryTracker.cpp +0 -157
  2042. package/Shared/MemoryTracker.h +0 -141
  2043. package/Shared/Modules/AsyncStorageModule.cpp +0 -91
  2044. package/Shared/Modules/AsyncStorageModuleWin32.cpp +0 -495
  2045. package/Shared/Modules/AsyncStorageModuleWin32.h +0 -75
  2046. package/Shared/WinRTWebSocketResource.cpp +0 -397
  2047. package/Shared/WinRTWebSocketResource.h +0 -138
  2048. package/Shared/cdebug.cpp +0 -7
  2049. package/Shared/etw/build.bat +0 -4
  2050. package/Shared/etw/react_native_windows.h +0 -1275
  2051. package/Shared/etw/react_native_windows.man +0 -86
  2052. package/Shared/etw/react_native_windows_etw_res.dll +0 -0
  2053. package/Shared/etw/register.bat +0 -3
  2054. package/codegen/NativeAsyncLocalStorageSpec.g.h +0 -63
  2055. package/codegen/NativeAsyncSQLiteDBStorageSpec.g.h +0 -63
  2056. package/codegen/NativeDatePickerAndroidSpec.g.h +0 -33
  2057. package/codegen/NativeDevSplitBundleLoaderSpec.g.h +0 -33
  2058. package/codegen/NativeImagePickerIOSSpec.g.h +0 -63
  2059. package/codegen/NativeJSDevSupportSpec.g.h +0 -39
  2060. package/include/Shared/AsyncStorageModuleWin32Config.h +0 -15
  2061. package/include/Shared/ViewManager.h +0 -34
  2062. package/template/cpp-app/keys/MyApp_TemporaryKey.pfx +0 -0
  2063. package/template/cpp-app/proj/packages.config +0 -6
  2064. package/template/cpp-lib/proj/packages.config +0 -6
  2065. package/template/cs-app/keys/MyApp_TemporaryKey.pfx +0 -0
  2066. package/template/shared-app/proj/BuildFlags.props +0 -10
  2067. package/template/shared-app/proj/NuGet.Config +0 -13
  2068. package/template/shared-lib/proj/NuGet.Config +0 -13
  2069. package/typings-index.d.ts +0 -23
  2070. package/typings-index.d.ts.map +0 -1
  2071. package/typings-index.js +0 -42
  2072. package/typings-index.js.map +0 -1
  2073. /package/{JSI/Shared → Shared/JSI}/ByteArrayBuffer.h +0 -0
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) Facebook, Inc. and its affiliates.
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
3
  *
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
@@ -8,61 +8,144 @@
8
8
  * @flow strict-local
9
9
  */
10
10
 
11
- 'use strict';
12
-
13
- import AnimatedImplementation from '../../Animated/AnimatedImplementation';
14
- import Platform from '../../Utilities/Platform';
15
- import * as React from 'react';
16
- import ReactNative from '../../Renderer/shims/ReactNative';
17
- require('../../Renderer/shims/ReactNative'); // Force side effects to prevent T55744311
18
- import ScrollResponder from '../ScrollResponder';
19
- import ScrollViewStickyHeader from './ScrollViewStickyHeader';
20
- import StyleSheet from '../../StyleSheet/StyleSheet';
21
- import View from '../View/View';
22
-
23
- import dismissKeyboard from '../../Utilities/dismissKeyboard';
24
- import flattenStyle from '../../StyleSheet/flattenStyle';
25
- import invariant from 'invariant';
26
- import processDecelerationRate from './processDecelerationRate';
27
- import resolveAssetSource from '../../Image/resolveAssetSource';
28
- import splitLayoutProps from '../../StyleSheet/splitLayoutProps';
29
- import setAndForwardRef from '../../Utilities/setAndForwardRef';
30
-
11
+ import type {HostComponent} from '../../Renderer/shims/ReactNativeTypes';
31
12
  import type {EdgeInsetsProp} from '../../StyleSheet/EdgeInsetsPropType';
32
13
  import type {PointProp} from '../../StyleSheet/PointPropType';
33
14
  import type {ViewStyleProp} from '../../StyleSheet/StyleSheet';
34
15
  import type {ColorValue} from '../../StyleSheet/StyleSheet';
35
16
  import type {
17
+ LayoutEvent,
36
18
  PressEvent,
37
19
  ScrollEvent,
38
- LayoutEvent,
39
20
  } from '../../Types/CoreEventTypes';
40
- import type {HostComponent} from '../../Renderer/shims/ReactNativeTypes';
41
- import type {State as ScrollResponderState} from '../ScrollResponder';
21
+ import type {EventSubscription} from '../../vendor/emitter/EventEmitter';
22
+ import type {KeyboardEvent, KeyboardMetrics} from '../Keyboard/Keyboard';
42
23
  import type {ViewProps} from '../View/ViewPropTypes';
43
24
  import type {Props as ScrollViewStickyHeaderProps} from './ScrollViewStickyHeader';
44
25
 
26
+ import AnimatedImplementation from '../../Animated/AnimatedImplementation';
27
+ import FrameRateLogger from '../../Interaction/FrameRateLogger';
28
+ import {findNodeHandle} from '../../ReactNative/RendererProxy';
29
+ import UIManager from '../../ReactNative/UIManager';
30
+ import flattenStyle from '../../StyleSheet/flattenStyle';
31
+ import splitLayoutProps from '../../StyleSheet/splitLayoutProps';
32
+ import StyleSheet from '../../StyleSheet/StyleSheet';
33
+ import Dimensions from '../../Utilities/Dimensions';
34
+ import dismissKeyboard from '../../Utilities/dismissKeyboard';
35
+ import Platform from '../../Utilities/Platform';
36
+ import Keyboard from '../Keyboard/Keyboard';
37
+ import TextInputState from '../TextInput/TextInputState';
38
+ import View from '../View/View';
39
+ import AndroidHorizontalScrollContentViewNativeComponent from './AndroidHorizontalScrollContentViewNativeComponent';
40
+ import AndroidHorizontalScrollViewNativeComponent from './AndroidHorizontalScrollViewNativeComponent';
41
+ import processDecelerationRate from './processDecelerationRate';
42
+ import ScrollContentViewNativeComponent from './ScrollContentViewNativeComponent';
43
+ import Commands from './ScrollViewCommands';
45
44
  import ScrollViewContext, {HORIZONTAL, VERTICAL} from './ScrollViewContext';
46
45
  import ScrollViewNativeComponent from './ScrollViewNativeComponent';
47
- import ScrollContentViewNativeComponent from './ScrollContentViewNativeComponent';
48
- import AndroidHorizontalScrollViewNativeComponent from './AndroidHorizontalScrollViewNativeComponent';
49
- import AndroidHorizontalScrollContentViewNativeComponent from './AndroidHorizontalScrollContentViewNativeComponent';
46
+ import ScrollViewStickyHeader from './ScrollViewStickyHeader';
47
+ import invariant from 'invariant';
48
+ import memoize from 'memoize-one';
49
+ import nullthrows from 'nullthrows';
50
+ import * as React from 'react';
50
51
 
51
- let AndroidScrollView;
52
- let AndroidHorizontalScrollContentView;
53
- let AndroidHorizontalScrollView;
54
- let RCTScrollView;
55
- let RCTScrollContentView;
56
-
57
- if (Platform.OS === 'android') {
58
- AndroidScrollView = ScrollViewNativeComponent;
59
- AndroidHorizontalScrollView = AndroidHorizontalScrollViewNativeComponent;
60
- AndroidHorizontalScrollContentView = AndroidHorizontalScrollContentViewNativeComponent;
61
- } else {
62
- RCTScrollView = ScrollViewNativeComponent;
63
- RCTScrollContentView = ScrollContentViewNativeComponent;
52
+ if (Platform.OS === 'ios') {
53
+ require('../../Renderer/shims/ReactNative'); // Force side effects to prevent T55744311
64
54
  }
65
55
 
56
+ const {NativeHorizontalScrollViewTuple, NativeVerticalScrollViewTuple} =
57
+ Platform.OS === 'android'
58
+ ? {
59
+ NativeHorizontalScrollViewTuple: [
60
+ AndroidHorizontalScrollViewNativeComponent,
61
+ AndroidHorizontalScrollContentViewNativeComponent,
62
+ ],
63
+ NativeVerticalScrollViewTuple: [ScrollViewNativeComponent, View],
64
+ }
65
+ : {
66
+ NativeHorizontalScrollViewTuple: [
67
+ ScrollViewNativeComponent,
68
+ ScrollContentViewNativeComponent,
69
+ ],
70
+ NativeVerticalScrollViewTuple: [
71
+ ScrollViewNativeComponent,
72
+ ScrollContentViewNativeComponent,
73
+ ],
74
+ };
75
+
76
+ /*
77
+ * iOS scroll event timing nuances:
78
+ * ===============================
79
+ *
80
+ *
81
+ * Scrolling without bouncing, if you touch down:
82
+ * -------------------------------
83
+ *
84
+ * 1. `onMomentumScrollBegin` (when animation begins after letting up)
85
+ * ... physical touch starts ...
86
+ * 2. `onTouchStartCapture` (when you press down to stop the scroll)
87
+ * 3. `onTouchStart` (same, but bubble phase)
88
+ * 4. `onResponderRelease` (when lifting up - you could pause forever before * lifting)
89
+ * 5. `onMomentumScrollEnd`
90
+ *
91
+ *
92
+ * Scrolling with bouncing, if you touch down:
93
+ * -------------------------------
94
+ *
95
+ * 1. `onMomentumScrollBegin` (when animation begins after letting up)
96
+ * ... bounce begins ...
97
+ * ... some time elapses ...
98
+ * ... physical touch during bounce ...
99
+ * 2. `onMomentumScrollEnd` (Makes no sense why this occurs first during bounce)
100
+ * 3. `onTouchStartCapture` (immediately after `onMomentumScrollEnd`)
101
+ * 4. `onTouchStart` (same, but bubble phase)
102
+ * 5. `onTouchEnd` (You could hold the touch start for a long time)
103
+ * 6. `onMomentumScrollBegin` (When releasing the view starts bouncing back)
104
+ *
105
+ * So when we receive an `onTouchStart`, how can we tell if we are touching
106
+ * *during* an animation (which then causes the animation to stop)? The only way
107
+ * to tell is if the `touchStart` occurred immediately after the
108
+ * `onMomentumScrollEnd`.
109
+ *
110
+ * This is abstracted out for you, so you can just call this.scrollResponderIsAnimating() if
111
+ * necessary
112
+ *
113
+ * `ScrollView` also includes logic for blurring a currently focused input
114
+ * if one is focused while scrolling. This is a natural place
115
+ * to put this logic since it can support not dismissing the keyboard while
116
+ * scrolling, unless a recognized "tap"-like gesture has occurred.
117
+ *
118
+ * The public lifecycle API includes events for keyboard interaction, responder
119
+ * interaction, and scrolling (among others). The keyboard callbacks
120
+ * `onKeyboardWill/Did/*` are *global* events, but are invoked on scroll
121
+ * responder's props so that you can guarantee that the scroll responder's
122
+ * internal state has been updated accordingly (and deterministically) by
123
+ * the time the props callbacks are invoke. Otherwise, you would always wonder
124
+ * if the scroll responder is currently in a state where it recognizes new
125
+ * keyboard positions etc. If coordinating scrolling with keyboard movement,
126
+ * *always* use these hooks instead of listening to your own global keyboard
127
+ * events.
128
+ *
129
+ * Public keyboard lifecycle API: (props callbacks)
130
+ *
131
+ * Standard Keyboard Appearance Sequence:
132
+ *
133
+ * this.props.onKeyboardWillShow
134
+ * this.props.onKeyboardDidShow
135
+ *
136
+ * `onScrollResponderKeyboardDismissed` will be invoked if an appropriate
137
+ * tap inside the scroll responder's scrollable region was responsible
138
+ * for the dismissal of the keyboard. There are other reasons why the
139
+ * keyboard could be dismissed.
140
+ *
141
+ * this.props.onScrollResponderKeyboardDismissed
142
+ *
143
+ * Standard Keyboard Hide Sequence:
144
+ *
145
+ * this.props.onKeyboardWillHide
146
+ * this.props.onKeyboardDidHide
147
+ */
148
+
66
149
  // Public methods for ScrollView
67
150
  export type ScrollViewImperativeMethods = $ReadOnly<{|
68
151
  getScrollResponder: $PropertyType<ScrollView, 'getScrollResponder'>,
@@ -73,20 +156,24 @@ export type ScrollViewImperativeMethods = $ReadOnly<{|
73
156
  scrollTo: $PropertyType<ScrollView, 'scrollTo'>,
74
157
  scrollToEnd: $PropertyType<ScrollView, 'scrollToEnd'>,
75
158
  flashScrollIndicators: $PropertyType<ScrollView, 'flashScrollIndicators'>,
76
-
77
- // ScrollResponder.Mixin public methods
78
- scrollResponderZoomTo: $PropertyType<
79
- typeof ScrollResponder.Mixin,
80
- 'scrollResponderZoomTo',
81
- >,
159
+ scrollResponderZoomTo: $PropertyType<ScrollView, 'scrollResponderZoomTo'>,
82
160
  scrollResponderScrollNativeHandleToKeyboard: $PropertyType<
83
- typeof ScrollResponder.Mixin,
161
+ ScrollView,
84
162
  'scrollResponderScrollNativeHandleToKeyboard',
85
163
  >,
86
164
  |}>;
87
165
 
166
+ export type DecelerationRateType = 'fast' | 'normal' | number;
88
167
  export type ScrollResponderType = ScrollViewImperativeMethods;
89
168
 
169
+ type NativeScrollViewInstance = React.ElementRef<HostComponent<mixed>>;
170
+ type PublicScrollViewInstance = $ReadOnly<{|
171
+ ...$Exact<NativeScrollViewInstance>,
172
+ ...ScrollViewImperativeMethods,
173
+ |}>;
174
+
175
+ type InnerViewInstance = React.ElementRef<typeof View>;
176
+
90
177
  type IOSProps = $ReadOnly<{|
91
178
  /**
92
179
  * Controls whether iOS should automatically adjust the content inset
@@ -96,17 +183,23 @@ type IOSProps = $ReadOnly<{|
96
183
  */
97
184
  automaticallyAdjustContentInsets?: ?boolean,
98
185
  /**
99
- * The amount by which the scroll view content is inset from the edges
100
- * of the scroll view. Defaults to `{top: 0, left: 0, bottom: 0, right: 0}`.
186
+ * Controls whether the ScrollView should automatically adjust its `contentInset`
187
+ * and `scrollViewInsets` when the Keyboard changes its size. The default value is false.
101
188
  * @platform ios
102
189
  */
103
- contentInset?: ?EdgeInsetsProp,
190
+ automaticallyAdjustKeyboardInsets?: ?boolean,
104
191
  /**
105
- * Used to manually set the starting scroll offset.
106
- * The default value is `{x: 0, y: 0}`.
192
+ * Controls whether iOS should automatically adjust the scroll indicator
193
+ * insets. The default value is true. Available on iOS 13 and later.
107
194
  * @platform ios
108
195
  */
109
- contentOffset?: ?PointProp,
196
+ automaticallyAdjustsScrollIndicatorInsets?: ?boolean,
197
+ /**
198
+ * The amount by which the scroll view content is inset from the edges
199
+ * of the scroll view. Defaults to `{top: 0, left: 0, bottom: 0, right: 0}`.
200
+ * @platform ios
201
+ */
202
+ contentInset?: ?EdgeInsetsProp,
110
203
  /**
111
204
  * When true, the scroll view bounces when it reaches the end of the
112
205
  * content if the content is larger then the scroll view along the axis of
@@ -173,34 +266,6 @@ type IOSProps = $ReadOnly<{|
173
266
  * @platform ios
174
267
  */
175
268
  canCancelContentTouches?: ?boolean,
176
- /**
177
- * When set, the scroll view will adjust the scroll position so that the first child that is
178
- * currently visible and at or beyond `minIndexForVisible` will not change position. This is
179
- * useful for lists that are loading content in both directions, e.g. a chat thread, where new
180
- * messages coming in might otherwise cause the scroll position to jump. A value of 0 is common,
181
- * but other values such as 1 can be used to skip loading spinners or other content that should
182
- * not maintain position.
183
- *
184
- * The optional `autoscrollToTopThreshold` can be used to make the content automatically scroll
185
- * to the top after making the adjustment if the user was within the threshold of the top before
186
- * the adjustment was made. This is also useful for chat-like applications where you want to see
187
- * new messages scroll into place, but not if the user has scrolled up a ways and it would be
188
- * disruptive to scroll a bunch.
189
- *
190
- * Caveat 1: Reordering elements in the scrollview with this enabled will probably cause
191
- * jumpiness and jank. It can be fixed, but there are currently no plans to do so. For now,
192
- * don't re-order the content of any ScrollViews or Lists that use this feature.
193
- *
194
- * Caveat 2: This simply uses `contentOffset` and `frame.origin` in native code to compute
195
- * visibility. Occlusion, transforms, and other complexity won't be taken into account as to
196
- * whether content is "visible" or not.
197
- *
198
- * @platform ios
199
- */
200
- maintainVisibleContentPosition?: ?$ReadOnly<{|
201
- minIndexForVisible: number,
202
- autoscrollToTopThreshold?: ?number,
203
- |}>,
204
269
  /**
205
270
  * The maximum allowed zoom scale. The default value is 1.0.
206
271
  * @platform ios
@@ -217,24 +282,6 @@ type IOSProps = $ReadOnly<{|
217
282
  * @platform ios
218
283
  */
219
284
  pinchGestureEnabled?: ?boolean,
220
- /**
221
- * This controls how often the scroll event will be fired while scrolling
222
- * (as a time interval in ms). A lower number yields better accuracy for code
223
- * that is tracking the scroll position, but can lead to scroll performance
224
- * problems due to the volume of information being send over the bridge.
225
- *
226
- * Values between 0 and 17ms indicate 60fps updates are needed and throttling
227
- * will be disabled.
228
- *
229
- * If you do not need precise scroll position tracking, set this value higher
230
- * to limit the information being sent across the bridge.
231
- *
232
- * The default value is zero, which results in the scroll event being sent only
233
- * once each time the view is scrolled.
234
- *
235
- * @platform ios
236
- */
237
- scrollEventThrottle?: ?number,
238
285
  /**
239
286
  * The amount by which the scroll view indicators are inset from the edges
240
287
  * of the scroll view. This should normally be set to the same value as
@@ -264,17 +311,6 @@ type IOSProps = $ReadOnly<{|
264
311
  * The default value is true.
265
312
  */
266
313
  showsHorizontalScrollIndicator?: ?boolean,
267
- /**
268
- * When `snapToInterval` is set, `snapToAlignment` will define the relationship
269
- * of the snapping to the scroll view.
270
- *
271
- * - `'start'` (the default) will align the snap at the left (horizontal) or top (vertical)
272
- * - `'center'` will align the snap in the center
273
- * - `'end'` will align the snap at the right (horizontal) or bottom (vertical)
274
- *
275
- * @platform ios
276
- */
277
- snapToAlignment?: ?('start' | 'center' | 'end'),
278
314
  /**
279
315
  * The current scale of the scroll view content. The default value is 1.0.
280
316
  * @platform ios
@@ -338,7 +374,7 @@ type AndroidProps = $ReadOnly<{|
338
374
  */
339
375
  persistentScrollbar?: ?boolean,
340
376
  /**
341
- * Fades out the edges of the the scroll content.
377
+ * Fades out the edges of the scroll content.
342
378
  *
343
379
  * If the value is greater than 0, the fading edges will be set accordingly
344
380
  * to the current scroll direction and position,
@@ -351,32 +387,15 @@ type AndroidProps = $ReadOnly<{|
351
387
  fadingEdgeLength?: ?number,
352
388
  |}>;
353
389
 
354
- type VRProps = $ReadOnly<{|
355
- /**
356
- * Optionally an image can be used for the scroll bar thumb. This will
357
- * override the color. While the image is loading or the image fails to
358
- * load the color will be used instead. Use an alpha of 0 in the color
359
- * to avoid seeing it while the image is loading.
360
- *
361
- * - `uri` - a string representing the resource identifier for the image, which
362
- * should be either a local file path or the name of a static image resource
363
- * - `number` - Opaque type returned by something like
364
- * `import IMAGE from './image.jpg'`.
365
- * @platform vr
366
- */
367
- scrollBarThumbImage?: ?($ReadOnly<{||}> | number), // Opaque type returned by import IMAGE from './image.jpg'
368
- |}>;
369
-
370
390
  type StickyHeaderComponentType = React.AbstractComponent<
371
391
  ScrollViewStickyHeaderProps,
372
- $ReadOnly<{setNextHeaderY: number => void, ...}>,
392
+ $ReadOnly<interface {setNextHeaderY: number => void}>,
373
393
  >;
374
394
 
375
395
  export type Props = $ReadOnly<{|
376
396
  ...ViewProps,
377
397
  ...IOSProps,
378
398
  ...AndroidProps,
379
- ...VRProps,
380
399
 
381
400
  /**
382
401
  * These styles will be applied to the scroll view content container which
@@ -396,6 +415,11 @@ export type Props = $ReadOnly<{|
396
415
  * ```
397
416
  */
398
417
  contentContainerStyle?: ?ViewStyleProp,
418
+ /**
419
+ * Used to manually set the starting scroll offset.
420
+ * The default value is `{x: 0, y: 0}`.
421
+ */
422
+ contentOffset?: ?PointProp,
399
423
  /**
400
424
  * When true, the scroll view stops on the next index (in relation to scroll
401
425
  * position at release) regardless of how fast the gesture is. This can be
@@ -413,7 +437,21 @@ export type Props = $ReadOnly<{|
413
437
  * - `'normal'`: 0.998 on iOS, 0.985 on Android (the default)
414
438
  * - `'fast'`: 0.99 on iOS, 0.9 on Android
415
439
  */
416
- decelerationRate?: ?('fast' | 'normal' | number),
440
+ decelerationRate?: ?DecelerationRateType,
441
+
442
+ /**
443
+ * *Experimental, iOS Only*. The API is experimental and will change in future releases.
444
+ *
445
+ * Controls how much distance is travelled after user stops scrolling.
446
+ * Value greater than 1 will increase the distance travelled.
447
+ * Value less than 1 will decrease the distance travelled.
448
+ *
449
+ * @deprecated
450
+ *
451
+ * The default value is 1.
452
+ */
453
+ experimental_endDraggingSensitivityMultiplier?: ?number,
454
+
417
455
  /**
418
456
  * When true, the scroll view's children are arranged horizontally in a row
419
457
  * instead of vertically in a column. The default value is false.
@@ -439,10 +477,8 @@ export type Props = $ReadOnly<{|
439
477
  * On android this is not supported and it will have the same behavior as 'none'.
440
478
  */
441
479
  keyboardDismissMode?: ?// default
442
- (| 'none' // cross-platform
443
- | 'on-drag'
444
- | 'interactive'
445
- ), // ios only
480
+ // cross-platform
481
+ ('none' | 'on-drag' | 'interactive'), // ios only
446
482
  /**
447
483
  * Determines when the keyboard should stay visible after a tap.
448
484
  *
@@ -456,6 +492,33 @@ export type Props = $ReadOnly<{|
456
492
  * - `true`, deprecated, use 'always' instead
457
493
  */
458
494
  keyboardShouldPersistTaps?: ?('always' | 'never' | 'handled' | true | false),
495
+ /**
496
+ * When set, the scroll view will adjust the scroll position so that the first child that is
497
+ * partially or fully visible and at or beyond `minIndexForVisible` will not change position.
498
+ * This is useful for lists that are loading content in both directions, e.g. a chat thread,
499
+ * where new messages coming in might otherwise cause the scroll position to jump. A value of 0
500
+ * is common, but other values such as 1 can be used to skip loading spinners or other content
501
+ * that should not maintain position.
502
+ *
503
+ * The optional `autoscrollToTopThreshold` can be used to make the content automatically scroll
504
+ * to the top after making the adjustment if the user was within the threshold of the top before
505
+ * the adjustment was made. This is also useful for chat-like applications where you want to see
506
+ * new messages scroll into place, but not if the user has scrolled up a ways and it would be
507
+ * disruptive to scroll a bunch.
508
+ *
509
+ * Caveat 1: Reordering elements in the scrollview with this enabled will probably cause
510
+ * jumpiness and jank. It can be fixed, but there are currently no plans to do so. For now,
511
+ * don't re-order the content of any ScrollViews or Lists that use this feature.
512
+ *
513
+ * Caveat 2: This simply uses `contentOffset` and `frame.origin` in native code to compute
514
+ * visibility. Occlusion, transforms, and other complexity won't be taken into account as to
515
+ * whether content is "visible" or not.
516
+ *
517
+ */
518
+ maintainVisibleContentPosition?: ?$ReadOnly<{|
519
+ minIndexForVisible: number,
520
+ autoscrollToTopThreshold?: ?number,
521
+ |}>,
459
522
  /**
460
523
  * Called when the momentum scroll starts (scroll which occurs as the ScrollView glides to a stop).
461
524
  */
@@ -466,8 +529,7 @@ export type Props = $ReadOnly<{|
466
529
  onMomentumScrollEnd?: ?(event: ScrollEvent) => void,
467
530
 
468
531
  /**
469
- * Fires at most once per frame during scrolling. The frequency of the
470
- * events can be controlled using the `scrollEventThrottle` prop.
532
+ * Fires at most once per frame during scrolling.
471
533
  */
472
534
  onScroll?: ?(event: ScrollEvent) => void,
473
535
  /**
@@ -489,16 +551,16 @@ export type Props = $ReadOnly<{|
489
551
  * which this ScrollView renders.
490
552
  */
491
553
  onContentSizeChange?: (contentWidth: number, contentHeight: number) => void,
492
- onKeyboardDidShow?: (event: PressEvent) => void,
554
+ onKeyboardDidShow?: (event: KeyboardEvent) => void,
555
+ onKeyboardDidHide?: (event: KeyboardEvent) => void,
556
+ onKeyboardWillShow?: (event: KeyboardEvent) => void,
557
+ onKeyboardWillHide?: (event: KeyboardEvent) => void,
493
558
  /**
494
559
  * When true, the scroll view stops on multiples of the scroll view's size
495
560
  * when scrolling. This can be used for horizontal pagination. The default
496
561
  * value is false.
497
- *
498
- * Note: Vertical pagination is not supported on Android.
499
562
  */
500
563
  pagingEnabled?: ?boolean,
501
-
502
564
  /**
503
565
  * When false, the view cannot be scrolled via touch interaction.
504
566
  * The default value is true.
@@ -506,11 +568,23 @@ export type Props = $ReadOnly<{|
506
568
  * Note that the view can always be scrolled by calling `scrollTo`.
507
569
  */
508
570
  scrollEnabled?: ?boolean,
571
+ /**
572
+ * Limits how often scroll events will be fired while scrolling, specified as
573
+ * a time interval in ms. This may be useful when expensive work is performed
574
+ * in response to scrolling. Values <= `16` will disable throttling,
575
+ * regardless of the refresh rate of the device.
576
+ */
577
+ scrollEventThrottle?: ?number,
509
578
  /**
510
579
  * When true, shows a vertical scroll indicator.
511
580
  * The default value is true.
512
581
  */
513
582
  showsVerticalScrollIndicator?: ?boolean,
583
+ /**
584
+ * When true, Sticky header is hidden when scrolling down, and dock at the top
585
+ * when scrolling up
586
+ */
587
+ stickyHeaderHiddenOnScroll?: ?boolean,
514
588
  /**
515
589
  * An array of child indices determining which children get docked to the
516
590
  * top of the screen when scrolling. For example, passing
@@ -526,6 +600,15 @@ export type Props = $ReadOnly<{|
526
600
  * for example when you want your list to have an animated hidable header.
527
601
  */
528
602
  StickyHeaderComponent?: StickyHeaderComponentType,
603
+ /**
604
+ * When `snapToInterval` is set, `snapToAlignment` will define the relationship
605
+ * of the snapping to the scroll view.
606
+ *
607
+ * - `'start'` (the default) will align the snap at the left (horizontal) or top (vertical)
608
+ * - `'center'` will align the snap in the center
609
+ * - `'end'` will align the snap at the right (horizontal) or bottom (vertical)
610
+ */
611
+ snapToAlignment?: ?('start' | 'center' | 'end'),
529
612
  /**
530
613
  * When set, causes the scroll view to stop at multiples of the value of
531
614
  * `snapToInterval`. This can be used for paginating through children
@@ -574,44 +657,30 @@ export type Props = $ReadOnly<{|
574
657
  *
575
658
  * See [RefreshControl](docs/refreshcontrol.html).
576
659
  */
577
- // $FlowFixMe - how to handle generic type without existential operator?
660
+ /* $FlowFixMe[unclear-type] - how to handle generic type without existential
661
+ * operator? */
578
662
  refreshControl?: ?React.Element<any>,
579
663
  children?: React.Node,
580
664
  /**
581
665
  * A ref to the inner View element of the ScrollView. This should be used
582
666
  * instead of calling `getInnerViewRef`.
583
667
  */
584
- innerViewRef?: React.Ref<typeof View>,
668
+ innerViewRef?: ForwardedRef<InnerViewInstance>,
585
669
  /**
586
670
  * A ref to the Native ScrollView component. This ref can be used to call
587
671
  * all of ScrollView's public methods, in addition to native methods like
588
672
  * measure, measureLayout, etc.
589
673
  */
590
- scrollViewRef?: React.Ref<
591
- typeof ScrollViewNativeComponent & ScrollViewImperativeMethods,
592
- >,
674
+ scrollViewRef?: ForwardedRef<PublicScrollViewInstance>,
593
675
  |}>;
594
676
 
595
677
  type State = {|
596
678
  layoutHeight: ?number,
597
- ...ScrollResponderState,
598
679
  |};
599
680
 
600
- function createScrollResponder(
601
- node: React.ElementRef<typeof ScrollView>,
602
- ): typeof ScrollResponder.Mixin {
603
- const scrollResponder = {...ScrollResponder.Mixin};
681
+ const IS_ANIMATING_TOUCH_START_THRESHOLD_MS = 16;
604
682
 
605
- for (const key in scrollResponder) {
606
- if (typeof scrollResponder[key] === 'function') {
607
- scrollResponder[key] = scrollResponder[key].bind(node);
608
- }
609
- }
610
-
611
- return scrollResponder;
612
- }
613
-
614
- type ScrollViewComponentStatics = $ReadOnly<{|
683
+ export type ScrollViewComponentStatics = $ReadOnly<{|
615
684
  Context: typeof ScrollViewContext,
616
685
  |}>;
617
686
 
@@ -631,7 +700,7 @@ type ScrollViewComponentStatics = $ReadOnly<{|
631
700
  * view from becoming the responder.
632
701
  *
633
702
  *
634
- * `<ScrollView>` vs [`<FlatList>`](https://reactnative.dev/docs/flatlist.html) - which one to use?
703
+ * `<ScrollView>` vs [`<FlatList>`](https://reactnative.dev/docs/flatlist) - which one to use?
635
704
  *
636
705
  * `ScrollView` simply renders all its react child components at once. That
637
706
  * makes it very easy to understand and use.
@@ -652,142 +721,116 @@ type ScrollViewComponentStatics = $ReadOnly<{|
652
721
  */
653
722
  class ScrollView extends React.Component<Props, State> {
654
723
  static Context: typeof ScrollViewContext = ScrollViewContext;
655
- /**
656
- * Part 1: Removing ScrollResponder.Mixin:
657
- *
658
- * 1. Mixin methods should be flow typed. That's why we create a
659
- * copy of ScrollResponder.Mixin and attach it to this._scrollResponder.
660
- * Otherwise, we'd have to manually declare each method on the component
661
- * class and assign it a flow type.
662
- * 2. Mixin methods can call component methods, and access the component's
663
- * props and state. So, we need to bind all mixin methods to the
664
- * component instance.
665
- * 3. Continued...
666
- */
667
- _scrollResponder: typeof ScrollResponder.Mixin = createScrollResponder(this);
668
724
 
669
725
  constructor(props: Props) {
670
726
  super(props);
671
727
 
672
- /**
673
- * Part 2: Removing ScrollResponder.Mixin
674
- *
675
- * 3. Mixin methods access other mixin methods via dynamic dispatch using
676
- * this. Since mixin methods are bound to the component instance, we need
677
- * to copy all mixin methods to the component instance. This is also
678
- * necessary because getScrollResponder() is a public method that returns
679
- * an object that can be used to execute all scrollResponder methods.
680
- * Since the object returned from that method is the ScrollView instance,
681
- * we need to bind all mixin methods to the ScrollView instance.
682
- */
683
- for (const key in ScrollResponder.Mixin) {
684
- if (
685
- typeof ScrollResponder.Mixin[key] === 'function' &&
686
- key.startsWith('scrollResponder')
687
- ) {
688
- // $FlowFixMe - dynamically adding properties to a class
689
- (this: any)[key] = ScrollResponder.Mixin[key].bind(this);
690
- }
691
- }
692
-
693
- /**
694
- * Part 3: Removing ScrollResponder.Mixin
695
- *
696
- * 4. Mixins can initialize properties and use properties on the component
697
- * instance.
698
- */
699
- Object.keys(ScrollResponder.Mixin)
700
- .filter(key => typeof ScrollResponder.Mixin[key] !== 'function')
701
- .forEach(key => {
702
- // $FlowFixMe - dynamically adding properties to a class
703
- (this: any)[key] = ScrollResponder.Mixin[key];
704
- });
728
+ this._scrollAnimatedValue = new AnimatedImplementation.Value(
729
+ this.props.contentOffset?.y ?? 0,
730
+ );
731
+ this._scrollAnimatedValue.setOffset(this.props.contentInset?.top ?? 0);
705
732
  }
706
733
 
707
- _scrollAnimatedValue: AnimatedImplementation.Value = new AnimatedImplementation.Value(
708
- 0,
709
- );
734
+ _scrollAnimatedValue: AnimatedImplementation.Value;
710
735
  _scrollAnimatedValueAttachment: ?{detach: () => void, ...} = null;
711
- _stickyHeaderRefs: Map<
712
- string,
713
- React.ElementRef<StickyHeaderComponentType>,
714
- > = new Map();
736
+ _stickyHeaderRefs: Map<string, React.ElementRef<StickyHeaderComponentType>> =
737
+ new Map();
715
738
  _headerLayoutYs: Map<string, number> = new Map();
716
739
 
740
+ _keyboardMetrics: ?KeyboardMetrics = null;
741
+ _additionalScrollOffset: number = 0;
742
+ _isTouching: boolean = false;
743
+ _lastMomentumScrollBeginTime: number = 0;
744
+ _lastMomentumScrollEndTime: number = 0;
745
+
746
+ // Reset to false every time becomes responder. This is used to:
747
+ // - Determine if the scroll view has been scrolled and therefore should
748
+ // refuse to give up its responder lock.
749
+ // - Determine if releasing should dismiss the keyboard when we are in
750
+ // tap-to-dismiss mode (this.props.keyboardShouldPersistTaps !== 'always').
751
+ _observedScrollSinceBecomingResponder: boolean = false;
752
+ _becameResponderWhileAnimating: boolean = false;
753
+ _preventNegativeScrollOffset: ?boolean = null;
754
+
755
+ _animated: ?boolean = null;
756
+
757
+ _subscriptionKeyboardWillShow: ?EventSubscription = null;
758
+ _subscriptionKeyboardWillHide: ?EventSubscription = null;
759
+ _subscriptionKeyboardDidShow: ?EventSubscription = null;
760
+ _subscriptionKeyboardDidHide: ?EventSubscription = null;
761
+
717
762
  state: State = {
718
763
  layoutHeight: null,
719
- ...ScrollResponder.Mixin.scrollResponderMixinGetInitialState(),
720
764
  };
721
765
 
722
- UNSAFE_componentWillMount() {
723
- this._scrollResponder.UNSAFE_componentWillMount();
724
- this._scrollAnimatedValue = new AnimatedImplementation.Value(
725
- this.props.contentOffset?.y ?? 0,
766
+ componentDidMount() {
767
+ if (typeof this.props.keyboardShouldPersistTaps === 'boolean') {
768
+ console.warn(
769
+ `'keyboardShouldPersistTaps={${
770
+ this.props.keyboardShouldPersistTaps === true ? 'true' : 'false'
771
+ }}' is deprecated. ` +
772
+ `Use 'keyboardShouldPersistTaps="${
773
+ this.props.keyboardShouldPersistTaps ? 'always' : 'never'
774
+ }"' instead`,
775
+ );
776
+ }
777
+
778
+ this._keyboardMetrics = Keyboard.metrics();
779
+ this._additionalScrollOffset = 0;
780
+
781
+ this._subscriptionKeyboardWillShow = Keyboard.addListener(
782
+ 'keyboardWillShow',
783
+ this.scrollResponderKeyboardWillShow,
726
784
  );
727
- this._scrollAnimatedValue.setOffset(this.props.contentInset?.top ?? 0);
728
- this._stickyHeaderRefs = new Map();
729
- this._headerLayoutYs = new Map();
785
+ this._subscriptionKeyboardWillHide = Keyboard.addListener(
786
+ 'keyboardWillHide',
787
+ this.scrollResponderKeyboardWillHide,
788
+ );
789
+ this._subscriptionKeyboardDidShow = Keyboard.addListener(
790
+ 'keyboardDidShow',
791
+ this.scrollResponderKeyboardDidShow,
792
+ );
793
+ this._subscriptionKeyboardDidHide = Keyboard.addListener(
794
+ 'keyboardDidHide',
795
+ this.scrollResponderKeyboardDidHide,
796
+ );
797
+
798
+ this._updateAnimatedNodeAttachment();
730
799
  }
731
800
 
732
- UNSAFE_componentWillReceiveProps(nextProps: Props) {
733
- const currentContentInsetTop = this.props.contentInset
734
- ? this.props.contentInset.top
801
+ componentDidUpdate(prevProps: Props) {
802
+ const prevContentInsetTop = prevProps.contentInset
803
+ ? prevProps.contentInset.top
735
804
  : 0;
736
- const nextContentInsetTop = nextProps.contentInset
737
- ? nextProps.contentInset.top
805
+ const newContentInsetTop = this.props.contentInset
806
+ ? this.props.contentInset.top
738
807
  : 0;
739
- if (currentContentInsetTop !== nextContentInsetTop) {
740
- this._scrollAnimatedValue.setOffset(nextContentInsetTop || 0);
808
+ if (prevContentInsetTop !== newContentInsetTop) {
809
+ this._scrollAnimatedValue.setOffset(newContentInsetTop || 0);
741
810
  }
742
- }
743
-
744
- componentDidMount() {
745
- this._updateAnimatedNodeAttachment();
746
- }
747
811
 
748
- componentDidUpdate() {
749
812
  this._updateAnimatedNodeAttachment();
750
813
  }
751
814
 
752
815
  componentWillUnmount() {
753
- this._scrollResponder.componentWillUnmount();
816
+ if (this._subscriptionKeyboardWillShow != null) {
817
+ this._subscriptionKeyboardWillShow.remove();
818
+ }
819
+ if (this._subscriptionKeyboardWillHide != null) {
820
+ this._subscriptionKeyboardWillHide.remove();
821
+ }
822
+ if (this._subscriptionKeyboardDidShow != null) {
823
+ this._subscriptionKeyboardDidShow.remove();
824
+ }
825
+ if (this._subscriptionKeyboardDidHide != null) {
826
+ this._subscriptionKeyboardDidHide.remove();
827
+ }
828
+
754
829
  if (this._scrollAnimatedValueAttachment) {
755
830
  this._scrollAnimatedValueAttachment.detach();
756
831
  }
757
832
  }
758
833
 
759
- _setNativeRef = setAndForwardRef({
760
- getForwardedRef: () => this.props.scrollViewRef,
761
- setLocalRef: ref => {
762
- this._scrollViewRef = ref;
763
-
764
- /*
765
- This is a hack. Ideally we would forwardRef to the underlying
766
- host component. However, since ScrollView has it's own methods that can be
767
- called as well, if we used the standard forwardRef then these
768
- methods wouldn't be accessible and thus be a breaking change.
769
-
770
- Therefore we edit ref to include ScrollView's public methods so that
771
- they are callable from the ref.
772
- */
773
- if (ref) {
774
- ref.getScrollResponder = this.getScrollResponder;
775
- ref.getScrollableNode = this.getScrollableNode;
776
- ref.getInnerViewNode = this.getInnerViewNode;
777
- ref.getInnerViewRef = this.getInnerViewRef;
778
- ref.getNativeScrollRef = this.getNativeScrollRef;
779
- ref.scrollTo = this.scrollTo;
780
- ref.scrollToEnd = this.scrollToEnd;
781
- ref.flashScrollIndicators = this.flashScrollIndicators;
782
-
783
- // $FlowFixMe - This method was manually bound from ScrollResponder.mixin
784
- ref.scrollResponderZoomTo = this.scrollResponderZoomTo;
785
- // $FlowFixMe - This method was manually bound from ScrollResponder.mixin
786
- ref.scrollResponderScrollNativeHandleToKeyboard = this.scrollResponderScrollNativeHandleToKeyboard;
787
- }
788
- },
789
- });
790
-
791
834
  /**
792
835
  * Returns a reference to the underlying scroll responder, which supports
793
836
  * operations like `scrollTo`. All ScrollView-like components should
@@ -795,24 +838,24 @@ class ScrollView extends React.Component<Props, State> {
795
838
  * to the underlying scroll responder's methods.
796
839
  */
797
840
  getScrollResponder: () => ScrollResponderType = () => {
798
- // $FlowFixMe - overriding type to include ScrollResponder.Mixin
841
+ // $FlowFixMe[unclear-type]
799
842
  return ((this: any): ScrollResponderType);
800
843
  };
801
844
 
802
845
  getScrollableNode: () => ?number = () => {
803
- return ReactNative.findNodeHandle(this._scrollViewRef);
846
+ return findNodeHandle(this._scrollView.nativeInstance);
804
847
  };
805
848
 
806
- getInnerViewNode(): ?number {
807
- return ReactNative.findNodeHandle(this._innerViewRef);
808
- }
849
+ getInnerViewNode: () => ?number = () => {
850
+ return findNodeHandle(this._innerView.nativeInstance);
851
+ };
809
852
 
810
- getInnerViewRef(): ?React.ElementRef<typeof View> {
811
- return this._innerViewRef;
812
- }
853
+ getInnerViewRef: () => InnerViewInstance | null = () => {
854
+ return this._innerView.nativeInstance;
855
+ };
813
856
 
814
- getNativeScrollRef: () => ?React.ElementRef<HostComponent<mixed>> = () => {
815
- return this._scrollViewRef;
857
+ getNativeScrollRef: () => NativeScrollViewInstance | null = () => {
858
+ return this._scrollView.nativeInstance;
816
859
  };
817
860
 
818
861
  /**
@@ -863,11 +906,15 @@ class ScrollView extends React.Component<Props, State> {
863
906
  x = options.x;
864
907
  animated = options.animated;
865
908
  }
866
- this._scrollResponder.scrollResponderScrollTo({
867
- x: x || 0,
868
- y: y || 0,
869
- animated: animated !== false,
870
- });
909
+ if (this._scrollView.nativeInstance == null) {
910
+ return;
911
+ }
912
+ Commands.scrollTo(
913
+ this._scrollView.nativeInstance,
914
+ x || 0,
915
+ y || 0,
916
+ animated !== false,
917
+ );
871
918
  };
872
919
 
873
920
  /**
@@ -883,9 +930,10 @@ class ScrollView extends React.Component<Props, State> {
883
930
  ) => {
884
931
  // Default to true
885
932
  const animated = (options && options.animated) !== false;
886
- this._scrollResponder.scrollResponderScrollToEnd({
887
- animated: animated,
888
- });
933
+ if (this._scrollView.nativeInstance == null) {
934
+ return;
935
+ }
936
+ Commands.scrollToEnd(this._scrollView.nativeInstance, animated);
889
937
  };
890
938
 
891
939
  /**
@@ -894,10 +942,157 @@ class ScrollView extends React.Component<Props, State> {
894
942
  * @platform ios
895
943
  */
896
944
  flashScrollIndicators: () => void = () => {
897
- this._scrollResponder.scrollResponderFlashScrollIndicators();
945
+ if (this._scrollView.nativeInstance == null) {
946
+ return;
947
+ }
948
+ Commands.flashScrollIndicators(this._scrollView.nativeInstance);
949
+ };
950
+
951
+ /**
952
+ * This method should be used as the callback to onFocus in a TextInputs'
953
+ * parent view. Note that any module using this mixin needs to return
954
+ * the parent view's ref in getScrollViewRef() in order to use this method.
955
+ * @param {number} nodeHandle The TextInput node handle
956
+ * @param {number} additionalOffset The scroll view's bottom "contentInset".
957
+ * Default is 0.
958
+ * @param {bool} preventNegativeScrolling Whether to allow pulling the content
959
+ * down to make it meet the keyboard's top. Default is false.
960
+ */
961
+ scrollResponderScrollNativeHandleToKeyboard: <T>(
962
+ nodeHandle: number | React.ElementRef<HostComponent<T>>,
963
+ additionalOffset?: number,
964
+ preventNegativeScrollOffset?: boolean,
965
+ ) => void = <T>(
966
+ nodeHandle: number | React.ElementRef<HostComponent<T>>,
967
+ additionalOffset?: number,
968
+ preventNegativeScrollOffset?: boolean,
969
+ ) => {
970
+ this._additionalScrollOffset = additionalOffset || 0;
971
+ this._preventNegativeScrollOffset = !!preventNegativeScrollOffset;
972
+
973
+ if (this._innerView.nativeInstance == null) {
974
+ return;
975
+ }
976
+
977
+ if (typeof nodeHandle === 'number') {
978
+ UIManager.measureLayout(
979
+ nodeHandle,
980
+ nullthrows(findNodeHandle(this)),
981
+ // $FlowFixMe[method-unbinding] added when improving typing for this parameters
982
+ this._textInputFocusError,
983
+ this._inputMeasureAndScrollToKeyboard,
984
+ );
985
+ } else {
986
+ nodeHandle.measureLayout(
987
+ this._innerView.nativeInstance,
988
+ this._inputMeasureAndScrollToKeyboard,
989
+ // $FlowFixMe[method-unbinding] added when improving typing for this parameters
990
+ this._textInputFocusError,
991
+ );
992
+ }
993
+ };
994
+
995
+ /**
996
+ * A helper function to zoom to a specific rect in the scrollview. The argument has the shape
997
+ * {x: number; y: number; width: number; height: number; animated: boolean = true}
998
+ *
999
+ * @platform ios
1000
+ */
1001
+ scrollResponderZoomTo: (
1002
+ rect: {|
1003
+ x: number,
1004
+ y: number,
1005
+ width: number,
1006
+ height: number,
1007
+ animated?: boolean,
1008
+ |},
1009
+ animated?: boolean, // deprecated, put this inside the rect argument instead
1010
+ ) => void = (
1011
+ rect: {|
1012
+ x: number,
1013
+ y: number,
1014
+ width: number,
1015
+ height: number,
1016
+ animated?: boolean,
1017
+ |},
1018
+ animated?: boolean, // deprecated, put this inside the rect argument instead
1019
+ ) => {
1020
+ invariant(Platform.OS === 'ios', 'zoomToRect is not implemented');
1021
+ if ('animated' in rect) {
1022
+ this._animated = rect.animated;
1023
+ delete rect.animated;
1024
+ } else if (typeof animated !== 'undefined') {
1025
+ console.warn(
1026
+ '`scrollResponderZoomTo` `animated` argument is deprecated. Use `options.animated` instead',
1027
+ );
1028
+ }
1029
+
1030
+ if (this._scrollView.nativeInstance == null) {
1031
+ return;
1032
+ }
1033
+ Commands.zoomToRect(
1034
+ this._scrollView.nativeInstance,
1035
+ rect,
1036
+ animated !== false,
1037
+ );
898
1038
  };
899
1039
 
900
- _getKeyForIndex(index, childArray) {
1040
+ _textInputFocusError() {
1041
+ console.warn('Error measuring text field.');
1042
+ }
1043
+
1044
+ /**
1045
+ * The calculations performed here assume the scroll view takes up the entire
1046
+ * screen - even if has some content inset. We then measure the offsets of the
1047
+ * keyboard, and compensate both for the scroll view's "contentInset".
1048
+ *
1049
+ * @param {number} left Position of input w.r.t. table view.
1050
+ * @param {number} top Position of input w.r.t. table view.
1051
+ * @param {number} width Width of the text input.
1052
+ * @param {number} height Height of the text input.
1053
+ */
1054
+ _inputMeasureAndScrollToKeyboard: (
1055
+ left: number,
1056
+ top: number,
1057
+ width: number,
1058
+ height: number,
1059
+ ) => void = (left: number, top: number, width: number, height: number) => {
1060
+ let keyboardScreenY = Dimensions.get('window').height;
1061
+
1062
+ const scrollTextInputIntoVisibleRect = () => {
1063
+ if (this._keyboardMetrics != null) {
1064
+ keyboardScreenY = this._keyboardMetrics.screenY;
1065
+ }
1066
+ let scrollOffsetY =
1067
+ top - keyboardScreenY + height + this._additionalScrollOffset;
1068
+
1069
+ // By default, this can scroll with negative offset, pulling the content
1070
+ // down so that the target component's bottom meets the keyboard's top.
1071
+ // If requested otherwise, cap the offset at 0 minimum to avoid content
1072
+ // shifting down.
1073
+ if (this._preventNegativeScrollOffset === true) {
1074
+ scrollOffsetY = Math.max(0, scrollOffsetY);
1075
+ }
1076
+ this.scrollTo({x: 0, y: scrollOffsetY, animated: true});
1077
+
1078
+ this._additionalScrollOffset = 0;
1079
+ this._preventNegativeScrollOffset = false;
1080
+ };
1081
+
1082
+ if (this._keyboardMetrics == null) {
1083
+ // `_keyboardMetrics` is set inside `scrollResponderKeyboardWillShow` which
1084
+ // is not guaranteed to be called before `_inputMeasureAndScrollToKeyboard` but native has already scheduled it.
1085
+ // In case it was not called before `_inputMeasureAndScrollToKeyboard`, we postpone scrolling to
1086
+ // text input.
1087
+ setTimeout(() => {
1088
+ scrollTextInputIntoVisibleRect();
1089
+ }, 0);
1090
+ } else {
1091
+ scrollTextInputIntoVisibleRect();
1092
+ }
1093
+ };
1094
+
1095
+ _getKeyForIndex(index: $FlowFixMe, childArray: $FlowFixMe): $FlowFixMe {
901
1096
  const child = childArray[index];
902
1097
  return child && child.key;
903
1098
  }
@@ -910,11 +1105,12 @@ class ScrollView extends React.Component<Props, State> {
910
1105
  this.props.stickyHeaderIndices &&
911
1106
  this.props.stickyHeaderIndices.length > 0
912
1107
  ) {
913
- this._scrollAnimatedValueAttachment = AnimatedImplementation.attachNativeEvent(
914
- this._scrollViewRef,
915
- 'onScroll',
916
- [{nativeEvent: {contentOffset: {y: this._scrollAnimatedValue}}}],
917
- );
1108
+ this._scrollAnimatedValueAttachment =
1109
+ AnimatedImplementation.attachNativeEvent(
1110
+ this._scrollView.nativeInstance,
1111
+ 'onScroll',
1112
+ [{nativeEvent: {contentOffset: {y: this._scrollAnimatedValue}}}],
1113
+ );
918
1114
  }
919
1115
  }
920
1116
 
@@ -929,12 +1125,12 @@ class ScrollView extends React.Component<Props, State> {
929
1125
  }
930
1126
  }
931
1127
 
932
- _onStickyHeaderLayout(index, event, key) {
1128
+ _onStickyHeaderLayout(index: $FlowFixMe, event: $FlowFixMe, key: $FlowFixMe) {
933
1129
  const {stickyHeaderIndices} = this.props;
934
1130
  if (!stickyHeaderIndices) {
935
1131
  return;
936
1132
  }
937
- const childArray = React.Children.toArray(this.props.children);
1133
+ const childArray = React.Children.toArray<$FlowFixMe>(this.props.children);
938
1134
  if (key !== this._getKeyForIndex(index, childArray)) {
939
1135
  // ignore stale layout update
940
1136
  return;
@@ -956,30 +1152,8 @@ class ScrollView extends React.Component<Props, State> {
956
1152
  }
957
1153
 
958
1154
  _handleScroll = (e: ScrollEvent) => {
959
- if (__DEV__) {
960
- if (
961
- this.props.onScroll &&
962
- this.props.scrollEventThrottle == null &&
963
- Platform.OS === 'ios'
964
- ) {
965
- console.log(
966
- 'You specified `onScroll` on a <ScrollView> but not ' +
967
- '`scrollEventThrottle`. You will only receive one event. ' +
968
- 'Using `16` you get all the events but be aware that it may ' +
969
- "cause frame drops, use a bigger number if you don't need as " +
970
- 'much precision.',
971
- );
972
- }
973
- }
974
- if (Platform.OS === 'android') {
975
- if (
976
- this.props.keyboardDismissMode === 'on-drag' &&
977
- this.state.isTouching
978
- ) {
979
- dismissKeyboard();
980
- }
981
- }
982
- this._scrollResponder.scrollResponderHandleScroll(e);
1155
+ this._observedScrollSinceBecomingResponder = true;
1156
+ this.props.onScroll && this.props.onScroll(e);
983
1157
  };
984
1158
 
985
1159
  _handleLayout = (e: LayoutEvent) => {
@@ -997,49 +1171,488 @@ class ScrollView extends React.Component<Props, State> {
997
1171
  this.props.onContentSizeChange(width, height);
998
1172
  };
999
1173
 
1000
- _scrollViewRef: ?React.ElementRef<HostComponent<mixed>> = null;
1174
+ _innerView: RefForwarder<InnerViewInstance, InnerViewInstance> =
1175
+ createRefForwarder(
1176
+ (instance: InnerViewInstance): InnerViewInstance => instance,
1177
+ );
1178
+
1179
+ _scrollView: RefForwarder<
1180
+ NativeScrollViewInstance,
1181
+ PublicScrollViewInstance,
1182
+ > = createRefForwarder(
1183
+ (nativeInstance: NativeScrollViewInstance): PublicScrollViewInstance => {
1184
+ // This is a hack. Ideally we would forwardRef to the underlying
1185
+ // host component. However, since ScrollView has it's own methods that can be
1186
+ // called as well, if we used the standard forwardRef then these
1187
+ // methods wouldn't be accessible and thus be a breaking change.
1188
+ //
1189
+ // Therefore we edit ref to include ScrollView's public methods so that
1190
+ // they are callable from the ref.
1191
+
1192
+ // $FlowFixMe[prop-missing] - Known issue with appending custom methods.
1193
+ const publicInstance: PublicScrollViewInstance = Object.assign(
1194
+ nativeInstance,
1195
+ {
1196
+ getScrollResponder: this.getScrollResponder,
1197
+ getScrollableNode: this.getScrollableNode,
1198
+ getInnerViewNode: this.getInnerViewNode,
1199
+ getInnerViewRef: this.getInnerViewRef,
1200
+ getNativeScrollRef: this.getNativeScrollRef,
1201
+ scrollTo: this.scrollTo,
1202
+ scrollToEnd: this.scrollToEnd,
1203
+ flashScrollIndicators: this.flashScrollIndicators,
1204
+ scrollResponderZoomTo: this.scrollResponderZoomTo,
1205
+ scrollResponderScrollNativeHandleToKeyboard:
1206
+ this.scrollResponderScrollNativeHandleToKeyboard,
1207
+ },
1208
+ );
1001
1209
 
1002
- _innerViewRef: ?React.ElementRef<typeof View> = null;
1003
- _setInnerViewRef = setAndForwardRef({
1004
- getForwardedRef: () => this.props.innerViewRef,
1005
- setLocalRef: ref => {
1006
- this._innerViewRef = ref;
1210
+ return publicInstance;
1007
1211
  },
1008
- });
1212
+ );
1009
1213
 
1010
- render(): React.Node | React.Element<string> {
1011
- let ScrollViewClass;
1012
- let ScrollContentContainerViewClass;
1013
- if (Platform.OS === 'android') {
1014
- if (this.props.horizontal === true) {
1015
- ScrollViewClass = AndroidHorizontalScrollView;
1016
- ScrollContentContainerViewClass = AndroidHorizontalScrollContentView;
1017
- } else {
1018
- ScrollViewClass = AndroidScrollView;
1019
- ScrollContentContainerViewClass = View;
1214
+ /**
1215
+ * Warning, this may be called several times for a single keyboard opening.
1216
+ * It's best to store the information in this method and then take any action
1217
+ * at a later point (either in `keyboardDidShow` or other).
1218
+ *
1219
+ * Here's the order that events occur in:
1220
+ * - focus
1221
+ * - willShow {startCoordinates, endCoordinates} several times
1222
+ * - didShow several times
1223
+ * - blur
1224
+ * - willHide {startCoordinates, endCoordinates} several times
1225
+ * - didHide several times
1226
+ *
1227
+ * The `ScrollResponder` module callbacks for each of these events.
1228
+ * Even though any user could have easily listened to keyboard events
1229
+ * themselves, using these `props` callbacks ensures that ordering of events
1230
+ * is consistent - and not dependent on the order that the keyboard events are
1231
+ * subscribed to. This matters when telling the scroll view to scroll to where
1232
+ * the keyboard is headed - the scroll responder better have been notified of
1233
+ * the keyboard destination before being instructed to scroll to where the
1234
+ * keyboard will be. Stick to the `ScrollResponder` callbacks, and everything
1235
+ * will work.
1236
+ *
1237
+ * WARNING: These callbacks will fire even if a keyboard is displayed in a
1238
+ * different navigation pane. Filter out the events to determine if they are
1239
+ * relevant to you. (For example, only if you receive these callbacks after
1240
+ * you had explicitly focused a node etc).
1241
+ */
1242
+
1243
+ scrollResponderKeyboardWillShow: (e: KeyboardEvent) => void = (
1244
+ e: KeyboardEvent,
1245
+ ) => {
1246
+ this._keyboardMetrics = e.endCoordinates;
1247
+ this.props.onKeyboardWillShow && this.props.onKeyboardWillShow(e);
1248
+ };
1249
+
1250
+ scrollResponderKeyboardWillHide: (e: KeyboardEvent) => void = (
1251
+ e: KeyboardEvent,
1252
+ ) => {
1253
+ this._keyboardMetrics = null;
1254
+ this.props.onKeyboardWillHide && this.props.onKeyboardWillHide(e);
1255
+ };
1256
+
1257
+ scrollResponderKeyboardDidShow: (e: KeyboardEvent) => void = (
1258
+ e: KeyboardEvent,
1259
+ ) => {
1260
+ this._keyboardMetrics = e.endCoordinates;
1261
+ this.props.onKeyboardDidShow && this.props.onKeyboardDidShow(e);
1262
+ };
1263
+
1264
+ scrollResponderKeyboardDidHide: (e: KeyboardEvent) => void = (
1265
+ e: KeyboardEvent,
1266
+ ) => {
1267
+ this._keyboardMetrics = null;
1268
+ this.props.onKeyboardDidHide && this.props.onKeyboardDidHide(e);
1269
+ };
1270
+
1271
+ /**
1272
+ * Invoke this from an `onMomentumScrollBegin` event.
1273
+ */
1274
+ _handleMomentumScrollBegin: (e: ScrollEvent) => void = (e: ScrollEvent) => {
1275
+ this._lastMomentumScrollBeginTime = global.performance.now();
1276
+ this.props.onMomentumScrollBegin && this.props.onMomentumScrollBegin(e);
1277
+ };
1278
+
1279
+ /**
1280
+ * Invoke this from an `onMomentumScrollEnd` event.
1281
+ */
1282
+ _handleMomentumScrollEnd: (e: ScrollEvent) => void = (e: ScrollEvent) => {
1283
+ FrameRateLogger.endScroll();
1284
+ this._lastMomentumScrollEndTime = global.performance.now();
1285
+ this.props.onMomentumScrollEnd && this.props.onMomentumScrollEnd(e);
1286
+ };
1287
+
1288
+ /**
1289
+ * Unfortunately, `onScrollBeginDrag` also fires when *stopping* the scroll
1290
+ * animation, and there's not an easy way to distinguish a drag vs. stopping
1291
+ * momentum.
1292
+ *
1293
+ * Invoke this from an `onScrollBeginDrag` event.
1294
+ */
1295
+ _handleScrollBeginDrag: (e: ScrollEvent) => void = (e: ScrollEvent) => {
1296
+ FrameRateLogger.beginScroll(); // TODO: track all scrolls after implementing onScrollEndAnimation
1297
+
1298
+ if (
1299
+ Platform.OS === 'android' &&
1300
+ this.props.keyboardDismissMode === 'on-drag'
1301
+ ) {
1302
+ dismissKeyboard();
1303
+ }
1304
+
1305
+ this.props.onScrollBeginDrag && this.props.onScrollBeginDrag(e);
1306
+ };
1307
+
1308
+ /**
1309
+ * Invoke this from an `onScrollEndDrag` event.
1310
+ */
1311
+ _handleScrollEndDrag: (e: ScrollEvent) => void = (e: ScrollEvent) => {
1312
+ const {velocity} = e.nativeEvent;
1313
+ // - If we are animating, then this is a "drag" that is stopping the scrollview and momentum end
1314
+ // will fire.
1315
+ // - If velocity is non-zero, then the interaction will stop when momentum scroll ends or
1316
+ // another drag starts and ends.
1317
+ // - If we don't get velocity, better to stop the interaction twice than not stop it.
1318
+ if (
1319
+ !this._isAnimating() &&
1320
+ (!velocity || (velocity.x === 0 && velocity.y === 0))
1321
+ ) {
1322
+ FrameRateLogger.endScroll();
1323
+ }
1324
+ this.props.onScrollEndDrag && this.props.onScrollEndDrag(e);
1325
+ };
1326
+
1327
+ /**
1328
+ * A helper function for this class that lets us quickly determine if the
1329
+ * view is currently animating. This is particularly useful to know when
1330
+ * a touch has just started or ended.
1331
+ */
1332
+ _isAnimating: () => boolean = () => {
1333
+ const now = global.performance.now();
1334
+ const timeSinceLastMomentumScrollEnd =
1335
+ now - this._lastMomentumScrollEndTime;
1336
+ const isAnimating =
1337
+ timeSinceLastMomentumScrollEnd < IS_ANIMATING_TOUCH_START_THRESHOLD_MS ||
1338
+ this._lastMomentumScrollEndTime < this._lastMomentumScrollBeginTime;
1339
+ return isAnimating;
1340
+ };
1341
+
1342
+ /**
1343
+ * Invoke this from an `onResponderGrant` event.
1344
+ */
1345
+ _handleResponderGrant: (e: PressEvent) => void = (e: PressEvent) => {
1346
+ this._observedScrollSinceBecomingResponder = false;
1347
+ this.props.onResponderGrant && this.props.onResponderGrant(e);
1348
+ this._becameResponderWhileAnimating = this._isAnimating();
1349
+ };
1350
+
1351
+ /**
1352
+ * Invoke this from an `onResponderReject` event.
1353
+ *
1354
+ * Some other element is not yielding its role as responder. Normally, we'd
1355
+ * just disable the `UIScrollView`, but a touch has already began on it, the
1356
+ * `UIScrollView` will not accept being disabled after that. The easiest
1357
+ * solution for now is to accept the limitation of disallowing this
1358
+ * altogether. To improve this, find a way to disable the `UIScrollView` after
1359
+ * a touch has already started.
1360
+ */
1361
+ _handleResponderReject: () => void = () => {};
1362
+
1363
+ /**
1364
+ * Invoke this from an `onResponderRelease` event.
1365
+ */
1366
+ _handleResponderRelease: (e: PressEvent) => void = (e: PressEvent) => {
1367
+ this._isTouching = e.nativeEvent.touches.length !== 0;
1368
+ this.props.onResponderRelease && this.props.onResponderRelease(e);
1369
+
1370
+ if (typeof e.target === 'number') {
1371
+ if (__DEV__) {
1372
+ console.error(
1373
+ 'Did not expect event target to be a number. Should have been a native component',
1374
+ );
1020
1375
  }
1021
- } else {
1022
- ScrollViewClass = RCTScrollView;
1023
- ScrollContentContainerViewClass = RCTScrollContentView;
1376
+
1377
+ return;
1024
1378
  }
1025
1379
 
1026
- invariant(
1027
- ScrollViewClass !== undefined,
1028
- 'ScrollViewClass must not be undefined',
1029
- );
1380
+ // By default scroll views will unfocus a textField
1381
+ // if another touch occurs outside of it
1382
+ const currentlyFocusedTextInput = TextInputState.currentlyFocusedInput();
1383
+ if (
1384
+ currentlyFocusedTextInput != null &&
1385
+ this.props.keyboardShouldPersistTaps !== true &&
1386
+ this.props.keyboardShouldPersistTaps !== 'always' &&
1387
+ this._keyboardIsDismissible() &&
1388
+ e.target !== currentlyFocusedTextInput &&
1389
+ !this._observedScrollSinceBecomingResponder &&
1390
+ !this._becameResponderWhileAnimating
1391
+ ) {
1392
+ TextInputState.blurTextInput(currentlyFocusedTextInput);
1393
+ }
1394
+ };
1030
1395
 
1031
- invariant(
1032
- ScrollContentContainerViewClass !== undefined,
1033
- 'ScrollContentContainerViewClass must not be undefined',
1034
- );
1396
+ /**
1397
+ * We will allow the scroll view to give up its lock iff it acquired the lock
1398
+ * during an animation. This is a very useful default that happens to satisfy
1399
+ * many common user experiences.
1400
+ *
1401
+ * - Stop a scroll on the left edge, then turn that into an outer view's
1402
+ * backswipe.
1403
+ * - Stop a scroll mid-bounce at the top, continue pulling to have the outer
1404
+ * view dismiss.
1405
+ * - However, without catching the scroll view mid-bounce (while it is
1406
+ * motionless), if you drag far enough for the scroll view to become
1407
+ * responder (and therefore drag the scroll view a bit), any backswipe
1408
+ * navigation of a swipe gesture higher in the view hierarchy, should be
1409
+ * rejected.
1410
+ */
1411
+ _handleResponderTerminationRequest: () => boolean = () => {
1412
+ return !this._observedScrollSinceBecomingResponder;
1413
+ };
1414
+
1415
+ /**
1416
+ * Invoke this from an `onScroll` event.
1417
+ */
1418
+ _handleScrollShouldSetResponder: () => boolean = () => {
1419
+ // Allow any event touch pass through if the default pan responder is disabled
1420
+ if (this.props.disableScrollViewPanResponder === true) {
1421
+ return false;
1422
+ }
1423
+ return this._isTouching;
1424
+ };
1425
+
1426
+ /**
1427
+ * Merely touch starting is not sufficient for a scroll view to become the
1428
+ * responder. Being the "responder" means that the very next touch move/end
1429
+ * event will result in an action/movement.
1430
+ *
1431
+ * Invoke this from an `onStartShouldSetResponder` event.
1432
+ *
1433
+ * `onStartShouldSetResponder` is used when the next move/end will trigger
1434
+ * some UI movement/action, but when you want to yield priority to views
1435
+ * nested inside of the view.
1436
+ *
1437
+ * There may be some cases where scroll views actually should return `true`
1438
+ * from `onStartShouldSetResponder`: Any time we are detecting a standard tap
1439
+ * that gives priority to nested views.
1440
+ *
1441
+ * - If a single tap on the scroll view triggers an action such as
1442
+ * recentering a map style view yet wants to give priority to interaction
1443
+ * views inside (such as dropped pins or labels), then we would return true
1444
+ * from this method when there is a single touch.
1445
+ *
1446
+ * - Similar to the previous case, if a two finger "tap" should trigger a
1447
+ * zoom, we would check the `touches` count, and if `>= 2`, we would return
1448
+ * true.
1449
+ *
1450
+ */
1451
+ _handleStartShouldSetResponder: (e: PressEvent) => boolean = (
1452
+ e: PressEvent,
1453
+ ) => {
1454
+ // Allow any event touch pass through if the default pan responder is disabled
1455
+ if (this.props.disableScrollViewPanResponder === true) {
1456
+ return false;
1457
+ }
1458
+
1459
+ const currentlyFocusedInput = TextInputState.currentlyFocusedInput();
1460
+ if (
1461
+ this.props.keyboardShouldPersistTaps === 'handled' &&
1462
+ this._keyboardIsDismissible() &&
1463
+ e.target !== currentlyFocusedInput
1464
+ ) {
1465
+ return true;
1466
+ }
1467
+ return false;
1468
+ };
1469
+
1470
+ /**
1471
+ * There are times when the scroll view wants to become the responder
1472
+ * (meaning respond to the next immediate `touchStart/touchEnd`), in a way
1473
+ * that *doesn't* give priority to nested views (hence the capture phase):
1474
+ *
1475
+ * - Currently animating.
1476
+ * - Tapping anywhere that is not a text input, while the keyboard is
1477
+ * up (which should dismiss the keyboard).
1478
+ *
1479
+ * Invoke this from an `onStartShouldSetResponderCapture` event.
1480
+ */
1481
+ _handleStartShouldSetResponderCapture: (e: PressEvent) => boolean = (
1482
+ e: PressEvent,
1483
+ ) => {
1484
+ // The scroll view should receive taps instead of its descendants if:
1485
+ // * it is already animating/decelerating
1486
+ if (this._isAnimating()) {
1487
+ return true;
1488
+ }
1489
+
1490
+ // Allow any event touch pass through if the default pan responder is disabled
1491
+ if (this.props.disableScrollViewPanResponder === true) {
1492
+ return false;
1493
+ }
1494
+
1495
+ // * the keyboard is up, keyboardShouldPersistTaps is 'never' (the default),
1496
+ // and a new touch starts with a non-textinput target (in which case the
1497
+ // first tap should be sent to the scroll view and dismiss the keyboard,
1498
+ // then the second tap goes to the actual interior view)
1499
+ const {keyboardShouldPersistTaps} = this.props;
1500
+ const keyboardNeverPersistTaps =
1501
+ !keyboardShouldPersistTaps || keyboardShouldPersistTaps === 'never';
1502
+
1503
+ if (typeof e.target === 'number') {
1504
+ if (__DEV__) {
1505
+ console.error(
1506
+ 'Did not expect event target to be a number. Should have been a native component',
1507
+ );
1508
+ }
1509
+
1510
+ return false;
1511
+ }
1512
+
1513
+ // Let presses through if the soft keyboard is detached from the viewport
1514
+ if (this._softKeyboardIsDetached()) {
1515
+ return false;
1516
+ }
1517
+
1518
+ if (
1519
+ keyboardNeverPersistTaps &&
1520
+ this._keyboardIsDismissible() &&
1521
+ e.target != null &&
1522
+ // $FlowFixMe[incompatible-call]
1523
+ !TextInputState.isTextInput(e.target)
1524
+ ) {
1525
+ return true;
1526
+ }
1527
+
1528
+ return false;
1529
+ };
1530
+
1531
+ /**
1532
+ * Do we consider there to be a dismissible soft-keyboard open?
1533
+ */
1534
+ _keyboardIsDismissible: () => boolean = () => {
1535
+ const currentlyFocusedInput = TextInputState.currentlyFocusedInput();
1536
+
1537
+ // We cannot dismiss the keyboard without an input to blur, even if a soft
1538
+ // keyboard is open (e.g. when keyboard is open due to a native component
1539
+ // not participating in TextInputState). It's also possible that the
1540
+ // currently focused input isn't a TextInput (such as by calling ref.focus
1541
+ // on a non-TextInput).
1542
+ const hasFocusedTextInput =
1543
+ currentlyFocusedInput != null &&
1544
+ TextInputState.isTextInput(currentlyFocusedInput);
1545
+
1546
+ // Even if an input is focused, we may not have a keyboard to dismiss. E.g
1547
+ // when using a physical keyboard. Ensure we have an event for an opened
1548
+ // keyboard.
1549
+ const softKeyboardMayBeOpen =
1550
+ this._keyboardMetrics != null || this._keyboardEventsAreUnreliable();
1551
+
1552
+ return hasFocusedTextInput && softKeyboardMayBeOpen;
1553
+ };
1554
+
1555
+ /**
1556
+ * Whether an open soft keyboard is present which does not overlap the
1557
+ * viewport. E.g. for a VR soft-keyboard which is detached from the app
1558
+ * viewport.
1559
+ */
1560
+ _softKeyboardIsDetached: () => boolean = () => {
1561
+ return this._keyboardMetrics != null && this._keyboardMetrics.height === 0;
1562
+ };
1563
+
1564
+ _keyboardEventsAreUnreliable: () => boolean = () => {
1565
+ // Android versions prior to API 30 rely on observing layout changes when
1566
+ // `android:windowSoftInputMode` is set to `adjustResize` or `adjustPan`.
1567
+ return Platform.OS === 'android' && Platform.Version < 30;
1568
+ };
1569
+
1570
+ /**
1571
+ * Invoke this from an `onTouchEnd` event.
1572
+ *
1573
+ * @param {PressEvent} e Event.
1574
+ */
1575
+ _handleTouchEnd: (e: PressEvent) => void = (e: PressEvent) => {
1576
+ const nativeEvent = e.nativeEvent;
1577
+ this._isTouching = nativeEvent.touches.length !== 0;
1578
+
1579
+ const {keyboardShouldPersistTaps} = this.props;
1580
+ const keyboardNeverPersistsTaps =
1581
+ !keyboardShouldPersistTaps || keyboardShouldPersistTaps === 'never';
1582
+
1583
+ // Dismiss the keyboard now if we didn't become responder in capture phase
1584
+ // to eat presses, but still want to dismiss on interaction.
1585
+ // Don't do anything if the target of the touch event is the current input.
1586
+ const currentlyFocusedTextInput = TextInputState.currentlyFocusedInput();
1587
+ if (
1588
+ currentlyFocusedTextInput != null &&
1589
+ e.target !== currentlyFocusedTextInput &&
1590
+ this._softKeyboardIsDetached() &&
1591
+ this._keyboardIsDismissible() &&
1592
+ keyboardNeverPersistsTaps
1593
+ ) {
1594
+ TextInputState.blurTextInput(currentlyFocusedTextInput);
1595
+ }
1596
+
1597
+ this.props.onTouchEnd && this.props.onTouchEnd(e);
1598
+ };
1599
+
1600
+ /**
1601
+ * Invoke this from an `onTouchCancel` event.
1602
+ *
1603
+ * @param {PressEvent} e Event.
1604
+ */
1605
+ _handleTouchCancel: (e: PressEvent) => void = (e: PressEvent) => {
1606
+ this._isTouching = false;
1607
+ this.props.onTouchCancel && this.props.onTouchCancel(e);
1608
+ };
1609
+
1610
+ /**
1611
+ * Invoke this from an `onTouchStart` event.
1612
+ *
1613
+ * Since we know that the `SimpleEventPlugin` occurs later in the plugin
1614
+ * order, after `ResponderEventPlugin`, we can detect that we were *not*
1615
+ * permitted to be the responder (presumably because a contained view became
1616
+ * responder). The `onResponderReject` won't fire in that case - it only
1617
+ * fires when a *current* responder rejects our request.
1618
+ *
1619
+ * @param {PressEvent} e Touch Start event.
1620
+ */
1621
+ _handleTouchStart: (e: PressEvent) => void = (e: PressEvent) => {
1622
+ this._isTouching = true;
1623
+ this.props.onTouchStart && this.props.onTouchStart(e);
1624
+ };
1625
+
1626
+ /**
1627
+ * Invoke this from an `onTouchMove` event.
1628
+ *
1629
+ * Since we know that the `SimpleEventPlugin` occurs later in the plugin
1630
+ * order, after `ResponderEventPlugin`, we can detect that we were *not*
1631
+ * permitted to be the responder (presumably because a contained view became
1632
+ * responder). The `onResponderReject` won't fire in that case - it only
1633
+ * fires when a *current* responder rejects our request.
1634
+ *
1635
+ * @param {PressEvent} e Touch Start event.
1636
+ */
1637
+ _handleTouchMove: (e: PressEvent) => void = (e: PressEvent) => {
1638
+ this.props.onTouchMove && this.props.onTouchMove(e);
1639
+ };
1640
+
1641
+ render(): React.Node | React.Element<string> {
1642
+ const [NativeDirectionalScrollView, NativeDirectionalScrollContentView] =
1643
+ this.props.horizontal === true
1644
+ ? NativeHorizontalScrollViewTuple
1645
+ : NativeVerticalScrollViewTuple;
1035
1646
 
1036
1647
  const contentContainerStyle = [
1037
1648
  this.props.horizontal === true && styles.contentContainerHorizontal,
1038
1649
  this.props.contentContainerStyle,
1039
1650
  ];
1040
1651
  if (__DEV__ && this.props.style !== undefined) {
1652
+ // $FlowFixMe[underconstrained-implicit-instantiation]
1041
1653
  const style = flattenStyle(this.props.style);
1042
1654
  const childLayoutProps = ['alignItems', 'justifyContent'].filter(
1655
+ // $FlowFixMe[incompatible-use]
1043
1656
  prop => style && style[prop] !== undefined,
1044
1657
  );
1045
1658
  invariant(
@@ -1050,20 +1663,23 @@ class ScrollView extends React.Component<Props, State> {
1050
1663
  );
1051
1664
  }
1052
1665
 
1053
- let contentSizeChangeProps = {};
1054
- if (this.props.onContentSizeChange) {
1055
- contentSizeChangeProps = {
1056
- onLayout: this._handleContentOnLayout,
1057
- };
1058
- }
1666
+ const contentSizeChangeProps =
1667
+ this.props.onContentSizeChange == null
1668
+ ? null
1669
+ : {
1670
+ onLayout: this._handleContentOnLayout,
1671
+ };
1059
1672
 
1060
1673
  const {stickyHeaderIndices} = this.props;
1061
1674
  let children = this.props.children;
1675
+ /**
1676
+ * This function can cause unnecessary remount when nested in conditionals as it causes remap of children keys.
1677
+ * https://react.dev/reference/react/Children#children-toarray-caveats
1678
+ */
1679
+ children = React.Children.toArray<$FlowFixMe>(children);
1062
1680
 
1063
1681
  if (stickyHeaderIndices != null && stickyHeaderIndices.length > 0) {
1064
- const childArray = React.Children.toArray(this.props.children);
1065
-
1066
- children = childArray.map((child, index) => {
1682
+ children = children.map((child, index) => {
1067
1683
  const indexOfIndex = child ? stickyHeaderIndices.indexOf(index) : -1;
1068
1684
  if (indexOfIndex > -1) {
1069
1685
  const key = child.key;
@@ -1073,14 +1689,14 @@ class ScrollView extends React.Component<Props, State> {
1073
1689
  return (
1074
1690
  <StickyHeaderComponent
1075
1691
  key={key}
1076
- nativeID={'StickyHeader-' + key} /* TODO: T68258846. */
1077
1692
  ref={ref => this._setStickyHeaderRef(key, ref)}
1078
1693
  nextHeaderLayoutY={this._headerLayoutYs.get(
1079
- this._getKeyForIndex(nextIndex, childArray),
1694
+ this._getKeyForIndex(nextIndex, children),
1080
1695
  )}
1081
1696
  onLayout={event => this._onStickyHeaderLayout(index, event, key)}
1082
1697
  scrollAnimatedValue={this._scrollAnimatedValue}
1083
1698
  inverted={this.props.invertStickyHeaders}
1699
+ hiddenOnScroll={this.props.stickyHeaderHiddenOnScroll}
1084
1700
  scrollViewHeight={this.state.layoutHeight}>
1085
1701
  {child}
1086
1702
  </StickyHeaderComponent>
@@ -1101,12 +1717,9 @@ class ScrollView extends React.Component<Props, State> {
1101
1717
  Array.isArray(stickyHeaderIndices) && stickyHeaderIndices.length > 0;
1102
1718
 
1103
1719
  const contentContainer = (
1104
- /* $FlowFixMe(>=0.112.0 site=react_native_fb) This comment suppresses an
1105
- * error found when Flow v0.112 was deployed. To see the error, delete
1106
- * this comment and run Flow. */
1107
- <ScrollContentContainerViewClass
1720
+ <NativeDirectionalScrollContentView
1108
1721
  {...contentSizeChangeProps}
1109
- ref={this._setInnerViewRef}
1722
+ ref={this._innerView.getForwardingRef(this.props.innerViewRef)}
1110
1723
  style={contentContainerStyle}
1111
1724
  removeClippedSubviews={
1112
1725
  // Subview clipping causes issues with sticky headers on Android and
@@ -1117,7 +1730,7 @@ class ScrollView extends React.Component<Props, State> {
1117
1730
  }
1118
1731
  collapsable={false}>
1119
1732
  {children}
1120
- </ScrollContentContainerViewClass>
1733
+ </NativeDirectionalScrollContentView>
1121
1734
  );
1122
1735
 
1123
1736
  const alwaysBounceHorizontal =
@@ -1134,42 +1747,37 @@ class ScrollView extends React.Component<Props, State> {
1134
1747
  this.props.horizontal === true
1135
1748
  ? styles.baseHorizontal
1136
1749
  : styles.baseVertical;
1750
+
1751
+ const {experimental_endDraggingSensitivityMultiplier, ...otherProps} =
1752
+ this.props;
1137
1753
  const props = {
1138
- ...this.props,
1754
+ ...otherProps,
1139
1755
  alwaysBounceHorizontal,
1140
1756
  alwaysBounceVertical,
1141
- style: [baseStyle, this.props.style],
1757
+ style: StyleSheet.compose(baseStyle, this.props.style),
1142
1758
  // Override the onContentSizeChange from props, since this event can
1143
1759
  // bubble up from TextInputs
1144
1760
  onContentSizeChange: null,
1145
1761
  onLayout: this._handleLayout,
1146
- onMomentumScrollBegin: this._scrollResponder
1147
- .scrollResponderHandleMomentumScrollBegin,
1148
- onMomentumScrollEnd: this._scrollResponder
1149
- .scrollResponderHandleMomentumScrollEnd,
1150
- onResponderGrant: this._scrollResponder
1151
- .scrollResponderHandleResponderGrant,
1152
- onResponderReject: this._scrollResponder
1153
- .scrollResponderHandleResponderReject,
1154
- onResponderRelease: this._scrollResponder
1155
- .scrollResponderHandleResponderRelease,
1156
- onResponderTerminationRequest: this._scrollResponder
1157
- .scrollResponderHandleTerminationRequest,
1158
- onScrollBeginDrag: this._scrollResponder
1159
- .scrollResponderHandleScrollBeginDrag,
1160
- onScrollEndDrag: this._scrollResponder.scrollResponderHandleScrollEndDrag,
1161
- onScrollShouldSetResponder: this._scrollResponder
1162
- .scrollResponderHandleScrollShouldSetResponder,
1163
- onStartShouldSetResponder: this._scrollResponder
1164
- .scrollResponderHandleStartShouldSetResponder,
1165
- onStartShouldSetResponderCapture: this._scrollResponder
1166
- .scrollResponderHandleStartShouldSetResponderCapture,
1167
- onTouchEnd: this._scrollResponder.scrollResponderHandleTouchEnd,
1168
- onTouchMove: this._scrollResponder.scrollResponderHandleTouchMove,
1169
- onTouchStart: this._scrollResponder.scrollResponderHandleTouchStart,
1170
- onTouchCancel: this._scrollResponder.scrollResponderHandleTouchCancel,
1762
+ onMomentumScrollBegin: this._handleMomentumScrollBegin,
1763
+ onMomentumScrollEnd: this._handleMomentumScrollEnd,
1764
+ onResponderGrant: this._handleResponderGrant,
1765
+ onResponderReject: this._handleResponderReject,
1766
+ onResponderRelease: this._handleResponderRelease,
1767
+ onResponderTerminationRequest: this._handleResponderTerminationRequest,
1768
+ onScrollBeginDrag: this._handleScrollBeginDrag,
1769
+ onScrollEndDrag: this._handleScrollEndDrag,
1770
+ onScrollShouldSetResponder: this._handleScrollShouldSetResponder,
1771
+ onStartShouldSetResponder: this._handleStartShouldSetResponder,
1772
+ onStartShouldSetResponderCapture:
1773
+ this._handleStartShouldSetResponderCapture,
1774
+ onTouchEnd: this._handleTouchEnd,
1775
+ onTouchMove: this._handleTouchMove,
1776
+ onTouchStart: this._handleTouchStart,
1777
+ onTouchCancel: this._handleTouchCancel,
1171
1778
  onScroll: this._handleScroll,
1172
- scrollBarThumbImage: resolveAssetSource(this.props.scrollBarThumbImage),
1779
+ endDraggingSensitivityMultiplier:
1780
+ experimental_endDraggingSensitivityMultiplier,
1173
1781
  scrollEventThrottle: hasStickyHeaders
1174
1782
  ? 1
1175
1783
  : this.props.scrollEventThrottle,
@@ -1202,18 +1810,18 @@ class ScrollView extends React.Component<Props, State> {
1202
1810
  }
1203
1811
 
1204
1812
  const refreshControl = this.props.refreshControl;
1813
+ const scrollViewRef = this._scrollView.getForwardingRef(
1814
+ this.props.scrollViewRef,
1815
+ );
1205
1816
 
1206
1817
  if (refreshControl) {
1207
1818
  if (Platform.OS === 'ios') {
1208
1819
  // On iOS the RefreshControl is a child of the ScrollView.
1209
1820
  return (
1210
- /* $FlowFixMe(>=0.117.0 site=react_native_fb) This comment suppresses
1211
- * an error found when Flow v0.117 was deployed. To see the error,
1212
- * delete this comment and run Flow. */
1213
- <ScrollViewClass {...props} ref={this._setNativeRef}>
1821
+ <NativeDirectionalScrollView {...props} ref={scrollViewRef}>
1214
1822
  {refreshControl}
1215
1823
  {contentContainer}
1216
- </ScrollViewClass>
1824
+ </NativeDirectionalScrollView>
1217
1825
  );
1218
1826
  } else if (Platform.OS === 'android') {
1219
1827
  // On Android wrap the ScrollView with a AndroidSwipeRefreshLayout.
@@ -1221,23 +1829,25 @@ class ScrollView extends React.Component<Props, State> {
1221
1829
  // AndroidSwipeRefreshLayout and use flex: 1 for the ScrollView.
1222
1830
  // Note: we should split props.style on the inner and outer props
1223
1831
  // however, the ScrollView still needs the baseStyle to be scrollable
1832
+ // $FlowFixMe[underconstrained-implicit-instantiation]
1833
+ // $FlowFixMe[incompatible-call]
1224
1834
  const {outer, inner} = splitLayoutProps(flattenStyle(props.style));
1225
1835
  return React.cloneElement(
1226
1836
  refreshControl,
1227
- {style: [baseStyle, outer]},
1228
- <ScrollViewClass
1837
+ {style: StyleSheet.compose(baseStyle, outer)},
1838
+ <NativeDirectionalScrollView
1229
1839
  {...props}
1230
- style={[baseStyle, inner]}
1231
- ref={this._setNativeRef}>
1840
+ style={StyleSheet.compose(baseStyle, inner)}
1841
+ ref={scrollViewRef}>
1232
1842
  {contentContainer}
1233
- </ScrollViewClass>,
1843
+ </NativeDirectionalScrollView>,
1234
1844
  );
1235
1845
  }
1236
1846
  }
1237
1847
  return (
1238
- <ScrollViewClass {...props} ref={this._setNativeRef}>
1848
+ <NativeDirectionalScrollView {...props} ref={scrollViewRef}>
1239
1849
  {contentContainer}
1240
- </ScrollViewClass>
1850
+ </NativeDirectionalScrollView>
1241
1851
  );
1242
1852
  }
1243
1853
  }
@@ -1260,22 +1870,64 @@ const styles = StyleSheet.create({
1260
1870
  },
1261
1871
  });
1262
1872
 
1263
- function Wrapper(props, ref) {
1873
+ type ForwardedRef<T> = {current: null | T, ...} | ((null | T) => mixed);
1874
+
1875
+ type RefForwarder<TNativeInstance, TPublicInstance> = {
1876
+ getForwardingRef: (
1877
+ ?ForwardedRef<TPublicInstance>,
1878
+ ) => (TNativeInstance | null) => void,
1879
+ nativeInstance: TNativeInstance | null,
1880
+ publicInstance: TPublicInstance | null,
1881
+ };
1882
+
1883
+ /**
1884
+ * Helper function that should be replaced with `useCallback` and `useMergeRefs`
1885
+ * once `ScrollView` is reimplemented as a functional component.
1886
+ */
1887
+ function createRefForwarder<TNativeInstance, TPublicInstance>(
1888
+ mutator: TNativeInstance => TPublicInstance,
1889
+ ): RefForwarder<TNativeInstance, TPublicInstance> {
1890
+ const state: RefForwarder<TNativeInstance, TPublicInstance> = {
1891
+ getForwardingRef: memoize(forwardedRef => {
1892
+ return (nativeInstance: TNativeInstance | null): void => {
1893
+ const publicInstance =
1894
+ nativeInstance == null ? null : mutator(nativeInstance);
1895
+
1896
+ state.nativeInstance = nativeInstance;
1897
+ state.publicInstance = publicInstance;
1898
+
1899
+ if (forwardedRef != null) {
1900
+ if (typeof forwardedRef === 'function') {
1901
+ forwardedRef(publicInstance);
1902
+ } else {
1903
+ forwardedRef.current = publicInstance;
1904
+ }
1905
+ }
1906
+ };
1907
+ }),
1908
+ nativeInstance: null,
1909
+ publicInstance: null,
1910
+ };
1911
+
1912
+ return state;
1913
+ }
1914
+
1915
+ /* $FlowFixMe[missing-local-annot] The type annotation(s) required by Flow's
1916
+ * LTI update could not be added via codemod */
1917
+ function Wrapper(props, ref: (mixed => mixed) | {current: mixed, ...}) {
1264
1918
  return <ScrollView {...props} scrollViewRef={ref} />;
1265
1919
  }
1266
1920
  Wrapper.displayName = 'ScrollView';
1921
+ // $FlowFixMe[incompatible-call]
1267
1922
  const ForwardedScrollView = React.forwardRef(Wrapper);
1268
1923
 
1269
- // $FlowFixMe Add static context to ForwardedScrollView
1924
+ // $FlowFixMe[prop-missing] Add static context to ForwardedScrollView
1270
1925
  ForwardedScrollView.Context = ScrollViewContext;
1271
1926
 
1272
1927
  ForwardedScrollView.displayName = 'ScrollView';
1273
1928
 
1274
1929
  module.exports = ((ForwardedScrollView: $FlowFixMe): React.AbstractComponent<
1275
1930
  React.ElementConfig<typeof ScrollView>,
1276
- $ReadOnly<{|
1277
- ...$Exact<React.ElementRef<HostComponent<mixed>>>,
1278
- ...ScrollViewImperativeMethods,
1279
- |}>,
1931
+ PublicScrollViewInstance,
1280
1932
  > &
1281
1933
  ScrollViewComponentStatics);