@rootnative/web 0.0.0-alpha.2 → 0.0.0-alpha.3
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/CHANGELOG.md +46 -1
- package/dist/StyleRegistryContext-ROsMlY4O.js +8 -0
- package/dist/StyleRegistryContext-ROsMlY4O.js.map +1 -0
- package/dist/assets-registry/index.d.ts +18 -0
- package/dist/assets-registry/index.js +12 -0
- package/dist/assets-registry/index.js.map +1 -0
- package/dist/compile-CVUjQrR9.js +400 -0
- package/dist/compile-CVUjQrR9.js.map +1 -0
- package/dist/index.d.ts +675 -87
- package/dist/index.js +2269 -1276
- package/dist/index.js.map +1 -1
- package/dist/{StyleRegistryContext-CAD45r4n.js → registry-Aa_Od5m0.js} +31 -9
- package/dist/registry-Aa_Od5m0.js.map +1 -0
- package/dist/server/index.d.ts +4 -0
- package/dist/server/index.js +8 -4
- package/dist/server/index.js.map +1 -1
- package/dist/style/index.d.ts +25 -0
- package/dist/style/index.js +35 -0
- package/dist/style/index.js.map +1 -0
- package/dist/vite/index.d.ts +9 -1
- package/dist/vite/index.js +136 -41
- package/dist/vite/index.js.map +1 -1
- package/llms.txt +183 -22
- package/package.json +13 -1
- package/dist/StyleRegistryContext-CAD45r4n.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { BaseSyntheticEvent, ComponentType, Context, DOMAttributes, FocusEvent as FocusEvent$1, HTMLAttributeReferrerPolicy, KeyboardEvent, MouseEvent as MouseEvent$1, NamedExoticComponent, PointerEvent, ReactElement, ReactNode, Ref } from "react";
|
|
1
|
+
import { r as StyleProp } from "./types-BxTWbdj9.js";
|
|
2
|
+
import { BaseSyntheticEvent, CSSProperties, ComponentType, Context, DOMAttributes, ElementType, FocusEvent as FocusEvent$1, HTMLAttributeReferrerPolicy, KeyboardEvent as KeyboardEvent$1, MouseEvent as MouseEvent$1, NamedExoticComponent, PointerEvent as PointerEvent$1, ReactElement, ReactNode, Ref } from "react";
|
|
3
3
|
type AccessibilityChangeEventName = "change" | "boldTextChanged" | "grayscaleChanged" | "invertColorsChanged" | "reduceMotionChanged" | "reduceTransparencyChanged" | "highTextContrastChanged" | "darkerSystemColorsChanged" | "screenReaderChanged" | "announcementFinished";
|
|
4
4
|
type AccessibilityChangeEvent = boolean;
|
|
5
5
|
type AccessibilityAnnouncementFinishedEvent = {
|
|
@@ -29,6 +29,27 @@ export declare const AccessibilityInfo: {
|
|
|
29
29
|
setAccessibilityFocus: (target: HTMLElement | number | null | undefined) => void;
|
|
30
30
|
sendAccessibilityEvent: (target: HTMLElement | number | null | undefined, eventType: string) => void;
|
|
31
31
|
};
|
|
32
|
+
type AlertType = "default" | "plain-text" | "secure-text" | "login-password";
|
|
33
|
+
type AlertButtonStyle = "default" | "cancel" | "destructive";
|
|
34
|
+
type AlertButton = {
|
|
35
|
+
text?: string | undefined;
|
|
36
|
+
onPress?: ((value?: string) => unknown) | undefined;
|
|
37
|
+
isPreferred?: boolean | undefined;
|
|
38
|
+
style?: AlertButtonStyle | undefined;
|
|
39
|
+
};
|
|
40
|
+
type AlertOptions = {
|
|
41
|
+
cancelable?: boolean | undefined;
|
|
42
|
+
userInterfaceStyle?: "unspecified" | "light" | "dark" | undefined;
|
|
43
|
+
onDismiss?: (() => void) | undefined;
|
|
44
|
+
};
|
|
45
|
+
/**
|
|
46
|
+
* React Native's `Alert` on a `<dialog role="alertdialog">` with the look of Android's
|
|
47
|
+
* AlertDialog. It isn't part of the React tree, so it works from any handler.
|
|
48
|
+
*/
|
|
49
|
+
export declare const Alert: {
|
|
50
|
+
alert: (title: string | null | undefined, message?: string | null | undefined, buttons?: ReadonlyArray<AlertButton>, options?: AlertOptions) => void;
|
|
51
|
+
prompt: (title: string | null | undefined, message?: string | null | undefined, callbackOrButtons?: ((text: string) => void) | ReadonlyArray<AlertButton> | null | undefined, type?: AlertType | null | undefined, defaultValue?: string, keyboardType?: string, options?: AlertOptions) => void;
|
|
52
|
+
};
|
|
32
53
|
type ColorSchemeName = "light" | "dark" | null | undefined;
|
|
33
54
|
type AppearancePreferences = {
|
|
34
55
|
colorScheme: ColorSchemeName;
|
|
@@ -42,6 +63,54 @@ export declare const Appearance: {
|
|
|
42
63
|
setColorScheme: (scheme: ColorSchemeName | "unspecified") => void;
|
|
43
64
|
addChangeListener: (listener: AppearanceListener) => NativeEventSubscription;
|
|
44
65
|
};
|
|
66
|
+
type NativeSyntheticEvent<T> = BaseSyntheticEvent<T, HTMLElement, EventTarget>;
|
|
67
|
+
type NativeTouchEvent = Readonly<{
|
|
68
|
+
changedTouches: ReadonlyArray<NativeTouchEvent>;
|
|
69
|
+
force?: number | undefined;
|
|
70
|
+
identifier: number;
|
|
71
|
+
locationX: number;
|
|
72
|
+
locationY: number;
|
|
73
|
+
pageX: number;
|
|
74
|
+
pageY: number;
|
|
75
|
+
target: EventTarget | null;
|
|
76
|
+
timestamp: number;
|
|
77
|
+
touches: ReadonlyArray<NativeTouchEvent>;
|
|
78
|
+
}>;
|
|
79
|
+
type GestureResponderEvent = NativeSyntheticEvent<NativeTouchEvent>;
|
|
80
|
+
type MouseEvent = NativeSyntheticEvent<Readonly<{
|
|
81
|
+
clientX: number;
|
|
82
|
+
clientY: number;
|
|
83
|
+
pageX: number;
|
|
84
|
+
pageY: number;
|
|
85
|
+
timestamp: number;
|
|
86
|
+
}>>;
|
|
87
|
+
type FocusEvent = FocusEvent$1<HTMLElement>;
|
|
88
|
+
type BlurEvent = FocusEvent$1<HTMLElement>;
|
|
89
|
+
type TargetedEvent = Readonly<{
|
|
90
|
+
target: EventTarget | null;
|
|
91
|
+
}>;
|
|
92
|
+
type PointerEvent = PointerEvent$1<HTMLElement>;
|
|
93
|
+
type EventSubscription = {
|
|
94
|
+
remove: () => void;
|
|
95
|
+
};
|
|
96
|
+
type AppStateStatus = "inactive" | "background" | "active" | "extension" | "unknown";
|
|
97
|
+
type AppStateEventDefinitions = {
|
|
98
|
+
change: [AppStateStatus];
|
|
99
|
+
memoryWarning: [];
|
|
100
|
+
blur: [];
|
|
101
|
+
focus: [];
|
|
102
|
+
};
|
|
103
|
+
type AppStateEvent = keyof AppStateEventDefinitions;
|
|
104
|
+
/**
|
|
105
|
+
* The app is `active` while its page is visible, and in the `background` while the page is
|
|
106
|
+
* hidden or unloads. A focus change of the window fires `blur` and `focus`, as on Android, and
|
|
107
|
+
* the state stays `active`.
|
|
108
|
+
*/
|
|
109
|
+
export declare const AppState: {
|
|
110
|
+
readonly currentState: AppStateStatus;
|
|
111
|
+
readonly isAvailable: boolean;
|
|
112
|
+
addEventListener: <K extends AppStateEvent>(type: K, handler: (...args: AppStateEventDefinitions[K]) => void) => EventSubscription;
|
|
113
|
+
};
|
|
45
114
|
type BackPressHandler = () => boolean | null | undefined;
|
|
46
115
|
type BackHandlerSubscription = {
|
|
47
116
|
remove: () => void;
|
|
@@ -51,6 +120,14 @@ export declare const BackHandler: {
|
|
|
51
120
|
removeEventListener: (eventName: "hardwareBackPress", handler: BackPressHandler) => void;
|
|
52
121
|
exitApp: () => void;
|
|
53
122
|
};
|
|
123
|
+
/**
|
|
124
|
+
* Reads and writes text on the clipboard with the async Clipboard API. Deprecated in React
|
|
125
|
+
* Native, so the first call logs a warning.
|
|
126
|
+
*/
|
|
127
|
+
export declare const Clipboard: {
|
|
128
|
+
getString: () => Promise<string>;
|
|
129
|
+
setString: (content: string) => void;
|
|
130
|
+
};
|
|
54
131
|
type ScaledSize = {
|
|
55
132
|
width: number;
|
|
56
133
|
height: number;
|
|
@@ -82,29 +159,66 @@ export declare const I18nManager: {
|
|
|
82
159
|
forceRTL: (force: boolean) => void;
|
|
83
160
|
swapLeftAndRightInRTL: (swap: boolean) => void;
|
|
84
161
|
};
|
|
85
|
-
type
|
|
86
|
-
type
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
pageX: number;
|
|
93
|
-
pageY: number;
|
|
94
|
-
target: EventTarget | null;
|
|
95
|
-
timestamp: number;
|
|
96
|
-
touches: ReadonlyArray<NativeTouchEvent>;
|
|
162
|
+
type KeyboardEventName = "keyboardWillShow" | "keyboardDidShow" | "keyboardWillHide" | "keyboardDidHide" | "keyboardWillChangeFrame" | "keyboardDidChangeFrame";
|
|
163
|
+
type KeyboardEventEasing = "easeIn" | "easeInEaseOut" | "easeOut" | "linear" | "keyboard";
|
|
164
|
+
type KeyboardMetrics = Readonly<{
|
|
165
|
+
screenX: number;
|
|
166
|
+
screenY: number;
|
|
167
|
+
width: number;
|
|
168
|
+
height: number;
|
|
97
169
|
}>;
|
|
98
|
-
type
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
170
|
+
type AndroidKeyboardEvent = Readonly<{
|
|
171
|
+
duration: 0;
|
|
172
|
+
easing: "keyboard";
|
|
173
|
+
endCoordinates: KeyboardMetrics;
|
|
174
|
+
}>;
|
|
175
|
+
type IOSKeyboardEvent = Readonly<{
|
|
176
|
+
duration: number;
|
|
177
|
+
easing: KeyboardEventEasing;
|
|
178
|
+
endCoordinates: KeyboardMetrics;
|
|
179
|
+
startCoordinates: KeyboardMetrics;
|
|
180
|
+
isEventFromThisApp: boolean;
|
|
181
|
+
}>;
|
|
182
|
+
type KeyboardEvent = AndroidKeyboardEvent | IOSKeyboardEvent;
|
|
183
|
+
/**
|
|
184
|
+
* The keyboard of a phone or a tablet, as on Android: `keyboardDidShow` fires when the keyboard
|
|
185
|
+
* shows and when its height changes, and `keyboardDidHide` fires when it hides. The `Will` and
|
|
186
|
+
* `ChangeFrame` events never fire.
|
|
187
|
+
*/
|
|
188
|
+
export declare const Keyboard: {
|
|
189
|
+
addListener: <K extends KeyboardEventName>(eventType: K, listener: (event: KeyboardEvent) => unknown, context?: unknown) => EventSubscription;
|
|
190
|
+
removeAllListeners: (eventType?: KeyboardEventName | null) => void;
|
|
191
|
+
dismiss: () => void;
|
|
192
|
+
isVisible: () => boolean;
|
|
193
|
+
metrics: () => KeyboardMetrics | null | undefined;
|
|
194
|
+
scheduleLayoutAnimation: (event: KeyboardEvent) => void;
|
|
195
|
+
};
|
|
196
|
+
type LinkingEventDefinitions = {
|
|
197
|
+
url: [{
|
|
198
|
+
url: string;
|
|
199
|
+
}];
|
|
200
|
+
};
|
|
201
|
+
type LinkingEvent = keyof LinkingEventDefinitions;
|
|
202
|
+
/**
|
|
203
|
+
* Opens URLs and reports the URL that the page loaded with. A URL of this site opens in this tab,
|
|
204
|
+
* a URL of another site in a new tab, and `mailto:`, `tel:`, and other schemes go to the system.
|
|
205
|
+
* The browser never fires `url`: back, forward, and links belong to the router.
|
|
206
|
+
*/
|
|
207
|
+
export declare const Linking: {
|
|
208
|
+
addEventListener: <K extends LinkingEvent>(eventType: K, listener: (...args: LinkingEventDefinitions[K]) => unknown) => EventSubscription;
|
|
209
|
+
addListener: <K extends LinkingEvent>(eventType: K, listener: (...args: LinkingEventDefinitions[K]) => unknown, context?: unknown) => EventSubscription;
|
|
210
|
+
emit: <K extends LinkingEvent>(eventType: K, ...args: LinkingEventDefinitions[K]) => void;
|
|
211
|
+
removeAllListeners: <K extends LinkingEvent>(eventType?: K | null) => void;
|
|
212
|
+
listenerCount: <K extends LinkingEvent>(eventType: K) => number;
|
|
213
|
+
openURL: (url: string) => Promise<void>;
|
|
214
|
+
canOpenURL: (url: string) => Promise<boolean>;
|
|
215
|
+
openSettings: () => Promise<void>;
|
|
216
|
+
getInitialURL: () => Promise<string | null>;
|
|
217
|
+
sendIntent: (action: string, extras?: Array<{
|
|
218
|
+
key: string;
|
|
219
|
+
value: string | number | boolean;
|
|
220
|
+
}>) => Promise<void>;
|
|
221
|
+
};
|
|
108
222
|
type PanResponderGestureState = {
|
|
109
223
|
stateID: number;
|
|
110
224
|
moveX: number;
|
|
@@ -135,7 +249,7 @@ type PanResponderCallbacks = {
|
|
|
135
249
|
onPanResponderTerminationRequest?: Predicate | undefined;
|
|
136
250
|
onShouldBlockNativeResponder?: Predicate | undefined;
|
|
137
251
|
};
|
|
138
|
-
type Handler = (event: PointerEvent<HTMLElement>) => void;
|
|
252
|
+
type Handler = (event: PointerEvent$1<HTMLElement>) => void;
|
|
139
253
|
type GestureResponderHandlers = {
|
|
140
254
|
onPointerDownCapture: Handler;
|
|
141
255
|
onPointerDown: Handler;
|
|
@@ -183,7 +297,360 @@ type PlatformType = {
|
|
|
183
297
|
export declare const Platform: PlatformType;
|
|
184
298
|
type ProcessedColorValue = number;
|
|
185
299
|
export declare const processColor: (color: unknown) => ProcessedColorValue | null | undefined;
|
|
186
|
-
type
|
|
300
|
+
type ShareContent = {
|
|
301
|
+
title?: string | undefined;
|
|
302
|
+
url: string;
|
|
303
|
+
message?: string | undefined;
|
|
304
|
+
} | {
|
|
305
|
+
title?: string | undefined;
|
|
306
|
+
url?: string | undefined;
|
|
307
|
+
message: string;
|
|
308
|
+
};
|
|
309
|
+
type ShareOptions = {
|
|
310
|
+
dialogTitle?: string | undefined;
|
|
311
|
+
excludedActivityTypes?: Array<string> | undefined;
|
|
312
|
+
tintColor?: string | undefined;
|
|
313
|
+
subject?: string | undefined;
|
|
314
|
+
anchor?: number | undefined;
|
|
315
|
+
};
|
|
316
|
+
type ShareAction = {
|
|
317
|
+
action: "sharedAction" | "dismissedAction";
|
|
318
|
+
activityType?: string | null | undefined;
|
|
319
|
+
};
|
|
320
|
+
/**
|
|
321
|
+
* Opens the browser's share sheet with `navigator.share`. It shares the title, the message,
|
|
322
|
+
* and the URL. A closed sheet resolves `dismissedAction`, as on iOS.
|
|
323
|
+
*/
|
|
324
|
+
export declare const Share: {
|
|
325
|
+
share: (content: ShareContent, options?: ShareOptions) => Promise<ShareAction>;
|
|
326
|
+
readonly sharedAction: "sharedAction";
|
|
327
|
+
readonly dismissedAction: "dismissedAction";
|
|
328
|
+
};
|
|
329
|
+
type ImageResizeMode = "cover" | "contain" | "stretch" | "repeat" | "center";
|
|
330
|
+
/** A color from `PlatformColor` or `DynamicColorIOS` on native. The web has neither. */
|
|
331
|
+
type NativeColorValue = symbol & {
|
|
332
|
+
__NativeColorValue__: string;
|
|
333
|
+
};
|
|
334
|
+
/** @deprecated Use `NativeColorValue`. */
|
|
335
|
+
type OpaqueColorValue = NativeColorValue;
|
|
336
|
+
type ColorValue = null | string | number | NativeColorValue;
|
|
337
|
+
type DimensionValue = number | string | "auto" | null;
|
|
338
|
+
type CursorValue = "auto" | "pointer";
|
|
339
|
+
type PointValue = {
|
|
340
|
+
x: number;
|
|
341
|
+
y: number;
|
|
342
|
+
};
|
|
343
|
+
type EdgeInsetsValue = {
|
|
344
|
+
top: number;
|
|
345
|
+
left: number;
|
|
346
|
+
right: number;
|
|
347
|
+
bottom: number;
|
|
348
|
+
};
|
|
349
|
+
type LayoutStyle = Readonly<{
|
|
350
|
+
display?: "none" | "flex" | "contents" | undefined;
|
|
351
|
+
width?: DimensionValue | undefined;
|
|
352
|
+
height?: DimensionValue | undefined;
|
|
353
|
+
bottom?: DimensionValue | undefined;
|
|
354
|
+
end?: DimensionValue | undefined;
|
|
355
|
+
left?: DimensionValue | undefined;
|
|
356
|
+
right?: DimensionValue | undefined;
|
|
357
|
+
start?: DimensionValue | undefined;
|
|
358
|
+
top?: DimensionValue | undefined;
|
|
359
|
+
inset?: DimensionValue | undefined;
|
|
360
|
+
insetBlock?: DimensionValue | undefined;
|
|
361
|
+
insetBlockEnd?: DimensionValue | undefined;
|
|
362
|
+
insetBlockStart?: DimensionValue | undefined;
|
|
363
|
+
insetInline?: DimensionValue | undefined;
|
|
364
|
+
insetInlineEnd?: DimensionValue | undefined;
|
|
365
|
+
insetInlineStart?: DimensionValue | undefined;
|
|
366
|
+
minWidth?: DimensionValue | undefined;
|
|
367
|
+
maxWidth?: DimensionValue | undefined;
|
|
368
|
+
minHeight?: DimensionValue | undefined;
|
|
369
|
+
maxHeight?: DimensionValue | undefined;
|
|
370
|
+
margin?: DimensionValue | undefined;
|
|
371
|
+
marginBlock?: DimensionValue | undefined;
|
|
372
|
+
marginBlockEnd?: DimensionValue | undefined;
|
|
373
|
+
marginBlockStart?: DimensionValue | undefined;
|
|
374
|
+
marginBottom?: DimensionValue | undefined;
|
|
375
|
+
marginEnd?: DimensionValue | undefined;
|
|
376
|
+
marginHorizontal?: DimensionValue | undefined;
|
|
377
|
+
marginInline?: DimensionValue | undefined;
|
|
378
|
+
marginInlineEnd?: DimensionValue | undefined;
|
|
379
|
+
marginInlineStart?: DimensionValue | undefined;
|
|
380
|
+
marginLeft?: DimensionValue | undefined;
|
|
381
|
+
marginRight?: DimensionValue | undefined;
|
|
382
|
+
marginStart?: DimensionValue | undefined;
|
|
383
|
+
marginTop?: DimensionValue | undefined;
|
|
384
|
+
marginVertical?: DimensionValue | undefined;
|
|
385
|
+
padding?: DimensionValue | undefined;
|
|
386
|
+
paddingBlock?: DimensionValue | undefined;
|
|
387
|
+
paddingBlockEnd?: DimensionValue | undefined;
|
|
388
|
+
paddingBlockStart?: DimensionValue | undefined;
|
|
389
|
+
paddingBottom?: DimensionValue | undefined;
|
|
390
|
+
paddingEnd?: DimensionValue | undefined;
|
|
391
|
+
paddingHorizontal?: DimensionValue | undefined;
|
|
392
|
+
paddingInline?: DimensionValue | undefined;
|
|
393
|
+
paddingInlineEnd?: DimensionValue | undefined;
|
|
394
|
+
paddingInlineStart?: DimensionValue | undefined;
|
|
395
|
+
paddingLeft?: DimensionValue | undefined;
|
|
396
|
+
paddingRight?: DimensionValue | undefined;
|
|
397
|
+
paddingStart?: DimensionValue | undefined;
|
|
398
|
+
paddingTop?: DimensionValue | undefined;
|
|
399
|
+
paddingVertical?: DimensionValue | undefined;
|
|
400
|
+
borderWidth?: number | undefined;
|
|
401
|
+
borderBottomWidth?: number | undefined;
|
|
402
|
+
borderEndWidth?: number | undefined;
|
|
403
|
+
borderLeftWidth?: number | undefined;
|
|
404
|
+
borderRightWidth?: number | undefined;
|
|
405
|
+
borderStartWidth?: number | undefined;
|
|
406
|
+
borderTopWidth?: number | undefined;
|
|
407
|
+
position?: "absolute" | "relative" | "static" | undefined;
|
|
408
|
+
flexDirection?: "row" | "row-reverse" | "column" | "column-reverse" | undefined;
|
|
409
|
+
flexWrap?: "wrap" | "nowrap" | "wrap-reverse" | undefined;
|
|
410
|
+
justifyContent?: "flex-start" | "flex-end" | "center" | "space-between" | "space-around" | "space-evenly" | undefined;
|
|
411
|
+
alignItems?: "flex-start" | "flex-end" | "center" | "stretch" | "baseline" | undefined;
|
|
412
|
+
alignSelf?: "auto" | "flex-start" | "flex-end" | "center" | "stretch" | "baseline" | undefined;
|
|
413
|
+
alignContent?: "flex-start" | "flex-end" | "center" | "stretch" | "space-between" | "space-around" | "space-evenly" | undefined;
|
|
414
|
+
overflow?: "visible" | "hidden" | "scroll" | undefined;
|
|
415
|
+
flex?: number | undefined;
|
|
416
|
+
flexGrow?: number | undefined;
|
|
417
|
+
flexShrink?: number | undefined;
|
|
418
|
+
flexBasis?: number | string | undefined;
|
|
419
|
+
aspectRatio?: number | string | undefined;
|
|
420
|
+
boxSizing?: "border-box" | "content-box" | undefined;
|
|
421
|
+
zIndex?: number | undefined;
|
|
422
|
+
direction?: "inherit" | "ltr" | "rtl" | undefined;
|
|
423
|
+
rowGap?: number | string | undefined;
|
|
424
|
+
columnGap?: number | string | undefined;
|
|
425
|
+
gap?: number | string | undefined;
|
|
426
|
+
}>;
|
|
427
|
+
type ShadowStyle = Readonly<{
|
|
428
|
+
shadowColor?: ColorValue | undefined;
|
|
429
|
+
shadowOffset?: Readonly<{
|
|
430
|
+
width?: number | undefined;
|
|
431
|
+
height?: number | undefined;
|
|
432
|
+
}> | undefined;
|
|
433
|
+
shadowOpacity?: number | undefined;
|
|
434
|
+
shadowRadius?: number | undefined;
|
|
435
|
+
}>;
|
|
436
|
+
type KeysOfUnion<T> = T extends unknown ? keyof T : never;
|
|
437
|
+
type ValueOfUnion<T, K> = T extends unknown ? (K extends keyof T ? T[K] : never) : never;
|
|
438
|
+
type MergeUnion<T> = { [K in KeysOfUnion<T>]?: ValueOfUnion<T, K>; };
|
|
439
|
+
type MaximumOneOf<T> = { [K in keyof T]: { [P in keyof T]?: P extends K ? T[P] : never; }; }[keyof T];
|
|
440
|
+
type TransformOperation = Readonly<MaximumOneOf<MergeUnion<{
|
|
441
|
+
readonly perspective: number;
|
|
442
|
+
} | {
|
|
443
|
+
readonly rotate: string;
|
|
444
|
+
} | {
|
|
445
|
+
readonly rotateX: string;
|
|
446
|
+
} | {
|
|
447
|
+
readonly rotateY: string;
|
|
448
|
+
} | {
|
|
449
|
+
readonly rotateZ: string;
|
|
450
|
+
} | {
|
|
451
|
+
readonly scale: number;
|
|
452
|
+
} | {
|
|
453
|
+
readonly scaleX: number;
|
|
454
|
+
} | {
|
|
455
|
+
readonly scaleY: number;
|
|
456
|
+
} | {
|
|
457
|
+
readonly translateX: number | string;
|
|
458
|
+
} | {
|
|
459
|
+
readonly translateY: number | string;
|
|
460
|
+
} | {
|
|
461
|
+
readonly translate: [number | string, number | string];
|
|
462
|
+
} | {
|
|
463
|
+
readonly skewX: string;
|
|
464
|
+
} | {
|
|
465
|
+
readonly skewY: string;
|
|
466
|
+
} | {
|
|
467
|
+
readonly matrix: ReadonlyArray<number>;
|
|
468
|
+
}>>>;
|
|
469
|
+
type TransformsStyle = Readonly<{
|
|
470
|
+
transform?: ReadonlyArray<TransformOperation> | string | undefined;
|
|
471
|
+
transformOrigin?: [string | number, string | number, string | number] | string | undefined;
|
|
472
|
+
}>;
|
|
473
|
+
type FilterFunction = {
|
|
474
|
+
brightness: number | string;
|
|
475
|
+
} | {
|
|
476
|
+
blur: number | string;
|
|
477
|
+
} | {
|
|
478
|
+
contrast: number | string;
|
|
479
|
+
} | {
|
|
480
|
+
grayscale: number | string;
|
|
481
|
+
} | {
|
|
482
|
+
hueRotate: number | string;
|
|
483
|
+
} | {
|
|
484
|
+
invert: number | string;
|
|
485
|
+
} | {
|
|
486
|
+
opacity: number | string;
|
|
487
|
+
} | {
|
|
488
|
+
saturate: number | string;
|
|
489
|
+
} | {
|
|
490
|
+
sepia: number | string;
|
|
491
|
+
} | {
|
|
492
|
+
dropShadow: DropShadowValue | string;
|
|
493
|
+
};
|
|
494
|
+
type DropShadowValue = {
|
|
495
|
+
offsetX: number | string;
|
|
496
|
+
offsetY: number | string;
|
|
497
|
+
standardDeviation?: number | string | undefined;
|
|
498
|
+
color?: ColorValue | undefined;
|
|
499
|
+
};
|
|
500
|
+
type ColorStops = ReadonlyArray<{
|
|
501
|
+
color: ColorValue;
|
|
502
|
+
positions?: ReadonlyArray<string> | undefined;
|
|
503
|
+
}>;
|
|
504
|
+
type LinearGradientValue = {
|
|
505
|
+
type: "linear-gradient";
|
|
506
|
+
direction?: string | undefined;
|
|
507
|
+
colorStops: ColorStops;
|
|
508
|
+
};
|
|
509
|
+
type EdgePosition = {
|
|
510
|
+
top: number | string;
|
|
511
|
+
left: number | string;
|
|
512
|
+
} | {
|
|
513
|
+
top: number | string;
|
|
514
|
+
right: number | string;
|
|
515
|
+
} | {
|
|
516
|
+
bottom: number | string;
|
|
517
|
+
left: number | string;
|
|
518
|
+
} | {
|
|
519
|
+
bottom: number | string;
|
|
520
|
+
right: number | string;
|
|
521
|
+
};
|
|
522
|
+
type RadialGradientPosition = EdgePosition;
|
|
523
|
+
type RadialGradientShape = "circle" | "ellipse";
|
|
524
|
+
type RadialGradientSize = "closest-corner" | "closest-side" | "farthest-corner" | "farthest-side" | {
|
|
525
|
+
x: string | number;
|
|
526
|
+
y: string | number;
|
|
527
|
+
};
|
|
528
|
+
type RadialGradientValue = {
|
|
529
|
+
type: "radial-gradient";
|
|
530
|
+
shape: RadialGradientShape;
|
|
531
|
+
size: RadialGradientSize;
|
|
532
|
+
position: RadialGradientPosition;
|
|
533
|
+
colorStops: ColorStops;
|
|
534
|
+
};
|
|
535
|
+
type BackgroundImageValue = LinearGradientValue | RadialGradientValue;
|
|
536
|
+
type BackgroundSizeValue = {
|
|
537
|
+
x: string | number;
|
|
538
|
+
y: string | number;
|
|
539
|
+
};
|
|
540
|
+
type BackgroundRepeatKeyword = "repeat" | "space" | "round" | "no-repeat";
|
|
541
|
+
type BackgroundPositionValue = EdgePosition;
|
|
542
|
+
type BackgroundRepeatValue = {
|
|
543
|
+
x: BackgroundRepeatKeyword;
|
|
544
|
+
y: BackgroundRepeatKeyword;
|
|
545
|
+
};
|
|
546
|
+
type BoxShadowValue = {
|
|
547
|
+
offsetX: number | string;
|
|
548
|
+
offsetY: number | string;
|
|
549
|
+
color?: ColorValue | undefined;
|
|
550
|
+
blurRadius?: number | string | undefined;
|
|
551
|
+
spreadDistance?: number | string | undefined;
|
|
552
|
+
inset?: boolean | undefined;
|
|
553
|
+
};
|
|
554
|
+
type BlendMode = "normal" | "multiply" | "screen" | "overlay" | "darken" | "lighten" | "color-dodge" | "color-burn" | "hard-light" | "soft-light" | "difference" | "exclusion" | "hue" | "saturation" | "color" | "luminosity" | "plus-lighter";
|
|
555
|
+
type ViewStyleBase = Readonly<{
|
|
556
|
+
backfaceVisibility?: "visible" | "hidden" | undefined;
|
|
557
|
+
backgroundColor?: ColorValue | undefined;
|
|
558
|
+
borderColor?: ColorValue | undefined;
|
|
559
|
+
borderCurve?: "circular" | "continuous" | undefined;
|
|
560
|
+
borderBottomColor?: ColorValue | undefined;
|
|
561
|
+
borderEndColor?: ColorValue | undefined;
|
|
562
|
+
borderLeftColor?: ColorValue | undefined;
|
|
563
|
+
borderRightColor?: ColorValue | undefined;
|
|
564
|
+
borderStartColor?: ColorValue | undefined;
|
|
565
|
+
borderTopColor?: ColorValue | undefined;
|
|
566
|
+
borderBlockColor?: ColorValue | undefined;
|
|
567
|
+
borderBlockEndColor?: ColorValue | undefined;
|
|
568
|
+
borderBlockStartColor?: ColorValue | undefined;
|
|
569
|
+
borderRadius?: number | string | undefined;
|
|
570
|
+
borderBottomEndRadius?: number | string | undefined;
|
|
571
|
+
borderBottomLeftRadius?: number | string | undefined;
|
|
572
|
+
borderBottomRightRadius?: number | string | undefined;
|
|
573
|
+
borderBottomStartRadius?: number | string | undefined;
|
|
574
|
+
borderEndEndRadius?: number | string | undefined;
|
|
575
|
+
borderEndStartRadius?: number | string | undefined;
|
|
576
|
+
borderStartEndRadius?: number | string | undefined;
|
|
577
|
+
borderStartStartRadius?: number | string | undefined;
|
|
578
|
+
borderTopEndRadius?: number | string | undefined;
|
|
579
|
+
borderTopLeftRadius?: number | string | undefined;
|
|
580
|
+
borderTopRightRadius?: number | string | undefined;
|
|
581
|
+
borderTopStartRadius?: number | string | undefined;
|
|
582
|
+
borderStyle?: "solid" | "dotted" | "dashed" | undefined;
|
|
583
|
+
opacity?: number | undefined;
|
|
584
|
+
outlineColor?: ColorValue | undefined;
|
|
585
|
+
outlineOffset?: number | undefined;
|
|
586
|
+
outlineStyle?: "solid" | "dotted" | "dashed" | undefined;
|
|
587
|
+
outlineWidth?: number | undefined;
|
|
588
|
+
elevation?: number | undefined;
|
|
589
|
+
pointerEvents?: "auto" | "none" | "box-none" | "box-only" | undefined;
|
|
590
|
+
cursor?: CursorValue | undefined;
|
|
591
|
+
boxShadow?: ReadonlyArray<BoxShadowValue> | string | undefined;
|
|
592
|
+
filter?: ReadonlyArray<FilterFunction> | string | undefined;
|
|
593
|
+
mixBlendMode?: BlendMode | undefined;
|
|
594
|
+
backgroundImage?: ReadonlyArray<BackgroundImageValue> | string | undefined;
|
|
595
|
+
experimental_backgroundImage?: ReadonlyArray<BackgroundImageValue> | string | undefined;
|
|
596
|
+
backgroundSize?: ReadonlyArray<BackgroundSizeValue> | string | undefined;
|
|
597
|
+
experimental_backgroundSize?: ReadonlyArray<BackgroundSizeValue> | string | undefined;
|
|
598
|
+
backgroundPosition?: ReadonlyArray<BackgroundPositionValue> | string | undefined;
|
|
599
|
+
experimental_backgroundPosition?: ReadonlyArray<BackgroundPositionValue> | string | undefined;
|
|
600
|
+
backgroundRepeat?: ReadonlyArray<BackgroundRepeatValue> | string | undefined;
|
|
601
|
+
experimental_backgroundRepeat?: ReadonlyArray<BackgroundRepeatValue> | string | undefined;
|
|
602
|
+
isolation?: "auto" | "isolate" | undefined;
|
|
603
|
+
}>;
|
|
604
|
+
type WebOnlyViewStyle = Readonly<{
|
|
605
|
+
touchAction?: CSSProperties["touchAction"] | undefined;
|
|
606
|
+
}>;
|
|
607
|
+
interface ViewStyle extends LayoutStyle, ShadowStyle, TransformsStyle, ViewStyleBase, WebOnlyViewStyle {}
|
|
608
|
+
type FontWeight = "normal" | "bold" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | "ultralight" | "thin" | "light" | "medium" | "regular" | "semibold" | "condensedBold" | "condensed" | "heavy" | "black";
|
|
609
|
+
type FontVariant = "small-caps" | "oldstyle-nums" | "lining-nums" | "tabular-nums" | "common-ligatures" | "no-common-ligatures" | "discretionary-ligatures" | "no-discretionary-ligatures" | "historical-ligatures" | "no-historical-ligatures" | "contextual" | "no-contextual" | "proportional-nums" | "stylistic-one" | "stylistic-two" | "stylistic-three" | "stylistic-four" | "stylistic-five" | "stylistic-six" | "stylistic-seven" | "stylistic-eight" | "stylistic-nine" | "stylistic-ten" | "stylistic-eleven" | "stylistic-twelve" | "stylistic-thirteen" | "stylistic-fourteen" | "stylistic-fifteen" | "stylistic-sixteen" | "stylistic-seventeen" | "stylistic-eighteen" | "stylistic-nineteen" | "stylistic-twenty";
|
|
610
|
+
type TextStyleBase = Readonly<{
|
|
611
|
+
color?: ColorValue | undefined;
|
|
612
|
+
fontFamily?: string | undefined;
|
|
613
|
+
fontSize?: number | undefined;
|
|
614
|
+
fontStyle?: "normal" | "italic" | undefined;
|
|
615
|
+
fontWeight?: FontWeight | undefined;
|
|
616
|
+
fontVariant?: ReadonlyArray<FontVariant> | string | undefined;
|
|
617
|
+
fontVariationSettings?: string | Readonly<{
|
|
618
|
+
[axis: string]: number;
|
|
619
|
+
}> | undefined;
|
|
620
|
+
textShadowOffset?: Readonly<{
|
|
621
|
+
width: number;
|
|
622
|
+
height: number;
|
|
623
|
+
}> | undefined;
|
|
624
|
+
textShadowRadius?: number | undefined;
|
|
625
|
+
textShadowColor?: ColorValue | undefined;
|
|
626
|
+
letterSpacing?: number | undefined;
|
|
627
|
+
lineHeight?: number | undefined;
|
|
628
|
+
textAlign?: "auto" | "left" | "right" | "center" | "justify" | "start" | "end" | undefined;
|
|
629
|
+
textAlignVertical?: "auto" | "top" | "bottom" | "center" | undefined;
|
|
630
|
+
includeFontPadding?: boolean | undefined;
|
|
631
|
+
textDecorationLine?: "none" | "underline" | "line-through" | "underline line-through" | undefined;
|
|
632
|
+
textDecorationStyle?: "solid" | "double" | "dotted" | "dashed" | "wavy" | undefined;
|
|
633
|
+
textDecorationColor?: ColorValue | undefined;
|
|
634
|
+
textTransform?: "none" | "capitalize" | "uppercase" | "lowercase" | undefined;
|
|
635
|
+
userSelect?: "auto" | "text" | "none" | "contain" | "all" | undefined;
|
|
636
|
+
verticalAlign?: "auto" | "top" | "bottom" | "middle" | undefined;
|
|
637
|
+
writingDirection?: "auto" | "ltr" | "rtl" | undefined;
|
|
638
|
+
}>;
|
|
639
|
+
interface TextStyle extends ViewStyle, TextStyleBase {}
|
|
640
|
+
type ImageStyleBase = Readonly<{
|
|
641
|
+
resizeMode?: ImageResizeMode | undefined;
|
|
642
|
+
objectFit?: "cover" | "contain" | "fill" | "scale-down" | "none" | undefined;
|
|
643
|
+
tintColor?: ColorValue | undefined;
|
|
644
|
+
overlayColor?: ColorValue | undefined;
|
|
645
|
+
}>;
|
|
646
|
+
interface ImageStyle extends Omit<ViewStyle, "overflow">, ImageStyleBase {
|
|
647
|
+
readonly overflow?: "visible" | "hidden" | undefined;
|
|
648
|
+
}
|
|
649
|
+
/** Every style key of every component, the type that `StyleSheet.create` checks. */
|
|
650
|
+
type AnyStyle = Omit<TextStyle, keyof ImageStyleBase> & ImageStyleBase;
|
|
651
|
+
type NamedStyles = {
|
|
652
|
+
readonly [name: string]: Partial<AnyStyle>;
|
|
653
|
+
};
|
|
187
654
|
declare const absoluteFillObject: {
|
|
188
655
|
readonly position: "absolute";
|
|
189
656
|
readonly left: 0;
|
|
@@ -192,9 +659,9 @@ declare const absoluteFillObject: {
|
|
|
192
659
|
readonly bottom: 0;
|
|
193
660
|
};
|
|
194
661
|
type AbsoluteFillStyle = typeof absoluteFillObject;
|
|
195
|
-
declare const create: <
|
|
196
|
-
declare const flatten: <T extends
|
|
197
|
-
declare const compose: <T
|
|
662
|
+
declare const create: <S extends NamedStyles>(styles: S & NamedStyles) => Readonly<S>;
|
|
663
|
+
declare const flatten: <T extends object>(style: StyleProp<T>) => T | undefined;
|
|
664
|
+
declare const compose: <T>(style1: StyleProp<T>, style2: StyleProp<T>) => StyleProp<T>;
|
|
198
665
|
export declare const StyleSheet: {
|
|
199
666
|
readonly absoluteFill: AbsoluteFillStyle;
|
|
200
667
|
readonly absoluteFillObject: AbsoluteFillStyle;
|
|
@@ -205,6 +672,35 @@ export declare const StyleSheet: {
|
|
|
205
672
|
};
|
|
206
673
|
export declare const useColorScheme: () => ColorSchemeName;
|
|
207
674
|
export declare const useWindowDimensions: () => ScaledSize;
|
|
675
|
+
/**
|
|
676
|
+
* Vibrates the device with `navigator.vibrate`, with Android's rules: the durations apply, and
|
|
677
|
+
* an array starts with a wait.
|
|
678
|
+
*/
|
|
679
|
+
export declare const Vibration: {
|
|
680
|
+
vibrate: (pattern?: number | Array<number>, repeat?: boolean) => void;
|
|
681
|
+
cancel: () => void;
|
|
682
|
+
};
|
|
683
|
+
type MeasureOnSuccessCallback = (x: number, y: number, width: number, height: number, pageX: number, pageY: number) => void;
|
|
684
|
+
type MeasureInWindowOnSuccessCallback = (x: number, y: number, width: number, height: number) => void;
|
|
685
|
+
type MeasureLayoutOnSuccessCallback = (left: number, top: number, width: number, height: number) => void;
|
|
686
|
+
type HostMethods = {
|
|
687
|
+
measure: (callback: MeasureOnSuccessCallback) => void;
|
|
688
|
+
measureInWindow: (callback: MeasureInWindowOnSuccessCallback) => void;
|
|
689
|
+
measureLayout: (relativeToNativeNode: Element | number, onSuccess: MeasureLayoutOnSuccessCallback, onFail?: () => void) => void;
|
|
690
|
+
setNativeProps: (nativeProps: object) => void;
|
|
691
|
+
};
|
|
692
|
+
type HostInstance = HTMLElement & HostMethods;
|
|
693
|
+
type ViewInstance = HostInstance;
|
|
694
|
+
/**
|
|
695
|
+
* Compat type. The type of a component that a library gets from a native component spec. Its
|
|
696
|
+
* `ref` is the host instance.
|
|
697
|
+
*/
|
|
698
|
+
type HostComponent<Config extends object> = (props: Omit<Config, "ref"> & {
|
|
699
|
+
ref?: Ref<HostInstance> | undefined;
|
|
700
|
+
}) => ReactNode;
|
|
701
|
+
type AccessibilityActionEvent = NativeSyntheticEvent<Readonly<{
|
|
702
|
+
actionName: string;
|
|
703
|
+
}>>;
|
|
208
704
|
type LayoutRectangle = {
|
|
209
705
|
x: number;
|
|
210
706
|
y: number;
|
|
@@ -231,7 +727,7 @@ type AccessibilityValue = {
|
|
|
231
727
|
};
|
|
232
728
|
type Role = "alert" | "alertdialog" | "application" | "article" | "banner" | "button" | "cell" | "checkbox" | "columnheader" | "combobox" | "complementary" | "contentinfo" | "definition" | "dialog" | "directory" | "document" | "feed" | "figure" | "form" | "grid" | "group" | "heading" | "img" | "link" | "list" | "listitem" | "log" | "main" | "marquee" | "math" | "menu" | "menubar" | "menuitem" | "meter" | "navigation" | "none" | "note" | "option" | "presentation" | "progressbar" | "radio" | "radiogroup" | "region" | "row" | "rowgroup" | "rowheader" | "scrollbar" | "searchbox" | "separator" | "slider" | "spinbutton" | "status" | "summary" | "switch" | "tab" | "table" | "tablist" | "tabpanel" | "term" | "timer" | "toolbar" | "tooltip" | "tree" | "treegrid" | "treeitem";
|
|
233
729
|
type DOMEventHandlers<T> = Omit<DOMAttributes<T>, "children" | "dangerouslySetInnerHTML">;
|
|
234
|
-
|
|
730
|
+
interface AccessibilityProps {
|
|
235
731
|
[key: `aria-${string}`]: string | number | boolean | undefined;
|
|
236
732
|
[key: `data-${string}`]: string | number | boolean | undefined;
|
|
237
733
|
accessible?: boolean | undefined;
|
|
@@ -260,11 +756,11 @@ type AccessibilityProps = {
|
|
|
260
756
|
"aria-valuemin"?: number | undefined;
|
|
261
757
|
"aria-valuenow"?: number | undefined;
|
|
262
758
|
"aria-valuetext"?: string | undefined;
|
|
263
|
-
}
|
|
264
|
-
|
|
759
|
+
}
|
|
760
|
+
interface ViewProps extends AccessibilityProps, DOMEventHandlers<HTMLElement> {
|
|
265
761
|
children?: ReactNode;
|
|
266
|
-
style?: StyleProp<
|
|
267
|
-
ref?: Ref<
|
|
762
|
+
style?: StyleProp<ViewStyle> | undefined;
|
|
763
|
+
ref?: Ref<ViewInstance> | undefined;
|
|
268
764
|
id?: string | undefined;
|
|
269
765
|
nativeID?: string | undefined;
|
|
270
766
|
testID?: string | undefined;
|
|
@@ -273,15 +769,16 @@ type ViewProps = AccessibilityProps & DOMEventHandlers<HTMLElement> & {
|
|
|
273
769
|
pointerEvents?: "auto" | "none" | "box-none" | "box-only" | undefined;
|
|
274
770
|
collapsable?: boolean | undefined;
|
|
275
771
|
onLayout?: ((event: LayoutChangeEvent) => void) | undefined;
|
|
772
|
+
onKeyDown?: DOMEventHandlers<HTMLElement>["onKeyDown"];
|
|
276
773
|
"aria-level"?: number | undefined;
|
|
277
774
|
href?: string | undefined;
|
|
278
|
-
}
|
|
279
|
-
|
|
775
|
+
}
|
|
776
|
+
interface ActivityIndicatorProps extends ViewProps {
|
|
280
777
|
animating?: boolean | undefined;
|
|
281
778
|
color?: string | undefined;
|
|
282
779
|
hidesWhenStopped?: boolean | undefined;
|
|
283
780
|
size?: number | "small" | "large" | undefined;
|
|
284
|
-
}
|
|
781
|
+
}
|
|
285
782
|
export declare function ActivityIndicator(props: ActivityIndicatorProps): ReactElement;
|
|
286
783
|
type Rect = Readonly<{
|
|
287
784
|
bottom?: number | undefined;
|
|
@@ -319,14 +816,14 @@ type PressabilityEventHandlers = Readonly<{
|
|
|
319
816
|
onClick: (event: MouseEvent$1<HTMLElement>) => void;
|
|
320
817
|
onContextMenu: (event: MouseEvent$1<HTMLElement>) => void;
|
|
321
818
|
onFocus: (event: FocusEvent$1<HTMLElement>) => void;
|
|
322
|
-
onKeyDown: (event: KeyboardEvent<HTMLElement>) => void;
|
|
323
|
-
onKeyUp: (event: KeyboardEvent<HTMLElement>) => void;
|
|
324
|
-
onPointerCancel: (event: PointerEvent<HTMLElement>) => void;
|
|
325
|
-
onPointerDown: (event: PointerEvent<HTMLElement>) => void;
|
|
326
|
-
onPointerEnter: (event: PointerEvent<HTMLElement>) => void;
|
|
327
|
-
onPointerLeave: (event: PointerEvent<HTMLElement>) => void;
|
|
328
|
-
onPointerMove: (event: PointerEvent<HTMLElement>) => void;
|
|
329
|
-
onPointerUp: (event: PointerEvent<HTMLElement>) => void;
|
|
819
|
+
onKeyDown: (event: KeyboardEvent$1<HTMLElement>) => void;
|
|
820
|
+
onKeyUp: (event: KeyboardEvent$1<HTMLElement>) => void;
|
|
821
|
+
onPointerCancel: (event: PointerEvent$1<HTMLElement>) => void;
|
|
822
|
+
onPointerDown: (event: PointerEvent$1<HTMLElement>) => void;
|
|
823
|
+
onPointerEnter: (event: PointerEvent$1<HTMLElement>) => void;
|
|
824
|
+
onPointerLeave: (event: PointerEvent$1<HTMLElement>) => void;
|
|
825
|
+
onPointerMove: (event: PointerEvent$1<HTMLElement>) => void;
|
|
826
|
+
onPointerUp: (event: PointerEvent$1<HTMLElement>) => void;
|
|
330
827
|
}>;
|
|
331
828
|
type TouchablePressProps = {
|
|
332
829
|
delayLongPress?: number | undefined;
|
|
@@ -352,22 +849,22 @@ type TouchableTVProps = {
|
|
|
352
849
|
nextFocusRight?: number | undefined;
|
|
353
850
|
nextFocusUp?: number | undefined;
|
|
354
851
|
};
|
|
355
|
-
|
|
852
|
+
interface TouchableWithoutFeedbackProps extends AccessibilityProps, TouchablePressProps {
|
|
356
853
|
children?: ReactNode | undefined;
|
|
357
854
|
focusable?: boolean | undefined;
|
|
358
855
|
id?: string | undefined;
|
|
359
856
|
nativeID?: string | undefined;
|
|
360
857
|
testID?: string | undefined;
|
|
361
858
|
onLayout?: ((event: LayoutChangeEvent) => unknown) | undefined;
|
|
362
|
-
style?: StyleProp<
|
|
363
|
-
}
|
|
364
|
-
|
|
859
|
+
style?: StyleProp<ViewStyle> | undefined;
|
|
860
|
+
}
|
|
861
|
+
interface ButtonProps extends TouchableTVProps {
|
|
365
862
|
title: string;
|
|
366
863
|
onPress?: ((event: GestureResponderEvent) => unknown) | undefined;
|
|
367
864
|
color?: string | undefined;
|
|
368
865
|
disabled?: boolean | undefined;
|
|
369
866
|
testID?: string | undefined;
|
|
370
|
-
ref?: Ref<
|
|
867
|
+
ref?: Ref<HostInstance> | undefined;
|
|
371
868
|
accessible?: boolean | undefined;
|
|
372
869
|
accessibilityLabel?: string | undefined;
|
|
373
870
|
accessibilityHint?: string | undefined;
|
|
@@ -386,7 +883,7 @@ type ButtonProps = TouchableTVProps & {
|
|
|
386
883
|
}> | undefined;
|
|
387
884
|
onAccessibilityAction?: ((event: unknown) => unknown) | undefined;
|
|
388
885
|
touchSoundDisabled?: boolean | undefined;
|
|
389
|
-
}
|
|
886
|
+
}
|
|
390
887
|
export declare function Button(props: ButtonProps): ReactElement;
|
|
391
888
|
type NativeScrollPoint = {
|
|
392
889
|
x: number;
|
|
@@ -415,7 +912,7 @@ type ScrollToOptions = {
|
|
|
415
912
|
y?: number | undefined;
|
|
416
913
|
animated?: boolean | undefined;
|
|
417
914
|
};
|
|
418
|
-
type ScrollViewInstance =
|
|
915
|
+
type ScrollViewInstance = HostInstance & {
|
|
419
916
|
scrollTo: {
|
|
420
917
|
(options: ScrollToOptions): void;
|
|
421
918
|
(x: number, y: number): void;
|
|
@@ -432,9 +929,9 @@ type ScrollViewInstance = HTMLElement & {
|
|
|
432
929
|
getNativeScrollRef: () => HTMLElement;
|
|
433
930
|
};
|
|
434
931
|
type ReservedViewProps = "ref" | "onScroll" | "onScrollEnd";
|
|
435
|
-
|
|
932
|
+
interface ScrollViewProps extends Omit<ViewProps, ReservedViewProps> {
|
|
436
933
|
ref?: Ref<ScrollViewInstance> | undefined;
|
|
437
|
-
contentContainerStyle?: StyleProp<
|
|
934
|
+
contentContainerStyle?: StyleProp<ViewStyle> | undefined;
|
|
438
935
|
horizontal?: boolean | undefined;
|
|
439
936
|
scrollEnabled?: boolean | undefined;
|
|
440
937
|
showsHorizontalScrollIndicator?: boolean | undefined;
|
|
@@ -495,7 +992,7 @@ type ScrollViewProps = Omit<ViewProps, ReservedViewProps> & {
|
|
|
495
992
|
snapToIntervalMomentum?: boolean | undefined;
|
|
496
993
|
zoomScale?: number | undefined;
|
|
497
994
|
onScrollToTop?: ((event: ScrollEvent) => void) | undefined;
|
|
498
|
-
}
|
|
995
|
+
}
|
|
499
996
|
type ViewToken<ItemT = unknown> = {
|
|
500
997
|
item: ItemT;
|
|
501
998
|
key: string;
|
|
@@ -536,7 +1033,7 @@ type CellRendererProps<ItemT> = {
|
|
|
536
1033
|
item: ItemT;
|
|
537
1034
|
onFocusCapture?: ((event: FocusEvent$1<HTMLElement>) => void) | undefined;
|
|
538
1035
|
onLayout?: ((event: LayoutChangeEvent) => void) | undefined;
|
|
539
|
-
style: StyleProp<
|
|
1036
|
+
style: StyleProp<ViewStyle> | undefined;
|
|
540
1037
|
};
|
|
541
1038
|
type ListComponent = ComponentType<Record<string, never>> | ReactElement | null | undefined;
|
|
542
1039
|
type ListSeparatorProps<ItemT> = {
|
|
@@ -575,7 +1072,7 @@ type FlatListInstance<ItemT = unknown> = {
|
|
|
575
1072
|
setNativeProps: (props: Record<string, unknown>) => void;
|
|
576
1073
|
};
|
|
577
1074
|
type ReservedScrollViewProps = "ref" | "children";
|
|
578
|
-
|
|
1075
|
+
interface FlatListProps<ItemT> extends Omit<ScrollViewProps, ReservedScrollViewProps> {
|
|
579
1076
|
ref?: Ref<FlatListInstance<ItemT>> | undefined;
|
|
580
1077
|
data: Readonly<ArrayLike<ItemT>> | null | undefined;
|
|
581
1078
|
renderItem?: ListRenderItem<ItemT> | null | undefined;
|
|
@@ -588,15 +1085,15 @@ type FlatListProps<ItemT> = Omit<ScrollViewProps, ReservedScrollViewProps> & {
|
|
|
588
1085
|
index: number;
|
|
589
1086
|
}) | undefined;
|
|
590
1087
|
numColumns?: number | undefined;
|
|
591
|
-
columnWrapperStyle?: StyleProp<
|
|
1088
|
+
columnWrapperStyle?: StyleProp<ViewStyle> | undefined;
|
|
592
1089
|
inverted?: boolean | null | undefined;
|
|
593
1090
|
initialScrollIndex?: number | null | undefined;
|
|
594
1091
|
ItemSeparatorComponent?: ListSeparatorComponent<ItemT>;
|
|
595
1092
|
ListEmptyComponent?: ListComponent;
|
|
596
1093
|
ListHeaderComponent?: ListComponent;
|
|
597
|
-
ListHeaderComponentStyle?: StyleProp<
|
|
1094
|
+
ListHeaderComponentStyle?: StyleProp<ViewStyle> | undefined;
|
|
598
1095
|
ListFooterComponent?: ListComponent;
|
|
599
|
-
ListFooterComponentStyle?: StyleProp<
|
|
1096
|
+
ListFooterComponentStyle?: StyleProp<ViewStyle> | undefined;
|
|
600
1097
|
CellRendererComponent?: ComponentType<CellRendererProps<ItemT>> | null | undefined;
|
|
601
1098
|
renderScrollComponent?: ((props: ScrollViewProps) => ReactElement<ScrollViewProps>) | undefined;
|
|
602
1099
|
onEndReached?: ((info: {
|
|
@@ -617,18 +1114,18 @@ type FlatListProps<ItemT> = Omit<ScrollViewProps, ReservedScrollViewProps> & {
|
|
|
617
1114
|
}) => void) | undefined;
|
|
618
1115
|
onRefresh?: (() => void) | null | undefined;
|
|
619
1116
|
refreshing?: boolean | null | undefined;
|
|
1117
|
+
progressViewOffset?: number | undefined;
|
|
620
1118
|
debug?: boolean | undefined;
|
|
621
1119
|
disableVirtualization?: boolean | undefined;
|
|
622
1120
|
initialNumToRender?: number | undefined;
|
|
623
1121
|
maxToRenderPerBatch?: number | undefined;
|
|
624
|
-
progressViewOffset?: number | undefined;
|
|
625
1122
|
strictMode?: boolean | undefined;
|
|
626
1123
|
updateCellsBatchingPeriod?: number | undefined;
|
|
627
1124
|
windowSize?: number | undefined;
|
|
628
1125
|
legacyImplementation?: boolean | undefined;
|
|
629
|
-
}
|
|
1126
|
+
}
|
|
630
1127
|
export declare function FlatList<ItemT>(props: FlatListProps<ItemT>): ReactElement;
|
|
631
|
-
type
|
|
1128
|
+
type ImageInstance = HostInstance;
|
|
632
1129
|
type ImageURISource = {
|
|
633
1130
|
uri?: string | undefined;
|
|
634
1131
|
bundle?: string | undefined;
|
|
@@ -673,7 +1170,7 @@ type ImageSize = {
|
|
|
673
1170
|
height: number;
|
|
674
1171
|
};
|
|
675
1172
|
type ReservedDOMHandlers$1 = "onLoad" | "onLoadStart" | "onError" | "onProgress";
|
|
676
|
-
|
|
1173
|
+
interface ImageProps extends AccessibilityProps, Omit<DOMEventHandlers<HTMLElement>, ReservedDOMHandlers$1> {
|
|
677
1174
|
source?: ImageSource | undefined;
|
|
678
1175
|
src?: string | undefined;
|
|
679
1176
|
srcSet?: string | undefined;
|
|
@@ -690,8 +1187,8 @@ type ImageProps = AccessibilityProps & Omit<DOMEventHandlers<HTMLElement>, Reser
|
|
|
690
1187
|
fadeDuration?: number | undefined;
|
|
691
1188
|
progressiveRenderingEnabled?: boolean | undefined;
|
|
692
1189
|
loadingIndicatorSource?: ImageURISource | number | undefined;
|
|
693
|
-
style?: StyleProp<
|
|
694
|
-
ref?: Ref<
|
|
1190
|
+
style?: StyleProp<ImageStyle> | undefined;
|
|
1191
|
+
ref?: Ref<ImageInstance> | undefined;
|
|
695
1192
|
id?: string | undefined;
|
|
696
1193
|
nativeID?: string | undefined;
|
|
697
1194
|
testID?: string | undefined;
|
|
@@ -704,7 +1201,7 @@ type ImageProps = AccessibilityProps & Omit<DOMEventHandlers<HTMLElement>, Reser
|
|
|
704
1201
|
loading?: "eager" | "lazy" | undefined;
|
|
705
1202
|
fetchPriority?: "high" | "low" | "auto" | undefined;
|
|
706
1203
|
decoding?: "sync" | "async" | "auto" | undefined;
|
|
707
|
-
}
|
|
1204
|
+
}
|
|
708
1205
|
type ImageStatics = {
|
|
709
1206
|
getSize: {
|
|
710
1207
|
(uri: string): Promise<ImageSize>;
|
|
@@ -720,6 +1217,55 @@ type ImageStatics = {
|
|
|
720
1217
|
};
|
|
721
1218
|
declare function ImageComponent(props: ImageProps): ReactElement;
|
|
722
1219
|
export declare const Image: typeof ImageComponent & ImageStatics;
|
|
1220
|
+
interface KeyboardAvoidingViewProps extends ViewProps {
|
|
1221
|
+
/** How the view moves out of the way of the keyboard. With no value, it doesn't. */
|
|
1222
|
+
behavior?: "height" | "position" | "padding" | undefined;
|
|
1223
|
+
/** The style of the inner view, with the `position` behavior. */
|
|
1224
|
+
contentContainerStyle?: ViewProps["style"];
|
|
1225
|
+
/** `false` stops the view from moving. Defaults to `true`. */
|
|
1226
|
+
enabled?: boolean | undefined;
|
|
1227
|
+
/** The distance between the top of the window and the top of the view. Defaults to 0. */
|
|
1228
|
+
keyboardVerticalOffset?: number | undefined;
|
|
1229
|
+
}
|
|
1230
|
+
/** The element of the outer view. */
|
|
1231
|
+
type KeyboardAvoidingViewInstance = HostInstance;
|
|
1232
|
+
/**
|
|
1233
|
+
* A view that moves out of the way of the keyboard, with the math of React Native 0.88. As on
|
|
1234
|
+
* native, the frame of the view comes from `onLayout`, so its `y` is relative to its parent.
|
|
1235
|
+
* `keyboardVerticalOffset` adds the distance to the top of the window.
|
|
1236
|
+
*/
|
|
1237
|
+
export declare function KeyboardAvoidingView(props: KeyboardAvoidingViewProps): ReactElement;
|
|
1238
|
+
type ModalEvent = {
|
|
1239
|
+
nativeEvent: null;
|
|
1240
|
+
};
|
|
1241
|
+
type ModalOrientationChangeEvent = {
|
|
1242
|
+
nativeEvent: {
|
|
1243
|
+
orientation: "portrait" | "landscape";
|
|
1244
|
+
};
|
|
1245
|
+
};
|
|
1246
|
+
type ModalProps = Omit<ViewProps, "ref"> & {
|
|
1247
|
+
ref?: Ref<HTMLDialogElement> | undefined;
|
|
1248
|
+
modalRef?: Ref<HTMLDialogElement> | undefined;
|
|
1249
|
+
visible?: boolean | undefined;
|
|
1250
|
+
transparent?: boolean | undefined;
|
|
1251
|
+
backdropColor?: string | undefined;
|
|
1252
|
+
animationType?: "none" | "slide" | "fade" | undefined;
|
|
1253
|
+
onRequestClose?: ((event: ModalEvent) => void) | undefined;
|
|
1254
|
+
onShow?: ((event: ModalEvent) => void) | undefined;
|
|
1255
|
+
onDismiss?: (() => void) | undefined;
|
|
1256
|
+
allowSwipeDismissal?: boolean | undefined;
|
|
1257
|
+
hardwareAccelerated?: boolean | undefined;
|
|
1258
|
+
navigationBarTranslucent?: boolean | undefined;
|
|
1259
|
+
onOrientationChange?: ((event: ModalOrientationChangeEvent) => void) | undefined;
|
|
1260
|
+
presentationStyle?: "fullScreen" | "pageSheet" | "formSheet" | "overFullScreen" | undefined;
|
|
1261
|
+
statusBarTranslucent?: boolean | undefined;
|
|
1262
|
+
supportedOrientations?: ReadonlyArray<"portrait" | "portrait-upside-down" | "landscape" | "landscape-left" | "landscape-right"> | undefined;
|
|
1263
|
+
};
|
|
1264
|
+
/**
|
|
1265
|
+
* React Native's `Modal` on a `<dialog>` in the top layer. `showModal()` makes the rest of the
|
|
1266
|
+
* page inert, keeps the focus inside, and turns Escape into `onRequestClose`.
|
|
1267
|
+
*/
|
|
1268
|
+
export declare function Modal(props: ModalProps): ReactElement | null;
|
|
723
1269
|
interface PressableStateCallbackType {
|
|
724
1270
|
readonly pressed: boolean;
|
|
725
1271
|
readonly hovered: boolean;
|
|
@@ -731,11 +1277,10 @@ type PressableAndroidRippleConfig = {
|
|
|
731
1277
|
radius?: number | undefined;
|
|
732
1278
|
foreground?: boolean | undefined;
|
|
733
1279
|
};
|
|
734
|
-
type PressableInstance =
|
|
735
|
-
|
|
736
|
-
type PressableProps = Omit<ViewProps, "children" | "style" | "onBlur" | "onFocus"> & {
|
|
1280
|
+
type PressableInstance = HostInstance;
|
|
1281
|
+
interface PressableProps extends Omit<ViewProps, "children" | "style" | "onBlur" | "onFocus"> {
|
|
737
1282
|
children?: ReactNode | ((state: PressableStateCallbackType) => ReactNode) | undefined;
|
|
738
|
-
style?: ViewStyle | ((state: PressableStateCallbackType) => ViewStyle) | undefined;
|
|
1283
|
+
style?: StyleProp<ViewStyle> | ((state: PressableStateCallbackType) => StyleProp<ViewStyle>) | undefined;
|
|
739
1284
|
cancelable?: boolean | undefined;
|
|
740
1285
|
delayHoverIn?: number | undefined;
|
|
741
1286
|
delayHoverOut?: number | undefined;
|
|
@@ -757,8 +1302,21 @@ type PressableProps = Omit<ViewProps, "children" | "style" | "onBlur" | "onFocus
|
|
|
757
1302
|
android_ripple?: PressableAndroidRippleConfig | undefined;
|
|
758
1303
|
testOnly_pressed?: boolean | undefined;
|
|
759
1304
|
unstable_pressDelay?: number | undefined;
|
|
760
|
-
}
|
|
1305
|
+
}
|
|
761
1306
|
export declare const Pressable: NamedExoticComponent<PressableProps>;
|
|
1307
|
+
interface RefreshControlProps extends ViewProps {
|
|
1308
|
+
refreshing: boolean;
|
|
1309
|
+
onRefresh?: (() => void | Promise<void>) | undefined;
|
|
1310
|
+
progressViewOffset?: number | undefined;
|
|
1311
|
+
colors?: ReadonlyArray<string> | undefined;
|
|
1312
|
+
enabled?: boolean | undefined;
|
|
1313
|
+
progressBackgroundColor?: string | undefined;
|
|
1314
|
+
size?: "default" | "large" | undefined;
|
|
1315
|
+
tintColor?: string | undefined;
|
|
1316
|
+
title?: string | undefined;
|
|
1317
|
+
titleColor?: string | undefined;
|
|
1318
|
+
}
|
|
1319
|
+
export declare function RefreshControl(props: RefreshControlProps): ReactElement;
|
|
762
1320
|
export declare function ScrollView(props: ScrollViewProps): ReactElement;
|
|
763
1321
|
type StatusBarStyle = "default" | "light-content" | "dark-content";
|
|
764
1322
|
type StatusBarAnimation = "none" | "fade" | "slide";
|
|
@@ -789,7 +1347,7 @@ type SwitchChangeEventData = {
|
|
|
789
1347
|
target: EventTarget | null;
|
|
790
1348
|
};
|
|
791
1349
|
type SwitchChangeEvent = NativeSyntheticEvent<SwitchChangeEventData>;
|
|
792
|
-
|
|
1350
|
+
interface SwitchProps extends Omit<ViewProps, "children" | "onChange" | "ref"> {
|
|
793
1351
|
ref?: Ref<HTMLInputElement> | undefined;
|
|
794
1352
|
value?: boolean | undefined;
|
|
795
1353
|
disabled?: boolean | undefined;
|
|
@@ -804,14 +1362,15 @@ type SwitchProps = Omit<ViewProps, "children" | "onChange" | "ref"> & {
|
|
|
804
1362
|
onTintColor?: string | undefined;
|
|
805
1363
|
thumbTintColor?: string | undefined;
|
|
806
1364
|
tintColor?: string | undefined;
|
|
807
|
-
}
|
|
1365
|
+
}
|
|
808
1366
|
export declare function Switch(props: SwitchProps): ReactElement;
|
|
1367
|
+
type TextInstance = HostInstance;
|
|
809
1368
|
/** @deprecated Use `GestureResponderEvent`, the type that React Native gives `onPress`. */
|
|
810
1369
|
type PressEvent = GestureResponderEvent;
|
|
811
|
-
|
|
1370
|
+
interface TextProps extends AccessibilityProps, DOMEventHandlers<HTMLElement> {
|
|
812
1371
|
children?: ReactNode;
|
|
813
|
-
style?: StyleProp<
|
|
814
|
-
ref?: Ref<
|
|
1372
|
+
style?: StyleProp<TextStyle> | undefined;
|
|
1373
|
+
ref?: Ref<TextInstance> | undefined;
|
|
815
1374
|
id?: string | undefined;
|
|
816
1375
|
nativeID?: string | undefined;
|
|
817
1376
|
testID?: string | undefined;
|
|
@@ -835,7 +1394,7 @@ type TextProps = AccessibilityProps & DOMEventHandlers<HTMLElement> & {
|
|
|
835
1394
|
rel?: string | undefined;
|
|
836
1395
|
download?: string | boolean | undefined;
|
|
837
1396
|
lang?: string | undefined;
|
|
838
|
-
}
|
|
1397
|
+
}
|
|
839
1398
|
export declare const TextAncestorContext: Context<boolean>;
|
|
840
1399
|
export declare function Text(props: TextProps): ReactElement;
|
|
841
1400
|
type TextInputSelection = {
|
|
@@ -873,18 +1432,19 @@ type InputMode = "none" | "text" | "decimal" | "numeric" | "tel" | "search" | "e
|
|
|
873
1432
|
type ReturnKeyType = "done" | "go" | "next" | "search" | "send" | "none" | "previous" | "default" | "emergency-call" | "google" | "join" | "route" | "yahoo";
|
|
874
1433
|
type EnterKeyHint = "enter" | "done" | "go" | "next" | "previous" | "search" | "send";
|
|
875
1434
|
type SubmitBehavior = "submit" | "blurAndSubmit" | "newline";
|
|
876
|
-
type TextInputInstance = HTMLInputElement & HTMLTextAreaElement & {
|
|
1435
|
+
type TextInputInstance = HTMLInputElement & HTMLTextAreaElement & Omit<HostMethods, "setNativeProps"> & {
|
|
877
1436
|
clear: () => void;
|
|
878
1437
|
isFocused: () => boolean;
|
|
879
1438
|
getNativeRef: () => HTMLInputElement | HTMLTextAreaElement;
|
|
880
1439
|
setNativeProps: (props: {
|
|
881
1440
|
text?: string | undefined;
|
|
1441
|
+
style?: StyleProp<TextStyle> | undefined;
|
|
882
1442
|
}) => void;
|
|
883
1443
|
};
|
|
884
1444
|
type ReservedDOMHandlers = "onChange" | "onFocus" | "onBlur" | "onKeyPress" | "onSelect" | "onScroll" | "onInput";
|
|
885
|
-
|
|
1445
|
+
interface TextInputProps extends AccessibilityProps, Omit<DOMEventHandlers<HTMLElement>, ReservedDOMHandlers> {
|
|
886
1446
|
ref?: Ref<TextInputInstance> | undefined;
|
|
887
|
-
style?: StyleProp<
|
|
1447
|
+
style?: StyleProp<TextStyle> | undefined;
|
|
888
1448
|
id?: string | undefined;
|
|
889
1449
|
nativeID?: string | undefined;
|
|
890
1450
|
testID?: string | undefined;
|
|
@@ -953,7 +1513,7 @@ type TextInputProps = AccessibilityProps & Omit<DOMEventHandlers<HTMLElement>, R
|
|
|
953
1513
|
textBreakStrategy?: "simple" | "highQuality" | "balanced" | undefined;
|
|
954
1514
|
underlineColorAndroid?: unknown;
|
|
955
1515
|
verticalAlign?: "auto" | "top" | "bottom" | "middle" | undefined;
|
|
956
|
-
}
|
|
1516
|
+
}
|
|
957
1517
|
type TextInputState = {
|
|
958
1518
|
currentlyFocusedInput: () => HTMLInputElement | HTMLTextAreaElement | null;
|
|
959
1519
|
focusTextInput: (input: HTMLElement | null | undefined) => void;
|
|
@@ -963,15 +1523,15 @@ declare function TextInputComponent(props: TextInputProps): ReactElement;
|
|
|
963
1523
|
export declare const TextInput: typeof TextInputComponent & {
|
|
964
1524
|
State: TextInputState;
|
|
965
1525
|
};
|
|
966
|
-
|
|
1526
|
+
interface TouchableHighlightProps extends Omit<ViewProps, "children" | "style" | "onBlur" | "onFocus">, TouchablePressProps, TouchableTVProps {
|
|
967
1527
|
children?: ReactNode | undefined;
|
|
968
|
-
style?: StyleProp<
|
|
1528
|
+
style?: StyleProp<ViewStyle> | undefined;
|
|
969
1529
|
activeOpacity?: number | undefined;
|
|
970
1530
|
underlayColor?: string | undefined;
|
|
971
1531
|
onShowUnderlay?: (() => void) | undefined;
|
|
972
1532
|
onHideUnderlay?: (() => void) | undefined;
|
|
973
1533
|
testOnly_pressed?: boolean | undefined;
|
|
974
|
-
}
|
|
1534
|
+
}
|
|
975
1535
|
export declare function TouchableHighlight(props: TouchableHighlightProps): ReactElement;
|
|
976
1536
|
type ThemeAttributeBackgroundPropType = Readonly<{
|
|
977
1537
|
type: "ThemeAttrAndroid";
|
|
@@ -998,12 +1558,40 @@ type TouchableNativeFeedbackStatics = {
|
|
|
998
1558
|
export declare const TouchableNativeFeedback: ((props: TouchableNativeFeedbackProps) => ReactElement) & TouchableNativeFeedbackStatics;
|
|
999
1559
|
type TouchableOpacityProps = Omit<ViewProps, "children" | "style" | "onBlur" | "onFocus"> & TouchablePressProps & TouchableTVProps & {
|
|
1000
1560
|
children?: ReactNode | undefined;
|
|
1001
|
-
style?: StyleProp<
|
|
1561
|
+
style?: StyleProp<ViewStyle> | undefined;
|
|
1002
1562
|
activeOpacity?: number | undefined;
|
|
1003
1563
|
};
|
|
1004
1564
|
export declare function TouchableOpacity(props: TouchableOpacityProps): ReactElement;
|
|
1005
1565
|
export declare function TouchableWithoutFeedback(props: TouchableWithoutFeedbackProps): ReactElement;
|
|
1006
1566
|
export declare function View(props: ViewProps): ReactElement;
|
|
1567
|
+
type CreateElementProps = Readonly<Record<string, unknown>>;
|
|
1568
|
+
/**
|
|
1569
|
+
* Compat export. Renders `type` with React Native props: `style` compiles to class names, and
|
|
1570
|
+
* the accessibility props become ARIA attributes. Every other prop goes to the element as it
|
|
1571
|
+
* is. Libraries such as `react-native-svg` import it from `react-native` on the web.
|
|
1572
|
+
*/
|
|
1573
|
+
export declare const unstable_createElement: (type: ElementType, props?: CreateElementProps | null) => ReactElement;
|
|
1574
|
+
/**
|
|
1575
|
+
* Compat export. On native it returns the tag of a view. On the web it returns the DOM element
|
|
1576
|
+
* of a ref, of an element, or of a scroll component. A number comes back as it is. A class
|
|
1577
|
+
* component instance gives `null`, because React has no `findDOMNode`.
|
|
1578
|
+
*/
|
|
1579
|
+
export declare const findNodeHandle: (componentOrHandle: unknown) => Element | number | null;
|
|
1580
|
+
/**
|
|
1581
|
+
* Compat type. The base type of a native module spec. A library extends it for the module that
|
|
1582
|
+
* it reads with `TurboModuleRegistry`.
|
|
1583
|
+
*/
|
|
1584
|
+
interface TurboModule {
|
|
1585
|
+
readonly getConstants?: (() => {}) | undefined;
|
|
1586
|
+
}
|
|
1587
|
+
/**
|
|
1588
|
+
* Compat export. A browser has no native modules, so `get` always returns `null`. A library
|
|
1589
|
+
* that reads its native module at import time then takes its JavaScript path.
|
|
1590
|
+
*/
|
|
1591
|
+
export declare const TurboModuleRegistry: {
|
|
1592
|
+
get<T = unknown>(name: string): T | null;
|
|
1593
|
+
getEnforcing<T = unknown>(name: string): T;
|
|
1594
|
+
};
|
|
1007
1595
|
export declare function usePressability(config: PressabilityConfig): PressabilityEventHandlers;
|
|
1008
1596
|
export declare function usePressability(config: PressabilityConfig | null | undefined): PressabilityEventHandlers | null;
|
|
1009
1597
|
declare global {
|
|
@@ -1013,5 +1601,5 @@ declare global {
|
|
|
1013
1601
|
*/
|
|
1014
1602
|
const __DEV__: boolean;
|
|
1015
1603
|
}
|
|
1016
|
-
export type { AbsoluteFillStyle, AccessibilityAnnouncementFinishedEvent, AccessibilityChangeEvent, AccessibilityChangeEventName, AccessibilityEventSubscription, AccessibilityProps, AccessibilityState, AccessibilityValue, ActivityIndicatorProps, AppearanceListener, AppearancePreferences, BackHandlerSubscription, BackPressHandler, BlurEvent, ButtonProps, CellRendererProps, ColorSchemeName, DOMEventHandlers, DimensionsChangeHandler, DimensionsValue, EmitterSubscription, EnterKeyHint, FlatListInstance, FlatListProps, FocusEvent, GestureResponderEvent, GestureResponderHandlers, I18nManagerConstants, ImageErrorEvent, ImageLoadEvent, ImageLoadEventData, ImageProgressEvent, ImageProps, ImageResizeMode, ImageResolvedAssetSource, ImageSize, ImageSource, ImageStatics, ImageURISource, InputMode, Insets, KeyboardType, LayoutChangeEvent, LayoutRectangle, ListRenderItem, ListRenderItemInfo, ListSeparatorComponent, ListSeparatorProps, ListSeparators, MouseEvent, NativeEventSubscription, NativeScrollEvent, NativeScrollPoint, NativeScrollRectangle, NativeScrollSize, NativeSyntheticEvent, NativeTouchEvent, PanResponderCallbacks, PanResponderGestureState, PanResponderInstance, PlatformOSType, PlatformSelectSpec, PlatformType, PressEvent, PressabilityConfig, PressabilityEventHandlers, PressableAndroidRippleConfig, PressableInstance, PressableProps, PressableStateCallbackType, ProcessedColorValue, ReturnKeyType, Role, ScaledSize, ScrollEvent, ScrollToIndexParams, ScrollToItemParams, ScrollToOffsetParams, ScrollToOptions, ScrollViewInstance, ScrollViewProps, StatusBarAnimation, StatusBarProps, StatusBarStatics, StatusBarStyle, StyleProp, SubmitBehavior, SwitchChangeEvent, SwitchChangeEventData, SwitchProps, TextInputChangeEvent, TextInputChangeEventData, TextInputContentSizeChangeEvent, TextInputEndEditingEvent, TextInputFocusEvent, TextInputInstance, TextInputKeyPressEvent, TextInputProps, TextInputScrollEvent, TextInputSelection, TextInputSelectionChangeEvent, TextInputState, TextInputSubmitEditingEvent, TextProps, TouchableHighlightProps, TouchableNativeFeedbackProps, TouchableOpacityProps, TouchableWithoutFeedbackProps, ViewProps, ViewToken, ViewabilityConfig, ViewabilityConfigCallbackPair, ViewabilityConfigCallbackPairs, ViewableItemsChangedInfo };
|
|
1604
|
+
export type { AbsoluteFillStyle, AccessibilityActionEvent, AccessibilityAnnouncementFinishedEvent, AccessibilityChangeEvent, AccessibilityChangeEventName, AccessibilityEventSubscription, AccessibilityProps, AccessibilityState, AccessibilityValue, ActivityIndicatorProps, AlertButton, AlertButtonStyle, AlertOptions, AlertType, AndroidKeyboardEvent, AppStateEvent, AppStateStatus, AppearanceListener, AppearancePreferences, BackHandlerSubscription, BackPressHandler, BlurEvent, BoxShadowValue, ButtonProps, CellRendererProps, ColorSchemeName, ColorValue, CreateElementProps, CursorValue, DOMEventHandlers, DimensionValue, DimensionsChangeHandler, DimensionsValue, DropShadowValue, EdgeInsetsValue, EmitterSubscription, EnterKeyHint, EventSubscription, FilterFunction, FlatListInstance, FlatListProps, FocusEvent, FontVariant, GestureResponderEvent, GestureResponderHandlers, HostComponent, HostInstance, HostMethods, I18nManagerConstants, IOSKeyboardEvent, ImageErrorEvent, ImageInstance, ImageLoadEvent, ImageLoadEventData, ImageProgressEvent, ImageProps, ImageResizeMode, ImageResolvedAssetSource, ImageSize, ImageSource, ImageStatics, ImageStyle, ImageURISource, InputMode, Insets, KeyboardAvoidingViewInstance, KeyboardAvoidingViewProps, KeyboardEvent, KeyboardEventEasing, KeyboardEventName, KeyboardMetrics, KeyboardType, LayoutChangeEvent, LayoutRectangle, ListRenderItem, ListRenderItemInfo, ListSeparatorComponent, ListSeparatorProps, ListSeparators, MeasureInWindowOnSuccessCallback, MeasureLayoutOnSuccessCallback, MeasureOnSuccessCallback, ModalEvent, ModalOrientationChangeEvent, ModalProps, MouseEvent, NativeColorValue, NativeEventSubscription, NativeScrollEvent, NativeScrollPoint, NativeScrollRectangle, NativeScrollSize, NativeSyntheticEvent, NativeTouchEvent, OpaqueColorValue, PanResponderCallbacks, PanResponderGestureState, PanResponderInstance, PlatformOSType, PlatformSelectSpec, PlatformType, PointValue, PointerEvent, PressEvent, PressabilityConfig, PressabilityEventHandlers, PressableAndroidRippleConfig, PressableInstance, PressableProps, PressableStateCallbackType, ProcessedColorValue, RefreshControlProps, ReturnKeyType, Role, ScaledSize, ScrollEvent, ScrollToIndexParams, ScrollToItemParams, ScrollToOffsetParams, ScrollToOptions, ScrollViewInstance, ScrollViewProps, ShareAction, ShareContent, ShareOptions, StatusBarAnimation, StatusBarProps, StatusBarStatics, StatusBarStyle, StyleProp, SubmitBehavior, SwitchChangeEvent, SwitchChangeEventData, SwitchProps, TargetedEvent, TextInputChangeEvent, TextInputChangeEventData, TextInputContentSizeChangeEvent, TextInputEndEditingEvent, TextInputFocusEvent, TextInputInstance, TextInputKeyPressEvent, TextInputProps, TextInputScrollEvent, TextInputSelection, TextInputSelectionChangeEvent, TextInputState, TextInputSubmitEditingEvent, TextInstance, TextProps, TextStyle, TouchableHighlightProps, TouchableNativeFeedbackProps, TouchableOpacityProps, TouchableWithoutFeedbackProps, TransformsStyle, TurboModule, ViewInstance, ViewProps, ViewStyle, ViewToken, ViewabilityConfig, ViewabilityConfigCallbackPair, ViewabilityConfigCallbackPairs, ViewableItemsChangedInfo };
|
|
1017
1605
|
//# sourceMappingURL=index.d.ts.map
|