@office-iss/react-native-win32 0.82.0 → 0.83.0-preview.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 (109) hide show
  1. package/.flowconfig +2 -2
  2. package/CHANGELOG.json +43 -40
  3. package/CHANGELOG.md +15 -20
  4. package/IntegrationTests/ImageCachePolicyTest.js +1 -1
  5. package/Libraries/Animated/components/AnimatedFlatList.js +5 -3
  6. package/Libraries/Animated/components/AnimatedImage.js +4 -3
  7. package/Libraries/Animated/components/AnimatedSectionList.js +2 -2
  8. package/Libraries/Animated/components/AnimatedText.js +7 -3
  9. package/Libraries/Animated/components/AnimatedView.js +3 -2
  10. package/Libraries/Animated/createAnimatedComponent.js +24 -12
  11. package/Libraries/Animated/nodes/AnimatedColor.js +26 -10
  12. package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.js +43 -15
  13. package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.win32.js +43 -15
  14. package/Libraries/Components/ActivityIndicator/ActivityIndicator.d.ts +2 -2
  15. package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.d.ts +2 -2
  16. package/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.d.ts +2 -2
  17. package/Libraries/Components/RefreshControl/RefreshControl.d.ts +3 -3
  18. package/Libraries/Components/SafeAreaView/SafeAreaView.d.ts +2 -2
  19. package/Libraries/Components/ScrollView/ScrollView.js +1 -0
  20. package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +6 -6
  21. package/Libraries/Components/Switch/Switch.d.ts +2 -2
  22. package/Libraries/Components/TextInput/TextInput.d.ts +2 -5
  23. package/Libraries/Components/TextInput/TextInput.js +6 -0
  24. package/Libraries/Components/TextInput/TextInput.win32.js +18 -12
  25. package/Libraries/Components/TextInput/TextInputState.win32.js +2 -2
  26. package/Libraries/Components/Touchable/TouchableBounce.js +7 -7
  27. package/Libraries/Components/Touchable/TouchableWin32.js +9 -6
  28. package/Libraries/Components/Touchable/TouchableWin32.js.map +1 -1
  29. package/Libraries/Components/View/ReactNativeStyleAttributes.js +19 -1
  30. package/Libraries/Components/View/View.d.ts +2 -2
  31. package/Libraries/Components/View/View.win32.js +17 -15
  32. package/Libraries/Components/View/ViewNativeComponent.js +13 -1
  33. package/Libraries/Components/View/ViewWin32.d.ts +2 -2
  34. package/Libraries/Components/View/ViewWin32.js +1 -1
  35. package/Libraries/Core/ReactNativeVersion.js +3 -3
  36. package/Libraries/Core/setUpPerformance.js +2 -0
  37. package/Libraries/Debugging/DebuggingOverlay.js +14 -14
  38. package/Libraries/Debugging/DebuggingOverlayRegistry.js +8 -2
  39. package/Libraries/EventEmitter/RCTDeviceEventEmitter.js +5 -2
  40. package/Libraries/Image/Image.d.ts +3 -3
  41. package/Libraries/Image/ImageInjection.js +3 -6
  42. package/Libraries/Image/ImageTypes.flow.js +3 -7
  43. package/Libraries/Lists/FlatList.js +8 -8
  44. package/Libraries/Lists/SectionList.d.ts +5 -1
  45. package/Libraries/Lists/ViewabilityHelper.js +1 -1
  46. package/Libraries/Lists/VirtualizedList.js +1 -0
  47. package/Libraries/LogBox/UI/AnsiHighlight.js +4 -1
  48. package/Libraries/NativeComponent/BaseViewConfig.android.js +11 -2
  49. package/Libraries/NativeComponent/NativeComponentRegistry.d.ts +98 -0
  50. package/Libraries/NativeComponent/NativeComponentRegistry.js +2 -0
  51. package/Libraries/NativeComponent/NativeComponentRegistryUnstable.js +3 -1
  52. package/Libraries/Network/RCTNetworking.android.js +3 -1
  53. package/Libraries/Network/RCTNetworking.ios.js +3 -0
  54. package/Libraries/Network/RCTNetworking.win32.js +3 -0
  55. package/Libraries/Network/XMLHttpRequest.js +1 -41
  56. package/Libraries/Pressability/Pressability.win32.js +5 -5
  57. package/Libraries/Pressability/usePressability.js +14 -3
  58. package/Libraries/ReactNative/PaperUIManager.win32.js +7 -7
  59. package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance.js +20 -82
  60. package/Libraries/ReactNative/getNativeComponentAttributes.js +12 -0
  61. package/Libraries/Renderer/implementations/ReactFabric-dev.js +6759 -4478
  62. package/Libraries/Renderer/implementations/ReactFabric-prod.js +3169 -3119
  63. package/Libraries/Renderer/implementations/ReactFabric-profiling.js +4732 -3535
  64. package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +6646 -4070
  65. package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +3136 -2825
  66. package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js +4761 -3312
  67. package/Libraries/Renderer/shims/ReactNative.js +3 -1
  68. package/Libraries/Renderer/shims/ReactNativeTypes.js +2 -1
  69. package/Libraries/Renderer/shims/ReactNativeTypes.win32.js +2 -1
  70. package/Libraries/StyleSheet/StyleSheetTypes.d.ts +1 -1
  71. package/Libraries/StyleSheet/StyleSheetTypes.js +44 -0
  72. package/Libraries/StyleSheet/processBackgroundPosition.js +284 -0
  73. package/Libraries/StyleSheet/processBackgroundRepeat.js +105 -0
  74. package/Libraries/StyleSheet/processBackgroundSize.js +104 -0
  75. package/Libraries/Text/Text.d.ts +2 -2
  76. package/Libraries/Text/TextNativeComponent.js +10 -0
  77. package/Libraries/Text/TextNativeComponent.win32.js +10 -0
  78. package/Libraries/TurboModule/TurboModuleRegistry.js +3 -9
  79. package/Libraries/Utilities/DevLoadingView.js +14 -6
  80. package/Libraries/Utilities/FocusManager.win32.js +2 -2
  81. package/Libraries/Utilities/HMRClient.js +13 -5
  82. package/flow/bom.js.flow +1 -0
  83. package/index.js +6 -0
  84. package/index.win32.js +130 -207
  85. package/index.win32.js.flow +488 -0
  86. package/jest/mockComponent.js +6 -6
  87. package/jest/setup.js +15 -10
  88. package/overrides.json +16 -10
  89. package/package.json +39 -26
  90. package/src/private/components/virtualview/VirtualView.js +22 -27
  91. package/src/private/components/virtualview/VirtualViewExperimentalNativeComponent.js +6 -0
  92. package/src/private/featureflags/ReactNativeFeatureFlags.js +100 -19
  93. package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +18 -3
  94. package/src/private/setup/setUpDefaultReactNativeEnvironment.js +6 -0
  95. package/src/private/specs_DEPRECATED/modules/NativeNetworkingIOS.js +1 -0
  96. package/src/private/webapis/dom/nodes/ReactNativeElement.js +12 -2
  97. package/src/private/webapis/intersectionobserver/IntersectionObserver.js +76 -15
  98. package/src/private/webapis/intersectionobserver/internals/IntersectionObserverManager.js +1 -0
  99. package/src/private/webapis/intersectionobserver/specs/NativeIntersectionObserver.js +1 -0
  100. package/src/private/webapis/performance/ResourceTiming.js +31 -4
  101. package/src/private/webapis/performance/internals/RawPerformanceEntry.js +4 -1
  102. package/src/private/webapis/performance/specs/NativePerformance.js +3 -0
  103. package/src-win/Libraries/Components/Touchable/TouchableWin32.tsx +6 -3
  104. package/src-win/Libraries/Components/View/ViewWin32.d.ts +2 -2
  105. package/src-win/Libraries/Text/Text.d.ts +2 -2
  106. package/src-win/index.win32.js.flow +488 -0
  107. package/types/index.d.ts +1 -0
  108. package/types/public/ReactNativeTypes.d.ts +115 -2
  109. package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricHostComponent.js +0 -152
@@ -0,0 +1,488 @@
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
+ // ----------------------------------------------------------------------------
12
+ // Types entry point for react-native-win32.
13
+ //
14
+ // Exports of this module define the public API for React Native at development
15
+ // time, and are automatically translated to TypeScript when we publish to npm.
16
+ //
17
+ // IMPORTANT: Keep this file in sync with index.win32.js. Test your changes
18
+ // whenever updating React Native's public API.
19
+ // ----------------------------------------------------------------------------
20
+
21
+ /// <reference path="../src/types/globals.d.ts" />
22
+
23
+ // #region Components
24
+
25
+ export type {ActivityIndicatorProps} from './Libraries/Components/ActivityIndicator/ActivityIndicator';
26
+ export {default as ActivityIndicator} from './Libraries/Components/ActivityIndicator/ActivityIndicator';
27
+
28
+ export type {ButtonProps} from './Libraries/Components/Button';
29
+ export {default as Button} from './Libraries/Components/Button';
30
+
31
+ export type {
32
+ DrawerLayoutAndroidProps,
33
+ DrawerSlideEvent,
34
+ } from './Libraries/Components/DrawerAndroid/DrawerLayoutAndroid';
35
+ export {default as DrawerLayoutAndroid} from './Libraries/Components/DrawerAndroid/DrawerLayoutAndroid';
36
+
37
+ export type {FlatListProps} from './Libraries/Lists/FlatList';
38
+ export {default as FlatList} from './Libraries/Lists/FlatList';
39
+
40
+ // [Win32] Import Image types from source files since Image.js is ignored and
41
+ // Image.win32.js doesn't re-export these types
42
+ export type {
43
+ ImageBackgroundProps,
44
+ ImageErrorEvent,
45
+ ImageLoadEvent,
46
+ ImageProgressEventIOS,
47
+ ImageProps,
48
+ ImagePropsAndroid,
49
+ ImagePropsBase,
50
+ ImagePropsIOS,
51
+ ImageSourcePropType,
52
+ } from './Libraries/Image/ImageProps';
53
+ export type {
54
+ ImageResolvedAssetSource,
55
+ ImageSize,
56
+ } from './Libraries/Image/ImageTypes.flow';
57
+ export type {
58
+ ImageRequireSource,
59
+ ImageSource,
60
+ ImageURISource,
61
+ } from './Libraries/Image/ImageSource';
62
+ export {default as Image} from './Libraries/Image/Image';
63
+ export {default as ImageBackground} from './Libraries/Image/ImageBackground';
64
+
65
+ export type {InputAccessoryViewProps} from './Libraries/Components/TextInput/InputAccessoryView';
66
+ export {default as InputAccessoryView} from './Libraries/Components/TextInput/InputAccessoryView';
67
+
68
+ export type {KeyboardAvoidingViewProps} from './Libraries/Components/Keyboard/KeyboardAvoidingView';
69
+ export {default as KeyboardAvoidingView} from './Libraries/Components/Keyboard/KeyboardAvoidingView';
70
+
71
+ export type {LayoutConformanceProps} from './Libraries/Components/LayoutConformance/LayoutConformance';
72
+ export {default as experimental_LayoutConformance} from './Libraries/Components/LayoutConformance/LayoutConformance';
73
+
74
+ export type {
75
+ ModalBaseProps,
76
+ ModalProps,
77
+ ModalPropsAndroid,
78
+ ModalPropsIOS,
79
+ } from './Libraries/Modal/Modal';
80
+ export {default as Modal} from './Libraries/Modal/Modal';
81
+
82
+ export type {
83
+ PressableAndroidRippleConfig,
84
+ PressableProps,
85
+ PressableStateCallbackType,
86
+ } from './Libraries/Components/Pressable/Pressable';
87
+ export {default as Pressable} from './Libraries/Components/Pressable/Pressable';
88
+
89
+ export type {ProgressBarAndroidProps} from './Libraries/Components/ProgressBarAndroid/ProgressBarAndroid';
90
+ export {default as ProgressBarAndroid} from './Libraries/Components/ProgressBarAndroid/ProgressBarAndroid';
91
+
92
+ export type {
93
+ RefreshControlProps,
94
+ RefreshControlPropsAndroid,
95
+ RefreshControlPropsIOS,
96
+ } from './Libraries/Components/RefreshControl/RefreshControl';
97
+ export {default as RefreshControl} from './Libraries/Components/RefreshControl/RefreshControl';
98
+
99
+ export {default as SafeAreaView} from './Libraries/Components/SafeAreaView/SafeAreaView';
100
+
101
+ export type {
102
+ ScrollViewImperativeMethods,
103
+ ScrollViewScrollToOptions,
104
+ ScrollResponderType,
105
+ ScrollViewProps,
106
+ ScrollViewPropsAndroid,
107
+ ScrollViewPropsIOS,
108
+ } from './Libraries/Components/ScrollView/ScrollView';
109
+ export {default as ScrollView} from './Libraries/Components/ScrollView/ScrollView';
110
+
111
+ export type {
112
+ SectionListProps,
113
+ SectionListRenderItem,
114
+ SectionListRenderItemInfo,
115
+ SectionListData,
116
+ } from './Libraries/Lists/SectionList';
117
+ export {default as SectionList} from './Libraries/Lists/SectionList';
118
+
119
+ export type {
120
+ StatusBarAnimation,
121
+ StatusBarProps,
122
+ StatusBarStyle,
123
+ } from './Libraries/Components/StatusBar/StatusBar';
124
+ export {default as StatusBar} from './Libraries/Components/StatusBar/StatusBar';
125
+
126
+ export type {
127
+ SwitchChangeEvent,
128
+ SwitchProps,
129
+ } from './Libraries/Components/Switch/Switch';
130
+ export {default as Switch} from './Libraries/Components/Switch/Switch';
131
+
132
+ export type {TextProps} from './Libraries/Text/Text';
133
+ export {default as Text} from './Libraries/Text/Text';
134
+ export type {NativeTextProps as unstable_NativeTextProps} from './Libraries/Text/TextNativeComponent';
135
+ export {NativeText as unstable_NativeText} from './Libraries/Text/TextNativeComponent';
136
+ export {default as unstable_TextAncestorContext} from './Libraries/Text/TextAncestorContext';
137
+
138
+ export type {
139
+ AutoCapitalize,
140
+ EnterKeyHintTypeOptions,
141
+ KeyboardTypeOptions,
142
+ InputModeOptions,
143
+ TextContentType,
144
+ TextInputAndroidProps,
145
+ TextInputIOSProps,
146
+ TextInputProps,
147
+ TextInputChangeEvent,
148
+ TextInputContentSizeChangeEvent,
149
+ TextInputEndEditingEvent,
150
+ TextInputFocusEvent,
151
+ TextInputKeyPressEvent,
152
+ TextInputSelectionChangeEvent,
153
+ TextInputSubmitEditingEvent,
154
+ ReturnKeyTypeOptions,
155
+ SubmitBehavior,
156
+ } from './Libraries/Components/TextInput/TextInput';
157
+ export {default as TextInput} from './Libraries/Components/TextInput/TextInput';
158
+
159
+ export {default as Touchable} from './Libraries/Components/Touchable/Touchable';
160
+
161
+ export type {TouchableHighlightProps} from './Libraries/Components/Touchable/TouchableHighlight';
162
+ export {default as TouchableHighlight} from './Libraries/Components/Touchable/TouchableHighlight';
163
+
164
+ export type {TouchableNativeFeedbackProps} from './Libraries/Components/Touchable/TouchableNativeFeedback';
165
+ export {default as TouchableNativeFeedback} from './Libraries/Components/Touchable/TouchableNativeFeedback';
166
+
167
+ export type {TouchableOpacityProps} from './Libraries/Components/Touchable/TouchableOpacity';
168
+ export {default as TouchableOpacity} from './Libraries/Components/Touchable/TouchableOpacity';
169
+
170
+ export type {TouchableWithoutFeedbackProps} from './Libraries/Components/Touchable/TouchableWithoutFeedback';
171
+ export {default as TouchableWithoutFeedback} from './Libraries/Components/Touchable/TouchableWithoutFeedback';
172
+
173
+ export type {
174
+ AccessibilityActionEvent,
175
+ AccessibilityProps,
176
+ AccessibilityRole,
177
+ AccessibilityState,
178
+ AccessibilityValue,
179
+ Role,
180
+ } from './Libraries/Components/View/ViewAccessibility';
181
+ export type {
182
+ GestureResponderHandlers,
183
+ TVViewPropsIOS,
184
+ ViewProps,
185
+ ViewPropsAndroid,
186
+ ViewPropsIOS,
187
+ } from './Libraries/Components/View/ViewPropTypes';
188
+ export {default as View} from './Libraries/Components/View/View';
189
+ export {default as unstable_NativeView} from './Libraries/Components/View/ViewNativeComponent';
190
+
191
+ export type {
192
+ ListRenderItemInfo,
193
+ ListRenderItem,
194
+ ListViewToken,
195
+ Separators,
196
+ VirtualizedListProps,
197
+ } from './Libraries/Lists/VirtualizedList';
198
+ export {default as VirtualizedList} from './Libraries/Lists/VirtualizedList';
199
+
200
+ export type {
201
+ ScrollToLocationParamsType,
202
+ SectionBase,
203
+ VirtualizedSectionListProps,
204
+ } from './Libraries/Lists/VirtualizedSectionList';
205
+ export {default as VirtualizedSectionList} from './Libraries/Lists/VirtualizedSectionList';
206
+
207
+ // #endregion
208
+ // #region APIs
209
+
210
+ export {default as AccessibilityInfo} from './Libraries/Components/AccessibilityInfo/AccessibilityInfo';
211
+
212
+ export type {
213
+ ActionSheetIOSOptions,
214
+ ShareActionSheetIOSOptions,
215
+ ShareActionSheetError,
216
+ } from './Libraries/ActionSheetIOS/ActionSheetIOS';
217
+ export {default as ActionSheetIOS} from './Libraries/ActionSheetIOS/ActionSheetIOS';
218
+
219
+ export type {
220
+ AlertType,
221
+ AlertButtonStyle,
222
+ AlertButton,
223
+ AlertOptions,
224
+ } from './Libraries/Alert/Alert';
225
+ export {default as Alert} from './Libraries/Alert/Alert';
226
+
227
+ export {default as Animated} from './Libraries/Animated/Animated';
228
+
229
+ export * as Appearance from './Libraries/Utilities/Appearance';
230
+
231
+ export type {
232
+ TaskProvider,
233
+ ComponentProvider,
234
+ ComponentProviderInstrumentationHook,
235
+ AppConfig,
236
+ Runnable,
237
+ Runnables,
238
+ Registry,
239
+ WrapperComponentProvider,
240
+ RootViewStyleProvider,
241
+ } from './Libraries/ReactNative/AppRegistry';
242
+ export {AppRegistry} from './Libraries/ReactNative/AppRegistry';
243
+
244
+ export type {
245
+ AppStateStatus,
246
+ AppStateEvent,
247
+ } from './Libraries/AppState/AppState';
248
+ export {default as AppState} from './Libraries/AppState/AppState';
249
+
250
+ export type {BackPressEventName} from './Libraries/Utilities/BackHandler';
251
+ export {default as BackHandler} from './Libraries/Utilities/BackHandler';
252
+
253
+ export {default as Clipboard} from './Libraries/Components/Clipboard/Clipboard';
254
+
255
+ export {default as codegenNativeComponent} from './Libraries/Utilities/codegenNativeComponent';
256
+ export {default as codegenNativeCommands} from './Libraries/Utilities/codegenNativeCommands';
257
+
258
+ export {default as DeviceEventEmitter} from './Libraries/EventEmitter/RCTDeviceEventEmitter';
259
+
260
+ export type {DeviceInfoConstants} from './Libraries/Utilities/DeviceInfo';
261
+ export {default as DeviceInfo} from './Libraries/Utilities/DeviceInfo';
262
+
263
+ export {default as DevMenu} from './src/private/devsupport/devmenu/DevMenu';
264
+ export {default as DevSettings} from './Libraries/Utilities/DevSettings';
265
+
266
+ export type {
267
+ DimensionsPayload,
268
+ DisplayMetrics,
269
+ DisplayMetricsAndroid,
270
+ ScaledSize,
271
+ } from './Libraries/Utilities/Dimensions';
272
+ export {default as Dimensions} from './Libraries/Utilities/Dimensions';
273
+
274
+ export type {DynamicColorIOSTuple} from './Libraries/StyleSheet/PlatformColorValueTypesIOS';
275
+ export {DynamicColorIOS} from './Libraries/StyleSheet/PlatformColorValueTypesIOS';
276
+
277
+ export type {EasingFunction} from './Libraries/Animated/Easing';
278
+ export {default as Easing} from './Libraries/Animated/Easing';
279
+
280
+ export {findNodeHandle} from './Libraries/ReactNative/RendererProxy';
281
+
282
+ export {default as I18nManager} from './Libraries/ReactNative/I18nManager';
283
+
284
+ export type {
285
+ Handle,
286
+ PromiseTask,
287
+ SimpleTask,
288
+ } from './Libraries/Interaction/InteractionManager';
289
+ export {default as InteractionManager} from './Libraries/Interaction/InteractionManager';
290
+
291
+ export type {
292
+ AndroidKeyboardEvent,
293
+ IOSKeyboardEvent,
294
+ KeyboardEvent,
295
+ KeyboardEventEasing,
296
+ KeyboardEventName,
297
+ KeyboardMetrics,
298
+ } from './Libraries/Components/Keyboard/Keyboard';
299
+ export {default as Keyboard} from './Libraries/Components/Keyboard/Keyboard';
300
+
301
+ export type {
302
+ LayoutAnimationAnim,
303
+ LayoutAnimationConfig,
304
+ LayoutAnimationProperties,
305
+ LayoutAnimationProperty,
306
+ LayoutAnimationType,
307
+ LayoutAnimationTypes,
308
+ } from './Libraries/LayoutAnimation/LayoutAnimation';
309
+ export {default as LayoutAnimation} from './Libraries/LayoutAnimation/LayoutAnimation';
310
+
311
+ export {default as Linking} from './Libraries/Linking/Linking';
312
+
313
+ export type {
314
+ ExtendedExceptionData,
315
+ IgnorePattern,
316
+ LogData,
317
+ } from './Libraries/LogBox/LogBox';
318
+ export {default as LogBox} from './Libraries/LogBox/LogBox';
319
+
320
+ export {default as NativeAppEventEmitter} from './Libraries/EventEmitter/RCTNativeAppEventEmitter';
321
+
322
+ export * as NativeComponentRegistry from './Libraries/NativeComponent/NativeComponentRegistry';
323
+
324
+ export {default as NativeDialogManagerAndroid} from './Libraries/NativeModules/specs/NativeDialogManagerAndroid';
325
+
326
+ export type {
327
+ EventSubscription,
328
+ EmitterSubscription,
329
+ NativeEventSubscription,
330
+ } from './Libraries/EventEmitter/NativeEventEmitter';
331
+ export {default as NativeEventEmitter} from './Libraries/EventEmitter/NativeEventEmitter';
332
+ export {default as NativeModules} from './Libraries/BatchedBridge/NativeModules';
333
+ export {default as Networking} from './Libraries/Network/RCTNetworking';
334
+
335
+ export type {
336
+ PanResponderCallbacks,
337
+ PanResponderGestureState,
338
+ PanResponderInstance,
339
+ } from './Libraries/Interaction/PanResponder';
340
+ export {default as PanResponder} from './Libraries/Interaction/PanResponder';
341
+
342
+ export type {
343
+ Permission,
344
+ PermissionStatus,
345
+ Rationale,
346
+ } from './Libraries/PermissionsAndroid/PermissionsAndroid';
347
+ export {default as PermissionsAndroid} from './Libraries/PermissionsAndroid/PermissionsAndroid';
348
+
349
+ export {default as PixelRatio} from './Libraries/Utilities/PixelRatio';
350
+
351
+ export type {
352
+ PlatformOSType,
353
+ PlatformSelectSpec,
354
+ } from './Libraries/Utilities/PlatformTypes';
355
+ export {default as Platform} from './Libraries/Utilities/Platform';
356
+
357
+ export {PlatformColor} from './Libraries/StyleSheet/PlatformColorValueTypes';
358
+
359
+ export type {
360
+ PushNotificationEventName,
361
+ PushNotificationPermissions,
362
+ } from './Libraries/PushNotificationIOS/PushNotificationIOS';
363
+ export {default as PushNotificationIOS} from './Libraries/PushNotificationIOS/PushNotificationIOS';
364
+
365
+ export type {ProcessedColorValue} from './Libraries/StyleSheet/processColor';
366
+ export {default as processColor} from './Libraries/StyleSheet/processColor';
367
+
368
+ export {default as registerCallableModule} from './Libraries/Core/registerCallableModule';
369
+ export {default as requireNativeComponent} from './Libraries/ReactNative/requireNativeComponent';
370
+
371
+ export {default as ReactNativeVersion} from './Libraries/Core/ReactNativeVersion';
372
+
373
+ export type {RootTag} from './Libraries/ReactNative/RootTag';
374
+ export {RootTagContext} from './Libraries/ReactNative/RootTag';
375
+
376
+ export {default as Settings} from './Libraries/Settings/Settings';
377
+
378
+ export type {
379
+ ShareAction,
380
+ ShareContent,
381
+ ShareOptions,
382
+ } from './Libraries/Share/Share';
383
+ export {default as Share} from './Libraries/Share/Share';
384
+
385
+ // TODO(T210505449): StyleSheet/StyleSheetTypes exports are incomplete - review
386
+ export type {
387
+ ColorValue,
388
+ ImageStyle,
389
+ FilterFunction,
390
+ FontVariant,
391
+ NativeColorValue,
392
+ OpaqueColorValue,
393
+ StyleProp,
394
+ TextStyle,
395
+ TransformsStyle,
396
+ ViewStyle,
397
+ } from './Libraries/StyleSheet/StyleSheet';
398
+ export type {
399
+ BoxShadowValue,
400
+ CursorValue,
401
+ DimensionValue,
402
+ DropShadowValue,
403
+ EdgeInsetsValue,
404
+ PointValue,
405
+ } from './Libraries/StyleSheet/StyleSheetTypes';
406
+ export type {Insets} from './Libraries/StyleSheet/Rect';
407
+ export {default as StyleSheet} from './Libraries/StyleSheet/StyleSheet';
408
+
409
+ export * as Systrace from './Libraries/Performance/Systrace';
410
+ export {default as ToastAndroid} from './Libraries/Components/ToastAndroid/ToastAndroid';
411
+ export * as TurboModuleRegistry from './Libraries/TurboModule/TurboModuleRegistry';
412
+ export {default as UIManager} from './Libraries/ReactNative/UIManager';
413
+ export {unstable_batchedUpdates} from './Libraries/ReactNative/RendererProxy';
414
+ export {default as useAnimatedValue} from './Libraries/Animated/useAnimatedValue';
415
+ export {default as useColorScheme} from './Libraries/Utilities/useColorScheme';
416
+ export {default as useWindowDimensions} from './Libraries/Utilities/useWindowDimensions';
417
+ export {default as UTFSequence} from './Libraries/UTFSequence';
418
+ export {default as Vibration} from './Libraries/Vibration/Vibration';
419
+
420
+ // #endregion
421
+ // #region APIs (types only)
422
+
423
+ export type {
424
+ BlurEvent,
425
+ FocusEvent,
426
+ GestureResponderEvent,
427
+ LayoutChangeEvent,
428
+ LayoutRectangle,
429
+ MouseEvent,
430
+ PointerEvent,
431
+ NativeMouseEvent,
432
+ NativePointerEvent,
433
+ NativeScrollEvent,
434
+ NativeSyntheticEvent,
435
+ NativeTouchEvent,
436
+ NativeUIEvent,
437
+ ResponderSyntheticEvent,
438
+ ScrollEvent,
439
+ TargetedEvent,
440
+ TextLayoutEvent,
441
+ } from './Libraries/Types/CoreEventTypes';
442
+
443
+ export type {TurboModule} from './Libraries/TurboModule/RCTExport';
444
+ export type * from './Libraries/Types/CodegenTypesNamespace';
445
+
446
+ export type {
447
+ HostInstance,
448
+ NativeMethods,
449
+ NativeMethodsMixin,
450
+ MeasureInWindowOnSuccessCallback,
451
+ MeasureLayoutOnSuccessCallback,
452
+ MeasureOnSuccessCallback,
453
+ } from './src/private/types/HostInstance';
454
+ export type {HostComponent} from './src/private/types/HostComponent';
455
+ export type {ColorSchemeName} from './src/private/specs_DEPRECATED/modules/NativeAppearance';
456
+ export type {ErrorUtils} from './Libraries/vendor/core/ErrorUtils';
457
+ export type {
458
+ PublicRootInstance,
459
+ PublicTextInstance,
460
+ } from './Libraries/ReactPrivate/ReactNativePrivateInterface';
461
+
462
+ export {
463
+ default as unstable_VirtualView,
464
+ VirtualViewMode,
465
+ } from './src/private/components/virtualview/VirtualView';
466
+ export type {ModeChangeEvent} from './src/private/components/virtualview/VirtualView';
467
+
468
+ // Win32 Specific exports
469
+ /* $FlowFixMe[untyped-import] */
470
+ export {ColorGradientWin32} from './Libraries/StyleSheet/PlatformColorValueTypesWin32';
471
+ /* $FlowFixMe[untyped-import] ViewWin32 defined in TS not flow */
472
+ export {default as ViewWin32} from './Libraries/Components/View/ViewWin32';
473
+ /* $FlowFixMe[untyped-import] ButtonWin32 defined in TS not flow */
474
+ export {ButtonWin32} from './Libraries/Components/Button/ButtonWin32';
475
+ /* $FlowFixMe[untyped-import] TouchableWin32 defined in TS not flow */
476
+ export {TouchableWin32} from './Libraries/Components/Touchable/TouchableWin32';
477
+ /* $FlowFixMe[untyped-import] PersonaCoin defined in TS not flow */
478
+ export {PersonaCoin} from './Libraries/PersonaCoin/PersonaCoin';
479
+ /* $FlowFixMe[untyped-import] PersonaCoinSize defined in TS not flow */
480
+ export {PersonaCoinSize} from './Libraries/PersonaCoin/PersonaCoinTypes';
481
+ /* $FlowFixMe[untyped-import] PersonaCoinPresence defined in TS not flow */
482
+ export {PersonaCoinPresence} from './Libraries/PersonaCoin/PersonaCoinTypes';
483
+ // TextWin32 is a legacy export that maps to Text
484
+ export {default as TextWin32} from './Libraries/Text/Text';
485
+ /* $FlowFixMe[untyped-import] FocusManager defined in TS not flow */
486
+ export {default as FocusManager} from './Libraries/Utilities/FocusManager';
487
+
488
+ // #endregion
package/types/index.d.ts CHANGED
@@ -104,6 +104,7 @@ export * from '../Libraries/Components/View/ViewAccessibility';
104
104
  export * from '../Libraries/Components/View/ViewPropTypes';
105
105
  export * from '../Libraries/Components/Button';
106
106
  export * from '../Libraries/Core/registerCallableModule';
107
+ export * as NativeComponentRegistry from '../Libraries/NativeComponent/NativeComponentRegistry';
107
108
  export * from '../Libraries/EventEmitter/NativeEventEmitter';
108
109
  export * from '../Libraries/EventEmitter/RCTDeviceEventEmitter';
109
110
  export * from '../Libraries/EventEmitter/RCTNativeAppEventEmitter';
@@ -120,8 +120,6 @@ export type NativeMethodsMixin = NativeMethods;
120
120
  */
121
121
  export type NativeMethodsMixinType = NativeMethods;
122
122
 
123
- export type HostInstance = NativeMethods;
124
-
125
123
  /**
126
124
  * Represents a native component, such as those returned from `requireNativeComponent`.
127
125
  *
@@ -137,3 +135,118 @@ export interface HostComponent<P>
137
135
  > {
138
136
  new (props: P, context?: any): React.Component<P> & HostInstance;
139
137
  }
138
+
139
+ export interface ArrayLike<T> extends Iterable<T> {
140
+ [indexer: number]: T;
141
+ readonly length: number;
142
+ }
143
+
144
+ export interface HTMLCollection<T> extends Iterable<T>, ArrayLike<T> {
145
+ [index: number]: T;
146
+ readonly length: number;
147
+ item(index: number): null | T;
148
+ namedItem(name: string): null | T;
149
+ [Symbol.iterator](): Iterator<T>;
150
+ }
151
+
152
+ export interface NodeList<T> extends Iterable<T>, ArrayLike<T> {
153
+ [index: number]: T;
154
+ readonly length: number;
155
+ entries(): Iterator<[number, T]>;
156
+ forEach<ThisType>(
157
+ callbackFn: (value: T, index: number, array: NodeList<T>) => unknown,
158
+ thisArg?: ThisType,
159
+ ): void;
160
+ item(index: number): null | T;
161
+ keys(): Iterator<number>;
162
+ values(): Iterator<T>;
163
+ [Symbol.iterator](): Iterator<T>;
164
+ }
165
+
166
+ export interface ReadOnlyNode {
167
+ get childNodes(): NodeList<ReadOnlyNode>;
168
+ compareDocumentPosition(otherNode: ReadOnlyNode): number;
169
+ contains(otherNode: ReadOnlyNode): boolean;
170
+ get firstChild(): null | ReadOnlyNode;
171
+ getRootNode(): ReadOnlyNode;
172
+ hasChildNodes(): boolean;
173
+ get isConnected(): boolean;
174
+ get lastChild(): null | ReadOnlyNode;
175
+ get nextSibling(): null | ReadOnlyNode;
176
+ get nodeName(): string;
177
+ get nodeType(): number;
178
+ get nodeValue(): null | string;
179
+ get ownerDocument(): null | ReactNativeDocument;
180
+ get parentElement(): null | ReadOnlyElement;
181
+ get parentNode(): null | ReadOnlyNode;
182
+ get previousSibling(): null | ReadOnlyNode;
183
+ get textContent(): string;
184
+ }
185
+
186
+ export interface ReactNativeDocument extends ReadOnlyNode {
187
+ get childElementCount(): number;
188
+ get children(): HTMLCollection<ReadOnlyElement>;
189
+ get documentElement(): ReactNativeElement;
190
+ get firstElementChild(): null | ReadOnlyElement;
191
+ getElementById(id: string): null | ReadOnlyElement;
192
+ get lastElementChild(): null | ReadOnlyElement;
193
+ get nodeName(): string;
194
+ get nodeType(): number;
195
+ get nodeValue(): null;
196
+ }
197
+
198
+ export interface ReadOnlyElement extends ReadOnlyNode {
199
+ get childElementCount(): number;
200
+ get children(): HTMLCollection<ReadOnlyElement>;
201
+ get clientHeight(): number;
202
+ get clientLeft(): number;
203
+ get clientTop(): number;
204
+ get clientWidth(): number;
205
+ get firstElementChild(): null | ReadOnlyElement;
206
+ getBoundingClientRect(): DOMRect;
207
+ hasPointerCapture(pointerId: number): boolean;
208
+ get id(): string;
209
+ get lastElementChild(): null | ReadOnlyElement;
210
+ get nextElementSibling(): null | ReadOnlyElement;
211
+ get nodeName(): string;
212
+ get nodeType(): number;
213
+ get nodeValue(): null | string;
214
+ set nodeValue(value: string);
215
+ get previousElementSibling(): null | ReadOnlyElement;
216
+ releasePointerCapture(pointerId: number): void;
217
+ get scrollHeight(): number;
218
+ get scrollLeft(): number;
219
+ get scrollTop(): number;
220
+ get scrollWidth(): number;
221
+ setPointerCapture(pointerId: number): void;
222
+ get tagName(): string;
223
+ get textContent(): string;
224
+ }
225
+
226
+ export interface ReactNativeElement extends ReadOnlyElement, NativeMethods {
227
+ blur(): void;
228
+ focus(): void;
229
+ get offsetHeight(): number;
230
+ get offsetLeft(): number;
231
+ get offsetParent(): null | ReadOnlyElement;
232
+ get offsetTop(): number;
233
+ get offsetWidth(): number;
234
+ setNativeProps(nativeProps: {}): void;
235
+ }
236
+
237
+ export interface ReadOnlyCharacterData extends ReadOnlyNode {
238
+ get data(): string;
239
+ get length(): number;
240
+ get nextElementSibling(): null | ReadOnlyElement;
241
+ get nodeValue(): string;
242
+ get previousElementSibling(): null | ReadOnlyElement;
243
+ substringData(offset: number, count: number): string;
244
+ get textContent(): string;
245
+ }
246
+
247
+ export interface ReadOnlyText extends ReadOnlyCharacterData {
248
+ get nodeName(): string;
249
+ get nodeType(): number;
250
+ }
251
+
252
+ export type HostInstance = ReactNativeElement;