@grafana/plugin-types 0.0.12 → 0.0.14

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.
@@ -1,7 +1,2832 @@
1
1
  // Generated by dts-bundle-generator v9.5.1
2
2
 
3
+ import * as CSS$1 from 'csstype';
4
+ import * as PropTypes from 'prop-types';
5
+ import { Interaction as SchedulerInteraction } from 'scheduler/tracing';
6
+
7
+ /*
8
+ React projects that don't include the DOM library need these interfaces to compile.
9
+ React Native applications use React, but there is no DOM available. The JavaScript runtime
10
+ is ES6/ES2015 only. These definitions allow such projects to compile with only `--lib ES6`.
11
+
12
+ Warning: all of these interfaces are empty. If you want type definitions for various properties
13
+ (such as HTMLInputElement.prototype.value), you need to add `--lib DOM` (via command line or tsconfig.json).
14
+ */
15
+ export interface Event {
16
+ }
17
+ export interface AnimationEvent extends Event {
18
+ }
19
+ export interface ClipboardEvent extends Event {
20
+ }
21
+ export interface CompositionEvent extends Event {
22
+ }
23
+ export interface DragEvent extends Event {
24
+ }
25
+ export interface FocusEvent extends Event {
26
+ }
27
+ export interface KeyboardEvent extends Event {
28
+ }
29
+ export interface MouseEvent extends Event {
30
+ }
31
+ export interface TouchEvent extends Event {
32
+ }
33
+ export interface PointerEvent extends Event {
34
+ }
35
+ export interface TransitionEvent extends Event {
36
+ }
37
+ export interface UIEvent extends Event {
38
+ }
39
+ export interface WheelEvent extends Event {
40
+ }
41
+ export interface EventTarget {
42
+ }
43
+ export interface Document {
44
+ }
45
+ export interface DataTransfer {
46
+ }
47
+ export interface StyleMedia {
48
+ }
49
+ export interface Element {
50
+ }
51
+ export interface HTMLElement extends Element {
52
+ }
53
+ export interface HTMLAnchorElement extends HTMLElement {
54
+ }
55
+ export interface HTMLAreaElement extends HTMLElement {
56
+ }
57
+ export interface HTMLAudioElement extends HTMLElement {
58
+ }
59
+ export interface HTMLBaseElement extends HTMLElement {
60
+ }
61
+ export interface HTMLBodyElement extends HTMLElement {
62
+ }
63
+ export interface HTMLBRElement extends HTMLElement {
64
+ }
65
+ export interface HTMLButtonElement extends HTMLElement {
66
+ }
67
+ export interface HTMLCanvasElement extends HTMLElement {
68
+ }
69
+ export interface HTMLDataElement extends HTMLElement {
70
+ }
71
+ export interface HTMLDataListElement extends HTMLElement {
72
+ }
73
+ export interface HTMLDetailsElement extends HTMLElement {
74
+ }
75
+ export interface HTMLDialogElement extends HTMLElement {
76
+ }
77
+ export interface HTMLDivElement extends HTMLElement {
78
+ }
79
+ export interface HTMLDListElement extends HTMLElement {
80
+ }
81
+ export interface HTMLEmbedElement extends HTMLElement {
82
+ }
83
+ export interface HTMLFieldSetElement extends HTMLElement {
84
+ }
85
+ export interface HTMLFormElement extends HTMLElement {
86
+ }
87
+ export interface HTMLHeadingElement extends HTMLElement {
88
+ }
89
+ export interface HTMLHeadElement extends HTMLElement {
90
+ }
91
+ export interface HTMLHRElement extends HTMLElement {
92
+ }
93
+ export interface HTMLHtmlElement extends HTMLElement {
94
+ }
95
+ export interface HTMLIFrameElement extends HTMLElement {
96
+ }
97
+ export interface HTMLImageElement extends HTMLElement {
98
+ }
99
+ export interface HTMLInputElement extends HTMLElement {
100
+ }
101
+ export interface HTMLModElement extends HTMLElement {
102
+ }
103
+ export interface HTMLLabelElement extends HTMLElement {
104
+ }
105
+ export interface HTMLLegendElement extends HTMLElement {
106
+ }
107
+ export interface HTMLLIElement extends HTMLElement {
108
+ }
109
+ export interface HTMLLinkElement extends HTMLElement {
110
+ }
111
+ export interface HTMLMapElement extends HTMLElement {
112
+ }
113
+ export interface HTMLMetaElement extends HTMLElement {
114
+ }
115
+ export interface HTMLMeterElement extends HTMLElement {
116
+ }
117
+ export interface HTMLObjectElement extends HTMLElement {
118
+ }
119
+ export interface HTMLOListElement extends HTMLElement {
120
+ }
121
+ export interface HTMLOptGroupElement extends HTMLElement {
122
+ }
123
+ export interface HTMLOptionElement extends HTMLElement {
124
+ }
125
+ export interface HTMLOutputElement extends HTMLElement {
126
+ }
127
+ export interface HTMLParagraphElement extends HTMLElement {
128
+ }
129
+ export interface HTMLParamElement extends HTMLElement {
130
+ }
131
+ export interface HTMLPreElement extends HTMLElement {
132
+ }
133
+ export interface HTMLProgressElement extends HTMLElement {
134
+ }
135
+ export interface HTMLQuoteElement extends HTMLElement {
136
+ }
137
+ export interface HTMLSlotElement extends HTMLElement {
138
+ }
139
+ export interface HTMLScriptElement extends HTMLElement {
140
+ }
141
+ export interface HTMLSelectElement extends HTMLElement {
142
+ }
143
+ export interface HTMLSourceElement extends HTMLElement {
144
+ }
145
+ export interface HTMLSpanElement extends HTMLElement {
146
+ }
147
+ export interface HTMLStyleElement extends HTMLElement {
148
+ }
149
+ export interface HTMLTableElement extends HTMLElement {
150
+ }
151
+ export interface HTMLTableColElement extends HTMLElement {
152
+ }
153
+ export interface HTMLTableDataCellElement extends HTMLElement {
154
+ }
155
+ export interface HTMLTableHeaderCellElement extends HTMLElement {
156
+ }
157
+ export interface HTMLTableRowElement extends HTMLElement {
158
+ }
159
+ export interface HTMLTableSectionElement extends HTMLElement {
160
+ }
161
+ export interface HTMLTemplateElement extends HTMLElement {
162
+ }
163
+ export interface HTMLTextAreaElement extends HTMLElement {
164
+ }
165
+ export interface HTMLTimeElement extends HTMLElement {
166
+ }
167
+ export interface HTMLTitleElement extends HTMLElement {
168
+ }
169
+ export interface HTMLTrackElement extends HTMLElement {
170
+ }
171
+ export interface HTMLUListElement extends HTMLElement {
172
+ }
173
+ export interface HTMLVideoElement extends HTMLElement {
174
+ }
175
+ export interface HTMLWebViewElement extends HTMLElement {
176
+ }
177
+ export interface SVGElement extends Element {
178
+ }
179
+ export interface TrustedHTML {
180
+ }
181
+ export type NativeAnimationEvent = AnimationEvent;
182
+ export type NativeClipboardEvent = ClipboardEvent;
183
+ export type NativeCompositionEvent = CompositionEvent;
184
+ export type NativeDragEvent = DragEvent;
185
+ export type NativeFocusEvent = FocusEvent;
186
+ export type NativeKeyboardEvent = KeyboardEvent;
187
+ export type NativeMouseEvent = MouseEvent;
188
+ export type NativeTouchEvent = TouchEvent;
189
+ export type NativePointerEvent = PointerEvent;
190
+ export type NativeTransitionEvent = TransitionEvent;
191
+ export type NativeUIEvent = UIEvent;
192
+ export type NativeWheelEvent = WheelEvent;
193
+ export type Booleanish = boolean | "true" | "false";
194
+ export type CrossOrigin = "anonymous" | "use-credentials" | "" | undefined;
195
+ declare const UNDEFINED_VOID_ONLY: unique symbol;
196
+ // Destructors are only allowed to return void.
197
+ export type Destructor = () => void | {
198
+ [UNDEFINED_VOID_ONLY]: never;
199
+ };
200
+ declare namespace React$1 {
201
+ //
202
+ // React Elements
203
+ // ----------------------------------------------------------------------
204
+ type ElementType<P = any> = {
205
+ [K in keyof JSX.IntrinsicElements]: P extends JSX.IntrinsicElements[K] ? K : never;
206
+ }[keyof JSX.IntrinsicElements] | ComponentType<P>;
207
+ /**
208
+ * @deprecated Please use `ElementType`
209
+ */
210
+ type ReactType<P = any> = ElementType<P>;
211
+ type ComponentType<P = {}> = ComponentClass<P> | FunctionComponent<P>;
212
+ type JSXElementConstructor<P> = ((props: P) => ReactElement<any, any> | null) | (new (props: P) => Component<any, any>);
213
+ interface RefObject<T> {
214
+ readonly current: T | null;
215
+ }
216
+ // Bivariance hack for consistent unsoundness with RefObject
217
+ type RefCallback<T> = {
218
+ bivarianceHack(instance: T | null): void;
219
+ }["bivarianceHack"];
220
+ type Ref<T> = RefCallback<T> | RefObject<T> | null;
221
+ type LegacyRef<T> = string | Ref<T>;
222
+ /**
223
+ * Gets the instance type for a React element. The instance will be different for various component types:
224
+ *
225
+ * - React class components will be the class instance. So if you had `class Foo extends React.Component<{}> {}`
226
+ * and used `React.ElementRef<typeof Foo>` then the type would be the instance of `Foo`.
227
+ * - React stateless functional components do not have a backing instance and so `React.ElementRef<typeof Bar>`
228
+ * (when `Bar` is `function Bar() {}`) will give you the `undefined` type.
229
+ * - JSX intrinsics like `div` will give you their DOM instance. For `React.ElementRef<'div'>` that would be
230
+ * `HTMLDivElement`. For `React.ElementRef<'input'>` that would be `HTMLInputElement`.
231
+ * - React stateless functional components that forward a `ref` will give you the `ElementRef` of the forwarded
232
+ * to component.
233
+ *
234
+ * `C` must be the type _of_ a React component so you need to use typeof as in `React.ElementRef<typeof MyComponent>`.
235
+ *
236
+ * @todo In Flow, this works a little different with forwarded refs and the `AbstractComponent` that
237
+ * `React.forwardRef()` returns.
238
+ */
239
+ type ElementRef<C extends ForwardRefExoticComponent<any> | {
240
+ new (props: any): Component<any>;
241
+ } | ((props: any, context?: any) => ReactElement | null) | keyof JSX.IntrinsicElements> =
242
+ // need to check first if `ref` is a valid prop for ts@3.0
243
+ // otherwise it will infer `{}` instead of `never`
244
+ "ref" extends keyof ComponentPropsWithRef<C> ? NonNullable<ComponentPropsWithRef<C>["ref"]> extends Ref<infer Instance> ? Instance : never : never;
245
+ type ComponentState = any;
246
+ type Key = string | number;
247
+ /**
248
+ * @internal You shouldn't need to use this type since you never see these attributes
249
+ * inside your component or have to validate them.
250
+ */
251
+ interface Attributes {
252
+ key?: Key | null | undefined;
253
+ }
254
+ interface RefAttributes<T> extends Attributes {
255
+ ref?: Ref<T> | undefined;
256
+ }
257
+ interface ClassAttributes<T> extends Attributes {
258
+ ref?: LegacyRef<T> | undefined;
259
+ }
260
+ interface ReactElement<P = any, T extends string | JSXElementConstructor<any> = string | JSXElementConstructor<any>> {
261
+ type: T;
262
+ props: P;
263
+ key: Key | null;
264
+ }
265
+ interface ReactComponentElement<T extends keyof JSX.IntrinsicElements | JSXElementConstructor<any>, P = Pick<ComponentProps<T>, Exclude<keyof ComponentProps<T>, "key" | "ref">>> extends ReactElement<P, Exclude<T, number>> {
266
+ }
267
+ /**
268
+ * @deprecated Please use `FunctionComponentElement`
269
+ */
270
+ type SFCElement<P> = FunctionComponentElement<P>;
271
+ interface FunctionComponentElement<P> extends ReactElement<P, FunctionComponent<P>> {
272
+ ref?: ("ref" extends keyof P ? P extends {
273
+ ref?: infer R | undefined;
274
+ } ? R : never : never) | undefined;
275
+ }
276
+ type CElement<P, T extends Component<P, ComponentState>> = ComponentElement<P, T>;
277
+ interface ComponentElement<P, T extends Component<P, ComponentState>> extends ReactElement<P, ComponentClass<P>> {
278
+ ref?: LegacyRef<T> | undefined;
279
+ }
280
+ type ClassicElement<P> = CElement<P, ClassicComponent<P, ComponentState>>;
281
+ // string fallback for custom web-components
282
+ interface DOMElement<P extends HTMLAttributes<T> | SVGAttributes<T>, T extends Element> extends ReactElement<P, string> {
283
+ ref: LegacyRef<T>;
284
+ }
285
+ // ReactHTML for ReactHTMLElement
286
+ interface ReactHTMLElement<T extends HTMLElement> extends DetailedReactHTMLElement<AllHTMLAttributes<T>, T> {
287
+ }
288
+ interface DetailedReactHTMLElement<P extends HTMLAttributes<T>, T extends HTMLElement> extends DOMElement<P, T> {
289
+ type: keyof ReactHTML;
290
+ }
291
+ // ReactSVG for ReactSVGElement
292
+ interface ReactSVGElement extends DOMElement<SVGAttributes<SVGElement>, SVGElement> {
293
+ type: keyof ReactSVG;
294
+ }
295
+ interface ReactPortal extends ReactElement {
296
+ key: Key | null;
297
+ children: ReactNode;
298
+ }
299
+ //
300
+ // Factories
301
+ // ----------------------------------------------------------------------
302
+ type Factory<P> = (props?: Attributes & P, ...children: ReactNode[]) => ReactElement<P>;
303
+ /**
304
+ * @deprecated Please use `FunctionComponentFactory`
305
+ */
306
+ type SFCFactory<P> = FunctionComponentFactory<P>;
307
+ type FunctionComponentFactory<P> = (props?: Attributes & P, ...children: ReactNode[]) => FunctionComponentElement<P>;
308
+ type ComponentFactory<P, T extends Component<P, ComponentState>> = (props?: ClassAttributes<T> & P, ...children: ReactNode[]) => CElement<P, T>;
309
+ type CFactory<P, T extends Component<P, ComponentState>> = ComponentFactory<P, T>;
310
+ type ClassicFactory<P> = CFactory<P, ClassicComponent<P, ComponentState>>;
311
+ type DOMFactory<P extends DOMAttributes<T>, T extends Element> = (props?: ClassAttributes<T> & P | null, ...children: ReactNode[]) => DOMElement<P, T>;
312
+ interface HTMLFactory<T extends HTMLElement> extends DetailedHTMLFactory<AllHTMLAttributes<T>, T> {
313
+ }
314
+ interface DetailedHTMLFactory<P extends HTMLAttributes<T>, T extends HTMLElement> extends DOMFactory<P, T> {
315
+ (props?: ClassAttributes<T> & P | null, ...children: ReactNode[]): DetailedReactHTMLElement<P, T>;
316
+ }
317
+ interface SVGFactory extends DOMFactory<SVGAttributes<SVGElement>, SVGElement> {
318
+ (props?: ClassAttributes<SVGElement> & SVGAttributes<SVGElement> | null, ...children: ReactNode[]): ReactSVGElement;
319
+ }
320
+ //
321
+ // React Nodes
322
+ // ----------------------------------------------------------------------
323
+ type ReactText = string | number;
324
+ type ReactChild = ReactElement | ReactText;
325
+ /**
326
+ * @deprecated Use either `ReactNode[]` if you need an array or `Iterable<ReactNode>` if its passed to a host component.
327
+ */
328
+ interface ReactNodeArray extends ReadonlyArray<ReactNode> {
329
+ }
330
+ type ReactFragment = {} | Iterable<ReactNode>;
331
+ type ReactNode = ReactChild | ReactFragment | ReactPortal | boolean | null | undefined;
332
+ //
333
+ // Top Level API
334
+ // ----------------------------------------------------------------------
335
+ // DOM Elements
336
+ function createFactory<T extends HTMLElement>(type: keyof ReactHTML): HTMLFactory<T>;
337
+ function createFactory(type: keyof ReactSVG): SVGFactory;
338
+ function createFactory<P extends DOMAttributes<T>, T extends Element>(type: string): DOMFactory<P, T>;
339
+ // Custom components
340
+ function createFactory<P>(type: FunctionComponent<P>): FunctionComponentFactory<P>;
341
+ function createFactory<P>(type: ClassType<P, ClassicComponent<P, ComponentState>, ClassicComponentClass<P>>): CFactory<P, ClassicComponent<P, ComponentState>>;
342
+ function createFactory<P, T extends Component<P, ComponentState>, C extends ComponentClass<P>>(type: ClassType<P, T, C>): CFactory<P, T>;
343
+ function createFactory<P>(type: ComponentClass<P>): Factory<P>;
344
+ // DOM Elements
345
+ // TODO: generalize this to everything in `keyof ReactHTML`, not just "input"
346
+ function createElement(type: "input", props?: InputHTMLAttributes<HTMLInputElement> & ClassAttributes<HTMLInputElement> | null, ...children: ReactNode[]): DetailedReactHTMLElement<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>;
347
+ function createElement<P extends HTMLAttributes<T>, T extends HTMLElement>(type: keyof ReactHTML, props?: ClassAttributes<T> & P | null, ...children: ReactNode[]): DetailedReactHTMLElement<P, T>;
348
+ function createElement<P extends SVGAttributes<T>, T extends SVGElement>(type: keyof ReactSVG, props?: ClassAttributes<T> & P | null, ...children: ReactNode[]): ReactSVGElement;
349
+ function createElement<P extends DOMAttributes<T>, T extends Element>(type: string, props?: ClassAttributes<T> & P | null, ...children: ReactNode[]): DOMElement<P, T>;
350
+ // Custom components
351
+ function createElement<P extends {}>(type: FunctionComponent<P>, props?: Attributes & P | null, ...children: ReactNode[]): FunctionComponentElement<P>;
352
+ function createElement<P extends {}>(type: ClassType<P, ClassicComponent<P, ComponentState>, ClassicComponentClass<P>>, props?: ClassAttributes<ClassicComponent<P, ComponentState>> & P | null, ...children: ReactNode[]): CElement<P, ClassicComponent<P, ComponentState>>;
353
+ function createElement<P extends {}, T extends Component<P, ComponentState>, C extends ComponentClass<P>>(type: ClassType<P, T, C>, props?: ClassAttributes<T> & P | null, ...children: ReactNode[]): CElement<P, T>;
354
+ function createElement<P extends {}>(type: FunctionComponent<P> | ComponentClass<P> | string, props?: Attributes & P | null, ...children: ReactNode[]): ReactElement<P>;
355
+ // DOM Elements
356
+ // ReactHTMLElement
357
+ function cloneElement<P extends HTMLAttributes<T>, T extends HTMLElement>(element: DetailedReactHTMLElement<P, T>, props?: P, ...children: ReactNode[]): DetailedReactHTMLElement<P, T>;
358
+ // ReactHTMLElement, less specific
359
+ function cloneElement<P extends HTMLAttributes<T>, T extends HTMLElement>(element: ReactHTMLElement<T>, props?: P, ...children: ReactNode[]): ReactHTMLElement<T>;
360
+ // SVGElement
361
+ function cloneElement<P extends SVGAttributes<T>, T extends SVGElement>(element: ReactSVGElement, props?: P, ...children: ReactNode[]): ReactSVGElement;
362
+ // DOM Element (has to be the last, because type checking stops at first overload that fits)
363
+ function cloneElement<P extends DOMAttributes<T>, T extends Element>(element: DOMElement<P, T>, props?: DOMAttributes<T> & P, ...children: ReactNode[]): DOMElement<P, T>;
364
+ // Custom components
365
+ function cloneElement<P>(element: FunctionComponentElement<P>, props?: Partial<P> & Attributes, ...children: ReactNode[]): FunctionComponentElement<P>;
366
+ function cloneElement<P, T extends Component<P, ComponentState>>(element: CElement<P, T>, props?: Partial<P> & ClassAttributes<T>, ...children: ReactNode[]): CElement<P, T>;
367
+ function cloneElement<P>(element: ReactElement<P>, props?: Partial<P> & Attributes, ...children: ReactNode[]): ReactElement<P>;
368
+ // Context via RenderProps
369
+ interface ProviderProps<T> {
370
+ value: T;
371
+ children?: ReactNode | undefined;
372
+ }
373
+ interface ConsumerProps<T> {
374
+ children: (value: T) => ReactNode;
375
+ }
376
+ // TODO: similar to how Fragment is actually a symbol, the values returned from createContext,
377
+ // forwardRef and memo are actually objects that are treated specially by the renderer; see:
378
+ // https://github.com/facebook/react/blob/v16.6.0/packages/react/src/ReactContext.js#L35-L48
379
+ // https://github.com/facebook/react/blob/v16.6.0/packages/react/src/forwardRef.js#L42-L45
380
+ // https://github.com/facebook/react/blob/v16.6.0/packages/react/src/memo.js#L27-L31
381
+ // However, we have no way of telling the JSX parser that it's a JSX element type or its props other than
382
+ // by pretending to be a normal component.
383
+ //
384
+ // We don't just use ComponentType or FunctionComponent types because you are not supposed to attach statics to this
385
+ // object, but rather to the original function.
386
+ interface ExoticComponent<P = {}> {
387
+ /**
388
+ * **NOTE**: Exotic components are not callable.
389
+ */
390
+ (props: P): ReactElement | null;
391
+ readonly $$typeof: symbol;
392
+ }
393
+ interface NamedExoticComponent<P = {}> extends ExoticComponent<P> {
394
+ displayName?: string | undefined;
395
+ }
396
+ interface ProviderExoticComponent<P> extends ExoticComponent<P> {
397
+ propTypes?: WeakValidationMap<P> | undefined;
398
+ }
399
+ type ContextType<C extends Context<any>> = C extends Context<infer T> ? T : never;
400
+ // NOTE: only the Context object itself can get a displayName
401
+ // https://github.com/facebook/react-devtools/blob/e0b854e4c/backend/attachRendererFiber.js#L310-L325
402
+ type Provider<T> = ProviderExoticComponent<ProviderProps<T>>;
403
+ type Consumer<T> = ExoticComponent<ConsumerProps<T>>;
404
+ interface Context<T> {
405
+ Provider: Provider<T>;
406
+ Consumer: Consumer<T>;
407
+ displayName?: string | undefined;
408
+ }
409
+ function createContext<T>(
410
+ // If you thought this should be optional, see
411
+ // https://github.com/DefinitelyTyped/DefinitelyTyped/pull/24509#issuecomment-382213106
412
+ defaultValue: T): Context<T>;
413
+ function isValidElement<P>(object: {} | null | undefined): object is ReactElement<P>;
414
+ const Children: ReactChildren;
415
+ const Fragment: ExoticComponent<{
416
+ children?: ReactNode | undefined;
417
+ }>;
418
+ const StrictMode: ExoticComponent<{
419
+ children?: ReactNode | undefined;
420
+ }>;
421
+ interface SuspenseProps {
422
+ children?: ReactNode | undefined;
423
+ // TODO(react18): `fallback?: ReactNode;`
424
+ /** A fallback react tree to show when a Suspense child (like React.lazy) suspends */
425
+ fallback: NonNullable<ReactNode> | null;
426
+ }
427
+ // TODO(react18): Updated JSDoc to reflect that Suspense works on the server.
428
+ /**
429
+ * This feature is not yet available for server-side rendering.
430
+ * Suspense support will be added in a later release.
431
+ */
432
+ const Suspense: ExoticComponent<SuspenseProps>;
433
+ const version: string;
434
+ /**
435
+ * {@link https://react.dev/reference/react/Profiler#onrender-callback Profiler API}}
436
+ */
437
+ type ProfilerOnRenderCallback = (id: string, phase: "mount" | "update", actualDuration: number, baseDuration: number, startTime: number, commitTime: number, interactions: Set<SchedulerInteraction>) => void;
438
+ interface ProfilerProps {
439
+ children?: ReactNode | undefined;
440
+ id: string;
441
+ onRender: ProfilerOnRenderCallback;
442
+ }
443
+ const Profiler: ExoticComponent<ProfilerProps>;
444
+ //
445
+ // Component API
446
+ // ----------------------------------------------------------------------
447
+ type ReactInstance = Component<any> | Element;
448
+ // Base component for plain JS classes
449
+ interface Component<P = {}, S = {}, SS = any> extends ComponentLifecycle<P, S, SS> {
450
+ }
451
+ class Component<P, S> {
452
+ // tslint won't let me format the sample code in a way that vscode likes it :(
453
+ /**
454
+ * If set, `this.context` will be set at runtime to the current value of the given Context.
455
+ *
456
+ * Usage:
457
+ *
458
+ * ```ts
459
+ * type MyContext = number
460
+ * const Ctx = React.createContext<MyContext>(0)
461
+ *
462
+ * class Foo extends React.Component {
463
+ * static contextType = Ctx
464
+ * context!: React.ContextType<typeof Ctx>
465
+ * render () {
466
+ * return <>My context's value: {this.context}</>;
467
+ * }
468
+ * }
469
+ * ```
470
+ *
471
+ * @see https://react.dev/reference/react/Component#static-contexttype
472
+ */
473
+ static contextType?: Context<any> | undefined;
474
+ /**
475
+ * If using the new style context, re-declare this in your class to be the
476
+ * `React.ContextType` of your `static contextType`.
477
+ * Should be used with type annotation or static contextType.
478
+ *
479
+ * ```ts
480
+ * static contextType = MyContext
481
+ * // For TS pre-3.7:
482
+ * context!: React.ContextType<typeof MyContext>
483
+ * // For TS 3.7 and above:
484
+ * declare context: React.ContextType<typeof MyContext>
485
+ * ```
486
+ *
487
+ * @see https://react.dev/reference/react/Component#context
488
+ */
489
+ // TODO (TypeScript 3.0): unknown
490
+ context: any;
491
+ constructor(props: Readonly<P> | P);
492
+ /**
493
+ * @deprecated
494
+ * @see https://legacy.reactjs.org/docs/legacy-context.html
495
+ */
496
+ constructor(props: P, context: any);
497
+ // We MUST keep setState() as a unified signature because it allows proper checking of the method return type.
498
+ // See: https://github.com/DefinitelyTyped/DefinitelyTyped/issues/18365#issuecomment-351013257
499
+ // Also, the ` | S` allows intellisense to not be dumbisense
500
+ setState<K extends keyof S>(state: ((prevState: Readonly<S>, props: Readonly<P>) => Pick<S, K> | S | null) | (Pick<S, K> | S | null), callback?: () => void): void;
501
+ forceUpdate(callback?: () => void): void;
502
+ render(): ReactNode;
503
+ // React.Props<T> is now deprecated, which means that the `children`
504
+ // property is not available on `P` by default, even though you can
505
+ // always pass children as variadic arguments to `createElement`.
506
+ // In the future, if we can define its call signature conditionally
507
+ // on the existence of `children` in `P`, then we should remove this.
508
+ readonly props: Readonly<P> & Readonly<{
509
+ children?: ReactNode | undefined;
510
+ }>;
511
+ state: Readonly<S>;
512
+ /**
513
+ * @deprecated
514
+ * https://legacy.reactjs.org/docs/refs-and-the-dom.html#legacy-api-string-refs
515
+ */
516
+ refs: {
517
+ [key: string]: ReactInstance;
518
+ };
519
+ }
520
+ class PureComponent<P = {}, S = {}, SS = any> extends Component<P, S, SS> {
521
+ }
522
+ interface ClassicComponent<P = {}, S = {}> extends Component<P, S> {
523
+ replaceState(nextState: S, callback?: () => void): void;
524
+ isMounted(): boolean;
525
+ getInitialState?(): S;
526
+ }
527
+ interface ChildContextProvider<CC> {
528
+ getChildContext(): CC;
529
+ }
530
+ //
531
+ // Class Interfaces
532
+ // ----------------------------------------------------------------------
533
+ /**
534
+ * @deprecated as of recent React versions, function components can no
535
+ * longer be considered 'stateless'. Please use `FunctionComponent` instead.
536
+ *
537
+ * @see [React Hooks](https://reactjs.org/docs/hooks-intro.html)
538
+ */
539
+ type SFC<P = {}> = FunctionComponent<P>;
540
+ /**
541
+ * @deprecated as of recent React versions, function components can no
542
+ * longer be considered 'stateless'. Please use `FunctionComponent` instead.
543
+ *
544
+ * @see [React Hooks](https://reactjs.org/docs/hooks-intro.html)
545
+ */
546
+ type StatelessComponent<P = {}> = FunctionComponent<P>;
547
+ type FC<P = {}> = FunctionComponent<P>;
548
+ interface FunctionComponent<P = {}> {
549
+ (props: PropsWithChildren<P>, context?: any): ReactElement<any, any> | null;
550
+ propTypes?: WeakValidationMap<P> | undefined;
551
+ contextTypes?: ValidationMap<any> | undefined;
552
+ defaultProps?: Partial<P> | undefined;
553
+ displayName?: string | undefined;
554
+ }
555
+ type VFC<P = {}> = VoidFunctionComponent<P>;
556
+ interface VoidFunctionComponent<P = {}> {
557
+ (props: P, context?: any): ReactElement<any, any> | null;
558
+ propTypes?: WeakValidationMap<P> | undefined;
559
+ contextTypes?: ValidationMap<any> | undefined;
560
+ defaultProps?: Partial<P> | undefined;
561
+ displayName?: string | undefined;
562
+ }
563
+ type ForwardedRef<T> = ((instance: T | null) => void) | MutableRefObject<T | null> | null;
564
+ interface ForwardRefRenderFunction<T, P = {}> {
565
+ (props: PropsWithChildren<P>, ref: ForwardedRef<T>): ReactElement | null;
566
+ displayName?: string | undefined;
567
+ // explicit rejected with `never` required due to
568
+ // https://github.com/microsoft/TypeScript/issues/36826
569
+ /**
570
+ * defaultProps are not supported on render functions
571
+ */
572
+ defaultProps?: never | undefined;
573
+ /**
574
+ * propTypes are not supported on render functions
575
+ */
576
+ propTypes?: never | undefined;
577
+ }
578
+ /**
579
+ * @deprecated Use ForwardRefRenderFunction. forwardRef doesn't accept a
580
+ * "real" component.
581
+ */
582
+ interface RefForwardingComponent<T, P = {}> extends ForwardRefRenderFunction<T, P> {
583
+ }
584
+ interface ComponentClass<P = {}, S = ComponentState> extends StaticLifecycle<P, S> {
585
+ new (props: P, context?: any): Component<P, S>;
586
+ propTypes?: WeakValidationMap<P> | undefined;
587
+ contextType?: Context<any> | undefined;
588
+ contextTypes?: ValidationMap<any> | undefined;
589
+ childContextTypes?: ValidationMap<any> | undefined;
590
+ defaultProps?: Partial<P> | undefined;
591
+ displayName?: string | undefined;
592
+ }
593
+ interface ClassicComponentClass<P = {}> extends ComponentClass<P> {
594
+ new (props: P, context?: any): ClassicComponent<P, ComponentState>;
595
+ getDefaultProps?(): P;
596
+ }
597
+ /**
598
+ * We use an intersection type to infer multiple type parameters from
599
+ * a single argument, which is useful for many top-level API defs.
600
+ * See https://github.com/Microsoft/TypeScript/issues/7234 for more info.
601
+ */
602
+ type ClassType<P, T extends Component<P, ComponentState>, C extends ComponentClass<P>> = C & (new (props: P, context?: any) => T);
603
+ //
604
+ // Component Specs and Lifecycle
605
+ // ----------------------------------------------------------------------
606
+ // This should actually be something like `Lifecycle<P, S> | DeprecatedLifecycle<P, S>`,
607
+ // as React will _not_ call the deprecated lifecycle methods if any of the new lifecycle
608
+ // methods are present.
609
+ interface ComponentLifecycle<P, S, SS = any> extends NewLifecycle<P, S, SS>, DeprecatedLifecycle<P, S> {
610
+ /**
611
+ * Called immediately after a component is mounted. Setting state here will trigger re-rendering.
612
+ */
613
+ componentDidMount?(): void;
614
+ /**
615
+ * Called to determine whether the change in props and state should trigger a re-render.
616
+ *
617
+ * `Component` always returns true.
618
+ * `PureComponent` implements a shallow comparison on props and state and returns true if any
619
+ * props or states have changed.
620
+ *
621
+ * If false is returned, `Component#render`, `componentWillUpdate`
622
+ * and `componentDidUpdate` will not be called.
623
+ */
624
+ shouldComponentUpdate?(nextProps: Readonly<P>, nextState: Readonly<S>, nextContext: any): boolean;
625
+ /**
626
+ * Called immediately before a component is destroyed. Perform any necessary cleanup in this method, such as
627
+ * cancelled network requests, or cleaning up any DOM elements created in `componentDidMount`.
628
+ */
629
+ componentWillUnmount?(): void;
630
+ /**
631
+ * Catches exceptions generated in descendant components. Unhandled exceptions will cause
632
+ * the entire component tree to unmount.
633
+ */
634
+ componentDidCatch?(error: Error, errorInfo: ErrorInfo): void;
635
+ }
636
+ // Unfortunately, we have no way of declaring that the component constructor must implement this
637
+ interface StaticLifecycle<P, S> {
638
+ getDerivedStateFromProps?: GetDerivedStateFromProps<P, S> | undefined;
639
+ getDerivedStateFromError?: GetDerivedStateFromError<P, S> | undefined;
640
+ }
641
+ type GetDerivedStateFromProps<P, S> =
642
+ /**
643
+ * Returns an update to a component's state based on its new props and old state.
644
+ *
645
+ * Note: its presence prevents any of the deprecated lifecycle methods from being invoked
646
+ */
647
+ (nextProps: Readonly<P>, prevState: S) => Partial<S> | null;
648
+ type GetDerivedStateFromError<P, S> =
649
+ /**
650
+ * This lifecycle is invoked after an error has been thrown by a descendant component.
651
+ * It receives the error that was thrown as a parameter and should return a value to update state.
652
+ *
653
+ * Note: its presence prevents any of the deprecated lifecycle methods from being invoked
654
+ */
655
+ (error: any) => Partial<S> | null;
656
+ // This should be "infer SS" but can't use it yet
657
+ interface NewLifecycle<P, S, SS> {
658
+ /**
659
+ * Runs before React applies the result of `render` to the document, and
660
+ * returns an object to be given to componentDidUpdate. Useful for saving
661
+ * things such as scroll position before `render` causes changes to it.
662
+ *
663
+ * Note: the presence of getSnapshotBeforeUpdate prevents any of the deprecated
664
+ * lifecycle events from running.
665
+ */
666
+ getSnapshotBeforeUpdate?(prevProps: Readonly<P>, prevState: Readonly<S>): SS | null;
667
+ /**
668
+ * Called immediately after updating occurs. Not called for the initial render.
669
+ *
670
+ * The snapshot is only present if getSnapshotBeforeUpdate is present and returns non-null.
671
+ */
672
+ componentDidUpdate?(prevProps: Readonly<P>, prevState: Readonly<S>, snapshot?: SS): void;
673
+ }
674
+ interface DeprecatedLifecycle<P, S> {
675
+ /**
676
+ * Called immediately before mounting occurs, and before `Component#render`.
677
+ * Avoid introducing any side-effects or subscriptions in this method.
678
+ *
679
+ * Note: the presence of getSnapshotBeforeUpdate or getDerivedStateFromProps
680
+ * prevents this from being invoked.
681
+ *
682
+ * @deprecated 16.3, use componentDidMount or the constructor instead; will stop working in React 17
683
+ * @see https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#initializing-state
684
+ * @see https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path
685
+ */
686
+ componentWillMount?(): void;
687
+ /**
688
+ * Called immediately before mounting occurs, and before `Component#render`.
689
+ * Avoid introducing any side-effects or subscriptions in this method.
690
+ *
691
+ * This method will not stop working in React 17.
692
+ *
693
+ * Note: the presence of getSnapshotBeforeUpdate or getDerivedStateFromProps
694
+ * prevents this from being invoked.
695
+ *
696
+ * @deprecated 16.3, use componentDidMount or the constructor instead
697
+ * @see https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#initializing-state
698
+ * @see https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path
699
+ */
700
+ UNSAFE_componentWillMount?(): void;
701
+ /**
702
+ * Called when the component may be receiving new props.
703
+ * React may call this even if props have not changed, so be sure to compare new and existing
704
+ * props if you only want to handle changes.
705
+ *
706
+ * Calling `Component#setState` generally does not trigger this method.
707
+ *
708
+ * Note: the presence of getSnapshotBeforeUpdate or getDerivedStateFromProps
709
+ * prevents this from being invoked.
710
+ *
711
+ * @deprecated 16.3, use static getDerivedStateFromProps instead; will stop working in React 17
712
+ * @see https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#updating-state-based-on-props
713
+ * @see https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path
714
+ */
715
+ componentWillReceiveProps?(nextProps: Readonly<P>, nextContext: any): void;
716
+ /**
717
+ * Called when the component may be receiving new props.
718
+ * React may call this even if props have not changed, so be sure to compare new and existing
719
+ * props if you only want to handle changes.
720
+ *
721
+ * Calling `Component#setState` generally does not trigger this method.
722
+ *
723
+ * This method will not stop working in React 17.
724
+ *
725
+ * Note: the presence of getSnapshotBeforeUpdate or getDerivedStateFromProps
726
+ * prevents this from being invoked.
727
+ *
728
+ * @deprecated 16.3, use static getDerivedStateFromProps instead
729
+ * @see https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#updating-state-based-on-props
730
+ * @see https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path
731
+ */
732
+ UNSAFE_componentWillReceiveProps?(nextProps: Readonly<P>, nextContext: any): void;
733
+ /**
734
+ * Called immediately before rendering when new props or state is received. Not called for the initial render.
735
+ *
736
+ * Note: You cannot call `Component#setState` here.
737
+ *
738
+ * Note: the presence of getSnapshotBeforeUpdate or getDerivedStateFromProps
739
+ * prevents this from being invoked.
740
+ *
741
+ * @deprecated 16.3, use getSnapshotBeforeUpdate instead; will stop working in React 17
742
+ * @see https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#reading-dom-properties-before-an-update
743
+ * @see https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path
744
+ */
745
+ componentWillUpdate?(nextProps: Readonly<P>, nextState: Readonly<S>, nextContext: any): void;
746
+ /**
747
+ * Called immediately before rendering when new props or state is received. Not called for the initial render.
748
+ *
749
+ * Note: You cannot call `Component#setState` here.
750
+ *
751
+ * This method will not stop working in React 17.
752
+ *
753
+ * Note: the presence of getSnapshotBeforeUpdate or getDerivedStateFromProps
754
+ * prevents this from being invoked.
755
+ *
756
+ * @deprecated 16.3, use getSnapshotBeforeUpdate instead
757
+ * @see https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#reading-dom-properties-before-an-update
758
+ * @see https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path
759
+ */
760
+ UNSAFE_componentWillUpdate?(nextProps: Readonly<P>, nextState: Readonly<S>, nextContext: any): void;
761
+ }
762
+ interface Mixin<P, S> extends ComponentLifecycle<P, S> {
763
+ mixins?: Array<Mixin<P, S>> | undefined;
764
+ statics?: {
765
+ [key: string]: any;
766
+ } | undefined;
767
+ displayName?: string | undefined;
768
+ propTypes?: ValidationMap<any> | undefined;
769
+ contextTypes?: ValidationMap<any> | undefined;
770
+ childContextTypes?: ValidationMap<any> | undefined;
771
+ getDefaultProps?(): P;
772
+ getInitialState?(): S;
773
+ }
774
+ interface ComponentSpec<P, S> extends Mixin<P, S> {
775
+ render(): ReactNode;
776
+ [propertyName: string]: any;
777
+ }
778
+ function createRef<T>(): RefObject<T>;
779
+ // will show `ForwardRef(${Component.displayName || Component.name})` in devtools by default,
780
+ // but can be given its own specific name
781
+ interface ForwardRefExoticComponent<P> extends NamedExoticComponent<P> {
782
+ defaultProps?: Partial<P> | undefined;
783
+ propTypes?: WeakValidationMap<P> | undefined;
784
+ }
785
+ function forwardRef<T, P = {}>(render: ForwardRefRenderFunction<T, P>): ForwardRefExoticComponent<PropsWithoutRef<P> & RefAttributes<T>>;
786
+ /** Ensures that the props do not include ref at all */
787
+ type PropsWithoutRef<P> =
788
+ // Omit would not be sufficient for this. We'd like to avoid unnecessary mapping and need a distributive conditional to support unions.
789
+ // see: https://www.typescriptlang.org/docs/handbook/2/conditional-types.html#distributive-conditional-types
790
+ // https://github.com/Microsoft/TypeScript/issues/28339
791
+ P extends any ? ("ref" extends keyof P ? Omit<P, "ref"> : P) : P;
792
+ /** Ensures that the props do not include string ref, which cannot be forwarded */
793
+ type PropsWithRef<P> =
794
+ // Just "P extends { ref?: infer R }" looks sufficient, but R will infer as {} if P is {}.
795
+ "ref" extends keyof P ? P extends {
796
+ ref?: infer R | undefined;
797
+ } ? string extends R ? PropsWithoutRef<P> & {
798
+ ref?: Exclude<R, string> | undefined;
799
+ } : P : P : P;
800
+ type PropsWithChildren<P> = P & {
801
+ children?: ReactNode | undefined;
802
+ };
803
+ /**
804
+ * NOTE: prefer ComponentPropsWithRef, if the ref is forwarded,
805
+ * or ComponentPropsWithoutRef when refs are not supported.
806
+ */
807
+ type ComponentProps<T extends keyof JSX.IntrinsicElements | JSXElementConstructor<any>> = T extends JSXElementConstructor<infer P> ? P : T extends keyof JSX.IntrinsicElements ? JSX.IntrinsicElements[T] : {};
808
+ type ComponentPropsWithRef<T extends ElementType> = T extends (new (props: infer P) => Component<any, any>) ? PropsWithoutRef<P> & RefAttributes<InstanceType<T>> : PropsWithRef<ComponentProps<T>>;
809
+ type ComponentPropsWithoutRef<T extends ElementType> = PropsWithoutRef<ComponentProps<T>>;
810
+ type ComponentRef<T extends ElementType> = T extends NamedExoticComponent<ComponentPropsWithoutRef<T> & RefAttributes<infer Method>> ? Method : ComponentPropsWithRef<T> extends RefAttributes<infer Method> ? Method : never;
811
+ // will show `Memo(${Component.displayName || Component.name})` in devtools by default,
812
+ // but can be given its own specific name
813
+ type MemoExoticComponent<T extends ComponentType<any>> = NamedExoticComponent<ComponentPropsWithRef<T>> & {
814
+ readonly type: T;
815
+ };
816
+ function memo<P extends object>(Component: FunctionComponent<P>, propsAreEqual?: (prevProps: Readonly<PropsWithChildren<P>>, nextProps: Readonly<PropsWithChildren<P>>) => boolean): NamedExoticComponent<P>;
817
+ function memo<T extends ComponentType<any>>(Component: T, propsAreEqual?: (prevProps: Readonly<ComponentProps<T>>, nextProps: Readonly<ComponentProps<T>>) => boolean): MemoExoticComponent<T>;
818
+ type LazyExoticComponent<T extends ComponentType<any>> = ExoticComponent<ComponentPropsWithRef<T>> & {
819
+ readonly _result: T;
820
+ };
821
+ function lazy<T extends ComponentType<any>>(factory: () => Promise<{
822
+ default: T;
823
+ }>): LazyExoticComponent<T>;
824
+ //
825
+ // React Hooks
826
+ // ----------------------------------------------------------------------
827
+ // based on the code in https://github.com/facebook/react/pull/13968
828
+ // Unlike the class component setState, the updates are not allowed to be partial
829
+ type SetStateAction<S> = S | ((prevState: S) => S);
830
+ // this technically does accept a second argument, but it's already under a deprecation warning
831
+ // and it's not even released so probably better to not define it.
832
+ type Dispatch<A> = (value: A) => void;
833
+ // Since action _can_ be undefined, dispatch may be called without any parameters.
834
+ type DispatchWithoutAction = () => void;
835
+ // Unlike redux, the actions _can_ be anything
836
+ type Reducer<S, A> = (prevState: S, action: A) => S;
837
+ // If useReducer accepts a reducer without action, dispatch may be called without any parameters.
838
+ type ReducerWithoutAction<S> = (prevState: S) => S;
839
+ // types used to try and prevent the compiler from reducing S
840
+ // to a supertype common with the second argument to useReducer()
841
+ type ReducerState<R extends Reducer<any, any>> = R extends Reducer<infer S, any> ? S : never;
842
+ type ReducerAction<R extends Reducer<any, any>> = R extends Reducer<any, infer A> ? A : never;
843
+ // The identity check is done with the SameValue algorithm (Object.is), which is stricter than ===
844
+ type ReducerStateWithoutAction<R extends ReducerWithoutAction<any>> = R extends ReducerWithoutAction<infer S> ? S : never;
845
+ // TODO (TypeScript 3.0): ReadonlyArray<unknown>
846
+ type DependencyList = ReadonlyArray<any>;
847
+ // NOTE: callbacks are _only_ allowed to return either void, or a destructor.
848
+ type EffectCallback = () => void | Destructor;
849
+ interface MutableRefObject<T> {
850
+ current: T;
851
+ }
852
+ // This will technically work if you give a Consumer<T> or Provider<T> but it's deprecated and warns
853
+ /**
854
+ * Accepts a context object (the value returned from `React.createContext`) and returns the current
855
+ * context value, as given by the nearest context provider for the given context.
856
+ *
857
+ * @version 16.8.0
858
+ * @see https://react.dev/reference/react/useContext
859
+ */
860
+ function useContext<T>(context: Context<T> /*, (not public API) observedBits?: number|boolean */): T;
861
+ /**
862
+ * Returns a stateful value, and a function to update it.
863
+ *
864
+ * @version 16.8.0
865
+ * @see https://react.dev/reference/react/useState
866
+ */
867
+ function useState<S>(initialState: S | (() => S)): [
868
+ S,
869
+ Dispatch<SetStateAction<S>>
870
+ ];
871
+ // convenience overload when first argument is omitted
872
+ /**
873
+ * Returns a stateful value, and a function to update it.
874
+ *
875
+ * @version 16.8.0
876
+ * @see https://react.dev/reference/react/useState
877
+ */
878
+ function useState<S = undefined>(): [
879
+ S | undefined,
880
+ Dispatch<SetStateAction<S | undefined>>
881
+ ];
882
+ /**
883
+ * An alternative to `useState`.
884
+ *
885
+ * `useReducer` is usually preferable to `useState` when you have complex state logic that involves
886
+ * multiple sub-values. It also lets you optimize performance for components that trigger deep
887
+ * updates because you can pass `dispatch` down instead of callbacks.
888
+ *
889
+ * @version 16.8.0
890
+ * @see https://react.dev/reference/react/useReducer
891
+ */
892
+ // overload where dispatch could accept 0 arguments.
893
+ function useReducer<R extends ReducerWithoutAction<any>, I>(reducer: R, initializerArg: I, initializer: (arg: I) => ReducerStateWithoutAction<R>): [
894
+ ReducerStateWithoutAction<R>,
895
+ DispatchWithoutAction
896
+ ];
897
+ /**
898
+ * An alternative to `useState`.
899
+ *
900
+ * `useReducer` is usually preferable to `useState` when you have complex state logic that involves
901
+ * multiple sub-values. It also lets you optimize performance for components that trigger deep
902
+ * updates because you can pass `dispatch` down instead of callbacks.
903
+ *
904
+ * @version 16.8.0
905
+ * @see https://react.dev/reference/react/useReducer
906
+ */
907
+ // overload where dispatch could accept 0 arguments.
908
+ function useReducer<R extends ReducerWithoutAction<any>>(reducer: R, initializerArg: ReducerStateWithoutAction<R>, initializer?: undefined): [
909
+ ReducerStateWithoutAction<R>,
910
+ DispatchWithoutAction
911
+ ];
912
+ /**
913
+ * An alternative to `useState`.
914
+ *
915
+ * `useReducer` is usually preferable to `useState` when you have complex state logic that involves
916
+ * multiple sub-values. It also lets you optimize performance for components that trigger deep
917
+ * updates because you can pass `dispatch` down instead of callbacks.
918
+ *
919
+ * @version 16.8.0
920
+ * @see https://react.dev/reference/react/useReducer
921
+ */
922
+ // overload where "I" may be a subset of ReducerState<R>; used to provide autocompletion.
923
+ // If "I" matches ReducerState<R> exactly then the last overload will allow initializer to be omitted.
924
+ // the last overload effectively behaves as if the identity function (x => x) is the initializer.
925
+ function useReducer<R extends Reducer<any, any>, I>(reducer: R, initializerArg: I & ReducerState<R>, initializer: (arg: I & ReducerState<R>) => ReducerState<R>): [
926
+ ReducerState<R>,
927
+ Dispatch<ReducerAction<R>>
928
+ ];
929
+ /**
930
+ * An alternative to `useState`.
931
+ *
932
+ * `useReducer` is usually preferable to `useState` when you have complex state logic that involves
933
+ * multiple sub-values. It also lets you optimize performance for components that trigger deep
934
+ * updates because you can pass `dispatch` down instead of callbacks.
935
+ *
936
+ * @version 16.8.0
937
+ * @see https://react.dev/reference/react/useReducer
938
+ */
939
+ // overload for free "I"; all goes as long as initializer converts it into "ReducerState<R>".
940
+ function useReducer<R extends Reducer<any, any>, I>(reducer: R, initializerArg: I, initializer: (arg: I) => ReducerState<R>): [
941
+ ReducerState<R>,
942
+ Dispatch<ReducerAction<R>>
943
+ ];
944
+ /**
945
+ * An alternative to `useState`.
946
+ *
947
+ * `useReducer` is usually preferable to `useState` when you have complex state logic that involves
948
+ * multiple sub-values. It also lets you optimize performance for components that trigger deep
949
+ * updates because you can pass `dispatch` down instead of callbacks.
950
+ *
951
+ * @version 16.8.0
952
+ * @see https://react.dev/reference/react/useReducer
953
+ */
954
+ // I'm not sure if I keep this 2-ary or if I make it (2,3)-ary; it's currently (2,3)-ary.
955
+ // The Flow types do have an overload for 3-ary invocation with undefined initializer.
956
+ // NOTE: without the ReducerState indirection, TypeScript would reduce S to be the most common
957
+ // supertype between the reducer's return type and the initialState (or the initializer's return type),
958
+ // which would prevent autocompletion from ever working.
959
+ // TODO: double-check if this weird overload logic is necessary. It is possible it's either a bug
960
+ // in older versions, or a regression in newer versions of the typescript completion service.
961
+ function useReducer<R extends Reducer<any, any>>(reducer: R, initialState: ReducerState<R>, initializer?: undefined): [
962
+ ReducerState<R>,
963
+ Dispatch<ReducerAction<R>>
964
+ ];
965
+ /**
966
+ * `useRef` returns a mutable ref object whose `.current` property is initialized to the passed argument
967
+ * (`initialValue`). The returned object will persist for the full lifetime of the component.
968
+ *
969
+ * Note that `useRef()` is useful for more than the `ref` attribute. It’s handy for keeping any mutable
970
+ * value around similar to how you’d use instance fields in classes.
971
+ *
972
+ * @version 16.8.0
973
+ * @see https://react.dev/reference/react/useRef
974
+ */
975
+ function useRef<T>(initialValue: T): MutableRefObject<T>;
976
+ // convenience overload for refs given as a ref prop as they typically start with a null value
977
+ /**
978
+ * `useRef` returns a mutable ref object whose `.current` property is initialized to the passed argument
979
+ * (`initialValue`). The returned object will persist for the full lifetime of the component.
980
+ *
981
+ * Note that `useRef()` is useful for more than the `ref` attribute. It’s handy for keeping any mutable
982
+ * value around similar to how you’d use instance fields in classes.
983
+ *
984
+ * Usage note: if you need the result of useRef to be directly mutable, include `| null` in the type
985
+ * of the generic argument.
986
+ *
987
+ * @version 16.8.0
988
+ * @see https://react.dev/reference/react/useRef
989
+ */
990
+ function useRef<T>(initialValue: T | null): RefObject<T>;
991
+ // convenience overload for potentially undefined initialValue / call with 0 arguments
992
+ // has a default to stop it from defaulting to {} instead
993
+ /**
994
+ * `useRef` returns a mutable ref object whose `.current` property is initialized to the passed argument
995
+ * (`initialValue`). The returned object will persist for the full lifetime of the component.
996
+ *
997
+ * Note that `useRef()` is useful for more than the `ref` attribute. It’s handy for keeping any mutable
998
+ * value around similar to how you’d use instance fields in classes.
999
+ *
1000
+ * @version 16.8.0
1001
+ * @see https://react.dev/reference/react/useRef
1002
+ */
1003
+ function useRef<T = undefined>(): MutableRefObject<T | undefined>;
1004
+ /**
1005
+ * The signature is identical to `useEffect`, but it fires synchronously after all DOM mutations.
1006
+ * Use this to read layout from the DOM and synchronously re-render. Updates scheduled inside
1007
+ * `useLayoutEffect` will be flushed synchronously, before the browser has a chance to paint.
1008
+ *
1009
+ * Prefer the standard `useEffect` when possible to avoid blocking visual updates.
1010
+ *
1011
+ * If you’re migrating code from a class component, `useLayoutEffect` fires in the same phase as
1012
+ * `componentDidMount` and `componentDidUpdate`.
1013
+ *
1014
+ * @version 16.8.0
1015
+ * @see https://react.dev/reference/react/useLayoutEffect
1016
+ */
1017
+ function useLayoutEffect(effect: EffectCallback, deps?: DependencyList): void;
1018
+ /**
1019
+ * Accepts a function that contains imperative, possibly effectful code.
1020
+ *
1021
+ * @param effect Imperative function that can return a cleanup function
1022
+ * @param deps If present, effect will only activate if the values in the list change.
1023
+ *
1024
+ * @version 16.8.0
1025
+ * @see https://react.dev/reference/react/useEffect
1026
+ */
1027
+ function useEffect(effect: EffectCallback, deps?: DependencyList): void;
1028
+ // NOTE: this does not accept strings, but this will have to be fixed by removing strings from type Ref<T>
1029
+ /**
1030
+ * `useImperativeHandle` customizes the instance value that is exposed to parent components when using
1031
+ * `ref`. As always, imperative code using refs should be avoided in most cases.
1032
+ *
1033
+ * `useImperativeHandle` should be used with `React.forwardRef`.
1034
+ *
1035
+ * @version 16.8.0
1036
+ * @see https://react.dev/reference/react/useImperativeHandle
1037
+ */
1038
+ function useImperativeHandle<T, R extends T>(ref: Ref<T> | undefined, init: () => R, deps?: DependencyList): void;
1039
+ // I made 'inputs' required here and in useMemo as there's no point to memoizing without the memoization key
1040
+ // useCallback(X) is identical to just using X, useMemo(() => Y) is identical to just using Y.
1041
+ /**
1042
+ * `useCallback` will return a memoized version of the callback that only changes if one of the `inputs`
1043
+ * has changed.
1044
+ *
1045
+ * @version 16.8.0
1046
+ * @see https://react.dev/reference/react/useCallback
1047
+ */
1048
+ // TODO (TypeScript 3.0): <T extends (...args: never[]) => unknown>
1049
+ function useCallback<T extends (...args: any[]) => any>(callback: T, deps: DependencyList): T;
1050
+ /**
1051
+ * `useMemo` will only recompute the memoized value when one of the `deps` has changed.
1052
+ *
1053
+ * @version 16.8.0
1054
+ * @see https://react.dev/reference/react/useMemo
1055
+ */
1056
+ // allow undefined, but don't make it optional as that is very likely a mistake
1057
+ function useMemo<T>(factory: () => T, deps: DependencyList | undefined): T;
1058
+ /**
1059
+ * `useDebugValue` can be used to display a label for custom hooks in React DevTools.
1060
+ *
1061
+ * NOTE: We don’t recommend adding debug values to every custom hook.
1062
+ * It’s most valuable for custom hooks that are part of shared libraries.
1063
+ *
1064
+ * @version 16.8.0
1065
+ * @see https://react.dev/reference/react/useDebugValue
1066
+ */
1067
+ // the name of the custom hook is itself derived from the function name at runtime:
1068
+ // it's just the function name without the "use" prefix.
1069
+ function useDebugValue<T>(value: T, format?: (value: T) => any): void;
1070
+ //
1071
+ // Event System
1072
+ // ----------------------------------------------------------------------
1073
+ // TODO: change any to unknown when moving to TS v3
1074
+ interface BaseSyntheticEvent<E = object, C = any, T = any> {
1075
+ nativeEvent: E;
1076
+ currentTarget: C;
1077
+ target: T;
1078
+ bubbles: boolean;
1079
+ cancelable: boolean;
1080
+ defaultPrevented: boolean;
1081
+ eventPhase: number;
1082
+ isTrusted: boolean;
1083
+ preventDefault(): void;
1084
+ isDefaultPrevented(): boolean;
1085
+ stopPropagation(): void;
1086
+ isPropagationStopped(): boolean;
1087
+ persist(): void;
1088
+ timeStamp: number;
1089
+ type: string;
1090
+ }
1091
+ /**
1092
+ * currentTarget - a reference to the element on which the event listener is registered.
1093
+ *
1094
+ * target - a reference to the element from which the event was originally dispatched.
1095
+ * This might be a child element to the element on which the event listener is registered.
1096
+ * If you thought this should be `EventTarget & T`, see https://github.com/DefinitelyTyped/DefinitelyTyped/issues/11508#issuecomment-256045682
1097
+ */
1098
+ interface SyntheticEvent<T = Element, E = Event> extends BaseSyntheticEvent<E, EventTarget & T, EventTarget> {
1099
+ }
1100
+ interface ClipboardEvent<T = Element> extends SyntheticEvent<T, NativeClipboardEvent> {
1101
+ clipboardData: DataTransfer;
1102
+ }
1103
+ interface CompositionEvent<T = Element> extends SyntheticEvent<T, NativeCompositionEvent> {
1104
+ data: string;
1105
+ }
1106
+ interface DragEvent<T = Element> extends MouseEvent<T, NativeDragEvent> {
1107
+ dataTransfer: DataTransfer;
1108
+ }
1109
+ interface PointerEvent<T = Element> extends MouseEvent<T, NativePointerEvent> {
1110
+ pointerId: number;
1111
+ pressure: number;
1112
+ tangentialPressure: number;
1113
+ tiltX: number;
1114
+ tiltY: number;
1115
+ twist: number;
1116
+ width: number;
1117
+ height: number;
1118
+ pointerType: "mouse" | "pen" | "touch";
1119
+ isPrimary: boolean;
1120
+ }
1121
+ interface FocusEvent<Target = Element, RelatedTarget = Element> extends SyntheticEvent<Target, NativeFocusEvent> {
1122
+ relatedTarget: (EventTarget & RelatedTarget) | null;
1123
+ target: EventTarget & Target;
1124
+ }
1125
+ interface FormEvent<T = Element> extends SyntheticEvent<T> {
1126
+ }
1127
+ interface InvalidEvent<T = Element> extends SyntheticEvent<T> {
1128
+ target: EventTarget & T;
1129
+ }
1130
+ interface ChangeEvent<T = Element> extends SyntheticEvent<T> {
1131
+ target: EventTarget & T;
1132
+ }
1133
+ export type ModifierKey = "Alt" | "AltGraph" | "CapsLock" | "Control" | "Fn" | "FnLock" | "Hyper" | "Meta" | "NumLock" | "ScrollLock" | "Shift" | "Super" | "Symbol" | "SymbolLock";
1134
+ interface KeyboardEvent<T = Element> extends UIEvent<T, NativeKeyboardEvent> {
1135
+ altKey: boolean;
1136
+ /** @deprecated */
1137
+ charCode: number;
1138
+ ctrlKey: boolean;
1139
+ code: string;
1140
+ /**
1141
+ * See [DOM Level 3 Events spec](https://www.w3.org/TR/uievents-key/#keys-modifier). for a list of valid (case-sensitive) arguments to this method.
1142
+ */
1143
+ getModifierState(key: ModifierKey): boolean;
1144
+ /**
1145
+ * See the [DOM Level 3 Events spec](https://www.w3.org/TR/uievents-key/#named-key-attribute-values). for possible values
1146
+ */
1147
+ key: string;
1148
+ /** @deprecated */
1149
+ keyCode: number;
1150
+ locale: string;
1151
+ location: number;
1152
+ metaKey: boolean;
1153
+ repeat: boolean;
1154
+ shiftKey: boolean;
1155
+ /** @deprecated */
1156
+ which: number;
1157
+ }
1158
+ interface MouseEvent<T = Element, E = NativeMouseEvent> extends UIEvent<T, E> {
1159
+ altKey: boolean;
1160
+ button: number;
1161
+ buttons: number;
1162
+ clientX: number;
1163
+ clientY: number;
1164
+ ctrlKey: boolean;
1165
+ /**
1166
+ * See [DOM Level 3 Events spec](https://www.w3.org/TR/uievents-key/#keys-modifier). for a list of valid (case-sensitive) arguments to this method.
1167
+ */
1168
+ getModifierState(key: ModifierKey): boolean;
1169
+ metaKey: boolean;
1170
+ movementX: number;
1171
+ movementY: number;
1172
+ pageX: number;
1173
+ pageY: number;
1174
+ relatedTarget: EventTarget | null;
1175
+ screenX: number;
1176
+ screenY: number;
1177
+ shiftKey: boolean;
1178
+ }
1179
+ interface TouchEvent<T = Element> extends UIEvent<T, NativeTouchEvent> {
1180
+ altKey: boolean;
1181
+ changedTouches: TouchList;
1182
+ ctrlKey: boolean;
1183
+ /**
1184
+ * See [DOM Level 3 Events spec](https://www.w3.org/TR/uievents-key/#keys-modifier). for a list of valid (case-sensitive) arguments to this method.
1185
+ */
1186
+ getModifierState(key: ModifierKey): boolean;
1187
+ metaKey: boolean;
1188
+ shiftKey: boolean;
1189
+ targetTouches: TouchList;
1190
+ touches: TouchList;
1191
+ }
1192
+ interface UIEvent<T = Element, E = NativeUIEvent> extends SyntheticEvent<T, E> {
1193
+ detail: number;
1194
+ view: AbstractView;
1195
+ }
1196
+ interface WheelEvent<T = Element> extends MouseEvent<T, NativeWheelEvent> {
1197
+ deltaMode: number;
1198
+ deltaX: number;
1199
+ deltaY: number;
1200
+ deltaZ: number;
1201
+ }
1202
+ interface AnimationEvent<T = Element> extends SyntheticEvent<T, NativeAnimationEvent> {
1203
+ animationName: string;
1204
+ elapsedTime: number;
1205
+ pseudoElement: string;
1206
+ }
1207
+ interface TransitionEvent<T = Element> extends SyntheticEvent<T, NativeTransitionEvent> {
1208
+ elapsedTime: number;
1209
+ propertyName: string;
1210
+ pseudoElement: string;
1211
+ }
1212
+ //
1213
+ // Event Handler Types
1214
+ // ----------------------------------------------------------------------
1215
+ type EventHandler<E extends SyntheticEvent<any>> = {
1216
+ bivarianceHack(event: E): void;
1217
+ }["bivarianceHack"];
1218
+ type ReactEventHandler<T = Element> = EventHandler<SyntheticEvent<T>>;
1219
+ type ClipboardEventHandler<T = Element> = EventHandler<ClipboardEvent<T>>;
1220
+ type CompositionEventHandler<T = Element> = EventHandler<CompositionEvent<T>>;
1221
+ type DragEventHandler<T = Element> = EventHandler<DragEvent<T>>;
1222
+ type FocusEventHandler<T = Element> = EventHandler<FocusEvent<T>>;
1223
+ type FormEventHandler<T = Element> = EventHandler<FormEvent<T>>;
1224
+ type ChangeEventHandler<T = Element> = EventHandler<ChangeEvent<T>>;
1225
+ type KeyboardEventHandler<T = Element> = EventHandler<KeyboardEvent<T>>;
1226
+ type MouseEventHandler<T = Element> = EventHandler<MouseEvent<T>>;
1227
+ type TouchEventHandler<T = Element> = EventHandler<TouchEvent<T>>;
1228
+ type PointerEventHandler<T = Element> = EventHandler<PointerEvent<T>>;
1229
+ type UIEventHandler<T = Element> = EventHandler<UIEvent<T>>;
1230
+ type WheelEventHandler<T = Element> = EventHandler<WheelEvent<T>>;
1231
+ type AnimationEventHandler<T = Element> = EventHandler<AnimationEvent<T>>;
1232
+ type TransitionEventHandler<T = Element> = EventHandler<TransitionEvent<T>>;
1233
+ //
1234
+ // Props / DOM Attributes
1235
+ // ----------------------------------------------------------------------
1236
+ /**
1237
+ * @deprecated This was used to allow clients to pass `ref` and `key`
1238
+ * to `createElement`, which is no longer necessary due to intersection
1239
+ * types. If you need to declare a props object before passing it to
1240
+ * `createElement` or a factory, use `ClassAttributes<T>`:
1241
+ *
1242
+ * ```ts
1243
+ * var b: Button | null;
1244
+ * var props: ButtonProps & ClassAttributes<Button> = {
1245
+ * ref: b => button = b, // ok!
1246
+ * label: "I'm a Button"
1247
+ * };
1248
+ * ```
1249
+ */
1250
+ interface Props<T> {
1251
+ children?: ReactNode | undefined;
1252
+ key?: Key | undefined;
1253
+ ref?: LegacyRef<T> | undefined;
1254
+ }
1255
+ interface HTMLProps<T> extends AllHTMLAttributes<T>, ClassAttributes<T> {
1256
+ }
1257
+ type DetailedHTMLProps<E extends HTMLAttributes<T>, T> = ClassAttributes<T> & E;
1258
+ interface SVGProps<T> extends SVGAttributes<T>, ClassAttributes<T> {
1259
+ }
1260
+ interface SVGLineElementAttributes<T> extends SVGProps<T> {
1261
+ }
1262
+ interface SVGTextElementAttributes<T> extends SVGProps<T> {
1263
+ }
1264
+ interface DOMAttributes<T> {
1265
+ children?: ReactNode | undefined;
1266
+ dangerouslySetInnerHTML?: {
1267
+ // Should be InnerHTML['innerHTML'].
1268
+ // But unfortunately we're mixing renderer-specific type declarations.
1269
+ __html: string | TrustedHTML;
1270
+ } | undefined;
1271
+ // Clipboard Events
1272
+ onCopy?: ClipboardEventHandler<T> | undefined;
1273
+ onCopyCapture?: ClipboardEventHandler<T> | undefined;
1274
+ onCut?: ClipboardEventHandler<T> | undefined;
1275
+ onCutCapture?: ClipboardEventHandler<T> | undefined;
1276
+ onPaste?: ClipboardEventHandler<T> | undefined;
1277
+ onPasteCapture?: ClipboardEventHandler<T> | undefined;
1278
+ // Composition Events
1279
+ onCompositionEnd?: CompositionEventHandler<T> | undefined;
1280
+ onCompositionEndCapture?: CompositionEventHandler<T> | undefined;
1281
+ onCompositionStart?: CompositionEventHandler<T> | undefined;
1282
+ onCompositionStartCapture?: CompositionEventHandler<T> | undefined;
1283
+ onCompositionUpdate?: CompositionEventHandler<T> | undefined;
1284
+ onCompositionUpdateCapture?: CompositionEventHandler<T> | undefined;
1285
+ // Focus Events
1286
+ onFocus?: FocusEventHandler<T> | undefined;
1287
+ onFocusCapture?: FocusEventHandler<T> | undefined;
1288
+ onBlur?: FocusEventHandler<T> | undefined;
1289
+ onBlurCapture?: FocusEventHandler<T> | undefined;
1290
+ // Form Events
1291
+ onChange?: FormEventHandler<T> | undefined;
1292
+ onChangeCapture?: FormEventHandler<T> | undefined;
1293
+ onBeforeInput?: FormEventHandler<T> | undefined;
1294
+ onBeforeInputCapture?: FormEventHandler<T> | undefined;
1295
+ onInput?: FormEventHandler<T> | undefined;
1296
+ onInputCapture?: FormEventHandler<T> | undefined;
1297
+ onReset?: FormEventHandler<T> | undefined;
1298
+ onResetCapture?: FormEventHandler<T> | undefined;
1299
+ onSubmit?: FormEventHandler<T> | undefined;
1300
+ onSubmitCapture?: FormEventHandler<T> | undefined;
1301
+ onInvalid?: FormEventHandler<T> | undefined;
1302
+ onInvalidCapture?: FormEventHandler<T> | undefined;
1303
+ // Image Events
1304
+ onLoad?: ReactEventHandler<T> | undefined;
1305
+ onLoadCapture?: ReactEventHandler<T> | undefined;
1306
+ onError?: ReactEventHandler<T> | undefined; // also a Media Event
1307
+ onErrorCapture?: ReactEventHandler<T> | undefined; // also a Media Event
1308
+ // Keyboard Events
1309
+ onKeyDown?: KeyboardEventHandler<T> | undefined;
1310
+ onKeyDownCapture?: KeyboardEventHandler<T> | undefined;
1311
+ /** @deprecated */
1312
+ onKeyPress?: KeyboardEventHandler<T> | undefined;
1313
+ /** @deprecated */
1314
+ onKeyPressCapture?: KeyboardEventHandler<T> | undefined;
1315
+ onKeyUp?: KeyboardEventHandler<T> | undefined;
1316
+ onKeyUpCapture?: KeyboardEventHandler<T> | undefined;
1317
+ // Media Events
1318
+ onAbort?: ReactEventHandler<T> | undefined;
1319
+ onAbortCapture?: ReactEventHandler<T> | undefined;
1320
+ onCanPlay?: ReactEventHandler<T> | undefined;
1321
+ onCanPlayCapture?: ReactEventHandler<T> | undefined;
1322
+ onCanPlayThrough?: ReactEventHandler<T> | undefined;
1323
+ onCanPlayThroughCapture?: ReactEventHandler<T> | undefined;
1324
+ onDurationChange?: ReactEventHandler<T> | undefined;
1325
+ onDurationChangeCapture?: ReactEventHandler<T> | undefined;
1326
+ onEmptied?: ReactEventHandler<T> | undefined;
1327
+ onEmptiedCapture?: ReactEventHandler<T> | undefined;
1328
+ onEncrypted?: ReactEventHandler<T> | undefined;
1329
+ onEncryptedCapture?: ReactEventHandler<T> | undefined;
1330
+ onEnded?: ReactEventHandler<T> | undefined;
1331
+ onEndedCapture?: ReactEventHandler<T> | undefined;
1332
+ onLoadedData?: ReactEventHandler<T> | undefined;
1333
+ onLoadedDataCapture?: ReactEventHandler<T> | undefined;
1334
+ onLoadedMetadata?: ReactEventHandler<T> | undefined;
1335
+ onLoadedMetadataCapture?: ReactEventHandler<T> | undefined;
1336
+ onLoadStart?: ReactEventHandler<T> | undefined;
1337
+ onLoadStartCapture?: ReactEventHandler<T> | undefined;
1338
+ onPause?: ReactEventHandler<T> | undefined;
1339
+ onPauseCapture?: ReactEventHandler<T> | undefined;
1340
+ onPlay?: ReactEventHandler<T> | undefined;
1341
+ onPlayCapture?: ReactEventHandler<T> | undefined;
1342
+ onPlaying?: ReactEventHandler<T> | undefined;
1343
+ onPlayingCapture?: ReactEventHandler<T> | undefined;
1344
+ onProgress?: ReactEventHandler<T> | undefined;
1345
+ onProgressCapture?: ReactEventHandler<T> | undefined;
1346
+ onRateChange?: ReactEventHandler<T> | undefined;
1347
+ onRateChangeCapture?: ReactEventHandler<T> | undefined;
1348
+ onSeeked?: ReactEventHandler<T> | undefined;
1349
+ onSeekedCapture?: ReactEventHandler<T> | undefined;
1350
+ onSeeking?: ReactEventHandler<T> | undefined;
1351
+ onSeekingCapture?: ReactEventHandler<T> | undefined;
1352
+ onStalled?: ReactEventHandler<T> | undefined;
1353
+ onStalledCapture?: ReactEventHandler<T> | undefined;
1354
+ onSuspend?: ReactEventHandler<T> | undefined;
1355
+ onSuspendCapture?: ReactEventHandler<T> | undefined;
1356
+ onTimeUpdate?: ReactEventHandler<T> | undefined;
1357
+ onTimeUpdateCapture?: ReactEventHandler<T> | undefined;
1358
+ onVolumeChange?: ReactEventHandler<T> | undefined;
1359
+ onVolumeChangeCapture?: ReactEventHandler<T> | undefined;
1360
+ onWaiting?: ReactEventHandler<T> | undefined;
1361
+ onWaitingCapture?: ReactEventHandler<T> | undefined;
1362
+ // MouseEvents
1363
+ onAuxClick?: MouseEventHandler<T> | undefined;
1364
+ onAuxClickCapture?: MouseEventHandler<T> | undefined;
1365
+ onClick?: MouseEventHandler<T> | undefined;
1366
+ onClickCapture?: MouseEventHandler<T> | undefined;
1367
+ onContextMenu?: MouseEventHandler<T> | undefined;
1368
+ onContextMenuCapture?: MouseEventHandler<T> | undefined;
1369
+ onDoubleClick?: MouseEventHandler<T> | undefined;
1370
+ onDoubleClickCapture?: MouseEventHandler<T> | undefined;
1371
+ onDrag?: DragEventHandler<T> | undefined;
1372
+ onDragCapture?: DragEventHandler<T> | undefined;
1373
+ onDragEnd?: DragEventHandler<T> | undefined;
1374
+ onDragEndCapture?: DragEventHandler<T> | undefined;
1375
+ onDragEnter?: DragEventHandler<T> | undefined;
1376
+ onDragEnterCapture?: DragEventHandler<T> | undefined;
1377
+ onDragExit?: DragEventHandler<T> | undefined;
1378
+ onDragExitCapture?: DragEventHandler<T> | undefined;
1379
+ onDragLeave?: DragEventHandler<T> | undefined;
1380
+ onDragLeaveCapture?: DragEventHandler<T> | undefined;
1381
+ onDragOver?: DragEventHandler<T> | undefined;
1382
+ onDragOverCapture?: DragEventHandler<T> | undefined;
1383
+ onDragStart?: DragEventHandler<T> | undefined;
1384
+ onDragStartCapture?: DragEventHandler<T> | undefined;
1385
+ onDrop?: DragEventHandler<T> | undefined;
1386
+ onDropCapture?: DragEventHandler<T> | undefined;
1387
+ onMouseDown?: MouseEventHandler<T> | undefined;
1388
+ onMouseDownCapture?: MouseEventHandler<T> | undefined;
1389
+ onMouseEnter?: MouseEventHandler<T> | undefined;
1390
+ onMouseLeave?: MouseEventHandler<T> | undefined;
1391
+ onMouseMove?: MouseEventHandler<T> | undefined;
1392
+ onMouseMoveCapture?: MouseEventHandler<T> | undefined;
1393
+ onMouseOut?: MouseEventHandler<T> | undefined;
1394
+ onMouseOutCapture?: MouseEventHandler<T> | undefined;
1395
+ onMouseOver?: MouseEventHandler<T> | undefined;
1396
+ onMouseOverCapture?: MouseEventHandler<T> | undefined;
1397
+ onMouseUp?: MouseEventHandler<T> | undefined;
1398
+ onMouseUpCapture?: MouseEventHandler<T> | undefined;
1399
+ // Selection Events
1400
+ onSelect?: ReactEventHandler<T> | undefined;
1401
+ onSelectCapture?: ReactEventHandler<T> | undefined;
1402
+ // Touch Events
1403
+ onTouchCancel?: TouchEventHandler<T> | undefined;
1404
+ onTouchCancelCapture?: TouchEventHandler<T> | undefined;
1405
+ onTouchEnd?: TouchEventHandler<T> | undefined;
1406
+ onTouchEndCapture?: TouchEventHandler<T> | undefined;
1407
+ onTouchMove?: TouchEventHandler<T> | undefined;
1408
+ onTouchMoveCapture?: TouchEventHandler<T> | undefined;
1409
+ onTouchStart?: TouchEventHandler<T> | undefined;
1410
+ onTouchStartCapture?: TouchEventHandler<T> | undefined;
1411
+ // Pointer Events
1412
+ onPointerDown?: PointerEventHandler<T> | undefined;
1413
+ onPointerDownCapture?: PointerEventHandler<T> | undefined;
1414
+ onPointerMove?: PointerEventHandler<T> | undefined;
1415
+ onPointerMoveCapture?: PointerEventHandler<T> | undefined;
1416
+ onPointerUp?: PointerEventHandler<T> | undefined;
1417
+ onPointerUpCapture?: PointerEventHandler<T> | undefined;
1418
+ onPointerCancel?: PointerEventHandler<T> | undefined;
1419
+ onPointerCancelCapture?: PointerEventHandler<T> | undefined;
1420
+ onPointerEnter?: PointerEventHandler<T> | undefined;
1421
+ onPointerEnterCapture?: PointerEventHandler<T> | undefined;
1422
+ onPointerLeave?: PointerEventHandler<T> | undefined;
1423
+ onPointerLeaveCapture?: PointerEventHandler<T> | undefined;
1424
+ onPointerOver?: PointerEventHandler<T> | undefined;
1425
+ onPointerOverCapture?: PointerEventHandler<T> | undefined;
1426
+ onPointerOut?: PointerEventHandler<T> | undefined;
1427
+ onPointerOutCapture?: PointerEventHandler<T> | undefined;
1428
+ onGotPointerCapture?: PointerEventHandler<T> | undefined;
1429
+ onGotPointerCaptureCapture?: PointerEventHandler<T> | undefined;
1430
+ onLostPointerCapture?: PointerEventHandler<T> | undefined;
1431
+ onLostPointerCaptureCapture?: PointerEventHandler<T> | undefined;
1432
+ // UI Events
1433
+ onScroll?: UIEventHandler<T> | undefined;
1434
+ onScrollCapture?: UIEventHandler<T> | undefined;
1435
+ // Wheel Events
1436
+ onWheel?: WheelEventHandler<T> | undefined;
1437
+ onWheelCapture?: WheelEventHandler<T> | undefined;
1438
+ // Animation Events
1439
+ onAnimationStart?: AnimationEventHandler<T> | undefined;
1440
+ onAnimationStartCapture?: AnimationEventHandler<T> | undefined;
1441
+ onAnimationEnd?: AnimationEventHandler<T> | undefined;
1442
+ onAnimationEndCapture?: AnimationEventHandler<T> | undefined;
1443
+ onAnimationIteration?: AnimationEventHandler<T> | undefined;
1444
+ onAnimationIterationCapture?: AnimationEventHandler<T> | undefined;
1445
+ // Transition Events
1446
+ onTransitionEnd?: TransitionEventHandler<T> | undefined;
1447
+ onTransitionEndCapture?: TransitionEventHandler<T> | undefined;
1448
+ }
1449
+ export interface CSSProperties extends CSS$1.Properties<string | number> {
1450
+ }
1451
+ // All the WAI-ARIA 1.1 attributes from https://www.w3.org/TR/wai-aria-1.1/
1452
+ interface AriaAttributes {
1453
+ /** Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application. */
1454
+ "aria-activedescendant"?: string | undefined;
1455
+ /** Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute. */
1456
+ "aria-atomic"?: Booleanish | undefined;
1457
+ /**
1458
+ * Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be
1459
+ * presented if they are made.
1460
+ */
1461
+ "aria-autocomplete"?: "none" | "inline" | "list" | "both" | undefined;
1462
+ /** Indicates an element is being modified and that assistive technologies MAY want to wait until the modifications are complete before exposing them to the user. */
1463
+ "aria-busy"?: Booleanish | undefined;
1464
+ /**
1465
+ * Indicates the current "checked" state of checkboxes, radio buttons, and other widgets.
1466
+ * @see aria-pressed @see aria-selected.
1467
+ */
1468
+ "aria-checked"?: boolean | "false" | "mixed" | "true" | undefined;
1469
+ /**
1470
+ * Defines the total number of columns in a table, grid, or treegrid.
1471
+ * @see aria-colindex.
1472
+ */
1473
+ "aria-colcount"?: number | undefined;
1474
+ /**
1475
+ * Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid.
1476
+ * @see aria-colcount @see aria-colspan.
1477
+ */
1478
+ "aria-colindex"?: number | undefined;
1479
+ /**
1480
+ * Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid.
1481
+ * @see aria-colindex @see aria-rowspan.
1482
+ */
1483
+ "aria-colspan"?: number | undefined;
1484
+ /**
1485
+ * Identifies the element (or elements) whose contents or presence are controlled by the current element.
1486
+ * @see aria-owns.
1487
+ */
1488
+ "aria-controls"?: string | undefined;
1489
+ /** Indicates the element that represents the current item within a container or set of related elements. */
1490
+ "aria-current"?: boolean | "false" | "true" | "page" | "step" | "location" | "date" | "time" | undefined;
1491
+ /**
1492
+ * Identifies the element (or elements) that describes the object.
1493
+ * @see aria-labelledby
1494
+ */
1495
+ "aria-describedby"?: string | undefined;
1496
+ /**
1497
+ * Identifies the element that provides a detailed, extended description for the object.
1498
+ * @see aria-describedby.
1499
+ */
1500
+ "aria-details"?: string | undefined;
1501
+ /**
1502
+ * Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable.
1503
+ * @see aria-hidden @see aria-readonly.
1504
+ */
1505
+ "aria-disabled"?: Booleanish | undefined;
1506
+ /**
1507
+ * Indicates what functions can be performed when a dragged object is released on the drop target.
1508
+ * @deprecated in ARIA 1.1
1509
+ */
1510
+ "aria-dropeffect"?: "none" | "copy" | "execute" | "link" | "move" | "popup" | undefined;
1511
+ /**
1512
+ * Identifies the element that provides an error message for the object.
1513
+ * @see aria-invalid @see aria-describedby.
1514
+ */
1515
+ "aria-errormessage"?: string | undefined;
1516
+ /** Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed. */
1517
+ "aria-expanded"?: Booleanish | undefined;
1518
+ /**
1519
+ * Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion,
1520
+ * allows assistive technology to override the general default of reading in document source order.
1521
+ */
1522
+ "aria-flowto"?: string | undefined;
1523
+ /**
1524
+ * Indicates an element's "grabbed" state in a drag-and-drop operation.
1525
+ * @deprecated in ARIA 1.1
1526
+ */
1527
+ "aria-grabbed"?: Booleanish | undefined;
1528
+ /** Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element. */
1529
+ "aria-haspopup"?: boolean | "false" | "true" | "menu" | "listbox" | "tree" | "grid" | "dialog" | undefined;
1530
+ /**
1531
+ * Indicates whether the element is exposed to an accessibility API.
1532
+ * @see aria-disabled.
1533
+ */
1534
+ "aria-hidden"?: Booleanish | undefined;
1535
+ /**
1536
+ * Indicates the entered value does not conform to the format expected by the application.
1537
+ * @see aria-errormessage.
1538
+ */
1539
+ "aria-invalid"?: boolean | "false" | "true" | "grammar" | "spelling" | undefined;
1540
+ /** Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element. */
1541
+ "aria-keyshortcuts"?: string | undefined;
1542
+ /**
1543
+ * Defines a string value that labels the current element.
1544
+ * @see aria-labelledby.
1545
+ */
1546
+ "aria-label"?: string | undefined;
1547
+ /**
1548
+ * Identifies the element (or elements) that labels the current element.
1549
+ * @see aria-describedby.
1550
+ */
1551
+ "aria-labelledby"?: string | undefined;
1552
+ /** Defines the hierarchical level of an element within a structure. */
1553
+ "aria-level"?: number | undefined;
1554
+ /** Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region. */
1555
+ "aria-live"?: "off" | "assertive" | "polite" | undefined;
1556
+ /** Indicates whether an element is modal when displayed. */
1557
+ "aria-modal"?: Booleanish | undefined;
1558
+ /** Indicates whether a text box accepts multiple lines of input or only a single line. */
1559
+ "aria-multiline"?: Booleanish | undefined;
1560
+ /** Indicates that the user may select more than one item from the current selectable descendants. */
1561
+ "aria-multiselectable"?: Booleanish | undefined;
1562
+ /** Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous. */
1563
+ "aria-orientation"?: "horizontal" | "vertical" | undefined;
1564
+ /**
1565
+ * Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship
1566
+ * between DOM elements where the DOM hierarchy cannot be used to represent the relationship.
1567
+ * @see aria-controls.
1568
+ */
1569
+ "aria-owns"?: string | undefined;
1570
+ /**
1571
+ * Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value.
1572
+ * A hint could be a sample value or a brief description of the expected format.
1573
+ */
1574
+ "aria-placeholder"?: string | undefined;
1575
+ /**
1576
+ * Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.
1577
+ * @see aria-setsize.
1578
+ */
1579
+ "aria-posinset"?: number | undefined;
1580
+ /**
1581
+ * Indicates the current "pressed" state of toggle buttons.
1582
+ * @see aria-checked @see aria-selected.
1583
+ */
1584
+ "aria-pressed"?: boolean | "false" | "mixed" | "true" | undefined;
1585
+ /**
1586
+ * Indicates that the element is not editable, but is otherwise operable.
1587
+ * @see aria-disabled.
1588
+ */
1589
+ "aria-readonly"?: Booleanish | undefined;
1590
+ /**
1591
+ * Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified.
1592
+ * @see aria-atomic.
1593
+ */
1594
+ "aria-relevant"?: "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text" | "text additions" | "text removals" | undefined;
1595
+ /** Indicates that user input is required on the element before a form may be submitted. */
1596
+ "aria-required"?: Booleanish | undefined;
1597
+ /** Defines a human-readable, author-localized description for the role of an element. */
1598
+ "aria-roledescription"?: string | undefined;
1599
+ /**
1600
+ * Defines the total number of rows in a table, grid, or treegrid.
1601
+ * @see aria-rowindex.
1602
+ */
1603
+ "aria-rowcount"?: number | undefined;
1604
+ /**
1605
+ * Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid.
1606
+ * @see aria-rowcount @see aria-rowspan.
1607
+ */
1608
+ "aria-rowindex"?: number | undefined;
1609
+ /**
1610
+ * Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid.
1611
+ * @see aria-rowindex @see aria-colspan.
1612
+ */
1613
+ "aria-rowspan"?: number | undefined;
1614
+ /**
1615
+ * Indicates the current "selected" state of various widgets.
1616
+ * @see aria-checked @see aria-pressed.
1617
+ */
1618
+ "aria-selected"?: Booleanish | undefined;
1619
+ /**
1620
+ * Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.
1621
+ * @see aria-posinset.
1622
+ */
1623
+ "aria-setsize"?: number | undefined;
1624
+ /** Indicates if items in a table or grid are sorted in ascending or descending order. */
1625
+ "aria-sort"?: "none" | "ascending" | "descending" | "other" | undefined;
1626
+ /** Defines the maximum allowed value for a range widget. */
1627
+ "aria-valuemax"?: number | undefined;
1628
+ /** Defines the minimum allowed value for a range widget. */
1629
+ "aria-valuemin"?: number | undefined;
1630
+ /**
1631
+ * Defines the current value for a range widget.
1632
+ * @see aria-valuetext.
1633
+ */
1634
+ "aria-valuenow"?: number | undefined;
1635
+ /** Defines the human readable text alternative of aria-valuenow for a range widget. */
1636
+ "aria-valuetext"?: string | undefined;
1637
+ }
1638
+ // All the WAI-ARIA 1.1 role attribute values from https://www.w3.org/TR/wai-aria-1.1/#role_definitions
1639
+ type AriaRole = "alert" | "alertdialog" | "application" | "article" | "banner" | "button" | "cell" | "checkbox" | "columnheader" | "combobox" | "complementary" | "contentinfo" | "definition" | "dialog" | "directory" | "document" | "feed" | "figure" | "form" | "grid" | "gridcell" | "group" | "heading" | "img" | "link" | "list" | "listbox" | "listitem" | "log" | "main" | "marquee" | "math" | "menu" | "menubar" | "menuitem" | "menuitemcheckbox" | "menuitemradio" | "navigation" | "none" | "note" | "option" | "presentation" | "progressbar" | "radio" | "radiogroup" | "region" | "row" | "rowgroup" | "rowheader" | "scrollbar" | "search" | "searchbox" | "separator" | "slider" | "spinbutton" | "status" | "switch" | "tab" | "table" | "tablist" | "tabpanel" | "term" | "textbox" | "timer" | "toolbar" | "tooltip" | "tree" | "treegrid" | "treeitem" | (string & {});
1640
+ interface HTMLAttributes<T> extends AriaAttributes, DOMAttributes<T> {
1641
+ // React-specific Attributes
1642
+ defaultChecked?: boolean | undefined;
1643
+ defaultValue?: string | number | ReadonlyArray<string> | undefined;
1644
+ suppressContentEditableWarning?: boolean | undefined;
1645
+ suppressHydrationWarning?: boolean | undefined;
1646
+ // Standard HTML Attributes
1647
+ accessKey?: string | undefined;
1648
+ autoFocus?: boolean | undefined;
1649
+ className?: string | undefined;
1650
+ contentEditable?: Booleanish | "inherit" | undefined;
1651
+ contextMenu?: string | undefined;
1652
+ dir?: string | undefined;
1653
+ draggable?: Booleanish | undefined;
1654
+ hidden?: boolean | undefined;
1655
+ id?: string | undefined;
1656
+ lang?: string | undefined;
1657
+ nonce?: string | undefined;
1658
+ placeholder?: string | undefined;
1659
+ slot?: string | undefined;
1660
+ spellCheck?: Booleanish | undefined;
1661
+ style?: CSSProperties | undefined;
1662
+ tabIndex?: number | undefined;
1663
+ title?: string | undefined;
1664
+ translate?: "yes" | "no" | undefined;
1665
+ // Unknown
1666
+ radioGroup?: string | undefined; // <command>, <menuitem>
1667
+ // WAI-ARIA
1668
+ role?: AriaRole | undefined;
1669
+ // RDFa Attributes
1670
+ about?: string | undefined;
1671
+ content?: string | undefined;
1672
+ datatype?: string | undefined;
1673
+ inlist?: any;
1674
+ prefix?: string | undefined;
1675
+ property?: string | undefined;
1676
+ rel?: string | undefined;
1677
+ resource?: string | undefined;
1678
+ rev?: string | undefined;
1679
+ typeof?: string | undefined;
1680
+ vocab?: string | undefined;
1681
+ // Non-standard Attributes
1682
+ autoCapitalize?: string | undefined;
1683
+ autoCorrect?: string | undefined;
1684
+ autoSave?: string | undefined;
1685
+ color?: string | undefined;
1686
+ itemProp?: string | undefined;
1687
+ itemScope?: boolean | undefined;
1688
+ itemType?: string | undefined;
1689
+ itemID?: string | undefined;
1690
+ itemRef?: string | undefined;
1691
+ results?: number | undefined;
1692
+ security?: string | undefined;
1693
+ unselectable?: "on" | "off" | undefined;
1694
+ // Living Standard
1695
+ /**
1696
+ * Hints at the type of data that might be entered by the user while editing the element or its contents
1697
+ * @see https://html.spec.whatwg.org/multipage/interaction.html#input-modalities:-the-inputmode-attribute
1698
+ */
1699
+ inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined;
1700
+ /**
1701
+ * Specify that a standard HTML element should behave like a defined custom built-in element
1702
+ * @see https://html.spec.whatwg.org/multipage/custom-elements.html#attr-is
1703
+ */
1704
+ is?: string | undefined;
1705
+ }
1706
+ interface AllHTMLAttributes<T> extends HTMLAttributes<T> {
1707
+ // Standard HTML Attributes
1708
+ accept?: string | undefined;
1709
+ acceptCharset?: string | undefined;
1710
+ action?: string | undefined;
1711
+ allowFullScreen?: boolean | undefined;
1712
+ allowTransparency?: boolean | undefined;
1713
+ alt?: string | undefined;
1714
+ as?: string | undefined;
1715
+ async?: boolean | undefined;
1716
+ autoComplete?: string | undefined;
1717
+ autoPlay?: boolean | undefined;
1718
+ capture?: boolean | "user" | "environment" | undefined;
1719
+ cellPadding?: number | string | undefined;
1720
+ cellSpacing?: number | string | undefined;
1721
+ charSet?: string | undefined;
1722
+ challenge?: string | undefined;
1723
+ checked?: boolean | undefined;
1724
+ cite?: string | undefined;
1725
+ classID?: string | undefined;
1726
+ cols?: number | undefined;
1727
+ colSpan?: number | undefined;
1728
+ controls?: boolean | undefined;
1729
+ coords?: string | undefined;
1730
+ crossOrigin?: CrossOrigin;
1731
+ data?: string | undefined;
1732
+ dateTime?: string | undefined;
1733
+ default?: boolean | undefined;
1734
+ defer?: boolean | undefined;
1735
+ disabled?: boolean | undefined;
1736
+ download?: any;
1737
+ encType?: string | undefined;
1738
+ form?: string | undefined;
1739
+ formAction?: string | undefined;
1740
+ formEncType?: string | undefined;
1741
+ formMethod?: string | undefined;
1742
+ formNoValidate?: boolean | undefined;
1743
+ formTarget?: string | undefined;
1744
+ frameBorder?: number | string | undefined;
1745
+ headers?: string | undefined;
1746
+ height?: number | string | undefined;
1747
+ high?: number | undefined;
1748
+ href?: string | undefined;
1749
+ hrefLang?: string | undefined;
1750
+ htmlFor?: string | undefined;
1751
+ httpEquiv?: string | undefined;
1752
+ integrity?: string | undefined;
1753
+ keyParams?: string | undefined;
1754
+ keyType?: string | undefined;
1755
+ kind?: string | undefined;
1756
+ label?: string | undefined;
1757
+ list?: string | undefined;
1758
+ loop?: boolean | undefined;
1759
+ low?: number | undefined;
1760
+ manifest?: string | undefined;
1761
+ marginHeight?: number | undefined;
1762
+ marginWidth?: number | undefined;
1763
+ max?: number | string | undefined;
1764
+ maxLength?: number | undefined;
1765
+ media?: string | undefined;
1766
+ mediaGroup?: string | undefined;
1767
+ method?: string | undefined;
1768
+ min?: number | string | undefined;
1769
+ minLength?: number | undefined;
1770
+ multiple?: boolean | undefined;
1771
+ muted?: boolean | undefined;
1772
+ name?: string | undefined;
1773
+ noValidate?: boolean | undefined;
1774
+ open?: boolean | undefined;
1775
+ optimum?: number | undefined;
1776
+ pattern?: string | undefined;
1777
+ placeholder?: string | undefined;
1778
+ playsInline?: boolean | undefined;
1779
+ poster?: string | undefined;
1780
+ preload?: string | undefined;
1781
+ readOnly?: boolean | undefined;
1782
+ required?: boolean | undefined;
1783
+ reversed?: boolean | undefined;
1784
+ rows?: number | undefined;
1785
+ rowSpan?: number | undefined;
1786
+ sandbox?: string | undefined;
1787
+ scope?: string | undefined;
1788
+ scoped?: boolean | undefined;
1789
+ scrolling?: string | undefined;
1790
+ seamless?: boolean | undefined;
1791
+ selected?: boolean | undefined;
1792
+ shape?: string | undefined;
1793
+ size?: number | undefined;
1794
+ sizes?: string | undefined;
1795
+ span?: number | undefined;
1796
+ src?: string | undefined;
1797
+ srcDoc?: string | undefined;
1798
+ srcLang?: string | undefined;
1799
+ srcSet?: string | undefined;
1800
+ start?: number | undefined;
1801
+ step?: number | string | undefined;
1802
+ summary?: string | undefined;
1803
+ target?: string | undefined;
1804
+ type?: string | undefined;
1805
+ useMap?: string | undefined;
1806
+ value?: string | ReadonlyArray<string> | number | undefined;
1807
+ width?: number | string | undefined;
1808
+ wmode?: string | undefined;
1809
+ wrap?: string | undefined;
1810
+ }
1811
+ type HTMLAttributeReferrerPolicy = "" | "no-referrer" | "no-referrer-when-downgrade" | "origin" | "origin-when-cross-origin" | "same-origin" | "strict-origin" | "strict-origin-when-cross-origin" | "unsafe-url";
1812
+ type HTMLAttributeAnchorTarget = "_self" | "_blank" | "_parent" | "_top" | (string & {});
1813
+ interface AnchorHTMLAttributes<T> extends HTMLAttributes<T> {
1814
+ download?: any;
1815
+ href?: string | undefined;
1816
+ hrefLang?: string | undefined;
1817
+ media?: string | undefined;
1818
+ ping?: string | undefined;
1819
+ target?: HTMLAttributeAnchorTarget | undefined;
1820
+ type?: string | undefined;
1821
+ referrerPolicy?: HTMLAttributeReferrerPolicy | undefined;
1822
+ }
1823
+ interface AudioHTMLAttributes<T> extends MediaHTMLAttributes<T> {
1824
+ }
1825
+ interface AreaHTMLAttributes<T> extends HTMLAttributes<T> {
1826
+ alt?: string | undefined;
1827
+ coords?: string | undefined;
1828
+ download?: any;
1829
+ href?: string | undefined;
1830
+ hrefLang?: string | undefined;
1831
+ media?: string | undefined;
1832
+ referrerPolicy?: HTMLAttributeReferrerPolicy | undefined;
1833
+ shape?: string | undefined;
1834
+ target?: string | undefined;
1835
+ }
1836
+ interface BaseHTMLAttributes<T> extends HTMLAttributes<T> {
1837
+ href?: string | undefined;
1838
+ target?: string | undefined;
1839
+ }
1840
+ interface BlockquoteHTMLAttributes<T> extends HTMLAttributes<T> {
1841
+ cite?: string | undefined;
1842
+ }
1843
+ interface ButtonHTMLAttributes<T> extends HTMLAttributes<T> {
1844
+ disabled?: boolean | undefined;
1845
+ form?: string | undefined;
1846
+ formAction?: string | undefined;
1847
+ formEncType?: string | undefined;
1848
+ formMethod?: string | undefined;
1849
+ formNoValidate?: boolean | undefined;
1850
+ formTarget?: string | undefined;
1851
+ name?: string | undefined;
1852
+ type?: "submit" | "reset" | "button" | undefined;
1853
+ value?: string | ReadonlyArray<string> | number | undefined;
1854
+ }
1855
+ interface CanvasHTMLAttributes<T> extends HTMLAttributes<T> {
1856
+ height?: number | string | undefined;
1857
+ width?: number | string | undefined;
1858
+ }
1859
+ interface ColHTMLAttributes<T> extends HTMLAttributes<T> {
1860
+ span?: number | undefined;
1861
+ width?: number | string | undefined;
1862
+ }
1863
+ interface ColgroupHTMLAttributes<T> extends HTMLAttributes<T> {
1864
+ span?: number | undefined;
1865
+ }
1866
+ interface DataHTMLAttributes<T> extends HTMLAttributes<T> {
1867
+ value?: string | ReadonlyArray<string> | number | undefined;
1868
+ }
1869
+ interface DetailsHTMLAttributes<T> extends HTMLAttributes<T> {
1870
+ open?: boolean | undefined;
1871
+ onToggle?: ReactEventHandler<T> | undefined;
1872
+ }
1873
+ interface DelHTMLAttributes<T> extends HTMLAttributes<T> {
1874
+ cite?: string | undefined;
1875
+ dateTime?: string | undefined;
1876
+ }
1877
+ interface DialogHTMLAttributes<T> extends HTMLAttributes<T> {
1878
+ onCancel?: ReactEventHandler<T> | undefined;
1879
+ onClose?: ReactEventHandler<T> | undefined;
1880
+ open?: boolean | undefined;
1881
+ }
1882
+ interface EmbedHTMLAttributes<T> extends HTMLAttributes<T> {
1883
+ height?: number | string | undefined;
1884
+ src?: string | undefined;
1885
+ type?: string | undefined;
1886
+ width?: number | string | undefined;
1887
+ }
1888
+ interface FieldsetHTMLAttributes<T> extends HTMLAttributes<T> {
1889
+ disabled?: boolean | undefined;
1890
+ form?: string | undefined;
1891
+ name?: string | undefined;
1892
+ }
1893
+ interface FormHTMLAttributes<T> extends HTMLAttributes<T> {
1894
+ acceptCharset?: string | undefined;
1895
+ action?: string | undefined;
1896
+ autoComplete?: string | undefined;
1897
+ encType?: string | undefined;
1898
+ method?: string | undefined;
1899
+ name?: string | undefined;
1900
+ noValidate?: boolean | undefined;
1901
+ target?: string | undefined;
1902
+ }
1903
+ interface HtmlHTMLAttributes<T> extends HTMLAttributes<T> {
1904
+ manifest?: string | undefined;
1905
+ }
1906
+ interface IframeHTMLAttributes<T> extends HTMLAttributes<T> {
1907
+ allow?: string | undefined;
1908
+ allowFullScreen?: boolean | undefined;
1909
+ allowTransparency?: boolean | undefined;
1910
+ /** @deprecated */
1911
+ frameBorder?: number | string | undefined;
1912
+ height?: number | string | undefined;
1913
+ loading?: "eager" | "lazy" | undefined;
1914
+ /** @deprecated */
1915
+ marginHeight?: number | undefined;
1916
+ /** @deprecated */
1917
+ marginWidth?: number | undefined;
1918
+ name?: string | undefined;
1919
+ referrerPolicy?: HTMLAttributeReferrerPolicy | undefined;
1920
+ sandbox?: string | undefined;
1921
+ /** @deprecated */
1922
+ scrolling?: string | undefined;
1923
+ seamless?: boolean | undefined;
1924
+ src?: string | undefined;
1925
+ srcDoc?: string | undefined;
1926
+ width?: number | string | undefined;
1927
+ }
1928
+ interface ImgHTMLAttributes<T> extends HTMLAttributes<T> {
1929
+ alt?: string | undefined;
1930
+ crossOrigin?: CrossOrigin;
1931
+ decoding?: "async" | "auto" | "sync" | undefined;
1932
+ height?: number | string | undefined;
1933
+ loading?: "eager" | "lazy" | undefined;
1934
+ referrerPolicy?: HTMLAttributeReferrerPolicy | undefined;
1935
+ sizes?: string | undefined;
1936
+ src?: string | undefined;
1937
+ srcSet?: string | undefined;
1938
+ useMap?: string | undefined;
1939
+ width?: number | string | undefined;
1940
+ }
1941
+ interface InsHTMLAttributes<T> extends HTMLAttributes<T> {
1942
+ cite?: string | undefined;
1943
+ dateTime?: string | undefined;
1944
+ }
1945
+ type HTMLInputTypeAttribute = "button" | "checkbox" | "color" | "date" | "datetime-local" | "email" | "file" | "hidden" | "image" | "month" | "number" | "password" | "radio" | "range" | "reset" | "search" | "submit" | "tel" | "text" | "time" | "url" | "week" | (string & {});
1946
+ interface InputHTMLAttributes<T> extends HTMLAttributes<T> {
1947
+ accept?: string | undefined;
1948
+ alt?: string | undefined;
1949
+ autoComplete?: string | undefined;
1950
+ capture?: boolean | "user" | "environment" | undefined; // https://www.w3.org/TR/html-media-capture/#the-capture-attribute
1951
+ checked?: boolean | undefined;
1952
+ disabled?: boolean | undefined;
1953
+ enterKeyHint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined;
1954
+ form?: string | undefined;
1955
+ formAction?: string | undefined;
1956
+ formEncType?: string | undefined;
1957
+ formMethod?: string | undefined;
1958
+ formNoValidate?: boolean | undefined;
1959
+ formTarget?: string | undefined;
1960
+ height?: number | string | undefined;
1961
+ list?: string | undefined;
1962
+ max?: number | string | undefined;
1963
+ maxLength?: number | undefined;
1964
+ min?: number | string | undefined;
1965
+ minLength?: number | undefined;
1966
+ multiple?: boolean | undefined;
1967
+ name?: string | undefined;
1968
+ pattern?: string | undefined;
1969
+ placeholder?: string | undefined;
1970
+ readOnly?: boolean | undefined;
1971
+ required?: boolean | undefined;
1972
+ size?: number | undefined;
1973
+ src?: string | undefined;
1974
+ step?: number | string | undefined;
1975
+ type?: HTMLInputTypeAttribute | undefined;
1976
+ value?: string | ReadonlyArray<string> | number | undefined;
1977
+ width?: number | string | undefined;
1978
+ onChange?: ChangeEventHandler<T> | undefined;
1979
+ }
1980
+ interface KeygenHTMLAttributes<T> extends HTMLAttributes<T> {
1981
+ challenge?: string | undefined;
1982
+ disabled?: boolean | undefined;
1983
+ form?: string | undefined;
1984
+ keyType?: string | undefined;
1985
+ keyParams?: string | undefined;
1986
+ name?: string | undefined;
1987
+ }
1988
+ interface LabelHTMLAttributes<T> extends HTMLAttributes<T> {
1989
+ form?: string | undefined;
1990
+ htmlFor?: string | undefined;
1991
+ }
1992
+ interface LiHTMLAttributes<T> extends HTMLAttributes<T> {
1993
+ value?: string | ReadonlyArray<string> | number | undefined;
1994
+ }
1995
+ interface LinkHTMLAttributes<T> extends HTMLAttributes<T> {
1996
+ as?: string | undefined;
1997
+ crossOrigin?: CrossOrigin;
1998
+ fetchPriority?: "high" | "low" | "auto";
1999
+ href?: string | undefined;
2000
+ hrefLang?: string | undefined;
2001
+ integrity?: string | undefined;
2002
+ media?: string | undefined;
2003
+ imageSrcSet?: string | undefined;
2004
+ referrerPolicy?: HTMLAttributeReferrerPolicy | undefined;
2005
+ sizes?: string | undefined;
2006
+ type?: string | undefined;
2007
+ charSet?: string | undefined;
2008
+ }
2009
+ interface MapHTMLAttributes<T> extends HTMLAttributes<T> {
2010
+ name?: string | undefined;
2011
+ }
2012
+ interface MenuHTMLAttributes<T> extends HTMLAttributes<T> {
2013
+ type?: string | undefined;
2014
+ }
2015
+ interface MediaHTMLAttributes<T> extends HTMLAttributes<T> {
2016
+ autoPlay?: boolean | undefined;
2017
+ controls?: boolean | undefined;
2018
+ controlsList?: string | undefined;
2019
+ crossOrigin?: CrossOrigin;
2020
+ loop?: boolean | undefined;
2021
+ mediaGroup?: string | undefined;
2022
+ muted?: boolean | undefined;
2023
+ playsInline?: boolean | undefined;
2024
+ preload?: string | undefined;
2025
+ src?: string | undefined;
2026
+ }
2027
+ interface MetaHTMLAttributes<T> extends HTMLAttributes<T> {
2028
+ charSet?: string | undefined;
2029
+ httpEquiv?: string | undefined;
2030
+ name?: string | undefined;
2031
+ media?: string | undefined;
2032
+ }
2033
+ interface MeterHTMLAttributes<T> extends HTMLAttributes<T> {
2034
+ form?: string | undefined;
2035
+ high?: number | undefined;
2036
+ low?: number | undefined;
2037
+ max?: number | string | undefined;
2038
+ min?: number | string | undefined;
2039
+ optimum?: number | undefined;
2040
+ value?: string | ReadonlyArray<string> | number | undefined;
2041
+ }
2042
+ interface QuoteHTMLAttributes<T> extends HTMLAttributes<T> {
2043
+ cite?: string | undefined;
2044
+ }
2045
+ interface ObjectHTMLAttributes<T> extends HTMLAttributes<T> {
2046
+ classID?: string | undefined;
2047
+ data?: string | undefined;
2048
+ form?: string | undefined;
2049
+ height?: number | string | undefined;
2050
+ name?: string | undefined;
2051
+ type?: string | undefined;
2052
+ useMap?: string | undefined;
2053
+ width?: number | string | undefined;
2054
+ wmode?: string | undefined;
2055
+ }
2056
+ interface OlHTMLAttributes<T> extends HTMLAttributes<T> {
2057
+ reversed?: boolean | undefined;
2058
+ start?: number | undefined;
2059
+ type?: "1" | "a" | "A" | "i" | "I" | undefined;
2060
+ }
2061
+ interface OptgroupHTMLAttributes<T> extends HTMLAttributes<T> {
2062
+ disabled?: boolean | undefined;
2063
+ label?: string | undefined;
2064
+ }
2065
+ interface OptionHTMLAttributes<T> extends HTMLAttributes<T> {
2066
+ disabled?: boolean | undefined;
2067
+ label?: string | undefined;
2068
+ selected?: boolean | undefined;
2069
+ value?: string | ReadonlyArray<string> | number | undefined;
2070
+ }
2071
+ interface OutputHTMLAttributes<T> extends HTMLAttributes<T> {
2072
+ form?: string | undefined;
2073
+ htmlFor?: string | undefined;
2074
+ name?: string | undefined;
2075
+ }
2076
+ interface ParamHTMLAttributes<T> extends HTMLAttributes<T> {
2077
+ name?: string | undefined;
2078
+ value?: string | ReadonlyArray<string> | number | undefined;
2079
+ }
2080
+ interface ProgressHTMLAttributes<T> extends HTMLAttributes<T> {
2081
+ max?: number | string | undefined;
2082
+ value?: string | ReadonlyArray<string> | number | undefined;
2083
+ }
2084
+ interface SlotHTMLAttributes<T> extends HTMLAttributes<T> {
2085
+ name?: string | undefined;
2086
+ }
2087
+ interface ScriptHTMLAttributes<T> extends HTMLAttributes<T> {
2088
+ async?: boolean | undefined;
2089
+ /** @deprecated */
2090
+ charSet?: string | undefined;
2091
+ crossOrigin?: CrossOrigin;
2092
+ defer?: boolean | undefined;
2093
+ integrity?: string | undefined;
2094
+ noModule?: boolean | undefined;
2095
+ referrerPolicy?: HTMLAttributeReferrerPolicy | undefined;
2096
+ src?: string | undefined;
2097
+ type?: string | undefined;
2098
+ }
2099
+ interface SelectHTMLAttributes<T> extends HTMLAttributes<T> {
2100
+ autoComplete?: string | undefined;
2101
+ disabled?: boolean | undefined;
2102
+ form?: string | undefined;
2103
+ multiple?: boolean | undefined;
2104
+ name?: string | undefined;
2105
+ required?: boolean | undefined;
2106
+ size?: number | undefined;
2107
+ value?: string | ReadonlyArray<string> | number | undefined;
2108
+ onChange?: ChangeEventHandler<T> | undefined;
2109
+ }
2110
+ interface SourceHTMLAttributes<T> extends HTMLAttributes<T> {
2111
+ height?: number | string | undefined;
2112
+ media?: string | undefined;
2113
+ sizes?: string | undefined;
2114
+ src?: string | undefined;
2115
+ srcSet?: string | undefined;
2116
+ type?: string | undefined;
2117
+ width?: number | string | undefined;
2118
+ }
2119
+ interface StyleHTMLAttributes<T> extends HTMLAttributes<T> {
2120
+ media?: string | undefined;
2121
+ scoped?: boolean | undefined;
2122
+ type?: string | undefined;
2123
+ }
2124
+ interface TableHTMLAttributes<T> extends HTMLAttributes<T> {
2125
+ cellPadding?: number | string | undefined;
2126
+ cellSpacing?: number | string | undefined;
2127
+ summary?: string | undefined;
2128
+ width?: number | string | undefined;
2129
+ }
2130
+ interface TextareaHTMLAttributes<T> extends HTMLAttributes<T> {
2131
+ autoComplete?: string | undefined;
2132
+ cols?: number | undefined;
2133
+ dirName?: string | undefined;
2134
+ disabled?: boolean | undefined;
2135
+ form?: string | undefined;
2136
+ maxLength?: number | undefined;
2137
+ minLength?: number | undefined;
2138
+ name?: string | undefined;
2139
+ placeholder?: string | undefined;
2140
+ readOnly?: boolean | undefined;
2141
+ required?: boolean | undefined;
2142
+ rows?: number | undefined;
2143
+ value?: string | ReadonlyArray<string> | number | undefined;
2144
+ wrap?: string | undefined;
2145
+ onChange?: ChangeEventHandler<T> | undefined;
2146
+ }
2147
+ interface TdHTMLAttributes<T> extends HTMLAttributes<T> {
2148
+ align?: "left" | "center" | "right" | "justify" | "char" | undefined;
2149
+ colSpan?: number | undefined;
2150
+ headers?: string | undefined;
2151
+ rowSpan?: number | undefined;
2152
+ scope?: string | undefined;
2153
+ abbr?: string | undefined;
2154
+ height?: number | string | undefined;
2155
+ width?: number | string | undefined;
2156
+ valign?: "top" | "middle" | "bottom" | "baseline" | undefined;
2157
+ }
2158
+ interface ThHTMLAttributes<T> extends HTMLAttributes<T> {
2159
+ align?: "left" | "center" | "right" | "justify" | "char" | undefined;
2160
+ colSpan?: number | undefined;
2161
+ headers?: string | undefined;
2162
+ rowSpan?: number | undefined;
2163
+ scope?: string | undefined;
2164
+ abbr?: string | undefined;
2165
+ }
2166
+ interface TimeHTMLAttributes<T> extends HTMLAttributes<T> {
2167
+ dateTime?: string | undefined;
2168
+ }
2169
+ interface TrackHTMLAttributes<T> extends HTMLAttributes<T> {
2170
+ default?: boolean | undefined;
2171
+ kind?: string | undefined;
2172
+ label?: string | undefined;
2173
+ src?: string | undefined;
2174
+ srcLang?: string | undefined;
2175
+ }
2176
+ interface VideoHTMLAttributes<T> extends MediaHTMLAttributes<T> {
2177
+ height?: number | string | undefined;
2178
+ playsInline?: boolean | undefined;
2179
+ poster?: string | undefined;
2180
+ width?: number | string | undefined;
2181
+ disablePictureInPicture?: boolean | undefined;
2182
+ disableRemotePlayback?: boolean | undefined;
2183
+ }
2184
+ // this list is "complete" in that it contains every SVG attribute
2185
+ // that React supports, but the types can be improved.
2186
+ // Full list here: https://facebook.github.io/react/docs/dom-elements.html
2187
+ //
2188
+ // The three broad type categories are (in order of restrictiveness):
2189
+ // - "number | string"
2190
+ // - "string"
2191
+ // - union of string literals
2192
+ interface SVGAttributes<T> extends AriaAttributes, DOMAttributes<T> {
2193
+ // Attributes which also defined in HTMLAttributes
2194
+ // See comment in SVGDOMPropertyConfig.js
2195
+ className?: string | undefined;
2196
+ color?: string | undefined;
2197
+ height?: number | string | undefined;
2198
+ id?: string | undefined;
2199
+ lang?: string | undefined;
2200
+ max?: number | string | undefined;
2201
+ media?: string | undefined;
2202
+ method?: string | undefined;
2203
+ min?: number | string | undefined;
2204
+ name?: string | undefined;
2205
+ style?: CSSProperties | undefined;
2206
+ target?: string | undefined;
2207
+ type?: string | undefined;
2208
+ width?: number | string | undefined;
2209
+ // Other HTML properties supported by SVG elements in browsers
2210
+ role?: AriaRole | undefined;
2211
+ tabIndex?: number | undefined;
2212
+ crossOrigin?: CrossOrigin;
2213
+ // SVG Specific attributes
2214
+ accentHeight?: number | string | undefined;
2215
+ accumulate?: "none" | "sum" | undefined;
2216
+ additive?: "replace" | "sum" | undefined;
2217
+ alignmentBaseline?: "auto" | "baseline" | "before-edge" | "text-before-edge" | "middle" | "central" | "after-edge" | "text-after-edge" | "ideographic" | "alphabetic" | "hanging" | "mathematical" | "inherit" | undefined;
2218
+ allowReorder?: "no" | "yes" | undefined;
2219
+ alphabetic?: number | string | undefined;
2220
+ amplitude?: number | string | undefined;
2221
+ arabicForm?: "initial" | "medial" | "terminal" | "isolated" | undefined;
2222
+ ascent?: number | string | undefined;
2223
+ attributeName?: string | undefined;
2224
+ attributeType?: string | undefined;
2225
+ autoReverse?: Booleanish | undefined;
2226
+ azimuth?: number | string | undefined;
2227
+ baseFrequency?: number | string | undefined;
2228
+ baselineShift?: number | string | undefined;
2229
+ baseProfile?: number | string | undefined;
2230
+ bbox?: number | string | undefined;
2231
+ begin?: number | string | undefined;
2232
+ bias?: number | string | undefined;
2233
+ by?: number | string | undefined;
2234
+ calcMode?: number | string | undefined;
2235
+ capHeight?: number | string | undefined;
2236
+ clip?: number | string | undefined;
2237
+ clipPath?: string | undefined;
2238
+ clipPathUnits?: number | string | undefined;
2239
+ clipRule?: number | string | undefined;
2240
+ colorInterpolation?: number | string | undefined;
2241
+ colorInterpolationFilters?: "auto" | "sRGB" | "linearRGB" | "inherit" | undefined;
2242
+ colorProfile?: number | string | undefined;
2243
+ colorRendering?: number | string | undefined;
2244
+ contentScriptType?: number | string | undefined;
2245
+ contentStyleType?: number | string | undefined;
2246
+ cursor?: number | string | undefined;
2247
+ cx?: number | string | undefined;
2248
+ cy?: number | string | undefined;
2249
+ d?: string | undefined;
2250
+ decelerate?: number | string | undefined;
2251
+ descent?: number | string | undefined;
2252
+ diffuseConstant?: number | string | undefined;
2253
+ direction?: number | string | undefined;
2254
+ display?: number | string | undefined;
2255
+ divisor?: number | string | undefined;
2256
+ dominantBaseline?: number | string | undefined;
2257
+ dur?: number | string | undefined;
2258
+ dx?: number | string | undefined;
2259
+ dy?: number | string | undefined;
2260
+ edgeMode?: number | string | undefined;
2261
+ elevation?: number | string | undefined;
2262
+ enableBackground?: number | string | undefined;
2263
+ end?: number | string | undefined;
2264
+ exponent?: number | string | undefined;
2265
+ externalResourcesRequired?: Booleanish | undefined;
2266
+ fill?: string | undefined;
2267
+ fillOpacity?: number | string | undefined;
2268
+ fillRule?: "nonzero" | "evenodd" | "inherit" | undefined;
2269
+ filter?: string | undefined;
2270
+ filterRes?: number | string | undefined;
2271
+ filterUnits?: number | string | undefined;
2272
+ floodColor?: number | string | undefined;
2273
+ floodOpacity?: number | string | undefined;
2274
+ focusable?: Booleanish | "auto" | undefined;
2275
+ fontFamily?: string | undefined;
2276
+ fontSize?: number | string | undefined;
2277
+ fontSizeAdjust?: number | string | undefined;
2278
+ fontStretch?: number | string | undefined;
2279
+ fontStyle?: number | string | undefined;
2280
+ fontVariant?: number | string | undefined;
2281
+ fontWeight?: number | string | undefined;
2282
+ format?: number | string | undefined;
2283
+ fr?: number | string | undefined;
2284
+ from?: number | string | undefined;
2285
+ fx?: number | string | undefined;
2286
+ fy?: number | string | undefined;
2287
+ g1?: number | string | undefined;
2288
+ g2?: number | string | undefined;
2289
+ glyphName?: number | string | undefined;
2290
+ glyphOrientationHorizontal?: number | string | undefined;
2291
+ glyphOrientationVertical?: number | string | undefined;
2292
+ glyphRef?: number | string | undefined;
2293
+ gradientTransform?: string | undefined;
2294
+ gradientUnits?: string | undefined;
2295
+ hanging?: number | string | undefined;
2296
+ horizAdvX?: number | string | undefined;
2297
+ horizOriginX?: number | string | undefined;
2298
+ href?: string | undefined;
2299
+ ideographic?: number | string | undefined;
2300
+ imageRendering?: number | string | undefined;
2301
+ in2?: number | string | undefined;
2302
+ in?: string | undefined;
2303
+ intercept?: number | string | undefined;
2304
+ k1?: number | string | undefined;
2305
+ k2?: number | string | undefined;
2306
+ k3?: number | string | undefined;
2307
+ k4?: number | string | undefined;
2308
+ k?: number | string | undefined;
2309
+ kernelMatrix?: number | string | undefined;
2310
+ kernelUnitLength?: number | string | undefined;
2311
+ kerning?: number | string | undefined;
2312
+ keyPoints?: number | string | undefined;
2313
+ keySplines?: number | string | undefined;
2314
+ keyTimes?: number | string | undefined;
2315
+ lengthAdjust?: number | string | undefined;
2316
+ letterSpacing?: number | string | undefined;
2317
+ lightingColor?: number | string | undefined;
2318
+ limitingConeAngle?: number | string | undefined;
2319
+ local?: number | string | undefined;
2320
+ markerEnd?: string | undefined;
2321
+ markerHeight?: number | string | undefined;
2322
+ markerMid?: string | undefined;
2323
+ markerStart?: string | undefined;
2324
+ markerUnits?: number | string | undefined;
2325
+ markerWidth?: number | string | undefined;
2326
+ mask?: string | undefined;
2327
+ maskContentUnits?: number | string | undefined;
2328
+ maskUnits?: number | string | undefined;
2329
+ mathematical?: number | string | undefined;
2330
+ mode?: number | string | undefined;
2331
+ numOctaves?: number | string | undefined;
2332
+ offset?: number | string | undefined;
2333
+ opacity?: number | string | undefined;
2334
+ operator?: number | string | undefined;
2335
+ order?: number | string | undefined;
2336
+ orient?: number | string | undefined;
2337
+ orientation?: number | string | undefined;
2338
+ origin?: number | string | undefined;
2339
+ overflow?: number | string | undefined;
2340
+ overlinePosition?: number | string | undefined;
2341
+ overlineThickness?: number | string | undefined;
2342
+ paintOrder?: number | string | undefined;
2343
+ panose1?: number | string | undefined;
2344
+ path?: string | undefined;
2345
+ pathLength?: number | string | undefined;
2346
+ patternContentUnits?: string | undefined;
2347
+ patternTransform?: number | string | undefined;
2348
+ patternUnits?: string | undefined;
2349
+ pointerEvents?: number | string | undefined;
2350
+ points?: string | undefined;
2351
+ pointsAtX?: number | string | undefined;
2352
+ pointsAtY?: number | string | undefined;
2353
+ pointsAtZ?: number | string | undefined;
2354
+ preserveAlpha?: Booleanish | undefined;
2355
+ preserveAspectRatio?: string | undefined;
2356
+ primitiveUnits?: number | string | undefined;
2357
+ r?: number | string | undefined;
2358
+ radius?: number | string | undefined;
2359
+ refX?: number | string | undefined;
2360
+ refY?: number | string | undefined;
2361
+ renderingIntent?: number | string | undefined;
2362
+ repeatCount?: number | string | undefined;
2363
+ repeatDur?: number | string | undefined;
2364
+ requiredExtensions?: number | string | undefined;
2365
+ requiredFeatures?: number | string | undefined;
2366
+ restart?: number | string | undefined;
2367
+ result?: string | undefined;
2368
+ rotate?: number | string | undefined;
2369
+ rx?: number | string | undefined;
2370
+ ry?: number | string | undefined;
2371
+ scale?: number | string | undefined;
2372
+ seed?: number | string | undefined;
2373
+ shapeRendering?: number | string | undefined;
2374
+ slope?: number | string | undefined;
2375
+ spacing?: number | string | undefined;
2376
+ specularConstant?: number | string | undefined;
2377
+ specularExponent?: number | string | undefined;
2378
+ speed?: number | string | undefined;
2379
+ spreadMethod?: string | undefined;
2380
+ startOffset?: number | string | undefined;
2381
+ stdDeviation?: number | string | undefined;
2382
+ stemh?: number | string | undefined;
2383
+ stemv?: number | string | undefined;
2384
+ stitchTiles?: number | string | undefined;
2385
+ stopColor?: string | undefined;
2386
+ stopOpacity?: number | string | undefined;
2387
+ strikethroughPosition?: number | string | undefined;
2388
+ strikethroughThickness?: number | string | undefined;
2389
+ string?: number | string | undefined;
2390
+ stroke?: string | undefined;
2391
+ strokeDasharray?: string | number | undefined;
2392
+ strokeDashoffset?: string | number | undefined;
2393
+ strokeLinecap?: "butt" | "round" | "square" | "inherit" | undefined;
2394
+ strokeLinejoin?: "miter" | "round" | "bevel" | "inherit" | undefined;
2395
+ strokeMiterlimit?: number | string | undefined;
2396
+ strokeOpacity?: number | string | undefined;
2397
+ strokeWidth?: number | string | undefined;
2398
+ surfaceScale?: number | string | undefined;
2399
+ systemLanguage?: number | string | undefined;
2400
+ tableValues?: number | string | undefined;
2401
+ targetX?: number | string | undefined;
2402
+ targetY?: number | string | undefined;
2403
+ textAnchor?: string | undefined;
2404
+ textDecoration?: number | string | undefined;
2405
+ textLength?: number | string | undefined;
2406
+ textRendering?: number | string | undefined;
2407
+ to?: number | string | undefined;
2408
+ transform?: string | undefined;
2409
+ u1?: number | string | undefined;
2410
+ u2?: number | string | undefined;
2411
+ underlinePosition?: number | string | undefined;
2412
+ underlineThickness?: number | string | undefined;
2413
+ unicode?: number | string | undefined;
2414
+ unicodeBidi?: number | string | undefined;
2415
+ unicodeRange?: number | string | undefined;
2416
+ unitsPerEm?: number | string | undefined;
2417
+ vAlphabetic?: number | string | undefined;
2418
+ values?: string | undefined;
2419
+ vectorEffect?: number | string | undefined;
2420
+ version?: string | undefined;
2421
+ vertAdvY?: number | string | undefined;
2422
+ vertOriginX?: number | string | undefined;
2423
+ vertOriginY?: number | string | undefined;
2424
+ vHanging?: number | string | undefined;
2425
+ vIdeographic?: number | string | undefined;
2426
+ viewBox?: string | undefined;
2427
+ viewTarget?: number | string | undefined;
2428
+ visibility?: number | string | undefined;
2429
+ vMathematical?: number | string | undefined;
2430
+ widths?: number | string | undefined;
2431
+ wordSpacing?: number | string | undefined;
2432
+ writingMode?: number | string | undefined;
2433
+ x1?: number | string | undefined;
2434
+ x2?: number | string | undefined;
2435
+ x?: number | string | undefined;
2436
+ xChannelSelector?: string | undefined;
2437
+ xHeight?: number | string | undefined;
2438
+ xlinkActuate?: string | undefined;
2439
+ xlinkArcrole?: string | undefined;
2440
+ xlinkHref?: string | undefined;
2441
+ xlinkRole?: string | undefined;
2442
+ xlinkShow?: string | undefined;
2443
+ xlinkTitle?: string | undefined;
2444
+ xlinkType?: string | undefined;
2445
+ xmlBase?: string | undefined;
2446
+ xmlLang?: string | undefined;
2447
+ xmlns?: string | undefined;
2448
+ xmlnsXlink?: string | undefined;
2449
+ xmlSpace?: string | undefined;
2450
+ y1?: number | string | undefined;
2451
+ y2?: number | string | undefined;
2452
+ y?: number | string | undefined;
2453
+ yChannelSelector?: string | undefined;
2454
+ z?: number | string | undefined;
2455
+ zoomAndPan?: string | undefined;
2456
+ }
2457
+ interface WebViewHTMLAttributes<T> extends HTMLAttributes<T> {
2458
+ allowFullScreen?: boolean | undefined;
2459
+ allowpopups?: boolean | undefined;
2460
+ autosize?: boolean | undefined;
2461
+ blinkfeatures?: string | undefined;
2462
+ disableblinkfeatures?: string | undefined;
2463
+ disableguestresize?: boolean | undefined;
2464
+ disablewebsecurity?: boolean | undefined;
2465
+ guestinstance?: string | undefined;
2466
+ httpreferrer?: string | undefined;
2467
+ nodeintegration?: boolean | undefined;
2468
+ partition?: string | undefined;
2469
+ plugins?: boolean | undefined;
2470
+ preload?: string | undefined;
2471
+ src?: string | undefined;
2472
+ useragent?: string | undefined;
2473
+ webpreferences?: string | undefined;
2474
+ }
2475
+ //
2476
+ // React.DOM
2477
+ // ----------------------------------------------------------------------
2478
+ interface ReactHTML {
2479
+ a: DetailedHTMLFactory<AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>;
2480
+ abbr: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2481
+ address: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2482
+ area: DetailedHTMLFactory<AreaHTMLAttributes<HTMLAreaElement>, HTMLAreaElement>;
2483
+ article: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2484
+ aside: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2485
+ audio: DetailedHTMLFactory<AudioHTMLAttributes<HTMLAudioElement>, HTMLAudioElement>;
2486
+ b: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2487
+ base: DetailedHTMLFactory<BaseHTMLAttributes<HTMLBaseElement>, HTMLBaseElement>;
2488
+ bdi: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2489
+ bdo: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2490
+ big: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2491
+ blockquote: DetailedHTMLFactory<BlockquoteHTMLAttributes<HTMLQuoteElement>, HTMLQuoteElement>;
2492
+ body: DetailedHTMLFactory<HTMLAttributes<HTMLBodyElement>, HTMLBodyElement>;
2493
+ br: DetailedHTMLFactory<HTMLAttributes<HTMLBRElement>, HTMLBRElement>;
2494
+ button: DetailedHTMLFactory<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>;
2495
+ canvas: DetailedHTMLFactory<CanvasHTMLAttributes<HTMLCanvasElement>, HTMLCanvasElement>;
2496
+ caption: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2497
+ cite: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2498
+ code: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2499
+ col: DetailedHTMLFactory<ColHTMLAttributes<HTMLTableColElement>, HTMLTableColElement>;
2500
+ colgroup: DetailedHTMLFactory<ColgroupHTMLAttributes<HTMLTableColElement>, HTMLTableColElement>;
2501
+ data: DetailedHTMLFactory<DataHTMLAttributes<HTMLDataElement>, HTMLDataElement>;
2502
+ datalist: DetailedHTMLFactory<HTMLAttributes<HTMLDataListElement>, HTMLDataListElement>;
2503
+ dd: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2504
+ del: DetailedHTMLFactory<DelHTMLAttributes<HTMLModElement>, HTMLModElement>;
2505
+ details: DetailedHTMLFactory<DetailsHTMLAttributes<HTMLDetailsElement>, HTMLDetailsElement>;
2506
+ dfn: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2507
+ dialog: DetailedHTMLFactory<DialogHTMLAttributes<HTMLDialogElement>, HTMLDialogElement>;
2508
+ div: DetailedHTMLFactory<HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
2509
+ dl: DetailedHTMLFactory<HTMLAttributes<HTMLDListElement>, HTMLDListElement>;
2510
+ dt: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2511
+ em: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2512
+ embed: DetailedHTMLFactory<EmbedHTMLAttributes<HTMLEmbedElement>, HTMLEmbedElement>;
2513
+ fieldset: DetailedHTMLFactory<FieldsetHTMLAttributes<HTMLFieldSetElement>, HTMLFieldSetElement>;
2514
+ figcaption: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2515
+ figure: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2516
+ footer: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2517
+ form: DetailedHTMLFactory<FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>;
2518
+ h1: DetailedHTMLFactory<HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>;
2519
+ h2: DetailedHTMLFactory<HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>;
2520
+ h3: DetailedHTMLFactory<HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>;
2521
+ h4: DetailedHTMLFactory<HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>;
2522
+ h5: DetailedHTMLFactory<HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>;
2523
+ h6: DetailedHTMLFactory<HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>;
2524
+ head: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLHeadElement>;
2525
+ header: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2526
+ hgroup: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2527
+ hr: DetailedHTMLFactory<HTMLAttributes<HTMLHRElement>, HTMLHRElement>;
2528
+ html: DetailedHTMLFactory<HtmlHTMLAttributes<HTMLHtmlElement>, HTMLHtmlElement>;
2529
+ i: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2530
+ iframe: DetailedHTMLFactory<IframeHTMLAttributes<HTMLIFrameElement>, HTMLIFrameElement>;
2531
+ img: DetailedHTMLFactory<ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>;
2532
+ input: DetailedHTMLFactory<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>;
2533
+ ins: DetailedHTMLFactory<InsHTMLAttributes<HTMLModElement>, HTMLModElement>;
2534
+ kbd: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2535
+ keygen: DetailedHTMLFactory<KeygenHTMLAttributes<HTMLElement>, HTMLElement>;
2536
+ label: DetailedHTMLFactory<LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>;
2537
+ legend: DetailedHTMLFactory<HTMLAttributes<HTMLLegendElement>, HTMLLegendElement>;
2538
+ li: DetailedHTMLFactory<LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>;
2539
+ link: DetailedHTMLFactory<LinkHTMLAttributes<HTMLLinkElement>, HTMLLinkElement>;
2540
+ main: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2541
+ map: DetailedHTMLFactory<MapHTMLAttributes<HTMLMapElement>, HTMLMapElement>;
2542
+ mark: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2543
+ menu: DetailedHTMLFactory<MenuHTMLAttributes<HTMLElement>, HTMLElement>;
2544
+ menuitem: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2545
+ meta: DetailedHTMLFactory<MetaHTMLAttributes<HTMLMetaElement>, HTMLMetaElement>;
2546
+ meter: DetailedHTMLFactory<MeterHTMLAttributes<HTMLMeterElement>, HTMLMeterElement>;
2547
+ nav: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2548
+ noscript: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2549
+ object: DetailedHTMLFactory<ObjectHTMLAttributes<HTMLObjectElement>, HTMLObjectElement>;
2550
+ ol: DetailedHTMLFactory<OlHTMLAttributes<HTMLOListElement>, HTMLOListElement>;
2551
+ optgroup: DetailedHTMLFactory<OptgroupHTMLAttributes<HTMLOptGroupElement>, HTMLOptGroupElement>;
2552
+ option: DetailedHTMLFactory<OptionHTMLAttributes<HTMLOptionElement>, HTMLOptionElement>;
2553
+ output: DetailedHTMLFactory<OutputHTMLAttributes<HTMLOutputElement>, HTMLOutputElement>;
2554
+ p: DetailedHTMLFactory<HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>;
2555
+ param: DetailedHTMLFactory<ParamHTMLAttributes<HTMLParamElement>, HTMLParamElement>;
2556
+ picture: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2557
+ pre: DetailedHTMLFactory<HTMLAttributes<HTMLPreElement>, HTMLPreElement>;
2558
+ progress: DetailedHTMLFactory<ProgressHTMLAttributes<HTMLProgressElement>, HTMLProgressElement>;
2559
+ q: DetailedHTMLFactory<QuoteHTMLAttributes<HTMLQuoteElement>, HTMLQuoteElement>;
2560
+ rp: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2561
+ rt: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2562
+ ruby: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2563
+ s: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2564
+ samp: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2565
+ slot: DetailedHTMLFactory<SlotHTMLAttributes<HTMLSlotElement>, HTMLSlotElement>;
2566
+ script: DetailedHTMLFactory<ScriptHTMLAttributes<HTMLScriptElement>, HTMLScriptElement>;
2567
+ section: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2568
+ select: DetailedHTMLFactory<SelectHTMLAttributes<HTMLSelectElement>, HTMLSelectElement>;
2569
+ small: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2570
+ source: DetailedHTMLFactory<SourceHTMLAttributes<HTMLSourceElement>, HTMLSourceElement>;
2571
+ span: DetailedHTMLFactory<HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>;
2572
+ strong: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2573
+ style: DetailedHTMLFactory<StyleHTMLAttributes<HTMLStyleElement>, HTMLStyleElement>;
2574
+ sub: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2575
+ summary: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2576
+ sup: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2577
+ table: DetailedHTMLFactory<TableHTMLAttributes<HTMLTableElement>, HTMLTableElement>;
2578
+ template: DetailedHTMLFactory<HTMLAttributes<HTMLTemplateElement>, HTMLTemplateElement>;
2579
+ tbody: DetailedHTMLFactory<HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>;
2580
+ td: DetailedHTMLFactory<TdHTMLAttributes<HTMLTableDataCellElement>, HTMLTableDataCellElement>;
2581
+ textarea: DetailedHTMLFactory<TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>;
2582
+ tfoot: DetailedHTMLFactory<HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>;
2583
+ th: DetailedHTMLFactory<ThHTMLAttributes<HTMLTableHeaderCellElement>, HTMLTableHeaderCellElement>;
2584
+ thead: DetailedHTMLFactory<HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>;
2585
+ time: DetailedHTMLFactory<TimeHTMLAttributes<HTMLTimeElement>, HTMLTimeElement>;
2586
+ title: DetailedHTMLFactory<HTMLAttributes<HTMLTitleElement>, HTMLTitleElement>;
2587
+ tr: DetailedHTMLFactory<HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>;
2588
+ track: DetailedHTMLFactory<TrackHTMLAttributes<HTMLTrackElement>, HTMLTrackElement>;
2589
+ u: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2590
+ ul: DetailedHTMLFactory<HTMLAttributes<HTMLUListElement>, HTMLUListElement>;
2591
+ "var": DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2592
+ video: DetailedHTMLFactory<VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement>;
2593
+ wbr: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2594
+ webview: DetailedHTMLFactory<WebViewHTMLAttributes<HTMLWebViewElement>, HTMLWebViewElement>;
2595
+ }
2596
+ interface ReactSVG {
2597
+ animate: SVGFactory;
2598
+ circle: SVGFactory;
2599
+ clipPath: SVGFactory;
2600
+ defs: SVGFactory;
2601
+ desc: SVGFactory;
2602
+ ellipse: SVGFactory;
2603
+ feBlend: SVGFactory;
2604
+ feColorMatrix: SVGFactory;
2605
+ feComponentTransfer: SVGFactory;
2606
+ feComposite: SVGFactory;
2607
+ feConvolveMatrix: SVGFactory;
2608
+ feDiffuseLighting: SVGFactory;
2609
+ feDisplacementMap: SVGFactory;
2610
+ feDistantLight: SVGFactory;
2611
+ feDropShadow: SVGFactory;
2612
+ feFlood: SVGFactory;
2613
+ feFuncA: SVGFactory;
2614
+ feFuncB: SVGFactory;
2615
+ feFuncG: SVGFactory;
2616
+ feFuncR: SVGFactory;
2617
+ feGaussianBlur: SVGFactory;
2618
+ feImage: SVGFactory;
2619
+ feMerge: SVGFactory;
2620
+ feMergeNode: SVGFactory;
2621
+ feMorphology: SVGFactory;
2622
+ feOffset: SVGFactory;
2623
+ fePointLight: SVGFactory;
2624
+ feSpecularLighting: SVGFactory;
2625
+ feSpotLight: SVGFactory;
2626
+ feTile: SVGFactory;
2627
+ feTurbulence: SVGFactory;
2628
+ filter: SVGFactory;
2629
+ foreignObject: SVGFactory;
2630
+ g: SVGFactory;
2631
+ image: SVGFactory;
2632
+ line: SVGFactory;
2633
+ linearGradient: SVGFactory;
2634
+ marker: SVGFactory;
2635
+ mask: SVGFactory;
2636
+ metadata: SVGFactory;
2637
+ path: SVGFactory;
2638
+ pattern: SVGFactory;
2639
+ polygon: SVGFactory;
2640
+ polyline: SVGFactory;
2641
+ radialGradient: SVGFactory;
2642
+ rect: SVGFactory;
2643
+ stop: SVGFactory;
2644
+ svg: SVGFactory;
2645
+ switch: SVGFactory;
2646
+ symbol: SVGFactory;
2647
+ text: SVGFactory;
2648
+ textPath: SVGFactory;
2649
+ tspan: SVGFactory;
2650
+ use: SVGFactory;
2651
+ view: SVGFactory;
2652
+ }
2653
+ interface ReactDOM extends ReactHTML, ReactSVG {
2654
+ }
2655
+ //
2656
+ // React.PropTypes
2657
+ // ----------------------------------------------------------------------
2658
+ type Validator<T> = PropTypes.Validator<T>;
2659
+ type Requireable<T> = PropTypes.Requireable<T>;
2660
+ type ValidationMap<T> = PropTypes.ValidationMap<T>;
2661
+ type WeakValidationMap<T> = {
2662
+ [K in keyof T]?: null extends T[K] ? Validator<T[K] | null | undefined> : undefined extends T[K] ? Validator<T[K] | null | undefined> : Validator<T[K]>;
2663
+ };
2664
+ interface ReactPropTypes {
2665
+ any: typeof PropTypes.any;
2666
+ array: typeof PropTypes.array;
2667
+ bool: typeof PropTypes.bool;
2668
+ func: typeof PropTypes.func;
2669
+ number: typeof PropTypes.number;
2670
+ object: typeof PropTypes.object;
2671
+ string: typeof PropTypes.string;
2672
+ node: typeof PropTypes.node;
2673
+ element: typeof PropTypes.element;
2674
+ instanceOf: typeof PropTypes.instanceOf;
2675
+ oneOf: typeof PropTypes.oneOf;
2676
+ oneOfType: typeof PropTypes.oneOfType;
2677
+ arrayOf: typeof PropTypes.arrayOf;
2678
+ objectOf: typeof PropTypes.objectOf;
2679
+ shape: typeof PropTypes.shape;
2680
+ exact: typeof PropTypes.exact;
2681
+ }
2682
+ //
2683
+ // React.Children
2684
+ // ----------------------------------------------------------------------
2685
+ interface ReactChildren {
2686
+ map<T, C>(children: C | ReadonlyArray<C>, fn: (child: C, index: number) => T): C extends null | undefined ? C : Array<Exclude<T, boolean | null | undefined>>;
2687
+ forEach<C>(children: C | ReadonlyArray<C>, fn: (child: C, index: number) => void): void;
2688
+ count(children: any): number;
2689
+ only<C>(children: C): C extends any[] ? never : C;
2690
+ toArray(children: ReactNode | ReactNode[]): Array<Exclude<ReactNode, boolean | null | undefined>>;
2691
+ }
2692
+ //
2693
+ // Browser Interfaces
2694
+ // https://github.com/nikeee/2048-typescript/blob/master/2048/js/touch.d.ts
2695
+ // ----------------------------------------------------------------------
2696
+ interface AbstractView {
2697
+ styleMedia: StyleMedia;
2698
+ document: Document;
2699
+ }
2700
+ interface Touch {
2701
+ identifier: number;
2702
+ target: EventTarget;
2703
+ screenX: number;
2704
+ screenY: number;
2705
+ clientX: number;
2706
+ clientY: number;
2707
+ pageX: number;
2708
+ pageY: number;
2709
+ }
2710
+ interface TouchList {
2711
+ [index: number]: Touch;
2712
+ length: number;
2713
+ item(index: number): Touch;
2714
+ identifiedTouch(identifier: number): Touch;
2715
+ }
2716
+ //
2717
+ // Error Interfaces
2718
+ // ----------------------------------------------------------------------
2719
+ interface ErrorInfo {
2720
+ /**
2721
+ * Captures which component contained the exception, and its ancestors.
2722
+ */
2723
+ componentStack: string;
2724
+ }
2725
+ namespace JSX {
2726
+ interface Element extends GlobalJSXElement {
2727
+ }
2728
+ interface ElementClass extends GlobalJSXElementClass {
2729
+ }
2730
+ interface ElementAttributesProperty extends GlobalJSXElementAttributesProperty {
2731
+ }
2732
+ interface ElementChildrenAttribute extends GlobalJSXElementChildrenAttribute {
2733
+ }
2734
+ type LibraryManagedAttributes<C, P> = GlobalJSXLibraryManagedAttributes<C, P>;
2735
+ interface IntrinsicAttributes extends GlobalJSXIntrinsicAttributes {
2736
+ }
2737
+ interface IntrinsicClassAttributes<T> extends GlobalJSXIntrinsicClassAttributes<T> {
2738
+ }
2739
+ interface IntrinsicElements extends GlobalJSXIntrinsicElements {
2740
+ }
2741
+ }
2742
+ }
2743
+ // React.JSX needs to point to global.JSX to keep global module augmentations intact.
2744
+ // But we can't access global.JSX so we need to create these aliases instead.
2745
+ // Once the global JSX namespace will be removed we replace React.JSX with the contents of global.JSX
2746
+ export interface GlobalJSXElement extends JSX.Element {
2747
+ }
2748
+ export interface GlobalJSXElementClass extends JSX.ElementClass {
2749
+ }
2750
+ export interface GlobalJSXElementAttributesProperty extends JSX.ElementAttributesProperty {
2751
+ }
2752
+ export interface GlobalJSXElementChildrenAttribute extends JSX.ElementChildrenAttribute {
2753
+ }
2754
+ export type GlobalJSXLibraryManagedAttributes<C, P> = JSX.LibraryManagedAttributes<C, P>;
2755
+ export interface GlobalJSXIntrinsicAttributes extends JSX.IntrinsicAttributes {
2756
+ }
2757
+ export interface GlobalJSXIntrinsicClassAttributes<T> extends JSX.IntrinsicClassAttributes<T> {
2758
+ }
2759
+ export interface GlobalJSXIntrinsicElements extends JSX.IntrinsicElements {
2760
+ }
3
2761
  export type ComponentSize = "xs" | "sm" | "md" | "lg";
4
- declare enum StringRules {
2762
+ /**
2763
+ * Generated by orval v7.9.0 🍺
2764
+ * Do not edit manually.
2765
+ * Entity Graph API
2766
+ * OpenAPI spec version: 1.0.0
2767
+ */
2768
+ /**
2769
+ * @pattern ^[1-9][0-9]*$
2770
+ */
2771
+ export type EntityId = string;
2772
+ /**
2773
+ * Generated by orval v7.9.0 🍺
2774
+ * Do not edit manually.
2775
+ * Entity Graph API
2776
+ * OpenAPI spec version: 1.0.0
2777
+ */
2778
+ export type EntityProperty = string | number;
2779
+ /**
2780
+ * Generated by orval v7.9.0 🍺
2781
+ * Do not edit manually.
2782
+ * Entity Graph API
2783
+ * OpenAPI spec version: 1.0.0
2784
+ */
2785
+ export type EntitySummaryScope = {
2786
+ [key: string]: string;
2787
+ };
2788
+ /**
2789
+ * Generated by orval v7.9.0 🍺
2790
+ * Do not edit manually.
2791
+ * Entity Graph API
2792
+ * OpenAPI spec version: 1.0.0
2793
+ */
2794
+ export type EntitySummaryProperties = {
2795
+ [key: string]: EntityProperty;
2796
+ };
2797
+ export interface EntityParent {
2798
+ id?: EntityId;
2799
+ name?: string;
2800
+ type?: string;
2801
+ }
2802
+ export interface Entity {
2803
+ id?: EntityId;
2804
+ type?: string;
2805
+ name?: string;
2806
+ active?: boolean;
2807
+ scope?: EntitySummaryScope;
2808
+ properties?: EntitySummaryProperties;
2809
+ connectedEntityTypes?: string[];
2810
+ parentEntity?: EntityParent;
2811
+ connectedEntities?: Entity[];
2812
+ }
2813
+ declare enum EntityFilterOperation {
2814
+ EQUALS = "eq",
2815
+ NOT_EQUALS = "neq",
2816
+ STARTS_WITH = "starts_with",
2817
+ CONTAINS = "contains",
2818
+ IsNull = "is_null"
2819
+ }
2820
+ export interface EntityFilterParameter {
2821
+ op: EntityFilterOperation;
2822
+ value: string | true | false;
2823
+ }
2824
+ export interface ScopeCriteria {
2825
+ env?: EntityFilterParameter[];
2826
+ site?: EntityFilterParameter[];
2827
+ namespace?: EntityFilterParameter[];
2828
+ }
2829
+ export declare enum StringRules {
5
2830
  EQUALS = "=",
6
2831
  NOT_EQUALS = "<>",
7
2832
  STARTS_WITH = "STARTS WITH",
@@ -9,7 +2834,7 @@ declare enum StringRules {
9
2834
  IS_NULL = "IS NULL",
10
2835
  IS_NOT_NULL = "IS NOT NULL"
11
2836
  }
12
- declare enum NumberRules {
2837
+ export declare enum NumberRules {
13
2838
  EQUALS = "=",
14
2839
  NOT_EQUALS = "<>",
15
2840
  GREATER = ">",
@@ -23,27 +2848,24 @@ export declare enum EntityPropertyTypes {
23
2848
  STRING = "String",
24
2849
  DOUBLE = "Double"
25
2850
  }
2851
+ export interface EntityFilterPropertyMatcher {
2852
+ id: number;
2853
+ name: string;
2854
+ value: string | number;
2855
+ op: StringRules | NumberRules;
2856
+ type: EntityPropertyTypes;
2857
+ uom?: string | null;
2858
+ }
26
2859
  export interface EntityAssertionsWidgetProps {
27
- query: {
28
- additionalMatchers?: {
29
- id: number;
30
- name: string;
31
- value: string | number;
32
- op: StringRules | NumberRules;
33
- type: EntityPropertyTypes;
34
- uom?: string | null;
35
- }[];
36
- enabled: boolean;
37
- matchAllNames?: boolean;
38
- entityName?: string;
39
- entityType?: string;
40
- start: number;
41
- end: number;
42
- scope?: Scope;
43
- };
2860
+ query: useMultipleEntitiesProps;
44
2861
  size?: ComponentSize;
45
2862
  source?: string;
46
2863
  }
2864
+ export interface useMultipleEntitiesProps extends UseEntityParams {
2865
+ additionalMatchers?: EntityFilterPropertyMatcher[];
2866
+ enabled: boolean;
2867
+ matchAllNames?: boolean;
2868
+ }
47
2869
  export interface UseEntityParams {
48
2870
  entityName?: string;
49
2871
  entityType?: string;
@@ -56,3 +2878,31 @@ export interface Scope {
56
2878
  site?: string;
57
2879
  namespace?: string;
58
2880
  }
2881
+ /********************** Entity Cross Link ***********/
2882
+ export declare enum EntityCrossLinkType {
2883
+ K8S_NODE = "k8s_node",
2884
+ EC2_INSTANCE = "ec2_instance",
2885
+ RDS_INSTANCE = "rds_instance",
2886
+ MYSQL_INSTANCE = "mysql_instance",
2887
+ UNKNOWN = "unknown"
2888
+ }
2889
+ export type DrawerViewProps = {
2890
+ entity: Entity;
2891
+ start: string;
2892
+ end: string;
2893
+ };
2894
+ export type ConnectedEntityType = {
2895
+ type: string;
2896
+ scopeCriteria?: ScopeCriteria;
2897
+ };
2898
+ export interface EntityCrossLinkWidgetProps {
2899
+ entityName?: string;
2900
+ entityType: string;
2901
+ start: string;
2902
+ end: string;
2903
+ connectToEntityTypes?: Array<ConnectedEntityType | string>;
2904
+ scopeCriteria?: ScopeCriteria;
2905
+ backTo?: string;
2906
+ onConnectedEntityClick?: (entity: Entity) => void;
2907
+ drawerView?: React$1.ComponentType<DrawerViewProps>;
2908
+ }