@tamagui/react-native-types 3.0.17 → 3.1.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.
- package/package.json +3 -3
- package/src/generated-legacy.d.ts +670 -2
- package/src/generated.d.ts +1146 -577
- package/src/legacy.d.ts +17 -0
package/src/generated.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* GENERATED by `bun run generate` from react-native 0.
|
|
2
|
+
* GENERATED by `bun run generate` from react-native 0.88.0. Do not edit.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
4
|
+
* 209 declarations reached from 25 roots, plus
|
|
5
5
|
* the AnimatedNode handle from its declaring module.
|
|
6
6
|
* Everything Tamagui uses from react-native's types on web lives here, so no
|
|
7
7
|
* non-`.native` file needs react-native installed. To refresh, bump the repo
|
|
@@ -72,6 +72,12 @@ export type ____FontVariant_Internal =
|
|
|
72
72
|
|
|
73
73
|
export type ____FontVariantArray_Internal = ReadonlyArray<____FontVariant_Internal>
|
|
74
74
|
|
|
75
|
+
export type ____FontVariationSettings_Internal =
|
|
76
|
+
| string
|
|
77
|
+
| Readonly<{
|
|
78
|
+
[axis: string]: number
|
|
79
|
+
}>
|
|
80
|
+
|
|
75
81
|
export type ____FontWeight_Internal =
|
|
76
82
|
| 'normal'
|
|
77
83
|
| 'bold'
|
|
@@ -104,21 +110,10 @@ export type ____FontWeight_Internal =
|
|
|
104
110
|
| 'heavy'
|
|
105
111
|
| 'black'
|
|
106
112
|
|
|
107
|
-
export type ____ImageStyle_Internal = Readonly<
|
|
108
|
-
Omit<____ImageStyle_InternalCore, keyof ____ImageStyle_InternalOverrides | keyof {}> &
|
|
109
|
-
Omit<____ImageStyle_InternalOverrides, keyof {}> & {}
|
|
110
|
-
>
|
|
111
|
-
|
|
112
113
|
export type ____ImageStyle_InternalCore = Readonly<
|
|
113
114
|
Omit<
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
resizeMode?: ImageResizeMode | undefined
|
|
117
|
-
objectFit?: 'cover' | 'contain' | 'fill' | 'scale-down' | 'none' | undefined
|
|
118
|
-
tintColor?: ____ColorValue_Internal | undefined
|
|
119
|
-
overlayColor?: ColorValue | undefined
|
|
120
|
-
overflow?: 'visible' | 'hidden' | undefined
|
|
121
|
-
}
|
|
115
|
+
ViewStyle,
|
|
116
|
+
'resizeMode' | 'objectFit' | 'tintColor' | 'overlayColor' | 'overflow'
|
|
122
117
|
> & {
|
|
123
118
|
resizeMode?: ImageResizeMode | undefined
|
|
124
119
|
objectFit?: 'cover' | 'contain' | 'fill' | 'scale-down' | 'none' | undefined
|
|
@@ -130,9 +125,7 @@ export type ____ImageStyle_InternalCore = Readonly<
|
|
|
130
125
|
|
|
131
126
|
export type ____ImageStyle_InternalOverrides = Readonly<{}>
|
|
132
127
|
|
|
133
|
-
export type ____ImageStyleProp_Internal = StyleProp<
|
|
134
|
-
Readonly<Partial<____ImageStyle_Internal>>
|
|
135
|
-
>
|
|
128
|
+
export type ____ImageStyleProp_Internal = StyleProp<Readonly<Partial<ImageStyle>>>
|
|
136
129
|
|
|
137
130
|
export type ____LayoutStyle_Internal = Readonly<{
|
|
138
131
|
/** `display` sets the display type of this component.
|
|
@@ -712,11 +705,6 @@ export type ____ShadowStyle_InternalCore = Readonly<{
|
|
|
712
705
|
|
|
713
706
|
export type ____ShadowStyle_InternalOverrides = Readonly<{}>
|
|
714
707
|
|
|
715
|
-
export type ____TextStyle_Internal = Readonly<
|
|
716
|
-
Omit<____TextStyle_InternalCore, keyof ____TextStyle_InternalOverrides | keyof {}> &
|
|
717
|
-
Omit<____TextStyle_InternalOverrides, keyof {}> & {}
|
|
718
|
-
>
|
|
719
|
-
|
|
720
708
|
export type ____TextStyle_InternalBase = Readonly<{
|
|
721
709
|
color?: ____ColorValue_Internal | undefined
|
|
722
710
|
fontFamily?: string | undefined
|
|
@@ -729,6 +717,13 @@ export type ____TextStyle_InternalBase = Readonly<{
|
|
|
729
717
|
*/
|
|
730
718
|
fontWeight?: ____FontWeight_Internal | undefined
|
|
731
719
|
fontVariant?: ____FontVariantArray_Internal | string | undefined
|
|
720
|
+
/**
|
|
721
|
+
* Specifies OpenType font variation axis values using CSS syntax or an
|
|
722
|
+
* object keyed by four-character axis tags. An empty string or object resets
|
|
723
|
+
* inherited variation settings. On Android, this requires API level 26 or
|
|
724
|
+
* later.
|
|
725
|
+
*/
|
|
726
|
+
fontVariationSettings?: ____FontVariationSettings_Internal | undefined
|
|
732
727
|
textShadowOffset?:
|
|
733
728
|
| Readonly<{
|
|
734
729
|
width: number
|
|
@@ -765,15 +760,13 @@ export type ____TextStyle_InternalBase = Readonly<{
|
|
|
765
760
|
}>
|
|
766
761
|
|
|
767
762
|
export type ____TextStyle_InternalCore = Readonly<
|
|
768
|
-
Omit<
|
|
763
|
+
Omit<ViewStyle, keyof ____TextStyle_InternalBase | keyof {}> &
|
|
769
764
|
Omit<____TextStyle_InternalBase, keyof {}> & {}
|
|
770
765
|
>
|
|
771
766
|
|
|
772
767
|
export type ____TextStyle_InternalOverrides = Readonly<{}>
|
|
773
768
|
|
|
774
|
-
export type ____TextStyleProp_Internal = StyleProp<
|
|
775
|
-
Readonly<Partial<____TextStyle_Internal>>
|
|
776
|
-
>
|
|
769
|
+
export type ____TextStyleProp_Internal = StyleProp<Readonly<Partial<TextStyle>>>
|
|
777
770
|
|
|
778
771
|
export type ____TransformStyle_Internal = Readonly<{
|
|
779
772
|
/**
|
|
@@ -864,11 +857,6 @@ export type ____TransformStyle_Internal = Readonly<{
|
|
|
864
857
|
| undefined
|
|
865
858
|
}>
|
|
866
859
|
|
|
867
|
-
export type ____ViewStyle_Internal = Readonly<
|
|
868
|
-
Omit<____ViewStyle_InternalCore, keyof ____ViewStyle_InternalOverrides | keyof {}> &
|
|
869
|
-
Omit<____ViewStyle_InternalOverrides, keyof {}> & {}
|
|
870
|
-
>
|
|
871
|
-
|
|
872
860
|
export type ____ViewStyle_InternalBase = Readonly<{
|
|
873
861
|
backfaceVisibility?: 'visible' | 'hidden' | undefined
|
|
874
862
|
backgroundColor?: ____ColorValue_Internal | undefined
|
|
@@ -932,11 +920,14 @@ export type ____ViewStyle_InternalBase = Readonly<{
|
|
|
932
920
|
mixBlendMode?: ____BlendMode_Internal | undefined
|
|
933
921
|
backgroundImage?: ReadonlyArray<BackgroundImageValue> | string | undefined
|
|
934
922
|
experimental_backgroundImage?: ReadonlyArray<BackgroundImageValue> | string | undefined
|
|
923
|
+
backgroundSize?: ReadonlyArray<BackgroundSizeValue> | string | undefined
|
|
935
924
|
experimental_backgroundSize?: ReadonlyArray<BackgroundSizeValue> | string | undefined
|
|
925
|
+
backgroundPosition?: ReadonlyArray<BackgroundPositionValue> | string | undefined
|
|
936
926
|
experimental_backgroundPosition?:
|
|
937
927
|
| ReadonlyArray<BackgroundPositionValue>
|
|
938
928
|
| string
|
|
939
929
|
| undefined
|
|
930
|
+
backgroundRepeat?: ReadonlyArray<BackgroundRepeatValue> | string | undefined
|
|
940
931
|
experimental_backgroundRepeat?:
|
|
941
932
|
| ReadonlyArray<BackgroundRepeatValue>
|
|
942
933
|
| string
|
|
@@ -962,9 +953,7 @@ export type ____ViewStyle_InternalCore = Readonly<
|
|
|
962
953
|
|
|
963
954
|
export type ____ViewStyle_InternalOverrides = Readonly<{}>
|
|
964
955
|
|
|
965
|
-
export type ____ViewStyleProp_Internal = StyleProp<
|
|
966
|
-
Readonly<Partial<____ViewStyle_Internal>>
|
|
967
|
-
>
|
|
956
|
+
export type ____ViewStyleProp_Internal = StyleProp<Readonly<Partial<ViewStyle>>>
|
|
968
957
|
|
|
969
958
|
export declare class _TextInputInstance extends ReactNativeElement {
|
|
970
959
|
/**
|
|
@@ -984,24 +973,16 @@ export declare class _TextInputInstance extends ReactNativeElement {
|
|
|
984
973
|
|
|
985
974
|
export declare const $$Image: ImageType
|
|
986
975
|
|
|
976
|
+
export declare const $$View: typeof View
|
|
977
|
+
|
|
987
978
|
export type AbstractImageAndroid = (
|
|
988
|
-
props: Omit<
|
|
989
|
-
ImagePropsType,
|
|
990
|
-
keyof {
|
|
991
|
-
ref?: React.Ref<HostInstance> | undefined
|
|
992
|
-
}
|
|
993
|
-
> & {
|
|
979
|
+
props: Omit<ImagePropsType, 'ref'> & {
|
|
994
980
|
ref?: React.Ref<HostInstance> | undefined
|
|
995
981
|
}
|
|
996
982
|
) => React.ReactNode
|
|
997
983
|
|
|
998
984
|
export type AbstractImageIOS = (
|
|
999
|
-
props: Omit<
|
|
1000
|
-
ImagePropsType,
|
|
1001
|
-
keyof {
|
|
1002
|
-
ref?: React.Ref<HostInstance> | undefined
|
|
1003
|
-
}
|
|
1004
|
-
> & {
|
|
985
|
+
props: Omit<ImagePropsType, 'ref'> & {
|
|
1005
986
|
ref?: React.Ref<HostInstance> | undefined
|
|
1006
987
|
}
|
|
1007
988
|
) => React.ReactNode
|
|
@@ -1046,233 +1027,14 @@ export type AccessibilityActionName =
|
|
|
1046
1027
|
*/
|
|
1047
1028
|
| 'escape'
|
|
1048
1029
|
|
|
1049
|
-
export
|
|
1030
|
+
export interface AccessibilityProps extends Readonly<
|
|
1050
1031
|
Omit<
|
|
1051
1032
|
AccessibilityPropsAndroid,
|
|
1052
|
-
| keyof
|
|
1053
|
-
| keyof {
|
|
1054
|
-
/**
|
|
1055
|
-
* When `true`, indicates that the view is an accessibility element.
|
|
1056
|
-
* By default, all the touchable elements are accessible.
|
|
1057
|
-
*
|
|
1058
|
-
* See https://reactnative.dev/docs/view#accessible
|
|
1059
|
-
*/
|
|
1060
|
-
accessible?: boolean | undefined
|
|
1061
|
-
/**
|
|
1062
|
-
* Overrides the text that's read by the screen reader when the user interacts
|
|
1063
|
-
* with the element. By default, the label is constructed by traversing all
|
|
1064
|
-
* the children and accumulating all the `Text` nodes separated by space.
|
|
1065
|
-
*
|
|
1066
|
-
* See https://reactnative.dev/docs/view#accessibilitylabel
|
|
1067
|
-
*/
|
|
1068
|
-
accessibilityLabel?: string | undefined
|
|
1069
|
-
/**
|
|
1070
|
-
* An accessibility hint helps users understand what will happen when they perform
|
|
1071
|
-
* an action on the accessibility element when that result is not obvious from the
|
|
1072
|
-
* accessibility label.
|
|
1073
|
-
*
|
|
1074
|
-
*
|
|
1075
|
-
* See https://reactnative.dev/docs/view#accessibilityHint
|
|
1076
|
-
*/
|
|
1077
|
-
accessibilityHint?: string | undefined
|
|
1078
|
-
/**
|
|
1079
|
-
* Alias for accessibilityLabel https://reactnative.dev/docs/view#accessibilitylabel
|
|
1080
|
-
* https://github.com/facebook/react-native/issues/34424
|
|
1081
|
-
*/
|
|
1082
|
-
'aria-label'?: string | undefined
|
|
1083
|
-
/**
|
|
1084
|
-
* Indicates to accessibility services to treat UI component like a specific role.
|
|
1085
|
-
*/
|
|
1086
|
-
accessibilityRole?: AccessibilityRole | undefined
|
|
1087
|
-
/**
|
|
1088
|
-
* Alias for accessibilityRole
|
|
1089
|
-
*/
|
|
1090
|
-
role?: Role | undefined
|
|
1091
|
-
/**
|
|
1092
|
-
* Indicates to accessibility services that UI Component is in a specific State.
|
|
1093
|
-
*/
|
|
1094
|
-
accessibilityState?: AccessibilityState | undefined
|
|
1095
|
-
accessibilityValue?: AccessibilityValue | undefined
|
|
1096
|
-
/**
|
|
1097
|
-
* alias for accessibilityState
|
|
1098
|
-
* It represents textual description of a component's value, or for range-based components, such as sliders and progress bars.
|
|
1099
|
-
*/
|
|
1100
|
-
'aria-valuemax'?: AccessibilityValue['max'] | undefined
|
|
1101
|
-
'aria-valuemin'?: AccessibilityValue['min'] | undefined
|
|
1102
|
-
'aria-valuenow'?: AccessibilityValue['now'] | undefined
|
|
1103
|
-
'aria-valuetext'?: AccessibilityValue['text'] | undefined
|
|
1104
|
-
/**
|
|
1105
|
-
* Provides an array of custom actions available for accessibility.
|
|
1106
|
-
*
|
|
1107
|
-
*/
|
|
1108
|
-
accessibilityActions?: ReadonlyArray<AccessibilityActionInfo> | undefined
|
|
1109
|
-
/**
|
|
1110
|
-
* alias for accessibilityState
|
|
1111
|
-
*
|
|
1112
|
-
* see https://reactnative.dev/docs/accessibility#accessibilitystate
|
|
1113
|
-
*/
|
|
1114
|
-
'aria-busy'?: boolean | undefined
|
|
1115
|
-
'aria-checked'?: (boolean | undefined) | 'mixed' | undefined
|
|
1116
|
-
'aria-disabled'?: boolean | undefined
|
|
1117
|
-
'aria-expanded'?: boolean | undefined
|
|
1118
|
-
'aria-selected'?: boolean | undefined
|
|
1119
|
-
/** A value indicating whether the accessibility elements contained within
|
|
1120
|
-
* this accessibility element are hidden.
|
|
1121
|
-
*
|
|
1122
|
-
* See https://reactnative.dev/docs/view#aria-hidden
|
|
1123
|
-
*/
|
|
1124
|
-
'aria-hidden'?: boolean | undefined
|
|
1125
|
-
}
|
|
1033
|
+
keyof AccessibilityPropsIOS | keyof AccessibilityPropsCore | keyof {}
|
|
1126
1034
|
> &
|
|
1127
|
-
Omit<
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
/**
|
|
1131
|
-
* When `true`, indicates that the view is an accessibility element.
|
|
1132
|
-
* By default, all the touchable elements are accessible.
|
|
1133
|
-
*
|
|
1134
|
-
* See https://reactnative.dev/docs/view#accessible
|
|
1135
|
-
*/
|
|
1136
|
-
accessible?: boolean | undefined
|
|
1137
|
-
/**
|
|
1138
|
-
* Overrides the text that's read by the screen reader when the user interacts
|
|
1139
|
-
* with the element. By default, the label is constructed by traversing all
|
|
1140
|
-
* the children and accumulating all the `Text` nodes separated by space.
|
|
1141
|
-
*
|
|
1142
|
-
* See https://reactnative.dev/docs/view#accessibilitylabel
|
|
1143
|
-
*/
|
|
1144
|
-
accessibilityLabel?: string | undefined
|
|
1145
|
-
/**
|
|
1146
|
-
* An accessibility hint helps users understand what will happen when they perform
|
|
1147
|
-
* an action on the accessibility element when that result is not obvious from the
|
|
1148
|
-
* accessibility label.
|
|
1149
|
-
*
|
|
1150
|
-
*
|
|
1151
|
-
* See https://reactnative.dev/docs/view#accessibilityHint
|
|
1152
|
-
*/
|
|
1153
|
-
accessibilityHint?: string | undefined
|
|
1154
|
-
/**
|
|
1155
|
-
* Alias for accessibilityLabel https://reactnative.dev/docs/view#accessibilitylabel
|
|
1156
|
-
* https://github.com/facebook/react-native/issues/34424
|
|
1157
|
-
*/
|
|
1158
|
-
'aria-label'?: string | undefined
|
|
1159
|
-
/**
|
|
1160
|
-
* Indicates to accessibility services to treat UI component like a specific role.
|
|
1161
|
-
*/
|
|
1162
|
-
accessibilityRole?: AccessibilityRole | undefined
|
|
1163
|
-
/**
|
|
1164
|
-
* Alias for accessibilityRole
|
|
1165
|
-
*/
|
|
1166
|
-
role?: Role | undefined
|
|
1167
|
-
/**
|
|
1168
|
-
* Indicates to accessibility services that UI Component is in a specific State.
|
|
1169
|
-
*/
|
|
1170
|
-
accessibilityState?: AccessibilityState | undefined
|
|
1171
|
-
accessibilityValue?: AccessibilityValue | undefined
|
|
1172
|
-
/**
|
|
1173
|
-
* alias for accessibilityState
|
|
1174
|
-
* It represents textual description of a component's value, or for range-based components, such as sliders and progress bars.
|
|
1175
|
-
*/
|
|
1176
|
-
'aria-valuemax'?: AccessibilityValue['max'] | undefined
|
|
1177
|
-
'aria-valuemin'?: AccessibilityValue['min'] | undefined
|
|
1178
|
-
'aria-valuenow'?: AccessibilityValue['now'] | undefined
|
|
1179
|
-
'aria-valuetext'?: AccessibilityValue['text'] | undefined
|
|
1180
|
-
/**
|
|
1181
|
-
* Provides an array of custom actions available for accessibility.
|
|
1182
|
-
*
|
|
1183
|
-
*/
|
|
1184
|
-
accessibilityActions?: ReadonlyArray<AccessibilityActionInfo> | undefined
|
|
1185
|
-
/**
|
|
1186
|
-
* alias for accessibilityState
|
|
1187
|
-
*
|
|
1188
|
-
* see https://reactnative.dev/docs/accessibility#accessibilitystate
|
|
1189
|
-
*/
|
|
1190
|
-
'aria-busy'?: boolean | undefined
|
|
1191
|
-
'aria-checked'?: (boolean | undefined) | 'mixed' | undefined
|
|
1192
|
-
'aria-disabled'?: boolean | undefined
|
|
1193
|
-
'aria-expanded'?: boolean | undefined
|
|
1194
|
-
'aria-selected'?: boolean | undefined
|
|
1195
|
-
/** A value indicating whether the accessibility elements contained within
|
|
1196
|
-
* this accessibility element are hidden.
|
|
1197
|
-
*
|
|
1198
|
-
* See https://reactnative.dev/docs/view#aria-hidden
|
|
1199
|
-
*/
|
|
1200
|
-
'aria-hidden'?: boolean | undefined
|
|
1201
|
-
}
|
|
1202
|
-
> & {
|
|
1203
|
-
/**
|
|
1204
|
-
* When `true`, indicates that the view is an accessibility element.
|
|
1205
|
-
* By default, all the touchable elements are accessible.
|
|
1206
|
-
*
|
|
1207
|
-
* See https://reactnative.dev/docs/view#accessible
|
|
1208
|
-
*/
|
|
1209
|
-
accessible?: boolean | undefined
|
|
1210
|
-
/**
|
|
1211
|
-
* Overrides the text that's read by the screen reader when the user interacts
|
|
1212
|
-
* with the element. By default, the label is constructed by traversing all
|
|
1213
|
-
* the children and accumulating all the `Text` nodes separated by space.
|
|
1214
|
-
*
|
|
1215
|
-
* See https://reactnative.dev/docs/view#accessibilitylabel
|
|
1216
|
-
*/
|
|
1217
|
-
accessibilityLabel?: string | undefined
|
|
1218
|
-
/**
|
|
1219
|
-
* An accessibility hint helps users understand what will happen when they perform
|
|
1220
|
-
* an action on the accessibility element when that result is not obvious from the
|
|
1221
|
-
* accessibility label.
|
|
1222
|
-
*
|
|
1223
|
-
*
|
|
1224
|
-
* See https://reactnative.dev/docs/view#accessibilityHint
|
|
1225
|
-
*/
|
|
1226
|
-
accessibilityHint?: string | undefined
|
|
1227
|
-
/**
|
|
1228
|
-
* Alias for accessibilityLabel https://reactnative.dev/docs/view#accessibilitylabel
|
|
1229
|
-
* https://github.com/facebook/react-native/issues/34424
|
|
1230
|
-
*/
|
|
1231
|
-
'aria-label'?: string | undefined
|
|
1232
|
-
/**
|
|
1233
|
-
* Indicates to accessibility services to treat UI component like a specific role.
|
|
1234
|
-
*/
|
|
1235
|
-
accessibilityRole?: AccessibilityRole | undefined
|
|
1236
|
-
/**
|
|
1237
|
-
* Alias for accessibilityRole
|
|
1238
|
-
*/
|
|
1239
|
-
role?: Role | undefined
|
|
1240
|
-
/**
|
|
1241
|
-
* Indicates to accessibility services that UI Component is in a specific State.
|
|
1242
|
-
*/
|
|
1243
|
-
accessibilityState?: AccessibilityState | undefined
|
|
1244
|
-
accessibilityValue?: AccessibilityValue | undefined
|
|
1245
|
-
/**
|
|
1246
|
-
* alias for accessibilityState
|
|
1247
|
-
* It represents textual description of a component's value, or for range-based components, such as sliders and progress bars.
|
|
1248
|
-
*/
|
|
1249
|
-
'aria-valuemax'?: AccessibilityValue['max'] | undefined
|
|
1250
|
-
'aria-valuemin'?: AccessibilityValue['min'] | undefined
|
|
1251
|
-
'aria-valuenow'?: AccessibilityValue['now'] | undefined
|
|
1252
|
-
'aria-valuetext'?: AccessibilityValue['text'] | undefined
|
|
1253
|
-
/**
|
|
1254
|
-
* Provides an array of custom actions available for accessibility.
|
|
1255
|
-
*
|
|
1256
|
-
*/
|
|
1257
|
-
accessibilityActions?: ReadonlyArray<AccessibilityActionInfo> | undefined
|
|
1258
|
-
/**
|
|
1259
|
-
* alias for accessibilityState
|
|
1260
|
-
*
|
|
1261
|
-
* see https://reactnative.dev/docs/accessibility#accessibilitystate
|
|
1262
|
-
*/
|
|
1263
|
-
'aria-busy'?: boolean | undefined
|
|
1264
|
-
'aria-checked'?: (boolean | undefined) | 'mixed' | undefined
|
|
1265
|
-
'aria-disabled'?: boolean | undefined
|
|
1266
|
-
'aria-expanded'?: boolean | undefined
|
|
1267
|
-
'aria-selected'?: boolean | undefined
|
|
1268
|
-
/** A value indicating whether the accessibility elements contained within
|
|
1269
|
-
* this accessibility element are hidden.
|
|
1270
|
-
*
|
|
1271
|
-
* See https://reactnative.dev/docs/view#aria-hidden
|
|
1272
|
-
*/
|
|
1273
|
-
'aria-hidden'?: boolean | undefined
|
|
1274
|
-
}
|
|
1275
|
-
>
|
|
1035
|
+
Omit<AccessibilityPropsIOS, keyof AccessibilityPropsCore | keyof {}> &
|
|
1036
|
+
Omit<AccessibilityPropsCore, keyof {}>
|
|
1037
|
+
> {}
|
|
1276
1038
|
|
|
1277
1039
|
export type AccessibilityPropsAndroid = Readonly<{
|
|
1278
1040
|
/**
|
|
@@ -1332,6 +1094,80 @@ export type AccessibilityPropsAndroid = Readonly<{
|
|
|
1332
1094
|
screenReaderFocusable?: boolean | undefined
|
|
1333
1095
|
}>
|
|
1334
1096
|
|
|
1097
|
+
export type AccessibilityPropsCore = Readonly<{
|
|
1098
|
+
/**
|
|
1099
|
+
* When `true`, indicates that the view is an accessibility element.
|
|
1100
|
+
* By default, all the touchable elements are accessible.
|
|
1101
|
+
*
|
|
1102
|
+
* See https://reactnative.dev/docs/view#accessible
|
|
1103
|
+
*/
|
|
1104
|
+
accessible?: boolean | undefined
|
|
1105
|
+
/**
|
|
1106
|
+
* Overrides the text that's read by the screen reader when the user interacts
|
|
1107
|
+
* with the element. By default, the label is constructed by traversing all
|
|
1108
|
+
* the children and accumulating all the `Text` nodes separated by space.
|
|
1109
|
+
*
|
|
1110
|
+
* See https://reactnative.dev/docs/view#accessibilitylabel
|
|
1111
|
+
*/
|
|
1112
|
+
accessibilityLabel?: string | undefined
|
|
1113
|
+
/**
|
|
1114
|
+
* An accessibility hint helps users understand what will happen when they perform
|
|
1115
|
+
* an action on the accessibility element when that result is not obvious from the
|
|
1116
|
+
* accessibility label.
|
|
1117
|
+
*
|
|
1118
|
+
*
|
|
1119
|
+
* See https://reactnative.dev/docs/view#accessibilityHint
|
|
1120
|
+
*/
|
|
1121
|
+
accessibilityHint?: string | undefined
|
|
1122
|
+
/**
|
|
1123
|
+
* Alias for accessibilityLabel https://reactnative.dev/docs/view#accessibilitylabel
|
|
1124
|
+
* https://github.com/facebook/react-native/issues/34424
|
|
1125
|
+
*/
|
|
1126
|
+
'aria-label'?: string | undefined
|
|
1127
|
+
/**
|
|
1128
|
+
* Indicates to accessibility services to treat UI component like a specific role.
|
|
1129
|
+
*/
|
|
1130
|
+
accessibilityRole?: AccessibilityRole | undefined
|
|
1131
|
+
/**
|
|
1132
|
+
* Alias for accessibilityRole
|
|
1133
|
+
*/
|
|
1134
|
+
role?: Role | undefined
|
|
1135
|
+
/**
|
|
1136
|
+
* Indicates to accessibility services that UI Component is in a specific State.
|
|
1137
|
+
*/
|
|
1138
|
+
accessibilityState?: AccessibilityState | undefined
|
|
1139
|
+
accessibilityValue?: AccessibilityValue | undefined
|
|
1140
|
+
/**
|
|
1141
|
+
* alias for accessibilityState
|
|
1142
|
+
* It represents textual description of a component's value, or for range-based components, such as sliders and progress bars.
|
|
1143
|
+
*/
|
|
1144
|
+
'aria-valuemax'?: AccessibilityValue['max'] | undefined
|
|
1145
|
+
'aria-valuemin'?: AccessibilityValue['min'] | undefined
|
|
1146
|
+
'aria-valuenow'?: AccessibilityValue['now'] | undefined
|
|
1147
|
+
'aria-valuetext'?: AccessibilityValue['text'] | undefined
|
|
1148
|
+
/**
|
|
1149
|
+
* Provides an array of custom actions available for accessibility.
|
|
1150
|
+
*
|
|
1151
|
+
*/
|
|
1152
|
+
accessibilityActions?: ReadonlyArray<AccessibilityActionInfo> | undefined
|
|
1153
|
+
/**
|
|
1154
|
+
* alias for accessibilityState
|
|
1155
|
+
*
|
|
1156
|
+
* see https://reactnative.dev/docs/accessibility#accessibilitystate
|
|
1157
|
+
*/
|
|
1158
|
+
'aria-busy'?: boolean | undefined
|
|
1159
|
+
'aria-checked'?: (boolean | undefined) | 'mixed' | undefined
|
|
1160
|
+
'aria-disabled'?: boolean | undefined
|
|
1161
|
+
'aria-expanded'?: boolean | undefined
|
|
1162
|
+
'aria-selected'?: boolean | undefined
|
|
1163
|
+
/** A value indicating whether the accessibility elements contained within
|
|
1164
|
+
* this accessibility element are hidden.
|
|
1165
|
+
*
|
|
1166
|
+
* See https://reactnative.dev/docs/view#aria-hidden
|
|
1167
|
+
*/
|
|
1168
|
+
'aria-hidden'?: boolean | undefined
|
|
1169
|
+
}>
|
|
1170
|
+
|
|
1335
1171
|
export type AccessibilityPropsIOS = Readonly<{
|
|
1336
1172
|
/**
|
|
1337
1173
|
* Prevents view from being inverted if set to true and color inversion is turned on.
|
|
@@ -1500,6 +1336,28 @@ export type AndroidDrawableThemeAttr = Readonly<{
|
|
|
1500
1336
|
attribute: string
|
|
1501
1337
|
}>
|
|
1502
1338
|
|
|
1339
|
+
export type AndroidKeyboardEvent = Readonly<
|
|
1340
|
+
Omit<BaseKeyboardEvent, 'duration' | 'easing'> & {
|
|
1341
|
+
/**
|
|
1342
|
+
* Always set to 0 on Android.
|
|
1343
|
+
*/
|
|
1344
|
+
duration: 0
|
|
1345
|
+
/**
|
|
1346
|
+
* Always set to "keyboard" on Android.
|
|
1347
|
+
*/
|
|
1348
|
+
easing: 'keyboard'
|
|
1349
|
+
}
|
|
1350
|
+
>
|
|
1351
|
+
|
|
1352
|
+
export declare class AnimatedInterpolation<
|
|
1353
|
+
OutputT extends InterpolationConfigSupportedOutputType,
|
|
1354
|
+
> extends AnimatedWithChildren {
|
|
1355
|
+
constructor(parent: AnimatedNode, config: InterpolationConfigType<OutputT>)
|
|
1356
|
+
interpolate<NewOutputT extends number | string>(
|
|
1357
|
+
config: InterpolationConfigType<NewOutputT>
|
|
1358
|
+
): AnimatedInterpolation<NewOutputT>
|
|
1359
|
+
}
|
|
1360
|
+
|
|
1503
1361
|
export declare class AnimatedNode {
|
|
1504
1362
|
constructor(
|
|
1505
1363
|
config?: null | undefined | Readonly<Omit<AnimatedNodeConfig, keyof {}> & {}>
|
|
@@ -1538,6 +1396,122 @@ export type AnimatedNodeConfig = Readonly<{
|
|
|
1538
1396
|
unstable_disableBatchingForNativeCreate?: boolean | undefined
|
|
1539
1397
|
}>
|
|
1540
1398
|
|
|
1399
|
+
export declare class AnimatedTracking extends AnimatedNode {
|
|
1400
|
+
constructor(
|
|
1401
|
+
value: AnimatedValue,
|
|
1402
|
+
parent: AnimatedNode,
|
|
1403
|
+
animationClass: any,
|
|
1404
|
+
animationConfig: Object,
|
|
1405
|
+
callback?: null | undefined | EndCallback,
|
|
1406
|
+
config?: null | undefined | AnimatedNodeConfig
|
|
1407
|
+
)
|
|
1408
|
+
update(): void
|
|
1409
|
+
}
|
|
1410
|
+
|
|
1411
|
+
export declare class AnimatedValue extends AnimatedWithChildren {
|
|
1412
|
+
constructor(value: number, config?: null | undefined | AnimatedValueConfig)
|
|
1413
|
+
/**
|
|
1414
|
+
* Narrows `AnimatedNode.addListener`: the value of an `AnimatedValue` is
|
|
1415
|
+
* always a number, so listeners always receive `{value: number}`.
|
|
1416
|
+
*/
|
|
1417
|
+
addListener(callback: ValueListenerCallback): string
|
|
1418
|
+
/**
|
|
1419
|
+
* Directly set the value. This will stop any animations running on the value
|
|
1420
|
+
* and update all the bound properties.
|
|
1421
|
+
*
|
|
1422
|
+
* See https://reactnative.dev/docs/animatedvalue#setvalue
|
|
1423
|
+
*/
|
|
1424
|
+
setValue(value: number): void
|
|
1425
|
+
/**
|
|
1426
|
+
* Sets an offset that is applied on top of whatever value is set, whether via
|
|
1427
|
+
* `setValue`, an animation, or `Animated.event`. Useful for compensating
|
|
1428
|
+
* things like the start of a pan gesture.
|
|
1429
|
+
*
|
|
1430
|
+
* See https://reactnative.dev/docs/animatedvalue#setoffset
|
|
1431
|
+
*/
|
|
1432
|
+
setOffset(offset: number): void
|
|
1433
|
+
/**
|
|
1434
|
+
* Merges the offset value into the base value and resets the offset to zero.
|
|
1435
|
+
* The final output of the value is unchanged.
|
|
1436
|
+
*
|
|
1437
|
+
* See https://reactnative.dev/docs/animatedvalue#flattenoffset
|
|
1438
|
+
*/
|
|
1439
|
+
flattenOffset(): void
|
|
1440
|
+
/**
|
|
1441
|
+
* Sets the offset value to the base value, and resets the base value to zero.
|
|
1442
|
+
* The final output of the value is unchanged.
|
|
1443
|
+
*
|
|
1444
|
+
* See https://reactnative.dev/docs/animatedvalue#extractoffset
|
|
1445
|
+
*/
|
|
1446
|
+
extractOffset(): void
|
|
1447
|
+
/**
|
|
1448
|
+
* Stops any running animation or tracking. `callback` is invoked with the
|
|
1449
|
+
* final value after stopping the animation, which is useful for updating
|
|
1450
|
+
* state to match the animation position with layout.
|
|
1451
|
+
*
|
|
1452
|
+
* See https://reactnative.dev/docs/animatedvalue#stopanimation
|
|
1453
|
+
*/
|
|
1454
|
+
stopAnimation(callback?: null | undefined | ((value: number) => void)): void
|
|
1455
|
+
/**
|
|
1456
|
+
* Stops any animation and resets the value to its original.
|
|
1457
|
+
*
|
|
1458
|
+
* See https://reactnative.dev/docs/animatedvalue#resetanimation
|
|
1459
|
+
*/
|
|
1460
|
+
resetAnimation(callback?: null | undefined | ((value: number) => void)): void
|
|
1461
|
+
/**
|
|
1462
|
+
* Interpolates the value before updating the property, e.g. mapping 0-1 to
|
|
1463
|
+
* 0-10.
|
|
1464
|
+
*/
|
|
1465
|
+
interpolate<OutputT extends InterpolationConfigSupportedOutputType>(
|
|
1466
|
+
config: InterpolationConfigType<OutputT>
|
|
1467
|
+
): AnimatedInterpolation<OutputT>
|
|
1468
|
+
/**
|
|
1469
|
+
* Typically only used internally, but could be used by a custom Animation
|
|
1470
|
+
* class.
|
|
1471
|
+
*
|
|
1472
|
+
* See https://reactnative.dev/docs/animatedvalue#animate
|
|
1473
|
+
*/
|
|
1474
|
+
animate(animation: Animation, callback: null | undefined | EndCallback): void
|
|
1475
|
+
/**
|
|
1476
|
+
* Typically only used internally.
|
|
1477
|
+
*/
|
|
1478
|
+
stopTracking(): void
|
|
1479
|
+
/**
|
|
1480
|
+
* Typically only used internally.
|
|
1481
|
+
*/
|
|
1482
|
+
track(tracking: AnimatedTracking): void
|
|
1483
|
+
}
|
|
1484
|
+
|
|
1485
|
+
export type AnimatedValueConfig = Readonly<
|
|
1486
|
+
Omit<AnimatedNodeConfig, 'useNativeDriver'> & {
|
|
1487
|
+
useNativeDriver: boolean
|
|
1488
|
+
}
|
|
1489
|
+
>
|
|
1490
|
+
|
|
1491
|
+
export declare class AnimatedWithChildren extends AnimatedNode {}
|
|
1492
|
+
|
|
1493
|
+
export declare class Animation {
|
|
1494
|
+
constructor(config: AnimationConfig)
|
|
1495
|
+
start(
|
|
1496
|
+
fromValue: number,
|
|
1497
|
+
onUpdate: (value: number) => void,
|
|
1498
|
+
onEnd: null | undefined | EndCallback,
|
|
1499
|
+
previousAnimation: null | undefined | Animation,
|
|
1500
|
+
animatedValue: AnimatedValue
|
|
1501
|
+
): void
|
|
1502
|
+
stop(): void
|
|
1503
|
+
}
|
|
1504
|
+
|
|
1505
|
+
export type AnimationConfig = Readonly<{
|
|
1506
|
+
isInteraction?: boolean | undefined
|
|
1507
|
+
useNativeDriver: boolean
|
|
1508
|
+
platformConfig?: PlatformConfig | undefined
|
|
1509
|
+
onComplete?: EndCallback | undefined
|
|
1510
|
+
iterations?: number | undefined
|
|
1511
|
+
isLooping?: boolean | undefined
|
|
1512
|
+
debugID?: string | undefined
|
|
1513
|
+
}>
|
|
1514
|
+
|
|
1541
1515
|
export type BackgroundImageValue = LinearGradientValue | RadialGradientValue
|
|
1542
1516
|
|
|
1543
1517
|
export type BackgroundPositionValue =
|
|
@@ -1570,6 +1544,12 @@ export type BackgroundSizeValue = {
|
|
|
1570
1544
|
y: string | number
|
|
1571
1545
|
}
|
|
1572
1546
|
|
|
1547
|
+
export type BaseKeyboardEvent = {
|
|
1548
|
+
duration: number
|
|
1549
|
+
easing: KeyboardEventEasing
|
|
1550
|
+
endCoordinates: KeyboardMetrics
|
|
1551
|
+
}
|
|
1552
|
+
|
|
1573
1553
|
export type BlurEvent = NativeSyntheticEvent<TargetedEvent>
|
|
1574
1554
|
|
|
1575
1555
|
export type BoxShadowValue = {
|
|
@@ -1585,6 +1565,8 @@ export type ColorValue = ____ColorValue_Internal
|
|
|
1585
1565
|
|
|
1586
1566
|
export type CursorValue = 'auto' | 'pointer'
|
|
1587
1567
|
|
|
1568
|
+
export type DecelerationRateType = 'fast' | 'normal' | number
|
|
1569
|
+
|
|
1588
1570
|
export type DimensionValue = number | string | 'auto' | null
|
|
1589
1571
|
|
|
1590
1572
|
export type DirectEventProps = Readonly<{
|
|
@@ -1647,6 +1629,16 @@ export type EdgeInsetsOrSizeProp = RectOrSize
|
|
|
1647
1629
|
|
|
1648
1630
|
export type EdgeInsetsProp = Rect
|
|
1649
1631
|
|
|
1632
|
+
export type EndCallback = (result: EndResult) => void
|
|
1633
|
+
|
|
1634
|
+
export type EndResult = {
|
|
1635
|
+
finished: boolean
|
|
1636
|
+
value?: number | undefined
|
|
1637
|
+
offset?: number | undefined
|
|
1638
|
+
}
|
|
1639
|
+
|
|
1640
|
+
export type ExtrapolateType = 'extend' | 'identity' | 'clamp'
|
|
1641
|
+
|
|
1650
1642
|
export type FilterFunction =
|
|
1651
1643
|
| {
|
|
1652
1644
|
brightness: number | string
|
|
@@ -1822,12 +1814,7 @@ export declare class HTMLCollection<T> implements Iterable<T>, ArrayLike<T> {
|
|
|
1822
1814
|
export type ImageAndroid = AbstractImageAndroid & ImageComponentStaticsAndroid
|
|
1823
1815
|
|
|
1824
1816
|
export type ImageComponentStaticsAndroid = Readonly<
|
|
1825
|
-
Omit<
|
|
1826
|
-
ImageComponentStaticsIOS,
|
|
1827
|
-
keyof {
|
|
1828
|
-
abortPrefetch(requestId: number): void
|
|
1829
|
-
}
|
|
1830
|
-
> & {
|
|
1817
|
+
Omit<ImageComponentStaticsIOS, 'abortPrefetch'> & {
|
|
1831
1818
|
abortPrefetch(requestId: number): void
|
|
1832
1819
|
}
|
|
1833
1820
|
>
|
|
@@ -1895,43 +1882,15 @@ export type ImageProgressEventIOS = NativeSyntheticEvent<
|
|
|
1895
1882
|
Readonly<ImageProgressEventDataIOS>
|
|
1896
1883
|
>
|
|
1897
1884
|
|
|
1898
|
-
export
|
|
1885
|
+
export interface ImageProps extends Readonly<
|
|
1899
1886
|
Omit<
|
|
1900
1887
|
ImagePropsIOS,
|
|
1901
|
-
| keyof
|
|
1902
|
-
| keyof ImagePropsBase
|
|
1903
|
-
| keyof {
|
|
1904
|
-
/**
|
|
1905
|
-
* Style applied to the `Image` component.
|
|
1906
|
-
*/
|
|
1907
|
-
style?: ImageStyleProp | undefined
|
|
1908
|
-
}
|
|
1888
|
+
keyof ImagePropsAndroid | keyof ImagePropsBase | keyof ImagePropsCore | keyof {}
|
|
1909
1889
|
> &
|
|
1910
|
-
Omit<
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
/**
|
|
1915
|
-
* Style applied to the `Image` component.
|
|
1916
|
-
*/
|
|
1917
|
-
style?: ImageStyleProp | undefined
|
|
1918
|
-
}
|
|
1919
|
-
> &
|
|
1920
|
-
Omit<
|
|
1921
|
-
ImagePropsBase,
|
|
1922
|
-
keyof {
|
|
1923
|
-
/**
|
|
1924
|
-
* Style applied to the `Image` component.
|
|
1925
|
-
*/
|
|
1926
|
-
style?: ImageStyleProp | undefined
|
|
1927
|
-
}
|
|
1928
|
-
> & {
|
|
1929
|
-
/**
|
|
1930
|
-
* Style applied to the `Image` component.
|
|
1931
|
-
*/
|
|
1932
|
-
style?: ImageStyleProp | undefined
|
|
1933
|
-
}
|
|
1934
|
-
>
|
|
1890
|
+
Omit<ImagePropsAndroid, keyof ImagePropsBase | keyof ImagePropsCore | keyof {}> &
|
|
1891
|
+
Omit<ImagePropsBase, keyof ImagePropsCore | keyof {}> &
|
|
1892
|
+
Omit<ImagePropsCore, keyof {}>
|
|
1893
|
+
> {}
|
|
1935
1894
|
|
|
1936
1895
|
export type ImagePropsAndroid = Readonly<{
|
|
1937
1896
|
/**
|
|
@@ -1994,199 +1953,58 @@ export type ImagePropsAndroid = Readonly<{
|
|
|
1994
1953
|
|
|
1995
1954
|
export interface ImagePropsBase extends Readonly<
|
|
1996
1955
|
Omit<
|
|
1997
|
-
Omit<
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
*/
|
|
2015
|
-
'aria-label'?: string | undefined
|
|
2016
|
-
/**
|
|
2017
|
-
* Represents the `nativeID` of the associated label. When the assistive
|
|
2018
|
-
* technology focuses on the component with this prop.
|
|
2019
|
-
*
|
|
2020
|
-
* @platform android
|
|
2021
|
-
*/
|
|
2022
|
-
'aria-labelledby'?: string | undefined
|
|
2023
|
-
/**
|
|
2024
|
-
* Alternative text description of the image, read by the screen reader
|
|
2025
|
-
* when the user interacts with it. Automatically marks the element as
|
|
2026
|
-
* accessible.
|
|
2027
|
-
*/
|
|
2028
|
-
alt?: string | undefined
|
|
2029
|
-
/**
|
|
2030
|
-
* The blur radius of the blur filter added to the image. On iOS, needs to
|
|
2031
|
-
* be more than 5.
|
|
2032
|
-
*/
|
|
2033
|
-
blurRadius?: number | undefined
|
|
2034
|
-
/**
|
|
2035
|
-
* When the image is resized, the corners of the size specified by
|
|
2036
|
-
* `capInsets` stay a fixed size, but the center content and borders of
|
|
2037
|
-
* the image are stretched. This is useful for creating resizable rounded
|
|
2038
|
-
* buttons, shadows, and other resizable assets.
|
|
2039
|
-
*
|
|
2040
|
-
* @platform ios
|
|
2041
|
-
*/
|
|
2042
|
-
capInsets?: EdgeInsetsProp | undefined
|
|
2043
|
-
/**
|
|
2044
|
-
* CORS mode for fetching the image resource. When unset, the image
|
|
2045
|
-
* request is made without the CORS header.
|
|
2046
|
-
*
|
|
2047
|
-
* @default `'anonymous'`
|
|
2048
|
-
*/
|
|
2049
|
-
crossOrigin?: ('anonymous' | 'use-credentials') | undefined
|
|
2050
|
-
/**
|
|
2051
|
-
* Height of the image component.
|
|
2052
|
-
*/
|
|
2053
|
-
height?: number | undefined
|
|
2054
|
-
/**
|
|
2055
|
-
* Width of the image component.
|
|
2056
|
-
*/
|
|
2057
|
-
width?: number | undefined
|
|
2058
|
-
/**
|
|
2059
|
-
* Invoked on load error.
|
|
2060
|
-
*/
|
|
2061
|
-
onError?: ((event: ImageErrorEvent) => void) | undefined
|
|
2062
|
-
/**
|
|
2063
|
-
* Invoked on mount and on layout changes.
|
|
2064
|
-
*/
|
|
2065
|
-
onLayout?: ((event: LayoutChangeEvent) => unknown) | undefined
|
|
2066
|
-
/**
|
|
2067
|
-
* Invoked when load completes successfully.
|
|
2068
|
-
*/
|
|
2069
|
-
onLoad?: ((event: ImageLoadEvent) => void) | undefined
|
|
2070
|
-
/**
|
|
2071
|
-
* Invoked when load either succeeds or fails.
|
|
2072
|
-
*/
|
|
2073
|
-
onLoadEnd?: (() => void) | undefined
|
|
2074
|
-
/**
|
|
2075
|
-
* Invoked on load start.
|
|
2076
|
-
*/
|
|
2077
|
-
onLoadStart?: (() => void) | undefined
|
|
2078
|
-
/**
|
|
2079
|
-
* The image source (either a remote URL or a local file resource).
|
|
2080
|
-
*
|
|
2081
|
-
* This prop can also contain several remote URLs, specified together with
|
|
2082
|
-
* their width and height and potentially with scale/other URI arguments.
|
|
2083
|
-
* The native side then chooses the best URI to display based on the
|
|
2084
|
-
* measured size of the image container. A `cache` property can be added to
|
|
2085
|
-
* control how networked request interacts with the local cache.
|
|
2086
|
-
*
|
|
2087
|
-
* The currently supported formats are `png`, `jpg`, `jpeg`, `bmp`, `gif`,
|
|
2088
|
-
* `webp` (Android only), and `psd` (iOS only).
|
|
2089
|
-
*/
|
|
2090
|
-
source?: ImageSource | undefined
|
|
2091
|
-
/**
|
|
2092
|
-
* Which referrer to use when fetching the image resource.
|
|
2093
|
-
*
|
|
2094
|
-
* @default `'strict-origin-when-cross-origin'`
|
|
2095
|
-
*/
|
|
2096
|
-
referrerPolicy?:
|
|
2097
|
-
| (
|
|
2098
|
-
| 'no-referrer'
|
|
2099
|
-
| 'no-referrer-when-downgrade'
|
|
2100
|
-
| 'origin'
|
|
2101
|
-
| 'origin-when-cross-origin'
|
|
2102
|
-
| 'same-origin'
|
|
2103
|
-
| 'strict-origin'
|
|
2104
|
-
| 'strict-origin-when-cross-origin'
|
|
2105
|
-
| 'unsafe-url'
|
|
2106
|
-
)
|
|
2107
|
-
| undefined
|
|
2108
|
-
/**
|
|
2109
|
-
* Determines how to resize the image when the frame doesn't match the raw
|
|
2110
|
-
* image dimensions.
|
|
2111
|
-
*
|
|
2112
|
-
* - `cover`: Scale the image uniformly (maintain the image's aspect ratio)
|
|
2113
|
-
* so that both dimensions (width and height) of the image are equal to
|
|
2114
|
-
* or larger than the corresponding dimension of the view (minus padding).
|
|
2115
|
-
*
|
|
2116
|
-
* - `contain`: Scale the image uniformly (maintain the image's aspect
|
|
2117
|
-
* ratio) so that both dimensions (width and height) of the image are
|
|
2118
|
-
* equal to or less than the corresponding dimension of the view (minus
|
|
2119
|
-
* padding).
|
|
2120
|
-
*
|
|
2121
|
-
* - `stretch`: Scale width and height independently. This may change the
|
|
2122
|
-
* aspect ratio of the source.
|
|
2123
|
-
*
|
|
2124
|
-
* - `repeat`: Repeat the image to cover the frame of the view. The image
|
|
2125
|
-
* keeps its size and aspect ratio (iOS only).
|
|
2126
|
-
*
|
|
2127
|
-
* - `center`: Scale the image down so that it is completely visible, if
|
|
2128
|
-
* bigger than the area of the view. The image is not scaled up.
|
|
2129
|
-
*
|
|
2130
|
-
* - `none`: Do not resize the image. The image is displayed at its
|
|
2131
|
-
* intrinsic size.
|
|
2132
|
-
*
|
|
2133
|
-
* @default `'cover'`
|
|
2134
|
-
*/
|
|
2135
|
-
resizeMode?: ImageResizeMode | undefined
|
|
2136
|
-
testID?: string | undefined
|
|
2137
|
-
/**
|
|
2138
|
-
* Changes the color of all non-transparent pixels to the `tintColor`.
|
|
2139
|
-
*/
|
|
2140
|
-
tintColor?: ColorValue | undefined
|
|
2141
|
-
/**
|
|
2142
|
-
* A remote URL string for the image resource. Takes precedence over
|
|
2143
|
-
* `source`.
|
|
2144
|
-
*/
|
|
2145
|
-
src?: string | undefined
|
|
2146
|
-
/**
|
|
2147
|
-
* Comma-separated list of candidate image sources with pixel density
|
|
2148
|
-
* descriptors.
|
|
2149
|
-
*/
|
|
2150
|
-
srcSet?: string | undefined
|
|
2151
|
-
children?: never | undefined
|
|
2152
|
-
}
|
|
2153
|
-
>
|
|
2154
|
-
> {
|
|
1956
|
+
Omit<
|
|
1957
|
+
ViewProps,
|
|
1958
|
+
| 'accessibilityLabel'
|
|
1959
|
+
| 'accessible'
|
|
1960
|
+
| 'aria-label'
|
|
1961
|
+
| 'aria-labelledby'
|
|
1962
|
+
| 'children'
|
|
1963
|
+
| 'onLayout'
|
|
1964
|
+
| 'style'
|
|
1965
|
+
| 'testID'
|
|
1966
|
+
>,
|
|
1967
|
+
keyof ImagePropsBaseCore | keyof {}
|
|
1968
|
+
> &
|
|
1969
|
+
Omit<ImagePropsBaseCore, keyof {}>
|
|
1970
|
+
> {}
|
|
1971
|
+
|
|
1972
|
+
export type ImagePropsBaseCore = Readonly<{
|
|
2155
1973
|
/**
|
|
2156
1974
|
* When `true`, indicates the image is an accessibility element.
|
|
2157
1975
|
*/
|
|
2158
|
-
|
|
1976
|
+
accessible?: boolean | undefined
|
|
2159
1977
|
/**
|
|
2160
1978
|
* Internal prop to set an "Analytics Tag" that can will be set on the Image.
|
|
2161
1979
|
*/
|
|
2162
|
-
|
|
1980
|
+
internal_analyticTag?: string | undefined
|
|
2163
1981
|
/**
|
|
2164
1982
|
* The text that's read by the screen reader when the user interacts with
|
|
2165
1983
|
* the image.
|
|
2166
1984
|
*/
|
|
2167
|
-
|
|
1985
|
+
accessibilityLabel?: string | undefined
|
|
2168
1986
|
/**
|
|
2169
1987
|
* Alias for `accessibilityLabel`.
|
|
2170
1988
|
*/
|
|
2171
|
-
|
|
1989
|
+
'aria-label'?: string | undefined
|
|
2172
1990
|
/**
|
|
2173
1991
|
* Represents the `nativeID` of the associated label. When the assistive
|
|
2174
1992
|
* technology focuses on the component with this prop.
|
|
2175
1993
|
*
|
|
2176
1994
|
* @platform android
|
|
2177
1995
|
*/
|
|
2178
|
-
|
|
1996
|
+
'aria-labelledby'?: string | undefined
|
|
2179
1997
|
/**
|
|
2180
1998
|
* Alternative text description of the image, read by the screen reader
|
|
2181
1999
|
* when the user interacts with it. Automatically marks the element as
|
|
2182
2000
|
* accessible.
|
|
2183
2001
|
*/
|
|
2184
|
-
|
|
2002
|
+
alt?: string | undefined
|
|
2185
2003
|
/**
|
|
2186
2004
|
* The blur radius of the blur filter added to the image. On iOS, needs to
|
|
2187
2005
|
* be more than 5.
|
|
2188
2006
|
*/
|
|
2189
|
-
|
|
2007
|
+
blurRadius?: number | undefined
|
|
2190
2008
|
/**
|
|
2191
2009
|
* When the image is resized, the corners of the size specified by
|
|
2192
2010
|
* `capInsets` stay a fixed size, but the center content and borders of
|
|
@@ -2195,42 +2013,42 @@ export interface ImagePropsBase extends Readonly<
|
|
|
2195
2013
|
*
|
|
2196
2014
|
* @platform ios
|
|
2197
2015
|
*/
|
|
2198
|
-
|
|
2016
|
+
capInsets?: EdgeInsetsProp | undefined
|
|
2199
2017
|
/**
|
|
2200
2018
|
* CORS mode for fetching the image resource. When unset, the image
|
|
2201
2019
|
* request is made without the CORS header.
|
|
2202
2020
|
*
|
|
2203
2021
|
* @default `'anonymous'`
|
|
2204
2022
|
*/
|
|
2205
|
-
|
|
2023
|
+
crossOrigin?: ('anonymous' | 'use-credentials') | undefined
|
|
2206
2024
|
/**
|
|
2207
2025
|
* Height of the image component.
|
|
2208
2026
|
*/
|
|
2209
|
-
|
|
2027
|
+
height?: number | undefined
|
|
2210
2028
|
/**
|
|
2211
2029
|
* Width of the image component.
|
|
2212
2030
|
*/
|
|
2213
|
-
|
|
2031
|
+
width?: number | undefined
|
|
2214
2032
|
/**
|
|
2215
2033
|
* Invoked on load error.
|
|
2216
2034
|
*/
|
|
2217
|
-
|
|
2035
|
+
onError?: ((event: ImageErrorEvent) => void) | undefined
|
|
2218
2036
|
/**
|
|
2219
2037
|
* Invoked on mount and on layout changes.
|
|
2220
2038
|
*/
|
|
2221
|
-
|
|
2039
|
+
onLayout?: ((event: LayoutChangeEvent) => unknown) | undefined
|
|
2222
2040
|
/**
|
|
2223
2041
|
* Invoked when load completes successfully.
|
|
2224
2042
|
*/
|
|
2225
|
-
|
|
2043
|
+
onLoad?: ((event: ImageLoadEvent) => void) | undefined
|
|
2226
2044
|
/**
|
|
2227
2045
|
* Invoked when load either succeeds or fails.
|
|
2228
2046
|
*/
|
|
2229
|
-
|
|
2047
|
+
onLoadEnd?: (() => void) | undefined
|
|
2230
2048
|
/**
|
|
2231
2049
|
* Invoked on load start.
|
|
2232
2050
|
*/
|
|
2233
|
-
|
|
2051
|
+
onLoadStart?: (() => void) | undefined
|
|
2234
2052
|
/**
|
|
2235
2053
|
* The image source (either a remote URL or a local file resource).
|
|
2236
2054
|
*
|
|
@@ -2243,13 +2061,13 @@ export interface ImagePropsBase extends Readonly<
|
|
|
2243
2061
|
* The currently supported formats are `png`, `jpg`, `jpeg`, `bmp`, `gif`,
|
|
2244
2062
|
* `webp` (Android only), and `psd` (iOS only).
|
|
2245
2063
|
*/
|
|
2246
|
-
|
|
2064
|
+
source?: ImageSource | undefined
|
|
2247
2065
|
/**
|
|
2248
2066
|
* Which referrer to use when fetching the image resource.
|
|
2249
2067
|
*
|
|
2250
2068
|
* @default `'strict-origin-when-cross-origin'`
|
|
2251
2069
|
*/
|
|
2252
|
-
|
|
2070
|
+
referrerPolicy?:
|
|
2253
2071
|
| (
|
|
2254
2072
|
| 'no-referrer'
|
|
2255
2073
|
| 'no-referrer-when-downgrade'
|
|
@@ -2288,24 +2106,31 @@ export interface ImagePropsBase extends Readonly<
|
|
|
2288
2106
|
*
|
|
2289
2107
|
* @default `'cover'`
|
|
2290
2108
|
*/
|
|
2291
|
-
|
|
2292
|
-
|
|
2109
|
+
resizeMode?: ImageResizeMode | undefined
|
|
2110
|
+
testID?: string | undefined
|
|
2293
2111
|
/**
|
|
2294
2112
|
* Changes the color of all non-transparent pixels to the `tintColor`.
|
|
2295
2113
|
*/
|
|
2296
|
-
|
|
2114
|
+
tintColor?: ColorValue | undefined
|
|
2297
2115
|
/**
|
|
2298
2116
|
* A remote URL string for the image resource. Takes precedence over
|
|
2299
2117
|
* `source`.
|
|
2300
2118
|
*/
|
|
2301
|
-
|
|
2119
|
+
src?: string | undefined
|
|
2302
2120
|
/**
|
|
2303
2121
|
* Comma-separated list of candidate image sources with pixel density
|
|
2304
2122
|
* descriptors.
|
|
2305
2123
|
*/
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
}
|
|
2124
|
+
srcSet?: string | undefined
|
|
2125
|
+
children?: never | undefined
|
|
2126
|
+
}>
|
|
2127
|
+
|
|
2128
|
+
export type ImagePropsCore = Readonly<{
|
|
2129
|
+
/**
|
|
2130
|
+
* Style applied to the `Image` component.
|
|
2131
|
+
*/
|
|
2132
|
+
style?: ImageStyleProp | undefined
|
|
2133
|
+
}>
|
|
2309
2134
|
|
|
2310
2135
|
export type ImagePropsIOS = Readonly<{
|
|
2311
2136
|
/**
|
|
@@ -2354,7 +2179,10 @@ export type ImageSource =
|
|
|
2354
2179
|
|
|
2355
2180
|
export type ImageSourcePropType = ImageSource
|
|
2356
2181
|
|
|
2357
|
-
export
|
|
2182
|
+
export interface ImageStyle extends Readonly<
|
|
2183
|
+
Omit<____ImageStyle_InternalCore, keyof ____ImageStyle_InternalOverrides | keyof {}> &
|
|
2184
|
+
Omit<____ImageStyle_InternalOverrides, keyof {}>
|
|
2185
|
+
> {}
|
|
2358
2186
|
|
|
2359
2187
|
export type ImageStyleProp = ____ImageStyleProp_Internal
|
|
2360
2188
|
|
|
@@ -2425,6 +2253,54 @@ export interface ImageURISource {
|
|
|
2425
2253
|
readonly scale?: number | undefined
|
|
2426
2254
|
}
|
|
2427
2255
|
|
|
2256
|
+
export type InnerViewInstance = React.ComponentRef<typeof View>
|
|
2257
|
+
|
|
2258
|
+
export type InterpolationConfigSupportedOutputType = number | string | NativeColorValue
|
|
2259
|
+
|
|
2260
|
+
export type InterpolationConfigType<
|
|
2261
|
+
OutputT extends InterpolationConfigSupportedOutputType,
|
|
2262
|
+
> = Readonly<
|
|
2263
|
+
Omit<
|
|
2264
|
+
AnimatedNodeConfig,
|
|
2265
|
+
| 'inputRange'
|
|
2266
|
+
| 'outputRange'
|
|
2267
|
+
| 'easing'
|
|
2268
|
+
| 'extrapolate'
|
|
2269
|
+
| 'extrapolateLeft'
|
|
2270
|
+
| 'extrapolateRight'
|
|
2271
|
+
> & {
|
|
2272
|
+
inputRange: ReadonlyArray<number>
|
|
2273
|
+
outputRange: ReadonlyArray<OutputT>
|
|
2274
|
+
easing?: ((input: number) => number) | undefined
|
|
2275
|
+
extrapolate?: ExtrapolateType | undefined
|
|
2276
|
+
extrapolateLeft?: ExtrapolateType | undefined
|
|
2277
|
+
extrapolateRight?: ExtrapolateType | undefined
|
|
2278
|
+
}
|
|
2279
|
+
>
|
|
2280
|
+
|
|
2281
|
+
export type IOSKeyboardEvent = Readonly<
|
|
2282
|
+
Omit<BaseKeyboardEvent, 'startCoordinates' | 'isEventFromThisApp'> & {
|
|
2283
|
+
startCoordinates: KeyboardMetrics
|
|
2284
|
+
isEventFromThisApp: boolean
|
|
2285
|
+
}
|
|
2286
|
+
>
|
|
2287
|
+
|
|
2288
|
+
export type KeyboardEvent = AndroidKeyboardEvent | IOSKeyboardEvent
|
|
2289
|
+
|
|
2290
|
+
export type KeyboardEventEasing =
|
|
2291
|
+
| 'easeIn'
|
|
2292
|
+
| 'easeInEaseOut'
|
|
2293
|
+
| 'easeOut'
|
|
2294
|
+
| 'linear'
|
|
2295
|
+
| 'keyboard'
|
|
2296
|
+
|
|
2297
|
+
export type KeyboardMetrics = Readonly<{
|
|
2298
|
+
screenX: number
|
|
2299
|
+
screenY: number
|
|
2300
|
+
width: number
|
|
2301
|
+
height: number
|
|
2302
|
+
}>
|
|
2303
|
+
|
|
2428
2304
|
export type KeyDownEvent = NativeSyntheticEvent<KeyEvent>
|
|
2429
2305
|
|
|
2430
2306
|
export type KeyEvent = Readonly<{
|
|
@@ -2654,6 +2530,42 @@ export interface NativePointerEvent extends NativeMouseEvent {
|
|
|
2654
2530
|
readonly isPrimary: boolean
|
|
2655
2531
|
}
|
|
2656
2532
|
|
|
2533
|
+
export type NativeScrollEvent = Readonly<{
|
|
2534
|
+
contentInset: NativeScrollRectangle
|
|
2535
|
+
contentOffset: NativeScrollPoint
|
|
2536
|
+
contentSize: NativeScrollSize
|
|
2537
|
+
layoutMeasurement: NativeScrollSize
|
|
2538
|
+
velocity?: NativeScrollVelocity | undefined
|
|
2539
|
+
zoomScale?: number | undefined
|
|
2540
|
+
responderIgnoreScroll?: boolean | undefined
|
|
2541
|
+
/**
|
|
2542
|
+
* @platform ios
|
|
2543
|
+
*/
|
|
2544
|
+
targetContentOffset?: NativeScrollPoint | undefined
|
|
2545
|
+
}>
|
|
2546
|
+
|
|
2547
|
+
export type NativeScrollPoint = Readonly<{
|
|
2548
|
+
y: number
|
|
2549
|
+
x: number
|
|
2550
|
+
}>
|
|
2551
|
+
|
|
2552
|
+
export type NativeScrollRectangle = Readonly<{
|
|
2553
|
+
bottom: number
|
|
2554
|
+
left: number
|
|
2555
|
+
right: number
|
|
2556
|
+
top: number
|
|
2557
|
+
}>
|
|
2558
|
+
|
|
2559
|
+
export type NativeScrollSize = Readonly<{
|
|
2560
|
+
height: number
|
|
2561
|
+
width: number
|
|
2562
|
+
}>
|
|
2563
|
+
|
|
2564
|
+
export type NativeScrollVelocity = Readonly<{
|
|
2565
|
+
y: number
|
|
2566
|
+
x: number
|
|
2567
|
+
}>
|
|
2568
|
+
|
|
2657
2569
|
export type NativeSyntheticEvent<T> = Readonly<{
|
|
2658
2570
|
bubbles: boolean | undefined
|
|
2659
2571
|
cancelable: boolean | undefined
|
|
@@ -2783,6 +2695,8 @@ export type PanResponderGestureState = {
|
|
|
2783
2695
|
numberActiveTouches: number
|
|
2784
2696
|
}
|
|
2785
2697
|
|
|
2698
|
+
export type PlatformConfig = {}
|
|
2699
|
+
|
|
2786
2700
|
export type PointerEvent = NativeSyntheticEvent<NativePointerEvent>
|
|
2787
2701
|
|
|
2788
2702
|
export type PointerEventProps = Readonly<{
|
|
@@ -2810,6 +2724,11 @@ export type PointerEventProps = Readonly<{
|
|
|
2810
2724
|
onLostPointerCaptureCapture?: ((e: PointerEvent) => void) | undefined
|
|
2811
2725
|
}>
|
|
2812
2726
|
|
|
2727
|
+
export type PointProp = Readonly<{
|
|
2728
|
+
x: number
|
|
2729
|
+
y: number
|
|
2730
|
+
}>
|
|
2731
|
+
|
|
2813
2732
|
export type PressableAndroidRippleConfig = {
|
|
2814
2733
|
color?: ColorValue | undefined
|
|
2815
2734
|
borderless?: boolean | undefined
|
|
@@ -2949,7 +2868,9 @@ export interface PressableProps extends Readonly<
|
|
|
2949
2868
|
Omit<PressableBaseProps, keyof {}>
|
|
2950
2869
|
> {}
|
|
2951
2870
|
|
|
2952
|
-
export
|
|
2871
|
+
export interface PressableStateCallbackType extends PressableStateCallbackTypeCore {}
|
|
2872
|
+
|
|
2873
|
+
export type PressableStateCallbackTypeCore = Readonly<{
|
|
2953
2874
|
pressed: boolean
|
|
2954
2875
|
}>
|
|
2955
2876
|
|
|
@@ -3257,30 +3178,7 @@ export type ResolvedAssetSource = {
|
|
|
3257
3178
|
}
|
|
3258
3179
|
|
|
3259
3180
|
export type ResponderSyntheticEvent<T> = Readonly<
|
|
3260
|
-
Omit<
|
|
3261
|
-
NativeSyntheticEvent<T>,
|
|
3262
|
-
keyof {
|
|
3263
|
-
touchHistory: Readonly<{
|
|
3264
|
-
indexOfSingleActiveTouch: number
|
|
3265
|
-
mostRecentTimeStamp: number
|
|
3266
|
-
numberActiveTouches: number
|
|
3267
|
-
touchBank: ReadonlyArray<
|
|
3268
|
-
Readonly<{
|
|
3269
|
-
touchActive: boolean
|
|
3270
|
-
startPageX: number
|
|
3271
|
-
startPageY: number
|
|
3272
|
-
startTimeStamp: number
|
|
3273
|
-
currentPageX: number
|
|
3274
|
-
currentPageY: number
|
|
3275
|
-
currentTimeStamp: number
|
|
3276
|
-
previousPageX: number
|
|
3277
|
-
previousPageY: number
|
|
3278
|
-
previousTimeStamp: number
|
|
3279
|
-
}>
|
|
3280
|
-
>
|
|
3281
|
-
}>
|
|
3282
|
-
}
|
|
3283
|
-
> & {
|
|
3181
|
+
Omit<NativeSyntheticEvent<T>, 'touchHistory'> & {
|
|
3284
3182
|
touchHistory: Readonly<{
|
|
3285
3183
|
indexOfSingleActiveTouch: number
|
|
3286
3184
|
mostRecentTimeStamp: number
|
|
@@ -3376,70 +3274,740 @@ export type RootTag = symbol & {
|
|
|
3376
3274
|
|
|
3377
3275
|
export type ScaledSize = DisplayMetrics
|
|
3378
3276
|
|
|
3379
|
-
export type
|
|
3380
|
-
|
|
3381
|
-
export type SwitchChangeEvent = NativeSyntheticEvent<SwitchChangeEventData>
|
|
3382
|
-
|
|
3383
|
-
export type SwitchChangeEventData = Readonly<{
|
|
3384
|
-
target: number
|
|
3385
|
-
value: boolean
|
|
3386
|
-
}>
|
|
3277
|
+
export type ScrollEvent = NativeSyntheticEvent<NativeScrollEvent>
|
|
3387
3278
|
|
|
3388
|
-
export
|
|
3389
|
-
Omit<ViewProps, keyof SwitchPropsIOS | keyof SwitchPropsBase | keyof {}> &
|
|
3390
|
-
Omit<SwitchPropsIOS, keyof SwitchPropsBase | keyof {}> &
|
|
3391
|
-
Omit<SwitchPropsBase, keyof {}>
|
|
3392
|
-
> {}
|
|
3279
|
+
export type ScrollResponderType = ScrollViewImperativeMethods
|
|
3393
3280
|
|
|
3394
|
-
export type
|
|
3281
|
+
export type ScrollViewBaseProps = Readonly<{
|
|
3395
3282
|
/**
|
|
3396
|
-
*
|
|
3283
|
+
* These styles will be applied to the scroll view content container which
|
|
3284
|
+
* wraps all of the child views.
|
|
3397
3285
|
*
|
|
3398
|
-
*
|
|
3286
|
+
* Example:
|
|
3287
|
+
*
|
|
3288
|
+
* ```tsx
|
|
3289
|
+
* return (
|
|
3290
|
+
* <ScrollView contentContainerStyle={styles.contentContainer}>
|
|
3291
|
+
* </ScrollView>
|
|
3292
|
+
* );
|
|
3293
|
+
* ...
|
|
3294
|
+
* const styles = StyleSheet.create({
|
|
3295
|
+
* contentContainer: {
|
|
3296
|
+
* paddingVertical: 20
|
|
3297
|
+
* }
|
|
3298
|
+
* });
|
|
3299
|
+
* ```
|
|
3399
3300
|
*/
|
|
3400
|
-
|
|
3301
|
+
contentContainerStyle?: ViewStyleProp | undefined
|
|
3401
3302
|
/**
|
|
3402
|
-
*
|
|
3303
|
+
* Used to manually set the starting scroll offset.
|
|
3403
3304
|
*
|
|
3404
|
-
* @default `
|
|
3305
|
+
* @default `{x: 0, y: 0}`
|
|
3405
3306
|
*/
|
|
3406
|
-
|
|
3307
|
+
contentOffset?: PointProp | undefined
|
|
3407
3308
|
/**
|
|
3408
|
-
*
|
|
3409
|
-
*
|
|
3309
|
+
* When true, the scroll view stops on the next index (in relation to scroll
|
|
3310
|
+
* position at release) regardless of how fast the gesture is. This can be
|
|
3311
|
+
* used for pagination when the page is less than the width of the
|
|
3312
|
+
* horizontal ScrollView or the height of the vertical ScrollView.
|
|
3313
|
+
*
|
|
3314
|
+
* @default `false`
|
|
3410
3315
|
*/
|
|
3411
|
-
|
|
3316
|
+
disableIntervalMomentum?: boolean | undefined
|
|
3412
3317
|
/**
|
|
3413
|
-
*
|
|
3414
|
-
*
|
|
3318
|
+
* A floating-point number that determines how quickly the scroll view
|
|
3319
|
+
* decelerates after the user lifts their finger. You may also use string
|
|
3320
|
+
* shortcuts `"normal"` and `"fast"` which match the underlying iOS settings
|
|
3321
|
+
* for `UIScrollViewDecelerationRateNormal` and
|
|
3322
|
+
* `UIScrollViewDecelerationRateFast` respectively.
|
|
3323
|
+
*
|
|
3324
|
+
* - `'normal'`: 0.998 on iOS, 0.985 on Android
|
|
3325
|
+
* - `'fast'`: 0.99 on iOS, 0.9 on Android
|
|
3326
|
+
*
|
|
3327
|
+
* @default `'normal'`
|
|
3415
3328
|
*/
|
|
3416
|
-
|
|
3417
|
-
| Readonly<{
|
|
3418
|
-
false?: ColorValue | undefined
|
|
3419
|
-
true?: ColorValue | undefined
|
|
3420
|
-
}>
|
|
3421
|
-
| undefined
|
|
3329
|
+
decelerationRate?: DecelerationRateType | undefined
|
|
3422
3330
|
/**
|
|
3423
|
-
*
|
|
3424
|
-
* false or when the switch is disabled (and the switch is translucent).
|
|
3331
|
+
* *Experimental, iOS Only*. The API is experimental and will change in future releases.
|
|
3425
3332
|
*
|
|
3426
|
-
*
|
|
3333
|
+
* Controls how much distance is traveled after user stops scrolling.
|
|
3334
|
+
* A value greater than 1 will increase the distance traveled.
|
|
3335
|
+
* A value less than 1 will decrease the distance traveled.
|
|
3336
|
+
*
|
|
3337
|
+
* @deprecated
|
|
3338
|
+
*
|
|
3339
|
+
* @default `1`
|
|
3427
3340
|
*/
|
|
3428
|
-
|
|
3341
|
+
experimental_endDraggingSensitivityMultiplier?: number | undefined
|
|
3429
3342
|
/**
|
|
3430
|
-
*
|
|
3431
|
-
*
|
|
3432
|
-
*
|
|
3343
|
+
* When true, the scroll view's children are arranged horizontally in a row
|
|
3344
|
+
* instead of vertically in a column.
|
|
3345
|
+
*
|
|
3346
|
+
* @default `false`
|
|
3433
3347
|
*/
|
|
3434
|
-
|
|
3348
|
+
horizontal?: boolean | undefined
|
|
3435
3349
|
/**
|
|
3436
|
-
*
|
|
3437
|
-
*
|
|
3438
|
-
* instead.
|
|
3350
|
+
* If sticky headers should stick at the bottom instead of the top of the
|
|
3351
|
+
* ScrollView. This is usually used with inverted ScrollViews.
|
|
3439
3352
|
*/
|
|
3440
|
-
|
|
3441
|
-
|
|
3442
|
-
|
|
3353
|
+
invertStickyHeaders?: boolean | undefined
|
|
3354
|
+
/**
|
|
3355
|
+
* Determines whether the keyboard gets dismissed in response to a drag.
|
|
3356
|
+
*
|
|
3357
|
+
* *Cross platform*
|
|
3358
|
+
*
|
|
3359
|
+
* - `'none'`, drags do not dismiss the keyboard.
|
|
3360
|
+
* - `'on-drag'`, the keyboard is dismissed when a drag begins.
|
|
3361
|
+
*
|
|
3362
|
+
* *iOS Only*
|
|
3363
|
+
*
|
|
3364
|
+
* - `'interactive'`, the keyboard is dismissed interactively with the drag and moves in
|
|
3365
|
+
* synchrony with the touch; dragging upwards cancels the dismissal.
|
|
3366
|
+
* On Android this is not supported and it will have the same behavior as `'none'`.
|
|
3367
|
+
*
|
|
3368
|
+
* @default `'none'`
|
|
3369
|
+
*/
|
|
3370
|
+
keyboardDismissMode?: ('none' | 'on-drag' | 'interactive') | undefined
|
|
3371
|
+
/**
|
|
3372
|
+
* Determines when the keyboard should stay visible after a tap.
|
|
3373
|
+
*
|
|
3374
|
+
* - `'never'`, tapping outside of the focused text input when the keyboard
|
|
3375
|
+
* is up dismisses the keyboard. When this happens, children will not receive the tap.
|
|
3376
|
+
* - `'always'`, the keyboard will not dismiss automatically, and the scroll view will not
|
|
3377
|
+
* catch taps, but children of the scroll view can catch taps.
|
|
3378
|
+
* - `'handled'`, the keyboard will not dismiss automatically when the tap was handled by
|
|
3379
|
+
* children, (or captured by an ancestor).
|
|
3380
|
+
*
|
|
3381
|
+
* @default `'never'`
|
|
3382
|
+
*/
|
|
3383
|
+
keyboardShouldPersistTaps?: ('always' | 'never' | 'handled') | undefined
|
|
3384
|
+
/**
|
|
3385
|
+
* When set, the scroll view will adjust the scroll position so that the first child that is
|
|
3386
|
+
* partially or fully visible and at or beyond `minIndexForVisible` will not change position.
|
|
3387
|
+
* This is useful for lists that are loading content in both directions, e.g. a chat thread,
|
|
3388
|
+
* where new messages coming in might otherwise cause the scroll position to jump. A value of 0
|
|
3389
|
+
* is common, but other values such as 1 can be used to skip loading spinners or other content
|
|
3390
|
+
* that should not maintain position.
|
|
3391
|
+
*
|
|
3392
|
+
* The optional `autoscrollToTopThreshold` can be used to make the content automatically scroll
|
|
3393
|
+
* to the top after making the adjustment if the user was within the threshold of the top before
|
|
3394
|
+
* the adjustment was made. This is also useful for chat-like applications where you want to see
|
|
3395
|
+
* new messages scroll into place, but not if the user has scrolled up a ways and it would be
|
|
3396
|
+
* disruptive to scroll a bunch.
|
|
3397
|
+
*
|
|
3398
|
+
* Caveat 1: Reordering elements in the scrollview with this enabled will probably cause
|
|
3399
|
+
* jumpiness and jank. It can be fixed, but there are currently no plans to do so. For now,
|
|
3400
|
+
* don't re-order the content of any ScrollViews or Lists that use this feature.
|
|
3401
|
+
*
|
|
3402
|
+
* Caveat 2: This simply uses `contentOffset` and `frame.origin` in native code to compute
|
|
3403
|
+
* visibility. Occlusion, transforms, and other complexity won't be taken into account as to
|
|
3404
|
+
* whether content is "visible" or not.
|
|
3405
|
+
*
|
|
3406
|
+
*/
|
|
3407
|
+
maintainVisibleContentPosition?:
|
|
3408
|
+
| Readonly<{
|
|
3409
|
+
minIndexForVisible: number
|
|
3410
|
+
autoscrollToTopThreshold?: number | undefined
|
|
3411
|
+
}>
|
|
3412
|
+
| undefined
|
|
3413
|
+
/**
|
|
3414
|
+
* Called when the momentum scroll starts (scroll which occurs as the ScrollView glides to a stop).
|
|
3415
|
+
*/
|
|
3416
|
+
onMomentumScrollBegin?: ((event: ScrollEvent) => void) | undefined
|
|
3417
|
+
/**
|
|
3418
|
+
* Called when the momentum scroll ends (scroll which occurs as the ScrollView glides to a stop).
|
|
3419
|
+
*/
|
|
3420
|
+
onMomentumScrollEnd?: ((event: ScrollEvent) => void) | undefined
|
|
3421
|
+
/**
|
|
3422
|
+
* Fires at most once per frame during scrolling.
|
|
3423
|
+
*/
|
|
3424
|
+
onScroll?: ((event: ScrollEvent) => void) | undefined
|
|
3425
|
+
/**
|
|
3426
|
+
* Called when the user begins to drag the scroll view.
|
|
3427
|
+
*/
|
|
3428
|
+
onScrollBeginDrag?: ((event: ScrollEvent) => void) | undefined
|
|
3429
|
+
/**
|
|
3430
|
+
* Called when the user stops dragging the scroll view and it either stops
|
|
3431
|
+
* or begins to glide.
|
|
3432
|
+
*/
|
|
3433
|
+
onScrollEndDrag?: ((event: ScrollEvent) => void) | undefined
|
|
3434
|
+
/**
|
|
3435
|
+
* Called when scrollable content view of the ScrollView changes.
|
|
3436
|
+
*
|
|
3437
|
+
* Handler function is passed the content width and content height as parameters:
|
|
3438
|
+
* `(contentWidth, contentHeight)`
|
|
3439
|
+
*
|
|
3440
|
+
* It's implemented using onLayout handler attached to the content container
|
|
3441
|
+
* which this ScrollView renders.
|
|
3442
|
+
*/
|
|
3443
|
+
onContentSizeChange?:
|
|
3444
|
+
| ((contentWidth: number, contentHeight: number) => void)
|
|
3445
|
+
| undefined
|
|
3446
|
+
onKeyboardDidShow?: ((event: KeyboardEvent) => void) | undefined
|
|
3447
|
+
onKeyboardDidHide?: ((event: KeyboardEvent) => void) | undefined
|
|
3448
|
+
onKeyboardWillShow?: ((event: KeyboardEvent) => void) | undefined
|
|
3449
|
+
onKeyboardWillHide?: ((event: KeyboardEvent) => void) | undefined
|
|
3450
|
+
/**
|
|
3451
|
+
* When true, the scroll view stops on multiples of the scroll view's size
|
|
3452
|
+
* when scrolling. This can be used for horizontal pagination.
|
|
3453
|
+
*
|
|
3454
|
+
* @default `false`
|
|
3455
|
+
*/
|
|
3456
|
+
pagingEnabled?: boolean | undefined
|
|
3457
|
+
/**
|
|
3458
|
+
* When false, the view cannot be scrolled via touch interaction.
|
|
3459
|
+
* Note that the view can always be scrolled by calling `scrollTo`.
|
|
3460
|
+
*
|
|
3461
|
+
* @default `true`
|
|
3462
|
+
*/
|
|
3463
|
+
scrollEnabled?: boolean | undefined
|
|
3464
|
+
/**
|
|
3465
|
+
* Limits how often scroll events will be fired while scrolling, specified as
|
|
3466
|
+
* a time interval in ms. This may be useful when expensive work is performed
|
|
3467
|
+
* in response to scrolling. Values <= `16` will disable throttling,
|
|
3468
|
+
* regardless of the refresh rate of the device.
|
|
3469
|
+
*
|
|
3470
|
+
* @default `0`
|
|
3471
|
+
*/
|
|
3472
|
+
scrollEventThrottle?: number | undefined
|
|
3473
|
+
/**
|
|
3474
|
+
* When true, shows a vertical scroll indicator.
|
|
3475
|
+
*
|
|
3476
|
+
* @default `true`
|
|
3477
|
+
*/
|
|
3478
|
+
showsVerticalScrollIndicator?: boolean | undefined
|
|
3479
|
+
/**
|
|
3480
|
+
* When true, the sticky header is hidden when scrolling down, and docks
|
|
3481
|
+
* at the top when scrolling up.
|
|
3482
|
+
*
|
|
3483
|
+
* @default `false`
|
|
3484
|
+
*/
|
|
3485
|
+
stickyHeaderHiddenOnScroll?: boolean | undefined
|
|
3486
|
+
/**
|
|
3487
|
+
* An array of child indices determining which children get docked to the
|
|
3488
|
+
* top of the screen when scrolling. For example, passing
|
|
3489
|
+
* `stickyHeaderIndices={[0]}` will cause the first child to be fixed to the
|
|
3490
|
+
* top of the scroll view. This property is not supported in conjunction
|
|
3491
|
+
* with `horizontal={true}`.
|
|
3492
|
+
*/
|
|
3493
|
+
stickyHeaderIndices?: ReadonlyArray<number> | undefined
|
|
3494
|
+
/**
|
|
3495
|
+
* A React Component that will be used to render sticky headers.
|
|
3496
|
+
* To be used together with `stickyHeaderIndices` or with `SectionList`, defaults to `ScrollViewStickyHeader`.
|
|
3497
|
+
* You may need to set this if your sticky header uses custom transforms (eg. translation),
|
|
3498
|
+
* for example when you want your list to have an animated hidable header.
|
|
3499
|
+
*/
|
|
3500
|
+
StickyHeaderComponent?: StickyHeaderComponentType | undefined
|
|
3501
|
+
/**
|
|
3502
|
+
* When `snapToInterval` is set, `snapToAlignment` defines the relationship
|
|
3503
|
+
* of the snapping to the scroll view.
|
|
3504
|
+
*
|
|
3505
|
+
* - `'start'`, aligns the snap at the left (horizontal) or top (vertical).
|
|
3506
|
+
* - `'center'`, aligns the snap in the center.
|
|
3507
|
+
* - `'end'`, aligns the snap at the right (horizontal) or bottom (vertical).
|
|
3508
|
+
*
|
|
3509
|
+
* @default `'start'`
|
|
3510
|
+
*/
|
|
3511
|
+
snapToAlignment?: ('start' | 'center' | 'end') | undefined
|
|
3512
|
+
/**
|
|
3513
|
+
* When set, causes the scroll view to stop at multiples of the value of
|
|
3514
|
+
* `snapToInterval`. This can be used for paginating through children
|
|
3515
|
+
* that have lengths smaller than the scroll view. Typically used in
|
|
3516
|
+
* combination with `snapToAlignment` and `decelerationRate="fast"`.
|
|
3517
|
+
*
|
|
3518
|
+
* Overrides less configurable `pagingEnabled` prop.
|
|
3519
|
+
*/
|
|
3520
|
+
snapToInterval?: number | undefined
|
|
3521
|
+
/**
|
|
3522
|
+
* When set, causes the scroll view to stop at the defined offsets.
|
|
3523
|
+
* This can be used for paginating through variously sized children
|
|
3524
|
+
* that have lengths smaller than the scroll view. Typically used in
|
|
3525
|
+
* combination with `decelerationRate="fast"`.
|
|
3526
|
+
*
|
|
3527
|
+
* Overrides less configurable `pagingEnabled` and `snapToInterval` props.
|
|
3528
|
+
*/
|
|
3529
|
+
snapToOffsets?: ReadonlyArray<number> | undefined
|
|
3530
|
+
/**
|
|
3531
|
+
* Use in conjunction with `snapToOffsets`. By default, the beginning
|
|
3532
|
+
* of the list counts as a snap offset. Set `snapToStart` to `false` to disable
|
|
3533
|
+
* this behavior and allow the list to scroll freely between its start and
|
|
3534
|
+
* the first `snapToOffsets` offset.
|
|
3535
|
+
*
|
|
3536
|
+
* @default `true`
|
|
3537
|
+
*/
|
|
3538
|
+
snapToStart?: boolean | undefined
|
|
3539
|
+
/**
|
|
3540
|
+
* Use in conjunction with `snapToOffsets`. By default, the end
|
|
3541
|
+
* of the list counts as a snap offset. Set `snapToEnd` to `false` to disable
|
|
3542
|
+
* this behavior and allow the list to scroll freely between its end and
|
|
3543
|
+
* the last `snapToOffsets` offset.
|
|
3544
|
+
*
|
|
3545
|
+
* @default `true`
|
|
3546
|
+
*/
|
|
3547
|
+
snapToEnd?: boolean | undefined
|
|
3548
|
+
/**
|
|
3549
|
+
* Experimental: When true, offscreen child views (whose `overflow` value is
|
|
3550
|
+
* `hidden`) are removed from their native backing superview when offscreen.
|
|
3551
|
+
* This can improve scrolling performance on long lists.
|
|
3552
|
+
*
|
|
3553
|
+
* @default `true`
|
|
3554
|
+
*/
|
|
3555
|
+
removeClippedSubviews?: boolean | undefined
|
|
3556
|
+
/**
|
|
3557
|
+
* A RefreshControl component, used to provide pull-to-refresh
|
|
3558
|
+
* functionality for the ScrollView. Only works for vertical ScrollViews
|
|
3559
|
+
* (`horizontal` prop must be `false`).
|
|
3560
|
+
*
|
|
3561
|
+
* See [RefreshControl](docs/refreshcontrol.html).
|
|
3562
|
+
*/
|
|
3563
|
+
refreshControl?: React.JSX.Element | undefined
|
|
3564
|
+
children?: React.ReactNode | undefined
|
|
3565
|
+
/**
|
|
3566
|
+
* A ref to the inner View element of the ScrollView. This should be used
|
|
3567
|
+
* instead of calling `getInnerViewRef`.
|
|
3568
|
+
*/
|
|
3569
|
+
innerViewRef?: React.Ref<InnerViewInstance> | undefined
|
|
3570
|
+
/**
|
|
3571
|
+
* A ref to the Native ScrollView component. This ref can be used to call
|
|
3572
|
+
* all of ScrollView's public methods, in addition to native methods like
|
|
3573
|
+
* measure, measureLayout, etc.
|
|
3574
|
+
*/
|
|
3575
|
+
scrollViewRef?: React.Ref<ScrollViewInstance> | undefined
|
|
3576
|
+
}>
|
|
3577
|
+
|
|
3578
|
+
export interface ScrollViewImperativeMethods {
|
|
3579
|
+
/**
|
|
3580
|
+
* Returns a reference to the underlying scroll responder, which supports
|
|
3581
|
+
* operations like `scrollTo`. All ScrollView-like components should
|
|
3582
|
+
* implement this method so that they can be composed while providing access
|
|
3583
|
+
* to the underlying scroll responder's methods.
|
|
3584
|
+
*/
|
|
3585
|
+
readonly getScrollResponder: () => ScrollResponderType
|
|
3586
|
+
readonly getScrollableNode: () => number | undefined
|
|
3587
|
+
readonly getInnerViewNode: () => number | undefined
|
|
3588
|
+
readonly getInnerViewRef: () => InnerViewInstance | null
|
|
3589
|
+
/**
|
|
3590
|
+
* Returns a reference to the underlying native scroll view, or null if the
|
|
3591
|
+
* native instance is not mounted.
|
|
3592
|
+
*/
|
|
3593
|
+
readonly getNativeScrollRef: () => ScrollViewInstance | null
|
|
3594
|
+
/**
|
|
3595
|
+
* Scrolls to a given x, y offset, either immediately or with a smooth animation.
|
|
3596
|
+
* Syntax:
|
|
3597
|
+
*
|
|
3598
|
+
* scrollTo(options: {x: number = 0; y: number = 0; animated: boolean = true})
|
|
3599
|
+
*
|
|
3600
|
+
* Note: The weird argument signature is due to the fact that, for historical reasons,
|
|
3601
|
+
* the function also accepts separate arguments as an alternative to the options object.
|
|
3602
|
+
* This is deprecated due to ambiguity (y before x), and SHOULD NOT BE USED.
|
|
3603
|
+
*/
|
|
3604
|
+
readonly scrollTo: (
|
|
3605
|
+
options?: ScrollViewScrollToOptions | number,
|
|
3606
|
+
deprecatedX?: number,
|
|
3607
|
+
deprecatedAnimated?: boolean
|
|
3608
|
+
) => void
|
|
3609
|
+
/**
|
|
3610
|
+
* A helper function that scrolls to the end of the scrollview;
|
|
3611
|
+
* If this is a vertical ScrollView, it scrolls to the bottom.
|
|
3612
|
+
* If this is a horizontal ScrollView scrolls to the right.
|
|
3613
|
+
*
|
|
3614
|
+
* The options object has an animated prop, that enables the scrolling animation or not.
|
|
3615
|
+
* The animated prop defaults to true
|
|
3616
|
+
*/
|
|
3617
|
+
readonly scrollToEnd: (options?: ScrollViewScrollToOptions | undefined) => void
|
|
3618
|
+
/**
|
|
3619
|
+
* Displays the scroll indicators momentarily.
|
|
3620
|
+
*/
|
|
3621
|
+
readonly flashScrollIndicators: () => void
|
|
3622
|
+
readonly scrollResponderZoomTo: (
|
|
3623
|
+
rect: {
|
|
3624
|
+
x: number
|
|
3625
|
+
y: number
|
|
3626
|
+
width: number
|
|
3627
|
+
height: number
|
|
3628
|
+
animated?: boolean | undefined
|
|
3629
|
+
},
|
|
3630
|
+
animated?: boolean
|
|
3631
|
+
) => void
|
|
3632
|
+
readonly scrollResponderScrollNativeHandleToKeyboard: (
|
|
3633
|
+
nodeHandle: number | HostInstance,
|
|
3634
|
+
additionalOffset?: number,
|
|
3635
|
+
preventNegativeScrollOffset?: boolean
|
|
3636
|
+
) => void
|
|
3637
|
+
}
|
|
3638
|
+
|
|
3639
|
+
export interface ScrollViewInstance extends HostInstance, ScrollViewImperativeMethods {}
|
|
3640
|
+
|
|
3641
|
+
export interface ScrollViewProps extends Readonly<
|
|
3642
|
+
Omit<
|
|
3643
|
+
Omit<ViewProps, 'experimental_accessibilityOrder'>,
|
|
3644
|
+
| keyof ScrollViewPropsIOS
|
|
3645
|
+
| keyof ScrollViewPropsAndroid
|
|
3646
|
+
| keyof ScrollViewBaseProps
|
|
3647
|
+
| keyof {}
|
|
3648
|
+
> &
|
|
3649
|
+
Omit<
|
|
3650
|
+
ScrollViewPropsIOS,
|
|
3651
|
+
keyof ScrollViewPropsAndroid | keyof ScrollViewBaseProps | keyof {}
|
|
3652
|
+
> &
|
|
3653
|
+
Omit<ScrollViewPropsAndroid, keyof ScrollViewBaseProps | keyof {}> &
|
|
3654
|
+
Omit<ScrollViewBaseProps, keyof {}>
|
|
3655
|
+
> {}
|
|
3656
|
+
|
|
3657
|
+
export type ScrollViewPropsAndroid = Readonly<{
|
|
3658
|
+
/**
|
|
3659
|
+
* Enables nested scrolling for Android API level 21+. Nested scrolling is
|
|
3660
|
+
* supported by default on iOS.
|
|
3661
|
+
*
|
|
3662
|
+
* @default `false`
|
|
3663
|
+
* @platform android
|
|
3664
|
+
*/
|
|
3665
|
+
nestedScrollEnabled?: boolean | undefined
|
|
3666
|
+
/**
|
|
3667
|
+
* Sometimes a scrollview takes up more space than its content fills. When this is
|
|
3668
|
+
* the case, this prop will fill the rest of the scrollview with a color to avoid setting
|
|
3669
|
+
* a background and creating unnecessary overdraw. This is an advanced optimization
|
|
3670
|
+
* that is not needed in the general case.
|
|
3671
|
+
* @platform android
|
|
3672
|
+
*/
|
|
3673
|
+
endFillColor?: ColorValue | undefined
|
|
3674
|
+
/**
|
|
3675
|
+
* Tag used to log scroll performance on this scroll view. Will force
|
|
3676
|
+
* momentum events to be turned on (see sendMomentumEvents). This doesn't do
|
|
3677
|
+
* anything out of the box and you need to implement a custom native
|
|
3678
|
+
* FpsListener for it to be useful.
|
|
3679
|
+
* @platform android
|
|
3680
|
+
*/
|
|
3681
|
+
scrollPerfTag?: string | undefined
|
|
3682
|
+
/**
|
|
3683
|
+
* Used to override default value of overScroll mode.
|
|
3684
|
+
*
|
|
3685
|
+
* Possible values:
|
|
3686
|
+
*
|
|
3687
|
+
* - `'auto'` - Default value, allow a user to over-scroll
|
|
3688
|
+
* this view only if the content is large enough to meaningfully scroll.
|
|
3689
|
+
* - `'always'` - Always allow a user to over-scroll this view.
|
|
3690
|
+
* - `'never'` - Never allow a user to over-scroll this view.
|
|
3691
|
+
*
|
|
3692
|
+
* @platform android
|
|
3693
|
+
*/
|
|
3694
|
+
overScrollMode?: ('auto' | 'always' | 'never') | undefined
|
|
3695
|
+
/**
|
|
3696
|
+
* Causes the scrollbars not to turn transparent when they are not in use.
|
|
3697
|
+
*
|
|
3698
|
+
* @default `false`
|
|
3699
|
+
* @platform android
|
|
3700
|
+
*/
|
|
3701
|
+
persistentScrollbar?: boolean | undefined
|
|
3702
|
+
/**
|
|
3703
|
+
* Controls the fading effect at the edges of the scroll content.
|
|
3704
|
+
*
|
|
3705
|
+
* A value greater than 0 will apply the fading effect, indicating more content is available
|
|
3706
|
+
* to scroll.
|
|
3707
|
+
*
|
|
3708
|
+
* You can specify a single number to apply the same fading length to both edges.
|
|
3709
|
+
* Alternatively, use an object with `start` and `end` properties to set different
|
|
3710
|
+
* fading lengths for the start and end of the scroll content.
|
|
3711
|
+
*
|
|
3712
|
+
* The default value is 0.
|
|
3713
|
+
*
|
|
3714
|
+
* @platform android
|
|
3715
|
+
*/
|
|
3716
|
+
fadingEdgeLength?:
|
|
3717
|
+
| (number | undefined)
|
|
3718
|
+
| {
|
|
3719
|
+
start: number
|
|
3720
|
+
end: number
|
|
3721
|
+
}
|
|
3722
|
+
| undefined
|
|
3723
|
+
/**
|
|
3724
|
+
* When false, the ScrollView will not automatically scroll to a focused child when
|
|
3725
|
+
* the child requests focus. This can be useful when you want to control the scroll
|
|
3726
|
+
* position programmatically.
|
|
3727
|
+
*
|
|
3728
|
+
* @default `true`
|
|
3729
|
+
* @platform android
|
|
3730
|
+
*/
|
|
3731
|
+
scrollsChildToFocus?: boolean | undefined
|
|
3732
|
+
}>
|
|
3733
|
+
|
|
3734
|
+
export type ScrollViewPropsIOS = Readonly<{
|
|
3735
|
+
/**
|
|
3736
|
+
* Controls whether iOS should automatically adjust the content inset
|
|
3737
|
+
* for scroll views that are placed behind a navigation bar or
|
|
3738
|
+
* tab bar/toolbar.
|
|
3739
|
+
*
|
|
3740
|
+
* @default `true`
|
|
3741
|
+
* @platform ios
|
|
3742
|
+
*/
|
|
3743
|
+
automaticallyAdjustContentInsets?: boolean | undefined
|
|
3744
|
+
/**
|
|
3745
|
+
* Controls whether the ScrollView should automatically adjust its `contentInset`
|
|
3746
|
+
* and `scrollViewInsets` when the Keyboard changes its size.
|
|
3747
|
+
*
|
|
3748
|
+
* @default `false`
|
|
3749
|
+
* @platform ios
|
|
3750
|
+
*/
|
|
3751
|
+
automaticallyAdjustKeyboardInsets?: boolean | undefined
|
|
3752
|
+
/**
|
|
3753
|
+
* Controls whether iOS should automatically adjust the scroll indicator
|
|
3754
|
+
* insets. Available on iOS 13 and later.
|
|
3755
|
+
*
|
|
3756
|
+
* @default `true`
|
|
3757
|
+
* @platform ios
|
|
3758
|
+
*/
|
|
3759
|
+
automaticallyAdjustsScrollIndicatorInsets?: boolean | undefined
|
|
3760
|
+
/**
|
|
3761
|
+
* The amount by which the scroll view content is inset from the edges
|
|
3762
|
+
* of the scroll view.
|
|
3763
|
+
*
|
|
3764
|
+
* @default `{top: 0, left: 0, bottom: 0, right: 0}`
|
|
3765
|
+
* @platform ios
|
|
3766
|
+
*/
|
|
3767
|
+
contentInset?: EdgeInsetsProp | undefined
|
|
3768
|
+
/**
|
|
3769
|
+
* When true, the scroll view bounces when it reaches the end of the
|
|
3770
|
+
* content if the content is larger than the scroll view along the axis of
|
|
3771
|
+
* the scroll direction. When `false`, it disables all bouncing even if
|
|
3772
|
+
* the `alwaysBounce*` props are `true`.
|
|
3773
|
+
*
|
|
3774
|
+
* @default `true`
|
|
3775
|
+
* @platform ios
|
|
3776
|
+
*/
|
|
3777
|
+
bounces?: boolean | undefined
|
|
3778
|
+
/**
|
|
3779
|
+
* By default, ScrollView has an active pan responder that hijacks panresponders
|
|
3780
|
+
* deeper in the render tree in order to prevent accidental touches while scrolling.
|
|
3781
|
+
* However, in certain occasions (such as when using snapToInterval) in a vertical scrollview
|
|
3782
|
+
* You may want to disable this behavior in order to prevent the ScrollView from blocking touches
|
|
3783
|
+
*/
|
|
3784
|
+
disableScrollViewPanResponder?: boolean | undefined
|
|
3785
|
+
/**
|
|
3786
|
+
* When true, gestures can drive zoom past min/max and the zoom will animate
|
|
3787
|
+
* to the min/max value at gesture end, otherwise the zoom will not exceed
|
|
3788
|
+
* the limits.
|
|
3789
|
+
* @platform ios
|
|
3790
|
+
*/
|
|
3791
|
+
bouncesZoom?: boolean | undefined
|
|
3792
|
+
/**
|
|
3793
|
+
* When true, the scroll view bounces horizontally when it reaches the end
|
|
3794
|
+
* even if the content is smaller than the scroll view itself.
|
|
3795
|
+
*
|
|
3796
|
+
* @default {@platform horizontal} `true`
|
|
3797
|
+
* @platform ios
|
|
3798
|
+
*/
|
|
3799
|
+
alwaysBounceHorizontal?: boolean | undefined
|
|
3800
|
+
/**
|
|
3801
|
+
* When true, the scroll view bounces vertically when it reaches the end
|
|
3802
|
+
* even if the content is smaller than the scroll view itself.
|
|
3803
|
+
*
|
|
3804
|
+
* @default {@platform horizontal} `false`
|
|
3805
|
+
* @platform ios
|
|
3806
|
+
*/
|
|
3807
|
+
alwaysBounceVertical?: boolean | undefined
|
|
3808
|
+
/**
|
|
3809
|
+
* When true, the scroll view automatically centers the content when the
|
|
3810
|
+
* content is smaller than the scroll view bounds; when the content is
|
|
3811
|
+
* larger than the scroll view, this property has no effect.
|
|
3812
|
+
*
|
|
3813
|
+
* @default `false`
|
|
3814
|
+
* @platform ios
|
|
3815
|
+
*/
|
|
3816
|
+
centerContent?: boolean | undefined
|
|
3817
|
+
/**
|
|
3818
|
+
* The style of the scroll indicators.
|
|
3819
|
+
*
|
|
3820
|
+
* - `'default'` (the default), same as `black`.
|
|
3821
|
+
* - `'black'`, scroll indicator is black. This style is good against a light background.
|
|
3822
|
+
* - `'white'`, scroll indicator is white. This style is good against a dark background.
|
|
3823
|
+
*
|
|
3824
|
+
* @platform ios
|
|
3825
|
+
*/
|
|
3826
|
+
indicatorStyle?: ('default' | 'black' | 'white') | undefined
|
|
3827
|
+
/**
|
|
3828
|
+
* When true, the ScrollView will try to lock to only vertical or horizontal
|
|
3829
|
+
* scrolling while dragging.
|
|
3830
|
+
*
|
|
3831
|
+
* @default `false`
|
|
3832
|
+
* @platform ios
|
|
3833
|
+
*/
|
|
3834
|
+
directionalLockEnabled?: boolean | undefined
|
|
3835
|
+
/**
|
|
3836
|
+
* When false, once tracking starts, the scroll view will not try to drag
|
|
3837
|
+
* if the touch moves.
|
|
3838
|
+
*
|
|
3839
|
+
* @default `true`
|
|
3840
|
+
* @platform ios
|
|
3841
|
+
*/
|
|
3842
|
+
canCancelContentTouches?: boolean | undefined
|
|
3843
|
+
/**
|
|
3844
|
+
* The maximum allowed zoom scale.
|
|
3845
|
+
*
|
|
3846
|
+
* @default `1.0`
|
|
3847
|
+
* @platform ios
|
|
3848
|
+
*/
|
|
3849
|
+
maximumZoomScale?: number | undefined
|
|
3850
|
+
/**
|
|
3851
|
+
* The minimum allowed zoom scale.
|
|
3852
|
+
*
|
|
3853
|
+
* @default `1.0`
|
|
3854
|
+
* @platform ios
|
|
3855
|
+
*/
|
|
3856
|
+
minimumZoomScale?: number | undefined
|
|
3857
|
+
/**
|
|
3858
|
+
* When true, ScrollView allows use of pinch gestures to zoom in and out.
|
|
3859
|
+
*
|
|
3860
|
+
* @default `true`
|
|
3861
|
+
* @platform ios
|
|
3862
|
+
*/
|
|
3863
|
+
pinchGestureEnabled?: boolean | undefined
|
|
3864
|
+
/**
|
|
3865
|
+
* The amount by which the scroll view indicators are inset from the edges
|
|
3866
|
+
* of the scroll view. This should normally be set to the same value as
|
|
3867
|
+
* the `contentInset`.
|
|
3868
|
+
*
|
|
3869
|
+
* @default `{top: 0, left: 0, bottom: 0, right: 0}`
|
|
3870
|
+
* @platform ios
|
|
3871
|
+
*/
|
|
3872
|
+
scrollIndicatorInsets?: EdgeInsetsProp | undefined
|
|
3873
|
+
/**
|
|
3874
|
+
* When true, the scroll view can be programmatically scrolled beyond its
|
|
3875
|
+
* content size.
|
|
3876
|
+
*
|
|
3877
|
+
* @default `false`
|
|
3878
|
+
* @platform ios
|
|
3879
|
+
*/
|
|
3880
|
+
scrollToOverflowEnabled?: boolean | undefined
|
|
3881
|
+
/**
|
|
3882
|
+
* When true, the scroll view scrolls to top when the status bar is tapped.
|
|
3883
|
+
*
|
|
3884
|
+
* @default `true`
|
|
3885
|
+
* @platform ios
|
|
3886
|
+
*/
|
|
3887
|
+
scrollsToTop?: boolean | undefined
|
|
3888
|
+
/**
|
|
3889
|
+
* Fires when the scroll view scrolls to top after the status bar has been tapped
|
|
3890
|
+
* @platform ios
|
|
3891
|
+
*/
|
|
3892
|
+
onScrollToTop?: ((event: ScrollEvent) => void) | undefined
|
|
3893
|
+
/**
|
|
3894
|
+
* When true, shows a horizontal scroll indicator.
|
|
3895
|
+
*
|
|
3896
|
+
* @default `true`
|
|
3897
|
+
*/
|
|
3898
|
+
showsHorizontalScrollIndicator?: boolean | undefined
|
|
3899
|
+
/**
|
|
3900
|
+
* The current scale of the scroll view content.
|
|
3901
|
+
*
|
|
3902
|
+
* @default `1.0`
|
|
3903
|
+
* @platform ios
|
|
3904
|
+
*/
|
|
3905
|
+
zoomScale?: number | undefined
|
|
3906
|
+
/**
|
|
3907
|
+
* This property specifies how the safe area insets are used to modify the
|
|
3908
|
+
* content area of the scroll view.
|
|
3909
|
+
*
|
|
3910
|
+
* @default `'never'`
|
|
3911
|
+
* @platform ios
|
|
3912
|
+
*/
|
|
3913
|
+
contentInsetAdjustmentBehavior?:
|
|
3914
|
+
| ('automatic' | 'scrollableAxes' | 'never' | 'always')
|
|
3915
|
+
| undefined
|
|
3916
|
+
}>
|
|
3917
|
+
|
|
3918
|
+
export interface ScrollViewScrollToOptions {
|
|
3919
|
+
x?: number | undefined
|
|
3920
|
+
y?: number | undefined
|
|
3921
|
+
animated?: boolean | undefined
|
|
3922
|
+
}
|
|
3923
|
+
|
|
3924
|
+
export type ScrollViewStickyHeaderProps = Readonly<{
|
|
3925
|
+
children?: React.ReactNode | undefined
|
|
3926
|
+
nextHeaderLayoutY: number | undefined
|
|
3927
|
+
onLayout: (event: LayoutChangeEvent) => void
|
|
3928
|
+
scrollAnimatedValue: AnimatedValue
|
|
3929
|
+
inverted: boolean | undefined
|
|
3930
|
+
scrollViewHeight: number | undefined
|
|
3931
|
+
nativeID?: string | undefined
|
|
3932
|
+
hiddenOnScroll?: boolean | undefined
|
|
3933
|
+
}>
|
|
3934
|
+
|
|
3935
|
+
export type StickyHeaderComponentType = (
|
|
3936
|
+
props: Omit<ScrollViewStickyHeaderProps, 'ref'> & {
|
|
3937
|
+
ref?:
|
|
3938
|
+
| React.Ref<
|
|
3939
|
+
Readonly<{
|
|
3940
|
+
setNextHeaderY: ($$PARAM_0$$: number) => void
|
|
3941
|
+
}>
|
|
3942
|
+
>
|
|
3943
|
+
| undefined
|
|
3944
|
+
}
|
|
3945
|
+
) => React.ReactNode
|
|
3946
|
+
|
|
3947
|
+
export type StyleProp<T> = null | void | T | false | '' | ReadonlyArray<StyleProp<T>>
|
|
3948
|
+
|
|
3949
|
+
export type SwitchChangeEvent = NativeSyntheticEvent<SwitchChangeEventData>
|
|
3950
|
+
|
|
3951
|
+
export type SwitchChangeEventData = Readonly<{
|
|
3952
|
+
target: number
|
|
3953
|
+
value: boolean
|
|
3954
|
+
}>
|
|
3955
|
+
|
|
3956
|
+
export interface SwitchProps extends Readonly<
|
|
3957
|
+
Omit<ViewProps, keyof SwitchPropsIOS | keyof SwitchPropsBase | keyof {}> &
|
|
3958
|
+
Omit<SwitchPropsIOS, keyof SwitchPropsBase | keyof {}> &
|
|
3959
|
+
Omit<SwitchPropsBase, keyof {}>
|
|
3960
|
+
> {}
|
|
3961
|
+
|
|
3962
|
+
export type SwitchPropsBase = {
|
|
3963
|
+
/**
|
|
3964
|
+
* If true, the user won't be able to toggle the switch.
|
|
3965
|
+
*
|
|
3966
|
+
* @default `false`
|
|
3967
|
+
*/
|
|
3968
|
+
disabled?: boolean | undefined
|
|
3969
|
+
/**
|
|
3970
|
+
* The value of the switch. If true the switch will be turned on.
|
|
3971
|
+
*
|
|
3972
|
+
* @default `false`
|
|
3973
|
+
*/
|
|
3974
|
+
value?: boolean | undefined
|
|
3975
|
+
/**
|
|
3976
|
+
* Color of the foreground switch grip. If set on iOS, the switch grip
|
|
3977
|
+
* loses its drop shadow.
|
|
3978
|
+
*/
|
|
3979
|
+
thumbColor?: ColorValue | undefined
|
|
3980
|
+
/**
|
|
3981
|
+
* Custom colors for the switch track. On iOS, when the switch value is
|
|
3982
|
+
* false, the track shrinks into the border.
|
|
3983
|
+
*/
|
|
3984
|
+
trackColor?:
|
|
3985
|
+
| Readonly<{
|
|
3986
|
+
false?: ColorValue | undefined
|
|
3987
|
+
true?: ColorValue | undefined
|
|
3988
|
+
}>
|
|
3989
|
+
| undefined
|
|
3990
|
+
/**
|
|
3991
|
+
* Custom color for the background. Can be seen when the switch value is
|
|
3992
|
+
* false or when the switch is disabled (and the switch is translucent).
|
|
3993
|
+
*
|
|
3994
|
+
* @platform ios
|
|
3995
|
+
*/
|
|
3996
|
+
ios_backgroundColor?: ColorValue | undefined
|
|
3997
|
+
/**
|
|
3998
|
+
* Invoked when the user tries to change the value of the switch. Receives
|
|
3999
|
+
* the change event as an argument. Use `onValueChange` to receive just
|
|
4000
|
+
* the new value instead.
|
|
4001
|
+
*/
|
|
4002
|
+
onChange?: ((event: SwitchChangeEvent) => Promise<void> | void) | undefined
|
|
4003
|
+
/**
|
|
4004
|
+
* Invoked when the user tries to change the value of the switch. Receives
|
|
4005
|
+
* the new value as an argument. Use `onChange` to receive the event
|
|
4006
|
+
* instead.
|
|
4007
|
+
*/
|
|
4008
|
+
onValueChange?: ((value: boolean) => Promise<void> | void) | undefined
|
|
4009
|
+
}
|
|
4010
|
+
|
|
3443
4011
|
export type SwitchPropsIOS = {
|
|
3444
4012
|
/**
|
|
3445
4013
|
* Background color when the switch is turned on.
|
|
@@ -3556,16 +4124,7 @@ export type TextLayoutEventData = Readonly<{
|
|
|
3556
4124
|
}>
|
|
3557
4125
|
|
|
3558
4126
|
export type TextLayoutLine = Readonly<
|
|
3559
|
-
Omit<
|
|
3560
|
-
LayoutRectangle,
|
|
3561
|
-
keyof {
|
|
3562
|
-
ascender: number
|
|
3563
|
-
capHeight: number
|
|
3564
|
-
descender: number
|
|
3565
|
-
text: string
|
|
3566
|
-
xHeight: number
|
|
3567
|
-
}
|
|
3568
|
-
> & {
|
|
4127
|
+
Omit<LayoutRectangle, 'ascender' | 'capHeight' | 'descender' | 'text' | 'xHeight'> & {
|
|
3569
4128
|
ascender: number
|
|
3570
4129
|
capHeight: number
|
|
3571
4130
|
descender: number
|
|
@@ -3682,7 +4241,10 @@ export type TextPropsIOS = {
|
|
|
3682
4241
|
lineBreakStrategyIOS?: ('none' | 'standard' | 'hangul-word' | 'push-out') | undefined
|
|
3683
4242
|
}
|
|
3684
4243
|
|
|
3685
|
-
export
|
|
4244
|
+
export interface TextStyle extends Readonly<
|
|
4245
|
+
Omit<____TextStyle_InternalCore, keyof ____TextStyle_InternalOverrides | keyof {}> &
|
|
4246
|
+
Omit<____TextStyle_InternalOverrides, keyof {}>
|
|
4247
|
+
> {}
|
|
3686
4248
|
|
|
3687
4249
|
export type TextStyleProp = ____TextStyleProp_Internal
|
|
3688
4250
|
|
|
@@ -3697,6 +4259,8 @@ export type TouchEventProps = Readonly<{
|
|
|
3697
4259
|
onTouchStartCapture?: ((e: GestureResponderEvent) => void) | undefined
|
|
3698
4260
|
}>
|
|
3699
4261
|
|
|
4262
|
+
export type ValueListenerCallback = (state: { value: number }) => unknown
|
|
4263
|
+
|
|
3700
4264
|
export type ValueOfUnion<T, K> = T extends any
|
|
3701
4265
|
? K extends keyof T
|
|
3702
4266
|
? T[K]
|
|
@@ -4004,10 +4568,15 @@ export type ViewPropsIOS = Readonly<{
|
|
|
4004
4568
|
shouldRasterizeIOS?: boolean | undefined
|
|
4005
4569
|
}>
|
|
4006
4570
|
|
|
4007
|
-
export
|
|
4571
|
+
export interface ViewStyle extends Readonly<
|
|
4572
|
+
Omit<____ViewStyle_InternalCore, keyof ____ViewStyle_InternalOverrides | keyof {}> &
|
|
4573
|
+
Omit<____ViewStyle_InternalOverrides, keyof {}>
|
|
4574
|
+
> {}
|
|
4008
4575
|
|
|
4009
4576
|
export type ViewStyleProp = ____ViewStyleProp_Internal
|
|
4010
4577
|
|
|
4011
4578
|
export { $$Image as Image }
|
|
4012
4579
|
|
|
4580
|
+
export { $$View as View }
|
|
4581
|
+
|
|
4013
4582
|
export { ImageProps as ImagePropsType }
|