UNPKG

33.3 kBJavaScriptView Raw
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
9 */
10
11'use strict';
12
13// Components
14import typeof AccessibilityInfo from './Libraries/Components/AccessibilityInfo/AccessibilityInfo';
15import typeof ActivityIndicator from './Libraries/Components/ActivityIndicator/ActivityIndicator';
16import typeof Button from './Libraries/Components/Button';
17import typeof DrawerLayoutAndroid from './Libraries/Components/DrawerAndroid/DrawerLayoutAndroid';
18import typeof FlatList from './Libraries/Lists/FlatList';
19import typeof Image from './Libraries/Image/Image';
20import typeof ImageBackground from './Libraries/Image/ImageBackground';
21import typeof InputAccessoryView from './Libraries/Components/TextInput/InputAccessoryView';
22import typeof KeyboardAvoidingView from './Libraries/Components/Keyboard/KeyboardAvoidingView';
23import typeof Modal from './Libraries/Modal/Modal';
24import typeof Pressable from './Libraries/Components/Pressable/Pressable';
25import typeof ProgressBarAndroid from './Libraries/Components/ProgressBarAndroid/ProgressBarAndroid';
26import typeof RefreshControl from './Libraries/Components/RefreshControl/RefreshControl';
27import typeof SafeAreaView from './Libraries/Components/SafeAreaView/SafeAreaView';
28import typeof ScrollView from './Libraries/Components/ScrollView/ScrollView';
29import typeof SectionList from './Libraries/Lists/SectionList';
30import typeof StatusBar from './Libraries/Components/StatusBar/StatusBar';
31import typeof Switch from './Libraries/Components/Switch/Switch';
32import typeof Text from './Libraries/Text/Text';
33import typeof TextInput from './Libraries/Components/TextInput/TextInput';
34import typeof Touchable from './Libraries/Components/Touchable/Touchable';
35import typeof TouchableHighlight from './Libraries/Components/Touchable/TouchableHighlight';
36import typeof TouchableNativeFeedback from './Libraries/Components/Touchable/TouchableNativeFeedback';
37import typeof TouchableOpacity from './Libraries/Components/Touchable/TouchableOpacity';
38import typeof TouchableWithoutFeedback from './Libraries/Components/Touchable/TouchableWithoutFeedback';
39import typeof View from './Libraries/Components/View/View';
40import typeof VirtualizedList from './Libraries/Lists/VirtualizedList';
41import typeof VirtualizedSectionList from './Libraries/Lists/VirtualizedSectionList';
42
43// APIs
44import typeof ActionSheetIOS from './Libraries/ActionSheetIOS/ActionSheetIOS';
45import typeof Alert from './Libraries/Alert/Alert';
46import typeof Animated from './Libraries/Animated/Animated';
47import typeof * as AnimatedModule from './Libraries/Animated/Animated';
48import typeof Appearance from './Libraries/Utilities/Appearance';
49import typeof AppRegistry from './Libraries/ReactNative/AppRegistry';
50import typeof AppState from './Libraries/AppState/AppState';
51import typeof BackHandler from './Libraries/Utilities/BackHandler';
52import typeof Clipboard from './Libraries/Components/Clipboard/Clipboard';
53import typeof DeviceInfo from './Libraries/Utilities/DeviceInfo';
54import typeof DevSettings from './Libraries/Utilities/DevSettings';
55import typeof Dimensions from './Libraries/Utilities/Dimensions';
56import typeof Easing from './Libraries/Animated/Easing';
57import typeof ReactNative from './Libraries/Renderer/shims/ReactNative';
58import typeof I18nManager from './Libraries/ReactNative/I18nManager';
59import typeof InteractionManager from './Libraries/Interaction/InteractionManager';
60import typeof Keyboard from './Libraries/Components/Keyboard/Keyboard';
61import typeof LayoutAnimation from './Libraries/LayoutAnimation/LayoutAnimation';
62import typeof Linking from './Libraries/Linking/Linking';
63import typeof LogBox from './Libraries/LogBox/LogBox';
64import typeof NativeDialogManagerAndroid from './Libraries/NativeModules/specs/NativeDialogManagerAndroid';
65import typeof NativeEventEmitter from './Libraries/EventEmitter/NativeEventEmitter';
66import typeof Networking from './Libraries/Network/RCTNetworking';
67import typeof PanResponder from './Libraries/Interaction/PanResponder';
68import typeof PermissionsAndroid from './Libraries/PermissionsAndroid/PermissionsAndroid';
69import typeof PixelRatio from './Libraries/Utilities/PixelRatio';
70import typeof PushNotificationIOS from './Libraries/PushNotificationIOS/PushNotificationIOS';
71import typeof Settings from './Libraries/Settings/Settings';
72import typeof Share from './Libraries/Share/Share';
73import typeof StyleSheet from './Libraries/StyleSheet/StyleSheet';
74import typeof * as Systrace from './Libraries/Performance/Systrace';
75import typeof ToastAndroid from './Libraries/Components/ToastAndroid/ToastAndroid';
76import typeof * as TurboModuleRegistry from './Libraries/TurboModule/TurboModuleRegistry';
77import typeof UIManager from './Libraries/ReactNative/UIManager';
78import typeof useAnimatedValue from './Libraries/Animated/useAnimatedValue';
79import typeof useColorScheme from './Libraries/Utilities/useColorScheme';
80import typeof useWindowDimensions from './Libraries/Utilities/useWindowDimensions';
81import typeof UTFSequence from './Libraries/UTFSequence';
82import typeof Vibration from './Libraries/Vibration/Vibration';
83import typeof YellowBox from './Libraries/YellowBox/YellowBoxDeprecated';
84
85// Plugins
86import typeof {DynamicColorIOS} from './Libraries/StyleSheet/PlatformColorValueTypesIOS';
87import typeof NativeModules from './Libraries/BatchedBridge/NativeModules';
88import typeof Platform from './Libraries/Utilities/Platform';
89import typeof {PlatformColor} from './Libraries/StyleSheet/PlatformColorValueTypes';
90import typeof processColor from './Libraries/StyleSheet/processColor';
91import typeof RCTDeviceEventEmitter from './Libraries/EventEmitter/RCTDeviceEventEmitter';
92import typeof RCTNativeAppEventEmitter from './Libraries/EventEmitter/RCTNativeAppEventEmitter';
93import typeof {RootTagContext} from './Libraries/ReactNative/RootTag';
94
95import type {HostComponent as _HostComponentInternal} from './Libraries/Renderer/shims/ReactNativeTypes';
96
97export type HostComponent<T> = _HostComponentInternal<T>;
98
99const invariant = require('invariant');
100const warnOnce = require('./Libraries/Utilities/warnOnce');
101
102module.exports = {
103 // Components
104 get AccessibilityInfo(): AccessibilityInfo {
105 return require('./Libraries/Components/AccessibilityInfo/AccessibilityInfo')
106 .default;
107 },
108 get ActivityIndicator(): ActivityIndicator {
109 return require('./Libraries/Components/ActivityIndicator/ActivityIndicator')
110 .default;
111 },
112 get Button(): Button {
113 return require('./Libraries/Components/Button');
114 },
115 // $FlowFixMe[value-as-type]
116 get DrawerLayoutAndroid(): DrawerLayoutAndroid {
117 return require('./Libraries/Components/DrawerAndroid/DrawerLayoutAndroid');
118 },
119 get FlatList(): FlatList {
120 return require('./Libraries/Lists/FlatList');
121 },
122 get Image(): Image {
123 return require('./Libraries/Image/Image');
124 },
125 get ImageBackground(): ImageBackground {
126 return require('./Libraries/Image/ImageBackground');
127 },
128 get InputAccessoryView(): InputAccessoryView {
129 return require('./Libraries/Components/TextInput/InputAccessoryView');
130 },
131 get KeyboardAvoidingView(): KeyboardAvoidingView {
132 return require('./Libraries/Components/Keyboard/KeyboardAvoidingView')
133 .default;
134 },
135 get Modal(): Modal {
136 return require('./Libraries/Modal/Modal');
137 },
138 get Pressable(): Pressable {
139 return require('./Libraries/Components/Pressable/Pressable').default;
140 },
141 // $FlowFixMe[value-as-type]
142 get ProgressBarAndroid(): ProgressBarAndroid {
143 warnOnce(
144 'progress-bar-android-moved',
145 'ProgressBarAndroid has been extracted from react-native core and will be removed in a future release. ' +
146 "It can now be installed and imported from '@react-native-community/progress-bar-android' instead of 'react-native'. " +
147 'See https://github.com/react-native-progress-view/progress-bar-android',
148 );
149 return require('./Libraries/Components/ProgressBarAndroid/ProgressBarAndroid');
150 },
151 get RefreshControl(): RefreshControl {
152 return require('./Libraries/Components/RefreshControl/RefreshControl');
153 },
154 get SafeAreaView(): SafeAreaView {
155 return require('./Libraries/Components/SafeAreaView/SafeAreaView').default;
156 },
157 get ScrollView(): ScrollView {
158 return require('./Libraries/Components/ScrollView/ScrollView');
159 },
160 get SectionList(): SectionList {
161 return require('./Libraries/Lists/SectionList').default;
162 },
163 get StatusBar(): StatusBar {
164 return require('./Libraries/Components/StatusBar/StatusBar');
165 },
166 get Switch(): Switch {
167 return require('./Libraries/Components/Switch/Switch').default;
168 },
169 get Text(): Text {
170 return require('./Libraries/Text/Text');
171 },
172 get TextInput(): TextInput {
173 return require('./Libraries/Components/TextInput/TextInput');
174 },
175 get Touchable(): Touchable {
176 return require('./Libraries/Components/Touchable/Touchable');
177 },
178 get TouchableHighlight(): TouchableHighlight {
179 return require('./Libraries/Components/Touchable/TouchableHighlight');
180 },
181 get TouchableNativeFeedback(): TouchableNativeFeedback {
182 return require('./Libraries/Components/Touchable/TouchableNativeFeedback');
183 },
184 get TouchableOpacity(): TouchableOpacity {
185 return require('./Libraries/Components/Touchable/TouchableOpacity');
186 },
187 get TouchableWithoutFeedback(): TouchableWithoutFeedback {
188 return require('./Libraries/Components/Touchable/TouchableWithoutFeedback');
189 },
190 get View(): View {
191 return require('./Libraries/Components/View/View');
192 },
193 get VirtualizedList(): VirtualizedList {
194 return require('./Libraries/Lists/VirtualizedList');
195 },
196 get VirtualizedSectionList(): VirtualizedSectionList {
197 return require('./Libraries/Lists/VirtualizedSectionList');
198 },
199
200 // APIs
201 get ActionSheetIOS(): ActionSheetIOS {
202 return require('./Libraries/ActionSheetIOS/ActionSheetIOS');
203 },
204 get Alert(): Alert {
205 return require('./Libraries/Alert/Alert');
206 },
207 // Include any types exported in the Animated module together with its default export, so
208 // you can references types such as Animated.Numeric
209 get Animated(): {...$Diff<AnimatedModule, {default: any}>, ...Animated} {
210 // $FlowExpectedError[prop-missing]: we only return the default export, all other exports are types
211 return require('./Libraries/Animated/Animated').default;
212 },
213 get Appearance(): Appearance {
214 return require('./Libraries/Utilities/Appearance');
215 },
216 get AppRegistry(): AppRegistry {
217 return require('./Libraries/ReactNative/AppRegistry');
218 },
219 get AppState(): AppState {
220 return require('./Libraries/AppState/AppState');
221 },
222 get BackHandler(): BackHandler {
223 return require('./Libraries/Utilities/BackHandler');
224 },
225 get Clipboard(): Clipboard {
226 warnOnce(
227 'clipboard-moved',
228 'Clipboard has been extracted from react-native core and will be removed in a future release. ' +
229 "It can now be installed and imported from '@react-native-clipboard/clipboard' instead of 'react-native'. " +
230 'See https://github.com/react-native-clipboard/clipboard',
231 );
232 return require('./Libraries/Components/Clipboard/Clipboard');
233 },
234 get DeviceInfo(): DeviceInfo {
235 return require('./Libraries/Utilities/DeviceInfo');
236 },
237 get DevSettings(): DevSettings {
238 return require('./Libraries/Utilities/DevSettings');
239 },
240 get Dimensions(): Dimensions {
241 return require('./Libraries/Utilities/Dimensions').default;
242 },
243 get Easing(): Easing {
244 return require('./Libraries/Animated/Easing').default;
245 },
246 get findNodeHandle(): $PropertyType<ReactNative, 'findNodeHandle'> {
247 return require('./Libraries/ReactNative/RendererProxy').findNodeHandle;
248 },
249 get I18nManager(): I18nManager {
250 return require('./Libraries/ReactNative/I18nManager');
251 },
252 get InteractionManager(): InteractionManager {
253 return require('./Libraries/Interaction/InteractionManager');
254 },
255 get Keyboard(): Keyboard {
256 return require('./Libraries/Components/Keyboard/Keyboard');
257 },
258 get LayoutAnimation(): LayoutAnimation {
259 return require('./Libraries/LayoutAnimation/LayoutAnimation');
260 },
261 get Linking(): Linking {
262 return require('./Libraries/Linking/Linking');
263 },
264 get LogBox(): LogBox {
265 return require('./Libraries/LogBox/LogBox').default;
266 },
267 get NativeDialogManagerAndroid(): NativeDialogManagerAndroid {
268 return require('./Libraries/NativeModules/specs/NativeDialogManagerAndroid')
269 .default;
270 },
271 get NativeEventEmitter(): NativeEventEmitter {
272 return require('./Libraries/EventEmitter/NativeEventEmitter').default;
273 },
274 get Networking(): Networking {
275 return require('./Libraries/Network/RCTNetworking').default;
276 },
277 get PanResponder(): PanResponder {
278 return require('./Libraries/Interaction/PanResponder').default;
279 },
280 get PermissionsAndroid(): PermissionsAndroid {
281 return require('./Libraries/PermissionsAndroid/PermissionsAndroid');
282 },
283 get PixelRatio(): PixelRatio {
284 return require('./Libraries/Utilities/PixelRatio').default;
285 },
286 get PushNotificationIOS(): PushNotificationIOS {
287 warnOnce(
288 'pushNotificationIOS-moved',
289 'PushNotificationIOS has been extracted from react-native core and will be removed in a future release. ' +
290 "It can now be installed and imported from '@react-native-community/push-notification-ios' instead of 'react-native'. " +
291 'See https://github.com/react-native-push-notification-ios/push-notification-ios',
292 );
293 return require('./Libraries/PushNotificationIOS/PushNotificationIOS');
294 },
295 get Settings(): Settings {
296 return require('./Libraries/Settings/Settings');
297 },
298 get Share(): Share {
299 return require('./Libraries/Share/Share');
300 },
301 get StyleSheet(): StyleSheet {
302 return require('./Libraries/StyleSheet/StyleSheet');
303 },
304 get Systrace(): Systrace {
305 return require('./Libraries/Performance/Systrace');
306 },
307 // $FlowFixMe[value-as-type]
308 get ToastAndroid(): ToastAndroid {
309 return require('./Libraries/Components/ToastAndroid/ToastAndroid');
310 },
311 get TurboModuleRegistry(): TurboModuleRegistry {
312 return require('./Libraries/TurboModule/TurboModuleRegistry');
313 },
314 get UIManager(): UIManager {
315 return require('./Libraries/ReactNative/UIManager');
316 },
317 get unstable_batchedUpdates(): $PropertyType<
318 ReactNative,
319 'unstable_batchedUpdates',
320 > {
321 return require('./Libraries/ReactNative/RendererProxy')
322 .unstable_batchedUpdates;
323 },
324 get useAnimatedValue(): useAnimatedValue {
325 return require('./Libraries/Animated/useAnimatedValue').default;
326 },
327 get useColorScheme(): useColorScheme {
328 return require('./Libraries/Utilities/useColorScheme').default;
329 },
330 get useWindowDimensions(): useWindowDimensions {
331 return require('./Libraries/Utilities/useWindowDimensions').default;
332 },
333 get UTFSequence(): UTFSequence {
334 return require('./Libraries/UTFSequence').default;
335 },
336 get Vibration(): Vibration {
337 return require('./Libraries/Vibration/Vibration');
338 },
339 get YellowBox(): YellowBox {
340 return require('./Libraries/YellowBox/YellowBoxDeprecated');
341 },
342
343 // Plugins
344 get DeviceEventEmitter(): RCTDeviceEventEmitter {
345 return require('./Libraries/EventEmitter/RCTDeviceEventEmitter').default;
346 },
347 get DynamicColorIOS(): DynamicColorIOS {
348 return require('./Libraries/StyleSheet/PlatformColorValueTypesIOS')
349 .DynamicColorIOS;
350 },
351 get NativeAppEventEmitter(): RCTNativeAppEventEmitter {
352 return require('./Libraries/EventEmitter/RCTNativeAppEventEmitter');
353 },
354 get NativeModules(): NativeModules {
355 return require('./Libraries/BatchedBridge/NativeModules');
356 },
357 get Platform(): Platform {
358 return require('./Libraries/Utilities/Platform');
359 },
360 get PlatformColor(): PlatformColor {
361 return require('./Libraries/StyleSheet/PlatformColorValueTypes')
362 .PlatformColor;
363 },
364 get processColor(): processColor {
365 return require('./Libraries/StyleSheet/processColor').default;
366 },
367 get requireNativeComponent(): <T>(
368 uiViewClassName: string,
369 ) => HostComponent<T> {
370 return require('./Libraries/ReactNative/requireNativeComponent').default;
371 },
372 get RootTagContext(): RootTagContext {
373 return require('./Libraries/ReactNative/RootTag').RootTagContext;
374 },
375 get unstable_enableLogBox(): () => void {
376 return () =>
377 console.warn(
378 'LogBox is enabled by default so there is no need to call unstable_enableLogBox() anymore. This is a no op and will be removed in the next version.',
379 );
380 },
381 // Deprecated Prop Types
382 get ColorPropType(): $FlowFixMe {
383 console.error(
384 'ColorPropType will be removed from React Native, along with all ' +
385 'other PropTypes. We recommend that you migrate away from PropTypes ' +
386 'and switch to a type system like TypeScript. If you need to ' +
387 'continue using ColorPropType, migrate to the ' +
388 "'deprecated-react-native-prop-types' package.",
389 );
390 return require('deprecated-react-native-prop-types').ColorPropType;
391 },
392 get EdgeInsetsPropType(): $FlowFixMe {
393 console.error(
394 'EdgeInsetsPropType will be removed from React Native, along with all ' +
395 'other PropTypes. We recommend that you migrate away from PropTypes ' +
396 'and switch to a type system like TypeScript. If you need to ' +
397 'continue using EdgeInsetsPropType, migrate to the ' +
398 "'deprecated-react-native-prop-types' package.",
399 );
400 return require('deprecated-react-native-prop-types').EdgeInsetsPropType;
401 },
402 get PointPropType(): $FlowFixMe {
403 console.error(
404 'PointPropType will be removed from React Native, along with all ' +
405 'other PropTypes. We recommend that you migrate away from PropTypes ' +
406 'and switch to a type system like TypeScript. If you need to ' +
407 'continue using PointPropType, migrate to the ' +
408 "'deprecated-react-native-prop-types' package.",
409 );
410 return require('deprecated-react-native-prop-types').PointPropType;
411 },
412 get ViewPropTypes(): $FlowFixMe {
413 console.error(
414 'ViewPropTypes will be removed from React Native, along with all ' +
415 'other PropTypes. We recommend that you migrate away from PropTypes ' +
416 'and switch to a type system like TypeScript. If you need to ' +
417 'continue using ViewPropTypes, migrate to the ' +
418 "'deprecated-react-native-prop-types' package.",
419 );
420 return require('deprecated-react-native-prop-types').ViewPropTypes;
421 },
422};
423
424if (__DEV__) {
425 /* $FlowFixMe[prop-missing] This is intentional: Flow will error when
426 * attempting to access ART. */
427 /* $FlowFixMe[invalid-export] This is intentional: Flow will error when
428 * attempting to access ART. */
429 Object.defineProperty(module.exports, 'ART', {
430 configurable: true,
431 get() {
432 invariant(
433 false,
434 'ART has been removed from React Native. ' +
435 "It can now be installed and imported from '@react-native-community/art' instead of 'react-native'. " +
436 'See https://github.com/react-native-art/art',
437 );
438 },
439 });
440
441 /* $FlowFixMe[prop-missing] This is intentional: Flow will error when
442 * attempting to access ListView. */
443 /* $FlowFixMe[invalid-export] This is intentional: Flow will error when
444 * attempting to access ListView. */
445 Object.defineProperty(module.exports, 'ListView', {
446 configurable: true,
447 get() {
448 invariant(
449 false,
450 'ListView has been removed from React Native. ' +
451 'See https://fb.me/nolistview for more information or use ' +
452 '`deprecated-react-native-listview`.',
453 );
454 },
455 });
456
457 /* $FlowFixMe[prop-missing] This is intentional: Flow will error when
458 * attempting to access SwipeableListView. */
459 /* $FlowFixMe[invalid-export] This is intentional: Flow will error when
460 * attempting to access SwipeableListView. */
461 Object.defineProperty(module.exports, 'SwipeableListView', {
462 configurable: true,
463 get() {
464 invariant(
465 false,
466 'SwipeableListView has been removed from React Native. ' +
467 'See https://fb.me/nolistview for more information or use ' +
468 '`deprecated-react-native-swipeable-listview`.',
469 );
470 },
471 });
472
473 /* $FlowFixMe[prop-missing] This is intentional: Flow will error when
474 * attempting to access WebView. */
475 /* $FlowFixMe[invalid-export] This is intentional: Flow will error when
476 * attempting to access WebView. */
477 Object.defineProperty(module.exports, 'WebView', {
478 configurable: true,
479 get() {
480 invariant(
481 false,
482 'WebView has been removed from React Native. ' +
483 "It can now be installed and imported from 'react-native-webview' instead of 'react-native'. " +
484 'See https://github.com/react-native-webview/react-native-webview',
485 );
486 },
487 });
488
489 /* $FlowFixMe[prop-missing] This is intentional: Flow will error when
490 * attempting to access NetInfo. */
491 /* $FlowFixMe[invalid-export] This is intentional: Flow will error when
492 * attempting to access NetInfo. */
493 Object.defineProperty(module.exports, 'NetInfo', {
494 configurable: true,
495 get() {
496 invariant(
497 false,
498 'NetInfo has been removed from React Native. ' +
499 "It can now be installed and imported from '@react-native-community/netinfo' instead of 'react-native'. " +
500 'See https://github.com/react-native-netinfo/react-native-netinfo',
501 );
502 },
503 });
504
505 /* $FlowFixMe[prop-missing] This is intentional: Flow will error when
506 * attempting to access CameraRoll. */
507 /* $FlowFixMe[invalid-export] This is intentional: Flow will error when
508 * attempting to access CameraRoll. */
509 Object.defineProperty(module.exports, 'CameraRoll', {
510 configurable: true,
511 get() {
512 invariant(
513 false,
514 'CameraRoll has been removed from React Native. ' +
515 "It can now be installed and imported from '@react-native-community/cameraroll' instead of 'react-native'. " +
516 'See https://github.com/react-native-cameraroll/react-native-cameraroll',
517 );
518 },
519 });
520
521 /* $FlowFixMe[prop-missing] This is intentional: Flow will error when
522 * attempting to access ImageStore. */
523 /* $FlowFixMe[invalid-export] This is intentional: Flow will error when
524 * attempting to access ImageStore. */
525 Object.defineProperty(module.exports, 'ImageStore', {
526 configurable: true,
527 get() {
528 invariant(
529 false,
530 'ImageStore has been removed from React Native. ' +
531 'To get a base64-encoded string from a local image use either of the following third-party libraries:' +
532 "* expo-file-system: `readAsStringAsync(filepath, 'base64')`" +
533 "* react-native-fs: `readFile(filepath, 'base64')`",
534 );
535 },
536 });
537
538 /* $FlowFixMe[prop-missing] This is intentional: Flow will error when
539 * attempting to access ImageEditor. */
540 /* $FlowFixMe[invalid-export] This is intentional: Flow will error when
541 * attempting to access ImageEditor. */
542 Object.defineProperty(module.exports, 'ImageEditor', {
543 configurable: true,
544 get() {
545 invariant(
546 false,
547 'ImageEditor has been removed from React Native. ' +
548 "It can now be installed and imported from '@react-native-community/image-editor' instead of 'react-native'. " +
549 'See https://github.com/callstack/react-native-image-editor',
550 );
551 },
552 });
553
554 /* $FlowFixMe[prop-missing] This is intentional: Flow will error when
555 * attempting to access TimePickerAndroid. */
556 /* $FlowFixMe[invalid-export] This is intentional: Flow will error when
557 * attempting to access TimePickerAndroid. */
558 Object.defineProperty(module.exports, 'TimePickerAndroid', {
559 configurable: true,
560 get() {
561 invariant(
562 false,
563 'TimePickerAndroid has been removed from React Native. ' +
564 "It can now be installed and imported from '@react-native-community/datetimepicker' instead of 'react-native'. " +
565 'See https://github.com/react-native-datetimepicker/datetimepicker',
566 );
567 },
568 });
569
570 /* $FlowFixMe[prop-missing] This is intentional: Flow will error when
571 * attempting to access ToolbarAndroid. */
572 /* $FlowFixMe[invalid-export] This is intentional: Flow will error when
573 * attempting to access ToolbarAndroid. */
574 Object.defineProperty(module.exports, 'ToolbarAndroid', {
575 configurable: true,
576 get() {
577 invariant(
578 false,
579 'ToolbarAndroid has been removed from React Native. ' +
580 "It can now be installed and imported from '@react-native-community/toolbar-android' instead of 'react-native'. " +
581 'See https://github.com/react-native-toolbar-android/toolbar-android',
582 );
583 },
584 });
585
586 /* $FlowFixMe[prop-missing] This is intentional: Flow will error when
587 * attempting to access ViewPagerAndroid. */
588 /* $FlowFixMe[invalid-export] This is intentional: Flow will error when
589 * attempting to access ViewPagerAndroid. */
590 Object.defineProperty(module.exports, 'ViewPagerAndroid', {
591 configurable: true,
592 get() {
593 invariant(
594 false,
595 'ViewPagerAndroid has been removed from React Native. ' +
596 "It can now be installed and imported from 'react-native-pager-view' instead of 'react-native'. " +
597 'See https://github.com/callstack/react-native-pager-view',
598 );
599 },
600 });
601
602 /* $FlowFixMe[prop-missing] This is intentional: Flow will error when
603 * attempting to access CheckBox. */
604 /* $FlowFixMe[invalid-export] This is intentional: Flow will error when
605 * attempting to access CheckBox. */
606 Object.defineProperty(module.exports, 'CheckBox', {
607 configurable: true,
608 get() {
609 invariant(
610 false,
611 'CheckBox has been removed from React Native. ' +
612 "It can now be installed and imported from '@react-native-community/checkbox' instead of 'react-native'. " +
613 'See https://github.com/react-native-checkbox/react-native-checkbox',
614 );
615 },
616 });
617
618 /* $FlowFixMe[prop-missing] This is intentional: Flow will error when
619 * attempting to access SegmentedControlIOS. */
620 /* $FlowFixMe[invalid-export] This is intentional: Flow will error when
621 * attempting to access SegmentedControlIOS. */
622 Object.defineProperty(module.exports, 'SegmentedControlIOS', {
623 configurable: true,
624 get() {
625 invariant(
626 false,
627 'SegmentedControlIOS has been removed from React Native. ' +
628 "It can now be installed and imported from '@react-native-community/segmented-checkbox' instead of 'react-native'." +
629 'See https://github.com/react-native-segmented-control/segmented-control',
630 );
631 },
632 });
633
634 /* $FlowFixMe[prop-missing] This is intentional: Flow will error when
635 * attempting to access StatusBarIOS. */
636 /* $FlowFixMe[invalid-export] This is intentional: Flow will error when
637 * attempting to access StatusBarIOS. */
638 Object.defineProperty(module.exports, 'StatusBarIOS', {
639 configurable: true,
640 get() {
641 invariant(
642 false,
643 'StatusBarIOS has been removed from React Native. ' +
644 'Has been merged with StatusBar. ' +
645 'See https://reactnative.dev/docs/statusbar',
646 );
647 },
648 });
649
650 /* $FlowFixMe[prop-missing] This is intentional: Flow will error when
651 * attempting to access PickerIOS. */
652 /* $FlowFixMe[invalid-export] This is intentional: Flow will error when
653 * attempting to access PickerIOS. */
654 Object.defineProperty(module.exports, 'PickerIOS', {
655 configurable: true,
656 get() {
657 invariant(
658 false,
659 'PickerIOS has been removed from React Native. ' +
660 "It can now be installed and imported from '@react-native-picker/picker' instead of 'react-native'. " +
661 'See https://github.com/react-native-picker/picker',
662 );
663 },
664 });
665
666 /* $FlowFixMe[prop-missing] This is intentional: Flow will error when
667 * attempting to access Picker. */
668 /* $FlowFixMe[invalid-export] This is intentional: Flow will error when
669 * attempting to access Picker. */
670 Object.defineProperty(module.exports, 'Picker', {
671 configurable: true,
672 get() {
673 invariant(
674 false,
675 'Picker has been removed from React Native. ' +
676 "It can now be installed and imported from '@react-native-picker/picker' instead of 'react-native'. " +
677 'See https://github.com/react-native-picker/picker',
678 );
679 },
680 });
681 /* $FlowFixMe[prop-missing] This is intentional: Flow will error when
682 * attempting to access DatePickerAndroid. */
683 /* $FlowFixMe[invalid-export] This is intentional: Flow will error when
684 * attempting to access DatePickerAndroid. */
685 Object.defineProperty(module.exports, 'DatePickerAndroid', {
686 configurable: true,
687 get() {
688 invariant(
689 false,
690 'DatePickerAndroid has been removed from React Native. ' +
691 "It can now be installed and imported from '@react-native-community/datetimepicker' instead of 'react-native'. " +
692 'See https://github.com/react-native-datetimepicker/datetimepicker',
693 );
694 },
695 });
696 /* $FlowFixMe[prop-missing] This is intentional: Flow will error when
697 * attempting to access MaskedViewIOS. */
698 /* $FlowFixMe[invalid-export] This is intentional: Flow will error when
699 * attempting to access MaskedViewIOS. */
700 Object.defineProperty(module.exports, 'MaskedViewIOS', {
701 configurable: true,
702 get() {
703 invariant(
704 false,
705 'MaskedViewIOS has been removed from React Native. ' +
706 "It can now be installed and imported from '@react-native-community/react-native-masked-view' instead of 'react-native'. " +
707 'See https://github.com/react-native-masked-view/masked-view',
708 );
709 },
710 });
711 /* $FlowFixMe[prop-missing] This is intentional: Flow will error when
712 * attempting to access AsyncStorage. */
713 /* $FlowFixMe[invalid-export] This is intentional: Flow will error when
714 * attempting to access AsyncStorage. */
715 Object.defineProperty(module.exports, 'AsyncStorage', {
716 configurable: true,
717 get() {
718 invariant(
719 false,
720 'AsyncStorage has been removed from react-native core. ' +
721 "It can now be installed and imported from '@react-native-async-storage/async-storage' instead of 'react-native'. " +
722 'See https://github.com/react-native-async-storage/async-storage',
723 );
724 },
725 });
726 /* $FlowFixMe[prop-missing] This is intentional: Flow will error when
727 * attempting to access ImagePickerIOS. */
728 /* $FlowFixMe[invalid-export] This is intentional: Flow will error when
729 * attempting to access ImagePickerIOS. */
730 Object.defineProperty(module.exports, 'ImagePickerIOS', {
731 configurable: true,
732 get() {
733 invariant(
734 false,
735 'ImagePickerIOS has been removed from React Native. ' +
736 "Please upgrade to use either '@react-native-community/react-native-image-picker' or 'expo-image-picker'. " +
737 "If you cannot upgrade to a different library, please install the deprecated '@react-native-community/image-picker-ios' package. " +
738 'See https://github.com/rnc-archive/react-native-image-picker-ios',
739 );
740 },
741 });
742 /* $FlowFixMe[prop-missing] This is intentional: Flow will error when
743 * attempting to access ProgressViewIOS. */
744 /* $FlowFixMe[invalid-export] This is intentional: Flow will error when
745 * attempting to access ProgressViewIOS. */
746 Object.defineProperty(module.exports, 'ProgressViewIOS', {
747 configurable: true,
748 get() {
749 invariant(
750 false,
751 'ProgressViewIOS has been removed from react-native core. ' +
752 "It can now be installed and imported from '@react-native-community/progress-view' instead of 'react-native'. " +
753 'See https://github.com/react-native-progress-view/progress-view',
754 );
755 },
756 });
757 /* $FlowFixMe[prop-missing] This is intentional: Flow will error when
758 * attempting to access DatePickerIOS. */
759 /* $FlowFixMe[invalid-export] This is intentional: Flow will error when
760 * attempting to access DatePickerIOS. */
761 Object.defineProperty(module.exports, 'DatePickerIOS', {
762 configurable: true,
763 get() {
764 invariant(
765 false,
766 'DatePickerIOS has been removed from react-native core. ' +
767 "It can now be installed and imported from '@react-native-community/datetimepicker' instead of 'react-native'. " +
768 'See https://github.com/react-native-datetimepicker/datetimepicker',
769 );
770 },
771 });
772 /* $FlowFixMe[prop-missing] This is intentional: Flow will error when
773 * attempting to access Slider. */
774 /* $FlowFixMe[invalid-export] This is intentional: Flow will error when
775 * attempting to access Slider. */
776 Object.defineProperty(module.exports, 'Slider', {
777 configurable: true,
778 get() {
779 invariant(
780 false,
781 'Slider has been removed from react-native core. ' +
782 "It can now be installed and imported from '@react-native-community/slider' instead of 'react-native'. " +
783 'See https://github.com/callstack/react-native-slider',
784 );
785 },
786 });
787}