@office-iss/react-native-win32 0.72.8 → 0.73.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 (277) hide show
  1. package/.flowconfig +15 -5
  2. package/CHANGELOG.json +530 -101
  3. package/CHANGELOG.md +213 -56
  4. package/IntegrationTests/PromiseTest.js +1 -0
  5. package/IntegrationTests/websocket_integration_test_server.js +1 -1
  6. package/Libraries/Animated/Animated.js +1 -1
  7. package/Libraries/Animated/AnimatedImplementation.js +1 -1
  8. package/Libraries/Animated/NativeAnimatedHelper.js +14 -10
  9. package/Libraries/Animated/NativeAnimatedHelper.win32.js +16 -12
  10. package/Libraries/Animated/NativeAnimatedModule.js +6 -2
  11. package/Libraries/Animated/NativeAnimatedTurboModule.js +7 -4
  12. package/Libraries/Animated/animations/Animation.js +57 -3
  13. package/Libraries/Animated/animations/DecayAnimation.js +9 -0
  14. package/Libraries/Animated/animations/SpringAnimation.js +8 -0
  15. package/Libraries/Animated/animations/TimingAnimation.js +8 -0
  16. package/Libraries/Animated/components/AnimatedFlatList.js +2 -1
  17. package/Libraries/Animated/components/AnimatedScrollView.js +2 -0
  18. package/Libraries/Animated/components/AnimatedSectionList.js +2 -1
  19. package/Libraries/Animated/createAnimatedComponent.js +1 -0
  20. package/Libraries/Animated/nodes/AnimatedColor.js +1 -1
  21. package/Libraries/Animated/nodes/AnimatedObject.js +146 -0
  22. package/Libraries/Animated/nodes/AnimatedProps.js +19 -7
  23. package/Libraries/Animated/nodes/AnimatedStyle.js +29 -55
  24. package/Libraries/Animated/nodes/AnimatedValueXY.js +3 -17
  25. package/Libraries/Animated/shouldUseTurboAnimatedModule.js +17 -0
  26. package/Libraries/Animated/useAnimatedProps.js +9 -10
  27. package/Libraries/AppState/AppState.d.ts +1 -1
  28. package/Libraries/AppState/NativeAppState.js +8 -4
  29. package/Libraries/BatchedBridge/MessageQueue.js +45 -36
  30. package/Libraries/Blob/Blob.js +6 -2
  31. package/Libraries/Blob/BlobManager.js +9 -10
  32. package/Libraries/Blob/BlobRegistry.js +14 -9
  33. package/Libraries/Blob/File.js +1 -1
  34. package/Libraries/Blob/FileReader.js +1 -2
  35. package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.d.ts +1 -5
  36. package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.win32.js +7 -48
  37. package/Libraries/Components/Button/ButtonWin32.Props.d.ts +1 -1
  38. package/Libraries/Components/Button/ButtonWin32.Props.js.map +1 -1
  39. package/Libraries/Components/Button/ButtonWin32.d.ts +1 -1
  40. package/Libraries/Components/Button/ButtonWin32.js +1 -4
  41. package/Libraries/Components/Button/ButtonWin32.js.map +1 -1
  42. package/Libraries/Components/Clipboard/Clipboard.d.ts +4 -4
  43. package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js +3 -1
  44. package/Libraries/Components/EnterString.win32.d.ts +1 -1
  45. package/Libraries/Components/Keyboard/KeyboardAvoidingView.js +26 -6
  46. package/Libraries/Components/Pressable/Pressable.js +3 -2
  47. package/Libraries/Components/Pressable/Pressable.win32.js +4 -3
  48. package/Libraries/Components/Pressable/useAndroidRippleForView.js +1 -1
  49. package/Libraries/Components/SafeAreaView/SafeAreaView.js +7 -7
  50. package/Libraries/Components/SafeAreaView/SafeAreaView.win32.js +7 -8
  51. package/Libraries/Components/ScrollView/ScrollView.js +3 -1
  52. package/Libraries/Components/ScrollView/ScrollView.win32.js +3 -1
  53. package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +39 -46
  54. package/Libraries/Components/Switch/Switch.js +1 -0
  55. package/Libraries/Components/Text/TextWin32.d.ts +1 -1
  56. package/Libraries/Components/TextInput/RCTTextInputViewConfig.js +1 -0
  57. package/Libraries/Components/TextInput/TextInput.d.ts +49 -7
  58. package/Libraries/Components/TextInput/TextInput.flow.js +43 -10
  59. package/Libraries/Components/TextInput/TextInput.js +62 -10
  60. package/Libraries/Components/TextInput/TextInput.win32.js +953 -206
  61. package/Libraries/Components/TextInput/Win32TextInputNativeComponent.js +23 -0
  62. package/Libraries/Components/ToastAndroid/{ToastAndroid.ios.js → ToastAndroid.js} +9 -1
  63. package/Libraries/Components/ToastAndroid/ToastAndroid.win32.js +9 -1
  64. package/Libraries/Components/Touchable/Tests/TouchableWin32Test.js +2 -2
  65. package/Libraries/Components/Touchable/Tests/TouchableWin32Test.js.map +1 -1
  66. package/Libraries/Components/Touchable/TouchableBounce.js +1 -1
  67. package/Libraries/Components/Touchable/TouchableHighlight.js +1 -1
  68. package/Libraries/Components/Touchable/TouchableNativeFeedback.js +1 -1
  69. package/Libraries/Components/Touchable/TouchableOpacity.js +4 -1
  70. package/Libraries/Components/Touchable/TouchableWin32.d.ts +1 -1
  71. package/Libraries/Components/Touchable/TouchableWin32.js.map +1 -1
  72. package/Libraries/Components/Touchable/TouchableWithoutFeedback.js +1 -0
  73. package/Libraries/Components/TraceUpdateOverlay/TraceUpdateOverlay.js +16 -6
  74. package/Libraries/Components/View/ReactNativeStyleAttributes.js +9 -0
  75. package/Libraries/Components/View/ReactNativeViewAttributes.js +1 -0
  76. package/Libraries/Components/View/ReactNativeViewAttributes.win32.js +1 -0
  77. package/Libraries/Components/View/View.js +46 -32
  78. package/Libraries/Components/View/View.win32.js +37 -6
  79. package/Libraries/Components/View/ViewAccessibility.d.ts +8 -2
  80. package/Libraries/Components/View/ViewNativeComponent.js +1 -0
  81. package/Libraries/Components/View/ViewPropTypes.js +18 -3
  82. package/Libraries/Components/View/ViewPropTypes.win32.js +30 -4
  83. package/Libraries/Components/View/ViewWin32.js +3 -2
  84. package/Libraries/Core/Devtools/loadBundleFromServer.js +152 -0
  85. package/Libraries/Core/Devtools/symbolicateStackTrace.js +2 -1
  86. package/Libraries/Core/ExceptionsManager.js +16 -7
  87. package/Libraries/Core/ExtendedError.js +12 -0
  88. package/Libraries/Core/ReactNativeVersion.js +3 -3
  89. package/Libraries/Core/ReactNativeVersionCheck.js +0 -2
  90. package/Libraries/Core/ReactNativeVersionCheck.win32.js +0 -2
  91. package/Libraries/Core/__mocks__/NativeExceptionsManager.js +20 -0
  92. package/Libraries/Core/setUpDeveloperTools.js +5 -1
  93. package/Libraries/Core/setUpIntersectionObserver.js +16 -0
  94. package/Libraries/{Components/ProgressBarAndroid/ProgressBarAndroid.ios.js → Core/setUpMutationObserver.js} +6 -2
  95. package/Libraries/Core/setUpPerformance.js +6 -13
  96. package/Libraries/Core/setUpPerformanceObserver.js +16 -0
  97. package/Libraries/Core/setUpRegeneratorRuntime.js +4 -2
  98. package/Libraries/DOM/Nodes/ReactNativeElement.js +135 -18
  99. package/Libraries/DOM/Nodes/ReadOnlyCharacterData.js +72 -0
  100. package/Libraries/DOM/Nodes/ReadOnlyElement.js +209 -21
  101. package/Libraries/DOM/Nodes/ReadOnlyNode.js +206 -17
  102. package/Libraries/DOM/Nodes/ReadOnlyText.js +30 -0
  103. package/Libraries/DOM/Nodes/Utilities/Traversal.js +54 -0
  104. package/Libraries/EventEmitter/NativeEventEmitter.d.ts +0 -6
  105. package/Libraries/EventEmitter/RCTDeviceEventEmitter.js +15 -4
  106. package/Libraries/Image/Image.android.js +8 -2
  107. package/Libraries/Image/Image.d.ts +1 -1
  108. package/Libraries/Image/Image.ios.js +4 -1
  109. package/Libraries/Image/Image.win32.js +6 -3
  110. package/Libraries/Image/ImageBackground.js +3 -0
  111. package/Libraries/Image/resolveAssetSource.win32.js +1 -1
  112. package/Libraries/Inspector/DevtoolsOverlay.js +6 -3
  113. package/Libraries/Inspector/NetworkOverlay.js +2 -2
  114. package/Libraries/Interaction/JSEventLoopWatchdog.js +1 -5
  115. package/Libraries/Interaction/PanResponder.js +1 -4
  116. package/Libraries/IntersectionObserver/IntersectionObserver.js +252 -0
  117. package/Libraries/IntersectionObserver/IntersectionObserverEntry.js +140 -0
  118. package/Libraries/IntersectionObserver/IntersectionObserverManager.js +221 -0
  119. package/Libraries/IntersectionObserver/NativeIntersectionObserver.js +41 -0
  120. package/Libraries/IntersectionObserver/__mocks__/NativeIntersectionObserver.js +162 -0
  121. package/Libraries/LayoutAnimation/LayoutAnimation.js +1 -1
  122. package/Libraries/Lists/FlatList.d.ts +2 -1
  123. package/Libraries/Lists/FlatList.js +15 -5
  124. package/Libraries/Lists/SectionList.js +4 -0
  125. package/Libraries/LogBox/Data/LogBoxData.js +2 -1
  126. package/Libraries/LogBox/Data/LogBoxLog.js +4 -1
  127. package/Libraries/LogBox/Data/LogBoxSymbolication.js +5 -2
  128. package/Libraries/LogBox/Data/parseLogBoxLog.js +57 -20
  129. package/Libraries/LogBox/UI/AnsiHighlight.js +1 -1
  130. package/Libraries/LogBox/UI/LogBoxInspectorFooter.js +24 -31
  131. package/Libraries/LogBox/UI/LogBoxInspectorHeader.js +1 -1
  132. package/Libraries/LogBox/UI/LogBoxMessage.js +4 -7
  133. package/Libraries/MutationObserver/MutationObserver.js +184 -0
  134. package/Libraries/MutationObserver/MutationObserverManager.js +218 -0
  135. package/Libraries/MutationObserver/MutationRecord.js +82 -0
  136. package/Libraries/MutationObserver/NativeMutationObserver.js +58 -0
  137. package/Libraries/MutationObserver/__mocks__/NativeMutationObserver.js +327 -0
  138. package/Libraries/NativeComponent/BaseViewConfig.android.js +18 -3
  139. package/Libraries/NativeComponent/BaseViewConfig.ios.js +33 -0
  140. package/Libraries/NativeComponent/BaseViewConfig.win32.js +33 -0
  141. package/Libraries/NativeComponent/NativeComponentRegistry.js +13 -9
  142. package/Libraries/NativeModules/specs/NativeSourceCode.js +6 -6
  143. package/Libraries/Network/RCTNetworking.android.js +2 -1
  144. package/Libraries/Network/XMLHttpRequest.js +1 -1
  145. package/Libraries/NewAppScreen/components/DebugInstructions.js +4 -4
  146. package/Libraries/NewAppScreen/components/LearnMoreLinks.js +9 -2
  147. package/Libraries/Performance/QuickPerformanceLogger.js +1 -1
  148. package/Libraries/PermissionsAndroid/NativePermissionsAndroid.js +1 -0
  149. package/Libraries/PermissionsAndroid/PermissionsAndroid.d.ts +1 -0
  150. package/Libraries/PermissionsAndroid/PermissionsAndroid.js +3 -1
  151. package/Libraries/Pressability/Pressability.js +28 -3
  152. package/Libraries/Pressability/Pressability.win32.js +30 -5
  153. package/Libraries/ReactNative/AppContainer.js +2 -3
  154. package/Libraries/ReactNative/AppRegistry.d.ts +0 -5
  155. package/Libraries/ReactNative/AppRegistry.js +66 -53
  156. package/Libraries/ReactNative/BridgelessUIManager.js +38 -9
  157. package/Libraries/ReactNative/FabricUIManager.js +143 -34
  158. package/Libraries/ReactNative/I18nManager.js +5 -11
  159. package/Libraries/ReactNative/NativeI18nManager.js +7 -5
  160. package/Libraries/ReactNative/PaperUIManager.win32.js +2 -2
  161. package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricHostComponent.js +151 -0
  162. package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance.js +81 -0
  163. package/Libraries/ReactNative/ReactFabricPublicInstance/ReactNativeAttributePayload.js +492 -0
  164. package/Libraries/ReactNative/ReactFabricPublicInstance/warnForStyleProps.js +32 -0
  165. package/Libraries/ReactNative/ReactNativeFeatureFlags.js +19 -3
  166. package/Libraries/ReactNative/UIManager.js +8 -0
  167. package/Libraries/ReactNative/__mocks__/FabricUIManager.js +648 -0
  168. package/Libraries/ReactPrivate/ReactNativePrivateInterface.js +38 -2
  169. package/Libraries/Renderer/implementations/ReactFabric-dev.js +27 -27
  170. package/Libraries/Renderer/implementations/ReactFabric-prod.js +3 -3
  171. package/Libraries/Renderer/implementations/ReactFabric-profiling.js +3 -3
  172. package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +27 -27
  173. package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +3 -3
  174. package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js +3 -3
  175. package/Libraries/Renderer/shims/ReactFabric.js +5 -6
  176. package/Libraries/Renderer/shims/ReactFeatureFlags.js +2 -3
  177. package/Libraries/Renderer/shims/ReactNative.js +2 -3
  178. package/Libraries/Renderer/shims/ReactNativeTypes.js +35 -17
  179. package/Libraries/Renderer/shims/ReactNativeViewConfigRegistry.js +3 -3
  180. package/Libraries/Renderer/shims/createReactNativeComponentClass.js +2 -3
  181. package/Libraries/Settings/{Settings.android.js → Settings.js} +4 -4
  182. package/Libraries/Share/Share.d.ts +3 -9
  183. package/Libraries/StyleSheet/PlatformColorValueTypes.android.js +9 -4
  184. package/Libraries/StyleSheet/PlatformColorValueTypes.ios.js +28 -13
  185. package/Libraries/StyleSheet/PlatformColorValueTypes.win32.js +14 -4
  186. package/Libraries/StyleSheet/PlatformColorValueTypesIOS.ios.js +1 -1
  187. package/Libraries/StyleSheet/PlatformColorValueTypesWin32.d.ts +1 -1
  188. package/Libraries/StyleSheet/StyleSheet.d.ts +10 -1
  189. package/Libraries/StyleSheet/StyleSheet.js +3 -0
  190. package/Libraries/StyleSheet/StyleSheet.win32.js +3 -0
  191. package/Libraries/StyleSheet/StyleSheetTypes.d.ts +31 -17
  192. package/Libraries/StyleSheet/StyleSheetTypes.js +90 -6
  193. package/Libraries/StyleSheet/flattenStyle.js +4 -0
  194. package/Libraries/StyleSheet/private/_TransformStyle.js +16 -2
  195. package/Libraries/StyleSheet/processColor.js +1 -2
  196. package/Libraries/StyleSheet/processTransformOrigin.js +136 -0
  197. package/Libraries/StyleSheet/splitLayoutProps.js +1 -0
  198. package/Libraries/Text/Text.d.ts +5 -5
  199. package/Libraries/Text/Text.js +17 -10
  200. package/Libraries/Text/Text.win32.js +354 -0
  201. package/Libraries/Text/TextProps.win32.js +281 -0
  202. package/Libraries/TurboModule/TurboModuleRegistry.js +47 -7
  203. package/Libraries/TurboModule/samples/NativeSampleTurboModule.js +6 -0
  204. package/Libraries/Types/CoreEventTypes.d.ts +5 -2
  205. package/Libraries/Utilities/GlobalPerformanceLogger.js +2 -12
  206. package/Libraries/Utilities/NativeDeviceInfo.js +8 -9
  207. package/Libraries/Utilities/NativePlatformConstantsAndroid.js +23 -18
  208. package/Libraries/Utilities/NativePlatformConstantsIOS.js +16 -13
  209. package/Libraries/Utilities/NativePlatformConstantsWin.js +13 -10
  210. package/Libraries/Utilities/PerformanceLoggerContext.js +1 -1
  211. package/Libraries/Utilities/Platform.android.js +12 -8
  212. package/Libraries/Utilities/Platform.d.ts +1 -0
  213. package/Libraries/Utilities/Platform.flow.js +84 -0
  214. package/Libraries/Utilities/Platform.flow.win32.js +111 -0
  215. package/Libraries/Utilities/Platform.ios.js +12 -8
  216. package/Libraries/Utilities/Platform.win32.js +12 -8
  217. package/Libraries/Utilities/PolyfillFunctions.js +1 -1
  218. package/Libraries/Utilities/ReactNativeTestTools.js +1 -2
  219. package/Libraries/Utilities/SceneTracker.js +1 -1
  220. package/Libraries/Utilities/createPerformanceLogger.js +63 -32
  221. package/Libraries/Utilities/useColorScheme.js +7 -8
  222. package/Libraries/WebPerformance/MemoryInfo.js +1 -1
  223. package/Libraries/WebPerformance/NativePerformance.js +3 -8
  224. package/Libraries/WebPerformance/NativePerformanceObserver.js +4 -0
  225. package/Libraries/WebPerformance/Performance.js +42 -15
  226. package/Libraries/WebPerformance/PerformanceEntry.js +14 -6
  227. package/Libraries/WebPerformance/PerformanceEventTiming.js +18 -1
  228. package/Libraries/WebPerformance/ReactNativeStartupTiming.js +40 -14
  229. package/Libraries/WebPerformance/__mocks__/NativePerformance.js +4 -2
  230. package/Libraries/WebPerformance/__mocks__/NativePerformanceObserver.js +21 -3
  231. package/Libraries/promiseRejectionTrackingOptions.js +21 -9
  232. package/Libraries/vendor/emitter/EventEmitter.js +17 -17
  233. package/flow/global.js +1 -3
  234. package/flow/jest.js +5 -1
  235. package/{Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.ios.js → jest/ReactNativeInternalFeatureFlagsMock.js} +2 -1
  236. package/jest/__tests__/setup-test.js +18 -0
  237. package/jest/mockModal.js +6 -4
  238. package/jest/setup.js +61 -30
  239. package/jest.config.js +1 -1
  240. package/just-task.js +1 -0
  241. package/overrides.json +54 -60
  242. package/package.json +35 -33
  243. package/src/Libraries/Components/Button/ButtonWin32.Props.ts +1 -1
  244. package/src/Libraries/Components/Button/ButtonWin32.tsx +0 -2
  245. package/src/Libraries/Components/Touchable/Tests/TouchableWin32Test.tsx +2 -2
  246. package/src/Libraries/Components/Touchable/TouchableWin32.tsx +1 -1
  247. package/src/Libraries/Components/View/ViewAccessibility.d.ts +8 -2
  248. package/src/Libraries/StyleSheet/PlatformColorValueTypesWin32.d.ts +1 -1
  249. package/types/experimental.d.ts +44 -0
  250. package/types/index.d.ts +2 -1
  251. package/types/modules/Devtools.d.ts +1 -0
  252. package/types/modules/globals.d.ts +16 -1
  253. package/IntegrationTests/BUCK +0 -32
  254. package/IntegrationTests/PropertiesUpdateTest.js +0 -29
  255. package/IntegrationTests/RCTRootViewIntegrationTestApp.js +0 -86
  256. package/IntegrationTests/ReactContentSizeUpdateTest.js +0 -89
  257. package/IntegrationTests/SizeFlexibilityUpdateTest.js +0 -106
  258. package/Libraries/Components/AccessibilityInfo/NativeAccessibilityInfoWin32.js +0 -37
  259. package/Libraries/Components/TextInput/TextInput.Types.win32.d.ts +0 -51
  260. package/Libraries/Components/TextInput/TextInput.Types.win32.js +0 -3
  261. package/Libraries/Components/TextInput/TextInput.Types.win32.js.map +0 -1
  262. package/Libraries/Utilities/AcessibilityMapping.js +0 -154
  263. package/Libraries/Utilities/AcessibilityMapping.win32.js +0 -156
  264. package/Libraries/Utilities/NativeDevSplitBundleLoader.js +0 -19
  265. package/Libraries/Utilities/useColorScheme.win32.js +0 -26
  266. package/flow/use-sync-external-store.js +0 -20
  267. package/flow-typed/npm/base64-js_v1.x.x.js +0 -12
  268. package/flow-typed/npm/glob_v7.x.x.js +0 -79
  269. package/flow-typed/npm/pretty-format_v26.x.x.js +0 -49
  270. package/flow-typed/npm/promise_v8.x.x.js +0 -30
  271. package/flow-typed/npm/react-dom_v17.x.x.js +0 -139
  272. package/flow-typed/npm/react-test-renderer_v16.x.x.js +0 -79
  273. package/flow-typed/npm/stacktrace-parser_v0.1.x.js +0 -17
  274. package/flow-typed/npm/yargs_v17.x.x.js +0 -341
  275. package/src/Libraries/Components/AccessibilityInfo/AccessibilityInfo.d.ts +0 -161
  276. package/src/Libraries/Components/TextInput/TextInput.Types.win32.ts +0 -68
  277. /package/Libraries/{Renderer/public → ReactNative/ReactFabricPublicInstance}/ReactFabricPublicInstanceUtils.js +0 -0
@@ -67,7 +67,7 @@ declare interface WindowOrWorkerGlobalScope {
67
67
  interface Blob {
68
68
  readonly size: number;
69
69
  readonly type: string;
70
- slice(start?: number, end?: number): Blob;
70
+ slice(start?: number, end?: number, contentType?: string): Blob;
71
71
  }
72
72
 
73
73
  interface BlobOptions {
@@ -80,6 +80,20 @@ declare var Blob: {
80
80
  new (blobParts?: Array<Blob | string>, options?: BlobOptions): Blob;
81
81
  };
82
82
 
83
+ interface File extends Blob {
84
+ name: string;
85
+ lastModified: number;
86
+ }
87
+
88
+ declare var File: {
89
+ prototype: File;
90
+ new (
91
+ fileParts?: Array<Blob | string>,
92
+ name?: string,
93
+ options?: BlobOptions,
94
+ ): File;
95
+ };
96
+
83
97
  type FormDataValue =
84
98
  | string
85
99
  | {name?: string | undefined; type?: string | undefined; uri: string};
@@ -173,6 +187,7 @@ declare interface Request extends Object, Body {
173
187
  readonly mode: RequestMode_;
174
188
  readonly referrer: string;
175
189
  readonly url: string;
190
+ readonly signal: AbortSignal | undefined;
176
191
  clone(): Request;
177
192
  }
178
193
 
@@ -1,32 +0,0 @@
1
- load("@fbsource//tools/build_defs:js_library_glob.bzl", "js_library_glob")
2
- load("@fbsource//tools/build_defs/oss:metro_defs.bzl", "rn_library")
3
-
4
- # This file was generated by running
5
- # js1 build buckfiles
6
-
7
- rn_library(
8
- name = "IntegrationTests",
9
- srcs = js_library_glob(
10
- [
11
- "**/*",
12
- ],
13
- excludes = [
14
- "**/__*__/**",
15
- "**/*.command",
16
- "**/*.md",
17
- "websocket_integration_test_server.js",
18
- ],
19
- ),
20
- labels = [
21
- "pfh:ReactNative_CommonInfrastructurePlaceholder",
22
- ],
23
- skip_processors = True,
24
- visibility = ["PUBLIC"],
25
- deps = [
26
- "//xplat/js:node_modules__invariant",
27
- "//xplat/js:node_modules__nullthrows",
28
- "//xplat/js/RKJSModules/vendor/react:react",
29
- "//xplat/js/react-native-github:react-native",
30
- "//xplat/js/react-native-github/packages/assets:assets",
31
- ],
32
- )
@@ -1,29 +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
- 'use strict';
11
-
12
- const React = require('react');
13
- const ReactNative = require('react-native');
14
- const {View} = ReactNative;
15
-
16
- const {TestModule} = ReactNative.NativeModules;
17
-
18
- class PropertiesUpdateTest extends React.Component {
19
- render() {
20
- if (this.props.markTestPassed) {
21
- TestModule.markTestPassed(true);
22
- }
23
- return <View />;
24
- }
25
- }
26
-
27
- PropertiesUpdateTest.displayName = 'PropertiesUpdateTest';
28
-
29
- module.exports = PropertiesUpdateTest;
@@ -1,86 +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
- 'use strict';
11
-
12
- const React = require('react');
13
- const ReactNative = require('react-native');
14
-
15
- const {AppRegistry, ScrollView, StyleSheet, Text, TouchableOpacity, View} =
16
- ReactNative;
17
-
18
- /* Keep this list in sync with RCTRootViewIntegrationTests.m */
19
- const TESTS = [
20
- require('./PropertiesUpdateTest'),
21
- require('./ReactContentSizeUpdateTest'),
22
- require('./SizeFlexibilityUpdateTest'),
23
- ];
24
-
25
- TESTS.forEach(test =>
26
- AppRegistry.registerComponent(test.displayName, () => test),
27
- );
28
-
29
- class RCTRootViewIntegrationTestApp extends React.Component {
30
- state = {
31
- test: null,
32
- };
33
-
34
- render() {
35
- if (this.state.test) {
36
- return (
37
- <ScrollView>
38
- <this.state.test />
39
- </ScrollView>
40
- );
41
- }
42
- return (
43
- <View style={styles.container}>
44
- <Text style={styles.row}>
45
- Click on a test to run it in this shell for easier debugging and
46
- development. Run all tests in the testing environment with cmd+U in
47
- Xcode.
48
- </Text>
49
- <View style={styles.separator} />
50
- <ScrollView>
51
- {TESTS.map(test => [
52
- <TouchableOpacity
53
- onPress={() => this.setState({test})}
54
- style={styles.row}>
55
- <Text style={styles.testName}>{test.displayName}</Text>
56
- </TouchableOpacity>,
57
- <View style={styles.separator} />,
58
- ])}
59
- </ScrollView>
60
- </View>
61
- );
62
- }
63
- }
64
-
65
- const styles = StyleSheet.create({
66
- container: {
67
- backgroundColor: 'white',
68
- marginTop: 40,
69
- margin: 15,
70
- },
71
- row: {
72
- padding: 10,
73
- },
74
- testName: {
75
- fontWeight: '500',
76
- },
77
- separator: {
78
- height: 1,
79
- backgroundColor: '#bbbbbb',
80
- },
81
- });
82
-
83
- AppRegistry.registerComponent(
84
- 'RCTRootViewIntegrationTestApp',
85
- () => RCTRootViewIntegrationTestApp,
86
- );
@@ -1,89 +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-local
9
- */
10
-
11
- const RCTNativeAppEventEmitter = require('react-native/Libraries/EventEmitter/RCTNativeAppEventEmitter');
12
- const React = require('react');
13
- const ReactNative = require('react-native');
14
-
15
- const {View} = ReactNative;
16
-
17
- const {TestModule} = ReactNative.NativeModules;
18
- import {type EventSubscription} from 'react-native/Libraries/vendor/emitter/EventEmitter';
19
-
20
- const reactViewWidth = 101;
21
- const reactViewHeight = 102;
22
- const newReactViewWidth = 201;
23
- const newReactViewHeight = 202;
24
-
25
- type Props = {||};
26
-
27
- type State = {|
28
- height: number,
29
- width: number,
30
- |};
31
-
32
- class ReactContentSizeUpdateTest extends React.Component<Props, State> {
33
- _timeoutID: ?TimeoutID = null;
34
- _subscription: ?EventSubscription = null;
35
-
36
- state: State = {
37
- height: reactViewHeight,
38
- width: reactViewWidth,
39
- };
40
-
41
- UNSAFE_componentWillMount() {
42
- this._subscription = RCTNativeAppEventEmitter.addListener(
43
- 'rootViewDidChangeIntrinsicSize',
44
- this.rootViewDidChangeIntrinsicSize,
45
- );
46
- }
47
-
48
- componentDidMount() {
49
- this._timeoutID = setTimeout(() => {
50
- this.updateViewSize();
51
- }, 1000);
52
- }
53
-
54
- componentWillUnmount() {
55
- if (this._timeoutID != null) {
56
- clearTimeout(this._timeoutID);
57
- }
58
-
59
- if (this._subscription != null) {
60
- this._subscription.remove();
61
- }
62
- }
63
-
64
- updateViewSize() {
65
- this.setState({
66
- height: newReactViewHeight,
67
- width: newReactViewWidth,
68
- });
69
- }
70
-
71
- rootViewDidChangeIntrinsicSize: (intrinsicSize: State) => void = (
72
- intrinsicSize: State,
73
- ) => {
74
- if (
75
- intrinsicSize.height === newReactViewHeight &&
76
- intrinsicSize.width === newReactViewWidth
77
- ) {
78
- TestModule.markTestPassed(true);
79
- }
80
- };
81
-
82
- render(): React.Node {
83
- return (
84
- <View style={{height: this.state.height, width: this.state.width}} />
85
- );
86
- }
87
- }
88
-
89
- module.exports = ReactContentSizeUpdateTest;
@@ -1,106 +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-local
9
- */
10
-
11
- const RCTNativeAppEventEmitter = require('react-native/Libraries/EventEmitter/RCTNativeAppEventEmitter');
12
- const React = require('react');
13
- const ReactNative = require('react-native');
14
- const {View} = ReactNative;
15
-
16
- const {TestModule} = ReactNative.NativeModules;
17
- import {type EventSubscription} from 'react-native/Libraries/vendor/emitter/EventEmitter';
18
-
19
- const reactViewWidth = 111;
20
- const reactViewHeight = 222;
21
-
22
- let finalState = false;
23
-
24
- type Props = $ReadOnly<{|
25
- width: boolean,
26
- height: boolean,
27
- both: boolean,
28
- none: boolean,
29
- |}>;
30
-
31
- class SizeFlexibilityUpdateTest extends React.Component<Props> {
32
- _subscription: ?EventSubscription = null;
33
-
34
- UNSAFE_componentWillMount() {
35
- this._subscription = RCTNativeAppEventEmitter.addListener(
36
- 'rootViewDidChangeIntrinsicSize',
37
- this.rootViewDidChangeIntrinsicSize,
38
- );
39
- }
40
-
41
- componentWillUnmount() {
42
- if (this._subscription != null) {
43
- this._subscription.remove();
44
- }
45
- }
46
-
47
- markPassed: () => void = () => {
48
- TestModule.markTestPassed(true);
49
- finalState = true;
50
- };
51
-
52
- rootViewDidChangeIntrinsicSize: (intrinsicSize: {
53
- height: number,
54
- width: number,
55
- ...
56
- }) => void = (intrinsicSize: {width: number, height: number, ...}) => {
57
- if (finalState) {
58
- // If a test reaches its final state, it is not expected to do anything more
59
- TestModule.markTestPassed(false);
60
- return;
61
- }
62
-
63
- if (this.props.both) {
64
- if (
65
- intrinsicSize.width === reactViewWidth &&
66
- intrinsicSize.height === reactViewHeight
67
- ) {
68
- this.markPassed();
69
- return;
70
- }
71
- }
72
- if (this.props.height) {
73
- if (
74
- intrinsicSize.width !== reactViewWidth &&
75
- intrinsicSize.height === reactViewHeight
76
- ) {
77
- this.markPassed();
78
- return;
79
- }
80
- }
81
- if (this.props.width) {
82
- if (
83
- intrinsicSize.width === reactViewWidth &&
84
- intrinsicSize.height !== reactViewHeight
85
- ) {
86
- this.markPassed();
87
- return;
88
- }
89
- }
90
- if (this.props.none) {
91
- if (
92
- intrinsicSize.width !== reactViewWidth &&
93
- intrinsicSize.height !== reactViewHeight
94
- ) {
95
- this.markPassed();
96
- return;
97
- }
98
- }
99
- };
100
-
101
- render(): React.Node {
102
- return <View style={{height: reactViewHeight, width: reactViewWidth}} />;
103
- }
104
- }
105
-
106
- module.exports = SizeFlexibilityUpdateTest;
@@ -1,37 +0,0 @@
1
- /**
2
- * Copyright (c) Microsoft Corporation.
3
- * Licensed under the MIT License.
4
- *
5
- * @format
6
- * @flow
7
- */
8
-
9
- import type {TurboModule} from '../../TurboModule/RCTExport';
10
-
11
- import * as TurboModuleRegistry from '../../TurboModule/TurboModuleRegistry';
12
-
13
- export interface Spec extends TurboModule {
14
- +isReduceMotionEnabled: (
15
- onSuccess: (isReduceMotionEnabled: boolean) => void,
16
- ) => void;
17
- +isTouchExplorationEnabled: (
18
- onSuccess: (isScreenReaderEnabled: boolean) => void,
19
- ) => void;
20
- +isAccessibilityServiceEnabled?: ?(
21
- onSuccess: (isAccessibilityServiceEnabled: boolean) => void,
22
- ) => void;
23
- +setAccessibilityFocus: (reactTag: number) => void;
24
- +announceForAccessibility: (announcement: string) => void;
25
- // [Win32
26
- +announceForAccessibilityWithOptions?: (
27
- announcement: string,
28
- options: {queue?: boolean, nativeID?: string},
29
- ) => void;
30
- // Win32]
31
- +getRecommendedTimeoutMillis?: (
32
- mSec: number,
33
- onSuccess: (recommendedTimeoutMillis: number) => void,
34
- ) => void;
35
- }
36
-
37
- export default (TurboModuleRegistry.get<Spec>('AccessibilityInfo'): ?Spec);
@@ -1,51 +0,0 @@
1
- import { NativeSyntheticEvent, TextInputFocusEventData } from 'react-native';
2
- interface IChangePayload {
3
- eventCount: number;
4
- target: number;
5
- text: string;
6
- }
7
- export type IChangeEvent = NativeSyntheticEvent<Readonly<IChangePayload>>;
8
- interface IRange {
9
- start: number;
10
- end: number;
11
- }
12
- interface ITextInputPayload {
13
- eventCount: number;
14
- previousText: string;
15
- range: Readonly<IRange>;
16
- target: number;
17
- text: number;
18
- }
19
- export type ITextInputevent = NativeSyntheticEvent<Readonly<ITextInputPayload>>;
20
- interface IContentSize {
21
- width: number;
22
- height: number;
23
- }
24
- interface IContentSizeChangePayload {
25
- target: number;
26
- contentSize: Readonly<IContentSize>;
27
- }
28
- export type IContentSizeChangeEvent = NativeSyntheticEvent<Readonly<IContentSizeChangePayload>>;
29
- export type IBlurEvent = NativeSyntheticEvent<Readonly<TextInputFocusEventData>>;
30
- export type IFocusEvent = NativeSyntheticEvent<Readonly<TextInputFocusEventData>>;
31
- export interface ISelection extends IRange {
32
- }
33
- interface ISelectionPayload {
34
- selection: ISelection;
35
- target: number;
36
- }
37
- export type ISelectionChangeEvent = NativeSyntheticEvent<Readonly<ISelectionPayload>>;
38
- interface IKeyPressPayload {
39
- key: string;
40
- target?: number;
41
- eventCount?: number;
42
- }
43
- export type IKeyPressEvent = NativeSyntheticEvent<Readonly<IKeyPressPayload>>;
44
- interface IEditingPayload {
45
- eventCount: number;
46
- text: string;
47
- target: number;
48
- }
49
- export type IEditingEvent = NativeSyntheticEvent<Readonly<IEditingPayload>>;
50
- export type IPasswordRules = string;
51
- export {};
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=TextInput.Types.win32.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TextInput.Types.win32.js","sourceRoot":"","sources":["../../../src/Libraries/Components/TextInput/TextInput.Types.win32.ts"],"names":[],"mappings":"","sourcesContent":["import { NativeSyntheticEvent, TextInputFocusEventData } from 'react-native';\n\n// TODO: How do we keep in sync with synthetic events\n\ninterface IChangePayload {\n eventCount: number;\n target: number;\n text: string;\n}\nexport type IChangeEvent = NativeSyntheticEvent<Readonly<IChangePayload>>;\n\ninterface IRange {\n start: number;\n end: number;\n}\ninterface ITextInputPayload {\n eventCount: number;\n previousText: string;\n range: Readonly<IRange>;\n target: number;\n text: number;\n}\nexport type ITextInputevent = NativeSyntheticEvent<Readonly<ITextInputPayload>>;\n\ninterface IContentSize {\n width: number;\n height: number;\n}\ninterface IContentSizeChangePayload {\n target: number;\n contentSize: Readonly<IContentSize>;\n}\nexport type IContentSizeChangeEvent = NativeSyntheticEvent<Readonly<IContentSizeChangePayload>>;\n\n// TODO: Why doesn't this guy work\n// interface ITargetPayload {\n// target: number;\n// }\n\n// type ITargetEvent = NativeSyntheticEvent<Readonly<ITargetPayload>>;\n\nexport type IBlurEvent = NativeSyntheticEvent<Readonly<TextInputFocusEventData>>;\nexport type IFocusEvent = NativeSyntheticEvent<Readonly<TextInputFocusEventData>>;\n\nexport interface ISelection extends IRange { }\ninterface ISelectionPayload {\n selection: ISelection;\n target: number;\n}\nexport type ISelectionChangeEvent = NativeSyntheticEvent<Readonly<ISelectionPayload>>;\n\n// TODO: Why is this one diffferent?\ninterface IKeyPressPayload {\n key: string;\n target?: number;\n eventCount?: number;\n}\nexport type IKeyPressEvent = NativeSyntheticEvent<Readonly<IKeyPressPayload>>;\n\ninterface IEditingPayload {\n eventCount: number;\n text: string;\n target: number;\n}\nexport type IEditingEvent = NativeSyntheticEvent<Readonly<IEditingPayload>>;\n\n// TODO: Why do I need this one\nexport type IPasswordRules = string;\n"]}
@@ -1,154 +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
- * @flow strict-local
8
- * @format
9
- */
10
-
11
- 'use strict';
12
-
13
- import type {
14
- AccessibilityRole,
15
- Role,
16
- } from '../Components/View/ViewAccessibility';
17
-
18
- // Map role values to AccessibilityRole values
19
- export function getAccessibilityRoleFromRole(role: Role): ?AccessibilityRole {
20
- switch (role) {
21
- case 'alert':
22
- return 'alert';
23
- case 'alertdialog':
24
- return undefined;
25
- case 'application':
26
- return undefined;
27
- case 'article':
28
- return undefined;
29
- case 'banner':
30
- return undefined;
31
- case 'button':
32
- return 'button';
33
- case 'cell':
34
- return undefined;
35
- case 'checkbox':
36
- return 'checkbox';
37
- case 'columnheader':
38
- return undefined;
39
- case 'combobox':
40
- return 'combobox';
41
- case 'complementary':
42
- return undefined;
43
- case 'contentinfo':
44
- return undefined;
45
- case 'definition':
46
- return undefined;
47
- case 'dialog':
48
- return undefined;
49
- case 'directory':
50
- return undefined;
51
- case 'document':
52
- return undefined;
53
- case 'feed':
54
- return undefined;
55
- case 'figure':
56
- return undefined;
57
- case 'form':
58
- return undefined;
59
- case 'grid':
60
- return 'grid';
61
- case 'group':
62
- return undefined;
63
- case 'heading':
64
- return 'header';
65
- case 'img':
66
- return 'image';
67
- case 'link':
68
- return 'link';
69
- case 'list':
70
- return 'list';
71
- case 'listitem':
72
- return undefined;
73
- case 'log':
74
- return undefined;
75
- case 'main':
76
- return undefined;
77
- case 'marquee':
78
- return undefined;
79
- case 'math':
80
- return undefined;
81
- case 'menu':
82
- return 'menu';
83
- case 'menubar':
84
- return 'menubar';
85
- case 'menuitem':
86
- return 'menuitem';
87
- case 'meter':
88
- return undefined;
89
- case 'navigation':
90
- return undefined;
91
- case 'none':
92
- return 'none';
93
- case 'note':
94
- return undefined;
95
- case 'option':
96
- return undefined;
97
- case 'presentation':
98
- return 'none';
99
- case 'progressbar':
100
- return 'progressbar';
101
- case 'radio':
102
- return 'radio';
103
- case 'radiogroup':
104
- return 'radiogroup';
105
- case 'region':
106
- return undefined;
107
- case 'row':
108
- return undefined;
109
- case 'rowgroup':
110
- return undefined;
111
- case 'rowheader':
112
- return undefined;
113
- case 'scrollbar':
114
- return 'scrollbar';
115
- case 'searchbox':
116
- return 'search';
117
- case 'separator':
118
- return undefined;
119
- case 'slider':
120
- return 'adjustable';
121
- case 'spinbutton':
122
- return 'spinbutton';
123
- case 'status':
124
- return undefined;
125
- case 'summary':
126
- return 'summary';
127
- case 'switch':
128
- return 'switch';
129
- case 'tab':
130
- return 'tab';
131
- case 'table':
132
- return undefined;
133
- case 'tablist':
134
- return 'tablist';
135
- case 'tabpanel':
136
- return undefined;
137
- case 'term':
138
- return undefined;
139
- case 'timer':
140
- return 'timer';
141
- case 'toolbar':
142
- return 'toolbar';
143
- case 'tooltip':
144
- return undefined;
145
- case 'tree':
146
- return undefined;
147
- case 'treegrid':
148
- return undefined;
149
- case 'treeitem':
150
- return undefined;
151
- }
152
-
153
- return undefined;
154
- }