react-native 0.88.0-rc.3 → 0.88.0-rc.5
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.
- package/Libraries/Animated/components/AnimatedScrollView.js +2 -2
- package/Libraries/Components/ActivityIndicator/ActivityIndicator.js +8 -5
- package/Libraries/Components/Button.js +4 -2
- package/Libraries/Components/Keyboard/KeyboardAvoidingView.js +7 -4
- package/Libraries/Components/Pressable/Pressable.js +4 -2
- package/Libraries/Components/TextInput/InputAccessoryView.js +8 -6
- package/Libraries/Components/TextInput/TextInput.js +5 -5
- package/Libraries/Components/Touchable/TouchableWithoutFeedback.js +85 -84
- package/Libraries/Components/View/ViewAccessibility.js +8 -4
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/Libraries/Image/ImageProps.js +38 -18
- package/Libraries/Modal/Modal.js +4 -2
- package/Libraries/StyleSheet/StyleSheet.js +3 -9
- package/Libraries/StyleSheet/StyleSheet.js.flow +3 -9
- package/Libraries/StyleSheet/StyleSheetTypes.js +12 -9
- package/Libraries/StyleSheet/splitLayoutProps.js +6 -6
- package/Libraries/Text/Text.js +6 -6
- package/React/Base/RCTVersion.m +1 -1
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManager.java +16 -2
- package/ReactAndroid/src/main/res/views/uimanager/values/ids.xml +3 -0
- package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
- package/package.json +7 -7
- package/types_generated/Libraries/Components/ActivityIndicator/ActivityIndicator.d.ts +7 -6
- package/types_generated/Libraries/Components/Button.d.ts +30 -29
- package/types_generated/Libraries/Components/Keyboard/KeyboardAvoidingView.d.ts +8 -7
- package/types_generated/Libraries/Components/Pressable/Pressable.d.ts +5 -4
- package/types_generated/Libraries/Components/TextInput/InputAccessoryView.d.ts +7 -6
- package/types_generated/Libraries/Components/Touchable/TouchableWithoutFeedback.d.ts +26 -25
- package/types_generated/Libraries/Components/View/ViewAccessibility.d.ts +23 -22
- package/types_generated/Libraries/Image/ImageProps.d.ts +39 -36
- package/types_generated/Libraries/Modal/Modal.d.ts +4 -3
- package/types_generated/Libraries/StyleSheet/StyleSheet.d.ts +5 -8
- package/types_generated/Libraries/StyleSheet/StyleSheetTypes.d.ts +10 -10
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @format
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
import type {
|
|
11
|
+
import type {ViewStyle} from '../../StyleSheet/StyleSheetTypes';
|
|
12
12
|
import type {
|
|
13
13
|
AnimatedComponentType,
|
|
14
14
|
AnimatedProps,
|
|
@@ -99,7 +99,7 @@ const AnimatedScrollViewWithInvertedRefreshControl =
|
|
|
99
99
|
|
|
100
100
|
// Handle animated props on `refreshControl`.
|
|
101
101
|
const [refreshControlAnimatedProps, refreshControlRef] = useAnimatedProps<
|
|
102
|
-
{style: ?
|
|
102
|
+
{style: ?ViewStyle},
|
|
103
103
|
$FlowFixMe,
|
|
104
104
|
>(intermediatePropsForRefreshControl);
|
|
105
105
|
// NOTE: Assumes that refreshControl.ref` and `refreshControl.style` can be
|
|
@@ -38,11 +38,7 @@ type ActivityIndicatorIOSProps = Readonly<{
|
|
|
38
38
|
hidesWhenStopped?: ?boolean,
|
|
39
39
|
}>;
|
|
40
40
|
|
|
41
|
-
|
|
42
|
-
export type ActivityIndicatorProps = Readonly<{
|
|
43
|
-
...ViewProps,
|
|
44
|
-
...ActivityIndicatorIOSProps,
|
|
45
|
-
|
|
41
|
+
type ActivityIndicatorPropsCore = Readonly<{
|
|
46
42
|
/**
|
|
47
43
|
* Whether to show the indicator (`true`) or hide it (`false`).
|
|
48
44
|
*/
|
|
@@ -67,6 +63,13 @@ export type ActivityIndicatorProps = Readonly<{
|
|
|
67
63
|
size?: ?IndicatorSize,
|
|
68
64
|
}>;
|
|
69
65
|
|
|
66
|
+
/** @build-types emit-as-interface Uniwind compatibility */
|
|
67
|
+
export type ActivityIndicatorProps = Readonly<{
|
|
68
|
+
...ViewProps,
|
|
69
|
+
...ActivityIndicatorIOSProps,
|
|
70
|
+
...ActivityIndicatorPropsCore,
|
|
71
|
+
}>;
|
|
72
|
+
|
|
70
73
|
/**
|
|
71
74
|
* Displays a circular loading indicator.
|
|
72
75
|
*
|
|
@@ -27,8 +27,7 @@ import View from './View/View';
|
|
|
27
27
|
import invariant from 'invariant';
|
|
28
28
|
import * as React from 'react';
|
|
29
29
|
|
|
30
|
-
|
|
31
|
-
export type ButtonProps = Readonly<{
|
|
30
|
+
type ButtonPropsCore = Readonly<{
|
|
32
31
|
/**
|
|
33
32
|
* Text to display inside the button. On Android the given title will be
|
|
34
33
|
* converted to the uppercased form.
|
|
@@ -167,6 +166,9 @@ export type ButtonProps = Readonly<{
|
|
|
167
166
|
accessibilityLanguage?: ?Stringish,
|
|
168
167
|
}>;
|
|
169
168
|
|
|
169
|
+
/** @build-types emit-as-interface Uniwind compatibility */
|
|
170
|
+
export type ButtonProps = ButtonPropsCore;
|
|
171
|
+
|
|
170
172
|
const NativeTouchable:
|
|
171
173
|
typeof TouchableNativeFeedback | typeof TouchableOpacity =
|
|
172
174
|
Platform.OS === 'android' ? TouchableNativeFeedback : TouchableOpacity;
|
|
@@ -26,10 +26,7 @@ import Keyboard from './Keyboard';
|
|
|
26
26
|
import * as React from 'react';
|
|
27
27
|
import {createRef} from 'react';
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
export type KeyboardAvoidingViewProps = Readonly<{
|
|
31
|
-
...ViewProps,
|
|
32
|
-
|
|
29
|
+
type KeyboardAvoidingViewPropsCore = Readonly<{
|
|
33
30
|
/**
|
|
34
31
|
* Specify how to react to the presence of the keyboard.
|
|
35
32
|
*/
|
|
@@ -56,6 +53,12 @@ export type KeyboardAvoidingViewProps = Readonly<{
|
|
|
56
53
|
keyboardVerticalOffset?: number,
|
|
57
54
|
}>;
|
|
58
55
|
|
|
56
|
+
/** @build-types emit-as-interface Uniwind compatibility */
|
|
57
|
+
export type KeyboardAvoidingViewProps = Readonly<{
|
|
58
|
+
...ViewProps,
|
|
59
|
+
...KeyboardAvoidingViewPropsCore,
|
|
60
|
+
}>;
|
|
61
|
+
|
|
59
62
|
type KeyboardAvoidingViewState = {
|
|
60
63
|
bottom: number,
|
|
61
64
|
};
|
|
@@ -32,11 +32,13 @@ export type PressableInstance = HostInstance;
|
|
|
32
32
|
|
|
33
33
|
export type {PressableAndroidRippleConfig};
|
|
34
34
|
|
|
35
|
-
|
|
36
|
-
export type PressableStateCallbackType = Readonly<{
|
|
35
|
+
type PressableStateCallbackTypeCore = Readonly<{
|
|
37
36
|
pressed: boolean,
|
|
38
37
|
}>;
|
|
39
38
|
|
|
39
|
+
/** @build-types emit-as-interface react-native-web compatibility */
|
|
40
|
+
export type PressableStateCallbackType = PressableStateCallbackTypeCore;
|
|
41
|
+
|
|
40
42
|
type PressableBaseProps = Readonly<{
|
|
41
43
|
/**
|
|
42
44
|
* Whether a press gesture can be interrupted by a parent gesture such as a
|
|
@@ -18,12 +18,7 @@ import useWindowDimensions from '../../Utilities/useWindowDimensions';
|
|
|
18
18
|
import RCTInputAccessoryViewNativeComponent from './RCTInputAccessoryViewNativeComponent';
|
|
19
19
|
import * as React from 'react';
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
* InputAccessoryView is deprecated and will be removed in a future release.
|
|
23
|
-
* @deprecated
|
|
24
|
-
* @build-types emit-as-interface Expo compatibility
|
|
25
|
-
*/
|
|
26
|
-
export type InputAccessoryViewProps = Readonly<{
|
|
21
|
+
type InputAccessoryViewPropsCore = Readonly<{
|
|
27
22
|
readonly children: React.Node,
|
|
28
23
|
/**
|
|
29
24
|
* An ID used to associate this `InputAccessoryView` to specified `TextInput`(s).
|
|
@@ -33,6 +28,13 @@ export type InputAccessoryViewProps = Readonly<{
|
|
|
33
28
|
backgroundColor?: ?ColorValue,
|
|
34
29
|
}>;
|
|
35
30
|
|
|
31
|
+
/**
|
|
32
|
+
* InputAccessoryView is deprecated and will be removed in a future release.
|
|
33
|
+
* @deprecated
|
|
34
|
+
* @build-types emit-as-interface Expo compatibility
|
|
35
|
+
*/
|
|
36
|
+
export type InputAccessoryViewProps = InputAccessoryViewPropsCore;
|
|
37
|
+
|
|
36
38
|
/**
|
|
37
39
|
* A component which enables customization of the keyboard input accessory view on iOS. The input accessory view is displayed above the keyboard whenever a `TextInput` has focus. This component can be used to create custom toolbars.
|
|
38
40
|
*
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
import type {HostInstance} from '../../../src/private/types/HostInstance';
|
|
12
|
-
import type {
|
|
12
|
+
import type {TextStyle} from '../../StyleSheet/StyleSheetTypes';
|
|
13
13
|
import type {
|
|
14
14
|
BlurEvent,
|
|
15
15
|
FocusEvent,
|
|
@@ -543,16 +543,16 @@ function InternalTextInput(props: TextInputProps): React.Node {
|
|
|
543
543
|
let _style = props.style;
|
|
544
544
|
const flattenedStyle = flattenStyle<TextStyleProp>(props.style);
|
|
545
545
|
if (flattenedStyle != null) {
|
|
546
|
-
let overrides: ?{...
|
|
546
|
+
let overrides: ?{...TextStyle} = null;
|
|
547
547
|
if (typeof flattenedStyle?.fontWeight === 'number') {
|
|
548
|
-
overrides = overrides || ({} as {...
|
|
548
|
+
overrides = overrides || ({} as {...TextStyle});
|
|
549
549
|
overrides.fontWeight =
|
|
550
550
|
// $FlowFixMe[incompatible-type]
|
|
551
|
-
flattenedStyle.fontWeight.toString() as
|
|
551
|
+
flattenedStyle.fontWeight.toString() as TextStyle['fontWeight'];
|
|
552
552
|
}
|
|
553
553
|
|
|
554
554
|
if (flattenedStyle.verticalAlign != null) {
|
|
555
|
-
overrides = overrides || ({} as {...
|
|
555
|
+
overrides = overrides || ({} as {...TextStyle});
|
|
556
556
|
overrides.textAlignVertical =
|
|
557
557
|
verticalAlignToTextAlignVerticalMap[flattenedStyle.verticalAlign];
|
|
558
558
|
overrides.verticalAlign = undefined;
|
|
@@ -36,92 +36,93 @@ export type TouchableWithoutFeedbackPropsAndroid = {
|
|
|
36
36
|
touchSoundDisabled?: ?boolean,
|
|
37
37
|
};
|
|
38
38
|
|
|
39
|
+
type TouchableWithoutFeedbackPropsCore = {
|
|
40
|
+
children?: ?React.Node,
|
|
41
|
+
/**
|
|
42
|
+
* Delay in ms, from onPressIn, before onLongPress is called.
|
|
43
|
+
*/
|
|
44
|
+
delayLongPress?: ?number,
|
|
45
|
+
/**
|
|
46
|
+
* Delay in ms, from the start of the touch, before onPressIn is called.
|
|
47
|
+
*/
|
|
48
|
+
delayPressIn?: ?number,
|
|
49
|
+
/**
|
|
50
|
+
* Delay in ms, from the release of the touch, before onPressOut is called.
|
|
51
|
+
*/
|
|
52
|
+
delayPressOut?: ?number,
|
|
53
|
+
/**
|
|
54
|
+
* If true, disable all interactions for this component.
|
|
55
|
+
*/
|
|
56
|
+
disabled?: ?boolean,
|
|
57
|
+
/**
|
|
58
|
+
* Whether this View should be focusable with a non-touch input device,
|
|
59
|
+
* eg. receive focus with a hardware keyboard / TV remote.
|
|
60
|
+
*/
|
|
61
|
+
focusable?: ?boolean,
|
|
62
|
+
/**
|
|
63
|
+
* This defines how far your touch can start away from the button.
|
|
64
|
+
* This is added to pressRetentionOffset when moving off of the button.
|
|
65
|
+
* NOTE The touch area never extends past the parent view bounds and
|
|
66
|
+
* the Z-index of sibling views always takes precedence if a touch hits
|
|
67
|
+
* two overlapping views.
|
|
68
|
+
*/
|
|
69
|
+
hitSlop?: ?EdgeInsetsOrSizeProp,
|
|
70
|
+
/**
|
|
71
|
+
* Used to reference react managed views from native code.
|
|
72
|
+
*/
|
|
73
|
+
id?: string,
|
|
74
|
+
importantForAccessibility?: ?('auto' | 'yes' | 'no' | 'no-hide-descendants'),
|
|
75
|
+
nativeID?: ?string,
|
|
76
|
+
onAccessibilityAction?: ?(event: AccessibilityActionEvent) => unknown,
|
|
77
|
+
/**
|
|
78
|
+
* When `accessible` is true (which is the default) this may be called when
|
|
79
|
+
* the OS-specific concept of "blur" occurs, meaning the element lost focus.
|
|
80
|
+
* Some platforms may not have the concept of blur.
|
|
81
|
+
*/
|
|
82
|
+
onBlur?: ?(event: BlurEvent) => unknown,
|
|
83
|
+
/**
|
|
84
|
+
* When `accessible` is true (which is the default) this may be called when
|
|
85
|
+
* the OS-specific concept of "focus" occurs. Some platforms may not have
|
|
86
|
+
* the concept of focus.
|
|
87
|
+
*/
|
|
88
|
+
onFocus?: ?(event: FocusEvent) => unknown,
|
|
89
|
+
/**
|
|
90
|
+
* Invoked on mount and layout changes with
|
|
91
|
+
* {nativeEvent: {layout: {x, y, width, height}}}
|
|
92
|
+
*/
|
|
93
|
+
onLayout?: ?(event: LayoutChangeEvent) => unknown,
|
|
94
|
+
onLongPress?: ?(event: GestureResponderEvent) => unknown,
|
|
95
|
+
/**
|
|
96
|
+
* Called when the touch is released,
|
|
97
|
+
* but not if cancelled (e.g. by a scroll that steals the responder lock).
|
|
98
|
+
*/
|
|
99
|
+
onPress?: ?(event: GestureResponderEvent) => unknown,
|
|
100
|
+
onPressIn?: ?(event: GestureResponderEvent) => unknown,
|
|
101
|
+
onPressOut?: ?(event: GestureResponderEvent) => unknown,
|
|
102
|
+
/**
|
|
103
|
+
* When the scroll view is disabled, this defines how far your
|
|
104
|
+
* touch may move off of the button, before deactivating the button.
|
|
105
|
+
* Once deactivated, try moving it back and you'll see that the button
|
|
106
|
+
* is once again reactivated! Move it back and forth several times
|
|
107
|
+
* while the scroll view is disabled. Ensure you pass in a constant
|
|
108
|
+
* to reduce memory allocations.
|
|
109
|
+
*/
|
|
110
|
+
pressRetentionOffset?: ?EdgeInsetsOrSizeProp,
|
|
111
|
+
rejectResponderTermination?: ?boolean,
|
|
112
|
+
/**
|
|
113
|
+
* Used to locate this view in end-to-end tests.
|
|
114
|
+
*/
|
|
115
|
+
testID?: ?string,
|
|
116
|
+
/**
|
|
117
|
+
* //FIXME: not in doc but available in examples
|
|
118
|
+
*/
|
|
119
|
+
style?: ?ViewStyleProp,
|
|
120
|
+
};
|
|
121
|
+
|
|
39
122
|
/** @build-types emit-as-interface Expo compatibility */
|
|
40
123
|
export type TouchableWithoutFeedbackProps = Readonly<
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* Delay in ms, from onPressIn, before onLongPress is called.
|
|
45
|
-
*/
|
|
46
|
-
delayLongPress?: ?number,
|
|
47
|
-
/**
|
|
48
|
-
* Delay in ms, from the start of the touch, before onPressIn is called.
|
|
49
|
-
*/
|
|
50
|
-
delayPressIn?: ?number,
|
|
51
|
-
/**
|
|
52
|
-
* Delay in ms, from the release of the touch, before onPressOut is called.
|
|
53
|
-
*/
|
|
54
|
-
delayPressOut?: ?number,
|
|
55
|
-
/**
|
|
56
|
-
* If true, disable all interactions for this component.
|
|
57
|
-
*/
|
|
58
|
-
disabled?: ?boolean,
|
|
59
|
-
/**
|
|
60
|
-
* Whether this View should be focusable with a non-touch input device,
|
|
61
|
-
* eg. receive focus with a hardware keyboard / TV remote.
|
|
62
|
-
*/
|
|
63
|
-
focusable?: ?boolean,
|
|
64
|
-
/**
|
|
65
|
-
* This defines how far your touch can start away from the button.
|
|
66
|
-
* This is added to pressRetentionOffset when moving off of the button.
|
|
67
|
-
* NOTE The touch area never extends past the parent view bounds and
|
|
68
|
-
* the Z-index of sibling views always takes precedence if a touch hits
|
|
69
|
-
* two overlapping views.
|
|
70
|
-
*/
|
|
71
|
-
hitSlop?: ?EdgeInsetsOrSizeProp,
|
|
72
|
-
/**
|
|
73
|
-
* Used to reference react managed views from native code.
|
|
74
|
-
*/
|
|
75
|
-
id?: string,
|
|
76
|
-
importantForAccessibility?: ?(
|
|
77
|
-
'auto' | 'yes' | 'no' | 'no-hide-descendants'
|
|
78
|
-
),
|
|
79
|
-
nativeID?: ?string,
|
|
80
|
-
onAccessibilityAction?: ?(event: AccessibilityActionEvent) => unknown,
|
|
81
|
-
/**
|
|
82
|
-
* When `accessible` is true (which is the default) this may be called when
|
|
83
|
-
* the OS-specific concept of "blur" occurs, meaning the element lost focus.
|
|
84
|
-
* Some platforms may not have the concept of blur.
|
|
85
|
-
*/
|
|
86
|
-
onBlur?: ?(event: BlurEvent) => unknown,
|
|
87
|
-
/**
|
|
88
|
-
* When `accessible` is true (which is the default) this may be called when
|
|
89
|
-
* the OS-specific concept of "focus" occurs. Some platforms may not have
|
|
90
|
-
* the concept of focus.
|
|
91
|
-
*/
|
|
92
|
-
onFocus?: ?(event: FocusEvent) => unknown,
|
|
93
|
-
/**
|
|
94
|
-
* Invoked on mount and layout changes with
|
|
95
|
-
* {nativeEvent: {layout: {x, y, width, height}}}
|
|
96
|
-
*/
|
|
97
|
-
onLayout?: ?(event: LayoutChangeEvent) => unknown,
|
|
98
|
-
onLongPress?: ?(event: GestureResponderEvent) => unknown,
|
|
99
|
-
/**
|
|
100
|
-
* Called when the touch is released,
|
|
101
|
-
* but not if cancelled (e.g. by a scroll that steals the responder lock).
|
|
102
|
-
*/
|
|
103
|
-
onPress?: ?(event: GestureResponderEvent) => unknown,
|
|
104
|
-
onPressIn?: ?(event: GestureResponderEvent) => unknown,
|
|
105
|
-
onPressOut?: ?(event: GestureResponderEvent) => unknown,
|
|
106
|
-
/**
|
|
107
|
-
* When the scroll view is disabled, this defines how far your
|
|
108
|
-
* touch may move off of the button, before deactivating the button.
|
|
109
|
-
* Once deactivated, try moving it back and you'll see that the button
|
|
110
|
-
* is once again reactivated! Move it back and forth several times
|
|
111
|
-
* while the scroll view is disabled. Ensure you pass in a constant
|
|
112
|
-
* to reduce memory allocations.
|
|
113
|
-
*/
|
|
114
|
-
pressRetentionOffset?: ?EdgeInsetsOrSizeProp,
|
|
115
|
-
rejectResponderTermination?: ?boolean,
|
|
116
|
-
/**
|
|
117
|
-
* Used to locate this view in end-to-end tests.
|
|
118
|
-
*/
|
|
119
|
-
testID?: ?string,
|
|
120
|
-
/**
|
|
121
|
-
* //FIXME: not in doc but available in examples
|
|
122
|
-
*/
|
|
123
|
-
style?: ?ViewStyleProp,
|
|
124
|
-
} & TouchableWithoutFeedbackPropsAndroid &
|
|
124
|
+
TouchableWithoutFeedbackPropsCore &
|
|
125
|
+
TouchableWithoutFeedbackPropsAndroid &
|
|
125
126
|
TouchableWithoutFeedbackPropsIOS &
|
|
126
127
|
AccessibilityProps,
|
|
127
128
|
>;
|
|
@@ -349,10 +349,7 @@ export type AccessibilityPropsIOS = Readonly<{
|
|
|
349
349
|
accessibilityRespondsToUserInteraction?: ?boolean,
|
|
350
350
|
}>;
|
|
351
351
|
|
|
352
|
-
|
|
353
|
-
export type AccessibilityProps = Readonly<{
|
|
354
|
-
...AccessibilityPropsAndroid,
|
|
355
|
-
...AccessibilityPropsIOS,
|
|
352
|
+
type AccessibilityPropsCore = Readonly<{
|
|
356
353
|
/**
|
|
357
354
|
* When `true`, indicates that the view is an accessibility element.
|
|
358
355
|
* By default, all the touchable elements are accessible.
|
|
@@ -434,3 +431,10 @@ export type AccessibilityProps = Readonly<{
|
|
|
434
431
|
*/
|
|
435
432
|
'aria-hidden'?: ?boolean,
|
|
436
433
|
}>;
|
|
434
|
+
|
|
435
|
+
/** @build-types emit-as-interface react-native-web compatibility */
|
|
436
|
+
export type AccessibilityProps = Readonly<{
|
|
437
|
+
...AccessibilityPropsAndroid,
|
|
438
|
+
...AccessibilityPropsIOS,
|
|
439
|
+
...AccessibilityPropsCore,
|
|
440
|
+
}>;
|
|
@@ -29,7 +29,7 @@ export default class ReactNativeVersion {
|
|
|
29
29
|
static major: number = 0;
|
|
30
30
|
static minor: number = 88;
|
|
31
31
|
static patch: number = 0;
|
|
32
|
-
static prerelease: string | null = 'rc.
|
|
32
|
+
static prerelease: string | null = 'rc.5';
|
|
33
33
|
|
|
34
34
|
static getVersionString(): string {
|
|
35
35
|
return `${this.major}.${this.minor}.${this.patch}${this.prerelease != null ? `-${this.prerelease}` : ''}`;
|
|
@@ -147,10 +147,7 @@ export type ImagePropsAndroid = Readonly<{
|
|
|
147
147
|
resizeMultiplier?: ?number,
|
|
148
148
|
}>;
|
|
149
149
|
|
|
150
|
-
|
|
151
|
-
export type ImagePropsBase = Readonly<{
|
|
152
|
-
...Omit<ViewProps, 'style'>,
|
|
153
|
-
|
|
150
|
+
type ImagePropsBaseCore = Readonly<{
|
|
154
151
|
/**
|
|
155
152
|
* When `true`, indicates the image is an accessibility element.
|
|
156
153
|
*/
|
|
@@ -327,27 +324,38 @@ export type ImagePropsBase = Readonly<{
|
|
|
327
324
|
children?: empty,
|
|
328
325
|
}>;
|
|
329
326
|
|
|
330
|
-
/** @build-types emit-as-interface
|
|
331
|
-
export type
|
|
332
|
-
...
|
|
333
|
-
|
|
334
|
-
|
|
327
|
+
/** @build-types emit-as-interface Expo compatibility */
|
|
328
|
+
export type ImagePropsBase = Readonly<{
|
|
329
|
+
...Omit<
|
|
330
|
+
ViewProps,
|
|
331
|
+
| 'accessibilityLabel'
|
|
332
|
+
| 'accessible'
|
|
333
|
+
| 'aria-label'
|
|
334
|
+
| 'aria-labelledby'
|
|
335
|
+
| 'children'
|
|
336
|
+
| 'onLayout'
|
|
337
|
+
| 'style'
|
|
338
|
+
| 'testID',
|
|
339
|
+
>,
|
|
340
|
+
...ImagePropsBaseCore,
|
|
341
|
+
}>;
|
|
335
342
|
|
|
343
|
+
type ImagePropsCore = Readonly<{
|
|
336
344
|
/**
|
|
337
345
|
* Style applied to the `Image` component.
|
|
338
346
|
*/
|
|
339
347
|
style?: ?ImageStyleProp,
|
|
340
348
|
}>;
|
|
341
349
|
|
|
342
|
-
/**
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
350
|
+
/** @build-types emit-as-interface react-native-web compatibility */
|
|
351
|
+
export type ImageProps = Readonly<{
|
|
352
|
+
...ImagePropsIOS,
|
|
353
|
+
...ImagePropsAndroid,
|
|
354
|
+
...ImagePropsBase,
|
|
355
|
+
...ImagePropsCore,
|
|
356
|
+
}>;
|
|
357
|
+
|
|
358
|
+
type ImageBackgroundPropsCore = Readonly<{
|
|
351
359
|
children?: React.Node,
|
|
352
360
|
|
|
353
361
|
/**
|
|
@@ -367,3 +375,15 @@ export type ImageBackgroundProps = Readonly<{
|
|
|
367
375
|
*/
|
|
368
376
|
imageRef?: React.RefSetter<React.ElementRef<ImageType>>,
|
|
369
377
|
}>;
|
|
378
|
+
|
|
379
|
+
/**
|
|
380
|
+
* ImageBackground is deprecated and will be removed in a future release.
|
|
381
|
+
* Use a `View` with an absolutely positioned `Image` instead.
|
|
382
|
+
* @see https://reactnative.dev/docs/imagebackground
|
|
383
|
+
* @deprecated
|
|
384
|
+
* @build-types emit-as-interface Uniwind compatibility
|
|
385
|
+
*/
|
|
386
|
+
export type ImageBackgroundProps = Readonly<{
|
|
387
|
+
...Omit<ImageProps, 'children' | 'style'>,
|
|
388
|
+
...ImageBackgroundPropsCore,
|
|
389
|
+
}>;
|
package/Libraries/Modal/Modal.js
CHANGED
|
@@ -41,8 +41,7 @@ type OrientationChangeEvent = Readonly<{
|
|
|
41
41
|
orientation: 'portrait' | 'landscape',
|
|
42
42
|
}>;
|
|
43
43
|
|
|
44
|
-
|
|
45
|
-
export type ModalBaseProps = {
|
|
44
|
+
type ModalBasePropsCore = {
|
|
46
45
|
/**
|
|
47
46
|
* Controls how the modal animates. `'slide'` slides in from the bottom,
|
|
48
47
|
* `'fade'` fades into view, `'none'` appears without animation.
|
|
@@ -92,6 +91,9 @@ export type ModalBaseProps = {
|
|
|
92
91
|
modalRef?: React.RefSetter<ModalInstance>,
|
|
93
92
|
};
|
|
94
93
|
|
|
94
|
+
/** @build-types emit-as-interface Uniwind compatibility */
|
|
95
|
+
export type ModalBaseProps = ModalBasePropsCore;
|
|
96
|
+
|
|
95
97
|
export type ModalPropsIOS = {
|
|
96
98
|
/**
|
|
97
99
|
* Controls how the modal appears.
|
|
@@ -16,12 +16,9 @@ import type {
|
|
|
16
16
|
____DangerouslyImpreciseStyle_Internal,
|
|
17
17
|
____DangerouslyImpreciseStyleProp_Internal,
|
|
18
18
|
____FontVariant_Internal,
|
|
19
|
-
____ImageStyle_Internal,
|
|
20
19
|
____ImageStyleProp_Internal,
|
|
21
|
-
____TextStyle_Internal,
|
|
22
20
|
____TextStyleProp_Internal,
|
|
23
21
|
____TransformStyle_Internal,
|
|
24
|
-
____ViewStyle_Internal,
|
|
25
22
|
____ViewStyleProp_Internal,
|
|
26
23
|
NativeColorValue,
|
|
27
24
|
} from './StyleSheetTypes';
|
|
@@ -136,8 +133,7 @@ export type TypeForStyleKey<
|
|
|
136
133
|
* object of styles to pass to a View that can't be precomputed with
|
|
137
134
|
* StyleSheet.create.
|
|
138
135
|
*/
|
|
139
|
-
|
|
140
|
-
export type ViewStyle = ____ViewStyle_Internal;
|
|
136
|
+
export type {ViewStyle} from './StyleSheetTypes';
|
|
141
137
|
|
|
142
138
|
/**
|
|
143
139
|
* This type is an object of the different possible style
|
|
@@ -154,8 +150,7 @@ export type ViewStyle = ____ViewStyle_Internal;
|
|
|
154
150
|
* object of styles to pass to a Text that can't be precomputed with
|
|
155
151
|
* StyleSheet.create.
|
|
156
152
|
*/
|
|
157
|
-
|
|
158
|
-
export type TextStyle = ____TextStyle_Internal;
|
|
153
|
+
export type {TextStyle} from './StyleSheetTypes';
|
|
159
154
|
|
|
160
155
|
/**
|
|
161
156
|
* This type is an object of the different possible style
|
|
@@ -172,8 +167,7 @@ export type TextStyle = ____TextStyle_Internal;
|
|
|
172
167
|
* object of styles to pass to an Image that can't be precomputed with
|
|
173
168
|
* StyleSheet.create.
|
|
174
169
|
*/
|
|
175
|
-
|
|
176
|
-
export type ImageStyle = ____ImageStyle_Internal;
|
|
170
|
+
export type {ImageStyle} from './StyleSheetTypes';
|
|
177
171
|
|
|
178
172
|
/**
|
|
179
173
|
* WARNING: You probably shouldn't be using this type. This type is an object
|
|
@@ -15,12 +15,9 @@ import type {
|
|
|
15
15
|
____DangerouslyImpreciseStyle_Internal,
|
|
16
16
|
____DangerouslyImpreciseStyleProp_Internal,
|
|
17
17
|
____FontVariant_Internal,
|
|
18
|
-
____ImageStyle_Internal,
|
|
19
18
|
____ImageStyleProp_Internal,
|
|
20
|
-
____TextStyle_Internal,
|
|
21
19
|
____TextStyleProp_Internal,
|
|
22
20
|
____TransformStyle_Internal,
|
|
23
|
-
____ViewStyle_Internal,
|
|
24
21
|
____ViewStyleProp_Internal,
|
|
25
22
|
NativeColorValue,
|
|
26
23
|
} from './StyleSheetTypes';
|
|
@@ -137,8 +134,7 @@ export type TypeForStyleKey<
|
|
|
137
134
|
* object of styles to pass to a View that can't be precomputed with
|
|
138
135
|
* StyleSheet.create.
|
|
139
136
|
*/
|
|
140
|
-
|
|
141
|
-
export type ViewStyle = ____ViewStyle_Internal;
|
|
137
|
+
export type {ViewStyle} from './StyleSheetTypes';
|
|
142
138
|
|
|
143
139
|
/**
|
|
144
140
|
* This type is an object of the different possible style
|
|
@@ -155,8 +151,7 @@ export type ViewStyle = ____ViewStyle_Internal;
|
|
|
155
151
|
* object of styles to pass to a Text that can't be precomputed with
|
|
156
152
|
* StyleSheet.create.
|
|
157
153
|
*/
|
|
158
|
-
|
|
159
|
-
export type TextStyle = ____TextStyle_Internal;
|
|
154
|
+
export type {TextStyle} from './StyleSheetTypes';
|
|
160
155
|
|
|
161
156
|
/**
|
|
162
157
|
* This type is an object of the different possible style
|
|
@@ -173,8 +168,7 @@ export type TextStyle = ____TextStyle_Internal;
|
|
|
173
168
|
* object of styles to pass to an Image that can't be precomputed with
|
|
174
169
|
* StyleSheet.create.
|
|
175
170
|
*/
|
|
176
|
-
|
|
177
|
-
export type ImageStyle = ____ImageStyle_Internal;
|
|
171
|
+
export type {ImageStyle} from './StyleSheetTypes';
|
|
178
172
|
|
|
179
173
|
/**
|
|
180
174
|
* WARNING: You probably shouldn't be using this type. This type is an object
|
|
@@ -910,7 +910,8 @@ export type ____ViewStyle_InternalCore = Readonly<{
|
|
|
910
910
|
...____ViewStyle_InternalBase,
|
|
911
911
|
}>;
|
|
912
912
|
|
|
913
|
-
|
|
913
|
+
/** @build-types emit-as-interface react-native-web compatibility */
|
|
914
|
+
export type ViewStyle = Readonly<{
|
|
914
915
|
...____ViewStyle_InternalCore,
|
|
915
916
|
...____ViewStyle_InternalOverrides,
|
|
916
917
|
}>;
|
|
@@ -1047,17 +1048,18 @@ type ____TextStyle_InternalBase = Readonly<{
|
|
|
1047
1048
|
}>;
|
|
1048
1049
|
|
|
1049
1050
|
export type ____TextStyle_InternalCore = Readonly<{
|
|
1050
|
-
...$Exact<
|
|
1051
|
+
...$Exact<ViewStyle>,
|
|
1051
1052
|
...____TextStyle_InternalBase,
|
|
1052
1053
|
}>;
|
|
1053
1054
|
|
|
1054
|
-
|
|
1055
|
+
/** @build-types emit-as-interface react-native-web compatibility */
|
|
1056
|
+
export type TextStyle = Readonly<{
|
|
1055
1057
|
...____TextStyle_InternalCore,
|
|
1056
1058
|
...____TextStyle_InternalOverrides,
|
|
1057
1059
|
}>;
|
|
1058
1060
|
|
|
1059
1061
|
export type ____ImageStyle_InternalCore = Readonly<{
|
|
1060
|
-
...$Exact<
|
|
1062
|
+
...$Exact<ViewStyle>,
|
|
1061
1063
|
resizeMode?: ImageResizeMode,
|
|
1062
1064
|
objectFit?: 'cover' | 'contain' | 'fill' | 'scale-down' | 'none',
|
|
1063
1065
|
tintColor?: ____ColorValue_Internal,
|
|
@@ -1065,13 +1067,14 @@ export type ____ImageStyle_InternalCore = Readonly<{
|
|
|
1065
1067
|
overflow?: 'visible' | 'hidden',
|
|
1066
1068
|
}>;
|
|
1067
1069
|
|
|
1068
|
-
|
|
1070
|
+
/** @build-types emit-as-interface react-native-web compatibility */
|
|
1071
|
+
export type ImageStyle = Readonly<{
|
|
1069
1072
|
...____ImageStyle_InternalCore,
|
|
1070
1073
|
...____ImageStyle_InternalOverrides,
|
|
1071
1074
|
}>;
|
|
1072
1075
|
|
|
1073
1076
|
export type ____DangerouslyImpreciseStyle_InternalCore = Readonly<{
|
|
1074
|
-
...$Exact<
|
|
1077
|
+
...$Exact<TextStyle>,
|
|
1075
1078
|
resizeMode?: ImageResizeMode,
|
|
1076
1079
|
objectFit?: 'cover' | 'contain' | 'fill' | 'scale-down' | 'none',
|
|
1077
1080
|
tintColor?: ____ColorValue_Internal,
|
|
@@ -1095,13 +1098,13 @@ export type ____DangerouslyImpreciseAnimatedStyleProp_Internal =
|
|
|
1095
1098
|
WithAnimatedValue<StyleProp<Partial<____DangerouslyImpreciseStyle_Internal>>>;
|
|
1096
1099
|
|
|
1097
1100
|
export type ____ViewStyleProp_Internal = StyleProp<
|
|
1098
|
-
Readonly<Partial<
|
|
1101
|
+
Readonly<Partial<ViewStyle>>,
|
|
1099
1102
|
>;
|
|
1100
1103
|
export type ____TextStyleProp_Internal = StyleProp<
|
|
1101
|
-
Readonly<Partial<
|
|
1104
|
+
Readonly<Partial<TextStyle>>,
|
|
1102
1105
|
>;
|
|
1103
1106
|
export type ____ImageStyleProp_Internal = StyleProp<
|
|
1104
|
-
Readonly<Partial<
|
|
1107
|
+
Readonly<Partial<ImageStyle>>,
|
|
1105
1108
|
>;
|
|
1106
1109
|
|
|
1107
1110
|
export type ____Styles_Internal = {
|
|
@@ -8,14 +8,14 @@
|
|
|
8
8
|
* @format
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
import type {
|
|
11
|
+
import type {ViewStyle} from './StyleSheetTypes';
|
|
12
12
|
|
|
13
|
-
export default function splitLayoutProps(props: ?
|
|
14
|
-
outer: ?
|
|
15
|
-
inner: ?
|
|
13
|
+
export default function splitLayoutProps(props: ?ViewStyle): {
|
|
14
|
+
outer: ?ViewStyle,
|
|
15
|
+
inner: ?ViewStyle,
|
|
16
16
|
} {
|
|
17
|
-
let outer: ?
|
|
18
|
-
let inner: ?
|
|
17
|
+
let outer: ?ViewStyle = null;
|
|
18
|
+
let inner: ?ViewStyle = null;
|
|
19
19
|
|
|
20
20
|
if (props != null) {
|
|
21
21
|
// $FlowFixMe[incompatible-exact] Will contain a subset of keys from `props`.
|