@unbound-app/api 0.9.0 → 0.11.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 +4 -2
- package/src/_internal.d.ts +3463 -447
- package/src/commands.d.ts +255 -0
- package/src/dialogs.d.ts +69 -0
- package/src/fs.d.ts +3 -4
- package/src/global.d.ts +341 -20
- package/src/index.d.ts +2 -0
- package/src/metro/api.d.ts +2 -0
- package/src/metro/components.d.ts +91 -16
- package/src/metro/index.d.ts +32 -13
- package/src/native.d.ts +51 -3
- package/src/settings.d.ts +1 -1
- package/src/storage.d.ts +4 -3
package/src/_internal.d.ts
CHANGED
|
@@ -1,20 +1,10 @@
|
|
|
1
1
|
// Auto-generated by generate-plugin-sdk.ts - DO NOT EDIT
|
|
2
2
|
|
|
3
3
|
import type { LiteralUnion } from './utils';
|
|
4
|
-
import * as
|
|
4
|
+
import * as React$1 from 'react';
|
|
5
5
|
import { ComponentType, ReactNode } from 'react';
|
|
6
|
-
import * as
|
|
7
|
-
import {
|
|
8
|
-
AccessibilityState,
|
|
9
|
-
ImageSourcePropType,
|
|
10
|
-
ImageStyle,
|
|
11
|
-
PressableProps,
|
|
12
|
-
StyleProp,
|
|
13
|
-
TextInputProps as RNTextInputProps,
|
|
14
|
-
TextStyle,
|
|
15
|
-
ViewProps,
|
|
16
|
-
ViewStyle,
|
|
17
|
-
} from 'react-native';
|
|
6
|
+
import * as RN from 'react-native';
|
|
7
|
+
import { ImageSourcePropType, ImageStyle, TextStyle, ViewStyle } from 'react-native';
|
|
18
8
|
|
|
19
9
|
declare const THEME_FLAG_KEYS: readonly [
|
|
20
10
|
'MOBILE_DARK_GRADIENT_THEME_ENABLED',
|
|
@@ -27,25 +17,300 @@ declare const TRANSITION_STATE_KEYS: readonly ['MOUNTED', 'ENTERED', 'YEETED'];
|
|
|
27
17
|
declare const nativeHandle: unique symbol;
|
|
28
18
|
/** The kinds of addon a manifest can declare. */
|
|
29
19
|
export declare const ADDON_TYPES: readonly ['plugin', 'theme', 'icon-pack', 'font'];
|
|
20
|
+
/** The components of Discord's design module, each of which Unbound can stand in for when Discord drops it. */
|
|
21
|
+
export declare const DESIGN_COMPONENTS: readonly [
|
|
22
|
+
'Text',
|
|
23
|
+
'Heading',
|
|
24
|
+
'TableRow',
|
|
25
|
+
'TableSwitchRow',
|
|
26
|
+
'FormSwitch',
|
|
27
|
+
'TableCheckboxRow',
|
|
28
|
+
'TableRadioRow',
|
|
29
|
+
'TableRadioGroup',
|
|
30
|
+
'TableRowGroup',
|
|
31
|
+
'TableRowGroupTitle',
|
|
32
|
+
'TableRowIcon',
|
|
33
|
+
'RowButton',
|
|
34
|
+
'RowGroup',
|
|
35
|
+
'Button',
|
|
36
|
+
'IconButton',
|
|
37
|
+
'ImageButton',
|
|
38
|
+
'FloatingActionButton',
|
|
39
|
+
'TextInput',
|
|
40
|
+
'TextField',
|
|
41
|
+
'TextArea',
|
|
42
|
+
'TextAreaField',
|
|
43
|
+
'SearchField',
|
|
44
|
+
'GhostInput',
|
|
45
|
+
'SplitTextInput',
|
|
46
|
+
'Slider',
|
|
47
|
+
'Checkbox',
|
|
48
|
+
'SegmentedControl',
|
|
49
|
+
'SegmentedControlPages',
|
|
50
|
+
'Stack',
|
|
51
|
+
'Card',
|
|
52
|
+
'AlertModal',
|
|
53
|
+
'AlertActionButton',
|
|
54
|
+
'ActionSheet',
|
|
55
|
+
'ActionSheetRow',
|
|
56
|
+
'ContextMenu',
|
|
57
|
+
];
|
|
30
58
|
export declare const NATIVE_PLUGIN_CAPABILITIES: readonly [
|
|
31
59
|
'native.objc.classes',
|
|
32
60
|
'native.objc.invoke',
|
|
61
|
+
'native.objc.invokeAsync',
|
|
62
|
+
'native.objc.batch',
|
|
63
|
+
'native.objc.snapshot',
|
|
33
64
|
'native.objc.ivars',
|
|
34
65
|
'native.objc.associations',
|
|
35
66
|
'native.objc.hooks',
|
|
36
67
|
'native.ffi.symbols',
|
|
37
68
|
'native.ffi.call',
|
|
38
69
|
'native.fabric.mount',
|
|
70
|
+
'native.fabric.async',
|
|
71
|
+
'native.runtime.events',
|
|
72
|
+
'native.java.classes',
|
|
73
|
+
'native.java.construct',
|
|
74
|
+
'native.java.fields',
|
|
75
|
+
'native.java.invoke',
|
|
76
|
+
'native.java.invokeAsync',
|
|
77
|
+
'native.java.hooks',
|
|
78
|
+
'native.java.batch',
|
|
79
|
+
'native.java.associations',
|
|
80
|
+
'native.debug.evaluations',
|
|
81
|
+
'native.debug.environment',
|
|
39
82
|
];
|
|
40
|
-
export
|
|
41
|
-
|
|
83
|
+
export declare const NATIVE_PLUGIN_PLATFORM_CAPABILITIES: {
|
|
84
|
+
readonly android: readonly [
|
|
85
|
+
'native.java.classes',
|
|
86
|
+
'native.java.construct',
|
|
87
|
+
'native.java.fields',
|
|
88
|
+
'native.java.invoke',
|
|
89
|
+
'native.fabric.async',
|
|
90
|
+
'native.ffi.call',
|
|
91
|
+
'native.ffi.symbols',
|
|
92
|
+
'native.java.associations',
|
|
93
|
+
'native.java.batch',
|
|
94
|
+
'native.java.hooks',
|
|
95
|
+
'native.java.invokeAsync',
|
|
96
|
+
'native.runtime.events',
|
|
97
|
+
'native.debug.environment',
|
|
98
|
+
'native.debug.evaluations',
|
|
99
|
+
];
|
|
100
|
+
readonly ios: readonly [
|
|
101
|
+
'native.fabric.async',
|
|
102
|
+
'native.fabric.mount',
|
|
103
|
+
'native.ffi.call',
|
|
104
|
+
'native.ffi.symbols',
|
|
105
|
+
'native.objc.associations',
|
|
106
|
+
'native.objc.batch',
|
|
107
|
+
'native.objc.classes',
|
|
108
|
+
'native.objc.hooks',
|
|
109
|
+
'native.objc.invoke',
|
|
110
|
+
'native.objc.invokeAsync',
|
|
111
|
+
'native.objc.ivars',
|
|
112
|
+
'native.objc.snapshot',
|
|
113
|
+
'native.debug.environment',
|
|
114
|
+
'native.debug.evaluations',
|
|
115
|
+
'native.runtime.events',
|
|
116
|
+
];
|
|
117
|
+
};
|
|
118
|
+
/**
|
|
119
|
+
* Props of `AIGlyphText` (function). Exports: AIGlyphText.
|
|
120
|
+
* @see design/visual-identities/ai/AIGlyphText.native.tsx
|
|
121
|
+
*/
|
|
122
|
+
export type AIGlyphTextProps = {
|
|
123
|
+
allowFontScaling?: React$1.ComponentProps<typeof RN.Text>['allowFontScaling'];
|
|
124
|
+
/** @default false */
|
|
125
|
+
animated?: boolean;
|
|
126
|
+
children?: React$1.ComponentProps<typeof RN.Text>['children'];
|
|
127
|
+
/** @default 'text-default' */
|
|
128
|
+
color?: 'none' | 'text-default' | (string & {});
|
|
129
|
+
ellipsizeMode?: React$1.ComponentProps<typeof RN.Text>['ellipsizeMode'];
|
|
130
|
+
numberOfLines?: React$1.ComponentProps<typeof RN.Text>['numberOfLines'];
|
|
131
|
+
size?: unknown;
|
|
132
|
+
style?: React$1.ComponentProps<typeof RN.Text>['style'];
|
|
133
|
+
};
|
|
134
|
+
export type AILoaderComponent = React$1.ComponentType<AILoaderProps>;
|
|
135
|
+
/**
|
|
136
|
+
* Props of `AILoader` (memo). Exports: AILoader.
|
|
137
|
+
* @see design/visual-identities/ai/AILoader/AILoader.native.tsx
|
|
138
|
+
*/
|
|
139
|
+
export type AILoaderProps = {
|
|
140
|
+
accessibilityLabel?: React$1.ComponentProps<typeof RN.View>['accessibilityLabel'];
|
|
141
|
+
/** @default 'text-default' */
|
|
142
|
+
color?: SlotProps['color'];
|
|
143
|
+
/** @default 16 */
|
|
144
|
+
size?: number;
|
|
145
|
+
style?: React$1.ComponentProps<typeof RN.View>['style'];
|
|
146
|
+
};
|
|
147
|
+
export type AIShimmerComponent = React$1.ComponentType<AIShimmerProps & Record<string, unknown>>;
|
|
148
|
+
/**
|
|
149
|
+
* Props of `AIShimmerInner` (function). Exports: none.
|
|
150
|
+
* @see design/visual-identities/ai/AIShimmer/AIShimmer.native.tsx
|
|
151
|
+
*/
|
|
152
|
+
export type AIShimmerInnerProps = {
|
|
153
|
+
color?: DesignTextProps['color'];
|
|
154
|
+
delay?: unknown;
|
|
155
|
+
duration?: unknown;
|
|
156
|
+
glyphColor?: ShimmerLayersProps['glyphColor'];
|
|
157
|
+
initialDelay?: unknown;
|
|
158
|
+
onComplete?: (...args: any[]) => unknown;
|
|
159
|
+
onStart?: (...args: any[]) => unknown;
|
|
160
|
+
ref?: React$1.Ref<any>;
|
|
161
|
+
style?: React$1.ComponentProps<typeof RN.View>['style'];
|
|
162
|
+
text?: unknown;
|
|
163
|
+
/** @default 0 */
|
|
164
|
+
trailingWidth?: number;
|
|
165
|
+
variant?: DesignTextProps['variant'];
|
|
166
|
+
};
|
|
167
|
+
/**
|
|
168
|
+
* Props of `AIShimmer` (memo). Exports: AIShimmer.
|
|
169
|
+
* @see design/visual-identities/ai/AIShimmer/AIShimmer.native.tsx
|
|
170
|
+
*/
|
|
171
|
+
export type AIShimmerProps = Omit<
|
|
172
|
+
AIShimmerInnerProps,
|
|
173
|
+
'delay' | 'duration' | 'initialDelay' | 'variant'
|
|
174
|
+
> & {
|
|
175
|
+
delay?: unknown;
|
|
176
|
+
duration?: number;
|
|
177
|
+
/** @default 0 */
|
|
178
|
+
initialDelay?: number;
|
|
179
|
+
/** @default 'text-md/normal' */
|
|
180
|
+
variant?: AIShimmerInnerProps['variant'];
|
|
181
|
+
};
|
|
182
|
+
export type AccessibilityAnnouncerLiveRegionComponent =
|
|
183
|
+
React$1.ComponentType<AccessibilityAnnouncerLiveRegionProps>;
|
|
184
|
+
/**
|
|
185
|
+
* Props of `AccessibilityAnnouncerLiveRegion` (memo). Exports: AccessibilityAnnouncerLiveRegion.
|
|
186
|
+
* @see ../discord_common/js/packages/design/components/AccessibilityAnnouncer/AccessibilityAnnouncerLiveRegion.native.tsx
|
|
187
|
+
*/
|
|
188
|
+
export type AccessibilityAnnouncerLiveRegionProps = {};
|
|
189
|
+
export type AccessibilityViewComponent = React$1.ComponentType<
|
|
190
|
+
AccessibilityViewProps & Record<string, unknown>
|
|
191
|
+
>;
|
|
192
|
+
/**
|
|
193
|
+
* Props of `AccessibilityView` (function). Exports: AccessibilityView, AccessibilityViewAnimated.
|
|
194
|
+
* @see design/components/AccessibilityView/AccessibilityView.native.tsx
|
|
195
|
+
*/
|
|
196
|
+
export type AccessibilityViewProps = Omit<
|
|
197
|
+
React$1.ComponentProps<typeof RN.View>,
|
|
198
|
+
'accessibilityViewIsModal' | 'collapsable' | 'nativeID' | 'onAccessibilityEscape' | 'ref'
|
|
199
|
+
> & {
|
|
200
|
+
/** @default false */
|
|
201
|
+
accessibilityViewIsModal?: React$1.ComponentProps<typeof RN.View>['accessibilityViewIsModal'];
|
|
202
|
+
collapsable?: React$1.ComponentProps<typeof RN.View>['collapsable'];
|
|
203
|
+
nativeID?: React$1.ComponentProps<typeof RN.View>['nativeID'];
|
|
204
|
+
onAccessibilityEscape?: React$1.ComponentProps<typeof RN.View>['onAccessibilityEscape'];
|
|
205
|
+
ref?: React$1.Ref<any>;
|
|
206
|
+
};
|
|
207
|
+
export type ActionSheetCloseButtonComponent = React$1.ComponentType<ActionSheetCloseButtonProps>;
|
|
208
|
+
/**
|
|
209
|
+
* Props of `ActionSheetCloseButton` (function). Exports: ActionSheetCloseButton.
|
|
210
|
+
* @see design/components/Sheet/native/ActionSheetCloseButton.native.tsx
|
|
211
|
+
*/
|
|
212
|
+
export type ActionSheetCloseButtonProps = {
|
|
213
|
+
onPress?: PressableOpacityProps['onPress'];
|
|
214
|
+
variant?: 'overlay' | (string & {});
|
|
215
|
+
};
|
|
216
|
+
export type ActionSheetComponent = React$1.ComponentType<
|
|
217
|
+
ActionSheetProps & Record<string, unknown>
|
|
218
|
+
>;
|
|
219
|
+
export type ActionSheetHeaderBarComponent = React$1.ComponentType<ActionSheetHeaderBarProps>;
|
|
220
|
+
/**
|
|
221
|
+
* Props of `ActionSheetHeaderBar` (function). Exports: ActionSheetHeaderBar.
|
|
222
|
+
* @see design/components/Sheet/native/ActionSheetHeaderBar.native.tsx
|
|
223
|
+
*/
|
|
224
|
+
export type ActionSheetHeaderBarProps = {
|
|
225
|
+
accessibilityLabel?: unknown;
|
|
226
|
+
onPress?: React$1.ComponentProps<typeof RN.TouchableWithoutFeedback>['onPress'];
|
|
227
|
+
style?: React$1.ComponentProps<typeof RN.View>['style'];
|
|
228
|
+
tabStyle?: React$1.ComponentProps<typeof RN.View>['style'];
|
|
229
|
+
/** @default 'default' */
|
|
230
|
+
variant?: 'default' | 'floating' | 'overlay' | (string & {});
|
|
231
|
+
};
|
|
232
|
+
export type ActionSheetHeaderPressableTextComponent =
|
|
233
|
+
React$1.ComponentType<ActionSheetHeaderPressableTextProps>;
|
|
234
|
+
/**
|
|
235
|
+
* Props of `ActionSheetHeaderPressableText` (function). Exports: ActionSheetHeaderPressableText.
|
|
236
|
+
* @see design/components/Sheet/native/ActionSheetHeaderPressableText.native.tsx
|
|
237
|
+
*/
|
|
238
|
+
export type ActionSheetHeaderPressableTextProps = {
|
|
239
|
+
accessibilityLabel?: PressableOpacityProps['accessibilityLabel'];
|
|
240
|
+
label?: DesignTextProps['children'];
|
|
241
|
+
onPress?: PressableOpacityProps['onPress'];
|
|
242
|
+
};
|
|
243
|
+
export type ActionSheetIconHeaderComponent = React$1.ComponentType<ActionSheetIconHeaderProps>;
|
|
244
|
+
/**
|
|
245
|
+
* Props of `ActionSheetIconHeader` (function). Exports: ActionSheetIconHeader.
|
|
246
|
+
* @see design/components/Sheet/native/ActionSheetIconHeader.native.tsx
|
|
247
|
+
*/
|
|
248
|
+
export type ActionSheetIconHeaderProps = {
|
|
249
|
+
icon?: React$1.ComponentProps<typeof RN.View>['children'];
|
|
250
|
+
subtitle?: DesignTextProps['children'];
|
|
251
|
+
title?: DesignTextProps['children'];
|
|
42
252
|
};
|
|
43
|
-
export type
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
253
|
+
export type ActionSheetPresenterComponent = React$1.ComponentType<ActionSheetPresenterProps>;
|
|
254
|
+
/**
|
|
255
|
+
* Props of `ActionSheetPresenter` (function). Exports: ActionSheetPresenter.
|
|
256
|
+
* @see design/components/Sheet/native/ActionSheetPresenter.native.tsx
|
|
257
|
+
*/
|
|
258
|
+
export type ActionSheetPresenterProps = {
|
|
259
|
+
appEntryKey?: unknown;
|
|
48
260
|
};
|
|
261
|
+
/**
|
|
262
|
+
* Props of `ActionSheet` (function). Exports: ActionSheet.
|
|
263
|
+
* @see design/components/Sheet/native/ActionSheet.native.tsx
|
|
264
|
+
*/
|
|
265
|
+
export type ActionSheetProps = Omit<SheetBottomSheetProps, 'ref'> & {
|
|
266
|
+
ref?: SheetBottomSheetProps['ref'];
|
|
267
|
+
};
|
|
268
|
+
export type ActionSheetRowComponent = React$1.ComponentType<
|
|
269
|
+
ActionSheetRowProps & Record<string, unknown>
|
|
270
|
+
> &
|
|
271
|
+
ActionSheetRowStatics;
|
|
272
|
+
export type ActionSheetRowGroupComponent = React$1.ComponentType<ActionSheetRowGroupProps>;
|
|
273
|
+
/**
|
|
274
|
+
* Props of `ActionSheetRowGroup` (function). Exports: none.
|
|
275
|
+
* @see design/components/Sheet/native/ActionSheetRow.native.tsx
|
|
276
|
+
*/
|
|
277
|
+
export type ActionSheetRowGroupProps = {
|
|
278
|
+
children?: TableRowGroupProps['children'];
|
|
279
|
+
hasIcons?: TableRowGroupProps['hasIcons'];
|
|
280
|
+
title?: TableRowGroupProps['title'];
|
|
281
|
+
};
|
|
282
|
+
export type ActionSheetRowIconComponent = React$1.ComponentType<ActionSheetRowIconProps>;
|
|
283
|
+
/**
|
|
284
|
+
* Props of `ActionSheetRowIcon` (function). Exports: none.
|
|
285
|
+
* @see design/components/Sheet/native/ActionSheetRow.native.tsx
|
|
286
|
+
*/
|
|
287
|
+
export type ActionSheetRowIconProps = {
|
|
288
|
+
IconComponent?: unknown;
|
|
289
|
+
source?: TableRowIconProps['source'];
|
|
290
|
+
};
|
|
291
|
+
/**
|
|
292
|
+
* Props of `ActionSheetRow` (function). Exports: ActionSheetRow.
|
|
293
|
+
* @see design/components/Sheet/native/ActionSheetRow.native.tsx
|
|
294
|
+
*/
|
|
295
|
+
export type ActionSheetRowProps = Omit<TableRowProps, 'arrow' | 'icon' | 'label' | 'variant'> & {
|
|
296
|
+
arrow?: TableRowProps['arrow'];
|
|
297
|
+
icon?: TableRowProps['icon'];
|
|
298
|
+
label?: TableRowProps['label'];
|
|
299
|
+
/** @default 'default' */
|
|
300
|
+
variant?: TableRowProps['variant'];
|
|
301
|
+
};
|
|
302
|
+
export type ActionSheetRowStatics = {
|
|
303
|
+
Icon: ActionSheetRowIconComponent;
|
|
304
|
+
Group: ActionSheetRowGroupComponent;
|
|
305
|
+
};
|
|
306
|
+
export type ActionSheetSwitchRowComponent = React$1.ComponentType<
|
|
307
|
+
ActionSheetSwitchRowProps & Record<string, unknown>
|
|
308
|
+
>;
|
|
309
|
+
/**
|
|
310
|
+
* Props of `ActionSheetSwitchRow` (function). Exports: ActionSheetSwitchRow.
|
|
311
|
+
* @see design/components/Sheet/native/ActionSheetRow.native.tsx
|
|
312
|
+
*/
|
|
313
|
+
export type ActionSheetSwitchRowProps = TableSwitchRowProps;
|
|
49
314
|
/** A loaded addon entity: its runtime state, instance, source bundle, and {@link AddonManifest}. */
|
|
50
315
|
export type Addon = {
|
|
51
316
|
started: boolean;
|
|
@@ -81,8 +346,23 @@ export type AddonManifest = {
|
|
|
81
346
|
folder: string;
|
|
82
347
|
path: string;
|
|
83
348
|
url: string;
|
|
349
|
+
platforms?: NativePluginPlatform[];
|
|
84
350
|
capabilities?: NativePluginCapability[];
|
|
351
|
+
platformCapabilities?: Partial<Record<NativePluginPlatform, NativePluginCapability[]>>;
|
|
85
352
|
minNativePluginApi?: string;
|
|
353
|
+
/** The Ed25519 signature the Unbound team's publish pipeline puts on first-party plugins. */
|
|
354
|
+
signature?: {
|
|
355
|
+
version: 1;
|
|
356
|
+
ed25519: string;
|
|
357
|
+
};
|
|
358
|
+
/** Marks a plugin other plugins build on, which the plugin list hides by default. */
|
|
359
|
+
library?: boolean;
|
|
360
|
+
/** The addons this one needs, by id, each with the semver range it accepts, such as `^1.2.0`. */
|
|
361
|
+
dependencies?: Record<string, string>;
|
|
362
|
+
/** The SHA-512 of each bundle compiled to Hermes bytecode, by bytecode version; covered by `signature`. */
|
|
363
|
+
bytecode?: Record<string, string>;
|
|
364
|
+
/** Set by the loader and installer: whether the bundle carries a valid Unbound signature. */
|
|
365
|
+
trust?: AddonTrust;
|
|
86
366
|
/** Requirements on the Unbound client running the addon. */
|
|
87
367
|
unbound?: {
|
|
88
368
|
/** The minimum Unbound client version (semver) the addon supports. */
|
|
@@ -91,228 +371,1628 @@ export type AddonManifest = {
|
|
|
91
371
|
};
|
|
92
372
|
/** An addon referenced either by its id string or the {@link Addon} entity itself. */
|
|
93
373
|
export type AddonResolveable = string | Addon;
|
|
374
|
+
/** Whether an addon's bundle carries a valid Unbound signature. */
|
|
375
|
+
export type AddonTrust = 'signed' | 'unsigned';
|
|
94
376
|
export type AddonType = (typeof ADDON_TYPES)[number];
|
|
95
|
-
export type
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
377
|
+
export type AlertActionButtonComponent = React$1.ComponentType<
|
|
378
|
+
AlertActionButtonProps & Record<string, unknown>
|
|
379
|
+
>;
|
|
380
|
+
/**
|
|
381
|
+
* Props of `AlertActionButton` (function). Exports: AlertActionButton.
|
|
382
|
+
* @see design/components/AlertModal/native/AlertModal.native.tsx
|
|
383
|
+
*/
|
|
384
|
+
export type AlertActionButtonProps = Omit<BaseTextButtonProps, 'loading' | 'onPress'> & {
|
|
385
|
+
loading?: BaseTextButtonProps['loading'];
|
|
386
|
+
onPress?: (...args: any[]) => unknown;
|
|
387
|
+
};
|
|
388
|
+
/**
|
|
389
|
+
* Props of `AlertActions` (function). Exports: AlertActions.
|
|
390
|
+
* @see design/components/AlertModal/native/AlertModal.native.tsx
|
|
391
|
+
*/
|
|
392
|
+
export type AlertActionsProps = {
|
|
393
|
+
children?: StackProps['children'];
|
|
101
394
|
};
|
|
395
|
+
export type AlertModalComponent = React$1.ComponentType<AlertModalProps>;
|
|
396
|
+
export type AlertModalContainerComponent = React$1.ComponentType<AlertModalContainerProps>;
|
|
397
|
+
/**
|
|
398
|
+
* Props of `AlertModalContainer` (memo). Exports: AlertModalContainer.
|
|
399
|
+
* @see design/components/AlertModal/native/AlertModal.native.tsx
|
|
400
|
+
*/
|
|
401
|
+
export type AlertModalContainerProps = {};
|
|
402
|
+
/**
|
|
403
|
+
* Props of `AlertModal` (function). Exports: AlertModal.
|
|
404
|
+
* @see design/components/AlertModal/native/AlertModal.native.tsx
|
|
405
|
+
*/
|
|
102
406
|
export type AlertModalProps = {
|
|
103
|
-
|
|
104
|
-
content?:
|
|
105
|
-
extraContent?:
|
|
106
|
-
|
|
407
|
+
actions?: AlertActionsProps['children'];
|
|
408
|
+
content?: DesignTextProps['children'];
|
|
409
|
+
extraContent?: StackProps['children'];
|
|
410
|
+
header?: StackProps['children'];
|
|
411
|
+
title?: DesignTextProps['children'];
|
|
107
412
|
};
|
|
108
413
|
/** The native module used to register and resolve {@link DiscordAsset}s by id. */
|
|
109
414
|
export type AssetsModule = {
|
|
110
415
|
registerAsset: (asset: DiscordAsset) => number;
|
|
111
416
|
getAssetByID: (id: number) => DiscordAsset | null;
|
|
112
417
|
};
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
418
|
+
export type AvatarDuoPileComponent = React$1.ComponentType<
|
|
419
|
+
AvatarDuoPileProps & Record<string, unknown>
|
|
420
|
+
>;
|
|
421
|
+
/**
|
|
422
|
+
* Props of `AvatarDuoPile` (function). Exports: AvatarDuoPile.
|
|
423
|
+
* @see design/components/Pile/native/AvatarDuoPile.native.tsx
|
|
424
|
+
*/
|
|
425
|
+
export type AvatarDuoPileProps = {
|
|
426
|
+
'aria-label'?: PileProps['aria-label'];
|
|
427
|
+
children?: PileProps['children'];
|
|
428
|
+
names?: {
|
|
429
|
+
length?: unknown;
|
|
430
|
+
};
|
|
431
|
+
size: {
|
|
432
|
+
map?: unknown;
|
|
433
|
+
};
|
|
116
434
|
};
|
|
117
|
-
export type
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
435
|
+
export type AvatarPileComponent = React$1.ComponentType<AvatarPileProps>;
|
|
436
|
+
/**
|
|
437
|
+
* Props of `AvatarPile` (function). Exports: AvatarPile.
|
|
438
|
+
* @see design/components/Pile/native/AvatarPile.native.tsx
|
|
439
|
+
*/
|
|
440
|
+
export type AvatarPileProps = {
|
|
441
|
+
children?: PileProps['children'];
|
|
442
|
+
names?: {
|
|
443
|
+
length?: unknown;
|
|
444
|
+
};
|
|
445
|
+
size?: unknown;
|
|
446
|
+
totalCount?: number;
|
|
447
|
+
};
|
|
448
|
+
export type BackdropComponent = React$1.ComponentType<BackdropProps>;
|
|
449
|
+
/**
|
|
450
|
+
* Props of `Backdrop` (function). Exports: Backdrop.
|
|
451
|
+
* @see design/components/Backdrop/native/Backdrop.native.tsx
|
|
452
|
+
*/
|
|
453
|
+
export type BackdropProps = {
|
|
454
|
+
accessibilityLabel?: unknown;
|
|
455
|
+
accessibleDismissStyle?: React$1.ComponentProps<typeof RN.Pressable>['style'];
|
|
456
|
+
animatedProps?: unknown;
|
|
457
|
+
'aria-hidden'?: React$1.ComponentProps<typeof RN.Pressable>['aria-hidden'];
|
|
458
|
+
/** @default 'none' */
|
|
459
|
+
blur?: 'none' | 'strong' | 'subtle' | (string & {});
|
|
460
|
+
onDismiss?: React$1.ComponentProps<typeof RN.Pressable>['onPress'];
|
|
461
|
+
/** @default false */
|
|
462
|
+
opaque?: boolean;
|
|
463
|
+
style?: RN.StyleProp<RN.ViewStyle | RN.TextStyle | RN.ImageStyle>;
|
|
464
|
+
};
|
|
465
|
+
/**
|
|
466
|
+
* Props of `BackgroundBlurFill` (function). Exports: BackgroundBlurFill.
|
|
467
|
+
* @see design/components/experimental/BackgroundBlurView/native/BackgroundBlurFill.native.tsx
|
|
468
|
+
*/
|
|
469
|
+
export type BackgroundBlurFillProps = {
|
|
470
|
+
android_blurTargetViewNativeId?: VisualEffectViewProps['android_blurTargetViewNativeId'];
|
|
471
|
+
android_fallbackColor?: unknown;
|
|
472
|
+
blurAmount?: VisualEffectViewProps['blurAmount'];
|
|
473
|
+
blurStyle?: 'default' | (string & {});
|
|
474
|
+
blurTheme?: unknown;
|
|
475
|
+
style?: VisualEffectViewProps['style'];
|
|
476
|
+
tintColor?: unknown;
|
|
477
|
+
};
|
|
478
|
+
/**
|
|
479
|
+
* Props of `BackgroundBlurFillWithPress` (function). Exports: BackgroundBlurFillWithPress.
|
|
480
|
+
* @see design/components/experimental/BackgroundBlurView/native/BackgroundBlurFill.native.tsx
|
|
481
|
+
*/
|
|
482
|
+
export type BackgroundBlurFillWithPressProps = {
|
|
483
|
+
blurTheme?: unknown;
|
|
484
|
+
pressed: {
|
|
485
|
+
get?: unknown;
|
|
486
|
+
};
|
|
487
|
+
style?: RN.StyleProp<RN.ViewStyle | RN.TextStyle | RN.ImageStyle>;
|
|
488
|
+
};
|
|
489
|
+
export type BackgroundBlurViewComponentComponent = React$1.ComponentType<
|
|
490
|
+
BackgroundBlurViewComponentProps & Record<string, unknown>
|
|
491
|
+
>;
|
|
492
|
+
/**
|
|
493
|
+
* Props of `BackgroundBlurViewComponent` (function). Exports: BackgroundBlurView.
|
|
494
|
+
* @see design/components/experimental/BackgroundBlurView/native/BackgroundBlurView.native.tsx
|
|
495
|
+
*/
|
|
496
|
+
export type BackgroundBlurViewComponentProps = Omit<
|
|
497
|
+
React$1.ComponentProps<typeof RN.View>,
|
|
498
|
+
'android_blurTargetViewNativeId' | 'blurTheme' | 'children' | 'pressed' | 'ref' | 'style'
|
|
499
|
+
> & {
|
|
500
|
+
android_blurTargetViewNativeId?: BackgroundBlurFillProps['android_blurTargetViewNativeId'];
|
|
501
|
+
blurTheme?: 'dark' | (string & {});
|
|
502
|
+
children?: React$1.ComponentProps<typeof RN.View>['children'];
|
|
503
|
+
pressed?: BackgroundBlurFillWithPressProps['pressed'];
|
|
504
|
+
ref?: React$1.Ref<any>;
|
|
505
|
+
style?: React$1.ComponentProps<typeof RN.View>['style'];
|
|
506
|
+
};
|
|
507
|
+
/**
|
|
508
|
+
* Props of `BaseIconButton` (function). Exports: BaseIconButton.
|
|
509
|
+
* @see design/components/Button/native/BaseIconButton.native.tsx
|
|
510
|
+
*/
|
|
511
|
+
export type BaseIconButtonProps = Omit<
|
|
512
|
+
ButtonBaseButtonProps,
|
|
513
|
+
| 'icon'
|
|
514
|
+
| 'loading'
|
|
515
|
+
| 'maxFontSizeMultiplier'
|
|
516
|
+
| 'pillStyle'
|
|
517
|
+
| 'ref'
|
|
518
|
+
| 'scaleAmountInPx'
|
|
519
|
+
| 'size'
|
|
520
|
+
| 'style'
|
|
521
|
+
| 'variant'
|
|
522
|
+
> & {
|
|
523
|
+
icon?: React$1.ReactElement | VoidIconProps['source'];
|
|
524
|
+
loading?: ButtonPillProps['loading'];
|
|
525
|
+
maxFontSizeMultiplier?: unknown;
|
|
526
|
+
pillStyle?: ButtonPillProps['style'];
|
|
527
|
+
ref?: ButtonBaseButtonProps['ref'];
|
|
528
|
+
/** @default 4 */
|
|
529
|
+
scaleAmountInPx?: number;
|
|
530
|
+
size?: 'lg' | 'sm' | (string & {});
|
|
531
|
+
style?: ButtonBaseButtonProps['style'];
|
|
532
|
+
/** @default 'primary' */
|
|
533
|
+
variant?: ButtonPillProps['variant'];
|
|
534
|
+
};
|
|
535
|
+
/**
|
|
536
|
+
* Props of `BaseNavigationContainer` (forwardRef). Exports: BaseNavigationContainer.
|
|
537
|
+
* @see module 4784 (no source path)
|
|
538
|
+
*/
|
|
539
|
+
export type BaseNavigationContainerProps = {
|
|
540
|
+
children?: ThemeProviderProps['children'];
|
|
541
|
+
initialState?: {
|
|
542
|
+
key?: unknown;
|
|
543
|
+
routeNames?: unknown;
|
|
544
|
+
routes?: unknown;
|
|
545
|
+
};
|
|
546
|
+
/** @default false */
|
|
547
|
+
navigationInChildEnabled?: boolean;
|
|
548
|
+
onReady?: (...args: any[]) => unknown;
|
|
549
|
+
onStateChange?: (...args: any[]) => unknown;
|
|
550
|
+
onUnhandledAction?: (...args: any[]) => unknown;
|
|
551
|
+
theme?: unknown;
|
|
552
|
+
};
|
|
553
|
+
export type BaseTextButtonComponent = React$1.ComponentType<BaseTextButtonProps> &
|
|
554
|
+
BaseTextButtonStatics;
|
|
555
|
+
/**
|
|
556
|
+
* Props of `BaseTextButtonIcon` (function). Exports: none.
|
|
557
|
+
* @see design/components/Button/native/BaseTextButton.native.tsx
|
|
558
|
+
*/
|
|
559
|
+
export type BaseTextButtonIconProps = {
|
|
560
|
+
icon?: VoidIconProps['source'];
|
|
561
|
+
iconOpticalOffsetMargin?: unknown;
|
|
562
|
+
iconPosition?: unknown;
|
|
563
|
+
size?: 'lg' | 'sm' | (string & {});
|
|
564
|
+
style?: VoidIconProps['style'];
|
|
565
|
+
};
|
|
566
|
+
/**
|
|
567
|
+
* Props of `BaseTextButton` (function). Exports: BaseTextButton.
|
|
568
|
+
* @see design/components/Button/native/BaseTextButton.native.tsx
|
|
569
|
+
*/
|
|
570
|
+
export type BaseTextButtonProps = Omit<
|
|
571
|
+
ButtonBaseButtonProps,
|
|
572
|
+
| 'accessibilityLabel'
|
|
573
|
+
| 'accessibilityRole'
|
|
574
|
+
| 'collapseText'
|
|
575
|
+
| 'grow'
|
|
576
|
+
| 'icon'
|
|
577
|
+
| 'iconOpticalOffsetMargin'
|
|
578
|
+
| 'iconPosition'
|
|
579
|
+
| 'loading'
|
|
580
|
+
| 'maxFontSizeMultiplier'
|
|
581
|
+
| 'onLayout'
|
|
582
|
+
| 'onPressIn'
|
|
583
|
+
| 'onPressOut'
|
|
584
|
+
| 'pillStyle'
|
|
585
|
+
| 'pointerEvents'
|
|
586
|
+
| 'ref'
|
|
587
|
+
| 'shiny'
|
|
588
|
+
| 'shrink'
|
|
589
|
+
| 'size'
|
|
590
|
+
| 'style'
|
|
591
|
+
| 'text'
|
|
592
|
+
| 'textElement'
|
|
593
|
+
| 'textVariant'
|
|
594
|
+
| 'variant'
|
|
595
|
+
> & {
|
|
596
|
+
accessibilityLabel?: ButtonBaseButtonProps['accessibilityLabel'];
|
|
597
|
+
/** @default 'button' */
|
|
598
|
+
accessibilityRole?: ButtonBaseButtonProps['accessibilityRole'];
|
|
599
|
+
collapseText?: CollapsingTextProps['collapseText'];
|
|
600
|
+
/** @default false */
|
|
126
601
|
grow?: boolean;
|
|
127
|
-
|
|
602
|
+
icon?: React$1.ReactElement | BaseTextButtonIconProps['icon'];
|
|
603
|
+
/** @default 0 */
|
|
604
|
+
iconOpticalOffsetMargin?: number;
|
|
605
|
+
/** @default 'start' */
|
|
606
|
+
iconPosition?: 'end' | 'start' | (string & {});
|
|
607
|
+
loading?: ButtonPillProps['loading'];
|
|
608
|
+
maxFontSizeMultiplier?: number | string;
|
|
609
|
+
onLayout?: (...args: any[]) => unknown;
|
|
610
|
+
onPressIn?: (...args: any[]) => unknown;
|
|
611
|
+
onPressOut?: (...args: any[]) => unknown;
|
|
612
|
+
pillStyle?: ButtonPillProps['style'];
|
|
613
|
+
pointerEvents?: ButtonBaseButtonProps['pointerEvents'];
|
|
614
|
+
ref?: ButtonBaseButtonProps['ref'];
|
|
615
|
+
/** @default false */
|
|
128
616
|
shiny?: boolean;
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
};
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
617
|
+
/** @default false */
|
|
618
|
+
shrink?: boolean;
|
|
619
|
+
size?: 'lg' | 'md' | 'sm' | (string & {});
|
|
620
|
+
style?: ButtonBaseButtonProps['style'];
|
|
621
|
+
text?: React$1.ComponentProps<typeof RN.Text>['children'];
|
|
622
|
+
textElement?: unknown;
|
|
623
|
+
textVariant?: 'heading-md/bold' | 'text-md/semibold' | (string & {});
|
|
624
|
+
/** @default 'primary' */
|
|
625
|
+
variant?:
|
|
626
|
+
| 'active'
|
|
627
|
+
| 'critical-primary'
|
|
628
|
+
| 'critical-secondary'
|
|
629
|
+
| 'destructive'
|
|
630
|
+
| 'experimental_premium-basic'
|
|
631
|
+
| 'experimental_premium-primary'
|
|
632
|
+
| 'experimental_premium-secondary'
|
|
633
|
+
| 'expressive'
|
|
634
|
+
| 'primary'
|
|
635
|
+
| 'primary-overlay'
|
|
636
|
+
| 'secondary'
|
|
637
|
+
| 'secondary-overlay'
|
|
638
|
+
| 'tertiary'
|
|
639
|
+
| 'toggle-on'
|
|
640
|
+
| (string & {});
|
|
641
|
+
};
|
|
642
|
+
export type BaseTextButtonStatics = {
|
|
643
|
+
Icon: TextButtonIconComponent;
|
|
644
|
+
};
|
|
645
|
+
/**
|
|
646
|
+
* Props of `BaseTextField` (function). Exports: BaseTextField.
|
|
647
|
+
* @see design/components/TextField/native/BaseTextField.native.tsx
|
|
648
|
+
*/
|
|
649
|
+
export type BaseTextFieldProps = Omit<
|
|
650
|
+
InputTextInputProps,
|
|
651
|
+
| 'autoComplete'
|
|
652
|
+
| 'defaultValue'
|
|
653
|
+
| 'enableAndroidSanitizedInputWorkaround'
|
|
654
|
+
| 'inputStyle'
|
|
655
|
+
| 'keyboardType'
|
|
656
|
+
| 'leading'
|
|
657
|
+
| 'leadingIcon'
|
|
658
|
+
| 'onChangeText'
|
|
659
|
+
| 'ref'
|
|
660
|
+
| 'round'
|
|
661
|
+
| 'secureTextEntry'
|
|
662
|
+
| 'size'
|
|
663
|
+
| 'trailing'
|
|
664
|
+
| 'value'
|
|
665
|
+
> & {
|
|
666
|
+
autoComplete?: InputTextInputProps['autoComplete'];
|
|
667
|
+
defaultValue?: {
|
|
668
|
+
replace?: unknown;
|
|
669
|
+
};
|
|
670
|
+
enableAndroidSanitizedInputWorkaround?: boolean;
|
|
671
|
+
inputStyle?: InputTextInputProps['style'];
|
|
672
|
+
/** @default 'default' */
|
|
673
|
+
keyboardType?: 'default' | (string & {});
|
|
674
|
+
leading?: InputFieldContainerProps['children'];
|
|
675
|
+
leadingIcon?: unknown;
|
|
676
|
+
onChangeText?: (...args: any[]) => unknown;
|
|
677
|
+
ref?: React$1.Ref<any>;
|
|
678
|
+
round?: unknown;
|
|
679
|
+
/** @default false */
|
|
680
|
+
secureTextEntry?: boolean;
|
|
681
|
+
size?: unknown;
|
|
682
|
+
trailing?: InputFieldContainerProps['children'];
|
|
683
|
+
value?: {
|
|
684
|
+
replace?: unknown;
|
|
685
|
+
};
|
|
686
|
+
};
|
|
687
|
+
/**
|
|
688
|
+
* Props of `BottomSheetBackdropComponent` (memo). Exports: BottomSheetBackdrop.
|
|
689
|
+
* @see design/components/Sheet/native/BottomSheetBackdrop.native.tsx
|
|
690
|
+
*/
|
|
691
|
+
export type BottomSheetBackdropComponentProps = {
|
|
692
|
+
animatedIndex: {
|
|
693
|
+
get?: unknown;
|
|
694
|
+
};
|
|
695
|
+
/** @default 0 */
|
|
696
|
+
appearsOnIndex?: number;
|
|
697
|
+
disappearsOnIndex?: unknown;
|
|
698
|
+
onPress?: (...args: any[]) => unknown;
|
|
699
|
+
/** @default 1 */
|
|
700
|
+
opacity?: number;
|
|
701
|
+
/** @default 'close' */
|
|
702
|
+
pressBehavior?: 'close' | 'collapse' | 'none' | (string & {});
|
|
703
|
+
style?: BackdropProps['style'];
|
|
704
|
+
};
|
|
705
|
+
export type BottomSheetTextInputComponent = React$1.ComponentType<
|
|
706
|
+
BottomSheetTextInputProps & Record<string, unknown>
|
|
707
|
+
>;
|
|
708
|
+
/**
|
|
709
|
+
* Props of `BottomSheetTextInput` (function). Exports: BottomSheetTextInput.
|
|
710
|
+
* @see design/components/Sheet/native/BottomSheetTextInput.native.tsx
|
|
711
|
+
*/
|
|
712
|
+
export type BottomSheetTextInputProps = Omit<VoidTextInputProps, 'onBlur' | 'onFocus' | 'ref'> & {
|
|
713
|
+
onBlur?: (...args: any[]) => unknown;
|
|
714
|
+
onFocus?: (...args: any[]) => unknown;
|
|
715
|
+
ref?: React$1.Ref<any>;
|
|
716
|
+
};
|
|
717
|
+
export type BottomSheetTitleHeaderComponent = React$1.ComponentType<BottomSheetTitleHeaderProps>;
|
|
718
|
+
/**
|
|
719
|
+
* Props of `BottomSheetTitleHeader` (function). Exports: BottomSheetTitleHeader.
|
|
720
|
+
* @see design/components/Sheet/native/BottomSheetTitleHeader.native.tsx
|
|
721
|
+
*/
|
|
722
|
+
export type BottomSheetTitleHeaderProps = Omit<
|
|
723
|
+
RedesignBottomSheetTitleHeaderBaseProps,
|
|
724
|
+
'leading' | 'trailing'
|
|
725
|
+
> & {
|
|
726
|
+
leading?: unknown;
|
|
727
|
+
trailing?: unknown;
|
|
728
|
+
};
|
|
729
|
+
/**
|
|
730
|
+
* Props of `BaseButton` (function). Exports: BaseButton.
|
|
731
|
+
* @see design/components/Button/native/BaseButton.native.tsx
|
|
732
|
+
*/
|
|
733
|
+
export type ButtonBaseButtonProps = {
|
|
734
|
+
accessibilityActions?: React$1.ComponentProps<typeof RN.Pressable>['accessibilityActions'];
|
|
735
|
+
accessibilityElementsHidden?: React$1.ComponentProps<
|
|
736
|
+
typeof RN.TouchableOpacity
|
|
737
|
+
>['accessibilityElementsHidden'];
|
|
738
|
+
accessibilityHint?: React$1.ComponentProps<typeof RN.Pressable>['accessibilityHint'];
|
|
739
|
+
accessibilityLabel?: React$1.ComponentProps<typeof RN.Pressable>['accessibilityLabel'];
|
|
740
|
+
/** @default 'button' */
|
|
741
|
+
accessibilityRole?: React$1.ComponentProps<typeof RN.Pressable>['accessibilityRole'];
|
|
742
|
+
accessibilityState?: unknown;
|
|
743
|
+
accessibilityValue?: React$1.ComponentProps<typeof RN.Pressable>['accessibilityValue'];
|
|
744
|
+
accessible?: React$1.ComponentProps<typeof RN.Pressable>['accessible'];
|
|
745
|
+
children?: React$1.ReactNode;
|
|
746
|
+
/** @default false */
|
|
747
|
+
disabled?: boolean;
|
|
748
|
+
hitSlop?: React$1.ComponentProps<typeof RN.TouchableOpacity>['hitSlop'];
|
|
749
|
+
importantForAccessibility?: React$1.ComponentProps<
|
|
750
|
+
typeof RN.TouchableOpacity
|
|
751
|
+
>['importantForAccessibility'];
|
|
752
|
+
/** @default false */
|
|
753
|
+
loading?: boolean;
|
|
754
|
+
onAccessibilityAction?: React$1.ComponentProps<typeof RN.Pressable>['onAccessibilityAction'];
|
|
755
|
+
onLayout?: (...args: any[]) => unknown;
|
|
756
|
+
onLongPress?: React$1.ComponentProps<typeof RN.Pressable>['onLongPress'];
|
|
757
|
+
onPress?: (...args: any[]) => unknown;
|
|
758
|
+
onPressDisabled?: React$1.ComponentProps<typeof RN.TouchableOpacity>['onPress'];
|
|
759
|
+
onPressIn?: (...args: any[]) => unknown;
|
|
760
|
+
onPressOut?: (...args: any[]) => unknown;
|
|
761
|
+
pointerEvents?: React$1.ComponentProps<typeof RN.Pressable>['pointerEvents'];
|
|
762
|
+
pressed?: unknown;
|
|
763
|
+
ref?: React$1.ComponentProps<typeof RN.TouchableOpacity>['ref'];
|
|
764
|
+
scaleAmountInPx?: unknown;
|
|
765
|
+
style?: React$1.ComponentProps<typeof RN.TouchableOpacity>['style'];
|
|
766
|
+
/** @default 'primary' */
|
|
767
|
+
variant?: 'none' | 'primary' | 'primary-overlay' | 'secondary-overlay' | (string & {});
|
|
768
|
+
};
|
|
769
|
+
export type ButtonEllipsisComponent = React$1.ComponentType<ButtonEllipsisProps>;
|
|
770
|
+
/**
|
|
771
|
+
* Props of `Ellipsis` (function). Exports: Ellipsis.
|
|
772
|
+
* @see design/components/Button/native/ButtonEllipsis.native.tsx
|
|
773
|
+
*/
|
|
774
|
+
export type ButtonEllipsisProps = EllipsisCircleProps;
|
|
775
|
+
export type ButtonGroupComponent = React$1.ComponentType<
|
|
776
|
+
ButtonGroupProps & Record<string, unknown>
|
|
777
|
+
>;
|
|
778
|
+
/**
|
|
779
|
+
* Props of `ButtonGroup` (function). Exports: ButtonGroup.
|
|
780
|
+
* @see design/components/ButtonGroup/native/ButtonGroup.native.tsx
|
|
781
|
+
*/
|
|
782
|
+
export type ButtonGroupProps = Omit<StackProps, 'children' | 'size' | 'style'> & {
|
|
783
|
+
children?: StackProps['children'];
|
|
784
|
+
/** @default 'md' */
|
|
785
|
+
size?: 'lg' | 'md' | 'sm' | (string & {});
|
|
786
|
+
style?: StackProps['style'];
|
|
787
|
+
};
|
|
788
|
+
export type ButtonIconButtonComponent = React$1.ComponentType<
|
|
789
|
+
ButtonIconButtonProps & Record<string, unknown>
|
|
790
|
+
>;
|
|
791
|
+
/**
|
|
792
|
+
* Props of `IconButton` (function). Exports: IconButton.
|
|
793
|
+
* @see design/components/Button/native/IconButton.native.tsx
|
|
794
|
+
*/
|
|
795
|
+
export type ButtonIconButtonProps = Omit<
|
|
796
|
+
BaseIconButtonProps,
|
|
797
|
+
'accessibilityHint' | 'accessibilityLabel' | 'grow' | 'label' | 'maxFontSizeMultiplier' | 'ref'
|
|
798
|
+
> & {
|
|
799
|
+
accessibilityHint?: BaseIconButtonProps['accessibilityHint'];
|
|
800
|
+
accessibilityLabel?: BaseIconButtonProps['accessibilityLabel'];
|
|
801
|
+
grow?: boolean;
|
|
802
|
+
label?: DesignTextProps['children'];
|
|
803
|
+
maxFontSizeMultiplier?: number | string;
|
|
804
|
+
ref?: BaseIconButtonProps['ref'];
|
|
805
|
+
};
|
|
806
|
+
/**
|
|
807
|
+
* Props of `ButtonPill` (function). Exports: ButtonPill.
|
|
808
|
+
* @see design/components/Button/native/ButtonPill.native.tsx
|
|
809
|
+
*/
|
|
810
|
+
export type ButtonPillProps = Omit<LoadingButtonPillProps, 'loading'> & {
|
|
811
|
+
loading?: boolean;
|
|
812
|
+
};
|
|
813
|
+
/**
|
|
814
|
+
* Props of `ButtonShine` (function). Exports: ButtonShine.
|
|
815
|
+
* @see design/components/Button/native/ButtonShine.native.tsx
|
|
816
|
+
*/
|
|
817
|
+
export type ButtonShineProps = {
|
|
818
|
+
variant?: 'primary' | 'secondary' | 'tertiary' | (string & {});
|
|
819
|
+
};
|
|
820
|
+
export type CameraLottieComponent = React$1.ComponentType<
|
|
821
|
+
CameraLottieProps & Record<string, unknown>
|
|
822
|
+
>;
|
|
823
|
+
/**
|
|
824
|
+
* Props of `CameraLottie` (function). Exports: CameraLottie.
|
|
825
|
+
* @see design/components/LottieIcon/native/generated/CameraLottie.tsx
|
|
826
|
+
*/
|
|
827
|
+
export type CameraLottieProps = Omit<LottieIconProps, 'ref'> & {
|
|
828
|
+
ref?: LottieIconProps['ref'];
|
|
829
|
+
};
|
|
830
|
+
export type CoachmarkComponent = React$1.ComponentType<CoachmarkProps>;
|
|
831
|
+
/**
|
|
832
|
+
* Props of `Coachmark` (function). Exports: Coachmark.
|
|
833
|
+
* @see design/components/Coachmark/native/Coachmark.native.tsx
|
|
834
|
+
*/
|
|
835
|
+
export type CoachmarkProps = {
|
|
836
|
+
buttonIcon?: BaseTextButtonProps['icon'];
|
|
837
|
+
buttonLabel?: BaseTextButtonProps['text'];
|
|
838
|
+
buttonShiny?: unknown;
|
|
839
|
+
/** @default 'secondary' */
|
|
840
|
+
buttonVariant?: 'secondary' | (string & {});
|
|
841
|
+
description?: DesignTextProps['children'];
|
|
842
|
+
enterExitAnimatedStyles?: unknown;
|
|
843
|
+
experimental_withBlurBackground?: unknown;
|
|
844
|
+
gradientColor?: ExpressiveGradientProps['color'];
|
|
845
|
+
graphic?: {
|
|
846
|
+
aspectRatio?: unknown;
|
|
847
|
+
};
|
|
848
|
+
imgSource?: React$1.ComponentProps<typeof RN.Image>['source'];
|
|
849
|
+
/** @default 0 */
|
|
850
|
+
offsetY?: number;
|
|
851
|
+
onButtonPress?: BaseTextButtonProps['onPress'];
|
|
852
|
+
onDismiss?: React$1.ComponentProps<typeof RN.Pressable>['onPress'];
|
|
853
|
+
position?: 'bottom' | 'top' | (string & {});
|
|
854
|
+
renderImgComponent?: (...args: any[]) => unknown;
|
|
855
|
+
surfaceMeasurements?: unknown;
|
|
856
|
+
targetMeasurements?: unknown;
|
|
857
|
+
title?: DesignTextProps['children'];
|
|
858
|
+
};
|
|
859
|
+
/**
|
|
860
|
+
* Props of `CollapsingText` (function). Exports: none.
|
|
861
|
+
* @see design/components/Button/native/BaseTextButton.native.tsx
|
|
862
|
+
*/
|
|
863
|
+
export type CollapsingTextProps = {
|
|
864
|
+
children?: React$1.ReactNode;
|
|
865
|
+
collapseText?: {
|
|
866
|
+
get?: unknown;
|
|
867
|
+
};
|
|
868
|
+
};
|
|
869
|
+
export type ContextMenuComponent = React$1.ComponentType<ContextMenuProps>;
|
|
870
|
+
export type ContextMenuContainerComponent = React$1.ComponentType<ContextMenuContainerProps>;
|
|
871
|
+
/**
|
|
872
|
+
* Props of `ContextMenuContainer` (function). Exports: ContextMenuContainer.
|
|
873
|
+
* @see design/components/ContextMenu/native/ContextMenuContainer.native.tsx
|
|
874
|
+
*/
|
|
875
|
+
export type ContextMenuContainerProps = {};
|
|
876
|
+
/**
|
|
877
|
+
* Props of `ContextMenu` (function). Exports: ContextMenu.
|
|
878
|
+
* @see design/components/ContextMenu/native/ContextMenu.native.tsx
|
|
879
|
+
*/
|
|
880
|
+
export type ContextMenuProps = {
|
|
881
|
+
/** @default 'auto' */
|
|
882
|
+
align?: 'above' | 'auto' | 'below' | 'left' | (string & {});
|
|
883
|
+
buttonRef?: {
|
|
884
|
+
observe?: unknown;
|
|
885
|
+
};
|
|
886
|
+
children: (...args: any[]) => unknown;
|
|
887
|
+
/** @default false */
|
|
888
|
+
disableGesture?: boolean;
|
|
889
|
+
/** @default true */
|
|
890
|
+
enabled?: boolean;
|
|
891
|
+
/** @default false */
|
|
892
|
+
ignoreKeyboardHide?: boolean;
|
|
893
|
+
items: {
|
|
894
|
+
flat?: unknown;
|
|
895
|
+
forEach?: unknown;
|
|
896
|
+
};
|
|
897
|
+
keyboardShouldPersistTaps?: 'handled' | (string & {});
|
|
898
|
+
onClose?: (...args: any[]) => unknown;
|
|
899
|
+
onOpen?: (...args: any[]) => unknown;
|
|
900
|
+
returnRef?: unknown;
|
|
901
|
+
title?: string;
|
|
902
|
+
/** @default false */
|
|
903
|
+
triggerOnLongPress?: boolean;
|
|
904
|
+
/** @default false */
|
|
905
|
+
triggerOnTap?: boolean;
|
|
906
|
+
};
|
|
907
|
+
/**
|
|
908
|
+
* The style factory: turns a spec (or a function returning one) into a theme-aware hook, so call it
|
|
909
|
+
* inside a component body: `const styles = useStyles();`.
|
|
910
|
+
*/
|
|
911
|
+
export type CreateStyles = <T extends StyleSheetSpec>(
|
|
912
|
+
styles: StyleSheetSpecOrFactory<T>,
|
|
913
|
+
) => () => ResolvedStyles<T>;
|
|
914
|
+
export type DesignActivityIndicatorComponent = React$1.ComponentType<
|
|
915
|
+
DesignActivityIndicatorProps & Record<string, unknown>
|
|
916
|
+
>;
|
|
917
|
+
/**
|
|
918
|
+
* Props of `ActivityIndicator` (function). Exports: ActivityIndicator.
|
|
919
|
+
* @see design/components/ActivityIndicator/native/ActivityIndicator.native.tsx
|
|
920
|
+
*/
|
|
921
|
+
export type DesignActivityIndicatorProps = Omit<
|
|
922
|
+
React$1.ComponentProps<typeof RN.ActivityIndicator>,
|
|
923
|
+
'animating' | 'color' | 'size'
|
|
924
|
+
> & {
|
|
925
|
+
/** @default true */
|
|
926
|
+
animating?: React$1.ComponentProps<typeof RN.ActivityIndicator>['animating'];
|
|
927
|
+
color?: React$1.ComponentProps<typeof RN.ActivityIndicator>['color'];
|
|
928
|
+
/** @default 'large' */
|
|
929
|
+
size?: React$1.ComponentProps<typeof RN.ActivityIndicator>['size'];
|
|
930
|
+
};
|
|
931
|
+
/** Exported components of `design/native.tsx` in Discord discord-350. */
|
|
932
|
+
export type DesignBarrelComponents = {
|
|
933
|
+
AILoader: AILoaderComponent;
|
|
934
|
+
AIShimmer: AIShimmerComponent;
|
|
935
|
+
AccessibilityAnnouncerLiveRegion: AccessibilityAnnouncerLiveRegionComponent;
|
|
936
|
+
AccessibilityView: AccessibilityViewComponent;
|
|
937
|
+
AccessibilityViewAnimated: AccessibilityViewComponent;
|
|
938
|
+
ActionSheet: ActionSheetComponent;
|
|
939
|
+
ActionSheetCloseButton: ActionSheetCloseButtonComponent;
|
|
940
|
+
ActionSheetHeaderBar: ActionSheetHeaderBarComponent;
|
|
941
|
+
ActionSheetHeaderPressableText: ActionSheetHeaderPressableTextComponent;
|
|
942
|
+
ActionSheetIconHeader: ActionSheetIconHeaderComponent;
|
|
943
|
+
ActionSheetPresenter: ActionSheetPresenterComponent;
|
|
944
|
+
ActionSheetRow: ActionSheetRowComponent;
|
|
945
|
+
ActionSheetSwitchRow: ActionSheetSwitchRowComponent;
|
|
946
|
+
ActivityIndicator: DesignActivityIndicatorComponent;
|
|
947
|
+
AlertActionButton: AlertActionButtonComponent;
|
|
948
|
+
AlertModal: AlertModalComponent;
|
|
949
|
+
AlertModalContainer: AlertModalContainerComponent;
|
|
950
|
+
AvatarDuoPile: AvatarDuoPileComponent;
|
|
951
|
+
AvatarPile: AvatarPileComponent;
|
|
952
|
+
Backdrop: BackdropComponent;
|
|
953
|
+
BackgroundBlurView: BackgroundBlurViewComponentComponent;
|
|
954
|
+
BottomSheet: SheetBottomSheetComponent;
|
|
955
|
+
BottomSheetTextInput: BottomSheetTextInputComponent;
|
|
956
|
+
BottomSheetTitleHeader: BottomSheetTitleHeaderComponent;
|
|
957
|
+
Button: BaseTextButtonComponent;
|
|
958
|
+
ButtonGroup: ButtonGroupComponent;
|
|
959
|
+
CameraLottie: CameraLottieComponent;
|
|
960
|
+
Card: DesignCardComponent;
|
|
961
|
+
Checkbox: DesignCheckboxComponent;
|
|
962
|
+
Coachmark: CoachmarkComponent;
|
|
963
|
+
ContextMenu: ContextMenuComponent;
|
|
964
|
+
ContextMenuContainer: ContextMenuContainerComponent;
|
|
965
|
+
Dialog: DialogComponent;
|
|
966
|
+
DisableCustomTheme: DisableCustomThemeComponent;
|
|
967
|
+
Ellipsis: ButtonEllipsisComponent;
|
|
968
|
+
ExpressiveGradient: ExpressiveGradientComponent;
|
|
969
|
+
FauxHeader: FauxHeaderComponent;
|
|
970
|
+
FloatingActionButton: FloatingActionButtonComponent;
|
|
971
|
+
FormCheckbox: FormsFormCheckboxComponent;
|
|
972
|
+
FormRadio: FormsFormRadioComponent;
|
|
973
|
+
FormSwitch: FormsFormSwitchComponent;
|
|
974
|
+
GhostInput: GhostInputComponent;
|
|
975
|
+
GuildIconPile: GuildIconPileComponent;
|
|
976
|
+
HeaderActionButton: HeaderActionButtonComponent;
|
|
977
|
+
HeaderBackImage: HeaderBackImageComponent;
|
|
978
|
+
HeaderSubmittingIndicator: HeaderSubmittingIndicatorComponent;
|
|
979
|
+
Heading: TextHeadingComponent;
|
|
980
|
+
IconButton: ButtonIconButtonComponent;
|
|
981
|
+
ImageButton: ImageButtonComponent;
|
|
982
|
+
InlineNotice: InlineNoticeComponent;
|
|
983
|
+
Input: InputComponent;
|
|
984
|
+
InputContainer: InputFieldContainerComponent;
|
|
985
|
+
LayerScope: LayerScopeComponent;
|
|
986
|
+
ManaContextProvider: ManaContextProviderComponent;
|
|
987
|
+
Menu: MenuComponent;
|
|
988
|
+
MenuGroup: MenuGroupComponent;
|
|
989
|
+
MenuItem: MenuItemComponent;
|
|
990
|
+
MenuPopout: MenuPopoutComponent;
|
|
991
|
+
MessageRequestLottie: MessageRequestLottieComponent;
|
|
992
|
+
MessagesTabLottie: MessagesTabLottieComponent;
|
|
993
|
+
MicrophoneLottie: MicrophoneLottieComponent;
|
|
994
|
+
Modal: DesignModalComponent;
|
|
995
|
+
ModalActionButton: ModalActionButtonComponent;
|
|
996
|
+
ModalContent: ModalContentComponent;
|
|
997
|
+
ModalDisclaimer: ModalDisclaimerComponent;
|
|
998
|
+
ModalFloatingAction: ModalFloatingActionComponent;
|
|
999
|
+
ModalFloatingActionSpacer: ModalFloatingActionSpacerComponent;
|
|
1000
|
+
ModalFooter: ModalFooterComponent;
|
|
1001
|
+
ModalScreen: ModalScreenComponent;
|
|
1002
|
+
ModalStepIndicator: ModalStepIndicatorComponent;
|
|
1003
|
+
NavScrim: NavScrimComponent;
|
|
1004
|
+
Navigator: NavigatorComponent;
|
|
1005
|
+
NavigatorHeader: NavigatorHeaderComponent;
|
|
1006
|
+
NavigatorScreen: NavigatorScreenComponent;
|
|
1007
|
+
NitroGem12Lottie: NitroGem12LottieComponent;
|
|
1008
|
+
NitroGem15Lottie: NitroGem15LottieComponent;
|
|
1009
|
+
NitroGem18Lottie: NitroGem18LottieComponent;
|
|
1010
|
+
NitroGem1Lottie: NitroGem1LottieComponent;
|
|
1011
|
+
NitroGem24Lottie: NitroGem24LottieComponent;
|
|
1012
|
+
NitroGem2Lottie: NitroGem2LottieComponent;
|
|
1013
|
+
NitroGem3Lottie: NitroGem3LottieComponent;
|
|
1014
|
+
NitroGem6Lottie: NitroGem6LottieComponent;
|
|
1015
|
+
NitroGem9Lottie: NitroGem9LottieComponent;
|
|
1016
|
+
NotificationsTabLottie: NotificationsTabLottieComponent;
|
|
1017
|
+
Pile: PileComponent;
|
|
1018
|
+
PileOverflow: PileOverflowComponent;
|
|
1019
|
+
PlainTextExperimentProvider: PlainTextExperimentProviderComponent;
|
|
1020
|
+
PromoSheet: PromoSheetComponent;
|
|
1021
|
+
RedesignCompat: RedesignCompatComponent;
|
|
1022
|
+
RootThemeContextProvider: ThemeContextProviderRootThemeContextProviderComponent;
|
|
1023
|
+
RowButton: RowButtonComponent;
|
|
1024
|
+
RowGroup: DesignRowGroupComponent;
|
|
1025
|
+
SceneLoadingIndicator: SceneLoadingIndicatorComponent;
|
|
1026
|
+
SearchField: SearchFieldComponent;
|
|
1027
|
+
SegmentedControl: SegmentedControlComponent;
|
|
1028
|
+
SegmentedControlPages: SegmentedControlPagesComponent;
|
|
1029
|
+
ServerTabLottie: ServerTabLottieComponent;
|
|
1030
|
+
SimpleActionSheet: SimpleActionSheetComponent;
|
|
1031
|
+
Slider: SliderComponent;
|
|
1032
|
+
SplitTextInput: SplitTextInputComponent;
|
|
1033
|
+
Stack: StackComponent;
|
|
1034
|
+
StepModal: StepModalComponent;
|
|
1035
|
+
StickyWrapper: StickyWrapperComponent;
|
|
1036
|
+
TableCheckboxRow: TableCheckboxRowComponent;
|
|
1037
|
+
TableRadioGroup: TableRadioGroupComponent;
|
|
1038
|
+
TableRadioRow: TableRadioRowComponent;
|
|
1039
|
+
TableRow: TableRowComponent;
|
|
1040
|
+
TableRowArrow: TableRowArrowComponent;
|
|
1041
|
+
TableRowGroup: TableRowGroupComponent;
|
|
1042
|
+
TableRowGroupTitle: TableRowGroupTitleComponent;
|
|
1043
|
+
TableRowIcon: TableRowIconComponent;
|
|
1044
|
+
TableRowTrailingText: TableRowTrailingTextComponent;
|
|
1045
|
+
TableSwitchRow: TableSwitchRowComponent;
|
|
1046
|
+
Tabs: TabsComponent;
|
|
1047
|
+
TagGroup: TagGroupComponent;
|
|
1048
|
+
Text: DesignTextComponent;
|
|
1049
|
+
TextArea: TextAreaComponent;
|
|
1050
|
+
TextAreaField: TextAreaFieldComponent;
|
|
1051
|
+
TextField: TextFieldComponent;
|
|
1052
|
+
TextInput: DesignTextInputComponent;
|
|
1053
|
+
Toast: ToastComponent;
|
|
1054
|
+
ToastContainer: ToastContainerComponent;
|
|
1055
|
+
ToggleIconButton: ToggleIconButtonComponent;
|
|
1056
|
+
YouTabLottie: YouTabLottieComponent;
|
|
1057
|
+
};
|
|
1058
|
+
export type DesignCardComponent = React$1.ComponentType<DesignCardProps & Record<string, unknown>>;
|
|
1059
|
+
/**
|
|
1060
|
+
* Props of `Card` (function). Exports: Card, InternalCard.
|
|
1061
|
+
* @see design/components/Card/native/Card.native.tsx
|
|
1062
|
+
*/
|
|
1063
|
+
export type DesignCardProps = Omit<
|
|
1064
|
+
React$1.ComponentProps<typeof RN.View>,
|
|
1065
|
+
| 'accessibilityRole'
|
|
1066
|
+
| 'border'
|
|
1067
|
+
| 'end'
|
|
1068
|
+
| 'onPress'
|
|
1069
|
+
| 'radius'
|
|
1070
|
+
| 'shadow'
|
|
1071
|
+
| 'start'
|
|
1072
|
+
| 'style'
|
|
1073
|
+
| 'variant'
|
|
1074
|
+
> & {
|
|
1075
|
+
/** @default 'button' */
|
|
1076
|
+
accessibilityRole?: 'button' | 'togglebutton' | (string & {});
|
|
1077
|
+
/** @default 'faint' */
|
|
1078
|
+
border?: 'control-secondary' | 'faint' | 'none' | 'strong' | 'subtle' | (string & {});
|
|
1079
|
+
/** @default true */
|
|
1080
|
+
end?: boolean;
|
|
1081
|
+
onPress?: (...args: any[]) => unknown;
|
|
144
1082
|
radius?: number;
|
|
1083
|
+
/** @default 'none' */
|
|
1084
|
+
shadow?: 'high' | 'low' | 'none' | (string & {});
|
|
1085
|
+
/** @default true */
|
|
145
1086
|
start?: boolean;
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
1087
|
+
style?: React$1.ComponentProps<typeof RN.View>['style'];
|
|
1088
|
+
/** @default 'primary' */
|
|
1089
|
+
variant?:
|
|
1090
|
+
| 'control-secondary'
|
|
1091
|
+
| 'muted'
|
|
1092
|
+
| 'primary'
|
|
1093
|
+
| 'secondary'
|
|
1094
|
+
| 'surface-high'
|
|
1095
|
+
| 'transparent'
|
|
1096
|
+
| (string & {});
|
|
1097
|
+
};
|
|
1098
|
+
export type DesignCheckboxComponent = React$1.ComponentType<DesignCheckboxProps>;
|
|
1099
|
+
/**
|
|
1100
|
+
* Props of `Checkbox` (function). Exports: Checkbox.
|
|
1101
|
+
* @see design/components/Checkbox/native/Checkbox.native.tsx
|
|
1102
|
+
*/
|
|
1103
|
+
export type DesignCheckboxProps = {
|
|
1104
|
+
checked?: FormsFormCheckboxProps['checked'];
|
|
1105
|
+
description?: DesignTextProps['children'];
|
|
1106
|
+
label?: DesignTextProps['children'];
|
|
1107
|
+
onToggle: (...args: any[]) => unknown;
|
|
1108
|
+
required?: unknown;
|
|
1109
|
+
};
|
|
1110
|
+
export type DesignComponentName = (typeof DESIGN_COMPONENTS)[number];
|
|
1111
|
+
/** Every component the `design/native.tsx` barrel exports, typed only by `bun run generate-discord-types`. */
|
|
1112
|
+
export type DesignComponents = DesignBarrelComponents;
|
|
1113
|
+
/** The design module's non-component exports (hooks, functions, constants), which the generator does not type. */
|
|
1114
|
+
export type DesignHelpers = {
|
|
1115
|
+
createStyles: CreateStyles;
|
|
1116
|
+
TextStyleSheet: Record<TextVariant, TextStyle>;
|
|
1117
|
+
useToken: (token: SemanticColorToken) => string;
|
|
1118
|
+
useSegmentedControlState: (options: SegmentedControlStateOptions) => SegmentedControlState;
|
|
1119
|
+
openAlert: DiscordFunction<void>;
|
|
1120
|
+
dismissAlert: (key: string) => void;
|
|
1121
|
+
dismissAlerts: DiscordFunction<void>;
|
|
1122
|
+
showConfirmModal: DiscordFunction;
|
|
1123
|
+
showSimpleActionSheet: DiscordFunction;
|
|
1124
|
+
hideContextMenu: DiscordFunction<void>;
|
|
1125
|
+
useNavigation: <T = any>() => Navigation<T>;
|
|
1126
|
+
setColorOpacity: (color: string, opacity: number) => string;
|
|
1127
|
+
darkenColor: (color: string, amount: number) => string;
|
|
1128
|
+
brightenColor: (color: string, amount: number) => string;
|
|
1129
|
+
getContrastingColor: (color: string) => string;
|
|
1130
|
+
TransitionStates: EnumLike<typeof TRANSITION_STATE_KEYS>;
|
|
1131
|
+
ThemeContextFlags: EnumLike<typeof THEME_FLAG_KEYS>;
|
|
1132
|
+
WCAGContrastRatios: Record<'NonText' | 'Text' | 'HighContrastText', number>;
|
|
1133
|
+
};
|
|
1134
|
+
export type DesignModalComponent = React$1.ComponentType<
|
|
1135
|
+
DesignModalProps & Record<string, unknown>
|
|
1136
|
+
>;
|
|
1137
|
+
/**
|
|
1138
|
+
* Props of `Modal` (function). Exports: Modal.
|
|
1139
|
+
* @see design/components/Modal/native/Modal.native.tsx
|
|
1140
|
+
*/
|
|
1141
|
+
export type DesignModalProps = NavigatorProps;
|
|
1142
|
+
/**
|
|
1143
|
+
* The Discord mobile design system module (keyed by `createStyles` / `dismissAlerts` / `ContextMenu`).
|
|
1144
|
+
* See `DESIGN.md` for the full catalogue.
|
|
1145
|
+
*/
|
|
1146
|
+
export type DesignModule = DesignComponents & DesignHelpers;
|
|
1147
|
+
export type DesignRowGroupComponent = React$1.ComponentType<DesignRowGroupProps>;
|
|
1148
|
+
/**
|
|
1149
|
+
* Props of `RowGroup` (function). Exports: RowGroup.
|
|
1150
|
+
* @see design/components/RowGroup/native/RowGroup.native.tsx
|
|
1151
|
+
*/
|
|
1152
|
+
export type DesignRowGroupProps = {
|
|
1153
|
+
children?: React$1.ComponentProps<typeof RN.View>['children'];
|
|
1154
|
+
title?: TableRowGroupTitleProps['title'];
|
|
1155
|
+
trailing?: StackProps['children'];
|
|
1156
|
+
};
|
|
1157
|
+
export type DesignTextComponent = React$1.ComponentType<DesignTextProps & Record<string, unknown>>;
|
|
1158
|
+
export type DesignTextInputComponent = React$1.ComponentType<
|
|
1159
|
+
DesignTextInputProps & Record<string, unknown>
|
|
1160
|
+
>;
|
|
1161
|
+
/**
|
|
1162
|
+
* Props of `TextInput` (function). Exports: TextInput.
|
|
1163
|
+
* @see design/components/TextInput/native/TextInput.native.tsx
|
|
1164
|
+
*/
|
|
1165
|
+
export type DesignTextInputProps = Omit<
|
|
1166
|
+
TextFieldProps,
|
|
1167
|
+
'errorMessage' | 'label' | 'ref' | 'required' | 'status'
|
|
1168
|
+
> & {
|
|
1169
|
+
errorMessage?: string;
|
|
1170
|
+
label?: unknown;
|
|
1171
|
+
ref?: TextFieldProps['ref'];
|
|
153
1172
|
required?: boolean;
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
1173
|
+
status?: 'error' | (string & {});
|
|
1174
|
+
};
|
|
1175
|
+
/**
|
|
1176
|
+
* Props of `Text` (function). Exports: Text.
|
|
1177
|
+
* @see design/components/Text/native/Text.tsx
|
|
1178
|
+
*/
|
|
1179
|
+
export type DesignTextProps = {
|
|
1180
|
+
/** @default false */
|
|
1181
|
+
animated?: boolean;
|
|
1182
|
+
children?: React$1.ReactNode;
|
|
1183
|
+
/** @default 'text-default' */
|
|
1184
|
+
color?:
|
|
1185
|
+
| 'button-outline-primary-text'
|
|
1186
|
+
| 'channels-default'
|
|
1187
|
+
| 'control-brand-foreground'
|
|
1188
|
+
| 'control-critical-primary-text-default'
|
|
1189
|
+
| 'control-secondary-text-default'
|
|
1190
|
+
| 'input-placeholder-text-default'
|
|
1191
|
+
| 'input-text-error-default'
|
|
1192
|
+
| 'interactive-text-active'
|
|
1193
|
+
| 'interactive-text-default'
|
|
1194
|
+
| 'interactive-text-hover'
|
|
1195
|
+
| 'mobile-text-heading-primary'
|
|
1196
|
+
| 'none'
|
|
1197
|
+
| 'premium-nitro-pink-text'
|
|
1198
|
+
| 'redesign-button-tertiary-text'
|
|
1199
|
+
| 'redesign-channel-name-muted-text'
|
|
1200
|
+
| 'redesign-channel-name-text'
|
|
1201
|
+
| 'status-positive'
|
|
1202
|
+
| 'text-brand'
|
|
1203
|
+
| 'text-default'
|
|
1204
|
+
| 'text-feedback-critical'
|
|
1205
|
+
| 'text-feedback-info'
|
|
1206
|
+
| 'text-feedback-positive'
|
|
1207
|
+
| 'text-feedback-warning'
|
|
1208
|
+
| 'text-link'
|
|
1209
|
+
| 'text-muted'
|
|
1210
|
+
| 'text-overlay-dark'
|
|
1211
|
+
| 'text-overlay-light'
|
|
1212
|
+
| 'text-strong'
|
|
1213
|
+
| 'text-subtle'
|
|
1214
|
+
| 'text-voice-connected'
|
|
1215
|
+
| 'user-profile-about-me-heading-text'
|
|
1216
|
+
| 'voice-channel-user-limit-text'
|
|
1217
|
+
| (string & {});
|
|
1218
|
+
/** @default 'tail' */
|
|
1219
|
+
ellipsizeMode?: 'clip' | 'middle' | 'tail' | (string & {});
|
|
1220
|
+
/** @default false */
|
|
1221
|
+
experimental_useNativeText?: boolean;
|
|
1222
|
+
/** @default false */
|
|
1223
|
+
includeFontPadding?: boolean;
|
|
1224
|
+
lineClamp?: number;
|
|
1225
|
+
ref?: React$1.Ref<any>;
|
|
1226
|
+
style?: RN.StyleProp<RN.ViewStyle | RN.TextStyle | RN.ImageStyle>;
|
|
1227
|
+
/** @default false */
|
|
1228
|
+
tabularNumbers?: boolean;
|
|
1229
|
+
variant?:
|
|
1230
|
+
| 'display-lg'
|
|
1231
|
+
| 'display-md'
|
|
1232
|
+
| 'display-sm'
|
|
1233
|
+
| 'experimental/body-lg/semibold'
|
|
1234
|
+
| 'experimental/body-md/medium'
|
|
1235
|
+
| 'experimental/body-md/normal'
|
|
1236
|
+
| 'experimental/body-md/semibold'
|
|
1237
|
+
| 'experimental/body-sm/medium'
|
|
1238
|
+
| 'experimental/body-sm/normal'
|
|
1239
|
+
| 'experimental/body-sm/semibold'
|
|
1240
|
+
| 'experimental/body-xs/normal'
|
|
1241
|
+
| 'experimental/body-xs/semibold'
|
|
1242
|
+
| 'experimental/heading-lg/semibold'
|
|
1243
|
+
| 'experimental/heading-md/semibold'
|
|
1244
|
+
| 'experimental/mono-md/bold'
|
|
1245
|
+
| 'eyebrow'
|
|
1246
|
+
| 'heading-deprecated-12/extrabold'
|
|
1247
|
+
| 'heading-deprecated-12/medium'
|
|
1248
|
+
| 'heading-deprecated-12/semibold'
|
|
1249
|
+
| 'heading-lg/bold'
|
|
1250
|
+
| 'heading-lg/extrabold'
|
|
1251
|
+
| 'heading-lg/medium'
|
|
1252
|
+
| 'heading-lg/normal'
|
|
1253
|
+
| 'heading-lg/semibold'
|
|
1254
|
+
| 'heading-md/bold'
|
|
1255
|
+
| 'heading-md/extrabold'
|
|
1256
|
+
| 'heading-md/medium'
|
|
1257
|
+
| 'heading-md/normal'
|
|
1258
|
+
| 'heading-md/semibold'
|
|
1259
|
+
| 'heading-sm/bold'
|
|
1260
|
+
| 'heading-sm/extrabold'
|
|
1261
|
+
| 'heading-sm/medium'
|
|
1262
|
+
| 'heading-sm/normal'
|
|
1263
|
+
| 'heading-sm/semibold'
|
|
1264
|
+
| 'heading-xl/bold'
|
|
1265
|
+
| 'heading-xl/extrabold'
|
|
1266
|
+
| 'heading-xl/medium'
|
|
1267
|
+
| 'heading-xl/semibold'
|
|
1268
|
+
| 'heading-xxl/bold'
|
|
1269
|
+
| 'heading-xxl/extrabold'
|
|
1270
|
+
| 'heading-xxl/medium'
|
|
1271
|
+
| 'heading-xxl/normal'
|
|
1272
|
+
| 'heading-xxl/semibold'
|
|
1273
|
+
| 'redesign/channel-title/semibold'
|
|
1274
|
+
| 'redesign/heading-18/bold'
|
|
1275
|
+
| 'redesign/heading-18/medium'
|
|
1276
|
+
| 'redesign/heading-18/semibold'
|
|
1277
|
+
| 'redesign/message-preview/medium'
|
|
1278
|
+
| 'redesign/message-preview/normal'
|
|
1279
|
+
| 'text-lg/bold'
|
|
1280
|
+
| 'text-lg/medium'
|
|
1281
|
+
| 'text-lg/normal'
|
|
1282
|
+
| 'text-lg/semibold'
|
|
1283
|
+
| 'text-md/bold'
|
|
1284
|
+
| 'text-md/medium'
|
|
1285
|
+
| 'text-md/normal'
|
|
1286
|
+
| 'text-md/semibold'
|
|
1287
|
+
| 'text-sm/bold'
|
|
1288
|
+
| 'text-sm/medium'
|
|
1289
|
+
| 'text-sm/normal'
|
|
1290
|
+
| 'text-sm/semibold'
|
|
1291
|
+
| 'text-xs/bold'
|
|
1292
|
+
| 'text-xs/medium'
|
|
1293
|
+
| 'text-xs/normal'
|
|
1294
|
+
| 'text-xs/semibold'
|
|
1295
|
+
| 'text-xxs/bold'
|
|
1296
|
+
| 'text-xxs/medium'
|
|
1297
|
+
| 'text-xxs/normal'
|
|
1298
|
+
| 'text-xxs/semibold'
|
|
1299
|
+
| (string & {});
|
|
1300
|
+
};
|
|
1301
|
+
export type DialogComponent = React$1.ComponentType<DialogProps & Record<string, unknown>>;
|
|
1302
|
+
/**
|
|
1303
|
+
* Props of `Dialog` (function). Exports: Dialog.
|
|
1304
|
+
* @see design/components/Dialog/native/Dialog.native.tsx
|
|
1305
|
+
*/
|
|
1306
|
+
export type DialogProps = Omit<AccessibilityViewProps, 'dialogKey' | 'onDismiss' | 'zIndex'> & {
|
|
1307
|
+
dialogKey?: AccessibilityViewProps['nativeID'];
|
|
1308
|
+
onDismiss?: AccessibilityViewProps['onAccessibilityEscape'];
|
|
1309
|
+
zIndex?: unknown;
|
|
1310
|
+
};
|
|
1311
|
+
export type DisableCustomThemeComponent = React$1.ComponentType<DisableCustomThemeProps>;
|
|
1312
|
+
/**
|
|
1313
|
+
* Props of `DisableCustomTheme` (function). Exports: DisableCustomTheme.
|
|
1314
|
+
* @see design/components/ThemeContextProvider/native/RootThemeContextProvider.native.tsx
|
|
1315
|
+
*/
|
|
1316
|
+
export type DisableCustomThemeProps = {
|
|
1317
|
+
children?: React$1.ReactNode;
|
|
1318
|
+
};
|
|
1319
|
+
/** An asset registered with Discord's packager (its metadata and dimensions). */
|
|
1320
|
+
export type DiscordAsset = {
|
|
1321
|
+
__packager_asset?: boolean;
|
|
1322
|
+
name: string;
|
|
1323
|
+
httpServerLocation: string;
|
|
1324
|
+
width: number;
|
|
1325
|
+
height: number;
|
|
1326
|
+
scales: number[];
|
|
1327
|
+
hash: string;
|
|
1328
|
+
type: string;
|
|
1329
|
+
};
|
|
1330
|
+
/** A function exported by a Discord module, whose signature Discord does not document. */
|
|
1331
|
+
export type DiscordFunction<T = any> = (...args: any[]) => T;
|
|
1332
|
+
/**
|
|
1333
|
+
* Props of `EllipsisCircle` (function). Exports: none.
|
|
1334
|
+
* @see design/components/Button/native/ButtonEllipsis.native.tsx
|
|
1335
|
+
*/
|
|
1336
|
+
export type EllipsisCircleProps = {
|
|
1337
|
+
offset?: number;
|
|
1338
|
+
size?: unknown;
|
|
1339
|
+
variant?: unknown;
|
|
1340
|
+
};
|
|
1341
|
+
/** Discord ships numeric enums as bidirectional maps; this models both directions. */
|
|
1342
|
+
export type EnumLike<K extends readonly string[]> = {
|
|
1343
|
+
[P in K[number]]: number;
|
|
1344
|
+
} & {
|
|
1345
|
+
[n: number]: K[number];
|
|
1346
|
+
};
|
|
1347
|
+
/**
|
|
1348
|
+
* Props of `ErrorText` (function). Exports: ErrorText.
|
|
1349
|
+
* @see design/components/ErrorText/native/ErrorText.native.tsx
|
|
1350
|
+
*/
|
|
1351
|
+
export type ErrorTextProps = {
|
|
1352
|
+
children?: DesignTextProps['children'];
|
|
1353
|
+
style?: StackProps['style'];
|
|
1354
|
+
};
|
|
1355
|
+
export type ExpressiveGradientComponent = React$1.ComponentType<ExpressiveGradientProps>;
|
|
1356
|
+
/**
|
|
1357
|
+
* Props of `ExpressiveGradient` (function). Exports: ExpressiveGradient.
|
|
1358
|
+
* @see design/components/ExpressiveGradient/native/ExpressiveGradient.native.tsx
|
|
1359
|
+
*/
|
|
1360
|
+
export type ExpressiveGradientProps = {
|
|
1361
|
+
backgroundColor?: unknown;
|
|
1362
|
+
children?: React$1.ComponentProps<typeof RN.View>['children'];
|
|
1363
|
+
/** @default 'purple' */
|
|
1364
|
+
color?: 'purple' | (string & {});
|
|
1365
|
+
/** @default 0 */
|
|
1366
|
+
offsetBottom?: number;
|
|
1367
|
+
style?: React$1.ComponentProps<typeof RN.View>['style'];
|
|
1368
|
+
};
|
|
1369
|
+
export type FauxHeaderComponent = React$1.ComponentType<FauxHeaderProps>;
|
|
1370
|
+
/**
|
|
1371
|
+
* Props of `FauxHeader` (function). Exports: FauxHeader.
|
|
1372
|
+
* @see design/components/Navigator/native/NavigatorHeader.native.tsx
|
|
1373
|
+
*/
|
|
1374
|
+
export type FauxHeaderProps = {
|
|
1375
|
+
children?: React$1.ComponentProps<typeof RN.View>['children'];
|
|
1376
|
+
style?: React$1.ComponentProps<typeof RN.View>['style'];
|
|
1377
|
+
};
|
|
1378
|
+
export type FloatingActionButtonComponent = React$1.ComponentType<
|
|
1379
|
+
FloatingActionButtonProps & Record<string, unknown>
|
|
1380
|
+
>;
|
|
1381
|
+
/**
|
|
1382
|
+
* Props of `FloatingActionButton` (function). Exports: FloatingActionButton.
|
|
1383
|
+
* @see design/components/Button/native/FloatingActionButton.native.tsx
|
|
1384
|
+
*/
|
|
1385
|
+
export type FloatingActionButtonProps = Omit<
|
|
1386
|
+
BaseIconButtonProps,
|
|
1387
|
+
'accessibilityLabel' | 'icon' | 'positionBottom' | 'positionRight'
|
|
1388
|
+
> & {
|
|
1389
|
+
accessibilityLabel?: BaseIconButtonProps['accessibilityLabel'];
|
|
1390
|
+
icon?: unknown;
|
|
1391
|
+
/** @default 16 */
|
|
1392
|
+
positionBottom?: number;
|
|
1393
|
+
/** @default 16 */
|
|
1394
|
+
positionRight?: number;
|
|
1395
|
+
};
|
|
1396
|
+
/** A custom font the native loader has registered, as injected on `window.UNBOUND_FONTS`. */
|
|
1397
|
+
export type FontDescriptor = {
|
|
1398
|
+
name: string;
|
|
1399
|
+
file: string;
|
|
1400
|
+
path: string;
|
|
1401
|
+
};
|
|
1402
|
+
/** A font managed by the Fonts manager: currently identical to its {@link FontDescriptor}. */
|
|
1403
|
+
export type FontEntity = FontDescriptor;
|
|
1404
|
+
/**
|
|
1405
|
+
* Props of `FormLabel` (function). Exports: default.
|
|
1406
|
+
* @see design/void/Form/native/FormLabel.tsx
|
|
1407
|
+
*/
|
|
1408
|
+
export type FormLabelProps = {
|
|
1409
|
+
accessible?: unknown;
|
|
1410
|
+
/** @default 'mobile-text-heading-primary' */
|
|
1411
|
+
color?: DesignTextProps['color'];
|
|
1412
|
+
/** @default 0 */
|
|
1413
|
+
numberOfLines?: DesignTextProps['lineClamp'];
|
|
1414
|
+
style?: DesignTextProps['style'];
|
|
1415
|
+
text?: DesignTextProps['children'];
|
|
1416
|
+
};
|
|
1417
|
+
/**
|
|
1418
|
+
* Props of `FormRow` (function). Exports: default.
|
|
1419
|
+
* @see design/void/Form/native/FormRow.tsx
|
|
1420
|
+
*/
|
|
1421
|
+
export type FormRowProps = {
|
|
1422
|
+
DEPRECATED_style?: PressableHighlightProps['style'];
|
|
1423
|
+
accessibilityActions?: PressableHighlightProps['accessibilityActions'];
|
|
1424
|
+
accessibilityHint?: PressableHighlightProps['accessibilityHint'];
|
|
1425
|
+
accessibilityLabel?: PressableHighlightProps['accessibilityLabel'];
|
|
1426
|
+
/** @default 'button' */
|
|
1427
|
+
accessibilityRole?: PressableHighlightProps['accessibilityRole'];
|
|
1428
|
+
accessibilityState?: TableRowProps['accessibilityState'];
|
|
1429
|
+
/** @default true */
|
|
1430
|
+
accessible?: TableRowProps['accessible'];
|
|
1431
|
+
delayLongPress?: PressableHighlightProps['delayLongPress'];
|
|
1432
|
+
/** @default false */
|
|
1433
|
+
disabled?: PressableHighlightProps['disabled'];
|
|
1434
|
+
/** @default false */
|
|
1435
|
+
end?: TableRowProps['end'];
|
|
1436
|
+
/** @default false */
|
|
1437
|
+
hasError?: boolean;
|
|
1438
|
+
label?: React$1.ReactElement | FormLabelProps['text'];
|
|
1439
|
+
labelStyle?: FormLabelProps['style'];
|
|
1440
|
+
leading?: unknown;
|
|
1441
|
+
leadingStyle?: React$1.ComponentProps<typeof RN.View>['style'];
|
|
1442
|
+
numberOfLines?: TableRowProps['labelLineClamp'];
|
|
1443
|
+
onAccessibilityAction?: PressableHighlightProps['onAccessibilityAction'];
|
|
1444
|
+
onAccessibilityTap?: PressableHighlightProps['onAccessibilityTap'];
|
|
1445
|
+
onLongPress?: PressableHighlightProps['onLongPress'];
|
|
1446
|
+
onPress?: PressableHighlightProps['onPress'];
|
|
1447
|
+
onPressOut?: PressableHighlightProps['onPressOut'];
|
|
1448
|
+
ref?: PressableHighlightProps['ref'];
|
|
1449
|
+
/** @default false */
|
|
1450
|
+
start?: TableRowProps['start'];
|
|
1451
|
+
style?: PressableHighlightProps['style'];
|
|
1452
|
+
/** @default null */
|
|
1453
|
+
subLabel?: React$1.ReactElement | FormSubLabelProps['text'];
|
|
1454
|
+
trailing?: unknown;
|
|
1455
|
+
trailingWrapperStyle?: React$1.ComponentProps<typeof RN.View>['style'];
|
|
1456
|
+
variant?: TableRowProps['variant'];
|
|
1457
|
+
};
|
|
1458
|
+
/**
|
|
1459
|
+
* Props of `FormSubLabel` (function). Exports: default.
|
|
1460
|
+
* @see design/void/Form/native/FormSubLabel.tsx
|
|
1461
|
+
*/
|
|
1462
|
+
export type FormSubLabelProps = {
|
|
1463
|
+
accessible?: unknown;
|
|
1464
|
+
/** @default 'text-subtle' */
|
|
1465
|
+
color?: DesignTextProps['color'];
|
|
1466
|
+
numberOfLines?: DesignTextProps['lineClamp'];
|
|
1467
|
+
style?: DesignTextProps['style'];
|
|
1468
|
+
text?: DesignTextProps['children'];
|
|
1469
|
+
};
|
|
1470
|
+
export type FormsFormCheckboxComponent = React$1.ComponentType<FormsFormCheckboxProps>;
|
|
1471
|
+
/**
|
|
1472
|
+
* Props of `FormCheckbox` (function). Exports: FormCheckbox.
|
|
1473
|
+
* @see design/components/Forms/native/FormCheckbox.native.tsx
|
|
1474
|
+
*/
|
|
1475
|
+
export type FormsFormCheckboxProps = {
|
|
1476
|
+
checked?: boolean;
|
|
1477
|
+
};
|
|
1478
|
+
export type FormsFormRadioComponent = React$1.ComponentType<FormsFormRadioProps>;
|
|
1479
|
+
/**
|
|
1480
|
+
* Props of `FormRadio` (function). Exports: FormRadio.
|
|
1481
|
+
* @see design/components/Forms/native/FormRadio.native.tsx
|
|
1482
|
+
*/
|
|
1483
|
+
export type FormsFormRadioProps = {
|
|
1484
|
+
selected?: boolean;
|
|
1485
|
+
};
|
|
1486
|
+
export type FormsFormSwitchComponent = React$1.ComponentType<FormsFormSwitchProps>;
|
|
1487
|
+
/**
|
|
1488
|
+
* Props of `FormSwitch` (function). Exports: FormSwitch.
|
|
1489
|
+
* @see design/components/Forms/native/FormSwitch.native.tsx
|
|
1490
|
+
*/
|
|
1491
|
+
export type FormsFormSwitchProps = {
|
|
1492
|
+
accessibilityHint?: unknown;
|
|
1493
|
+
accessibilityLabel?: unknown;
|
|
1494
|
+
'aria-hidden'?: boolean;
|
|
1495
|
+
disabled?: React$1.ComponentProps<typeof RN.Pressable>['disabled'];
|
|
1496
|
+
onValueChange?: (...args: any[]) => unknown;
|
|
1497
|
+
value?: unknown;
|
|
1498
|
+
};
|
|
1499
|
+
export type GhostInputComponent = React$1.ComponentType<GhostInputProps & Record<string, unknown>>;
|
|
1500
|
+
/**
|
|
1501
|
+
* Props of `GhostInput` (function). Exports: GhostInput.
|
|
1502
|
+
* @see design/components/TextInput/native/GhostInput.native.tsx
|
|
1503
|
+
*/
|
|
1504
|
+
export type GhostInputProps = Omit<
|
|
1505
|
+
InputTextInputProps,
|
|
1506
|
+
| 'autoFocus'
|
|
1507
|
+
| 'centered'
|
|
1508
|
+
| 'containerStyle'
|
|
1509
|
+
| 'disabled'
|
|
1510
|
+
| 'label'
|
|
1511
|
+
| 'onClear'
|
|
1512
|
+
| 'required'
|
|
1513
|
+
| 'size'
|
|
1514
|
+
| 'status'
|
|
1515
|
+
> & {
|
|
1516
|
+
/** @default true */
|
|
1517
|
+
autoFocus?: InputTextInputProps['autoFocus'];
|
|
1518
|
+
/** @default true */
|
|
1519
|
+
centered?: boolean;
|
|
1520
|
+
containerStyle?: InputProps['containerStyle'];
|
|
1521
|
+
/** @default false */
|
|
1522
|
+
disabled?: boolean;
|
|
1523
|
+
label?: unknown;
|
|
1524
|
+
onClear?: (...args: any[]) => unknown;
|
|
1525
|
+
required?: boolean;
|
|
1526
|
+
size?: unknown;
|
|
1527
|
+
status?: unknown;
|
|
1528
|
+
};
|
|
1529
|
+
/**
|
|
1530
|
+
* Props of `GlyphBand` (memo). Exports: none.
|
|
1531
|
+
* @see design/visual-identities/ai/AIShimmer/AIShimmer.native.tsx
|
|
1532
|
+
*/
|
|
1533
|
+
export type GlyphBandProps = {
|
|
1534
|
+
animationProgress: {
|
|
1535
|
+
get?: unknown;
|
|
1536
|
+
};
|
|
1537
|
+
color?: AIGlyphTextProps['color'];
|
|
1538
|
+
fontSize?: unknown;
|
|
1539
|
+
glyphChoices?: unknown;
|
|
1540
|
+
overshootInSlots?: unknown;
|
|
1541
|
+
slotCount?: unknown;
|
|
1542
|
+
style?: AIGlyphTextProps['style'];
|
|
1543
|
+
};
|
|
1544
|
+
export type GuildIconPileComponent = React$1.ComponentType<GuildIconPileProps>;
|
|
1545
|
+
/**
|
|
1546
|
+
* Props of `GuildIconPile` (function). Exports: GuildIconPile.
|
|
1547
|
+
* @see design/components/Pile/native/GuildIconPile.native.tsx
|
|
1548
|
+
*/
|
|
1549
|
+
export type GuildIconPileProps = {
|
|
1550
|
+
children?: PileProps['children'];
|
|
1551
|
+
names?: {
|
|
1552
|
+
length?: unknown;
|
|
1553
|
+
};
|
|
1554
|
+
size?: unknown;
|
|
1555
|
+
totalCount?: number;
|
|
1556
|
+
};
|
|
1557
|
+
export type HeaderActionButtonComponent = React$1.ComponentType<HeaderActionButtonProps>;
|
|
1558
|
+
/**
|
|
1559
|
+
* Props of `HeaderActionButton` (function). Exports: HeaderActionButton.
|
|
1560
|
+
* @see design/components/Navigator/native/HeaderActionButton.native.tsx
|
|
1561
|
+
*/
|
|
1562
|
+
export type HeaderActionButtonProps = {
|
|
1563
|
+
IconComponent?: unknown;
|
|
1564
|
+
IconComponentSize?: unknown;
|
|
1565
|
+
accessibilityActions?: PressableOpacityProps['accessibilityActions'];
|
|
1566
|
+
accessibilityHint?: PressableOpacityProps['accessibilityHint'];
|
|
1567
|
+
accessibilityLabel?: PressableOpacityProps['accessibilityLabel'];
|
|
1568
|
+
disabled?: PressableOpacityProps['disabled'];
|
|
1569
|
+
foregroundRipple?: boolean;
|
|
1570
|
+
hitSlop?: PressableOpacityProps['hitSlop'];
|
|
1571
|
+
icon?: PressableOpacityProps['children'];
|
|
1572
|
+
iconSize?: unknown;
|
|
1573
|
+
imageStyle?: VoidIconProps['style'];
|
|
1574
|
+
onAccessibilityAction?: PressableOpacityProps['onAccessibilityAction'];
|
|
1575
|
+
onPress?: PressableOpacityProps['onPress'];
|
|
1576
|
+
ref?: PressableOpacityProps['ref'];
|
|
1577
|
+
source?: VoidIconProps['source'];
|
|
1578
|
+
style?: PressableOpacityProps['style'];
|
|
1579
|
+
text?: DesignTextProps['children'];
|
|
1580
|
+
textStyle?: DesignTextProps['style'];
|
|
1581
|
+
};
|
|
1582
|
+
export type HeaderBackImageComponent = React$1.ComponentType<HeaderBackImageProps>;
|
|
1583
|
+
/**
|
|
1584
|
+
* Props of `HeaderBackImage` (function). Exports: HeaderBackImage.
|
|
1585
|
+
* @see design/components/Navigator/native/NavigatorHeader.native.tsx
|
|
1586
|
+
*/
|
|
1587
|
+
export type HeaderBackImageProps = {};
|
|
1588
|
+
export type HeaderSubmittingIndicatorComponent =
|
|
1589
|
+
React$1.ComponentType<HeaderSubmittingIndicatorProps>;
|
|
1590
|
+
/**
|
|
1591
|
+
* Props of `HeaderSubmittingIndicator` (function). Exports: HeaderSubmittingIndicator.
|
|
1592
|
+
* @see design/components/Navigator/native/NavigatorHeader.native.tsx
|
|
1593
|
+
*/
|
|
1594
|
+
export type HeaderSubmittingIndicatorProps = {};
|
|
1595
|
+
/** A loaded icon pack: its bundle marker and {@link IconPackManifest}. */
|
|
1596
|
+
export type IconPack = {
|
|
1597
|
+
bundle: string;
|
|
1598
|
+
manifest: IconPackManifest;
|
|
1599
|
+
};
|
|
1600
|
+
/** An icon pack's manifest: an {@link AddonManifest} tagged with its source kind. */
|
|
1601
|
+
export type IconPackManifest = AddonManifest & {
|
|
1602
|
+
type: 'icon-pack';
|
|
1603
|
+
source: 'github' | 'other';
|
|
1604
|
+
};
|
|
1605
|
+
export type ImageButtonComponent = React$1.ComponentType<
|
|
1606
|
+
ImageButtonProps & Record<string, unknown>
|
|
1607
|
+
>;
|
|
1608
|
+
/**
|
|
1609
|
+
* Props of `ImageButton` (function). Exports: ImageButton.
|
|
1610
|
+
* @see design/components/Button/native/ImageButton.native.tsx
|
|
1611
|
+
*/
|
|
1612
|
+
export type ImageButtonProps = Omit<
|
|
1613
|
+
BaseIconButtonProps,
|
|
1614
|
+
| 'accessibilityLabel'
|
|
1615
|
+
| 'grow'
|
|
1616
|
+
| 'image'
|
|
1617
|
+
| 'label'
|
|
1618
|
+
| 'maxFontSizeMultiplier'
|
|
1619
|
+
| 'onPressIn'
|
|
1620
|
+
| 'onPressOut'
|
|
1621
|
+
| 'ref'
|
|
1622
|
+
| 'size'
|
|
1623
|
+
> & {
|
|
1624
|
+
accessibilityLabel?: BaseIconButtonProps['accessibilityLabel'];
|
|
1625
|
+
grow?: boolean;
|
|
1626
|
+
image?: React$1.ComponentProps<typeof RN.Image>['source'];
|
|
1627
|
+
label?: DesignTextProps['children'];
|
|
1628
|
+
maxFontSizeMultiplier?: number | string;
|
|
1629
|
+
onPressIn?: (...args: any[]) => unknown;
|
|
1630
|
+
onPressOut?: (...args: any[]) => unknown;
|
|
1631
|
+
ref?: BaseIconButtonProps['ref'];
|
|
1632
|
+
/** @default 'lg' */
|
|
1633
|
+
size?: BaseIconButtonProps['size'];
|
|
1634
|
+
};
|
|
1635
|
+
export type InlineNoticeComponent = React$1.ComponentType<InlineNoticeProps>;
|
|
1636
|
+
/**
|
|
1637
|
+
* Props of `InlineNotice` (function). Exports: InlineNotice.
|
|
1638
|
+
* @see design/mana/components/InlineNotice/InlineNotice.native.tsx
|
|
1639
|
+
*/
|
|
1640
|
+
export type InlineNoticeProps = Omit<
|
|
1641
|
+
NewInlineNoticeProps,
|
|
1642
|
+
'action' | 'hidden' | 'message' | 'title' | 'type'
|
|
1643
|
+
> & {
|
|
1644
|
+
action?: {
|
|
1645
|
+
onClick?: unknown;
|
|
1646
|
+
text?: unknown;
|
|
1647
|
+
};
|
|
1648
|
+
hidden?: boolean;
|
|
1649
|
+
message?: unknown;
|
|
1650
|
+
title?: DesignTextProps['children'];
|
|
1651
|
+
type?: 'critical' | 'info' | 'positive' | 'warning' | (string & {});
|
|
1652
|
+
};
|
|
1653
|
+
export type InputComponent = React$1.ComponentType<InputProps>;
|
|
1654
|
+
export type InputFieldContainerComponent = React$1.ComponentType<InputFieldContainerProps>;
|
|
1655
|
+
/**
|
|
1656
|
+
* Props of `InputFieldContainer` (function). Exports: InputFieldContainer.
|
|
1657
|
+
* @see design/components/Input/native/InputFieldContainer.native.tsx
|
|
1658
|
+
*/
|
|
1659
|
+
export type InputFieldContainerProps = {
|
|
1660
|
+
children?: React$1.ComponentProps<typeof RN.View>['children'];
|
|
1661
|
+
/** @default false */
|
|
1662
|
+
disabled?: boolean;
|
|
1663
|
+
grow?: unknown;
|
|
1664
|
+
/** @default false */
|
|
1665
|
+
isFocused?: boolean;
|
|
1666
|
+
leadingIcon?: unknown;
|
|
1667
|
+
/** @default false */
|
|
1668
|
+
round?: boolean;
|
|
1669
|
+
size?: 'sm' | (string & {});
|
|
1670
|
+
/** @default 'default' */
|
|
1671
|
+
status?: 'default' | (string & {});
|
|
1672
|
+
};
|
|
1673
|
+
/**
|
|
1674
|
+
* Props of `Input` (function). Exports: Input.
|
|
1675
|
+
* @see design/components/Input/native/Input.native.tsx
|
|
1676
|
+
*/
|
|
1677
|
+
export type InputProps = {
|
|
1678
|
+
children?: React$1.ComponentProps<typeof RN.View>['children'];
|
|
1679
|
+
containerStyle?: React$1.ComponentProps<typeof RN.View>['style'];
|
|
1680
|
+
description?: DesignTextProps['children'];
|
|
1681
|
+
errorMessage?: ErrorTextProps['children'];
|
|
1682
|
+
label?: DesignTextProps['children'];
|
|
1683
|
+
labelId?: string;
|
|
1684
|
+
labelTrailing?: React$1.ComponentProps<typeof RN.View>['children'];
|
|
1685
|
+
required?: boolean;
|
|
1686
|
+
};
|
|
1687
|
+
/**
|
|
1688
|
+
* Props of `TextInput` (function). Exports: NativeTextInput.
|
|
1689
|
+
* @see design/components/Input/native/NativeTextInput.native.tsx
|
|
1690
|
+
*/
|
|
1691
|
+
export type InputTextInputProps = Omit<
|
|
1692
|
+
React$1.ComponentProps<typeof RN.TextInput>,
|
|
1693
|
+
'keyboardAppearance' | 'multiline' | 'ref'
|
|
1694
|
+
> & {
|
|
1695
|
+
keyboardAppearance?: React$1.ComponentProps<typeof RN.TextInput>['keyboardAppearance'];
|
|
1696
|
+
multiline?: boolean;
|
|
1697
|
+
ref?: React$1.Ref<any>;
|
|
1698
|
+
};
|
|
1699
|
+
/** {@link ToastOptions} enriched with the fields the store tracks internally. */
|
|
1700
|
+
export type InternalToastOptions = {
|
|
1701
|
+
id: string;
|
|
1702
|
+
closing?: boolean;
|
|
1703
|
+
date?: number;
|
|
1704
|
+
} & ToastOptions;
|
|
1705
|
+
export type LayerScopeComponent = React$1.ComponentType<LayerScopeProps>;
|
|
1706
|
+
/**
|
|
1707
|
+
* Props of `LayerScope` (function). Exports: LayerScope.
|
|
1708
|
+
* @see design/components/Layers/native/LayerScope.native.tsx
|
|
1709
|
+
*/
|
|
1710
|
+
export type LayerScopeProps = {
|
|
1711
|
+
children?: React$1.ReactNode;
|
|
1712
|
+
zIndex?: number;
|
|
1713
|
+
};
|
|
1714
|
+
/**
|
|
1715
|
+
* Props of `LoadingButtonPill` (function). Exports: LoadingButtonPill.
|
|
1716
|
+
* @see design/components/Button/native/ButtonPill.native.tsx
|
|
1717
|
+
*/
|
|
1718
|
+
export type LoadingButtonPillProps = {
|
|
1719
|
+
children?: React$1.ReactNode;
|
|
1720
|
+
expressivePressState?: unknown;
|
|
1721
|
+
expressiveRiveRef?: unknown;
|
|
1722
|
+
/** @default 'md' */
|
|
1723
|
+
loaderSize?: 'md' | (string & {});
|
|
1724
|
+
/** @default false */
|
|
1725
|
+
loading?: boolean;
|
|
1726
|
+
pressed?: PillWrapperProps['pressed'];
|
|
1727
|
+
size?: unknown;
|
|
1728
|
+
style?: PillWrapperProps['style'];
|
|
1729
|
+
/** @default 'primary' */
|
|
1730
|
+
variant?: PillWrapperProps['variant'];
|
|
1731
|
+
};
|
|
1732
|
+
/**
|
|
1733
|
+
* Props of `LottieIcon` (function). Exports: LottieIcon.
|
|
1734
|
+
* @see design/components/LottieIcon/native/LottieIcon.tsx
|
|
1735
|
+
*/
|
|
1736
|
+
export type LottieIconProps = {
|
|
1737
|
+
animation?: 'all' | (string & {});
|
|
1738
|
+
autoPlay?: unknown;
|
|
1739
|
+
color?: unknown;
|
|
1740
|
+
dotLottie?: unknown;
|
|
1741
|
+
height?: unknown;
|
|
1742
|
+
layers: {
|
|
1743
|
+
map?: unknown;
|
|
1744
|
+
};
|
|
1745
|
+
markers: {
|
|
1746
|
+
find?: unknown;
|
|
1747
|
+
};
|
|
1748
|
+
/** @default 1 */
|
|
1749
|
+
opacity?: number;
|
|
1750
|
+
ref?: React$1.Ref<any>;
|
|
1751
|
+
/** @default 'md' */
|
|
1752
|
+
size?: 'custom' | 'md' | (string & {});
|
|
1753
|
+
useLottieDefaultColors?: boolean;
|
|
1754
|
+
width?: unknown;
|
|
1755
|
+
};
|
|
1756
|
+
export type ManaContextProviderComponent = React$1.ComponentType<ManaContextProviderProps>;
|
|
1757
|
+
/**
|
|
1758
|
+
* Props of `ManaContextProvider` (function). Exports: ManaContextProvider.
|
|
1759
|
+
* @see ../discord_common/js/packages/design/components/ManaContext/ManaContext.native.tsx
|
|
1760
|
+
*/
|
|
1761
|
+
export type ManaContextProviderProps = {
|
|
1762
|
+
children?: React$1.ReactNode;
|
|
1763
|
+
value?: unknown;
|
|
1764
|
+
};
|
|
1765
|
+
export type MenuComponent = React$1.ComponentType<MenuProps>;
|
|
1766
|
+
export type MenuGroupComponent = React$1.ComponentType<MenuGroupProps>;
|
|
1767
|
+
/**
|
|
1768
|
+
* Props of `MenuGroup` (function). Exports: MenuGroup.
|
|
1769
|
+
* @see design/components/Menu/native/MenuGroup.tsx
|
|
1770
|
+
*/
|
|
1771
|
+
export type MenuGroupProps = {
|
|
1772
|
+
children?: React$1.ReactNode;
|
|
1773
|
+
ref?: React$1.Ref<any>;
|
|
1774
|
+
style?: React$1.ComponentProps<typeof RN.View>['style'];
|
|
1775
|
+
};
|
|
1776
|
+
export type MenuItemComponent = React$1.ComponentType<MenuItemProps>;
|
|
1777
|
+
/**
|
|
1778
|
+
* Props of `MenuItem` (function). Exports: MenuItem.
|
|
1779
|
+
* @see design/components/Menu/native/MenuItem.tsx
|
|
1780
|
+
*/
|
|
1781
|
+
export type MenuItemProps = {
|
|
1782
|
+
IconComponent?: unknown;
|
|
1783
|
+
action: (...args: any[]) => unknown;
|
|
1784
|
+
/** @default false */
|
|
1785
|
+
disabled?: FormRowProps['disabled'];
|
|
1786
|
+
iconSource?: VoidIconProps['source'];
|
|
1787
|
+
label?: FormLabelProps['text'];
|
|
1788
|
+
ref?: FormRowProps['ref'];
|
|
1789
|
+
/** @default false */
|
|
1790
|
+
showIconFirst?: boolean;
|
|
1791
|
+
style?: FormRowProps['style'];
|
|
1792
|
+
};
|
|
1793
|
+
export type MenuPopoutComponent = React$1.ComponentType<MenuPopoutProps>;
|
|
1794
|
+
/**
|
|
1795
|
+
* Props of `MenuPopout` (function). Exports: MenuPopout.
|
|
1796
|
+
* @see design/components/Menu/native/MenuPopout.tsx
|
|
1797
|
+
*/
|
|
1798
|
+
export type MenuPopoutProps = {
|
|
1799
|
+
align?: MenuProps['align'];
|
|
1800
|
+
children: (...args: any[]) => unknown;
|
|
1801
|
+
key?: unknown;
|
|
1802
|
+
menuItems?: {
|
|
1803
|
+
find?: unknown;
|
|
1804
|
+
map?: unknown;
|
|
1805
|
+
};
|
|
1806
|
+
offset?: MenuProps['offset'];
|
|
1807
|
+
offsetAnimated?: MenuProps['offsetAnimated'];
|
|
1808
|
+
onRequestClose?: (...args: any[]) => unknown;
|
|
1809
|
+
onRequestOpen?: (...args: any[]) => unknown;
|
|
1810
|
+
position?: MenuProps['position'];
|
|
1811
|
+
};
|
|
1812
|
+
/**
|
|
1813
|
+
* Props of `Menu` (function). Exports: Menu.
|
|
1814
|
+
* @see design/components/Menu/native/Menu.tsx
|
|
1815
|
+
*/
|
|
1816
|
+
export type MenuProps = {
|
|
1817
|
+
/** @default 'start' */
|
|
1818
|
+
align?: 'end' | 'start' | (string & {});
|
|
1819
|
+
children?: React$1.ReactNode;
|
|
1820
|
+
offset?: {
|
|
1821
|
+
x?: unknown;
|
|
1822
|
+
y?: unknown;
|
|
1823
|
+
};
|
|
1824
|
+
offsetAnimated?: {
|
|
1825
|
+
get?: unknown;
|
|
1826
|
+
};
|
|
1827
|
+
onClose?: (...args: any[]) => unknown;
|
|
1828
|
+
/** @default 'right' */
|
|
1829
|
+
position?: 'bottom' | 'left' | 'right' | 'top' | (string & {});
|
|
1830
|
+
style?: RN.StyleProp<RN.ViewStyle | RN.TextStyle | RN.ImageStyle>;
|
|
1831
|
+
toggleButtonRef?: {
|
|
1832
|
+
current?: unknown;
|
|
1833
|
+
};
|
|
1834
|
+
};
|
|
1835
|
+
export type MessageRequestLottieComponent = React$1.ComponentType<
|
|
1836
|
+
MessageRequestLottieProps & Record<string, unknown>
|
|
1837
|
+
>;
|
|
1838
|
+
/**
|
|
1839
|
+
* Props of `MessageRequestLottie` (function). Exports: MessageRequestLottie.
|
|
1840
|
+
* @see design/components/LottieIcon/native/generated/MessageRequestLottie.tsx
|
|
1841
|
+
*/
|
|
1842
|
+
export type MessageRequestLottieProps = Omit<LottieIconProps, 'ref'> & {
|
|
1843
|
+
ref?: LottieIconProps['ref'];
|
|
1844
|
+
};
|
|
1845
|
+
export type MessagesTabLottieComponent = React$1.ComponentType<
|
|
1846
|
+
MessagesTabLottieProps & Record<string, unknown>
|
|
1847
|
+
>;
|
|
1848
|
+
/**
|
|
1849
|
+
* Props of `MessagesTabLottie` (function). Exports: MessagesTabLottie.
|
|
1850
|
+
* @see design/components/LottieIcon/native/generated/MessagesTabLottie.tsx
|
|
1851
|
+
*/
|
|
1852
|
+
export type MessagesTabLottieProps = Omit<LottieIconProps, 'ref'> & {
|
|
1853
|
+
ref?: LottieIconProps['ref'];
|
|
1854
|
+
};
|
|
1855
|
+
export type MicrophoneLottieComponent = React$1.ComponentType<
|
|
1856
|
+
MicrophoneLottieProps & Record<string, unknown>
|
|
1857
|
+
>;
|
|
1858
|
+
/**
|
|
1859
|
+
* Props of `MicrophoneLottie` (function). Exports: MicrophoneLottie.
|
|
1860
|
+
* @see design/components/LottieIcon/native/generated/MicrophoneLottie.tsx
|
|
1861
|
+
*/
|
|
1862
|
+
export type MicrophoneLottieProps = Omit<LottieIconProps, 'ref'> & {
|
|
1863
|
+
ref?: LottieIconProps['ref'];
|
|
1864
|
+
};
|
|
1865
|
+
export type ModalActionButtonComponent = React$1.ComponentType<
|
|
1866
|
+
ModalActionButtonProps & Record<string, unknown>
|
|
1867
|
+
>;
|
|
1868
|
+
/**
|
|
1869
|
+
* Props of `ModalActionButton` (function). Exports: ModalActionButton.
|
|
1870
|
+
* @see design/components/Modal/native/ModalActionButton.native.tsx
|
|
1871
|
+
*/
|
|
1872
|
+
export type ModalActionButtonProps = Omit<BaseTextButtonProps, 'variant'> & {
|
|
1873
|
+
variant?: BaseTextButtonProps['variant'];
|
|
1874
|
+
};
|
|
1875
|
+
export type ModalContentComponent = React$1.ComponentType<ModalContentProps>;
|
|
1876
|
+
/**
|
|
1877
|
+
* Props of `ModalContent` (function). Exports: ModalContent.
|
|
1878
|
+
* @see design/components/Modal/native/ModalContent.native.tsx
|
|
1879
|
+
*/
|
|
1880
|
+
export type ModalContentProps = {
|
|
1881
|
+
children?: React$1.ComponentProps<typeof RN.ScrollView>['children'];
|
|
1882
|
+
ref?: React$1.Ref<any>;
|
|
157
1883
|
};
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
1884
|
+
export type ModalDisclaimerComponent = React$1.ComponentType<ModalDisclaimerProps>;
|
|
1885
|
+
/**
|
|
1886
|
+
* Props of `ModalDisclaimer` (function). Exports: ModalDisclaimer.
|
|
1887
|
+
* @see design/components/Modal/native/ModalDisclaimer.native.tsx
|
|
1888
|
+
*/
|
|
1889
|
+
export type ModalDisclaimerProps = {
|
|
1890
|
+
children?: DesignTextProps['children'];
|
|
164
1891
|
};
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
1892
|
+
export type ModalFloatingActionComponent = React$1.ComponentType<
|
|
1893
|
+
ModalFloatingActionProps & Record<string, unknown>
|
|
1894
|
+
>;
|
|
1895
|
+
/**
|
|
1896
|
+
* Props of `ModalFloatingAction` (function). Exports: ModalFloatingAction.
|
|
1897
|
+
* @see design/components/Modal/native/ModalFloatingAction.native.tsx
|
|
1898
|
+
*/
|
|
1899
|
+
export type ModalFloatingActionProps = Omit<
|
|
1900
|
+
ModalActionButtonProps,
|
|
1901
|
+
'floatingBackgroundColor' | 'isVisible'
|
|
1902
|
+
> & {
|
|
1903
|
+
floatingBackgroundColor?: unknown;
|
|
1904
|
+
isVisible?: boolean;
|
|
1905
|
+
};
|
|
1906
|
+
export type ModalFloatingActionSpacerComponent =
|
|
1907
|
+
React$1.ComponentType<ModalFloatingActionSpacerProps>;
|
|
1908
|
+
/**
|
|
1909
|
+
* Props of `ModalFloatingActionSpacer` (function). Exports: ModalFloatingActionSpacer.
|
|
1910
|
+
* @see design/components/Modal/native/ModalFloatingAction.native.tsx
|
|
1911
|
+
*/
|
|
1912
|
+
export type ModalFloatingActionSpacerProps = {};
|
|
1913
|
+
export type ModalFooterComponent = React$1.ComponentType<ModalFooterProps>;
|
|
1914
|
+
/**
|
|
1915
|
+
* Props of `ModalFooter` (function). Exports: ModalFooter.
|
|
1916
|
+
* @see design/components/Modal/native/ModalFooter.native.tsx
|
|
1917
|
+
*/
|
|
1918
|
+
export type ModalFooterProps = {
|
|
1919
|
+
children?: React$1.ComponentProps<typeof RN.View>['children'];
|
|
171
1920
|
};
|
|
1921
|
+
export type ModalScreenComponent = React$1.ComponentType<ModalScreenProps>;
|
|
172
1922
|
/**
|
|
173
|
-
*
|
|
174
|
-
*
|
|
1923
|
+
* Props of `ModalScreen` (function). Exports: ModalScreen.
|
|
1924
|
+
* @see design/components/Modal/native/ModalScreen.native.tsx
|
|
175
1925
|
*/
|
|
176
|
-
export type
|
|
177
|
-
|
|
178
|
-
|
|
1926
|
+
export type ModalScreenProps = {
|
|
1927
|
+
backgroundColor?: string;
|
|
1928
|
+
children?: React$1.ComponentProps<typeof RN.View>['children'];
|
|
1929
|
+
};
|
|
1930
|
+
export type ModalStepIndicatorComponent = React$1.ComponentType<ModalStepIndicatorProps>;
|
|
179
1931
|
/**
|
|
180
|
-
*
|
|
181
|
-
*
|
|
1932
|
+
* Props of `ModalStepIndicator` (function). Exports: ModalStepIndicator.
|
|
1933
|
+
* @see design/components/Modal/native/ModalStepIndicator.native.tsx
|
|
182
1934
|
*/
|
|
183
|
-
export type
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
TableRowGroupTitle: ReactModule.ComponentType<TableRowGroupTitleProps>;
|
|
196
|
-
TableRowIcon: ReactModule.ComponentType<TableRowIconProps>;
|
|
197
|
-
RowButton: ReactModule.ComponentType<RowButtonProps>;
|
|
198
|
-
RowGroup: ReactModule.ComponentType<ViewProps>;
|
|
199
|
-
Button: ButtonComponent;
|
|
200
|
-
IconButton: ReactModule.ComponentType<IconButtonProps>;
|
|
201
|
-
ImageButton: ReactModule.ComponentType<ViewProps>;
|
|
202
|
-
FloatingActionButton: ReactModule.ComponentType<FloatingActionButtonProps>;
|
|
203
|
-
TextInput: ReactModule.ComponentType<TextInputProps>;
|
|
204
|
-
TextField: ReactModule.ComponentType<TextFieldProps>;
|
|
205
|
-
TextArea: ReactModule.ComponentType<TextAreaProps>;
|
|
206
|
-
TextAreaField: ReactModule.ComponentType<TextAreaProps>;
|
|
207
|
-
SearchField: ReactModule.ComponentType<Omit<TextFieldProps, 'leadingIcon'>>;
|
|
208
|
-
GhostInput: ReactModule.ComponentType<GhostInputProps>;
|
|
209
|
-
SplitTextInput: ReactModule.ComponentType<SplitTextInputProps>;
|
|
210
|
-
Slider: ReactModule.ComponentType<SliderProps>;
|
|
211
|
-
Checkbox: ReactModule.ComponentType<CheckboxProps>;
|
|
212
|
-
SegmentedControl: ReactModule.ComponentType<SegmentedControlProps>;
|
|
213
|
-
SegmentedControlPages: ReactModule.ComponentType<SegmentedControlPagesProps>;
|
|
214
|
-
useSegmentedControlState: (options: SegmentedControlStateOptions) => SegmentedControlState;
|
|
215
|
-
Stack: ReactModule.ComponentType<StackProps>;
|
|
216
|
-
Card: ReactModule.ComponentType<CardProps>;
|
|
217
|
-
AlertModal: ReactModule.ComponentType<AlertModalProps>;
|
|
218
|
-
AlertActionButton: ReactModule.ComponentType<AlertActionButtonProps>;
|
|
219
|
-
ActionSheet: ReactModule.ComponentType<ActionSheetProps>;
|
|
220
|
-
ActionSheetRow: ReactModule.ComponentType<ActionSheetRowProps>;
|
|
221
|
-
ContextMenu: ReactModule.ComponentType<ContextMenuProps>;
|
|
222
|
-
openAlert: DiscordFunction<void>;
|
|
223
|
-
dismissAlert: (key: string) => void;
|
|
224
|
-
dismissAlerts: DiscordFunction<void>;
|
|
225
|
-
showConfirmModal: DiscordFunction;
|
|
226
|
-
showSimpleActionSheet: DiscordFunction;
|
|
227
|
-
hideContextMenu: DiscordFunction<void>;
|
|
228
|
-
useNavigation: <T = any>() => Navigation<T>;
|
|
229
|
-
setColorOpacity: (color: string, opacity: number) => string;
|
|
230
|
-
darkenColor: (color: string, amount: number) => string;
|
|
231
|
-
brightenColor: (color: string, amount: number) => string;
|
|
232
|
-
getContrastingColor: (color: string) => string;
|
|
233
|
-
TransitionStates: EnumLike<typeof TRANSITION_STATE_KEYS>;
|
|
234
|
-
ThemeContextFlags: EnumLike<typeof THEME_FLAG_KEYS>;
|
|
235
|
-
WCAGContrastRatios: Record<'NonText' | 'Text' | 'HighContrastText', number>;
|
|
1935
|
+
export type ModalStepIndicatorProps = {
|
|
1936
|
+
activeColor?: unknown;
|
|
1937
|
+
currentStep?: number;
|
|
1938
|
+
inactiveColor?: unknown;
|
|
1939
|
+
inactiveOpacity?: StepPillProps['inactiveOpacity'];
|
|
1940
|
+
totalSteps?: number;
|
|
1941
|
+
};
|
|
1942
|
+
/** The outcome of checking an addon's signature against the keys compiled into the loader. */
|
|
1943
|
+
export type NativeAddonVerification = {
|
|
1944
|
+
readonly status: 'signed' | 'unsigned' | 'invalid';
|
|
1945
|
+
readonly signer?: string;
|
|
1946
|
+
readonly problem?: string;
|
|
236
1947
|
};
|
|
237
|
-
|
|
238
|
-
export type
|
|
239
|
-
|
|
240
|
-
name: string;
|
|
241
|
-
httpServerLocation: string;
|
|
242
|
-
width: number;
|
|
243
|
-
height: number;
|
|
244
|
-
scales: number[];
|
|
245
|
-
hash: string;
|
|
246
|
-
type: string;
|
|
1948
|
+
export type NativeAssociationKey = NativeHandle;
|
|
1949
|
+
export type NativeBatchReference = {
|
|
1950
|
+
readonly $nativeBatchResult: number;
|
|
247
1951
|
};
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
[P in K[number]]: number;
|
|
253
|
-
} & {
|
|
254
|
-
[n: number]: K[number];
|
|
1952
|
+
export type NativeBatchStep = {
|
|
1953
|
+
target: NativeObjectHandle | NativeBatchReference;
|
|
1954
|
+
selector: string;
|
|
1955
|
+
args: unknown[];
|
|
255
1956
|
};
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
icon?: ReactModule.ReactNode | number;
|
|
259
|
-
style?: StyleProp<ViewStyle>;
|
|
260
|
-
onPress?: DiscordFunction<void>;
|
|
1957
|
+
export type NativeCallOptions = {
|
|
1958
|
+
thread?: NativeThreadPolicy;
|
|
261
1959
|
};
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
name: string;
|
|
265
|
-
file: string;
|
|
266
|
-
path: string;
|
|
1960
|
+
export type NativeCancelablePromise<T> = Promise<T> & {
|
|
1961
|
+
cancel(): void;
|
|
267
1962
|
};
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
}
|
|
275
|
-
export type
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
disabled?: boolean;
|
|
281
|
-
label?: string;
|
|
282
|
-
accessibilityLabel?: string;
|
|
283
|
-
style?: StyleProp<ViewStyle>;
|
|
284
|
-
onPress?: DiscordFunction<void>;
|
|
1963
|
+
export type NativeClassHandle = NativeHandle;
|
|
1964
|
+
/** A plugin bundle the loader evaluated from bytecode: it takes the scoped React and returns the plugin module. */
|
|
1965
|
+
export type NativeCompiledPlugin = (react: typeof React$1) =>
|
|
1966
|
+
| Plugin$1
|
|
1967
|
+
| {
|
|
1968
|
+
default: Plugin$1;
|
|
1969
|
+
};
|
|
1970
|
+
export type NativeCrashPhase = 'starting' | 'running' | 'frozen';
|
|
1971
|
+
export type NativeCrashedAddon = {
|
|
1972
|
+
readonly id: string;
|
|
1973
|
+
readonly name: string;
|
|
1974
|
+
readonly phase?: NativeCrashPhase;
|
|
285
1975
|
};
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
manifest: IconPackManifest;
|
|
1976
|
+
export type NativeDebugBridge = {
|
|
1977
|
+
recordEvaluation(record: NativeDebugEvaluation): boolean;
|
|
1978
|
+
environment(): NativeDebugEnvironment;
|
|
290
1979
|
};
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
1980
|
+
export type NativeDebugEnvironment = {
|
|
1981
|
+
isVirtualDevice: boolean;
|
|
1982
|
+
hostAddress: string | null;
|
|
1983
|
+
resources?: NativeResourceCounts;
|
|
295
1984
|
};
|
|
296
|
-
|
|
297
|
-
export type IconSlot =
|
|
298
|
-
| ReactModule.ReactNode
|
|
299
|
-
| ReactModule.ComponentType<any>
|
|
300
|
-
| DiscordFunction<ReactModule.ReactNode>;
|
|
301
|
-
/** Input sizing, shared by the whole `TextField`/`Input` family. */
|
|
302
|
-
export type InputSize = LiteralUnion<'sm' | 'md' | 'lg'>;
|
|
303
|
-
/** Input status. `focused` is an internal state and is not user-settable. */
|
|
304
|
-
export type InputStatus = LiteralUnion<'default' | 'error'>;
|
|
305
|
-
/** {@link ToastOptions} enriched with the fields the store tracks internally. */
|
|
306
|
-
export type InternalToastOptions = {
|
|
1985
|
+
export type NativeDebugEvaluation = {
|
|
307
1986
|
id: string;
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
1987
|
+
code: string;
|
|
1988
|
+
ok: boolean;
|
|
1989
|
+
value?: string;
|
|
1990
|
+
error?: string;
|
|
1991
|
+
logs?: {
|
|
1992
|
+
level: 1 | 2 | 3;
|
|
1993
|
+
message: string;
|
|
1994
|
+
}[];
|
|
314
1995
|
};
|
|
315
|
-
export type NativeClassHandle = NativeHandle;
|
|
316
1996
|
export type NativeFFIBridge = {
|
|
317
1997
|
symbol(name: string, image?: string): NativePointer | null;
|
|
318
1998
|
call(pointer: NativePointer, signature: NativeFFISignature, ...args: unknown[]): unknown;
|
|
@@ -350,15 +2030,35 @@ export type NativeFabricBridge = {
|
|
|
350
2030
|
moduleName: string,
|
|
351
2031
|
properties?: NativeSerializableObject,
|
|
352
2032
|
): NativeFabricSurface;
|
|
2033
|
+
mountAsync(
|
|
2034
|
+
container: NativeObjectHandle,
|
|
2035
|
+
moduleName: string,
|
|
2036
|
+
properties?: NativeSerializableObject,
|
|
2037
|
+
): NativeCancelablePromise<NativeFabricSurface>;
|
|
353
2038
|
update(surface: NativeFabricSurface, properties: NativeSerializableObject): void;
|
|
2039
|
+
updateAsync(
|
|
2040
|
+
surface: NativeFabricSurface,
|
|
2041
|
+
properties: NativeSerializableObject,
|
|
2042
|
+
): NativeCancelablePromise<void>;
|
|
354
2043
|
setSize(
|
|
355
2044
|
surface: NativeFabricSurface,
|
|
356
2045
|
minimumSize: NativeFabricSize,
|
|
357
2046
|
maximumSize: NativeFabricSize,
|
|
358
2047
|
): void;
|
|
2048
|
+
setSizeAsync(
|
|
2049
|
+
surface: NativeFabricSurface,
|
|
2050
|
+
minimumSize: NativeFabricSize,
|
|
2051
|
+
maximumSize: NativeFabricSize,
|
|
2052
|
+
): NativeCancelablePromise<void>;
|
|
359
2053
|
setFrame(surface: NativeFabricSurface, frame: NativeFabricFrame): void;
|
|
2054
|
+
setFrameAsync(
|
|
2055
|
+
surface: NativeFabricSurface,
|
|
2056
|
+
frame: NativeFabricFrame,
|
|
2057
|
+
): NativeCancelablePromise<void>;
|
|
360
2058
|
measure(view: NativeObjectHandle): NativeFabricFrame;
|
|
2059
|
+
measureAsync(view: NativeObjectHandle): NativeCancelablePromise<NativeFabricFrame>;
|
|
361
2060
|
unmount(surface: NativeFabricSurface): void;
|
|
2061
|
+
unmountAsync(surface: NativeFabricSurface): NativeCancelablePromise<void>;
|
|
362
2062
|
};
|
|
363
2063
|
export type NativeFabricFrame = {
|
|
364
2064
|
x: number;
|
|
@@ -371,6 +2071,15 @@ export type NativeFabricSize = {
|
|
|
371
2071
|
height: number;
|
|
372
2072
|
};
|
|
373
2073
|
export type NativeFabricSurface = NativeHandle;
|
|
2074
|
+
export type NativeFontEntry = {
|
|
2075
|
+
readonly name: string;
|
|
2076
|
+
readonly displayName: string;
|
|
2077
|
+
readonly family?: string;
|
|
2078
|
+
readonly style?: string;
|
|
2079
|
+
readonly path?: string;
|
|
2080
|
+
readonly source: NativeFontSource;
|
|
2081
|
+
};
|
|
2082
|
+
export type NativeFontSource = 'app' | 'system' | 'custom';
|
|
374
2083
|
/** An opaque reference to a native object. Only the bridge creates handles; plugins pass them back. */
|
|
375
2084
|
export type NativeHandle = {
|
|
376
2085
|
readonly [nativeHandle]: true;
|
|
@@ -399,6 +2108,135 @@ export type NativeHookToken = {
|
|
|
399
2108
|
clearReturnValues(): void;
|
|
400
2109
|
remove(): void;
|
|
401
2110
|
};
|
|
2111
|
+
export type NativeJavaArgument = NativeJavaValue | NativeJavaHandle;
|
|
2112
|
+
export type NativeJavaAssociationKey = NativeHandle;
|
|
2113
|
+
export type NativeJavaBatchOperation = {
|
|
2114
|
+
op: 'invoke' | 'getField' | 'setField' | 'respondsTo';
|
|
2115
|
+
handle: NativeJavaReference;
|
|
2116
|
+
name: string;
|
|
2117
|
+
args?: NativeJavaArgument[];
|
|
2118
|
+
value?: NativeJavaArgument;
|
|
2119
|
+
};
|
|
2120
|
+
export type NativeJavaBridge = {
|
|
2121
|
+
getClass(name: string): NativeJavaHandle;
|
|
2122
|
+
describe(name: string): NativeJavaClassDescription;
|
|
2123
|
+
batch(operations: NativeJavaBatchOperation[]): NativeJavaValue[];
|
|
2124
|
+
createAssociationKey(): NativeJavaAssociationKey;
|
|
2125
|
+
getAssociatedObject(
|
|
2126
|
+
handle: NativeJavaReference,
|
|
2127
|
+
key: NativeJavaAssociationKey,
|
|
2128
|
+
): NativeJavaValue;
|
|
2129
|
+
setAssociatedObject(
|
|
2130
|
+
handle: NativeJavaReference,
|
|
2131
|
+
key: NativeJavaAssociationKey,
|
|
2132
|
+
value: NativeJavaArgument,
|
|
2133
|
+
): void;
|
|
2134
|
+
className(handle: NativeJavaReference): NativeJavaValue;
|
|
2135
|
+
construct(name: string, args?: NativeJavaArgument[]): NativeJavaHandle;
|
|
2136
|
+
respondsTo(
|
|
2137
|
+
handle: NativeJavaReference,
|
|
2138
|
+
name: string,
|
|
2139
|
+
args?: NativeJavaArgument[],
|
|
2140
|
+
): NativeJavaValue;
|
|
2141
|
+
invoke(handle: NativeJavaReference, name: string, args?: NativeJavaArgument[]): NativeJavaValue;
|
|
2142
|
+
invokeAsync(
|
|
2143
|
+
handle: NativeJavaReference,
|
|
2144
|
+
name: string,
|
|
2145
|
+
args?: NativeJavaArgument[],
|
|
2146
|
+
): NativeCancelablePromise<NativeJavaValue>;
|
|
2147
|
+
getField(handle: NativeJavaReference, name: string): NativeJavaValue;
|
|
2148
|
+
setField(handle: NativeJavaReference, name: string, value: NativeJavaArgument): void;
|
|
2149
|
+
release(handle: NativeJavaReference): void;
|
|
2150
|
+
};
|
|
2151
|
+
export type NativeJavaClassDescription = {
|
|
2152
|
+
name: string;
|
|
2153
|
+
superclass: string | null;
|
|
2154
|
+
interfaces: string[];
|
|
2155
|
+
constructors: string[][];
|
|
2156
|
+
methods: NativeJavaMethodDescription[];
|
|
2157
|
+
fields: NativeJavaFieldDescription[];
|
|
2158
|
+
};
|
|
2159
|
+
export type NativeJavaFieldDescription = {
|
|
2160
|
+
name: string;
|
|
2161
|
+
type: string;
|
|
2162
|
+
static: boolean;
|
|
2163
|
+
};
|
|
2164
|
+
export type NativeJavaHandle = NativeHandle;
|
|
2165
|
+
export type NativeJavaHandleValue = {
|
|
2166
|
+
type: 'handle';
|
|
2167
|
+
value: string;
|
|
2168
|
+
};
|
|
2169
|
+
export type NativeJavaHookEvent = {
|
|
2170
|
+
self: NativeJavaValue;
|
|
2171
|
+
args: NativeJavaValue[];
|
|
2172
|
+
};
|
|
2173
|
+
export type NativeJavaHookOptions = {
|
|
2174
|
+
replace?: boolean;
|
|
2175
|
+
notify?: boolean;
|
|
2176
|
+
};
|
|
2177
|
+
export type NativeJavaHookToken = {
|
|
2178
|
+
readonly id: string;
|
|
2179
|
+
};
|
|
2180
|
+
export type NativeJavaHooksBridge = {
|
|
2181
|
+
hook(
|
|
2182
|
+
className: string,
|
|
2183
|
+
methodName: string,
|
|
2184
|
+
parameterTypes: string[],
|
|
2185
|
+
options?: NativeJavaHookOptions,
|
|
2186
|
+
listener?: (event: NativeJavaHookEvent) => void,
|
|
2187
|
+
): NativeJavaHookToken;
|
|
2188
|
+
setReturnValue(
|
|
2189
|
+
token: NativeJavaHookToken,
|
|
2190
|
+
self: NativeJavaValue,
|
|
2191
|
+
args: NativeJavaValue[],
|
|
2192
|
+
value: NativeJavaValue,
|
|
2193
|
+
): void;
|
|
2194
|
+
removeReturnValue(
|
|
2195
|
+
token: NativeJavaHookToken,
|
|
2196
|
+
self: NativeJavaValue,
|
|
2197
|
+
args: NativeJavaValue[],
|
|
2198
|
+
): void;
|
|
2199
|
+
clearReturnValues(token: NativeJavaHookToken): void;
|
|
2200
|
+
remove(token: NativeJavaHookToken): void;
|
|
2201
|
+
};
|
|
2202
|
+
export type NativeJavaMethodDescription = {
|
|
2203
|
+
name: string;
|
|
2204
|
+
parameters: string[];
|
|
2205
|
+
returnType: string;
|
|
2206
|
+
static: boolean;
|
|
2207
|
+
};
|
|
2208
|
+
export type NativeJavaReference = NativeJavaHandle | NativeJavaHandleValue;
|
|
2209
|
+
export type NativeJavaValue =
|
|
2210
|
+
| {
|
|
2211
|
+
type: 'null';
|
|
2212
|
+
class?: string;
|
|
2213
|
+
}
|
|
2214
|
+
| NativeJavaHandleValue
|
|
2215
|
+
| {
|
|
2216
|
+
type: 'string';
|
|
2217
|
+
value: string;
|
|
2218
|
+
}
|
|
2219
|
+
| {
|
|
2220
|
+
type: 'boolean';
|
|
2221
|
+
value: boolean;
|
|
2222
|
+
}
|
|
2223
|
+
| {
|
|
2224
|
+
type: 'byte' | 'short' | 'int' | 'long';
|
|
2225
|
+
value: number;
|
|
2226
|
+
}
|
|
2227
|
+
| {
|
|
2228
|
+
type: 'float' | 'double';
|
|
2229
|
+
value: number;
|
|
2230
|
+
}
|
|
2231
|
+
| {
|
|
2232
|
+
type: 'char';
|
|
2233
|
+
value: string;
|
|
2234
|
+
}
|
|
2235
|
+
| {
|
|
2236
|
+
type: 'array';
|
|
2237
|
+
componentType: string;
|
|
2238
|
+
value: (NativeJavaValue | NativeJavaHandle | string | number | boolean)[];
|
|
2239
|
+
};
|
|
402
2240
|
export type NativeObjCBridge = {
|
|
403
2241
|
getClass(name: string): NativeClassHandle | null;
|
|
404
2242
|
alloc(classOrName: string | NativeClassHandle): NativeObjectHandle;
|
|
@@ -417,6 +2255,21 @@ export type NativeObjCBridge = {
|
|
|
417
2255
|
args: unknown[],
|
|
418
2256
|
options?: NativeCallOptions,
|
|
419
2257
|
): unknown;
|
|
2258
|
+
invokeAsync(
|
|
2259
|
+
handle: NativeObjectHandle,
|
|
2260
|
+
selector: string,
|
|
2261
|
+
args: unknown[],
|
|
2262
|
+
): NativeCancelablePromise<unknown>;
|
|
2263
|
+
batch(steps: readonly NativeBatchStep[]): NativeCancelablePromise<unknown[]>;
|
|
2264
|
+
snapshot(
|
|
2265
|
+
root: NativeObjectHandle,
|
|
2266
|
+
options?: NativeViewSnapshotOptions,
|
|
2267
|
+
): NativeCancelablePromise<NativeViewSnapshotNode[]>;
|
|
2268
|
+
findViews(
|
|
2269
|
+
root: NativeObjectHandle,
|
|
2270
|
+
className: string,
|
|
2271
|
+
options?: NativeViewSearchOptions,
|
|
2272
|
+
): NativeCancelablePromise<NativeObjectHandle[]>;
|
|
420
2273
|
invokeSuper(
|
|
421
2274
|
handle: NativeObjectHandle,
|
|
422
2275
|
currentClass: NativeClassHandle | string,
|
|
@@ -424,6 +2277,12 @@ export type NativeObjCBridge = {
|
|
|
424
2277
|
args: unknown[],
|
|
425
2278
|
options?: NativeCallOptions,
|
|
426
2279
|
): unknown;
|
|
2280
|
+
invokeSuperAsync(
|
|
2281
|
+
handle: NativeObjectHandle,
|
|
2282
|
+
currentClass: NativeClassHandle | string,
|
|
2283
|
+
selector: string,
|
|
2284
|
+
args: unknown[],
|
|
2285
|
+
): NativeCancelablePromise<unknown>;
|
|
427
2286
|
getIvar(handle: NativeObjectHandle, name: string): unknown;
|
|
428
2287
|
setIvar(handle: NativeObjectHandle, name: string, value: unknown): void;
|
|
429
2288
|
createAssociationKey(): NativeAssociationKey;
|
|
@@ -448,23 +2307,58 @@ export type NativeObjCBridge = {
|
|
|
448
2307
|
): NativeHookToken;
|
|
449
2308
|
};
|
|
450
2309
|
export type NativeObjectHandle = NativeHandle;
|
|
2310
|
+
export type NativePlatformAddons = {
|
|
2311
|
+
/** Checks a manifest's `signature` against its bundle. */
|
|
2312
|
+
verify(manifest: string, bundle: string): NativeAddonVerification;
|
|
2313
|
+
/** Evaluates an installed plugin's bundle compiled for this bytecode version, if its digest matches the manifest. */
|
|
2314
|
+
evaluateBytecode?(folder: string, bytecodeVersion: number): NativeCompiledPlugin | undefined;
|
|
2315
|
+
};
|
|
451
2316
|
export type NativePlatformApp = {
|
|
452
2317
|
getAppSource(): string;
|
|
2318
|
+
/** True for the first caller in this process; a reloaded runtime sees false. Missing on older loaders. */
|
|
2319
|
+
claimLaunchURL?(): boolean;
|
|
453
2320
|
};
|
|
454
2321
|
export type NativePlatformBridge = {
|
|
2322
|
+
readonly platform: NativePluginPlatform;
|
|
455
2323
|
evaluateBytecode(bytecode: ArrayBuffer, tag?: string): unknown;
|
|
456
2324
|
readonly device: NativePlatformDevice;
|
|
457
2325
|
readonly app: NativePlatformApp;
|
|
2326
|
+
readonly files?: NativePlatformFiles;
|
|
2327
|
+
readonly crashGuard?: NativePlatformCrashGuard;
|
|
2328
|
+
readonly settings?: NativePlatformSettings;
|
|
2329
|
+
readonly fonts?: NativePlatformFonts;
|
|
2330
|
+
readonly addons?: NativePlatformAddons;
|
|
2331
|
+
readonly ios?: NativePlatformIOSBridge;
|
|
2332
|
+
};
|
|
2333
|
+
export type NativePlatformCrashGuard = {
|
|
2334
|
+
begin(id: string, name: string): boolean;
|
|
2335
|
+
end(id: string): boolean;
|
|
2336
|
+
disabled(): NativeCrashedAddon[];
|
|
2337
|
+
register?(id: string, name: string): number;
|
|
2338
|
+
activity?(): ArrayBuffer | undefined;
|
|
458
2339
|
};
|
|
459
2340
|
export type NativePlatformDevice = {
|
|
2341
|
+
readonly platform: NativePluginPlatform;
|
|
460
2342
|
getDeviceModel(): string;
|
|
461
|
-
|
|
462
|
-
|
|
2343
|
+
getOSVersionString(): string;
|
|
2344
|
+
isRooted(): boolean;
|
|
463
2345
|
isSystemApp(): boolean;
|
|
2346
|
+
isVirtualDevice(): boolean;
|
|
2347
|
+
};
|
|
2348
|
+
export type NativePlatformFiles = {
|
|
2349
|
+
remove(path: string): boolean;
|
|
2350
|
+
};
|
|
2351
|
+
export type NativePlatformFonts = {
|
|
2352
|
+
list(): NativeFontEntry[];
|
|
2353
|
+
};
|
|
2354
|
+
export type NativePlatformIOSBridge = {
|
|
464
2355
|
isVerifiedBuild(): boolean;
|
|
465
2356
|
getEntitlements(): NativeSerializableObject;
|
|
466
2357
|
getEntitlementsAsPlist(): string;
|
|
467
2358
|
};
|
|
2359
|
+
export type NativePlatformSettings = {
|
|
2360
|
+
apply(changes: readonly NativeSettingsChange[]): boolean;
|
|
2361
|
+
};
|
|
468
2362
|
export type NativePluginBridge = {
|
|
469
2363
|
readonly apiVersion: string;
|
|
470
2364
|
readonly abiVersion: string;
|
|
@@ -472,6 +2366,10 @@ export type NativePluginBridge = {
|
|
|
472
2366
|
readonly objc: NativeObjCBridge;
|
|
473
2367
|
readonly ffi: NativeFFIBridge;
|
|
474
2368
|
readonly fabric: NativeFabricBridge;
|
|
2369
|
+
readonly runtime: NativeRuntimeBridge;
|
|
2370
|
+
readonly java: NativeJavaBridge;
|
|
2371
|
+
readonly hooks: NativeJavaHooksBridge;
|
|
2372
|
+
readonly debug: NativeDebugBridge;
|
|
475
2373
|
};
|
|
476
2374
|
export type NativePluginCapability = (typeof NATIVE_PLUGIN_CAPABILITIES)[number];
|
|
477
2375
|
export type NativePluginError = {
|
|
@@ -485,7 +2383,37 @@ export type NativePluginErrorCode =
|
|
|
485
2383
|
| 'NATIVE_PLUGIN_CAPABILITY_DENIED'
|
|
486
2384
|
| 'NATIVE_PLUGIN_SCOPE_DISPOSED'
|
|
487
2385
|
| 'NATIVE_PLUGIN_UNAVAILABLE';
|
|
2386
|
+
export type NativePluginPlatform = 'ios' | 'android';
|
|
2387
|
+
export type NativePluginRuntimeBridge = Pick<
|
|
2388
|
+
NativePluginBridge,
|
|
2389
|
+
'apiVersion' | 'abiVersion' | 'capabilities'
|
|
2390
|
+
> &
|
|
2391
|
+
Partial<Omit<NativePluginBridge, 'apiVersion' | 'abiVersion' | 'capabilities'>>;
|
|
488
2392
|
export type NativePointer = NativeHandle;
|
|
2393
|
+
export type NativeResourceCounts = {
|
|
2394
|
+
hooks: number;
|
|
2395
|
+
surfaces: number;
|
|
2396
|
+
cachedReturns: number;
|
|
2397
|
+
handles: number;
|
|
2398
|
+
};
|
|
2399
|
+
export type NativeRuntimeBridge = {
|
|
2400
|
+
subscribe(
|
|
2401
|
+
event: NativeRuntimeEventName,
|
|
2402
|
+
listener: (payload: NativeSerializableObject) => void,
|
|
2403
|
+
): NativeRuntimeEventToken;
|
|
2404
|
+
};
|
|
2405
|
+
export type NativeRuntimeEventName =
|
|
2406
|
+
| 'message.created'
|
|
2407
|
+
| 'message.updated'
|
|
2408
|
+
| 'message.deleted'
|
|
2409
|
+
| 'reaction.updated'
|
|
2410
|
+
| 'channel.changed'
|
|
2411
|
+
| 'composer.changed'
|
|
2412
|
+
| 'ui.changed';
|
|
2413
|
+
export type NativeRuntimeEventToken = {
|
|
2414
|
+
readonly active: boolean;
|
|
2415
|
+
remove(): void;
|
|
2416
|
+
};
|
|
489
2417
|
/** A value the bridge serializes by structure, such as Fabric surface props or a plist. */
|
|
490
2418
|
export type NativeSerializable =
|
|
491
2419
|
| string
|
|
@@ -497,6 +2425,21 @@ export type NativeSerializable =
|
|
|
497
2425
|
export type NativeSerializableObject = {
|
|
498
2426
|
[key: string]: NativeSerializable;
|
|
499
2427
|
};
|
|
2428
|
+
export type NativeSettingsChange =
|
|
2429
|
+
| {
|
|
2430
|
+
store: string;
|
|
2431
|
+
key: string;
|
|
2432
|
+
value: NativeSerializable;
|
|
2433
|
+
}
|
|
2434
|
+
| {
|
|
2435
|
+
store: string;
|
|
2436
|
+
key: string;
|
|
2437
|
+
remove: true;
|
|
2438
|
+
}
|
|
2439
|
+
| {
|
|
2440
|
+
store: string;
|
|
2441
|
+
clear: true;
|
|
2442
|
+
};
|
|
500
2443
|
export type NativeStruct<T extends NativeStructFields = NativeStructFields> = {
|
|
501
2444
|
readonly name: string;
|
|
502
2445
|
readonly value?: T;
|
|
@@ -507,6 +2450,33 @@ export type NativeStructFields = {
|
|
|
507
2450
|
[field: string]: NativeStructField;
|
|
508
2451
|
};
|
|
509
2452
|
export type NativeThreadPolicy = 'current' | 'main';
|
|
2453
|
+
export type NativeViewSearchOptions = {
|
|
2454
|
+
maxDepth?: number;
|
|
2455
|
+
maxVisited?: number;
|
|
2456
|
+
maxResults?: number;
|
|
2457
|
+
attachedOnly?: boolean;
|
|
2458
|
+
stopAtMatch?: boolean;
|
|
2459
|
+
direction?: 'ancestors' | 'descendants';
|
|
2460
|
+
};
|
|
2461
|
+
export type NativeViewSnapshotNode = {
|
|
2462
|
+
view: NativeObjectHandle;
|
|
2463
|
+
parent: number;
|
|
2464
|
+
depth: number;
|
|
2465
|
+
className: string;
|
|
2466
|
+
frame: NativeFabricFrame;
|
|
2467
|
+
text: string | null;
|
|
2468
|
+
visible: boolean;
|
|
2469
|
+
};
|
|
2470
|
+
export type NativeViewSnapshotOptions = {
|
|
2471
|
+
maxDepth?: number;
|
|
2472
|
+
maxNodes?: number;
|
|
2473
|
+
};
|
|
2474
|
+
export type NavScrimComponent = React$1.ComponentType<NavScrimProps>;
|
|
2475
|
+
/**
|
|
2476
|
+
* Props of `NavScrim` (memo). Exports: NavScrim.
|
|
2477
|
+
* @see design/components/Navigator/native/NavScrim.ios.tsx
|
|
2478
|
+
*/
|
|
2479
|
+
export type NavScrimProps = {};
|
|
510
2480
|
export type Navigation<T = any> = {
|
|
511
2481
|
push: (route: string, params?: T) => void;
|
|
512
2482
|
pop: () => void;
|
|
@@ -515,21 +2485,366 @@ export type Navigation<T = any> = {
|
|
|
515
2485
|
setOptions: (options: NavigationOptions) => void;
|
|
516
2486
|
addListener: (event: string, callback: DiscordFunction) => DiscordFunction<void>;
|
|
517
2487
|
};
|
|
518
|
-
/**
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
2488
|
+
/**
|
|
2489
|
+
* Props of `NavigationContainerInner` (forwardRef). Exports: NavigationContainer.
|
|
2490
|
+
* @see module 4871 (no source path)
|
|
2491
|
+
*/
|
|
2492
|
+
export type NavigationContainerInnerProps = Omit<
|
|
2493
|
+
BaseNavigationContainerProps,
|
|
2494
|
+
'direction' | 'documentTitle' | 'fallback' | 'initialState' | 'linking' | 'theme'
|
|
2495
|
+
> & {
|
|
2496
|
+
direction?: unknown;
|
|
2497
|
+
documentTitle?: unknown;
|
|
2498
|
+
/** @default null */
|
|
2499
|
+
fallback?: ThemeProviderProps['children'];
|
|
2500
|
+
initialState?: BaseNavigationContainerProps['initialState'];
|
|
2501
|
+
linking?: {
|
|
2502
|
+
config?: unknown;
|
|
2503
|
+
enabled?: unknown;
|
|
2504
|
+
getActionFromState?: unknown;
|
|
2505
|
+
getPathFromState?: unknown;
|
|
2506
|
+
getStateFromPath?: unknown;
|
|
2507
|
+
prefixes?: unknown;
|
|
2508
|
+
};
|
|
2509
|
+
theme?: unknown;
|
|
2510
|
+
};
|
|
2511
|
+
/** The screen options accepted by {@link Navigation.setOptions}. */
|
|
2512
|
+
export type NavigationOptions = {
|
|
2513
|
+
title?: string;
|
|
2514
|
+
headerRight?: DiscordFunction<React$1.ReactNode>;
|
|
2515
|
+
};
|
|
2516
|
+
/**
|
|
2517
|
+
* Props of `NavigationStack` (function). Exports: none.
|
|
2518
|
+
* @see design/components/Navigator/native/Navigator.native.tsx
|
|
2519
|
+
*/
|
|
2520
|
+
export type NavigationStackProps = {
|
|
2521
|
+
cardOverlayEnabled?: unknown;
|
|
2522
|
+
cardShadowEnabled?: unknown;
|
|
2523
|
+
cardStyle?: RN.StyleProp<RN.ViewStyle | RN.TextStyle | RN.ImageStyle>;
|
|
2524
|
+
detachInactiveScreens?: unknown;
|
|
2525
|
+
disableHeaderAnimation?: boolean;
|
|
2526
|
+
gestureDirection?: unknown;
|
|
2527
|
+
gestureResponseDistance?: unknown;
|
|
2528
|
+
headerBackTitle?: unknown;
|
|
2529
|
+
headerLeftContainerStyle?: RN.StyleProp<RN.ViewStyle | RN.TextStyle | RN.ImageStyle>;
|
|
2530
|
+
headerRightContainerStyle?: RN.StyleProp<RN.ViewStyle | RN.TextStyle | RN.ImageStyle>;
|
|
2531
|
+
headerStatusBarHeight?: unknown;
|
|
2532
|
+
headerStyle?: RN.StyleProp<RN.ViewStyle | RN.TextStyle | RN.ImageStyle>;
|
|
2533
|
+
/** @default 'center' */
|
|
2534
|
+
headerTitleAlign?: 'center' | (string & {});
|
|
2535
|
+
headerTitleContainerStyle?: RN.StyleProp<RN.ViewStyle | RN.TextStyle | RN.ImageStyle>;
|
|
2536
|
+
hideTitle?: boolean;
|
|
2537
|
+
initialRouteName?: unknown;
|
|
2538
|
+
onDidFocus?: (...args: any[]) => unknown;
|
|
2539
|
+
onWillFocus?: (...args: any[]) => unknown;
|
|
2540
|
+
screens?: unknown;
|
|
2541
|
+
viewStyle?: NavigatorScreenProps['viewStyle'];
|
|
2542
|
+
};
|
|
2543
|
+
export type NavigatorComponent = React$1.ComponentType<NavigatorProps & Record<string, unknown>>;
|
|
2544
|
+
export type NavigatorHeaderComponent = React$1.ComponentType<NavigatorHeaderProps>;
|
|
2545
|
+
/**
|
|
2546
|
+
* Props of `NavigatorHeader` (function). Exports: NavigatorHeader.
|
|
2547
|
+
* @see design/components/Navigator/native/NavigatorHeader.native.tsx
|
|
2548
|
+
*/
|
|
2549
|
+
export type NavigatorHeaderProps = {
|
|
2550
|
+
icon?: React$1.ComponentProps<typeof RN.View>['children'];
|
|
2551
|
+
subtitle?: DesignTextProps['children'];
|
|
2552
|
+
title?: DesignTextProps['children'];
|
|
2553
|
+
};
|
|
2554
|
+
/**
|
|
2555
|
+
* Props of `Navigator` (function). Exports: Navigator.
|
|
2556
|
+
* @see design/components/Navigator/native/Navigator.native.tsx
|
|
2557
|
+
*/
|
|
2558
|
+
export type NavigatorProps = Omit<
|
|
2559
|
+
WrappedNavigationStackProps,
|
|
2560
|
+
'containerStyle' | 'useContainer'
|
|
2561
|
+
> & {
|
|
2562
|
+
containerStyle?: React$1.ComponentProps<typeof RN.View>['style'];
|
|
2563
|
+
/** @default true */
|
|
2564
|
+
useContainer?: boolean;
|
|
2565
|
+
};
|
|
2566
|
+
export type NavigatorScreenComponent = React$1.ComponentType<NavigatorScreenProps>;
|
|
2567
|
+
/**
|
|
2568
|
+
* Props of `NavigatorScreen` (memo). Exports: NavigatorScreen.
|
|
2569
|
+
* @see design/components/Navigator/native/NavigatorScreen.native.tsx
|
|
2570
|
+
*/
|
|
2571
|
+
export type NavigatorScreenProps = {
|
|
2572
|
+
navigation?: unknown;
|
|
2573
|
+
route: {
|
|
2574
|
+
params?: unknown;
|
|
2575
|
+
};
|
|
2576
|
+
screen: {
|
|
2577
|
+
customNavbar?: unknown;
|
|
2578
|
+
ignoreKeyboard?: unknown;
|
|
2579
|
+
postponeRender?: unknown;
|
|
2580
|
+
render?: unknown;
|
|
2581
|
+
};
|
|
2582
|
+
viewStyle?: PostponeRenderProps['viewStyle'];
|
|
2583
|
+
};
|
|
2584
|
+
/**
|
|
2585
|
+
* Props of `NewInlineNotice` (function). Exports: NewInlineNotice.
|
|
2586
|
+
* @see design/mana/components/InlineNotice/NewInlineNotice.native.tsx
|
|
2587
|
+
*/
|
|
2588
|
+
export type NewInlineNoticeProps = {
|
|
2589
|
+
action?: {
|
|
2590
|
+
onClick?: unknown;
|
|
2591
|
+
text?: unknown;
|
|
2592
|
+
};
|
|
2593
|
+
hidden?: boolean;
|
|
2594
|
+
message?: DesignTextProps['children'];
|
|
2595
|
+
onDismiss?: ButtonIconButtonProps['onPress'];
|
|
2596
|
+
role?: 'alert' | 'static' | 'status' | (string & {});
|
|
2597
|
+
title?: DesignTextProps['children'];
|
|
2598
|
+
type?: 'info' | 'warning' | (string & {});
|
|
2599
|
+
};
|
|
2600
|
+
export type NitroGem12LottieComponent = React$1.ComponentType<
|
|
2601
|
+
NitroGem12LottieProps & Record<string, unknown>
|
|
2602
|
+
>;
|
|
2603
|
+
/**
|
|
2604
|
+
* Props of `NitroGem12Lottie` (function). Exports: NitroGem12Lottie.
|
|
2605
|
+
* @see design/components/LottieIcon/native/generated/NitroGem12Lottie.tsx
|
|
2606
|
+
*/
|
|
2607
|
+
export type NitroGem12LottieProps = Omit<LottieIconProps, 'ref'> & {
|
|
2608
|
+
ref?: LottieIconProps['ref'];
|
|
2609
|
+
};
|
|
2610
|
+
export type NitroGem15LottieComponent = React$1.ComponentType<
|
|
2611
|
+
NitroGem15LottieProps & Record<string, unknown>
|
|
2612
|
+
>;
|
|
2613
|
+
/**
|
|
2614
|
+
* Props of `NitroGem15Lottie` (function). Exports: NitroGem15Lottie.
|
|
2615
|
+
* @see design/components/LottieIcon/native/generated/NitroGem15Lottie.tsx
|
|
2616
|
+
*/
|
|
2617
|
+
export type NitroGem15LottieProps = Omit<LottieIconProps, 'ref'> & {
|
|
2618
|
+
ref?: LottieIconProps['ref'];
|
|
2619
|
+
};
|
|
2620
|
+
export type NitroGem18LottieComponent = React$1.ComponentType<
|
|
2621
|
+
NitroGem18LottieProps & Record<string, unknown>
|
|
2622
|
+
>;
|
|
2623
|
+
/**
|
|
2624
|
+
* Props of `NitroGem18Lottie` (function). Exports: NitroGem18Lottie.
|
|
2625
|
+
* @see design/components/LottieIcon/native/generated/NitroGem18Lottie.tsx
|
|
2626
|
+
*/
|
|
2627
|
+
export type NitroGem18LottieProps = Omit<LottieIconProps, 'ref'> & {
|
|
2628
|
+
ref?: LottieIconProps['ref'];
|
|
2629
|
+
};
|
|
2630
|
+
export type NitroGem1LottieComponent = React$1.ComponentType<
|
|
2631
|
+
NitroGem1LottieProps & Record<string, unknown>
|
|
2632
|
+
>;
|
|
2633
|
+
/**
|
|
2634
|
+
* Props of `NitroGem1Lottie` (function). Exports: NitroGem1Lottie.
|
|
2635
|
+
* @see design/components/LottieIcon/native/generated/NitroGem1Lottie.tsx
|
|
2636
|
+
*/
|
|
2637
|
+
export type NitroGem1LottieProps = Omit<LottieIconProps, 'ref'> & {
|
|
2638
|
+
ref?: LottieIconProps['ref'];
|
|
2639
|
+
};
|
|
2640
|
+
export type NitroGem24LottieComponent = React$1.ComponentType<
|
|
2641
|
+
NitroGem24LottieProps & Record<string, unknown>
|
|
2642
|
+
>;
|
|
2643
|
+
/**
|
|
2644
|
+
* Props of `NitroGem24Lottie` (function). Exports: NitroGem24Lottie.
|
|
2645
|
+
* @see design/components/LottieIcon/native/generated/NitroGem24Lottie.tsx
|
|
2646
|
+
*/
|
|
2647
|
+
export type NitroGem24LottieProps = Omit<LottieIconProps, 'ref'> & {
|
|
2648
|
+
ref?: LottieIconProps['ref'];
|
|
2649
|
+
};
|
|
2650
|
+
export type NitroGem2LottieComponent = React$1.ComponentType<
|
|
2651
|
+
NitroGem2LottieProps & Record<string, unknown>
|
|
2652
|
+
>;
|
|
2653
|
+
/**
|
|
2654
|
+
* Props of `NitroGem2Lottie` (function). Exports: NitroGem2Lottie.
|
|
2655
|
+
* @see design/components/LottieIcon/native/generated/NitroGem2Lottie.tsx
|
|
2656
|
+
*/
|
|
2657
|
+
export type NitroGem2LottieProps = Omit<LottieIconProps, 'ref'> & {
|
|
2658
|
+
ref?: LottieIconProps['ref'];
|
|
2659
|
+
};
|
|
2660
|
+
export type NitroGem3LottieComponent = React$1.ComponentType<
|
|
2661
|
+
NitroGem3LottieProps & Record<string, unknown>
|
|
2662
|
+
>;
|
|
2663
|
+
/**
|
|
2664
|
+
* Props of `NitroGem3Lottie` (function). Exports: NitroGem3Lottie.
|
|
2665
|
+
* @see design/components/LottieIcon/native/generated/NitroGem3Lottie.tsx
|
|
2666
|
+
*/
|
|
2667
|
+
export type NitroGem3LottieProps = Omit<LottieIconProps, 'ref'> & {
|
|
2668
|
+
ref?: LottieIconProps['ref'];
|
|
2669
|
+
};
|
|
2670
|
+
export type NitroGem6LottieComponent = React$1.ComponentType<
|
|
2671
|
+
NitroGem6LottieProps & Record<string, unknown>
|
|
2672
|
+
>;
|
|
2673
|
+
/**
|
|
2674
|
+
* Props of `NitroGem6Lottie` (function). Exports: NitroGem6Lottie.
|
|
2675
|
+
* @see design/components/LottieIcon/native/generated/NitroGem6Lottie.tsx
|
|
2676
|
+
*/
|
|
2677
|
+
export type NitroGem6LottieProps = Omit<LottieIconProps, 'ref'> & {
|
|
2678
|
+
ref?: LottieIconProps['ref'];
|
|
2679
|
+
};
|
|
2680
|
+
export type NitroGem9LottieComponent = React$1.ComponentType<
|
|
2681
|
+
NitroGem9LottieProps & Record<string, unknown>
|
|
2682
|
+
>;
|
|
2683
|
+
/**
|
|
2684
|
+
* Props of `NitroGem9Lottie` (function). Exports: NitroGem9Lottie.
|
|
2685
|
+
* @see design/components/LottieIcon/native/generated/NitroGem9Lottie.tsx
|
|
2686
|
+
*/
|
|
2687
|
+
export type NitroGem9LottieProps = Omit<LottieIconProps, 'ref'> & {
|
|
2688
|
+
ref?: LottieIconProps['ref'];
|
|
2689
|
+
};
|
|
2690
|
+
export type NotificationsTabLottieComponent = React$1.ComponentType<
|
|
2691
|
+
NotificationsTabLottieProps & Record<string, unknown>
|
|
2692
|
+
>;
|
|
2693
|
+
/**
|
|
2694
|
+
* Props of `NotificationsTabLottie` (function). Exports: NotificationsTabLottie.
|
|
2695
|
+
* @see design/components/LottieIcon/native/generated/NotificationsTabLottie.tsx
|
|
2696
|
+
*/
|
|
2697
|
+
export type NotificationsTabLottieProps = Omit<LottieIconProps, 'ref'> & {
|
|
2698
|
+
ref?: LottieIconProps['ref'];
|
|
2699
|
+
};
|
|
2700
|
+
export type PileComponent = React$1.ComponentType<PileProps>;
|
|
2701
|
+
export type PileOverflowComponent = React$1.ComponentType<PileOverflowProps>;
|
|
2702
|
+
/**
|
|
2703
|
+
* Props of `PileOverflow` (function). Exports: PileOverflow.
|
|
2704
|
+
* @see design/components/Pile/native/PileOverflow.native.tsx
|
|
2705
|
+
*/
|
|
2706
|
+
export type PileOverflowProps = {
|
|
2707
|
+
borderRadius?: unknown;
|
|
2708
|
+
size?: unknown;
|
|
2709
|
+
value?: unknown;
|
|
2710
|
+
};
|
|
2711
|
+
/**
|
|
2712
|
+
* Props of `Pile` (function). Exports: Pile.
|
|
2713
|
+
* @see design/components/Pile/native/Pile.native.tsx
|
|
2714
|
+
*/
|
|
2715
|
+
export type PileProps = {
|
|
2716
|
+
'aria-label'?: React$1.ComponentProps<typeof RN.View>['aria-label'];
|
|
2717
|
+
children?: React$1.ReactNode;
|
|
2718
|
+
depthX?: number;
|
|
2719
|
+
depthY?: number;
|
|
2720
|
+
gap?: number;
|
|
2721
|
+
shape?: 'circle' | 'rounded-rect' | (string & {});
|
|
2722
|
+
size: number;
|
|
2723
|
+
};
|
|
2724
|
+
/**
|
|
2725
|
+
* Props of `PillWrapper` (function). Exports: none.
|
|
2726
|
+
* @see design/components/Button/native/ButtonPill.native.tsx
|
|
2727
|
+
*/
|
|
2728
|
+
export type PillWrapperProps = {
|
|
2729
|
+
children?: React$1.ReactNode;
|
|
2730
|
+
expressivePressState?: unknown;
|
|
2731
|
+
expressiveRiveRef?: unknown;
|
|
2732
|
+
pressed?: {
|
|
2733
|
+
get?: unknown;
|
|
2734
|
+
};
|
|
2735
|
+
/** @default false */
|
|
2736
|
+
shiny?: boolean;
|
|
2737
|
+
size?: unknown;
|
|
2738
|
+
style?: RN.StyleProp<RN.ViewStyle | RN.TextStyle | RN.ImageStyle>;
|
|
2739
|
+
variant?: ButtonShineProps['variant'];
|
|
2740
|
+
};
|
|
2741
|
+
export type PlainTextExperimentProviderComponent =
|
|
2742
|
+
React$1.ComponentType<PlainTextExperimentProviderProps>;
|
|
2743
|
+
/**
|
|
2744
|
+
* Props of `PlainTextExperimentProvider` (function). Exports: PlainTextExperimentProvider.
|
|
2745
|
+
* @see design/components/Text/native/PlainTextExperimentContext.tsx
|
|
2746
|
+
*/
|
|
2747
|
+
export type PlainTextExperimentProviderProps = {
|
|
2748
|
+
children?: React$1.ReactNode;
|
|
2749
|
+
enabled?: boolean;
|
|
2750
|
+
};
|
|
2751
|
+
export type PluginContext = {
|
|
2752
|
+
readonly manifest: AddonManifest;
|
|
2753
|
+
readonly id: string;
|
|
2754
|
+
readonly platform?: NativePluginPlatform;
|
|
2755
|
+
readonly capabilities: readonly NativePluginCapability[];
|
|
2756
|
+
readonly native: NativePluginBridge;
|
|
2757
|
+
dispose(): void;
|
|
2758
|
+
};
|
|
2759
|
+
/** An {@link Addon} whose instance is a {@link Plugin}. */
|
|
2760
|
+
export type PluginEntity = Addon & {
|
|
2761
|
+
instance: Plugin$1 | null;
|
|
2762
|
+
};
|
|
2763
|
+
/**
|
|
2764
|
+
* Props of `PostponeRender` (function). Exports: PostponeRender.
|
|
2765
|
+
* @see design/components/Navigator/native/PostponeRender.native.tsx
|
|
2766
|
+
*/
|
|
2767
|
+
export type PostponeRenderProps = {
|
|
2768
|
+
children?: React$1.ReactNode;
|
|
2769
|
+
ignoreKeyboard?: unknown;
|
|
2770
|
+
postpone?: unknown;
|
|
2771
|
+
viewStyle?: React$1.ComponentProps<typeof RN.View>['style'];
|
|
2772
|
+
};
|
|
2773
|
+
/**
|
|
2774
|
+
* Props of `PressableBase` (function). Exports: none.
|
|
2775
|
+
* @see design/void/Pressables/native/Pressables.tsx
|
|
2776
|
+
*/
|
|
2777
|
+
export type PressableBaseProps = Omit<
|
|
2778
|
+
React$1.ComponentProps<typeof RN.Pressable>,
|
|
2779
|
+
| 'activeOpacity'
|
|
2780
|
+
| 'androidRippleConfig'
|
|
2781
|
+
| 'children'
|
|
2782
|
+
| 'innerRef'
|
|
2783
|
+
| 'style'
|
|
2784
|
+
| 'type'
|
|
2785
|
+
| 'underlayColor'
|
|
2786
|
+
> & {
|
|
2787
|
+
/** @default 0.2 */
|
|
2788
|
+
activeOpacity?: number;
|
|
2789
|
+
androidRippleConfig?: {
|
|
2790
|
+
cornerRadius?: unknown;
|
|
2791
|
+
};
|
|
2792
|
+
children?: React$1.ComponentProps<typeof RN.Pressable>['children'];
|
|
2793
|
+
innerRef?: React$1.ComponentProps<typeof RN.Pressable>['ref'];
|
|
2794
|
+
style?: RN.StyleProp<RN.ViewStyle | RN.TextStyle | RN.ImageStyle>;
|
|
2795
|
+
type?: 'highlight' | 'opacity' | (string & {});
|
|
2796
|
+
underlayColor?: unknown;
|
|
2797
|
+
};
|
|
2798
|
+
/**
|
|
2799
|
+
* Props of `PressableHighlight` (function). Exports: PressableHighlight.
|
|
2800
|
+
* @see design/void/Pressables/native/Pressables.tsx
|
|
2801
|
+
*/
|
|
2802
|
+
export type PressableHighlightProps = Omit<PressableBaseProps, 'ref' | 'underlayColor'> & {
|
|
2803
|
+
ref?: PressableBaseProps['innerRef'];
|
|
2804
|
+
underlayColor?: unknown;
|
|
2805
|
+
};
|
|
2806
|
+
/**
|
|
2807
|
+
* Props of `PressableOpacity` (function). Exports: PressableOpacity.
|
|
2808
|
+
* @see design/void/Pressables/native/Pressables.tsx
|
|
2809
|
+
*/
|
|
2810
|
+
export type PressableOpacityProps = Omit<PressableBaseProps, 'activeOpacity' | 'ref'> & {
|
|
2811
|
+
/** @default 0.2 */
|
|
2812
|
+
activeOpacity?: PressableBaseProps['activeOpacity'];
|
|
2813
|
+
ref?: PressableBaseProps['innerRef'];
|
|
522
2814
|
};
|
|
523
|
-
export type
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
2815
|
+
export type PromoSheetComponent = React$1.ComponentType<PromoSheetProps & Record<string, unknown>>;
|
|
2816
|
+
/**
|
|
2817
|
+
* Props of `PromoSheet` (function). Exports: PromoSheet.
|
|
2818
|
+
* @see design/components/Sheet/native/PromoSheet.native.tsx
|
|
2819
|
+
*/
|
|
2820
|
+
export type PromoSheetProps = Omit<
|
|
2821
|
+
SheetBottomSheetProps,
|
|
2822
|
+
'actions' | 'description' | 'gradientColor' | 'graphic' | 'illustration' | 'title'
|
|
2823
|
+
> & {
|
|
2824
|
+
actions?: StackProps['children'];
|
|
2825
|
+
description?: DesignTextProps['children'];
|
|
2826
|
+
gradientColor?: ExpressiveGradientProps['color'];
|
|
2827
|
+
graphic?: unknown;
|
|
2828
|
+
illustration?: React$1.ComponentProps<typeof RN.View>['children'];
|
|
2829
|
+
title?: DesignTextProps['children'];
|
|
529
2830
|
};
|
|
530
|
-
/**
|
|
531
|
-
|
|
532
|
-
|
|
2831
|
+
/**
|
|
2832
|
+
* Props of `RedesignBottomSheetTitleHeaderBase` (function). Exports: none.
|
|
2833
|
+
* @see design/components/Sheet/native/BottomSheetTitleHeader.native.tsx
|
|
2834
|
+
*/
|
|
2835
|
+
export type RedesignBottomSheetTitleHeaderBaseProps = {
|
|
2836
|
+
subtitle?: SubtitleProps['children'];
|
|
2837
|
+
title?: TitleProps['children'];
|
|
2838
|
+
};
|
|
2839
|
+
export type RedesignCompatComponent = React$1.ComponentType<RedesignCompatProps>;
|
|
2840
|
+
/**
|
|
2841
|
+
* Props of `RedesignCompat` (function). Exports: RedesignCompat.
|
|
2842
|
+
* @see design/components/RedesignCompat/native/RedesignCompat.native.tsx
|
|
2843
|
+
*/
|
|
2844
|
+
export type RedesignCompatProps = {
|
|
2845
|
+
children?: React$1.ReactNode;
|
|
2846
|
+
/** @default true */
|
|
2847
|
+
enabled?: boolean;
|
|
533
2848
|
};
|
|
534
2849
|
/** Resolves each key of a {@link StyleSheetSpec} to the concrete RN style type it produced. */
|
|
535
2850
|
export type ResolvedStyles<T extends StyleSheetSpec> = {
|
|
@@ -539,32 +2854,130 @@ export type ResolvedStyles<T extends StyleSheetSpec> = {
|
|
|
539
2854
|
? TextStyle
|
|
540
2855
|
: ViewStyle;
|
|
541
2856
|
};
|
|
542
|
-
export type
|
|
543
|
-
|
|
544
|
-
|
|
2857
|
+
export type RowButtonComponent = React$1.ComponentType<RowButtonProps & Record<string, unknown>> &
|
|
2858
|
+
RowButtonStatics;
|
|
2859
|
+
/**
|
|
2860
|
+
* Props of `RowButton` (function). Exports: RowButton.
|
|
2861
|
+
* @see design/components/TableRow/native/RowButton.native.tsx
|
|
2862
|
+
*/
|
|
2863
|
+
export type RowButtonProps = Omit<
|
|
2864
|
+
TableRowInnerProps,
|
|
2865
|
+
'arrow' | 'disabled' | 'experimental_withBlurBackground' | 'icon' | 'onPress' | 'variant'
|
|
2866
|
+
> & {
|
|
2867
|
+
/** @default true */
|
|
545
2868
|
arrow?: boolean;
|
|
2869
|
+
/** @default false */
|
|
2870
|
+
disabled?: TableRowInnerProps['disabled'];
|
|
2871
|
+
experimental_withBlurBackground?: boolean;
|
|
2872
|
+
icon?: React$1.ReactElement | TableRowIconProps['source'];
|
|
2873
|
+
onPress?: RowButtonWrapperProps['onPress'];
|
|
2874
|
+
/** @default 'secondary' */
|
|
2875
|
+
variant?: 'primary' | 'secondary' | (string & {});
|
|
2876
|
+
};
|
|
2877
|
+
export type RowButtonStatics = {
|
|
2878
|
+
Icon: TableRowIconComponent;
|
|
2879
|
+
};
|
|
2880
|
+
/**
|
|
2881
|
+
* Props of `RowButtonWrapper` (function). Exports: none.
|
|
2882
|
+
* @see design/components/TableRow/native/RowButton.native.tsx
|
|
2883
|
+
*/
|
|
2884
|
+
export type RowButtonWrapperProps = Omit<
|
|
2885
|
+
DesignCardProps,
|
|
2886
|
+
| 'children'
|
|
2887
|
+
| 'disabled'
|
|
2888
|
+
| 'experimental_withBlurBackground'
|
|
2889
|
+
| 'onPress'
|
|
2890
|
+
| 'onPressIn'
|
|
2891
|
+
| 'onPressOut'
|
|
2892
|
+
> & {
|
|
2893
|
+
children?: BackgroundBlurViewComponentProps['children'];
|
|
546
2894
|
disabled?: boolean;
|
|
547
|
-
|
|
548
|
-
onPress?:
|
|
2895
|
+
experimental_withBlurBackground?: unknown;
|
|
2896
|
+
onPress?: DesignCardProps['onPress'];
|
|
2897
|
+
onPressIn?: (...args: any[]) => unknown;
|
|
2898
|
+
onPressOut?: (...args: any[]) => unknown;
|
|
2899
|
+
};
|
|
2900
|
+
export type SceneLoadingIndicatorComponent = React$1.ComponentType<SceneLoadingIndicatorProps>;
|
|
2901
|
+
/**
|
|
2902
|
+
* Props of `SceneLoadingIndicator` (function). Exports: SceneLoadingIndicator.
|
|
2903
|
+
* @see design/components/Navigator/native/SceneLoadingIndicator.native.tsx
|
|
2904
|
+
*/
|
|
2905
|
+
export type SceneLoadingIndicatorProps = {};
|
|
2906
|
+
export type SearchFieldComponent = React$1.ComponentType<
|
|
2907
|
+
SearchFieldProps & Record<string, unknown>
|
|
2908
|
+
>;
|
|
2909
|
+
/**
|
|
2910
|
+
* Props of `SearchField` (function). Exports: SearchField.
|
|
2911
|
+
* @see design/components/TextField/native/SearchField.native.tsx
|
|
2912
|
+
*/
|
|
2913
|
+
export type SearchFieldProps = Omit<TextFieldProps, 'ref'> & {
|
|
2914
|
+
ref?: TextFieldProps['ref'];
|
|
549
2915
|
};
|
|
2916
|
+
export type SegmentedControlComponent = React$1.ComponentType<SegmentedControlProps>;
|
|
550
2917
|
/** A tab of a segmented control, with the page it shows. */
|
|
551
2918
|
export type SegmentedControlItem = {
|
|
552
2919
|
id: string;
|
|
553
2920
|
label: string;
|
|
554
|
-
page?:
|
|
2921
|
+
page?: React$1.ReactNode;
|
|
2922
|
+
};
|
|
2923
|
+
/**
|
|
2924
|
+
* Props of `SegmentedControlItem` (function). Exports: SegmentedControlItem.
|
|
2925
|
+
* @see design/components/SegmentedControl/native/SegmentedControlItem.native.tsx
|
|
2926
|
+
*/
|
|
2927
|
+
export type SegmentedControlItemProps = {
|
|
2928
|
+
icon?: React$1.ComponentProps<typeof RN.View>['children'];
|
|
2929
|
+
index?: unknown;
|
|
2930
|
+
itemCount?: unknown;
|
|
2931
|
+
label?: DesignTextProps['children'];
|
|
2932
|
+
onPress?: React$1.ComponentProps<typeof RN.Pressable>['onPress'];
|
|
2933
|
+
onPressIn?: React$1.ComponentProps<typeof RN.Pressable>['onPressIn'];
|
|
2934
|
+
onPressOut?: React$1.ComponentProps<typeof RN.Pressable>['onPressOut'];
|
|
2935
|
+
pressed: {
|
|
2936
|
+
get?: unknown;
|
|
2937
|
+
};
|
|
2938
|
+
state: {
|
|
2939
|
+
activeIndex?: unknown;
|
|
2940
|
+
};
|
|
2941
|
+
style?: React$1.ComponentProps<typeof RN.Pressable>['style'];
|
|
2942
|
+
variant?: 'experimental_Large' | (string & {});
|
|
555
2943
|
};
|
|
556
|
-
|
|
2944
|
+
export type SegmentedControlPagesComponent = React$1.ComponentType<SegmentedControlPagesProps>;
|
|
2945
|
+
/**
|
|
2946
|
+
* Props of `SegmentedControlPages` (function). Exports: SegmentedControlPages.
|
|
2947
|
+
* @see design/components/SegmentedControl/native/SegmentedControlPages.native.tsx
|
|
2948
|
+
*/
|
|
557
2949
|
export type SegmentedControlPagesProps = {
|
|
558
|
-
|
|
2950
|
+
bounces?: React$1.ComponentProps<typeof RN.ScrollView>['bounces'];
|
|
2951
|
+
nativeGesture?: unknown;
|
|
2952
|
+
onBeginDragWorklet?: (...args: any[]) => unknown;
|
|
2953
|
+
onEndDragWorklet?: (...args: any[]) => unknown;
|
|
2954
|
+
onScrollWorklet?: (...args: any[]) => unknown;
|
|
2955
|
+
state: {
|
|
2956
|
+
activeIndex?: unknown;
|
|
2957
|
+
items?: unknown;
|
|
2958
|
+
onPageChangeRef?: unknown;
|
|
2959
|
+
pageWidth?: unknown;
|
|
2960
|
+
pagerRef?: unknown;
|
|
2961
|
+
pressedIndex?: unknown;
|
|
2962
|
+
scrollOverflow?: unknown;
|
|
2963
|
+
scrollTarget?: unknown;
|
|
2964
|
+
visiblePageRange?: unknown;
|
|
2965
|
+
};
|
|
2966
|
+
style?: React$1.ComponentProps<typeof RN.ScrollView>['style'];
|
|
559
2967
|
};
|
|
2968
|
+
/**
|
|
2969
|
+
* Props of `SegmentedControl` (function). Exports: SegmentedControl.
|
|
2970
|
+
* @see design/components/SegmentedControl/native/SegmentedControl.native.tsx
|
|
2971
|
+
*/
|
|
560
2972
|
export type SegmentedControlProps = {
|
|
561
|
-
|
|
562
|
-
|
|
2973
|
+
keyboardShouldPersistTaps?: React$1.ComponentProps<
|
|
2974
|
+
typeof RN.ScrollView
|
|
2975
|
+
>['keyboardShouldPersistTaps'];
|
|
2976
|
+
state: SegmentedControlItemProps['state'];
|
|
563
2977
|
/** @default 'default' */
|
|
564
|
-
variant?:
|
|
565
|
-
keyboardShouldPersistTaps?: boolean | 'always' | 'never' | 'handled';
|
|
2978
|
+
variant?: SegmentedControlItemProps['variant'];
|
|
566
2979
|
};
|
|
567
|
-
/** The state controller
|
|
2980
|
+
/** The state controller `useSegmentedControlState` returns, which drives a `SegmentedControl`. */
|
|
568
2981
|
export type SegmentedControlState = {
|
|
569
2982
|
activeIndex: number;
|
|
570
2983
|
items: SegmentedControlItem[];
|
|
@@ -577,6 +2990,18 @@ export type SegmentedControlStateOptions = {
|
|
|
577
2990
|
defaultIndex?: number;
|
|
578
2991
|
onPageChange?: (index: number) => void;
|
|
579
2992
|
};
|
|
2993
|
+
/** A semantic colour token from `Theme.colors`, which `useToken` resolves to a colour string. */
|
|
2994
|
+
export type SemanticColorToken = Readonly<Record<string, string | number | boolean>>;
|
|
2995
|
+
export type ServerTabLottieComponent = React$1.ComponentType<
|
|
2996
|
+
ServerTabLottieProps & Record<string, unknown>
|
|
2997
|
+
>;
|
|
2998
|
+
/**
|
|
2999
|
+
* Props of `ServerTabLottie` (function). Exports: ServerTabLottie.
|
|
3000
|
+
* @see design/components/LottieIcon/native/generated/ServerTabLottie.tsx
|
|
3001
|
+
*/
|
|
3002
|
+
export type ServerTabLottieProps = Omit<LottieIconProps, 'ref'> & {
|
|
3003
|
+
ref?: LottieIconProps['ref'];
|
|
3004
|
+
};
|
|
580
3005
|
/** A registered Unbound settings entry, mirroring Discord's `SETTING_RENDERER_CONFIG` route shape. */
|
|
581
3006
|
export type SettingsEntry = {
|
|
582
3007
|
type: 'route';
|
|
@@ -586,7 +3011,7 @@ export type SettingsEntry = {
|
|
|
586
3011
|
parent: string | null;
|
|
587
3012
|
section?: string;
|
|
588
3013
|
excludeFromDisplay?: boolean;
|
|
589
|
-
IconComponent?:
|
|
3014
|
+
IconComponent?: React$1.ComponentType;
|
|
590
3015
|
screen: SettingsScreen;
|
|
591
3016
|
};
|
|
592
3017
|
/** A settings store, or a nested group of settings within one. */
|
|
@@ -597,248 +3022,646 @@ export type SettingsObject = {
|
|
|
597
3022
|
export type SettingsScreen = {
|
|
598
3023
|
route: string;
|
|
599
3024
|
/** Discord's navigator renders the screen with its own route props, so any component fits. */
|
|
600
|
-
getComponent: () =>
|
|
3025
|
+
getComponent: () => React$1.ComponentType<never>;
|
|
601
3026
|
};
|
|
602
3027
|
/** A JSON value held in a settings store. */
|
|
603
3028
|
export type SettingsValue = string | number | boolean | null | SettingsValue[] | SettingsObject;
|
|
3029
|
+
export type SheetBottomSheetComponent = React$1.ComponentType<
|
|
3030
|
+
SheetBottomSheetProps & Record<string, unknown>
|
|
3031
|
+
>;
|
|
3032
|
+
/**
|
|
3033
|
+
* Props of `BottomSheet` (function). Exports: BottomSheet.
|
|
3034
|
+
* @see design/components/Sheet/native/BottomSheet.native.tsx
|
|
3035
|
+
*/
|
|
3036
|
+
export type SheetBottomSheetProps = {
|
|
3037
|
+
animatedIndex?: unknown;
|
|
3038
|
+
backdropChildren?: React$1.ComponentProps<typeof RN.View>['children'];
|
|
3039
|
+
backdropOpacity?: BottomSheetBackdropComponentProps['opacity'];
|
|
3040
|
+
backgroundComponent?: unknown;
|
|
3041
|
+
backgroundStyles?: unknown;
|
|
3042
|
+
bodyStyles?: React$1.ComponentProps<typeof RN.View>['style'];
|
|
3043
|
+
borderGradient?: unknown;
|
|
3044
|
+
children?: React$1.ComponentProps<typeof RN.View>['children'];
|
|
3045
|
+
containerHeight?: unknown;
|
|
3046
|
+
contentHeight?: unknown;
|
|
3047
|
+
contentStyles?: React$1.ComponentProps<typeof RN.View>['style'];
|
|
3048
|
+
dismissAccessibilityLabel?: unknown;
|
|
3049
|
+
extraContent?: unknown;
|
|
3050
|
+
footer?: unknown;
|
|
3051
|
+
handleComponent?: unknown;
|
|
3052
|
+
/** @default false */
|
|
3053
|
+
handleDisabled?: boolean;
|
|
3054
|
+
header?: React$1.ComponentProps<typeof RN.View>['children'];
|
|
3055
|
+
keyboardShouldPersistTaps?: 'always' | 'handled' | (string & {});
|
|
3056
|
+
maxHeight?: unknown;
|
|
3057
|
+
onDismiss?: (...args: any[]) => unknown;
|
|
3058
|
+
onExpand?: (...args: any[]) => unknown;
|
|
3059
|
+
ref?: React$1.Ref<any>;
|
|
3060
|
+
/** @default false */
|
|
3061
|
+
scrollable?: boolean;
|
|
3062
|
+
showGradient?: boolean;
|
|
3063
|
+
/** @default false */
|
|
3064
|
+
startExpanded?: boolean;
|
|
3065
|
+
startHeight?: number | string;
|
|
3066
|
+
};
|
|
3067
|
+
/**
|
|
3068
|
+
* Props of `ShimmerLayers` (function). Exports: none.
|
|
3069
|
+
* @see design/visual-identities/ai/AIShimmer/AIShimmer.native.tsx
|
|
3070
|
+
*/
|
|
3071
|
+
export type ShimmerLayersProps = {
|
|
3072
|
+
animationProgress?: GlyphBandProps['animationProgress'];
|
|
3073
|
+
animationWidth?: unknown;
|
|
3074
|
+
clippingWindowWidth?: unknown;
|
|
3075
|
+
color?: ShimmerTextSlotProps['color'];
|
|
3076
|
+
crossFadeOpacity?: unknown;
|
|
3077
|
+
glyphColor?: GlyphBandProps['color'];
|
|
3078
|
+
glyphCount?: unknown;
|
|
3079
|
+
glyphFontSize?: unknown;
|
|
3080
|
+
overshoot?: unknown;
|
|
3081
|
+
pass: {
|
|
3082
|
+
band?: unknown;
|
|
3083
|
+
slotA?: unknown;
|
|
3084
|
+
slotB?: unknown;
|
|
3085
|
+
};
|
|
3086
|
+
styles: ShimmerTextSlotProps['styles'];
|
|
3087
|
+
variant?: ShimmerTextSlotProps['variant'];
|
|
3088
|
+
};
|
|
3089
|
+
/**
|
|
3090
|
+
* Props of `ShimmerTextSlot` (function). Exports: none.
|
|
3091
|
+
* @see design/visual-identities/ai/AIShimmer/AIShimmer.native.tsx
|
|
3092
|
+
*/
|
|
3093
|
+
export type ShimmerTextSlotProps = {
|
|
3094
|
+
animatedStyles: {
|
|
3095
|
+
plainText?: unknown;
|
|
3096
|
+
plainWindow?: unknown;
|
|
3097
|
+
shiftedInnerWindow?: unknown;
|
|
3098
|
+
shiftedOuterWindow?: unknown;
|
|
3099
|
+
shiftedText?: unknown;
|
|
3100
|
+
};
|
|
3101
|
+
animationWidth?: unknown;
|
|
3102
|
+
clippingWindowWidth?: unknown;
|
|
3103
|
+
color?: DesignTextProps['color'];
|
|
3104
|
+
shiftedText?: DesignTextProps['children'];
|
|
3105
|
+
styles: {
|
|
3106
|
+
layer?: unknown;
|
|
3107
|
+
window?: unknown;
|
|
3108
|
+
};
|
|
3109
|
+
text?: DesignTextProps['children'];
|
|
3110
|
+
variant?: DesignTextProps['variant'];
|
|
3111
|
+
};
|
|
3112
|
+
export type SimpleActionSheetComponent = React$1.ComponentType<SimpleActionSheetProps>;
|
|
3113
|
+
/**
|
|
3114
|
+
* Props of `SimpleActionSheet` (function). Exports: SimpleActionSheet, default.
|
|
3115
|
+
* @see design/components/Sheet/native/SimpleActionSheet.native.tsx
|
|
3116
|
+
*/
|
|
3117
|
+
export type SimpleActionSheetProps = {
|
|
3118
|
+
hasIcons?: ActionSheetRowGroupProps['hasIcons'];
|
|
3119
|
+
header?: {
|
|
3120
|
+
icon?: unknown;
|
|
3121
|
+
onClose?: unknown;
|
|
3122
|
+
subtitle?: unknown;
|
|
3123
|
+
title?: unknown;
|
|
3124
|
+
};
|
|
3125
|
+
hideActionSheet: (...args: any[]) => unknown;
|
|
3126
|
+
options: {
|
|
3127
|
+
map?: unknown;
|
|
3128
|
+
};
|
|
3129
|
+
};
|
|
3130
|
+
export type SliderComponent = React$1.ComponentType<SliderProps & Record<string, unknown>>;
|
|
604
3131
|
/**
|
|
605
|
-
*
|
|
606
|
-
*
|
|
3132
|
+
* Props of `Slider` (function). Exports: Slider.
|
|
3133
|
+
* @see design/components/Slider/native/Slider.native.tsx
|
|
607
3134
|
*/
|
|
608
3135
|
export type SliderProps = {
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
3136
|
+
endIcon?: React$1.ComponentProps<typeof RN.View>['children'];
|
|
3137
|
+
onValueChange?: (...args: any[]) => unknown;
|
|
3138
|
+
startIcon?: React$1.ComponentProps<typeof RN.View>['children'];
|
|
3139
|
+
step?: unknown;
|
|
3140
|
+
style?: RN.StyleProp<RN.ViewStyle | RN.TextStyle | RN.ImageStyle>;
|
|
3141
|
+
};
|
|
3142
|
+
/**
|
|
3143
|
+
* Props of `Slot` (function). Exports: none.
|
|
3144
|
+
* @see design/visual-identities/ai/AILoader/AILoader.native.tsx
|
|
3145
|
+
*/
|
|
3146
|
+
export type SlotProps = {
|
|
3147
|
+
color?: AIGlyphTextProps['color'];
|
|
3148
|
+
cycle?: unknown;
|
|
3149
|
+
index?: unknown;
|
|
3150
|
+
size?: unknown;
|
|
3151
|
+
stagger?: unknown;
|
|
3152
|
+
};
|
|
3153
|
+
/**
|
|
3154
|
+
* Props of `SplitTextField` (function). Exports: SplitTextField.
|
|
3155
|
+
* @see design/components/SplitTextInput/native/SplitTextField.native.tsx
|
|
3156
|
+
*/
|
|
3157
|
+
export type SplitTextFieldProps = Omit<
|
|
3158
|
+
BaseTextFieldProps,
|
|
3159
|
+
| 'aria-disabled'
|
|
3160
|
+
| 'clearable'
|
|
3161
|
+
| 'disabled'
|
|
3162
|
+
| 'editable'
|
|
3163
|
+
| 'focusable'
|
|
3164
|
+
| 'leadingPressableProps'
|
|
3165
|
+
| 'leadingText'
|
|
3166
|
+
| 'onChange'
|
|
3167
|
+
| 'onChangeText'
|
|
3168
|
+
| 'onClear'
|
|
3169
|
+
| 'ref'
|
|
3170
|
+
| 'round'
|
|
3171
|
+
| 'size'
|
|
3172
|
+
| 'trailingIcon'
|
|
3173
|
+
| 'trailingPressableProps'
|
|
3174
|
+
| 'trailingText'
|
|
3175
|
+
> & {
|
|
3176
|
+
clearable?: unknown;
|
|
3177
|
+
/** @default false */
|
|
614
3178
|
disabled?: boolean;
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
3179
|
+
focusable?: unknown;
|
|
3180
|
+
leadingPressableProps?: unknown;
|
|
3181
|
+
leadingText?: DesignTextProps['children'];
|
|
3182
|
+
onChange?: (...args: any[]) => unknown;
|
|
3183
|
+
onClear?: (...args: any[]) => unknown;
|
|
3184
|
+
ref?: React$1.Ref<any>;
|
|
3185
|
+
round?: unknown;
|
|
3186
|
+
size?: unknown;
|
|
3187
|
+
trailingIcon?: unknown;
|
|
3188
|
+
trailingPressableProps?: unknown;
|
|
3189
|
+
trailingText?: DesignTextProps['children'];
|
|
3190
|
+
};
|
|
3191
|
+
export type SplitTextInputComponent = React$1.ComponentType<
|
|
3192
|
+
SplitTextInputProps & Record<string, unknown>
|
|
3193
|
+
>;
|
|
3194
|
+
/**
|
|
3195
|
+
* Props of `SplitTextInput` (function). Exports: SplitTextInput.
|
|
3196
|
+
* @see design/components/SplitTextInput/native/SplitTextInput.native.tsx
|
|
3197
|
+
*/
|
|
3198
|
+
export type SplitTextInputProps = Omit<SplitTextFieldProps, 'label' | 'ref' | 'required'> & {
|
|
3199
|
+
label?: unknown;
|
|
3200
|
+
ref?: SplitTextFieldProps['ref'];
|
|
3201
|
+
required?: boolean;
|
|
3202
|
+
};
|
|
3203
|
+
export type StackComponent = React$1.ComponentType<StackProps>;
|
|
3204
|
+
/**
|
|
3205
|
+
* Props of `Stack` (function). Exports: Stack.
|
|
3206
|
+
* @see design/components/Stack/native/Stack.native.tsx
|
|
3207
|
+
*/
|
|
635
3208
|
export type StackProps = {
|
|
3209
|
+
/** @default 'stretch' */
|
|
3210
|
+
align?: 'center' | 'flex-end' | 'flex-start' | 'stretch' | (string & {});
|
|
3211
|
+
children?: React$1.ComponentProps<typeof RN.View>['children'];
|
|
3212
|
+
/** @default 'vertical' */
|
|
3213
|
+
direction?: 'horizontal' | 'vertical' | (string & {});
|
|
3214
|
+
/** @default 'flex-start' */
|
|
3215
|
+
justify?: 'center' | 'flex-end' | 'flex-start' | 'space-between' | (string & {});
|
|
3216
|
+
onLayout?: React$1.ComponentProps<typeof RN.View>['onLayout'];
|
|
3217
|
+
/** @default 8 */
|
|
636
3218
|
spacing?: number;
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
3219
|
+
style?: React$1.ComponentProps<typeof RN.View>['style'];
|
|
3220
|
+
};
|
|
3221
|
+
export type StepModalComponent = React$1.ComponentType<StepModalProps & Record<string, unknown>>;
|
|
3222
|
+
/**
|
|
3223
|
+
* Props of `StepModal` (function). Exports: StepModal.
|
|
3224
|
+
* @see design/components/Modal/native/StepModal.native.tsx
|
|
3225
|
+
*/
|
|
3226
|
+
export type StepModalProps = Omit<DesignModalProps, 'onWillFocus' | 'steps'> & {
|
|
3227
|
+
onWillFocus?: (...args: any[]) => unknown;
|
|
3228
|
+
steps?: {
|
|
3229
|
+
indexOf?: unknown;
|
|
3230
|
+
length?: unknown;
|
|
3231
|
+
};
|
|
3232
|
+
};
|
|
3233
|
+
/**
|
|
3234
|
+
* Props of `StepPill` (function). Exports: none.
|
|
3235
|
+
* @see design/components/Modal/native/ModalStepIndicator.native.tsx
|
|
3236
|
+
*/
|
|
3237
|
+
export type StepPillProps = {
|
|
3238
|
+
activeColor?: unknown;
|
|
3239
|
+
inactiveColor?: unknown;
|
|
3240
|
+
/** @default 1 */
|
|
3241
|
+
inactiveOpacity?: number;
|
|
3242
|
+
isActive?: boolean;
|
|
3243
|
+
};
|
|
3244
|
+
export type StickyWrapperComponent = React$1.ComponentType<StickyWrapperProps>;
|
|
3245
|
+
/**
|
|
3246
|
+
* Props of `StickyWrapper` (function). Exports: StickyWrapper.
|
|
3247
|
+
* @see design/components/Sticky/native/StickyWrapper.native.tsx
|
|
3248
|
+
*/
|
|
3249
|
+
export type StickyWrapperProps = {
|
|
3250
|
+
children?: React$1.ComponentProps<typeof RN.View>['children'];
|
|
3251
|
+
header?: React$1.ComponentProps<typeof RN.View>['children'];
|
|
3252
|
+
pointerEvents?: React$1.ComponentProps<typeof RN.View>['pointerEvents'];
|
|
3253
|
+
style?: React$1.ComponentProps<typeof RN.View>['style'];
|
|
3254
|
+
};
|
|
642
3255
|
/** A stylesheet spec: each key maps to a view, text, or image style. */
|
|
643
3256
|
export type StyleSheetSpec = Record<string, ViewStyle | TextStyle | ImageStyle>;
|
|
644
3257
|
/** A stylesheet spec, or a function producing one (Discord accepts both forms). */
|
|
645
3258
|
export type StyleSheetSpecOrFactory<T extends StyleSheetSpec> = T | ((...args: any[]) => T);
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
3259
|
+
/**
|
|
3260
|
+
* Props of `Subtitle` (function). Exports: none.
|
|
3261
|
+
* @see design/components/Sheet/native/BottomSheetTitleHeader.native.tsx
|
|
3262
|
+
*/
|
|
3263
|
+
export type SubtitleProps = {
|
|
3264
|
+
children?: DesignTextProps['children'];
|
|
651
3265
|
};
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
3266
|
+
/**
|
|
3267
|
+
* Props of `TabItemCount` (function). Exports: none.
|
|
3268
|
+
* @see design/components/Tabs/native/TabItem.native.tsx
|
|
3269
|
+
*/
|
|
3270
|
+
export type TabItemCountProps = {
|
|
3271
|
+
activeIndex?: unknown;
|
|
3272
|
+
count?: DesignTextProps['children'];
|
|
3273
|
+
index?: unknown;
|
|
3274
|
+
pressed?: unknown;
|
|
3275
|
+
variant?: unknown;
|
|
3276
|
+
};
|
|
3277
|
+
/**
|
|
3278
|
+
* Props of `TabItem` (function). Exports: TabItem.
|
|
3279
|
+
* @see design/components/Tabs/native/TabItem.native.tsx
|
|
3280
|
+
*/
|
|
3281
|
+
export type TabItemProps = Omit<
|
|
3282
|
+
React$1.ComponentProps<typeof RN.Pressable>,
|
|
3283
|
+
'count' | 'grow' | 'index' | 'itemCount' | 'label' | 'pressed' | 'state' | 'variant'
|
|
3284
|
+
> & {
|
|
3285
|
+
count?: TabItemCountProps['count'];
|
|
3286
|
+
grow?: unknown;
|
|
3287
|
+
index?: unknown;
|
|
3288
|
+
itemCount?: unknown;
|
|
3289
|
+
label?: DesignTextProps['children'];
|
|
3290
|
+
pressed?: unknown;
|
|
3291
|
+
state: {
|
|
3292
|
+
activeIndex?: unknown;
|
|
3293
|
+
setItemDimensions?: unknown;
|
|
3294
|
+
};
|
|
3295
|
+
variant?: unknown;
|
|
3296
|
+
};
|
|
3297
|
+
export type TableCheckboxRowComponent = React$1.ComponentType<
|
|
3298
|
+
TableCheckboxRowProps & Record<string, unknown>
|
|
3299
|
+
>;
|
|
3300
|
+
/**
|
|
3301
|
+
* Props of `TableCheckboxRow` (function). Exports: TableCheckboxRow.
|
|
3302
|
+
* @see design/components/TableRow/native/TableCheckboxRow.native.tsx
|
|
3303
|
+
*/
|
|
3304
|
+
export type TableCheckboxRowProps = Omit<
|
|
3305
|
+
TableRowProps,
|
|
3306
|
+
'accessibilityHint' | 'checked' | 'disabled' | 'label' | 'onPress' | 'subLabel'
|
|
3307
|
+
> & {
|
|
3308
|
+
accessibilityHint?: TableRowProps['accessibilityHint'];
|
|
3309
|
+
checked?: FormsFormCheckboxProps['checked'];
|
|
3310
|
+
/** @default false */
|
|
3311
|
+
disabled?: TableRowProps['disabled'];
|
|
3312
|
+
label?: React$1.ReactElement | TableRowProps['label'];
|
|
3313
|
+
onPress: (...args: any[]) => unknown;
|
|
3314
|
+
subLabel?: React$1.ReactElement | TableRowProps['subLabel'];
|
|
659
3315
|
};
|
|
3316
|
+
export type TableRadioGroupComponent = React$1.ComponentType<TableRadioGroupProps>;
|
|
3317
|
+
/**
|
|
3318
|
+
* Props of `TableRadioGroup` (function). Exports: TableRadioGroup.
|
|
3319
|
+
* @see design/components/TableRow/native/TableRadioGroup.native.tsx
|
|
3320
|
+
*/
|
|
660
3321
|
export type TableRadioGroupProps = {
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
value
|
|
673
|
-
disabled?: boolean;
|
|
674
|
-
accessibilityHint?: string;
|
|
675
|
-
legacyCompat?: boolean;
|
|
3322
|
+
accessibilityLabel?: TableRowGroupProps['accessibilityLabel'];
|
|
3323
|
+
children?: React$1.ReactNode;
|
|
3324
|
+
/** @default null */
|
|
3325
|
+
defaultValue?: unknown;
|
|
3326
|
+
description?: TableRowGroupProps['description'];
|
|
3327
|
+
groupRef?: unknown;
|
|
3328
|
+
hasIcons?: TableRowGroupProps['hasIcons'];
|
|
3329
|
+
helperText?: TableRowGroupProps['helperText'];
|
|
3330
|
+
onChange?: (...args: any[]) => unknown;
|
|
3331
|
+
title?: TableRowGroupProps['title'];
|
|
3332
|
+
/** @default null */
|
|
3333
|
+
value?: string;
|
|
676
3334
|
};
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
3335
|
+
export type TableRadioRowComponent = React$1.ComponentType<
|
|
3336
|
+
TableRadioRowProps & Record<string, unknown>
|
|
3337
|
+
>;
|
|
3338
|
+
/**
|
|
3339
|
+
* Props of `TableRadioRow` (function). Exports: TableRadioRow.
|
|
3340
|
+
* @see design/components/TableRow/native/TableRadioRow.native.tsx
|
|
3341
|
+
*/
|
|
3342
|
+
export type TableRadioRowProps = Omit<
|
|
3343
|
+
TableRowProps,
|
|
3344
|
+
| 'accessibilityHint'
|
|
3345
|
+
| 'disabled'
|
|
3346
|
+
| 'label'
|
|
3347
|
+
| 'legacyCompat_onPress'
|
|
3348
|
+
| 'legacyCompat_selected'
|
|
3349
|
+
| 'subLabel'
|
|
3350
|
+
| 'value'
|
|
3351
|
+
> & {
|
|
3352
|
+
accessibilityHint?: TableRowProps['accessibilityHint'];
|
|
3353
|
+
/** @default false */
|
|
3354
|
+
disabled?: TableRowProps['disabled'];
|
|
3355
|
+
label?: React$1.ReactElement | TableRowProps['label'];
|
|
3356
|
+
legacyCompat_onPress?: (...args: any[]) => unknown;
|
|
3357
|
+
legacyCompat_selected?: FormsFormRadioProps['selected'];
|
|
3358
|
+
subLabel?: React$1.ReactElement | TableRowProps['subLabel'];
|
|
3359
|
+
value?: unknown;
|
|
3360
|
+
};
|
|
3361
|
+
export type TableRowArrowComponent = React$1.ComponentType<TableRowArrowProps>;
|
|
3362
|
+
/**
|
|
3363
|
+
* Props of `TableRowArrow` (function). Exports: TableRowArrow.
|
|
3364
|
+
* @see design/components/TableRow/native/TableRowArrow.native.tsx
|
|
3365
|
+
*/
|
|
3366
|
+
export type TableRowArrowProps = {};
|
|
3367
|
+
export type TableRowComponent = React$1.ComponentType<TableRowProps & Record<string, unknown>> &
|
|
3368
|
+
TableRowStatics;
|
|
3369
|
+
/**
|
|
3370
|
+
* Props of `TableRowDivider` (function). Exports: TableRowDivider.
|
|
3371
|
+
* @see design/components/TableRow/native/TableRowDivider.native.tsx
|
|
3372
|
+
*/
|
|
3373
|
+
export type TableRowDividerProps = {
|
|
3374
|
+
/** @default false */
|
|
3375
|
+
adjustSpacingForIcon?: boolean;
|
|
682
3376
|
};
|
|
3377
|
+
export type TableRowGroupComponent = React$1.ComponentType<TableRowGroupProps>;
|
|
3378
|
+
/**
|
|
3379
|
+
* Props of `TableRowGroup` (function). Exports: TableRowGroup.
|
|
3380
|
+
* @see design/components/TableRow/native/TableRowGroup.native.tsx
|
|
3381
|
+
*/
|
|
683
3382
|
export type TableRowGroupProps = {
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
3383
|
+
accessibilityLabel?: React$1.ComponentProps<typeof RN.View>['accessibilityLabel'];
|
|
3384
|
+
/** @default 'none' */
|
|
3385
|
+
accessibilityRole?: React$1.ComponentProps<typeof RN.View>['accessibilityRole'];
|
|
3386
|
+
children?: React$1.ReactNode;
|
|
3387
|
+
description?: DesignTextProps['children'];
|
|
3388
|
+
hasIcons?: TableRowDividerProps['adjustSpacingForIcon'];
|
|
3389
|
+
/** @default false */
|
|
688
3390
|
hasTrailingText?: boolean;
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
children?: ReactModule.ReactNode;
|
|
3391
|
+
helperText?: DesignTextProps['children'];
|
|
3392
|
+
title?: TableRowGroupTitleProps['title'];
|
|
692
3393
|
};
|
|
3394
|
+
export type TableRowGroupTitleComponent = React$1.ComponentType<TableRowGroupTitleProps>;
|
|
3395
|
+
/**
|
|
3396
|
+
* Props of `TableRowGroupTitle` (function). Exports: TableRowGroupTitle.
|
|
3397
|
+
* @see design/components/TableRow/native/TableRowGroup.native.tsx
|
|
3398
|
+
*/
|
|
693
3399
|
export type TableRowGroupTitleProps = {
|
|
694
|
-
|
|
3400
|
+
lineClamp?: DesignTextProps['lineClamp'];
|
|
3401
|
+
style?: DesignTextProps['style'];
|
|
3402
|
+
title?: DesignTextProps['children'];
|
|
695
3403
|
};
|
|
3404
|
+
export type TableRowIconComponent = React$1.ComponentType<TableRowIconProps>;
|
|
3405
|
+
/**
|
|
3406
|
+
* Props of `TableRowIcon` (function). Exports: TableRowIcon.
|
|
3407
|
+
* @see design/components/TableRow/native/TableRowIcon.native.tsx
|
|
3408
|
+
*/
|
|
696
3409
|
export type TableRowIconProps = {
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
3410
|
+
IconComponent?: unknown;
|
|
3411
|
+
source?: VoidIconProps['source'];
|
|
3412
|
+
/** @default 'default' */
|
|
3413
|
+
variant?:
|
|
3414
|
+
| 'danger'
|
|
3415
|
+
| 'default'
|
|
3416
|
+
| 'secondary'
|
|
3417
|
+
| 'text-status-dnd'
|
|
3418
|
+
| 'text-status-idle'
|
|
3419
|
+
| 'text-status-offline'
|
|
3420
|
+
| 'text-status-online'
|
|
3421
|
+
| 'translucent'
|
|
3422
|
+
| 'xbox'
|
|
3423
|
+
| (string & {});
|
|
3424
|
+
};
|
|
3425
|
+
/**
|
|
3426
|
+
* Props of `TableRowInner` (function). Exports: TableRowInner.
|
|
3427
|
+
* @see design/components/TableRow/native/TableRow.native.tsx
|
|
3428
|
+
*/
|
|
3429
|
+
export type TableRowInnerProps = {
|
|
3430
|
+
arrow?: unknown;
|
|
3431
|
+
borderRadius?: unknown;
|
|
707
3432
|
disabled?: boolean;
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
/** Rounds the bottom corners; set on the last row of a manually laid-out group. */
|
|
711
|
-
end?: boolean;
|
|
712
|
-
labelLineClamp?: number;
|
|
713
|
-
subLabelLineClamp?: number;
|
|
714
|
-
variant?: LiteralUnion<'default' | 'danger'>;
|
|
3433
|
+
dragHandlePressableProps?: unknown;
|
|
3434
|
+
/** @default false */
|
|
715
3435
|
draggable?: boolean;
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
disabled?: boolean;
|
|
726
|
-
accessibilityHint?: string;
|
|
727
|
-
variant?: LiteralUnion<'default'>;
|
|
728
|
-
onValueChange: (value: boolean) => void;
|
|
3436
|
+
height?: unknown;
|
|
3437
|
+
icon?: React$1.ComponentProps<typeof RN.View>['children'];
|
|
3438
|
+
label?: DesignTextProps['children'];
|
|
3439
|
+
labelLineClamp?: DesignTextProps['lineClamp'];
|
|
3440
|
+
subLabel?: DesignTextProps['children'];
|
|
3441
|
+
subLabelLineClamp?: DesignTextProps['lineClamp'];
|
|
3442
|
+
trailing?: React$1.ComponentProps<typeof RN.View>['children'];
|
|
3443
|
+
/** @default 'default' */
|
|
3444
|
+
variant?: 'danger' | 'default' | (string & {});
|
|
729
3445
|
};
|
|
730
|
-
/** `TextArea` extends the field family with a character limit. */
|
|
731
|
-
export type TextAreaProps = {
|
|
732
|
-
maxLength?: number;
|
|
733
|
-
} & TextFieldProps;
|
|
734
3446
|
/**
|
|
735
|
-
*
|
|
736
|
-
*
|
|
3447
|
+
* Props of `TableRow` (function). Exports: TableRow.
|
|
3448
|
+
* @see design/components/TableRow/native/TableRow.native.tsx
|
|
737
3449
|
*/
|
|
738
|
-
export type
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
3450
|
+
export type TableRowProps = Omit<
|
|
3451
|
+
DesignCardProps,
|
|
3452
|
+
| 'arrow'
|
|
3453
|
+
| 'disabled'
|
|
3454
|
+
| 'dragHandlePressableProps'
|
|
3455
|
+
| 'draggable'
|
|
3456
|
+
| 'end'
|
|
3457
|
+
| 'height'
|
|
3458
|
+
| 'icon'
|
|
3459
|
+
| 'label'
|
|
3460
|
+
| 'labelLineClamp'
|
|
3461
|
+
| 'onPress'
|
|
3462
|
+
| 'start'
|
|
3463
|
+
| 'subLabel'
|
|
3464
|
+
| 'subLabelLineClamp'
|
|
3465
|
+
| 'trailing'
|
|
3466
|
+
| 'variant'
|
|
3467
|
+
> & {
|
|
3468
|
+
arrow?: boolean;
|
|
3469
|
+
/** @default false */
|
|
3470
|
+
disabled?: TableRowInnerProps['disabled'];
|
|
3471
|
+
dragHandlePressableProps?: unknown;
|
|
3472
|
+
draggable?: TableRowInnerProps['draggable'];
|
|
3473
|
+
end?: boolean;
|
|
3474
|
+
height?: number | string;
|
|
3475
|
+
icon?: TableRowInnerProps['icon'];
|
|
3476
|
+
label?: TableRowInnerProps['label'];
|
|
3477
|
+
labelLineClamp?: TableRowInnerProps['labelLineClamp'];
|
|
3478
|
+
onPress?: DesignCardProps['onPress'];
|
|
3479
|
+
start?: boolean;
|
|
3480
|
+
subLabel?: TableRowInnerProps['subLabel'];
|
|
3481
|
+
subLabelLineClamp?: TableRowInnerProps['subLabelLineClamp'];
|
|
3482
|
+
trailing?: TableRowInnerProps['trailing'];
|
|
744
3483
|
/** @default 'default' */
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
trailingIcon?: IconSlot;
|
|
752
|
-
leadingText?: string;
|
|
753
|
-
trailingText?: string;
|
|
754
|
-
leadingPressableProps?: PressableProps;
|
|
755
|
-
trailingPressableProps?: PressableProps;
|
|
756
|
-
secureTextEntry?: boolean;
|
|
757
|
-
keyboardType?: RNTextInputProps['keyboardType'];
|
|
758
|
-
autoComplete?: RNTextInputProps['autoComplete'];
|
|
759
|
-
returnKeyType?: RNTextInputProps['returnKeyType'];
|
|
760
|
-
maxLength?: number;
|
|
761
|
-
enableAndroidSanitizedInputWorkaround?: boolean;
|
|
762
|
-
style?: StyleProp<ViewStyle>;
|
|
763
|
-
inputStyle?: StyleProp<TextStyle>;
|
|
764
|
-
children?: ReactModule.ReactNode;
|
|
765
|
-
onChange?: (value: string) => void;
|
|
766
|
-
onClear?: DiscordFunction<void>;
|
|
767
|
-
onFocus?: RNTextInputProps['onFocus'];
|
|
768
|
-
onBlur?: RNTextInputProps['onBlur'];
|
|
3484
|
+
variant?: TableRowInnerProps['variant'];
|
|
3485
|
+
};
|
|
3486
|
+
export type TableRowStatics = {
|
|
3487
|
+
Icon: TableRowIconComponent;
|
|
3488
|
+
Arrow: TableRowArrowComponent;
|
|
3489
|
+
TrailingText: TableRowTrailingTextComponent;
|
|
769
3490
|
};
|
|
3491
|
+
export type TableRowTrailingTextComponent = React$1.ComponentType<TableRowTrailingTextProps>;
|
|
770
3492
|
/**
|
|
771
|
-
*
|
|
772
|
-
*
|
|
3493
|
+
* Props of `TableRowTrailingText` (function). Exports: TableRowTrailingText.
|
|
3494
|
+
* @see design/components/TableRow/native/TableRowTrailingText.native.tsx
|
|
773
3495
|
*/
|
|
774
|
-
export type
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
| 'numberOfLines'
|
|
780
|
-
| 'autoFocus'
|
|
781
|
-
| 'secureTextEntry'
|
|
782
|
-
| 'keyboardType'
|
|
783
|
-
| 'keyboardAppearance'
|
|
784
|
-
| 'autoCapitalize'
|
|
785
|
-
| 'autoCorrect'
|
|
786
|
-
| 'style'
|
|
787
|
-
| 'onChange'
|
|
3496
|
+
export type TableRowTrailingTextProps = {
|
|
3497
|
+
text?: DesignTextProps['children'];
|
|
3498
|
+
};
|
|
3499
|
+
export type TableSwitchRowComponent = React$1.ComponentType<
|
|
3500
|
+
TableSwitchRowProps & Record<string, unknown>
|
|
788
3501
|
>;
|
|
789
3502
|
/**
|
|
790
|
-
*
|
|
791
|
-
*
|
|
3503
|
+
* Props of `TableSwitchRow` (function). Exports: TableSwitchRow.
|
|
3504
|
+
* @see design/components/TableRow/native/TableSwitchRow.native.tsx
|
|
792
3505
|
*/
|
|
793
|
-
export type
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
3506
|
+
export type TableSwitchRowProps = Omit<
|
|
3507
|
+
TableRowProps,
|
|
3508
|
+
| 'accessibilityHint'
|
|
3509
|
+
| 'disabled'
|
|
3510
|
+
| 'label'
|
|
3511
|
+
| 'onValueChange'
|
|
3512
|
+
| 'subLabel'
|
|
3513
|
+
| 'trailing'
|
|
3514
|
+
| 'value'
|
|
3515
|
+
| 'variant'
|
|
3516
|
+
> & {
|
|
3517
|
+
accessibilityHint?: TableRowProps['accessibilityHint'];
|
|
803
3518
|
/** @default false */
|
|
3519
|
+
disabled?: FormsFormSwitchProps['disabled'];
|
|
3520
|
+
label?: DesignTextProps['children'];
|
|
3521
|
+
onValueChange?: (...args: any[]) => unknown;
|
|
3522
|
+
subLabel?: React$1.ReactElement | TableRowProps['subLabel'];
|
|
3523
|
+
trailing?: React$1.ComponentProps<typeof RN.View>['children'];
|
|
3524
|
+
value?: boolean;
|
|
3525
|
+
variant?: TableRowProps['variant'];
|
|
3526
|
+
};
|
|
3527
|
+
export type TabsComponent = React$1.ComponentType<TabsProps>;
|
|
3528
|
+
/**
|
|
3529
|
+
* Props of `Tabs` (function). Exports: Tabs.
|
|
3530
|
+
* @see design/components/Tabs/native/Tabs.native.tsx
|
|
3531
|
+
*/
|
|
3532
|
+
export type TabsProps = {
|
|
3533
|
+
formatCount?: (...args: any[]) => unknown;
|
|
3534
|
+
/** @default true */
|
|
3535
|
+
grow?: boolean;
|
|
3536
|
+
onEndDrag?: (...args: any[]) => unknown;
|
|
3537
|
+
onScrollWorklet?: (...args: any[]) => unknown;
|
|
3538
|
+
simultaneousHandlers?: unknown;
|
|
3539
|
+
state: TabItemProps['state'];
|
|
3540
|
+
variant?: 'overlay' | (string & {});
|
|
3541
|
+
};
|
|
3542
|
+
export type TagGroupComponent = React$1.ComponentType<TagGroupProps>;
|
|
3543
|
+
/**
|
|
3544
|
+
* Props of `TagGroup` (function). Exports: TagGroup.
|
|
3545
|
+
* @see design/components/TagGroup/native/TagGroup.native.tsx
|
|
3546
|
+
*/
|
|
3547
|
+
export type TagGroupProps = {
|
|
3548
|
+
items: {
|
|
3549
|
+
map?: unknown;
|
|
3550
|
+
};
|
|
3551
|
+
label?: React$1.ComponentProps<typeof RN.View>['accessibilityLabel'];
|
|
3552
|
+
/** @default 'default' */
|
|
3553
|
+
layout?: 'default' | 'inline' | (string & {});
|
|
3554
|
+
size?: 'md' | 'sm' | 'xs' | (string & {});
|
|
3555
|
+
/** @default 'default' */
|
|
3556
|
+
variant?: 'default' | 'filter' | (string & {});
|
|
3557
|
+
};
|
|
3558
|
+
export type TextAreaComponent = React$1.ComponentType<TextAreaProps & Record<string, unknown>>;
|
|
3559
|
+
export type TextAreaFieldComponent = React$1.ComponentType<
|
|
3560
|
+
TextAreaFieldProps & Record<string, unknown>
|
|
3561
|
+
>;
|
|
3562
|
+
/**
|
|
3563
|
+
* Props of `TextAreaField` (function). Exports: TextAreaField.
|
|
3564
|
+
* @see design/components/TextField/native/TextAreaField.native.tsx
|
|
3565
|
+
*/
|
|
3566
|
+
export type TextAreaFieldProps = Omit<
|
|
3567
|
+
InputTextInputProps,
|
|
3568
|
+
'disabled' | 'label' | 'maxLength' | 'onClear' | 'ref'
|
|
3569
|
+
> & {
|
|
804
3570
|
disabled?: boolean;
|
|
3571
|
+
label?: unknown;
|
|
3572
|
+
maxLength?: InputTextInputProps['maxLength'];
|
|
3573
|
+
onClear?: (...args: any[]) => unknown;
|
|
3574
|
+
ref?: React$1.Ref<any>;
|
|
3575
|
+
};
|
|
3576
|
+
/**
|
|
3577
|
+
* Props of `TextArea` (function). Exports: TextArea.
|
|
3578
|
+
* @see design/components/TextInput/native/TextArea.native.tsx
|
|
3579
|
+
*/
|
|
3580
|
+
export type TextAreaProps = Omit<TextAreaFieldProps, 'ref' | 'required'> & {
|
|
3581
|
+
ref?: TextAreaFieldProps['ref'];
|
|
3582
|
+
required?: boolean;
|
|
3583
|
+
};
|
|
3584
|
+
export type TextButtonIconComponent = React$1.ComponentType<TextButtonIconProps>;
|
|
3585
|
+
/**
|
|
3586
|
+
* Props of `TextButtonIcon` (function). Exports: none.
|
|
3587
|
+
* @see design/components/Button/native/BaseTextButton.native.tsx
|
|
3588
|
+
*/
|
|
3589
|
+
export type TextButtonIconProps = {
|
|
3590
|
+
/** @default true */
|
|
3591
|
+
disableColor?: VoidIconProps['disableColor'];
|
|
3592
|
+
source?: VoidIconProps['source'];
|
|
3593
|
+
/** @default 'icon' */
|
|
3594
|
+
variant?: 'entity' | 'icon' | (string & {});
|
|
3595
|
+
};
|
|
3596
|
+
export type TextFieldComponent = React$1.ComponentType<TextFieldProps & Record<string, unknown>>;
|
|
3597
|
+
/**
|
|
3598
|
+
* Props of `TextField` (function). Exports: TextField.
|
|
3599
|
+
* @see design/components/TextField/native/TextField.native.tsx
|
|
3600
|
+
*/
|
|
3601
|
+
export type TextFieldProps = Omit<
|
|
3602
|
+
BaseTextFieldProps,
|
|
3603
|
+
| 'aria-disabled'
|
|
3604
|
+
| 'clearable'
|
|
3605
|
+
| 'disabled'
|
|
3606
|
+
| 'editable'
|
|
3607
|
+
| 'focusable'
|
|
3608
|
+
| 'leadingPressableProps'
|
|
3609
|
+
| 'leadingText'
|
|
3610
|
+
| 'onChange'
|
|
3611
|
+
| 'onChangeText'
|
|
3612
|
+
| 'onClear'
|
|
3613
|
+
| 'ref'
|
|
3614
|
+
| 'trailingIcon'
|
|
3615
|
+
| 'trailingPressableProps'
|
|
3616
|
+
| 'trailingText'
|
|
3617
|
+
> & {
|
|
3618
|
+
clearable?: unknown;
|
|
805
3619
|
/** @default false */
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
3620
|
+
disabled?: boolean;
|
|
3621
|
+
focusable?: unknown;
|
|
3622
|
+
leadingPressableProps?: unknown;
|
|
3623
|
+
leadingText?: DesignTextProps['children'];
|
|
3624
|
+
onChange?: (...args: any[]) => unknown;
|
|
3625
|
+
onClear?: (...args: any[]) => unknown;
|
|
3626
|
+
ref?: React$1.Ref<any>;
|
|
3627
|
+
trailingIcon?: unknown;
|
|
3628
|
+
trailingPressableProps?: unknown;
|
|
3629
|
+
trailingText?: DesignTextProps['children'];
|
|
3630
|
+
};
|
|
3631
|
+
export type TextHeadingComponent = React$1.ComponentType<
|
|
3632
|
+
TextHeadingProps & Record<string, unknown>
|
|
3633
|
+
>;
|
|
3634
|
+
/**
|
|
3635
|
+
* Props of `Heading` (function). Exports: Heading.
|
|
3636
|
+
* @see design/components/Text/native/Text.tsx
|
|
3637
|
+
*/
|
|
3638
|
+
export type TextHeadingProps = Omit<DesignTextProps, 'ref' | 'variant'> & {
|
|
3639
|
+
ref?: DesignTextProps['ref'];
|
|
3640
|
+
variant?:
|
|
3641
|
+
| 'display-md'
|
|
3642
|
+
| 'display-sm'
|
|
3643
|
+
| 'eyebrow'
|
|
3644
|
+
| 'heading-lg/bold'
|
|
3645
|
+
| 'heading-lg/extrabold'
|
|
3646
|
+
| 'heading-lg/medium'
|
|
3647
|
+
| 'heading-lg/semibold'
|
|
3648
|
+
| 'heading-md/bold'
|
|
3649
|
+
| 'heading-md/extrabold'
|
|
3650
|
+
| 'heading-md/semibold'
|
|
3651
|
+
| 'heading-sm/medium'
|
|
3652
|
+
| 'heading-sm/semibold'
|
|
3653
|
+
| 'heading-xl/bold'
|
|
3654
|
+
| 'heading-xl/extrabold'
|
|
3655
|
+
| 'heading-xxl/bold'
|
|
3656
|
+
| 'nitro-sm'
|
|
3657
|
+
| 'redesign/heading-18/bold'
|
|
3658
|
+
| 'text-lg/bold'
|
|
3659
|
+
| 'text-md/medium'
|
|
3660
|
+
| 'text-md/semibold'
|
|
3661
|
+
| 'text-sm/semibold'
|
|
3662
|
+
| 'text-xs/semibold'
|
|
3663
|
+
| (string & {});
|
|
3664
|
+
};
|
|
842
3665
|
/** Every typography variant Discord ships in `TextStyleSheet`, kept open for new ones. */
|
|
843
3666
|
export type TextVariant = LiteralUnion<
|
|
844
3667
|
| `heading-${'sm' | 'md' | 'lg' | 'xl' | 'xxl'}/${TextWeight | 'extrabold'}`
|
|
@@ -869,17 +3692,59 @@ export type Theme = {
|
|
|
869
3692
|
url: string;
|
|
870
3693
|
};
|
|
871
3694
|
};
|
|
3695
|
+
export type ThemeContextProviderRootThemeContextProviderComponent =
|
|
3696
|
+
React$1.ComponentType<ThemeContextProviderRootThemeContextProviderProps>;
|
|
3697
|
+
/**
|
|
3698
|
+
* Props of `RootThemeContextProvider` (function). Exports: RootThemeContextProvider.
|
|
3699
|
+
* @see design/components/ThemeContextProvider/native/RootThemeContextProvider.native.tsx
|
|
3700
|
+
*/
|
|
3701
|
+
export type ThemeContextProviderRootThemeContextProviderProps = {
|
|
3702
|
+
children?: React$1.ReactNode;
|
|
3703
|
+
/** @default 1 */
|
|
3704
|
+
contrast?: number;
|
|
3705
|
+
/** @default 'compact' */
|
|
3706
|
+
density?: 'compact' | (string & {});
|
|
3707
|
+
/** @default false */
|
|
3708
|
+
disableAdaptiveTheme?: boolean;
|
|
3709
|
+
enabledExperiments?: unknown;
|
|
3710
|
+
/** @default 0 */
|
|
3711
|
+
flags?: number;
|
|
3712
|
+
/** @default null */
|
|
3713
|
+
gradient?: unknown;
|
|
3714
|
+
/** @default null */
|
|
3715
|
+
primaryColor?: unknown;
|
|
3716
|
+
/** @default false */
|
|
3717
|
+
reduceAdaptiveTheme?: boolean;
|
|
3718
|
+
/** @default 1 */
|
|
3719
|
+
saturation?: number;
|
|
3720
|
+
/** @default null */
|
|
3721
|
+
secondaryColor?: unknown;
|
|
3722
|
+
theme?: unknown;
|
|
3723
|
+
};
|
|
872
3724
|
/** An {@link Addon} whose instance is a {@link Theme}, tracking its registration state. */
|
|
873
3725
|
export type ThemeEntity = Addon & {
|
|
874
3726
|
registered: boolean;
|
|
875
3727
|
instance: Theme | null;
|
|
876
3728
|
};
|
|
3729
|
+
/**
|
|
3730
|
+
* Props of `ThemeProvider` (function). Exports: ThemeProvider.
|
|
3731
|
+
* @see module 4804 (no source path)
|
|
3732
|
+
*/
|
|
3733
|
+
export type ThemeProviderProps = {
|
|
3734
|
+
children?: React$1.ReactNode;
|
|
3735
|
+
value?: unknown;
|
|
3736
|
+
};
|
|
877
3737
|
/** A single semantic colour definition in a {@link Theme}. */
|
|
878
3738
|
export type ThemeSemanticColor = {
|
|
879
3739
|
type: 'color' | 'raw';
|
|
880
3740
|
value: string;
|
|
881
3741
|
opacity?: number;
|
|
882
3742
|
};
|
|
3743
|
+
/**
|
|
3744
|
+
* Props of `Title` (function). Exports: none.
|
|
3745
|
+
* @see design/components/Sheet/native/BottomSheetTitleHeader.native.tsx
|
|
3746
|
+
*/
|
|
3747
|
+
export type TitleProps = DesignTextProps;
|
|
883
3748
|
/** A button rendered inside a toast. */
|
|
884
3749
|
export type ToastButton = {
|
|
885
3750
|
variant?: 'primary' | 'secondary' | 'tertiary';
|
|
@@ -889,6 +3754,47 @@ export type ToastButton = {
|
|
|
889
3754
|
icon?: number;
|
|
890
3755
|
onPress: () => void;
|
|
891
3756
|
};
|
|
3757
|
+
export type ToastComponent = React$1.ComponentType<ToastProps>;
|
|
3758
|
+
export type ToastContainerComponent = React$1.ComponentType<ToastContainerProps>;
|
|
3759
|
+
/**
|
|
3760
|
+
* Props of `ToastContainer` (function). Exports: ToastContainer.
|
|
3761
|
+
* @see design/mana/components/Toast/ToastContainer.native.tsx
|
|
3762
|
+
*/
|
|
3763
|
+
export type ToastContainerProps = {
|
|
3764
|
+
offset?: {
|
|
3765
|
+
bottom?: unknown;
|
|
3766
|
+
top?: unknown;
|
|
3767
|
+
};
|
|
3768
|
+
/** @default false */
|
|
3769
|
+
overlay?: boolean;
|
|
3770
|
+
/** @default 'app' */
|
|
3771
|
+
surface?: 'app' | (string & {});
|
|
3772
|
+
};
|
|
3773
|
+
/**
|
|
3774
|
+
* Props of `ToastEntityContent` (function). Exports: none.
|
|
3775
|
+
* @see design/mana/components/Toast/ToastEntity.native.tsx
|
|
3776
|
+
*/
|
|
3777
|
+
export type ToastEntityContentProps = {
|
|
3778
|
+
entity: {
|
|
3779
|
+
alt?: unknown;
|
|
3780
|
+
name?: unknown;
|
|
3781
|
+
src?: unknown;
|
|
3782
|
+
type?: unknown;
|
|
3783
|
+
unicode?: unknown;
|
|
3784
|
+
};
|
|
3785
|
+
styles: {
|
|
3786
|
+
glyph?: unknown;
|
|
3787
|
+
image?: unknown;
|
|
3788
|
+
};
|
|
3789
|
+
};
|
|
3790
|
+
/**
|
|
3791
|
+
* Props of `ToastEntity` (function). Exports: ToastEntity.
|
|
3792
|
+
* @see design/mana/components/Toast/ToastEntity.native.tsx
|
|
3793
|
+
*/
|
|
3794
|
+
export type ToastEntityProps = {
|
|
3795
|
+
entity: ToastEntityContentProps['entity'];
|
|
3796
|
+
style?: React$1.ComponentProps<typeof RN.View>['style'];
|
|
3797
|
+
};
|
|
892
3798
|
/** A handle returned when showing a toast, used to update or close it. */
|
|
893
3799
|
export type ToastHandle = {
|
|
894
3800
|
update: (options: Partial<ToastOptions>) => void;
|
|
@@ -896,7 +3802,7 @@ export type ToastHandle = {
|
|
|
896
3802
|
};
|
|
897
3803
|
/** Options accepted when showing a toast. */
|
|
898
3804
|
export type ToastOptions = {
|
|
899
|
-
title?: string |
|
|
3805
|
+
title?: string | React$1.ComponentType;
|
|
900
3806
|
content?: string;
|
|
901
3807
|
duration?: number;
|
|
902
3808
|
onTimeout?: () => void;
|
|
@@ -905,14 +3811,39 @@ export type ToastOptions = {
|
|
|
905
3811
|
buttons?: ToastButton[];
|
|
906
3812
|
tintedIcon?: boolean;
|
|
907
3813
|
};
|
|
3814
|
+
/**
|
|
3815
|
+
* Props of `Toast` (function). Exports: Toast.
|
|
3816
|
+
* @see design/mana/components/Toast/Toast.native.tsx
|
|
3817
|
+
*/
|
|
3818
|
+
export type ToastProps = {
|
|
3819
|
+
icon?: ToastEntityProps['entity'];
|
|
3820
|
+
iconColor?: unknown;
|
|
3821
|
+
secondaryIconColor?: unknown;
|
|
3822
|
+
text?: DesignTextProps['children'];
|
|
3823
|
+
/** @default 'default' */
|
|
3824
|
+
variant?: 'critical' | 'default' | 'success' | (string & {});
|
|
3825
|
+
};
|
|
908
3826
|
/** State and actions of the toast store. */
|
|
909
3827
|
export type ToastStoreState = {
|
|
910
3828
|
toasts: Record<string, InternalToastOptions>;
|
|
911
3829
|
addToast: (options: InternalToastOptions) => ToastHandle;
|
|
912
3830
|
updateToastWithOptions: (id: string, options: Partial<InternalToastOptions>) => void;
|
|
913
3831
|
};
|
|
914
|
-
export type
|
|
915
|
-
|
|
3832
|
+
export type ToggleIconButtonComponent = React$1.ComponentType<
|
|
3833
|
+
ToggleIconButtonProps & Record<string, unknown>
|
|
3834
|
+
>;
|
|
3835
|
+
/**
|
|
3836
|
+
* Props of `ToggleIconButton` (function). Exports: ToggleIconButton.
|
|
3837
|
+
* @see design/components/Button/native/ToggleIconButton.native.tsx
|
|
3838
|
+
*/
|
|
3839
|
+
export type ToggleIconButtonProps = {
|
|
3840
|
+
icon?: unknown;
|
|
3841
|
+
/** @default false */
|
|
3842
|
+
pressed?: boolean;
|
|
3843
|
+
ref?: BaseIconButtonProps['ref'];
|
|
3844
|
+
selectedIcon?: unknown;
|
|
3845
|
+
/** @default 'default' */
|
|
3846
|
+
variant?: 'default' | (string & {});
|
|
916
3847
|
};
|
|
917
3848
|
/** `TransitionStates`: MOUNTED = 0, ENTERED = 1, YEETED = 2. */
|
|
918
3849
|
export type TransitionState = 'MOUNTED' | 'ENTERED' | 'YEETED';
|
|
@@ -921,11 +3852,96 @@ export type UnboundAsset = DiscordAsset & {
|
|
|
921
3852
|
iconPackPath?: string;
|
|
922
3853
|
iconPackScale?: number;
|
|
923
3854
|
};
|
|
3855
|
+
/**
|
|
3856
|
+
* Props of `VisualEffectView` (function). Exports: default.
|
|
3857
|
+
* @see modules/visual_effect_view/native/VisualEffectView.tsx
|
|
3858
|
+
*/
|
|
3859
|
+
export type VisualEffectViewProps = Omit<
|
|
3860
|
+
React$1.ComponentProps<typeof RN.View>,
|
|
3861
|
+
| 'android_blurTargetViewNativeId'
|
|
3862
|
+
| 'android_fallbackColor'
|
|
3863
|
+
| 'android_softwareBlurDisabled'
|
|
3864
|
+
| 'blurAmount'
|
|
3865
|
+
| 'blurStyle'
|
|
3866
|
+
| 'blurTheme'
|
|
3867
|
+
| 'ref'
|
|
3868
|
+
| 'style'
|
|
3869
|
+
| 'tintColor'
|
|
3870
|
+
> & {
|
|
3871
|
+
android_blurTargetViewNativeId?: string;
|
|
3872
|
+
android_fallbackColor?: unknown;
|
|
3873
|
+
/** @default false */
|
|
3874
|
+
android_softwareBlurDisabled?: boolean;
|
|
3875
|
+
/** @default 1 */
|
|
3876
|
+
blurAmount?: number;
|
|
3877
|
+
/** @default 'default' */
|
|
3878
|
+
blurStyle?: 'default' | 'ultra-thin' | (string & {});
|
|
3879
|
+
blurTheme?: 'dark' | 'light' | (string & {});
|
|
3880
|
+
ref?: React$1.Ref<any>;
|
|
3881
|
+
style?: RN.StyleProp<RN.ViewStyle | RN.TextStyle | RN.ImageStyle>;
|
|
3882
|
+
tintColor?: unknown;
|
|
3883
|
+
};
|
|
3884
|
+
/**
|
|
3885
|
+
* Props of `Icon` (memo). Exports: default.
|
|
3886
|
+
* @see design/void/Icon/native/Icon.tsx
|
|
3887
|
+
*/
|
|
3888
|
+
export type VoidIconProps = {
|
|
3889
|
+
accessibilityLabel?: React$1.ComponentProps<typeof RN.Image>['accessibilityLabel'];
|
|
3890
|
+
accessible?: React$1.ComponentProps<typeof RN.Image>['accessible'];
|
|
3891
|
+
color?: unknown;
|
|
3892
|
+
/** @default false */
|
|
3893
|
+
disableColor?: boolean;
|
|
3894
|
+
ref?: React$1.Ref<any>;
|
|
3895
|
+
/** @default 'cover' */
|
|
3896
|
+
resizeMode?: React$1.ComponentProps<typeof RN.Image>['resizeMode'];
|
|
3897
|
+
size?: unknown;
|
|
3898
|
+
source?: React$1.ComponentProps<typeof RN.Image>['source'];
|
|
3899
|
+
style?: React$1.ComponentProps<typeof RN.Image>['style'];
|
|
3900
|
+
};
|
|
3901
|
+
/**
|
|
3902
|
+
* Props of `VoidTextInput` (function). Exports: default.
|
|
3903
|
+
* @see design/void/TextInput/native/TextInput.tsx
|
|
3904
|
+
*/
|
|
3905
|
+
export type VoidTextInputProps = Omit<
|
|
3906
|
+
React$1.ComponentProps<typeof RN.TextInput>,
|
|
3907
|
+
'ref' | 'style'
|
|
3908
|
+
> & {
|
|
3909
|
+
ref?: React$1.Ref<any>;
|
|
3910
|
+
style?: React$1.ComponentProps<typeof RN.TextInput>['style'];
|
|
3911
|
+
};
|
|
3912
|
+
/**
|
|
3913
|
+
* Props of `WrappedNavigationStack` (function). Exports: none.
|
|
3914
|
+
* @see design/components/Navigator/native/Navigator.native.tsx
|
|
3915
|
+
*/
|
|
3916
|
+
export type WrappedNavigationStackProps = Omit<
|
|
3917
|
+
NavigationStackProps,
|
|
3918
|
+
| 'initialRouteName'
|
|
3919
|
+
| 'initialRouteStack'
|
|
3920
|
+
| 'initialRouteState'
|
|
3921
|
+
| 'navigationTheme'
|
|
3922
|
+
| 'onStateChange'
|
|
3923
|
+
> & {
|
|
3924
|
+
initialRouteName?: unknown;
|
|
3925
|
+
initialRouteStack?: unknown;
|
|
3926
|
+
initialRouteState?: unknown;
|
|
3927
|
+
navigationTheme?: unknown;
|
|
3928
|
+
onStateChange?: NavigationContainerInnerProps['onStateChange'];
|
|
3929
|
+
};
|
|
3930
|
+
export type YouTabLottieComponent = React$1.ComponentType<
|
|
3931
|
+
YouTabLottieProps & Record<string, unknown>
|
|
3932
|
+
>;
|
|
3933
|
+
/**
|
|
3934
|
+
* Props of `YouTabLottie` (function). Exports: YouTabLottie.
|
|
3935
|
+
* @see design/components/LottieIcon/native/generated/YouTabLottie.tsx
|
|
3936
|
+
*/
|
|
3937
|
+
export type YouTabLottieProps = Omit<LottieIconProps, 'ref'> & {
|
|
3938
|
+
ref?: LottieIconProps['ref'];
|
|
3939
|
+
};
|
|
924
3940
|
/** The lifecycle and settings contract implemented by a plugin. */
|
|
925
3941
|
type Plugin$1 = {
|
|
926
3942
|
start?(context?: PluginContext): void;
|
|
927
|
-
stop?(): void
|
|
928
|
-
getSettingsPanel?():
|
|
3943
|
+
stop?(): void | Promise<void>;
|
|
3944
|
+
getSettingsPanel?(): React$1.ReactNode;
|
|
929
3945
|
};
|
|
930
3946
|
|
|
931
3947
|
export { Plugin$1 as Plugin };
|