@office-iss/react-native-win32 0.71.5 → 0.72.0-preview.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (326) hide show
  1. package/.flowconfig +15 -3
  2. package/CHANGELOG.json +321 -45
  3. package/CHANGELOG.md +149 -26
  4. package/IntegrationTests/IntegrationTestHarnessTest.js +1 -0
  5. package/Libraries/ActionSheetIOS/ActionSheetIOS.js +1 -1
  6. package/Libraries/Alert/Alert.d.ts +4 -4
  7. package/Libraries/Alert/Alert.win32.js +1 -0
  8. package/Libraries/Animated/Animated.d.ts +17 -6
  9. package/Libraries/Animated/NativeAnimatedHelper.js +18 -6
  10. package/Libraries/Animated/NativeAnimatedHelper.win32.js +606 -0
  11. package/Libraries/Animated/bezier.js +1 -1
  12. package/Libraries/Animated/components/AnimatedFlatList.js +8 -3
  13. package/Libraries/Animated/components/AnimatedScrollView.js +4 -1
  14. package/Libraries/Animated/components/AnimatedSectionList.js +12 -3
  15. package/Libraries/Animated/createAnimatedComponent.js +26 -239
  16. package/Libraries/Animated/nodes/AnimatedColor.js +47 -80
  17. package/Libraries/Animated/nodes/AnimatedInterpolation.js +167 -121
  18. package/Libraries/Animated/nodes/AnimatedNode.js +3 -5
  19. package/Libraries/Animated/nodes/AnimatedProps.js +7 -6
  20. package/Libraries/Animated/nodes/AnimatedStyle.js +42 -8
  21. package/Libraries/Animated/nodes/AnimatedTransform.js +1 -1
  22. package/Libraries/Animated/nodes/AnimatedValue.js +8 -12
  23. package/Libraries/Animated/nodes/AnimatedWithChildren.js +1 -1
  24. package/Libraries/Animated/useAnimatedProps.js +7 -10
  25. package/Libraries/BatchedBridge/MessageQueue.js +2 -1
  26. package/Libraries/BatchedBridge/NativeModules.d.ts +1 -1
  27. package/Libraries/BatchedBridge/NativeModules.js +1 -0
  28. package/Libraries/Blob/Blob.js +4 -0
  29. package/Libraries/Blob/FileReader.js +30 -2
  30. package/Libraries/Blob/URL.js +3 -1
  31. package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.d.ts +2 -2
  32. package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.js +2 -3
  33. package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.win32.js +2 -3
  34. package/Libraries/Components/ActivityIndicator/ActivityIndicator.js +6 -4
  35. package/Libraries/Components/Button.js +3 -2
  36. package/Libraries/Components/Button.win32.js +451 -0
  37. package/Libraries/Components/Clipboard/Clipboard.js +1 -1
  38. package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js +4 -0
  39. package/Libraries/Components/Keyboard/KeyboardAvoidingView.js +1 -0
  40. package/Libraries/Components/Pressable/Pressable.d.ts +1 -1
  41. package/Libraries/Components/Pressable/Pressable.js +1 -1
  42. package/Libraries/Components/RefreshControl/RefreshControl.js +1 -0
  43. package/Libraries/Components/SafeAreaView/SafeAreaView.js +1 -2
  44. package/Libraries/Components/SafeAreaView/SafeAreaView.win32.js +1 -2
  45. package/Libraries/Components/ScrollView/AndroidHorizontalScrollViewNativeComponent.js +12 -6
  46. package/Libraries/Components/ScrollView/ScrollView.d.ts +2 -2
  47. package/Libraries/Components/ScrollView/ScrollView.js +149 -91
  48. package/Libraries/Components/ScrollView/ScrollView.win32.js +1939 -0
  49. package/Libraries/Components/ScrollView/ScrollViewNativeComponent.js +16 -6
  50. package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +5 -7
  51. package/Libraries/Components/ScrollView/ScrollViewViewConfig.js +1 -1
  52. package/Libraries/Components/StatusBar/StatusBar.js +3 -0
  53. package/Libraries/Components/Switch/Switch.js +3 -1
  54. package/Libraries/Components/TextInput/AndroidTextInputNativeComponent.js +21 -11
  55. package/Libraries/Components/TextInput/InputAccessoryView.d.ts +1 -1
  56. package/Libraries/Components/TextInput/RCTTextInputViewConfig.js +11 -5
  57. package/Libraries/Components/TextInput/TextInput.Types.win32.d.ts +51 -0
  58. package/Libraries/Components/TextInput/TextInput.Types.win32.js +3 -0
  59. package/Libraries/Components/TextInput/TextInput.Types.win32.js.map +1 -0
  60. package/Libraries/Components/TextInput/TextInput.d.ts +15 -5
  61. package/Libraries/Components/TextInput/TextInput.flow.js +1 -1
  62. package/Libraries/Components/TextInput/TextInput.js +130 -103
  63. package/Libraries/Components/TextInput/TextInput.win32.js +202 -890
  64. package/Libraries/Components/Touchable/Touchable.d.ts +1 -1
  65. package/Libraries/Components/Touchable/Touchable.flow.js +30 -4
  66. package/Libraries/Components/Touchable/Touchable.js +6 -3
  67. package/Libraries/Components/Touchable/Touchable.win32.js +6 -3
  68. package/Libraries/Components/Touchable/TouchableHighlight.js +1 -1
  69. package/Libraries/Components/Touchable/TouchableNativeFeedback.js +2 -2
  70. package/Libraries/Components/Touchable/TouchableOpacity.js +3 -0
  71. package/Libraries/Components/Touchable/TouchableWin32.js.map +1 -1
  72. package/Libraries/Components/Touchable/TouchableWithoutFeedback.d.ts +1 -1
  73. package/Libraries/Components/Touchable/TouchableWithoutFeedback.js +2 -2
  74. package/Libraries/Components/TraceUpdateOverlay/TraceUpdateOverlay.js +179 -0
  75. package/Libraries/Components/TraceUpdateOverlay/TraceUpdateOverlayNativeComponent.js +43 -0
  76. package/Libraries/Components/View/ReactNativeStyleAttributes.js +26 -0
  77. package/Libraries/Components/View/View.js +35 -16
  78. package/Libraries/Components/View/View.win32.js +38 -16
  79. package/Libraries/Components/View/ViewAccessibility.d.ts +6 -6
  80. package/Libraries/Components/View/ViewAccessibility.js +10 -1
  81. package/Libraries/Components/View/ViewAccessibility.win32.d.ts +5 -5
  82. package/Libraries/Components/View/ViewNativeComponent.js +32 -8
  83. package/Libraries/Components/View/ViewPropTypes.d.ts +1 -1
  84. package/Libraries/Components/View/ViewPropTypes.js +1 -1
  85. package/Libraries/Components/View/ViewPropTypes.win32.d.ts +1 -1
  86. package/Libraries/Components/View/ViewPropTypes.win32.js +1 -1
  87. package/Libraries/Components/View/ViewWin32.js +2 -35
  88. package/Libraries/Core/Devtools/openFileInEditor.js +1 -0
  89. package/Libraries/Core/Devtools/openURLInBrowser.js +1 -0
  90. package/Libraries/Core/Devtools/parseErrorStack.js +2 -2
  91. package/Libraries/Core/Devtools/parseHermesStack.js +54 -34
  92. package/Libraries/Core/ExceptionsManager.js +2 -2
  93. package/Libraries/Core/InitializeCore.js +2 -1
  94. package/Libraries/Core/ReactNativeVersion.js +3 -3
  95. package/Libraries/Core/ReactNativeVersionCheck.js +4 -8
  96. package/Libraries/Core/ReactNativeVersionCheck.win32.js +4 -8
  97. package/Libraries/Core/Timers/JSTimers.js +1 -1
  98. package/Libraries/Core/Timers/immediateShim.js +1 -0
  99. package/Libraries/Core/Timers/queueMicrotask.js +1 -1
  100. package/Libraries/Core/setUpAlert.js +1 -1
  101. package/Libraries/Core/setUpDOM.js +18 -0
  102. package/Libraries/Core/setUpDeveloperTools.js +1 -1
  103. package/Libraries/Core/setUpGlobals.js +5 -2
  104. package/Libraries/Core/setUpNavigator.js +6 -5
  105. package/Libraries/Core/setUpPerformance.js +23 -13
  106. package/Libraries/Core/setUpReactDevTools.js +2 -0
  107. package/Libraries/Core/setUpSegmentFetcher.js +0 -41
  108. package/Libraries/Core/setUpTimers.js +2 -2
  109. package/Libraries/DOM/Geometry/DOMRect.js +82 -0
  110. package/Libraries/DOM/Geometry/DOMRectReadOnly.js +188 -0
  111. package/Libraries/DOM/Nodes/ReactNativeElement.js +75 -0
  112. package/Libraries/DOM/Nodes/ReadOnlyElement.js +89 -0
  113. package/Libraries/DOM/Nodes/ReadOnlyNode.js +167 -0
  114. package/Libraries/DOM/OldStyleCollections/ArrayLikeUtils.js +46 -0
  115. package/Libraries/DOM/OldStyleCollections/DOMRectList.js +76 -0
  116. package/Libraries/DOM/OldStyleCollections/HTMLCollection.js +82 -0
  117. package/Libraries/DOM/OldStyleCollections/NodeList.js +104 -0
  118. package/Libraries/DevToolsSettings/DevToolsSettingsManager.android.js +35 -0
  119. package/Libraries/DevToolsSettings/DevToolsSettingsManager.d.ts +20 -0
  120. package/Libraries/DevToolsSettings/DevToolsSettingsManager.ios.js +49 -0
  121. package/Libraries/DevToolsSettings/DevToolsSettingsManager.win32.js +35 -0
  122. package/Libraries/DevToolsSettings/NativeDevToolsSettingsManager.js +24 -0
  123. package/Libraries/EventEmitter/NativeEventEmitter.d.ts +1 -2
  124. package/Libraries/EventEmitter/RCTDeviceEventEmitter.d.ts +1 -2
  125. package/Libraries/EventEmitter/RCTDeviceEventEmitter.js +9 -1
  126. package/Libraries/Events/EventPolyfill.js +1 -1
  127. package/Libraries/Image/AssetRegistry.js +1 -1
  128. package/Libraries/Image/AssetSourceResolver.js +3 -3
  129. package/Libraries/Image/Image.android.js +4 -1
  130. package/Libraries/Image/Image.d.ts +63 -2
  131. package/Libraries/Image/Image.ios.js +3 -0
  132. package/Libraries/Image/Image.win32.js +3 -0
  133. package/Libraries/Image/ImageBackground.js +1 -0
  134. package/Libraries/Image/ImageProps.js +1 -1
  135. package/Libraries/Image/ImageViewNativeComponent.js +4 -4
  136. package/Libraries/Image/RelativeImageStub.js +1 -1
  137. package/Libraries/Image/TextInlineImageNativeComponent.js +1 -1
  138. package/Libraries/Image/resolveAssetSource.js +1 -1
  139. package/Libraries/Inspector/DevtoolsOverlay.js +26 -19
  140. package/Libraries/Inspector/ElementBox.js +4 -1
  141. package/Libraries/Inspector/Inspector.js +5 -6
  142. package/Libraries/Inspector/Inspector.win32.js +7 -6
  143. package/Libraries/Inspector/InspectorOverlay.js +3 -3
  144. package/Libraries/Inspector/InspectorOverlay.win32.js +2 -1
  145. package/Libraries/Inspector/NetworkOverlay.js +1 -1
  146. package/Libraries/Interaction/JSEventLoopWatchdog.js +1 -1
  147. package/Libraries/Interaction/PanResponder.js +5 -6
  148. package/Libraries/LayoutAnimation/LayoutAnimation.js +2 -1
  149. package/Libraries/Linking/Linking.js +1 -4
  150. package/Libraries/Lists/FillRateHelper.js +4 -238
  151. package/Libraries/Lists/FlatList.d.ts +15 -22
  152. package/Libraries/Lists/FlatList.js +9 -6
  153. package/Libraries/Lists/SectionList.d.ts +10 -6
  154. package/Libraries/Lists/SectionList.js +5 -3
  155. package/Libraries/Lists/SectionListModern.js +3 -3
  156. package/Libraries/Lists/ViewabilityHelper.js +8 -344
  157. package/Libraries/Lists/VirtualizeUtils.js +4 -244
  158. package/Libraries/Lists/VirtualizedList.js +10 -1867
  159. package/Libraries/Lists/VirtualizedListContext.js +6 -104
  160. package/Libraries/Lists/VirtualizedSectionList.js +9 -602
  161. package/Libraries/Lists/__flowtests__/FlatList-flowtest.js +1 -0
  162. package/Libraries/Lists/__flowtests__/SectionList-flowtest.js +1 -1
  163. package/Libraries/LogBox/Data/LogBoxData.js +1 -1
  164. package/Libraries/LogBox/Data/parseLogBoxLog.js +1 -1
  165. package/Libraries/LogBox/LogBox.js +1 -1
  166. package/Libraries/LogBox/UI/LogBoxInspector.js +1 -3
  167. package/Libraries/LogBox/UI/LogBoxInspectorCodeFrame.win32.js +168 -0
  168. package/Libraries/LogBox/UI/LogBoxInspectorHeader.win32.js +3 -0
  169. package/Libraries/LogBox/UI/LogBoxInspectorReactFrames.win32.js +193 -0
  170. package/Libraries/LogBox/UI/LogBoxInspectorSourceMapStatus.js +1 -0
  171. package/Libraries/LogBox/UI/LogBoxInspectorStackFrame.js +2 -2
  172. package/Libraries/LogBox/UI/LogBoxInspectorStackFrame.win32.js +7 -3
  173. package/Libraries/LogBox/UI/LogBoxMessage.js +87 -5
  174. package/Libraries/LogBox/UI/LogBoxNotification.js +5 -7
  175. package/Libraries/Modal/Modal.js +2 -2
  176. package/Libraries/NativeComponent/BaseViewConfig.android.js +32 -12
  177. package/Libraries/NativeComponent/BaseViewConfig.ios.js +43 -19
  178. package/Libraries/NativeComponent/BaseViewConfig.win32.js +43 -19
  179. package/Libraries/NativeComponent/NativeComponentRegistryUnstable.js +4 -1
  180. package/Libraries/NativeComponent/ViewConfig.js +1 -0
  181. package/Libraries/NativeComponent/ViewConfigIgnore.js +1 -4
  182. package/Libraries/Network/RCTNetworking.android.js +2 -2
  183. package/Libraries/Network/RCTNetworking.ios.js +1 -1
  184. package/Libraries/Network/RCTNetworking.win32.js +1 -1
  185. package/Libraries/Network/XMLHttpRequest.js +1 -1
  186. package/Libraries/Pressability/Pressability.js +10 -4
  187. package/Libraries/Pressability/Pressability.win32.js +9 -3
  188. package/Libraries/ReactNative/AppContainer.js +7 -1
  189. package/Libraries/ReactNative/AppRegistry.d.ts +1 -1
  190. package/Libraries/ReactNative/AppRegistry.js +10 -13
  191. package/Libraries/ReactNative/FabricUIManager.js +24 -8
  192. package/Libraries/ReactNative/NativeUIManager.js +5 -5
  193. package/Libraries/ReactNative/ReactNativeFeatureFlags.js +10 -10
  194. package/Libraries/ReactNative/UIManager.js +168 -1
  195. package/Libraries/ReactNative/getCachedComponentWithDebugName.js +5 -5
  196. package/Libraries/ReactNative/getNativeComponentAttributes.js +1 -1
  197. package/Libraries/ReactNative/requireNativeComponent.d.ts +1 -1
  198. package/Libraries/ReactNative/requireNativeComponent.js +1 -1
  199. package/Libraries/ReactPrivate/ReactNativePrivateInterface.js +1 -0
  200. package/Libraries/Renderer/implementations/ReactFabric-dev.js +26 -3
  201. package/Libraries/Renderer/implementations/ReactFabric-prod.js +13 -1
  202. package/Libraries/Renderer/implementations/ReactFabric-profiling.js +13 -1
  203. package/Libraries/Renderer/public/ReactFabricPublicInstanceUtils.js +38 -0
  204. package/Libraries/Renderer/shims/ReactNativeTypes.js +6 -6
  205. package/Libraries/Renderer/shims/ReactNativeViewConfigRegistry.js +7 -7
  206. package/Libraries/Renderer/shims/createReactNativeComponentClass.js +2 -2
  207. package/Libraries/Share/Share.js +1 -1
  208. package/Libraries/StyleSheet/PlatformColorValueTypes.ios.js +1 -1
  209. package/Libraries/StyleSheet/StyleSheet.js +1 -1
  210. package/Libraries/StyleSheet/StyleSheet.win32.js +1 -1
  211. package/Libraries/StyleSheet/StyleSheetTypes.d.ts +115 -76
  212. package/Libraries/StyleSheet/StyleSheetTypes.js +188 -33
  213. package/Libraries/StyleSheet/flattenStyle.js +2 -0
  214. package/Libraries/StyleSheet/normalizeColor.js +1 -1
  215. package/Libraries/StyleSheet/processColor.js +1 -1
  216. package/Libraries/Text/Text.d.ts +12 -2
  217. package/Libraries/Text/Text.js +50 -41
  218. package/Libraries/Text/TextProps.js +3 -4
  219. package/Libraries/TurboModule/samples/NativeSampleTurboModule.js +6 -0
  220. package/Libraries/Types/CodegenTypes.js +1 -0
  221. package/Libraries/UTFSequence.js +3 -1
  222. package/Libraries/Utilities/Appearance.d.ts +10 -0
  223. package/Libraries/Utilities/Appearance.js +13 -0
  224. package/Libraries/Utilities/Dimensions.js +1 -1
  225. package/Libraries/Utilities/Dimensions.win32.js +1 -1
  226. package/Libraries/Utilities/GlobalPerformanceLogger.js +12 -1
  227. package/Libraries/Utilities/HMRClient.js +16 -10
  228. package/Libraries/Utilities/{createPerformanceLogger.d.ts → IPerformanceLogger.d.ts} +4 -4
  229. package/Libraries/Utilities/IPerformanceLogger.js +49 -0
  230. package/Libraries/Utilities/LoadingView.android.js +28 -11
  231. package/Libraries/Utilities/NativeAppearance.js +1 -0
  232. package/Libraries/Utilities/NativePlatformConstantsWin.js +1 -1
  233. package/Libraries/Utilities/PixelRatio.js +2 -2
  234. package/Libraries/Utilities/Platform.win32.js +1 -1
  235. package/Libraries/Utilities/ReactNativeTestTools.js +1 -1
  236. package/Libraries/Utilities/__mocks__/PixelRatio.js +1 -1
  237. package/Libraries/Utilities/codegenNativeCommands.js +2 -0
  238. package/Libraries/Utilities/createPerformanceLogger.js +55 -43
  239. package/Libraries/Utilities/stringifySafe.js +2 -7
  240. package/Libraries/Utilities/useColorScheme.win32.js +26 -0
  241. package/Libraries/Utilities/useWindowDimensions.js +3 -3
  242. package/Libraries/WebPerformance/EventCounts.js +78 -0
  243. package/Libraries/WebPerformance/MemoryInfo.js +54 -0
  244. package/Libraries/WebPerformance/NativePerformance.js +38 -0
  245. package/Libraries/WebPerformance/NativePerformanceObserver.js +22 -7
  246. package/Libraries/WebPerformance/Performance.js +312 -0
  247. package/Libraries/WebPerformance/PerformanceEntry.js +45 -0
  248. package/Libraries/WebPerformance/PerformanceEventTiming.js +38 -0
  249. package/Libraries/WebPerformance/PerformanceObserver.js +196 -101
  250. package/Libraries/WebPerformance/RawPerformanceEntry.js +87 -0
  251. package/Libraries/WebPerformance/ReactNativeStartupTiming.js +65 -0
  252. package/Libraries/WebPerformance/__mocks__/NativePerformance.js +65 -0
  253. package/Libraries/WebPerformance/__mocks__/NativePerformanceObserver.js +101 -0
  254. package/Libraries/YellowBox/YellowBoxDeprecated.js +1 -1
  255. package/Libraries/vendor/core/ErrorUtils.js +1 -1
  256. package/Libraries/vendor/emitter/EventEmitter.d.ts +2 -2
  257. package/Libraries/vendor/emitter/EventEmitter.js +9 -1
  258. package/flow/global.js +29 -4
  259. package/flow/jest.js +258 -164
  260. package/flow/use-sync-external-store.js +1 -0
  261. package/index.js +56 -42
  262. package/index.win32.js +56 -42
  263. package/interface.js +1 -1
  264. package/jest/local-setup.js +33 -0
  265. package/jest/mockComponent.js +4 -2
  266. package/jest/mockNativeComponent.js +1 -1
  267. package/jest/mockScrollView.js +2 -1
  268. package/jest/react-native-env.js +1 -3
  269. package/jest/setup.js +11 -8
  270. package/overrides.json +122 -85
  271. package/package.json +40 -30
  272. package/rn-get-polyfills.js +1 -1
  273. package/src/Libraries/Components/TextInput/TextInput.Types.win32.ts +68 -0
  274. package/src/Libraries/Components/Touchable/TouchableWin32.tsx +3 -3
  275. package/src/Libraries/Components/View/ViewAccessibility.win32.d.ts +5 -5
  276. package/src/Libraries/Components/View/ViewPropTypes.win32.d.ts +1 -1
  277. package/types/index.d.ts +2 -6
  278. package/types/modules/Codegen.d.ts +4 -4
  279. package/types/modules/globals.d.ts +27 -25
  280. package/types/public/DeprecatedPropertiesAlias.d.ts +0 -20
  281. package/types/public/ReactNativeRenderer.d.ts +2 -7
  282. package/Libraries/Animated/createAnimatedComponentInjection.js +0 -48
  283. package/Libraries/Animated/createAnimatedComponent_EXPERIMENTAL.js +0 -48
  284. package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.flow.js +0 -208
  285. package/Libraries/Components/ActivityIndicator/ActivityIndicator.flow.js +0 -58
  286. package/Libraries/Components/DatePicker/DatePickerIOS.android.js +0 -47
  287. package/Libraries/Components/DatePicker/DatePickerIOS.d.ts +0 -92
  288. package/Libraries/Components/DatePicker/DatePickerIOS.flow.android.js +0 -14
  289. package/Libraries/Components/DatePicker/DatePickerIOS.flow.ios.js +0 -113
  290. package/Libraries/Components/DatePicker/DatePickerIOS.ios.js +0 -242
  291. package/Libraries/Components/DatePicker/DatePickerIOS.win32.js +0 -47
  292. package/Libraries/Components/DatePicker/RCTDatePickerNativeComponent.js +0 -60
  293. package/Libraries/Components/DatePickerAndroid/NativeDatePickerAndroid.js +0 -26
  294. package/Libraries/Components/ProgressViewIOS/ProgressViewIOS.android.js +0 -45
  295. package/Libraries/Components/ProgressViewIOS/ProgressViewIOS.d.ts +0 -62
  296. package/Libraries/Components/ProgressViewIOS/ProgressViewIOS.ios.js +0 -75
  297. package/Libraries/Components/ProgressViewIOS/ProgressViewIOS.win32.js +0 -45
  298. package/Libraries/Components/ProgressViewIOS/RCTProgressViewNativeComponent.js +0 -33
  299. package/Libraries/Components/SafeAreaView/SafeAreaView.flow.js +0 -19
  300. package/Libraries/Components/Slider/Slider.d.ts +0 -132
  301. package/Libraries/Components/Slider/Slider.js +0 -282
  302. package/Libraries/Components/Slider/SliderNativeComponent.js +0 -56
  303. package/Libraries/Components/TextInput/Win32TextInputNativeComponent.js +0 -23
  304. package/Libraries/Interaction/Batchinator.js +0 -76
  305. package/Libraries/Interaction/BridgeSpyStallHandler.js +0 -63
  306. package/Libraries/Interaction/InteractionStallDebugger.js +0 -23
  307. package/Libraries/Interaction/PanResponder.flow.js +0 -257
  308. package/Libraries/Lists/CellRenderMask.js +0 -155
  309. package/Libraries/Lists/ChildListCollection.js +0 -72
  310. package/Libraries/Lists/StateSafePureComponent.js +0 -85
  311. package/Libraries/Lists/VirtualizedList.d.ts +0 -347
  312. package/Libraries/Lists/VirtualizedListCellRenderer.js +0 -259
  313. package/Libraries/Lists/VirtualizedListProps.js +0 -279
  314. package/Libraries/Performance/PureComponentDebug.js +0 -74
  315. package/Libraries/Reliability/UserFlow.js +0 -158
  316. package/Libraries/Renderer/implementations/ReactNativeRenderer.d.ts +0 -149
  317. package/Libraries/Renderer/shims/ReactNativeTypes.d.ts +0 -141
  318. package/Libraries/Utilities/MatrixMath.js +0 -748
  319. package/Libraries/Utilities/buildStyleInterpolator.js +0 -209
  320. package/Libraries/Utilities/clamp.js +0 -23
  321. package/Libraries/Utilities/deprecatedPropType.js +0 -36
  322. package/Libraries/Utilities/groupByEveryN.js +0 -51
  323. package/Libraries/Utilities/mergeIntoFast.js +0 -26
  324. package/Libraries/Utilities/setAndForwardRef.js +0 -71
  325. package/Libraries/Utilities/truncate.js +0 -51
  326. package/flow/JSITimerInternalType.js +0 -30
@@ -1,158 +0,0 @@
1
- /**
2
- * Copyright (c) Meta Platforms, Inc. and affiliates.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- *
7
- * @format
8
- * @flow strict
9
- */
10
-
11
- 'use strict';
12
-
13
- const AUTO_INSTANCE_KEY = -1;
14
-
15
- export type FlowId = {
16
- markerId: number,
17
- instanceKey: number,
18
- };
19
-
20
- export type PointData = $Shape<{
21
- string: ?{[string]: string, ...},
22
- int: ?{[string]: number, ...},
23
- double: ?{[string]: number, ...},
24
- bool: ?{[string]: boolean, ...},
25
- string_array: ?{[string]: $ReadOnlyArray<string>, ...},
26
- int_array: ?{[string]: $ReadOnlyArray<number>, ...},
27
- double_array: ?{[string]: $ReadOnlyArray<number>, ...},
28
- bool_array: ?{[string]: $ReadOnlyArray<boolean>, ...},
29
- }>;
30
-
31
- /**
32
- * API for tracking reliability of your user interactions
33
- *
34
- * Example:
35
- * const flowId = UserFlow.newFlowId(QuickLogItentifiersExample.EXAMPLE_EVENT);
36
- * ...
37
- * UserFlow.start(flowId, {triggerSource: "user_click", cancelOnBackground: true});
38
- * ...
39
- * UserFlow.addAnnotation(flowId, "cached", "true");
40
- * ...
41
- * UserFlow.addPoint(flowId, "reload");
42
- * ...
43
- * UserFlow.endSuccess(flowId);
44
- */
45
- const UserFlow = {
46
- /**
47
- * Creates FlowId from markerId and instanceKey.
48
- * You will pass FlowId in every other method of UserFlow API.
49
- *
50
- * By default, instanceKey will generate unique instance every time you call userFlowGetId with markerId only.
51
- */
52
- newFlowId(markerId: number, instanceKey: number = AUTO_INSTANCE_KEY): FlowId {
53
- var resolvedInstanceKey = instanceKey;
54
- if (instanceKey === AUTO_INSTANCE_KEY) {
55
- if (global.nativeUserFlowNextInstanceKey) {
56
- resolvedInstanceKey = global.nativeUserFlowNextInstanceKey(markerId);
57
- } else {
58
- // There is no JSI methods installed, API won't do anything
59
- resolvedInstanceKey = 0;
60
- }
61
- }
62
- return {
63
- markerId: markerId,
64
- instanceKey: resolvedInstanceKey,
65
- };
66
- },
67
-
68
- /**
69
- * Starts new flow.
70
- * Example:
71
- * UserFlow.start(flowId, {triggerSource: 'user_click', cancelOnBackground: true})
72
- *
73
- * Specify triggerSource as a place where your flow has started.
74
- * Specify if flow should be automatically cancelled if applicaton goes to background.
75
- * It is recommended to use true for cancelOnBackground - this reduces amount of lost flows due to instrumentation mistakes.
76
- * Only if you know that your flow should survive app backgrounding - use false. This includes cases of tracking cross application interactions.
77
- *
78
- */
79
- start(
80
- flowId: FlowId,
81
- options: {triggerSource: string, cancelOnBackground: boolean},
82
- ): void {
83
- if (global.nativeUserFlowStart) {
84
- global.nativeUserFlowStart(
85
- flowId.markerId,
86
- flowId.instanceKey,
87
- options.triggerSource,
88
- options.cancelOnBackground,
89
- );
90
- }
91
- },
92
-
93
- addAnnotation(
94
- flowId: FlowId,
95
- annotationName: string,
96
- annotationValue: string | boolean,
97
- ): void {
98
- if (global.nativeUserFlowAddAnnotation) {
99
- global.nativeUserFlowAddAnnotation(
100
- flowId.markerId,
101
- flowId.instanceKey,
102
- annotationName,
103
- annotationValue,
104
- );
105
- }
106
- },
107
-
108
- addPoint(flowId: FlowId, pointName: string, data: ?PointData = null): void {
109
- if (global.nativeUserFlowAddPoint) {
110
- global.nativeUserFlowAddPoint(
111
- flowId.markerId,
112
- flowId.instanceKey,
113
- pointName,
114
- data,
115
- );
116
- }
117
- },
118
-
119
- endSuccess(flowId: FlowId): void {
120
- if (global.nativeUserFlowEndSuccess) {
121
- global.nativeUserFlowEndSuccess(flowId.markerId, flowId.instanceKey);
122
- }
123
- },
124
-
125
- /**
126
- * Completes flow as failed
127
- *
128
- * ErrorName should be short and easily categorazable (it is attached as point to the UserFlow and can be used for aggregations).
129
- * For example: io_error, network_error, parse_error, validation_error.
130
- * DebugInfo is free-form string, where you can attach detailed error message. It is attached as data to the point (see ErrorName).
131
- */
132
- endFailure(
133
- flowId: FlowId,
134
- errorName: string,
135
- debugInfo: ?string = null,
136
- ): void {
137
- if (global.nativeUserFlowEndFail) {
138
- global.nativeUserFlowEndFail(
139
- flowId.markerId,
140
- flowId.instanceKey,
141
- errorName,
142
- debugInfo,
143
- );
144
- }
145
- },
146
-
147
- endCancel(flowId: FlowId, cancelReason: string): void {
148
- if (global.nativeUserFlowEndCancel) {
149
- global.nativeUserFlowEndCancel(
150
- flowId.markerId,
151
- flowId.instanceKey,
152
- cancelReason,
153
- );
154
- }
155
- },
156
- };
157
-
158
- module.exports = UserFlow;
@@ -1,149 +0,0 @@
1
- /**
2
- * Copyright (c) Meta Platforms, Inc. and affiliates.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- *
7
- * @format
8
- */
9
-
10
- import {GestureResponderEvent} from '../../Types/CoreEventTypes';
11
-
12
- /**
13
- * Gesture recognition on mobile devices is much more complicated than web.
14
- * A touch can go through several phases as the app determines what the user's intention is.
15
- * For example, the app needs to determine if the touch is scrolling, sliding on a widget, or tapping.
16
- * This can even change during the duration of a touch. There can also be multiple simultaneous touches.
17
- *
18
- * The touch responder system is needed to allow components to negotiate these touch interactions
19
- * without any additional knowledge about their parent or child components.
20
- * This system is implemented in ResponderEventPlugin.js, which contains further details and documentation.
21
- *
22
- * Best Practices
23
- * Users can feel huge differences in the usability of web apps vs. native, and this is one of the big causes.
24
- * Every action should have the following attributes:
25
- * Feedback/highlighting- show the user what is handling their touch, and what will happen when they release the gesture
26
- * Cancel-ability- when making an action, the user should be able to abort it mid-touch by dragging their finger away
27
- *
28
- * These features make users more comfortable while using an app,
29
- * because it allows people to experiment and interact without fear of making mistakes.
30
- *
31
- * TouchableHighlight and Touchable*
32
- * The responder system can be complicated to use.
33
- * So we have provided an abstract Touchable implementation for things that should be "tappable".
34
- * This uses the responder system and allows you to easily configure tap interactions declaratively.
35
- * Use TouchableHighlight anywhere where you would use a button or link on web.
36
- */
37
- export interface GestureResponderHandlers {
38
- /**
39
- * A view can become the touch responder by implementing the correct negotiation methods.
40
- * There are two methods to ask the view if it wants to become responder:
41
- */
42
-
43
- /**
44
- * Does this view want to become responder on the start of a touch?
45
- */
46
- onStartShouldSetResponder?:
47
- | ((event: GestureResponderEvent) => boolean)
48
- | undefined;
49
-
50
- /**
51
- * Called for every touch move on the View when it is not the responder: does this view want to "claim" touch responsiveness?
52
- */
53
- onMoveShouldSetResponder?:
54
- | ((event: GestureResponderEvent) => boolean)
55
- | undefined;
56
-
57
- /**
58
- * If the View returns true and attempts to become the responder, one of the following will happen:
59
- */
60
-
61
- onResponderEnd?: ((event: GestureResponderEvent) => void) | undefined;
62
-
63
- /**
64
- * The View is now responding for touch events.
65
- * This is the time to highlight and show the user what is happening
66
- */
67
- onResponderGrant?: ((event: GestureResponderEvent) => void) | undefined;
68
-
69
- /**
70
- * Something else is the responder right now and will not release it
71
- */
72
- onResponderReject?: ((event: GestureResponderEvent) => void) | undefined;
73
-
74
- /**
75
- * If the view is responding, the following handlers can be called:
76
- */
77
-
78
- /**
79
- * The user is moving their finger
80
- */
81
- onResponderMove?: ((event: GestureResponderEvent) => void) | undefined;
82
-
83
- /**
84
- * Fired at the end of the touch, ie "touchUp"
85
- */
86
- onResponderRelease?: ((event: GestureResponderEvent) => void) | undefined;
87
-
88
- onResponderStart?: ((event: GestureResponderEvent) => void) | undefined;
89
-
90
- /**
91
- * Something else wants to become responder.
92
- * Should this view release the responder? Returning true allows release
93
- */
94
- onResponderTerminationRequest?:
95
- | ((event: GestureResponderEvent) => boolean)
96
- | undefined;
97
-
98
- /**
99
- * The responder has been taken from the View.
100
- * Might be taken by other views after a call to onResponderTerminationRequest,
101
- * or might be taken by the OS without asking (happens with control center/ notification center on iOS)
102
- */
103
- onResponderTerminate?: ((event: GestureResponderEvent) => void) | undefined;
104
-
105
- /**
106
- * onStartShouldSetResponder and onMoveShouldSetResponder are called with a bubbling pattern,
107
- * where the deepest node is called first.
108
- * That means that the deepest component will become responder when multiple Views return true for *ShouldSetResponder handlers.
109
- * This is desirable in most cases, because it makes sure all controls and buttons are usable.
110
- *
111
- * However, sometimes a parent will want to make sure that it becomes responder.
112
- * This can be handled by using the capture phase.
113
- * Before the responder system bubbles up from the deepest component,
114
- * it will do a capture phase, firing on*ShouldSetResponderCapture.
115
- * So if a parent View wants to prevent the child from becoming responder on a touch start,
116
- * it should have a onStartShouldSetResponderCapture handler which returns true.
117
- */
118
- onStartShouldSetResponderCapture?:
119
- | ((event: GestureResponderEvent) => boolean)
120
- | undefined;
121
-
122
- /**
123
- * onStartShouldSetResponder and onMoveShouldSetResponder are called with a bubbling pattern,
124
- * where the deepest node is called first.
125
- * That means that the deepest component will become responder when multiple Views return true for *ShouldSetResponder handlers.
126
- * This is desirable in most cases, because it makes sure all controls and buttons are usable.
127
- *
128
- * However, sometimes a parent will want to make sure that it becomes responder.
129
- * This can be handled by using the capture phase.
130
- * Before the responder system bubbles up from the deepest component,
131
- * it will do a capture phase, firing on*ShouldSetResponderCapture.
132
- * So if a parent View wants to prevent the child from becoming responder on a touch start,
133
- * it should have a onStartShouldSetResponderCapture handler which returns true.
134
- */
135
- onMoveShouldSetResponderCapture?:
136
- | ((event: GestureResponderEvent) => boolean)
137
- | undefined;
138
- }
139
-
140
- /**
141
- * React Native also implements unstable_batchedUpdates
142
- */
143
- export function unstable_batchedUpdates<A, B>(
144
- callback: (a: A, b: B) => any,
145
- a: A,
146
- b: B,
147
- ): void;
148
- export function unstable_batchedUpdates<A>(callback: (a: A) => any, a: A): void;
149
- export function unstable_batchedUpdates(callback: () => any): void;
@@ -1,141 +0,0 @@
1
- /**
2
- * Copyright (c) Meta Platforms, Inc. and affiliates.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- *
7
- * @format
8
- */
9
-
10
- import type * as React from 'react';
11
-
12
- export type MeasureOnSuccessCallback = (
13
- x: number,
14
- y: number,
15
- width: number,
16
- height: number,
17
- pageX: number,
18
- pageY: number,
19
- ) => void;
20
-
21
- export type MeasureInWindowOnSuccessCallback = (
22
- x: number,
23
- y: number,
24
- width: number,
25
- height: number,
26
- ) => void;
27
-
28
- export type MeasureLayoutOnSuccessCallback = (
29
- left: number,
30
- top: number,
31
- width: number,
32
- height: number,
33
- ) => void;
34
-
35
- /**
36
- * NativeMethods provides methods to access the underlying native component directly.
37
- * This can be useful in cases when you want to focus a view or measure its on-screen dimensions,
38
- * for example.
39
- * The methods described here are available on most of the default components provided by React Native.
40
- * Note, however, that they are not available on composite components that aren't directly backed by a
41
- * native view. This will generally include most components that you define in your own app.
42
- * For more information, see [Direct Manipulation](https://reactnative.dev/docs/direct-manipulation).
43
- * @see https://github.com/facebook/react-native/blob/master/Libraries/Renderer/shims/ReactNativeTypes.js#L87
44
- */
45
- export interface NativeMethods {
46
- /**
47
- * Determines the location on screen, width, and height of the given view and
48
- * returns the values via an async callback. If successful, the callback will
49
- * be called with the following arguments:
50
- *
51
- * - x
52
- * - y
53
- * - width
54
- * - height
55
- * - pageX
56
- * - pageY
57
- *
58
- * Note that these measurements are not available until after the rendering
59
- * has been completed in native. If you need the measurements as soon as
60
- * possible, consider using the [`onLayout`
61
- * prop](docs/view.html#onlayout) instead.
62
- */
63
- measure(callback: MeasureOnSuccessCallback): void;
64
-
65
- /**
66
- * Determines the location of the given view in the window and returns the
67
- * values via an async callback. If the React root view is embedded in
68
- * another native view, this will give you the absolute coordinates. If
69
- * successful, the callback will be called with the following
70
- * arguments:
71
- *
72
- * - x
73
- * - y
74
- * - width
75
- * - height
76
- *
77
- * Note that these measurements are not available until after the rendering
78
- * has been completed in native.
79
- */
80
- measureInWindow(callback: MeasureInWindowOnSuccessCallback): void;
81
-
82
- /**
83
- * Like [`measure()`](#measure), but measures the view relative an ancestor,
84
- * specified as `relativeToNativeComponentRef`. This means that the returned x, y
85
- * are relative to the origin x, y of the ancestor view.
86
- * _Can also be called with a relativeNativeNodeHandle but is deprecated._
87
- */
88
- measureLayout(
89
- relativeToNativeComponentRef: HostComponent<unknown> | number,
90
- onSuccess: MeasureLayoutOnSuccessCallback,
91
- onFail: () => void /* currently unused */,
92
- ): void;
93
-
94
- /**
95
- * This function sends props straight to native. They will not participate in
96
- * future diff process - this means that if you do not include them in the
97
- * next render, they will remain active (see [Direct
98
- * Manipulation](https://reactnative.dev/docs/direct-manipulation)).
99
- */
100
- setNativeProps(nativeProps: object): void;
101
-
102
- /**
103
- * Requests focus for the given input or view. The exact behavior triggered
104
- * will depend on the platform and type of view.
105
- */
106
- focus(): void;
107
-
108
- /**
109
- * Removes focus from an input or view. This is the opposite of `focus()`.
110
- */
111
- blur(): void;
112
-
113
- refs: {
114
- [key: string]: React.Component<any, any>;
115
- };
116
- }
117
-
118
- /**
119
- * @deprecated Use NativeMethods instead.
120
- */
121
- export type NativeMethodsMixin = NativeMethods;
122
- /**
123
- * @deprecated Use NativeMethods instead.
124
- */
125
- export type NativeMethodsMixinType = NativeMethods;
126
-
127
- /**
128
- * Represents a native component, such as those returned from `requireNativeComponent`.
129
- *
130
- * @see https://github.com/facebook/react-native/blob/v0.62.0-rc.5/Libraries/Renderer/shims/ReactNativeTypes.js
131
- *
132
- * @todo This should eventually be defined as an AbstractComponent, but that
133
- * should first be introduced in the React typings.
134
- */
135
- export interface HostComponent<P>
136
- extends Pick<
137
- React.ComponentClass<P>,
138
- Exclude<keyof React.ComponentClass<P>, 'new'>
139
- > {
140
- new (props: P, context?: any): React.Component<P> & Readonly<NativeMethods>;
141
- }