stagnate 1.0.7 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Component.d.ts +121 -0
- package/Component.js +206 -0
- package/Component.js.map +1 -0
- package/README.md +124 -47
- package/Slot.d.ts +33 -0
- package/Slot.js +60 -0
- package/Slot.js.map +1 -0
- package/{lib/index.d.ts → index.d.ts} +1 -2
- package/{lib/index.js → index.js} +0 -2
- package/index.js.map +1 -0
- package/{lib/jsx-runtime.d.ts → jsx-runtime.d.ts} +2 -1
- package/{lib/jsx-runtime.js → jsx-runtime.js} +18 -12
- package/jsx-runtime.js.map +1 -0
- package/package.json +7 -20
- package/types.d.ts +616 -0
- package/lib/Component.d.ts +0 -27
- package/lib/Component.js +0 -160
- package/lib/Component.js.map +0 -1
- package/lib/Slot.d.ts +0 -8
- package/lib/Slot.js +0 -32
- package/lib/Slot.js.map +0 -1
- package/lib/index.js.map +0 -1
- package/lib/jsx-runtime.js.map +0 -1
- package/lib/types.d.ts +0 -187
- /package/{lib/types.js → types.js} +0 -0
- /package/{lib/types.js.map → types.js.map} +0 -0
package/types.d.ts
ADDED
|
@@ -0,0 +1,616 @@
|
|
|
1
|
+
export type CollectableArray<T> = (CollectableArray<T> | T | undefined | null | false)[];
|
|
2
|
+
export type CollectableValue<T> = CollectableArray<T> | T | undefined | null | false;
|
|
3
|
+
export type RefererPolicy = "no-referrer" | "no-referrer-when-downgrade" | "origin" | "origin-when-cross-origin" | "same-origin" | "strict-origin" | "strict-origin-when-cross-origin" | "unsafe-url";
|
|
4
|
+
export type LinkTarget = "_self" | "_blank" | "_parent" | "_top";
|
|
5
|
+
export interface EventHandlers {
|
|
6
|
+
onAnimationCancel?: (ev: AnimationEvent) => void;
|
|
7
|
+
onAnimationEnd?: (ev: AnimationEvent) => void;
|
|
8
|
+
onAnimationIteration?: (ev: AnimationEvent) => void;
|
|
9
|
+
onAnimationStart?: (ev: AnimationEvent) => void;
|
|
10
|
+
onTransitionCancel?: (ev: TransitionEvent) => void;
|
|
11
|
+
onTransitionEnd?: (ev: TransitionEvent) => void;
|
|
12
|
+
onTransitionRun?: (ev: TransitionEvent) => void;
|
|
13
|
+
onTransitionStart?: (ev: TransitionEvent) => void;
|
|
14
|
+
onCopy?: (ev: ClipboardEvent) => void;
|
|
15
|
+
onCut?: (ev: ClipboardEvent) => void;
|
|
16
|
+
onPaste?: (ev: ClipboardEvent) => void;
|
|
17
|
+
onCompositionStart?: (ev: CompositionEvent) => void;
|
|
18
|
+
onCompositionUpdate?: (ev: CompositionEvent) => void;
|
|
19
|
+
onCompositionEnd?: (ev: CompositionEvent) => void;
|
|
20
|
+
onFocus?: (ev: FocusEvent) => void;
|
|
21
|
+
onBlur?: (ev: FocusEvent) => void;
|
|
22
|
+
onFocusIn?: (ev: FocusEvent) => void;
|
|
23
|
+
onFocusOut?: (ev: FocusEvent) => void;
|
|
24
|
+
onBeforeInput?: (ev: InputEvent) => void;
|
|
25
|
+
onChange?: (ev: InputEvent) => void;
|
|
26
|
+
onInput?: (ev: InputEvent) => void;
|
|
27
|
+
onInvalid?: (ev: Event) => void;
|
|
28
|
+
onReset?: (ev: Event) => void;
|
|
29
|
+
onSubmit?: (ev: SubmitEvent) => void;
|
|
30
|
+
onKeyDown?: (ev: KeyboardEvent) => void;
|
|
31
|
+
onKeyUp?: (ev: KeyboardEvent) => void;
|
|
32
|
+
onAuxClick?: (ev: MouseEvent) => void;
|
|
33
|
+
onClick?: (ev: MouseEvent) => void;
|
|
34
|
+
onContextMenu?: (ev: MouseEvent) => void;
|
|
35
|
+
onDblClick?: (ev: MouseEvent) => void;
|
|
36
|
+
onMouseDown?: (ev: MouseEvent) => void;
|
|
37
|
+
onMouseEnter?: (ev: MouseEvent) => void;
|
|
38
|
+
onMouseLeave?: (ev: MouseEvent) => void;
|
|
39
|
+
onMouseMove?: (ev: MouseEvent) => void;
|
|
40
|
+
onMouseOut?: (ev: MouseEvent) => void;
|
|
41
|
+
onMouseOver?: (ev: MouseEvent) => void;
|
|
42
|
+
onMouseUp?: (ev: MouseEvent) => void;
|
|
43
|
+
onWheel?: (ev: WheelEvent) => void;
|
|
44
|
+
onPointerCancel?: (ev: PointerEvent) => void;
|
|
45
|
+
onPointerDown?: (ev: PointerEvent) => void;
|
|
46
|
+
onPointerEnter?: (ev: PointerEvent) => void;
|
|
47
|
+
onPointerLeave?: (ev: PointerEvent) => void;
|
|
48
|
+
onPointerMove?: (ev: PointerEvent) => void;
|
|
49
|
+
onPointerOut?: (ev: PointerEvent) => void;
|
|
50
|
+
onPointerOver?: (ev: PointerEvent) => void;
|
|
51
|
+
onPointerUp?: (ev: PointerEvent) => void;
|
|
52
|
+
onGotPointerCapture?: (ev: PointerEvent) => void;
|
|
53
|
+
onLostPointerCapture?: (ev: PointerEvent) => void;
|
|
54
|
+
onDrag?: (ev: DragEvent) => void;
|
|
55
|
+
onDragEnd?: (ev: DragEvent) => void;
|
|
56
|
+
onDragEnter?: (ev: DragEvent) => void;
|
|
57
|
+
onDragLeave?: (ev: DragEvent) => void;
|
|
58
|
+
onDragOver?: (ev: DragEvent) => void;
|
|
59
|
+
onDragStart?: (ev: DragEvent) => void;
|
|
60
|
+
onDrop?: (ev: DragEvent) => void;
|
|
61
|
+
onCanPlay?: (ev: Event) => void;
|
|
62
|
+
onCanPlayThrough?: (ev: Event) => void;
|
|
63
|
+
onDurationChange?: (ev: Event) => void;
|
|
64
|
+
onEmptied?: (ev: Event) => void;
|
|
65
|
+
onEnded?: (ev: Event) => void;
|
|
66
|
+
onLoadedData?: (ev: Event) => void;
|
|
67
|
+
onLoadedMetadata?: (ev: Event) => void;
|
|
68
|
+
onLoadStart?: (ev: Event) => void;
|
|
69
|
+
onPause?: (ev: Event) => void;
|
|
70
|
+
onPlay?: (ev: Event) => void;
|
|
71
|
+
onPlaying?: (ev: Event) => void;
|
|
72
|
+
onRateChange?: (ev: Event) => void;
|
|
73
|
+
onSeeked?: (ev: Event) => void;
|
|
74
|
+
onSeeking?: (ev: Event) => void;
|
|
75
|
+
onStalled?: (ev: Event) => void;
|
|
76
|
+
onSuspend?: (ev: Event) => void;
|
|
77
|
+
onTimeUpdate?: (ev: Event) => void;
|
|
78
|
+
onVolumeChange?: (ev: Event) => void;
|
|
79
|
+
onWaiting?: (ev: Event) => void;
|
|
80
|
+
onClose?: (ev: Event) => void;
|
|
81
|
+
onError?: (ev: Event) => void;
|
|
82
|
+
onLoad?: (ev: Event) => void;
|
|
83
|
+
onResize?: (ev: UIEvent) => void;
|
|
84
|
+
onScroll?: (ev: Event) => void;
|
|
85
|
+
onToggle?: (ev: Event) => void;
|
|
86
|
+
}
|
|
87
|
+
export interface GlobalAttributes<T> extends EventHandlers {
|
|
88
|
+
ref?: (value: T) => void;
|
|
89
|
+
id?: string;
|
|
90
|
+
class?: CollectableValue<string>;
|
|
91
|
+
style?: Partial<CSSStyleDeclaration>;
|
|
92
|
+
title?: string;
|
|
93
|
+
tabIndex?: number;
|
|
94
|
+
innerHTML?: string;
|
|
95
|
+
accessKey?: string;
|
|
96
|
+
autoCapitalize?: "off" | "none" | "on" | "sentences" | "words" | "characters";
|
|
97
|
+
autoFocus?: boolean;
|
|
98
|
+
contentEditable?: "true" | "false" | "plaintext-only";
|
|
99
|
+
dir?: "ltr" | "rtl" | "auto";
|
|
100
|
+
draggable?: "true" | "false";
|
|
101
|
+
enterKeyHint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send";
|
|
102
|
+
hidden?: boolean;
|
|
103
|
+
inert?: boolean;
|
|
104
|
+
inputMode?: "none" | "text" | "decimal" | "numeric" | "tel" | "search" | "email" | "url";
|
|
105
|
+
lang?: string;
|
|
106
|
+
nonce?: string;
|
|
107
|
+
popover?: "auto" | "manual";
|
|
108
|
+
spellcheck?: "true" | "false";
|
|
109
|
+
translate?: "yes" | "no";
|
|
110
|
+
is?: string;
|
|
111
|
+
virtualKeyboardPolicy?: "auto" | "manual";
|
|
112
|
+
role?: string;
|
|
113
|
+
/** Web components / shadow DOM related */
|
|
114
|
+
slot?: string;
|
|
115
|
+
part?: string;
|
|
116
|
+
exportParts?: string;
|
|
117
|
+
/** Micro data */
|
|
118
|
+
itemId?: string;
|
|
119
|
+
itemProp?: string;
|
|
120
|
+
itemRef?: string;
|
|
121
|
+
itemScope?: boolean;
|
|
122
|
+
itemType?: string;
|
|
123
|
+
[key: `aria-${string}`]: string | number | undefined;
|
|
124
|
+
[key: `data-${string}`]: string | number | undefined;
|
|
125
|
+
}
|
|
126
|
+
export interface FormSubmitterAttributes {
|
|
127
|
+
form?: string;
|
|
128
|
+
formAction?: string;
|
|
129
|
+
formEncType?: "application/x-www-form-urlencoded" | "multipart/form-data" | "text/plain";
|
|
130
|
+
formMethod?: "get" | "post" | "dialog";
|
|
131
|
+
formNoValidate?: boolean;
|
|
132
|
+
formTarget?: LinkTarget;
|
|
133
|
+
}
|
|
134
|
+
export interface HTMLElementAttributes<T> extends GlobalAttributes<T> {
|
|
135
|
+
children?: CollectableValue<JSX.Element | string>;
|
|
136
|
+
}
|
|
137
|
+
export interface TextElementAttributes {
|
|
138
|
+
value?: string;
|
|
139
|
+
ref?: (value: Text) => void;
|
|
140
|
+
children?: CollectableValue<string>;
|
|
141
|
+
}
|
|
142
|
+
export interface ImageElementAttributes extends GlobalAttributes<HTMLImageElement> {
|
|
143
|
+
alt?: string;
|
|
144
|
+
src?: string;
|
|
145
|
+
srcSet?: string;
|
|
146
|
+
sizes?: string;
|
|
147
|
+
width?: number | string;
|
|
148
|
+
height?: number | string;
|
|
149
|
+
crossOrigin?: "anonymous" | "use-credentials";
|
|
150
|
+
decoding?: "sync" | "async" | "auto";
|
|
151
|
+
fetchPriority?: "high" | "low" | "auto";
|
|
152
|
+
isMap?: boolean;
|
|
153
|
+
useMap?: string;
|
|
154
|
+
loading?: "eager" | "lazy";
|
|
155
|
+
referrerPolicy?: RefererPolicy;
|
|
156
|
+
elementTiming?: string;
|
|
157
|
+
}
|
|
158
|
+
export interface AnchorElementAttributes extends GlobalAttributes<HTMLAnchorElement> {
|
|
159
|
+
href?: string;
|
|
160
|
+
target?: LinkTarget;
|
|
161
|
+
rel?: string;
|
|
162
|
+
hreflang?: string;
|
|
163
|
+
referrerPolicy?: RefererPolicy;
|
|
164
|
+
download?: boolean | string;
|
|
165
|
+
ping?: string;
|
|
166
|
+
type?: string;
|
|
167
|
+
children?: CollectableValue<JSX.Element | string>;
|
|
168
|
+
}
|
|
169
|
+
export interface InputElementAttributes extends GlobalAttributes<HTMLInputElement>, FormSubmitterAttributes {
|
|
170
|
+
type?: ("button" | "checkbox" | "color" | "date" | "datetime-local" | "email" | "file" | "hidden" | "image" | "month" | "number" | "password" | "radio" | "range" | "reset" | "search" | "submit" | "tel" | "text" | "time" | "url" | "week");
|
|
171
|
+
alt?: string;
|
|
172
|
+
checked?: boolean;
|
|
173
|
+
accept?: string;
|
|
174
|
+
capture?: boolean | "user" | "environment";
|
|
175
|
+
autocomplete?: string;
|
|
176
|
+
autoFocus?: boolean;
|
|
177
|
+
dirName?: string;
|
|
178
|
+
disabled?: boolean;
|
|
179
|
+
list?: string;
|
|
180
|
+
max?: number | string;
|
|
181
|
+
maxLength?: number;
|
|
182
|
+
min?: number | string;
|
|
183
|
+
minLength?: number;
|
|
184
|
+
multiple?: boolean;
|
|
185
|
+
name?: string;
|
|
186
|
+
pattern?: string;
|
|
187
|
+
placeholder?: string;
|
|
188
|
+
readonly?: boolean;
|
|
189
|
+
required?: boolean;
|
|
190
|
+
size?: number;
|
|
191
|
+
src?: string;
|
|
192
|
+
step?: number | "any";
|
|
193
|
+
width?: string | number;
|
|
194
|
+
height?: string | number;
|
|
195
|
+
value?: string | number;
|
|
196
|
+
inputMode?: "none" | "text" | "decimal" | "numeric" | "tel" | "search" | "email" | "url";
|
|
197
|
+
popoverTarget?: string;
|
|
198
|
+
popoverTargetAction?: "toggle" | "show" | "hide";
|
|
199
|
+
}
|
|
200
|
+
export interface TextAreaElementAttributes extends GlobalAttributes<HTMLTextAreaElement> {
|
|
201
|
+
cols?: number;
|
|
202
|
+
rows?: number;
|
|
203
|
+
autoFocus?: boolean;
|
|
204
|
+
disabled?: boolean;
|
|
205
|
+
maxLength?: number;
|
|
206
|
+
minLength?: number;
|
|
207
|
+
name?: string;
|
|
208
|
+
placeholder?: string;
|
|
209
|
+
readonly?: boolean;
|
|
210
|
+
required?: boolean;
|
|
211
|
+
value?: string;
|
|
212
|
+
wrap?: "hard" | "soft" | "off";
|
|
213
|
+
dirName?: string;
|
|
214
|
+
form?: string;
|
|
215
|
+
}
|
|
216
|
+
export interface SelectElementAttributes extends GlobalAttributes<HTMLSelectElement> {
|
|
217
|
+
autoFocus?: boolean;
|
|
218
|
+
disabled?: boolean;
|
|
219
|
+
form?: string;
|
|
220
|
+
multiple?: boolean;
|
|
221
|
+
name?: string;
|
|
222
|
+
required?: boolean;
|
|
223
|
+
size?: number;
|
|
224
|
+
autocomplete?: string;
|
|
225
|
+
value?: string | number | string[];
|
|
226
|
+
children?: CollectableValue<JSX.Element | string>;
|
|
227
|
+
}
|
|
228
|
+
export interface OptionElementAttributes extends GlobalAttributes<HTMLOptionElement> {
|
|
229
|
+
disabled?: boolean;
|
|
230
|
+
label?: string;
|
|
231
|
+
selected?: boolean;
|
|
232
|
+
value?: string;
|
|
233
|
+
children?: CollectableValue<string>;
|
|
234
|
+
}
|
|
235
|
+
export interface OptGroupElementAttributes extends GlobalAttributes<HTMLOptGroupElement> {
|
|
236
|
+
disabled?: boolean;
|
|
237
|
+
label?: string;
|
|
238
|
+
}
|
|
239
|
+
export interface LabelElementAttributes extends GlobalAttributes<HTMLLabelElement> {
|
|
240
|
+
for?: string;
|
|
241
|
+
form?: string;
|
|
242
|
+
}
|
|
243
|
+
export interface ButtonElementAttributes extends GlobalAttributes<HTMLButtonElement>, FormSubmitterAttributes {
|
|
244
|
+
autoFocus?: boolean;
|
|
245
|
+
disabled?: boolean;
|
|
246
|
+
name?: string;
|
|
247
|
+
type?: "button" | "submit" | "reset";
|
|
248
|
+
value?: string;
|
|
249
|
+
popoverTarget?: string;
|
|
250
|
+
popoverTargetAction?: "toggle" | "show" | "hide";
|
|
251
|
+
}
|
|
252
|
+
export interface FieldsetElementAttributes extends GlobalAttributes<HTMLFieldSetElement> {
|
|
253
|
+
disabled?: boolean;
|
|
254
|
+
form?: string;
|
|
255
|
+
name?: string;
|
|
256
|
+
}
|
|
257
|
+
export interface OutputElementAttributes extends GlobalAttributes<HTMLOutputElement> {
|
|
258
|
+
for?: string;
|
|
259
|
+
form?: string;
|
|
260
|
+
name?: string;
|
|
261
|
+
value?: string;
|
|
262
|
+
}
|
|
263
|
+
export interface ProgressElementAttributes extends GlobalAttributes<HTMLProgressElement> {
|
|
264
|
+
max?: number;
|
|
265
|
+
value?: number;
|
|
266
|
+
}
|
|
267
|
+
export interface MeterElementAttributes extends GlobalAttributes<HTMLMeterElement> {
|
|
268
|
+
value?: number;
|
|
269
|
+
min?: number;
|
|
270
|
+
max?: number;
|
|
271
|
+
low?: number;
|
|
272
|
+
high?: number;
|
|
273
|
+
optimum?: number;
|
|
274
|
+
form?: string;
|
|
275
|
+
}
|
|
276
|
+
export interface FormElementAttributes extends GlobalAttributes<HTMLFormElement> {
|
|
277
|
+
acceptCharset?: string;
|
|
278
|
+
action?: string;
|
|
279
|
+
autocomplete?: "on" | "off" | string;
|
|
280
|
+
encType?: "application/x-www-form-urlencoded" | "multipart/form-data" | "text/plain";
|
|
281
|
+
method?: "get" | "post" | "dialog";
|
|
282
|
+
name?: string;
|
|
283
|
+
noValidate?: boolean;
|
|
284
|
+
rel?: string;
|
|
285
|
+
target?: LinkTarget;
|
|
286
|
+
children?: CollectableValue<JSX.Element | string>;
|
|
287
|
+
}
|
|
288
|
+
export interface IframeElementAttributes extends GlobalAttributes<HTMLIFrameElement> {
|
|
289
|
+
src?: string;
|
|
290
|
+
srcDoc?: string;
|
|
291
|
+
name?: string;
|
|
292
|
+
allow?: string;
|
|
293
|
+
allowFullScreen?: boolean;
|
|
294
|
+
referrerPolicy?: RefererPolicy;
|
|
295
|
+
sandbox?: string;
|
|
296
|
+
loading?: "eager" | "lazy";
|
|
297
|
+
width?: number | string;
|
|
298
|
+
height?: number | string;
|
|
299
|
+
}
|
|
300
|
+
export interface SvgElementAttributes extends GlobalAttributes<SVGElement> {
|
|
301
|
+
viewBox?: string;
|
|
302
|
+
fill?: string;
|
|
303
|
+
width?: number | string;
|
|
304
|
+
height?: number | string;
|
|
305
|
+
children?: CollectableValue<JSX.Element | string>;
|
|
306
|
+
}
|
|
307
|
+
export interface AudioElementAttributes extends GlobalAttributes<HTMLAudioElement> {
|
|
308
|
+
src?: string;
|
|
309
|
+
autoPlay?: boolean;
|
|
310
|
+
controls?: boolean;
|
|
311
|
+
loop?: boolean;
|
|
312
|
+
muted?: boolean;
|
|
313
|
+
preload?: "none" | "metadata" | "auto" | true;
|
|
314
|
+
crossOrigin?: "anonymous" | "use-credentials";
|
|
315
|
+
controlsList?: string;
|
|
316
|
+
}
|
|
317
|
+
export interface VideoElementAttributes extends GlobalAttributes<HTMLVideoElement> {
|
|
318
|
+
src?: string;
|
|
319
|
+
autoPlay?: boolean;
|
|
320
|
+
controls?: boolean;
|
|
321
|
+
loop?: boolean;
|
|
322
|
+
muted?: boolean;
|
|
323
|
+
preload?: "none" | "metadata" | "auto" | true;
|
|
324
|
+
crossOrigin?: "anonymous" | "use-credentials";
|
|
325
|
+
controlsList?: string;
|
|
326
|
+
playsInline?: boolean;
|
|
327
|
+
width?: string | number;
|
|
328
|
+
height?: string | number;
|
|
329
|
+
poster?: string;
|
|
330
|
+
}
|
|
331
|
+
export interface SourceElementAttributes extends GlobalAttributes<HTMLSourceElement> {
|
|
332
|
+
src?: string;
|
|
333
|
+
type?: string;
|
|
334
|
+
media?: string;
|
|
335
|
+
srcSet?: string;
|
|
336
|
+
sizes?: string;
|
|
337
|
+
}
|
|
338
|
+
export interface TrackElementAttributes extends GlobalAttributes<HTMLTrackElement> {
|
|
339
|
+
default?: boolean;
|
|
340
|
+
kind?: "subtitles" | "captions" | "descriptions" | "chapters" | "metadata";
|
|
341
|
+
label?: string;
|
|
342
|
+
src?: string;
|
|
343
|
+
srcLang?: string;
|
|
344
|
+
}
|
|
345
|
+
export interface CanvasElementAttributes extends GlobalAttributes<HTMLCanvasElement> {
|
|
346
|
+
width?: string | number;
|
|
347
|
+
height?: string | number;
|
|
348
|
+
}
|
|
349
|
+
export interface MapElementAttributes extends GlobalAttributes<HTMLMapElement> {
|
|
350
|
+
name?: string;
|
|
351
|
+
}
|
|
352
|
+
export interface AreaElementAttributes extends GlobalAttributes<HTMLAreaElement> {
|
|
353
|
+
alt?: string;
|
|
354
|
+
coords?: string;
|
|
355
|
+
download?: boolean | string;
|
|
356
|
+
href?: string;
|
|
357
|
+
ping?: string;
|
|
358
|
+
referrerPolicy?: RefererPolicy;
|
|
359
|
+
rel?: string;
|
|
360
|
+
shape?: "rect" | "circle" | "poly" | "default";
|
|
361
|
+
target?: LinkTarget;
|
|
362
|
+
}
|
|
363
|
+
export interface ColGroupElementAttributes extends GlobalAttributes<HTMLTableColElement> {
|
|
364
|
+
span?: number;
|
|
365
|
+
}
|
|
366
|
+
export interface ColElementAttributes extends GlobalAttributes<HTMLTableColElement> {
|
|
367
|
+
span?: number;
|
|
368
|
+
}
|
|
369
|
+
export interface ThElementAttributes extends GlobalAttributes<HTMLTableCellElement> {
|
|
370
|
+
abbr?: string;
|
|
371
|
+
colSpan?: number;
|
|
372
|
+
rowSpan?: number;
|
|
373
|
+
headers?: string;
|
|
374
|
+
scope?: "row" | "col" | "rowgroup" | "colgroup" | "auto";
|
|
375
|
+
}
|
|
376
|
+
export interface TdElementAttributes extends GlobalAttributes<HTMLTableCellElement> {
|
|
377
|
+
colSpan?: number;
|
|
378
|
+
rowSpan?: number;
|
|
379
|
+
headers?: string;
|
|
380
|
+
}
|
|
381
|
+
export interface OlElementAttributes extends GlobalAttributes<HTMLOListElement> {
|
|
382
|
+
reversed?: boolean;
|
|
383
|
+
start?: number;
|
|
384
|
+
type?: "1" | "a" | "A" | "i" | "I";
|
|
385
|
+
}
|
|
386
|
+
export interface LiElementAttributes extends GlobalAttributes<HTMLLIElement> {
|
|
387
|
+
value?: number;
|
|
388
|
+
}
|
|
389
|
+
export interface BlockquoteElementAttributes extends GlobalAttributes<HTMLQuoteElement> {
|
|
390
|
+
cite?: string;
|
|
391
|
+
}
|
|
392
|
+
export interface QElementAttributes extends GlobalAttributes<HTMLQuoteElement> {
|
|
393
|
+
cite?: string;
|
|
394
|
+
}
|
|
395
|
+
export interface DataElementAttributes extends GlobalAttributes<HTMLDataElement> {
|
|
396
|
+
value?: string | number;
|
|
397
|
+
}
|
|
398
|
+
export interface TimeElementAttributes extends GlobalAttributes<HTMLTimeElement> {
|
|
399
|
+
dateTime?: string;
|
|
400
|
+
}
|
|
401
|
+
export interface DetailsElementAttributes extends GlobalAttributes<HTMLDetailsElement> {
|
|
402
|
+
open?: boolean;
|
|
403
|
+
}
|
|
404
|
+
export interface DialogElementAttributes extends GlobalAttributes<HTMLDialogElement> {
|
|
405
|
+
open?: boolean;
|
|
406
|
+
}
|
|
407
|
+
export interface LinkElementAttributes extends GlobalAttributes<HTMLLinkElement> {
|
|
408
|
+
as?: string;
|
|
409
|
+
crossOrigin?: "anonymous" | "use-credentials";
|
|
410
|
+
disabled?: boolean;
|
|
411
|
+
fetchPriority?: "high" | "low" | "auto";
|
|
412
|
+
href?: string;
|
|
413
|
+
imageSizes?: string;
|
|
414
|
+
imageSrcSet?: string;
|
|
415
|
+
integrity?: string;
|
|
416
|
+
media?: string;
|
|
417
|
+
referrerPolicy?: RefererPolicy;
|
|
418
|
+
rel?: string;
|
|
419
|
+
sizes?: string;
|
|
420
|
+
type?: string;
|
|
421
|
+
blocking?: "render";
|
|
422
|
+
}
|
|
423
|
+
export interface MetaElementAttributes extends GlobalAttributes<HTMLMetaElement> {
|
|
424
|
+
charset?: string;
|
|
425
|
+
content?: string;
|
|
426
|
+
httpEquiv?: string;
|
|
427
|
+
name?: string;
|
|
428
|
+
media?: string;
|
|
429
|
+
}
|
|
430
|
+
export interface BaseElementAttributes extends GlobalAttributes<HTMLBaseElement> {
|
|
431
|
+
href?: string;
|
|
432
|
+
target?: LinkTarget;
|
|
433
|
+
}
|
|
434
|
+
export interface ScriptElementAttributes extends GlobalAttributes<HTMLScriptElement> {
|
|
435
|
+
async?: boolean;
|
|
436
|
+
defer?: boolean;
|
|
437
|
+
crossOrigin?: "anonymous" | "use-credentials";
|
|
438
|
+
integrity?: string;
|
|
439
|
+
nonce?: string;
|
|
440
|
+
referrerPolicy?: RefererPolicy;
|
|
441
|
+
src?: string;
|
|
442
|
+
type?: string;
|
|
443
|
+
noModule?: boolean;
|
|
444
|
+
blocking?: "render";
|
|
445
|
+
}
|
|
446
|
+
export interface StyleElementAttributes extends GlobalAttributes<HTMLStyleElement> {
|
|
447
|
+
media?: string;
|
|
448
|
+
nonce?: string;
|
|
449
|
+
blocking?: "render";
|
|
450
|
+
}
|
|
451
|
+
export interface ObjectElementAttributes extends GlobalAttributes<HTMLObjectElement> {
|
|
452
|
+
data?: string;
|
|
453
|
+
type?: string;
|
|
454
|
+
name?: string;
|
|
455
|
+
width?: number | string;
|
|
456
|
+
height?: number | string;
|
|
457
|
+
useMap?: string;
|
|
458
|
+
form?: string;
|
|
459
|
+
typemustmatch?: boolean;
|
|
460
|
+
}
|
|
461
|
+
export interface EmbedElementAttributes extends GlobalAttributes<HTMLEmbedElement> {
|
|
462
|
+
src?: string;
|
|
463
|
+
type?: string;
|
|
464
|
+
width?: number | string;
|
|
465
|
+
height?: number | string;
|
|
466
|
+
}
|
|
467
|
+
export interface SlotElementAttributes extends GlobalAttributes<HTMLSlotElement> {
|
|
468
|
+
name?: string;
|
|
469
|
+
}
|
|
470
|
+
export interface TableElementAttributes extends GlobalAttributes<HTMLTableElement> {
|
|
471
|
+
sortable?: boolean;
|
|
472
|
+
}
|
|
473
|
+
export interface InsDelElementAttributes extends GlobalAttributes<HTMLModElement> {
|
|
474
|
+
cite?: string;
|
|
475
|
+
dateTime?: string;
|
|
476
|
+
}
|
|
477
|
+
export declare namespace JSX {
|
|
478
|
+
interface IntrinsicElements {
|
|
479
|
+
text: TextElementAttributes;
|
|
480
|
+
html: HTMLElementAttributes<HTMLHtmlElement>;
|
|
481
|
+
head: HTMLElementAttributes<HTMLHeadElement>;
|
|
482
|
+
base: BaseElementAttributes;
|
|
483
|
+
link: LinkElementAttributes;
|
|
484
|
+
meta: MetaElementAttributes;
|
|
485
|
+
style: StyleElementAttributes;
|
|
486
|
+
title: HTMLElementAttributes<HTMLTitleElement>;
|
|
487
|
+
body: HTMLElementAttributes<HTMLBodyElement>;
|
|
488
|
+
address: HTMLElementAttributes<HTMLElement>;
|
|
489
|
+
article: HTMLElementAttributes<HTMLElement>;
|
|
490
|
+
aside: HTMLElementAttributes<HTMLElement>;
|
|
491
|
+
footer: HTMLElementAttributes<HTMLElement>;
|
|
492
|
+
header: HTMLElementAttributes<HTMLElement>;
|
|
493
|
+
h1: HTMLElementAttributes<HTMLHeadingElement>;
|
|
494
|
+
h2: HTMLElementAttributes<HTMLHeadingElement>;
|
|
495
|
+
h3: HTMLElementAttributes<HTMLHeadingElement>;
|
|
496
|
+
h4: HTMLElementAttributes<HTMLHeadingElement>;
|
|
497
|
+
h5: HTMLElementAttributes<HTMLHeadingElement>;
|
|
498
|
+
h6: HTMLElementAttributes<HTMLHeadingElement>;
|
|
499
|
+
main: HTMLElementAttributes<HTMLElement>;
|
|
500
|
+
nav: HTMLElementAttributes<HTMLElement>;
|
|
501
|
+
section: HTMLElementAttributes<HTMLElement>;
|
|
502
|
+
blockquote: BlockquoteElementAttributes;
|
|
503
|
+
div: HTMLElementAttributes<HTMLDivElement>;
|
|
504
|
+
dl: HTMLElementAttributes<HTMLDListElement>;
|
|
505
|
+
dt: HTMLElementAttributes<HTMLElement>;
|
|
506
|
+
dd: HTMLElementAttributes<HTMLElement>;
|
|
507
|
+
figcaption: HTMLElementAttributes<HTMLElement>;
|
|
508
|
+
figure: HTMLElementAttributes<HTMLElement>;
|
|
509
|
+
hr: HTMLElementAttributes<HTMLHRElement>;
|
|
510
|
+
li: LiElementAttributes;
|
|
511
|
+
ol: OlElementAttributes;
|
|
512
|
+
p: HTMLElementAttributes<HTMLParagraphElement>;
|
|
513
|
+
pre: HTMLElementAttributes<HTMLPreElement>;
|
|
514
|
+
ul: HTMLElementAttributes<HTMLUListElement>;
|
|
515
|
+
a: AnchorElementAttributes;
|
|
516
|
+
abbr: HTMLElementAttributes<HTMLElement>;
|
|
517
|
+
b: HTMLElementAttributes<HTMLElement>;
|
|
518
|
+
bdi: HTMLElementAttributes<HTMLElement>;
|
|
519
|
+
bdo: HTMLElementAttributes<HTMLElement>;
|
|
520
|
+
br: HTMLElementAttributes<HTMLBRElement>;
|
|
521
|
+
cite: HTMLElementAttributes<HTMLElement>;
|
|
522
|
+
code: HTMLElementAttributes<HTMLElement>;
|
|
523
|
+
data: DataElementAttributes;
|
|
524
|
+
dfn: HTMLElementAttributes<HTMLElement>;
|
|
525
|
+
em: HTMLElementAttributes<HTMLElement>;
|
|
526
|
+
i: HTMLElementAttributes<HTMLElement>;
|
|
527
|
+
kbd: HTMLElementAttributes<HTMLElement>;
|
|
528
|
+
mark: HTMLElementAttributes<HTMLElement>;
|
|
529
|
+
q: QElementAttributes;
|
|
530
|
+
rp: HTMLElementAttributes<HTMLElement>;
|
|
531
|
+
rt: HTMLElementAttributes<HTMLElement>;
|
|
532
|
+
ruby: HTMLElementAttributes<HTMLElement>;
|
|
533
|
+
s: HTMLElementAttributes<HTMLElement>;
|
|
534
|
+
samp: HTMLElementAttributes<HTMLElement>;
|
|
535
|
+
small: HTMLElementAttributes<HTMLElement>;
|
|
536
|
+
span: HTMLElementAttributes<HTMLSpanElement>;
|
|
537
|
+
strong: HTMLElementAttributes<HTMLElement>;
|
|
538
|
+
sub: HTMLElementAttributes<HTMLElement>;
|
|
539
|
+
sup: HTMLElementAttributes<HTMLElement>;
|
|
540
|
+
time: TimeElementAttributes;
|
|
541
|
+
u: HTMLElementAttributes<HTMLElement>;
|
|
542
|
+
var: HTMLElementAttributes<HTMLElement>;
|
|
543
|
+
wbr: HTMLElementAttributes<HTMLBRElement>;
|
|
544
|
+
del: InsDelElementAttributes;
|
|
545
|
+
ins: InsDelElementAttributes;
|
|
546
|
+
img: ImageElementAttributes;
|
|
547
|
+
iframe: IframeElementAttributes;
|
|
548
|
+
embed: EmbedElementAttributes;
|
|
549
|
+
object: ObjectElementAttributes;
|
|
550
|
+
picture: GlobalAttributes<HTMLPictureElement>;
|
|
551
|
+
source: SourceElementAttributes;
|
|
552
|
+
track: TrackElementAttributes;
|
|
553
|
+
video: VideoElementAttributes;
|
|
554
|
+
audio: AudioElementAttributes;
|
|
555
|
+
map: MapElementAttributes;
|
|
556
|
+
area: AreaElementAttributes;
|
|
557
|
+
canvas: CanvasElementAttributes;
|
|
558
|
+
noscript: HTMLElementAttributes<HTMLElement>;
|
|
559
|
+
script: ScriptElementAttributes;
|
|
560
|
+
template: GlobalAttributes<HTMLTemplateElement>;
|
|
561
|
+
slot: SlotElementAttributes;
|
|
562
|
+
table: TableElementAttributes;
|
|
563
|
+
caption: HTMLElementAttributes<HTMLTableCaptionElement>;
|
|
564
|
+
colgroup: ColGroupElementAttributes;
|
|
565
|
+
col: ColElementAttributes;
|
|
566
|
+
tbody: HTMLElementAttributes<HTMLTableSectionElement>;
|
|
567
|
+
thead: HTMLElementAttributes<HTMLTableSectionElement>;
|
|
568
|
+
tfoot: HTMLElementAttributes<HTMLTableSectionElement>;
|
|
569
|
+
tr: HTMLElementAttributes<HTMLTableRowElement>;
|
|
570
|
+
th: ThElementAttributes;
|
|
571
|
+
td: TdElementAttributes;
|
|
572
|
+
form: FormElementAttributes;
|
|
573
|
+
label: LabelElementAttributes;
|
|
574
|
+
input: InputElementAttributes;
|
|
575
|
+
textarea: TextAreaElementAttributes;
|
|
576
|
+
select: SelectElementAttributes;
|
|
577
|
+
option: OptionElementAttributes;
|
|
578
|
+
optgroup: OptGroupElementAttributes;
|
|
579
|
+
button: ButtonElementAttributes;
|
|
580
|
+
fieldset: FieldsetElementAttributes;
|
|
581
|
+
legend: HTMLElementAttributes<HTMLLegendElement>;
|
|
582
|
+
output: OutputElementAttributes;
|
|
583
|
+
progress: ProgressElementAttributes;
|
|
584
|
+
meter: MeterElementAttributes;
|
|
585
|
+
datalist: HTMLElementAttributes<HTMLDataListElement>;
|
|
586
|
+
details: DetailsElementAttributes;
|
|
587
|
+
summary: HTMLElementAttributes<HTMLElement>;
|
|
588
|
+
dialog: DialogElementAttributes;
|
|
589
|
+
svg: SvgElementAttributes;
|
|
590
|
+
[key: `svg:${string}`]: GlobalAttributes<SVGElement> & Record<string, any>;
|
|
591
|
+
}
|
|
592
|
+
interface ElementChildrenAttribute {
|
|
593
|
+
children: {};
|
|
594
|
+
}
|
|
595
|
+
interface Element extends globalThis.Element {
|
|
596
|
+
}
|
|
597
|
+
interface ElementClass {
|
|
598
|
+
htmlRoot: Element | null;
|
|
599
|
+
}
|
|
600
|
+
interface IntrinsicClassAttributes<T> {
|
|
601
|
+
ref?: (value: T) => void;
|
|
602
|
+
}
|
|
603
|
+
interface ElementAttributesProperty {
|
|
604
|
+
props: {};
|
|
605
|
+
}
|
|
606
|
+
}
|
|
607
|
+
/** get props of an JSX element or component function / class */
|
|
608
|
+
export type ComponentProps<T extends keyof JSX.IntrinsicElements | {
|
|
609
|
+
props: any;
|
|
610
|
+
} | ((props: any) => any)> = T extends keyof JSX.IntrinsicElements ? JSX.IntrinsicElements[T] : (T extends {
|
|
611
|
+
props: any;
|
|
612
|
+
} ? T["props"] : (T extends (props: any) => any ? Parameters<T>[0] : never));
|
|
613
|
+
/** any value that can be used in JSX */
|
|
614
|
+
export type StagnateNode = CollectableValue<JSX.Element | string>;
|
|
615
|
+
/** the JSX element css class attribute */
|
|
616
|
+
export type ClassAttribute = CollectableValue<string>;
|
package/lib/Component.d.ts
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
export declare class Component<REFS = {}, PROPS = undefined, ROOT extends SVGElement | HTMLElement = SVGElement | HTMLElement> {
|
|
2
|
-
readonly props: PROPS extends undefined ? {} : PROPS;
|
|
3
|
-
private _components;
|
|
4
|
-
private _attached;
|
|
5
|
-
protected root: ROOT;
|
|
6
|
-
protected parent: Component<any, any>;
|
|
7
|
-
protected refs: REFS;
|
|
8
|
-
constructor(...props: PROPS extends undefined ? [] : [never]);
|
|
9
|
-
constructor(props: PROPS);
|
|
10
|
-
protected render(): Element | null;
|
|
11
|
-
protected ref<T extends keyof REFS | undefined = undefined>(key?: T): (x: REFS[NonNullable<T>] extends never ? any : REFS[NonNullable<T>]) => void;
|
|
12
|
-
_jsx(): Element;
|
|
13
|
-
replace(parent: Component<any, any>, target?: Element | Component<any, any> | null): void;
|
|
14
|
-
create(parent: Component<any, any>, target?: Element | Component<any, any> | null, before?: Element | Component<any, any> | number): void;
|
|
15
|
-
createOrphanized(target?: Element | null): void;
|
|
16
|
-
bind(parent: Component<any, any>, target?: Element): void;
|
|
17
|
-
destroy(): void;
|
|
18
|
-
protected attach(): void;
|
|
19
|
-
protected detach(): void;
|
|
20
|
-
get attached(): boolean;
|
|
21
|
-
get htmlRoot(): ROOT;
|
|
22
|
-
protected get components(): Readonly<Component<any, any, any>[]>;
|
|
23
|
-
protected onBeforeRender(): void;
|
|
24
|
-
protected onRender(): void;
|
|
25
|
-
protected onAttach(): void;
|
|
26
|
-
protected onDetach(): void;
|
|
27
|
-
}
|