@ktjs/router 0.19.0 → 0.20.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/dist/index.d.ts +1 -1268
- package/dist/index.iife.js +2 -1
- package/dist/index.legacy.js +2 -1
- package/dist/index.mjs +2 -1
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -156,1279 +156,12 @@ interface RouteMatch {
|
|
|
156
156
|
result: RouteConfig[];
|
|
157
157
|
}
|
|
158
158
|
|
|
159
|
-
type otherstring = string & {};
|
|
160
|
-
|
|
161
|
-
type RefChangeHandler<T> = (newValue: T, oldValue: T) => void;
|
|
162
|
-
declare class KTRef<T> {
|
|
163
|
-
/**
|
|
164
|
-
* Indicates that this is a KTRef instance
|
|
165
|
-
*/
|
|
166
|
-
isKT: boolean;
|
|
167
|
-
private _value;
|
|
168
|
-
private _onChanges;
|
|
169
|
-
constructor(_value: T, _onChanges: Array<RefChangeHandler<T>>);
|
|
170
|
-
/**
|
|
171
|
-
* If new value and old value are both nodes, the old one will be replaced in the DOM
|
|
172
|
-
*/
|
|
173
|
-
get value(): T;
|
|
174
|
-
set value(newValue: T);
|
|
175
|
-
addOnChange(callback: RefChangeHandler<T>): void;
|
|
176
|
-
removeOnChange(callback: RefChangeHandler<T>): boolean;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
// Base events available to all HTML elements
|
|
180
|
-
interface BaseAttr {
|
|
181
|
-
[k: string]: any;
|
|
182
|
-
|
|
183
|
-
// # base attributes
|
|
184
|
-
class?: string;
|
|
185
|
-
className?: string;
|
|
186
|
-
style?: string | Partial<CSSStyleDeclaration>;
|
|
187
|
-
|
|
188
|
-
// # Events
|
|
189
|
-
// Mouse events
|
|
190
|
-
'on:click'?: (ev: PointerEvent) => void;
|
|
191
|
-
'on:dblclick'?: (ev: PointerEvent) => void;
|
|
192
|
-
'on:mousedown'?: (ev: PointerEvent) => void;
|
|
193
|
-
'on:mouseup'?: (ev: MouseEvent) => void;
|
|
194
|
-
'on:mousemove'?: (ev: MouseEvent) => void;
|
|
195
|
-
'on:mouseenter'?: (ev: MouseEvent) => void;
|
|
196
|
-
'on:mouseleave'?: (ev: MouseEvent) => void;
|
|
197
|
-
'on:mouseover'?: (ev: MouseEvent) => void;
|
|
198
|
-
'on:mouseout'?: (ev: MouseEvent) => void;
|
|
199
|
-
'on:contextmenu'?: (ev: PointerEvent) => void;
|
|
200
|
-
|
|
201
|
-
// Keyboard events
|
|
202
|
-
'on:keydown'?: (ev: KeyboardEvent) => void;
|
|
203
|
-
'on:keyup'?: (ev: KeyboardEvent) => void;
|
|
204
|
-
'on:keypress'?: (ev: KeyboardEvent) => void;
|
|
205
|
-
|
|
206
|
-
// Focus events
|
|
207
|
-
'on:focus'?: (ev: FocusEvent) => void;
|
|
208
|
-
'on:blur'?: (ev: FocusEvent) => void;
|
|
209
|
-
'on:focusin'?: (ev: FocusEvent) => void;
|
|
210
|
-
'on:focusout'?: (ev: FocusEvent) => void;
|
|
211
|
-
|
|
212
|
-
// Input events
|
|
213
|
-
'on:input'?: (ev: Event) => void;
|
|
214
|
-
'on:change'?: (ev: Event) => void;
|
|
215
|
-
'on:beforeinput'?: (ev: InputEvent) => void;
|
|
216
|
-
|
|
217
|
-
// Drag events
|
|
218
|
-
'on:drag'?: (ev: DragEvent) => void;
|
|
219
|
-
'on:dragstart'?: (ev: DragEvent) => void;
|
|
220
|
-
'on:dragend'?: (ev: DragEvent) => void;
|
|
221
|
-
'on:dragenter'?: (ev: DragEvent) => void;
|
|
222
|
-
'on:dragleave'?: (ev: DragEvent) => void;
|
|
223
|
-
'on:dragover'?: (ev: DragEvent) => void;
|
|
224
|
-
'on:drop'?: (ev: DragEvent) => void;
|
|
225
|
-
|
|
226
|
-
// Clipboard events
|
|
227
|
-
'on:copy'?: (ev: ClipboardEvent) => void;
|
|
228
|
-
'on:cut'?: (ev: ClipboardEvent) => void;
|
|
229
|
-
'on:paste'?: (ev: ClipboardEvent) => void;
|
|
230
|
-
|
|
231
|
-
// Touch events
|
|
232
|
-
'on:touchstart'?: (ev: TouchEvent) => void;
|
|
233
|
-
'on:touchmove'?: (ev: TouchEvent) => void;
|
|
234
|
-
'on:touchend'?: (ev: TouchEvent) => void;
|
|
235
|
-
'on:touchcancel'?: (ev: TouchEvent) => void;
|
|
236
|
-
|
|
237
|
-
// Wheel event
|
|
238
|
-
'on:wheel'?: (ev: WheelEvent) => void;
|
|
239
|
-
|
|
240
|
-
// Animation events
|
|
241
|
-
'on:animationstart'?: (ev: AnimationEvent) => void;
|
|
242
|
-
'on:animationend'?: (ev: AnimationEvent) => void;
|
|
243
|
-
'on:animationiteration'?: (ev: AnimationEvent) => void;
|
|
244
|
-
|
|
245
|
-
// Transition events
|
|
246
|
-
'on:transitionstart'?: (ev: TransitionEvent) => void;
|
|
247
|
-
'on:transitionend'?: (ev: TransitionEvent) => void;
|
|
248
|
-
'on:transitionrun'?: (ev: TransitionEvent) => void;
|
|
249
|
-
'on:transitioncancel'?: (ev: TransitionEvent) => void;
|
|
250
|
-
|
|
251
|
-
// Pointer events
|
|
252
|
-
'on:pointerdown'?: (ev: PointerEvent) => void;
|
|
253
|
-
'on:pointerup'?: (ev: PointerEvent) => void;
|
|
254
|
-
'on:pointermove'?: (ev: PointerEvent) => void;
|
|
255
|
-
'on:pointerenter'?: (ev: PointerEvent) => void;
|
|
256
|
-
'on:pointerleave'?: (ev: PointerEvent) => void;
|
|
257
|
-
'on:pointerover'?: (ev: PointerEvent) => void;
|
|
258
|
-
'on:pointerout'?: (ev: PointerEvent) => void;
|
|
259
|
-
'on:pointercancel'?: (ev: PointerEvent) => void;
|
|
260
|
-
'on:gotpointercapture'?: (ev: PointerEvent) => void;
|
|
261
|
-
'on:lostpointercapture'?: (ev: PointerEvent) => void;
|
|
262
|
-
|
|
263
|
-
// Selection events
|
|
264
|
-
'on:select'?: (ev: Event) => void;
|
|
265
|
-
'on:selectstart'?: (ev: Event) => void;
|
|
266
|
-
|
|
267
|
-
// Scroll event
|
|
268
|
-
'on:scroll'?: (ev: Event) => void;
|
|
269
|
-
|
|
270
|
-
// Resize event
|
|
271
|
-
'on:resize'?: (ev: UIEvent) => void;
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
// Form-specific events
|
|
275
|
-
interface FormElementEvents {
|
|
276
|
-
'on:submit'?: (ev: SubmitEvent) => void;
|
|
277
|
-
'on:reset'?: (ev: Event) => void;
|
|
278
|
-
'on:invalid'?: (ev: Event) => void;
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
// Media-specific events
|
|
282
|
-
interface MediaElementEvents {
|
|
283
|
-
'on:play'?: (ev: Event) => void;
|
|
284
|
-
'on:pause'?: (ev: Event) => void;
|
|
285
|
-
'on:playing'?: (ev: Event) => void;
|
|
286
|
-
'on:ended'?: (ev: Event) => void;
|
|
287
|
-
'on:canplay'?: (ev: Event) => void;
|
|
288
|
-
'on:canplaythrough'?: (ev: Event) => void;
|
|
289
|
-
'on:durationchange'?: (ev: Event) => void;
|
|
290
|
-
'on:emptied'?: (ev: Event) => void;
|
|
291
|
-
'on:loadeddata'?: (ev: Event) => void;
|
|
292
|
-
'on:loadedmetadata'?: (ev: Event) => void;
|
|
293
|
-
'on:loadstart'?: (ev: Event) => void;
|
|
294
|
-
'on:progress'?: (ev: ProgressEvent) => void;
|
|
295
|
-
'on:ratechange'?: (ev: Event) => void;
|
|
296
|
-
'on:seeked'?: (ev: Event) => void;
|
|
297
|
-
'on:seeking'?: (ev: Event) => void;
|
|
298
|
-
'on:stalled'?: (ev: Event) => void;
|
|
299
|
-
'on:suspend'?: (ev: Event) => void;
|
|
300
|
-
'on:timeupdate'?: (ev: Event) => void;
|
|
301
|
-
'on:volumechange'?: (ev: Event) => void;
|
|
302
|
-
'on:waiting'?: (ev: Event) => void;
|
|
303
|
-
'on:abort'?: (ev: UIEvent) => void;
|
|
304
|
-
'on:error'?: (ev: ErrorEvent) => void;
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
// Details-specific events
|
|
308
|
-
interface DetailsElementEvents {
|
|
309
|
-
'on:toggle'?: (ev: Event) => void;
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
// Dialog-specific events
|
|
313
|
-
interface DialogElementEvents {
|
|
314
|
-
'on:cancel'?: (ev: Event) => void;
|
|
315
|
-
'on:close'?: (ev: Event) => void;
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
// Image-specific events
|
|
319
|
-
interface ImageElementEvents {
|
|
320
|
-
'on:load'?: (ev: Event) => void;
|
|
321
|
-
'on:error'?: (ev: ErrorEvent) => void;
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
interface AttributesMap {
|
|
325
|
-
// Anchor element
|
|
326
|
-
a: BaseAttr & {
|
|
327
|
-
download?: string;
|
|
328
|
-
href?: string;
|
|
329
|
-
hreflang?: string;
|
|
330
|
-
ping?: string;
|
|
331
|
-
referrerpolicy?:
|
|
332
|
-
| 'no-referrer'
|
|
333
|
-
| 'no-referrer-when-downgrade'
|
|
334
|
-
| 'origin'
|
|
335
|
-
| 'origin-when-cross-origin'
|
|
336
|
-
| 'same-origin'
|
|
337
|
-
| 'strict-origin'
|
|
338
|
-
| 'strict-origin-when-cross-origin'
|
|
339
|
-
| 'unsafe-url';
|
|
340
|
-
rel?: string;
|
|
341
|
-
target?: '_self' | '_blank' | '_parent' | '_top' | string;
|
|
342
|
-
type?: string;
|
|
343
|
-
};
|
|
344
|
-
|
|
345
|
-
// Area element
|
|
346
|
-
area: BaseAttr & {
|
|
347
|
-
alt?: string;
|
|
348
|
-
coords?: string;
|
|
349
|
-
download?: string;
|
|
350
|
-
href?: string;
|
|
351
|
-
ping?: string;
|
|
352
|
-
referrerpolicy?:
|
|
353
|
-
| 'no-referrer'
|
|
354
|
-
| 'no-referrer-when-downgrade'
|
|
355
|
-
| 'origin'
|
|
356
|
-
| 'origin-when-cross-origin'
|
|
357
|
-
| 'same-origin'
|
|
358
|
-
| 'strict-origin'
|
|
359
|
-
| 'strict-origin-when-cross-origin'
|
|
360
|
-
| 'unsafe-url';
|
|
361
|
-
rel?: string;
|
|
362
|
-
shape?: 'rect' | 'circle' | 'poly' | 'default';
|
|
363
|
-
target?: '_self' | '_blank' | '_parent' | '_top' | string;
|
|
364
|
-
};
|
|
365
|
-
|
|
366
|
-
// Audio element
|
|
367
|
-
audio: BaseAttr &
|
|
368
|
-
MediaElementEvents & {
|
|
369
|
-
autoplay?: boolean;
|
|
370
|
-
controls?: boolean;
|
|
371
|
-
crossorigin?: 'anonymous' | 'use-credentials' | '';
|
|
372
|
-
loop?: boolean;
|
|
373
|
-
muted?: boolean;
|
|
374
|
-
preload?: 'none' | 'metadata' | 'auto' | '';
|
|
375
|
-
src?: string;
|
|
376
|
-
};
|
|
377
|
-
|
|
378
|
-
// Base element
|
|
379
|
-
base: BaseAttr & {
|
|
380
|
-
href?: string;
|
|
381
|
-
target?: '_self' | '_blank' | '_parent' | '_top' | string;
|
|
382
|
-
};
|
|
383
|
-
|
|
384
|
-
// Body element
|
|
385
|
-
body: BaseAttr & {};
|
|
386
|
-
|
|
387
|
-
// BR element
|
|
388
|
-
br: BaseAttr & {};
|
|
389
|
-
|
|
390
|
-
// Button element
|
|
391
|
-
button: BaseAttr & {
|
|
392
|
-
disabled?: boolean;
|
|
393
|
-
form?: string;
|
|
394
|
-
formaction?: string;
|
|
395
|
-
formenctype?: 'application/x-www-form-urlencoded' | 'multipart/form-data' | 'text/plain';
|
|
396
|
-
formmethod?: 'get' | 'post' | 'dialog';
|
|
397
|
-
formnovalidate?: boolean;
|
|
398
|
-
formtarget?: '_self' | '_blank' | '_parent' | '_top' | string;
|
|
399
|
-
name?: string;
|
|
400
|
-
type?: 'submit' | 'reset' | 'button';
|
|
401
|
-
value?: string;
|
|
402
|
-
};
|
|
403
|
-
|
|
404
|
-
// Canvas element
|
|
405
|
-
canvas: BaseAttr & {
|
|
406
|
-
height?: number | string;
|
|
407
|
-
width?: number | string;
|
|
408
|
-
};
|
|
409
|
-
|
|
410
|
-
// Table caption element
|
|
411
|
-
caption: BaseAttr & {};
|
|
412
|
-
|
|
413
|
-
// Col element
|
|
414
|
-
col: BaseAttr & {
|
|
415
|
-
span?: number | string;
|
|
416
|
-
};
|
|
417
|
-
|
|
418
|
-
// Colgroup element
|
|
419
|
-
colgroup: BaseAttr & {
|
|
420
|
-
span?: number | string;
|
|
421
|
-
};
|
|
422
|
-
|
|
423
|
-
// Data element
|
|
424
|
-
data: BaseAttr & {
|
|
425
|
-
value?: string;
|
|
426
|
-
};
|
|
427
|
-
|
|
428
|
-
// Datalist element
|
|
429
|
-
datalist: BaseAttr & {};
|
|
430
|
-
|
|
431
|
-
// Del element
|
|
432
|
-
del: BaseAttr & {
|
|
433
|
-
cite?: string;
|
|
434
|
-
datetime?: string;
|
|
435
|
-
};
|
|
436
|
-
|
|
437
|
-
// Details element
|
|
438
|
-
details: BaseAttr &
|
|
439
|
-
DetailsElementEvents & {
|
|
440
|
-
open?: boolean;
|
|
441
|
-
};
|
|
442
|
-
|
|
443
|
-
// Dialog element
|
|
444
|
-
dialog: BaseAttr &
|
|
445
|
-
DialogElementEvents & {
|
|
446
|
-
open?: boolean;
|
|
447
|
-
};
|
|
448
|
-
|
|
449
|
-
// Embed element
|
|
450
|
-
embed: BaseAttr & {
|
|
451
|
-
height?: number | string;
|
|
452
|
-
src?: string;
|
|
453
|
-
type?: string;
|
|
454
|
-
width?: number | string;
|
|
455
|
-
};
|
|
456
|
-
|
|
457
|
-
// Fieldset element
|
|
458
|
-
fieldset: BaseAttr & {
|
|
459
|
-
disabled?: boolean;
|
|
460
|
-
form?: string;
|
|
461
|
-
name?: string;
|
|
462
|
-
};
|
|
463
|
-
|
|
464
|
-
// Form element
|
|
465
|
-
form: BaseAttr &
|
|
466
|
-
FormElementEvents & {
|
|
467
|
-
'accept-charset'?: string;
|
|
468
|
-
action?: string;
|
|
469
|
-
autocomplete?: 'on' | 'off';
|
|
470
|
-
enctype?: 'application/x-www-form-urlencoded' | 'multipart/form-data' | 'text/plain';
|
|
471
|
-
method?: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS' | 'CONNECT' | 'TRACE' | otherstring;
|
|
472
|
-
|
|
473
|
-
name?: string;
|
|
474
|
-
novalidate?: boolean;
|
|
475
|
-
target?: '_self' | '_blank' | '_parent' | '_top' | string;
|
|
476
|
-
};
|
|
477
|
-
|
|
478
|
-
// Head element
|
|
479
|
-
head: BaseAttr & {};
|
|
480
|
-
|
|
481
|
-
// HR element
|
|
482
|
-
hr: BaseAttr & {};
|
|
483
|
-
|
|
484
|
-
// HTML element
|
|
485
|
-
html: BaseAttr & {};
|
|
486
|
-
|
|
487
|
-
// IFrame element
|
|
488
|
-
iframe: BaseAttr &
|
|
489
|
-
ImageElementEvents & {
|
|
490
|
-
allow?: string;
|
|
491
|
-
allowfullscreen?: boolean;
|
|
492
|
-
allowpaymentrequest?: boolean;
|
|
493
|
-
height?: number | string;
|
|
494
|
-
loading?: 'eager' | 'lazy';
|
|
495
|
-
name?: string;
|
|
496
|
-
referrerpolicy?:
|
|
497
|
-
| 'no-referrer'
|
|
498
|
-
| 'no-referrer-when-downgrade'
|
|
499
|
-
| 'origin'
|
|
500
|
-
| 'origin-when-cross-origin'
|
|
501
|
-
| 'same-origin'
|
|
502
|
-
| 'strict-origin'
|
|
503
|
-
| 'strict-origin-when-cross-origin'
|
|
504
|
-
| 'unsafe-url';
|
|
505
|
-
sandbox?: string;
|
|
506
|
-
src?: string;
|
|
507
|
-
srcdoc?: string;
|
|
508
|
-
width?: number | string;
|
|
509
|
-
};
|
|
510
|
-
|
|
511
|
-
// Image element
|
|
512
|
-
img: BaseAttr &
|
|
513
|
-
ImageElementEvents & {
|
|
514
|
-
alt?: string;
|
|
515
|
-
crossorigin?: 'anonymous' | 'use-credentials' | '';
|
|
516
|
-
decoding?: 'sync' | 'async' | 'auto';
|
|
517
|
-
height?: number | string;
|
|
518
|
-
ismap?: boolean;
|
|
519
|
-
loading?: 'eager' | 'lazy';
|
|
520
|
-
referrerpolicy?:
|
|
521
|
-
| 'no-referrer'
|
|
522
|
-
| 'no-referrer-when-downgrade'
|
|
523
|
-
| 'origin'
|
|
524
|
-
| 'origin-when-cross-origin'
|
|
525
|
-
| 'same-origin'
|
|
526
|
-
| 'strict-origin'
|
|
527
|
-
| 'strict-origin-when-cross-origin'
|
|
528
|
-
| 'unsafe-url';
|
|
529
|
-
sizes?: string;
|
|
530
|
-
src?: string;
|
|
531
|
-
srcset?: string;
|
|
532
|
-
usemap?: string;
|
|
533
|
-
width?: number | string;
|
|
534
|
-
};
|
|
535
|
-
|
|
536
|
-
// Input element
|
|
537
|
-
input: BaseAttr & {
|
|
538
|
-
accept?: string;
|
|
539
|
-
alt?: string;
|
|
540
|
-
autocomplete?: string;
|
|
541
|
-
checked?: boolean;
|
|
542
|
-
dirname?: string;
|
|
543
|
-
disabled?: boolean;
|
|
544
|
-
form?: string;
|
|
545
|
-
formaction?: string;
|
|
546
|
-
formenctype?: 'application/x-www-form-urlencoded' | 'multipart/form-data' | 'text/plain';
|
|
547
|
-
formmethod?: 'get' | 'post';
|
|
548
|
-
formnovalidate?: boolean;
|
|
549
|
-
formtarget?: '_self' | '_blank' | '_parent' | '_top' | string;
|
|
550
|
-
height?: number | string;
|
|
551
|
-
list?: string;
|
|
552
|
-
max?: number | string;
|
|
553
|
-
maxlength?: number | string;
|
|
554
|
-
min?: number | string;
|
|
555
|
-
minlength?: number | string;
|
|
556
|
-
multiple?: boolean;
|
|
557
|
-
name?: string;
|
|
558
|
-
pattern?: string;
|
|
559
|
-
placeholder?: string;
|
|
560
|
-
readonly?: boolean;
|
|
561
|
-
required?: boolean;
|
|
562
|
-
size?: number | string;
|
|
563
|
-
src?: string;
|
|
564
|
-
step?: number | string;
|
|
565
|
-
type?:
|
|
566
|
-
| 'button'
|
|
567
|
-
| 'checkbox'
|
|
568
|
-
| 'color'
|
|
569
|
-
| 'date'
|
|
570
|
-
| 'datetime-local'
|
|
571
|
-
| 'email'
|
|
572
|
-
| 'file'
|
|
573
|
-
| 'hidden'
|
|
574
|
-
| 'image'
|
|
575
|
-
| 'month'
|
|
576
|
-
| 'number'
|
|
577
|
-
| 'password'
|
|
578
|
-
| 'radio'
|
|
579
|
-
| 'range'
|
|
580
|
-
| 'reset'
|
|
581
|
-
| 'search'
|
|
582
|
-
| 'submit'
|
|
583
|
-
| 'tel'
|
|
584
|
-
| 'text'
|
|
585
|
-
| 'time'
|
|
586
|
-
| 'url'
|
|
587
|
-
| 'week';
|
|
588
|
-
value?: string;
|
|
589
|
-
width?: number | string;
|
|
590
|
-
};
|
|
591
|
-
|
|
592
|
-
// Ins element
|
|
593
|
-
ins: BaseAttr & {
|
|
594
|
-
cite?: string;
|
|
595
|
-
datetime?: string;
|
|
596
|
-
};
|
|
597
|
-
|
|
598
|
-
// Label element
|
|
599
|
-
label: BaseAttr & {
|
|
600
|
-
for?: string;
|
|
601
|
-
};
|
|
602
|
-
|
|
603
|
-
// Legend element
|
|
604
|
-
legend: BaseAttr & {};
|
|
605
|
-
|
|
606
|
-
// LI element
|
|
607
|
-
li: BaseAttr & {
|
|
608
|
-
value?: number | string;
|
|
609
|
-
};
|
|
610
|
-
|
|
611
|
-
// Link element
|
|
612
|
-
link: BaseAttr &
|
|
613
|
-
ImageElementEvents & {
|
|
614
|
-
as?: string;
|
|
615
|
-
crossorigin?: 'anonymous' | 'use-credentials' | '';
|
|
616
|
-
disabled?: boolean;
|
|
617
|
-
href?: string;
|
|
618
|
-
hreflang?: string;
|
|
619
|
-
imagesizes?: string;
|
|
620
|
-
imagesrcset?: string;
|
|
621
|
-
integrity?: string;
|
|
622
|
-
media?: string;
|
|
623
|
-
referrerpolicy?:
|
|
624
|
-
| 'no-referrer'
|
|
625
|
-
| 'no-referrer-when-downgrade'
|
|
626
|
-
| 'origin'
|
|
627
|
-
| 'origin-when-cross-origin'
|
|
628
|
-
| 'same-origin'
|
|
629
|
-
| 'strict-origin'
|
|
630
|
-
| 'strict-origin-when-cross-origin'
|
|
631
|
-
| 'unsafe-url';
|
|
632
|
-
rel?: string;
|
|
633
|
-
sizes?: string;
|
|
634
|
-
type?: string;
|
|
635
|
-
};
|
|
636
|
-
|
|
637
|
-
// Map element
|
|
638
|
-
map: BaseAttr & {
|
|
639
|
-
name?: string;
|
|
640
|
-
};
|
|
641
|
-
|
|
642
|
-
// Menu element
|
|
643
|
-
menu: BaseAttr & {};
|
|
644
|
-
|
|
645
|
-
// Meta element
|
|
646
|
-
meta: BaseAttr & {
|
|
647
|
-
charset?: string;
|
|
648
|
-
content?: string;
|
|
649
|
-
'http-equiv'?: 'content-security-policy' | 'content-type' | 'default-style' | 'refresh' | string;
|
|
650
|
-
name?: string;
|
|
651
|
-
};
|
|
652
|
-
|
|
653
|
-
// Meter element
|
|
654
|
-
meter: BaseAttr & {
|
|
655
|
-
form?: string;
|
|
656
|
-
high?: number | string;
|
|
657
|
-
low?: number | string;
|
|
658
|
-
max?: number | string;
|
|
659
|
-
min?: number | string;
|
|
660
|
-
optimum?: number | string;
|
|
661
|
-
value?: number | string;
|
|
662
|
-
};
|
|
663
|
-
|
|
664
|
-
// Object element
|
|
665
|
-
object: BaseAttr &
|
|
666
|
-
ImageElementEvents & {
|
|
667
|
-
data?: string;
|
|
668
|
-
form?: string;
|
|
669
|
-
height?: number | string;
|
|
670
|
-
name?: string;
|
|
671
|
-
type?: string;
|
|
672
|
-
usemap?: string;
|
|
673
|
-
width?: number | string;
|
|
674
|
-
};
|
|
675
|
-
|
|
676
|
-
// OL element
|
|
677
|
-
ol: BaseAttr & {
|
|
678
|
-
reversed?: boolean;
|
|
679
|
-
start?: number | string;
|
|
680
|
-
type?: '1' | 'a' | 'A' | 'i' | 'I';
|
|
681
|
-
};
|
|
682
|
-
|
|
683
|
-
// Optgroup element
|
|
684
|
-
optgroup: BaseAttr & {
|
|
685
|
-
disabled?: boolean;
|
|
686
|
-
label?: string;
|
|
687
|
-
};
|
|
688
|
-
|
|
689
|
-
// Option element
|
|
690
|
-
option: BaseAttr & {
|
|
691
|
-
disabled?: boolean;
|
|
692
|
-
label?: string;
|
|
693
|
-
selected?: boolean;
|
|
694
|
-
value?: string;
|
|
695
|
-
};
|
|
696
|
-
|
|
697
|
-
// Output element
|
|
698
|
-
output: BaseAttr & {
|
|
699
|
-
for?: string;
|
|
700
|
-
form?: string;
|
|
701
|
-
name?: string;
|
|
702
|
-
};
|
|
703
|
-
|
|
704
|
-
// Picture element
|
|
705
|
-
picture: BaseAttr & {};
|
|
706
|
-
|
|
707
|
-
// Pre element
|
|
708
|
-
pre: BaseAttr & {};
|
|
709
|
-
|
|
710
|
-
// Progress element
|
|
711
|
-
progress: BaseAttr & {
|
|
712
|
-
max?: number | string;
|
|
713
|
-
value?: number | string;
|
|
714
|
-
};
|
|
715
|
-
|
|
716
|
-
// Quote element (q and blockquote)
|
|
717
|
-
q: BaseAttr & {
|
|
718
|
-
cite?: string;
|
|
719
|
-
};
|
|
720
|
-
|
|
721
|
-
blockquote: BaseAttr & {
|
|
722
|
-
cite?: string;
|
|
723
|
-
};
|
|
724
|
-
|
|
725
|
-
// Script element
|
|
726
|
-
script: BaseAttr &
|
|
727
|
-
ImageElementEvents & {
|
|
728
|
-
async?: boolean;
|
|
729
|
-
crossorigin?: 'anonymous' | 'use-credentials' | '';
|
|
730
|
-
defer?: boolean;
|
|
731
|
-
integrity?: string;
|
|
732
|
-
nomodule?: boolean;
|
|
733
|
-
referrerpolicy?:
|
|
734
|
-
| 'no-referrer'
|
|
735
|
-
| 'no-referrer-when-downgrade'
|
|
736
|
-
| 'origin'
|
|
737
|
-
| 'origin-when-cross-origin'
|
|
738
|
-
| 'same-origin'
|
|
739
|
-
| 'strict-origin'
|
|
740
|
-
| 'strict-origin-when-cross-origin'
|
|
741
|
-
| 'unsafe-url';
|
|
742
|
-
src?: string;
|
|
743
|
-
type?: string;
|
|
744
|
-
};
|
|
745
|
-
|
|
746
|
-
// Select element
|
|
747
|
-
select: BaseAttr & {
|
|
748
|
-
autocomplete?: string;
|
|
749
|
-
disabled?: boolean;
|
|
750
|
-
form?: string;
|
|
751
|
-
multiple?: boolean;
|
|
752
|
-
name?: string;
|
|
753
|
-
required?: boolean;
|
|
754
|
-
size?: number | string;
|
|
755
|
-
};
|
|
756
|
-
|
|
757
|
-
// Slot element
|
|
758
|
-
slot: BaseAttr & {
|
|
759
|
-
name?: string;
|
|
760
|
-
};
|
|
761
|
-
|
|
762
|
-
// Source element
|
|
763
|
-
source: BaseAttr & {
|
|
764
|
-
height?: number | string;
|
|
765
|
-
media?: string;
|
|
766
|
-
sizes?: string;
|
|
767
|
-
src?: string;
|
|
768
|
-
srcset?: string;
|
|
769
|
-
type?: string;
|
|
770
|
-
width?: number | string;
|
|
771
|
-
};
|
|
772
|
-
|
|
773
|
-
// Style element
|
|
774
|
-
style: BaseAttr &
|
|
775
|
-
ImageElementEvents & {
|
|
776
|
-
media?: string;
|
|
777
|
-
};
|
|
778
|
-
|
|
779
|
-
// Table element
|
|
780
|
-
table: BaseAttr & {};
|
|
781
|
-
|
|
782
|
-
// Table body/footer/header elements
|
|
783
|
-
tbody: BaseAttr & {};
|
|
784
|
-
|
|
785
|
-
tfoot: BaseAttr & {};
|
|
786
|
-
|
|
787
|
-
thead: BaseAttr & {};
|
|
788
|
-
|
|
789
|
-
// Table cell elements
|
|
790
|
-
td: BaseAttr & {
|
|
791
|
-
colspan?: number | string;
|
|
792
|
-
headers?: string;
|
|
793
|
-
rowspan?: number | string;
|
|
794
|
-
};
|
|
795
|
-
|
|
796
|
-
th: BaseAttr & {
|
|
797
|
-
abbr?: string;
|
|
798
|
-
colspan?: number | string;
|
|
799
|
-
headers?: string;
|
|
800
|
-
rowspan?: number | string;
|
|
801
|
-
scope?: 'row' | 'col' | 'rowgroup' | 'colgroup';
|
|
802
|
-
};
|
|
803
|
-
|
|
804
|
-
// Template element
|
|
805
|
-
template: BaseAttr & {};
|
|
806
|
-
|
|
807
|
-
// Textarea element
|
|
808
|
-
textarea: BaseAttr & {
|
|
809
|
-
autocomplete?: string;
|
|
810
|
-
cols?: number | string;
|
|
811
|
-
dirname?: string;
|
|
812
|
-
disabled?: boolean;
|
|
813
|
-
form?: string;
|
|
814
|
-
maxlength?: number | string;
|
|
815
|
-
minlength?: number | string;
|
|
816
|
-
name?: string;
|
|
817
|
-
placeholder?: string;
|
|
818
|
-
readonly?: boolean;
|
|
819
|
-
required?: boolean;
|
|
820
|
-
rows?: number | string;
|
|
821
|
-
wrap?: 'hard' | 'soft' | 'off';
|
|
822
|
-
};
|
|
823
|
-
|
|
824
|
-
// Time element
|
|
825
|
-
time: BaseAttr & {
|
|
826
|
-
datetime?: string;
|
|
827
|
-
};
|
|
828
|
-
|
|
829
|
-
// Title element
|
|
830
|
-
title: BaseAttr & {};
|
|
831
|
-
|
|
832
|
-
// TR element
|
|
833
|
-
tr: BaseAttr & {};
|
|
834
|
-
|
|
835
|
-
// Track element
|
|
836
|
-
track: BaseAttr & {
|
|
837
|
-
default?: boolean;
|
|
838
|
-
kind?: 'subtitles' | 'captions' | 'descriptions' | 'chapters' | 'metadata';
|
|
839
|
-
label?: string;
|
|
840
|
-
src?: string;
|
|
841
|
-
srclang?: string;
|
|
842
|
-
};
|
|
843
|
-
|
|
844
|
-
// UL element
|
|
845
|
-
ul: BaseAttr & {};
|
|
846
|
-
|
|
847
|
-
// Video element
|
|
848
|
-
video: BaseAttr &
|
|
849
|
-
MediaElementEvents & {
|
|
850
|
-
autoplay?: boolean;
|
|
851
|
-
controls?: boolean;
|
|
852
|
-
crossorigin?: 'anonymous' | 'use-credentials' | '';
|
|
853
|
-
height?: number | string;
|
|
854
|
-
loop?: boolean;
|
|
855
|
-
muted?: boolean;
|
|
856
|
-
playsinline?: boolean;
|
|
857
|
-
poster?: string;
|
|
858
|
-
preload?: 'none' | 'metadata' | 'auto' | '';
|
|
859
|
-
src?: string;
|
|
860
|
-
width?: number | string;
|
|
861
|
-
};
|
|
862
|
-
|
|
863
|
-
// Generic HTMLElement (no specific attributes beyond BaseEvent)
|
|
864
|
-
abbr: BaseAttr & {};
|
|
865
|
-
address: BaseAttr & {};
|
|
866
|
-
article: BaseAttr & {};
|
|
867
|
-
aside: BaseAttr & {};
|
|
868
|
-
b: BaseAttr & {};
|
|
869
|
-
bdi: BaseAttr & {};
|
|
870
|
-
bdo: BaseAttr & {};
|
|
871
|
-
cite: BaseAttr & {};
|
|
872
|
-
code: BaseAttr & {};
|
|
873
|
-
dd: BaseAttr & {};
|
|
874
|
-
dfn: BaseAttr & {};
|
|
875
|
-
div: BaseAttr & {};
|
|
876
|
-
dl: BaseAttr & {};
|
|
877
|
-
dt: BaseAttr & {};
|
|
878
|
-
em: BaseAttr & {};
|
|
879
|
-
figcaption: BaseAttr & {};
|
|
880
|
-
figure: BaseAttr & {};
|
|
881
|
-
footer: BaseAttr & {};
|
|
882
|
-
h1: BaseAttr & {};
|
|
883
|
-
h2: BaseAttr & {};
|
|
884
|
-
h3: BaseAttr & {};
|
|
885
|
-
h4: BaseAttr & {};
|
|
886
|
-
h5: BaseAttr & {};
|
|
887
|
-
h6: BaseAttr & {};
|
|
888
|
-
header: BaseAttr & {};
|
|
889
|
-
hgroup: BaseAttr & {};
|
|
890
|
-
i: BaseAttr & {};
|
|
891
|
-
kbd: BaseAttr & {};
|
|
892
|
-
main: BaseAttr & {};
|
|
893
|
-
mark: BaseAttr & {};
|
|
894
|
-
nav: BaseAttr & {};
|
|
895
|
-
noscript: BaseAttr & {};
|
|
896
|
-
p: BaseAttr & {};
|
|
897
|
-
rp: BaseAttr & {};
|
|
898
|
-
rt: BaseAttr & {};
|
|
899
|
-
ruby: BaseAttr & {};
|
|
900
|
-
s: BaseAttr & {};
|
|
901
|
-
samp: BaseAttr & {};
|
|
902
|
-
search: BaseAttr & {};
|
|
903
|
-
section: BaseAttr & {};
|
|
904
|
-
small: BaseAttr & {};
|
|
905
|
-
span: BaseAttr & {};
|
|
906
|
-
strong: BaseAttr & {};
|
|
907
|
-
sub: BaseAttr & {};
|
|
908
|
-
summary: BaseAttr & {};
|
|
909
|
-
sup: BaseAttr & {};
|
|
910
|
-
u: BaseAttr & {};
|
|
911
|
-
var: BaseAttr & {};
|
|
912
|
-
wbr: BaseAttr & {};
|
|
913
|
-
|
|
914
|
-
svg: BaseAttr & {
|
|
915
|
-
class?: string;
|
|
916
|
-
style?: string | Partial<CSSStyleDeclaration>;
|
|
917
|
-
width?: number | string;
|
|
918
|
-
height?: number | string;
|
|
919
|
-
viewBox?: string;
|
|
920
|
-
xmlns?: string;
|
|
921
|
-
fill?: string;
|
|
922
|
-
stroke?: string;
|
|
923
|
-
strokeWidth?: number | string;
|
|
924
|
-
strokeLinecap?: 'butt' | 'round' | 'square' | 'inherit';
|
|
925
|
-
strokeLinejoin?: 'miter' | 'round' | 'bevel' | 'inherit';
|
|
926
|
-
strokeDasharray?: string;
|
|
927
|
-
strokeDashoffset?: number | string;
|
|
928
|
-
opacity?: number | string;
|
|
929
|
-
preserveAspectRatio?: string;
|
|
930
|
-
transform?: string;
|
|
931
|
-
x?: number | string;
|
|
932
|
-
y?: number | string;
|
|
933
|
-
rx?: number | string;
|
|
934
|
-
ry?: number | string;
|
|
935
|
-
r?: number | string;
|
|
936
|
-
cx?: number | string;
|
|
937
|
-
cy?: number | string;
|
|
938
|
-
d?: string;
|
|
939
|
-
points?: string;
|
|
940
|
-
pathLength?: number | string;
|
|
941
|
-
viewbox?: string;
|
|
942
|
-
role?: string;
|
|
943
|
-
focusable?: boolean | 'true' | 'false';
|
|
944
|
-
xlinkHref?: string; // legacy xlink:href
|
|
945
|
-
};
|
|
946
|
-
}
|
|
947
|
-
|
|
948
|
-
interface SVGAttributesMap {
|
|
949
|
-
a: AttributesMap['svg'] & { href?: string; x?: number | string; y?: number | string };
|
|
950
|
-
animate: AttributesMap['svg'] & {
|
|
951
|
-
attributeName?: string;
|
|
952
|
-
from?: string | number;
|
|
953
|
-
to?: string | number;
|
|
954
|
-
dur?: string;
|
|
955
|
-
repeatCount?: string | number;
|
|
956
|
-
};
|
|
957
|
-
animateMotion: AttributesMap['svg'] & { path?: string; dur?: string; rotate?: string };
|
|
958
|
-
animateTransform: AttributesMap['svg'] & { type?: string; from?: string; to?: string; dur?: string };
|
|
959
|
-
circle: AttributesMap['svg'] & { cx?: number | string; cy?: number | string; r?: number | string };
|
|
960
|
-
clipPath: AttributesMap['svg'] & { clipPathUnits?: 'userSpaceOnUse' | 'objectBoundingBox' };
|
|
961
|
-
defs: AttributesMap['svg'];
|
|
962
|
-
desc: AttributesMap['svg'];
|
|
963
|
-
ellipse: AttributesMap['svg'] & {
|
|
964
|
-
cx?: number | string;
|
|
965
|
-
cy?: number | string;
|
|
966
|
-
rx?: number | string;
|
|
967
|
-
ry?: number | string;
|
|
968
|
-
};
|
|
969
|
-
|
|
970
|
-
// Filter primitives (provide common props)
|
|
971
|
-
feBlend: AttributesMap['svg'] & { in?: string; in2?: string; mode?: string };
|
|
972
|
-
feColorMatrix: AttributesMap['svg'] & {
|
|
973
|
-
type?: 'matrix' | 'saturate' | 'hueRotate' | 'luminanceToAlpha';
|
|
974
|
-
values?: string;
|
|
975
|
-
};
|
|
976
|
-
feComponentTransfer: AttributesMap['svg'] & {};
|
|
977
|
-
feComposite: AttributesMap['svg'] & {
|
|
978
|
-
in?: string;
|
|
979
|
-
in2?: string;
|
|
980
|
-
operator?: string;
|
|
981
|
-
k1?: number | string;
|
|
982
|
-
k2?: number | string;
|
|
983
|
-
k3?: number | string;
|
|
984
|
-
k4?: number | string;
|
|
985
|
-
};
|
|
986
|
-
feConvolveMatrix: AttributesMap['svg'] & {
|
|
987
|
-
order?: string | number;
|
|
988
|
-
kernelMatrix?: string;
|
|
989
|
-
divisor?: string | number;
|
|
990
|
-
bias?: string | number;
|
|
991
|
-
};
|
|
992
|
-
feDiffuseLighting: AttributesMap['svg'] & {};
|
|
993
|
-
feDisplacementMap: AttributesMap['svg'] & {
|
|
994
|
-
in?: string;
|
|
995
|
-
in2?: string;
|
|
996
|
-
scale?: number | string;
|
|
997
|
-
xChannelSelector?: string;
|
|
998
|
-
yChannelSelector?: string;
|
|
999
|
-
};
|
|
1000
|
-
feDistantLight: AttributesMap['svg'] & { azimuth?: number | string; elevation?: number | string };
|
|
1001
|
-
feDropShadow: AttributesMap['svg'] & {
|
|
1002
|
-
dx?: number | string;
|
|
1003
|
-
dy?: number | string;
|
|
1004
|
-
stdDeviation?: number | string;
|
|
1005
|
-
floodColor?: string;
|
|
1006
|
-
floodOpacity?: number | string;
|
|
1007
|
-
};
|
|
1008
|
-
feFlood: AttributesMap['svg'] & { floodColor?: string; floodOpacity?: number | string };
|
|
1009
|
-
feFuncA: AttributesMap['svg'] & {};
|
|
1010
|
-
feFuncB: AttributesMap['svg'] & {};
|
|
1011
|
-
feFuncG: AttributesMap['svg'] & {};
|
|
1012
|
-
feFuncR: AttributesMap['svg'] & {};
|
|
1013
|
-
feGaussianBlur: AttributesMap['svg'] & { stdDeviation?: number | string; edgeMode?: string };
|
|
1014
|
-
feImage: AttributesMap['svg'] & { href?: string };
|
|
1015
|
-
feMerge: AttributesMap['svg'] & {};
|
|
1016
|
-
feMergeNode: AttributesMap['svg'] & { in?: string };
|
|
1017
|
-
feMorphology: AttributesMap['svg'] & { operator?: 'erode' | 'dilate'; radius?: number | string };
|
|
1018
|
-
feOffset: AttributesMap['svg'] & { dx?: number | string; dy?: number | string };
|
|
1019
|
-
fePointLight: AttributesMap['svg'] & { x?: number | string; y?: number | string; z?: number | string };
|
|
1020
|
-
feSpecularLighting: AttributesMap['svg'] & {
|
|
1021
|
-
specularConstant?: number | string;
|
|
1022
|
-
specularExponent?: number | string;
|
|
1023
|
-
surfaceScale?: number | string;
|
|
1024
|
-
};
|
|
1025
|
-
feSpotLight: AttributesMap['svg'] & {
|
|
1026
|
-
x?: number | string;
|
|
1027
|
-
y?: number | string;
|
|
1028
|
-
z?: number | string;
|
|
1029
|
-
pointsAtX?: number | string;
|
|
1030
|
-
pointsAtY?: number | string;
|
|
1031
|
-
pointsAtZ?: number | string;
|
|
1032
|
-
specularExponent?: number | string;
|
|
1033
|
-
limitingConeAngle?: number | string;
|
|
1034
|
-
};
|
|
1035
|
-
feTile: AttributesMap['svg'] & {};
|
|
1036
|
-
feTurbulence: AttributesMap['svg'] & {
|
|
1037
|
-
baseFrequency?: number | string;
|
|
1038
|
-
numOctaves?: number | string;
|
|
1039
|
-
seed?: number | string;
|
|
1040
|
-
stitchTiles?: string;
|
|
1041
|
-
type?: 'fractalNoise' | 'turbulence';
|
|
1042
|
-
};
|
|
1043
|
-
|
|
1044
|
-
filter: AttributesMap['svg'] & {
|
|
1045
|
-
x?: number | string;
|
|
1046
|
-
y?: number | string;
|
|
1047
|
-
width?: number | string;
|
|
1048
|
-
height?: number | string;
|
|
1049
|
-
filterUnits?: string;
|
|
1050
|
-
primitiveUnits?: string;
|
|
1051
|
-
};
|
|
1052
|
-
foreignObject: AttributesMap['svg'] & {
|
|
1053
|
-
x?: number | string;
|
|
1054
|
-
y?: number | string;
|
|
1055
|
-
width?: number | string;
|
|
1056
|
-
height?: number | string;
|
|
1057
|
-
};
|
|
1058
|
-
g: AttributesMap['svg'];
|
|
1059
|
-
image: AttributesMap['svg'] & {
|
|
1060
|
-
href?: string;
|
|
1061
|
-
x?: number | string;
|
|
1062
|
-
y?: number | string;
|
|
1063
|
-
width?: number | string;
|
|
1064
|
-
height?: number | string;
|
|
1065
|
-
};
|
|
1066
|
-
line: AttributesMap['svg'] & {
|
|
1067
|
-
x1?: number | string;
|
|
1068
|
-
y1?: number | string;
|
|
1069
|
-
x2?: number | string;
|
|
1070
|
-
y2?: number | string;
|
|
1071
|
-
};
|
|
1072
|
-
linearGradient: AttributesMap['svg'] & {
|
|
1073
|
-
x1?: number | string;
|
|
1074
|
-
y1?: number | string;
|
|
1075
|
-
x2?: number | string;
|
|
1076
|
-
y2?: number | string;
|
|
1077
|
-
gradientUnits?: 'userSpaceOnUse' | 'objectBoundingBox';
|
|
1078
|
-
gradientTransform?: string;
|
|
1079
|
-
};
|
|
1080
|
-
marker: AttributesMap['svg'] & {
|
|
1081
|
-
markerUnits?: string;
|
|
1082
|
-
markerWidth?: number | string;
|
|
1083
|
-
markerHeight?: number | string;
|
|
1084
|
-
refX?: number | string;
|
|
1085
|
-
refY?: number | string;
|
|
1086
|
-
orient?: string;
|
|
1087
|
-
};
|
|
1088
|
-
mask: AttributesMap['svg'] & {
|
|
1089
|
-
maskUnits?: string;
|
|
1090
|
-
maskContentUnits?: string;
|
|
1091
|
-
x?: number | string;
|
|
1092
|
-
y?: number | string;
|
|
1093
|
-
width?: number | string;
|
|
1094
|
-
height?: number | string;
|
|
1095
|
-
};
|
|
1096
|
-
metadata: AttributesMap['svg'];
|
|
1097
|
-
mpath: AttributesMap['svg'] & { href?: string };
|
|
1098
|
-
path: AttributesMap['svg'] & { d?: string; pathLength?: number | string };
|
|
1099
|
-
pattern: AttributesMap['svg'] & {
|
|
1100
|
-
patternUnits?: string;
|
|
1101
|
-
patternContentUnits?: string;
|
|
1102
|
-
width?: number | string;
|
|
1103
|
-
height?: number | string;
|
|
1104
|
-
x?: number | string;
|
|
1105
|
-
y?: number | string;
|
|
1106
|
-
};
|
|
1107
|
-
polygon: AttributesMap['svg'] & { points?: string };
|
|
1108
|
-
polyline: AttributesMap['svg'] & { points?: string };
|
|
1109
|
-
radialGradient: AttributesMap['svg'] & {
|
|
1110
|
-
cx?: number | string;
|
|
1111
|
-
cy?: number | string;
|
|
1112
|
-
r?: number | string;
|
|
1113
|
-
fx?: number | string;
|
|
1114
|
-
fy?: number | string;
|
|
1115
|
-
gradientUnits?: 'userSpaceOnUse' | 'objectBoundingBox';
|
|
1116
|
-
gradientTransform?: string;
|
|
1117
|
-
};
|
|
1118
|
-
rect: AttributesMap['svg'] & {
|
|
1119
|
-
x?: number | string;
|
|
1120
|
-
y?: number | string;
|
|
1121
|
-
width?: number | string;
|
|
1122
|
-
height?: number | string;
|
|
1123
|
-
rx?: number | string;
|
|
1124
|
-
ry?: number | string;
|
|
1125
|
-
};
|
|
1126
|
-
script: AttributesMap['svg'] & { href?: string; type?: string };
|
|
1127
|
-
set: AttributesMap['svg'] & { attributeName?: string; to?: string | number; begin?: string; dur?: string };
|
|
1128
|
-
stop: AttributesMap['svg'] & { offset?: number | string; stopColor?: string; stopOpacity?: number | string };
|
|
1129
|
-
style: AttributesMap['svg'] & { media?: string };
|
|
1130
|
-
svg: AttributesMap['svg'];
|
|
1131
|
-
switch: AttributesMap['svg'];
|
|
1132
|
-
symbol: AttributesMap['svg'] & { viewBox?: string; preserveAspectRatio?: string };
|
|
1133
|
-
text: AttributesMap['svg'] & {
|
|
1134
|
-
x?: number | string;
|
|
1135
|
-
y?: number | string;
|
|
1136
|
-
dx?: number | string;
|
|
1137
|
-
dy?: number | string;
|
|
1138
|
-
textLength?: number | string;
|
|
1139
|
-
};
|
|
1140
|
-
textPath: AttributesMap['svg'] & { href?: string; startOffset?: number | string };
|
|
1141
|
-
title: AttributesMap['svg'];
|
|
1142
|
-
tspan: AttributesMap['svg'] & {
|
|
1143
|
-
x?: number | string;
|
|
1144
|
-
y?: number | string;
|
|
1145
|
-
dx?: number | string;
|
|
1146
|
-
dy?: number | string;
|
|
1147
|
-
};
|
|
1148
|
-
use: AttributesMap['svg'] & {
|
|
1149
|
-
href?: string;
|
|
1150
|
-
x?: number | string;
|
|
1151
|
-
y?: number | string;
|
|
1152
|
-
width?: number | string;
|
|
1153
|
-
height?: number | string;
|
|
1154
|
-
};
|
|
1155
|
-
view: AttributesMap['svg'] & { viewBox?: string; preserveAspectRatio?: string };
|
|
1156
|
-
}
|
|
1157
|
-
|
|
1158
|
-
type KTHTMLElement<El extends HTMLElement = HTMLElement> = El & {
|
|
1159
|
-
/**
|
|
1160
|
-
* Automically generate a redraw function if it is not provided
|
|
1161
|
-
* @param props
|
|
1162
|
-
*/
|
|
1163
|
-
redraw: (props?: KTAttribute, ...args: any[]) => KTHTMLElement;
|
|
1164
|
-
};
|
|
1165
|
-
|
|
1166
|
-
declare global {
|
|
1167
|
-
namespace JSX {
|
|
1168
|
-
type Element = KTHTMLElement;
|
|
1169
|
-
|
|
1170
|
-
interface IntrinsicElements {
|
|
1171
|
-
// Document-level & metadata
|
|
1172
|
-
html: AttributesMap['html'];
|
|
1173
|
-
head: AttributesMap['head'];
|
|
1174
|
-
title: AttributesMap['title'];
|
|
1175
|
-
base: AttributesMap['base'];
|
|
1176
|
-
link: AttributesMap['link'];
|
|
1177
|
-
meta: AttributesMap['meta'];
|
|
1178
|
-
|
|
1179
|
-
// Sectioning
|
|
1180
|
-
body: AttributesMap['body'];
|
|
1181
|
-
header: AttributesMap['header'];
|
|
1182
|
-
footer: AttributesMap['footer'];
|
|
1183
|
-
nav: AttributesMap['nav'];
|
|
1184
|
-
main: AttributesMap['main'];
|
|
1185
|
-
section: AttributesMap['section'];
|
|
1186
|
-
article: AttributesMap['article'];
|
|
1187
|
-
aside: AttributesMap['aside'];
|
|
1188
|
-
|
|
1189
|
-
// Headings
|
|
1190
|
-
h1: AttributesMap['h1'];
|
|
1191
|
-
h2: AttributesMap['h2'];
|
|
1192
|
-
h3: AttributesMap['h3'];
|
|
1193
|
-
h4: AttributesMap['h4'];
|
|
1194
|
-
h5: AttributesMap['h5'];
|
|
1195
|
-
h6: AttributesMap['h6'];
|
|
1196
|
-
|
|
1197
|
-
// Text content
|
|
1198
|
-
p: AttributesMap['p'];
|
|
1199
|
-
pre: AttributesMap['pre'];
|
|
1200
|
-
code: AttributesMap['code'];
|
|
1201
|
-
strong: AttributesMap['strong'];
|
|
1202
|
-
small: AttributesMap['small'];
|
|
1203
|
-
em: AttributesMap['em'];
|
|
1204
|
-
br: AttributesMap['br'];
|
|
1205
|
-
i: AttributesMap['i'];
|
|
1206
|
-
|
|
1207
|
-
// Lists
|
|
1208
|
-
ul: AttributesMap['ul'];
|
|
1209
|
-
ol: AttributesMap['ol'];
|
|
1210
|
-
li: AttributesMap['li'];
|
|
1211
|
-
|
|
1212
|
-
// Tables
|
|
1213
|
-
table: AttributesMap['table'];
|
|
1214
|
-
thead: AttributesMap['thead'];
|
|
1215
|
-
tbody: AttributesMap['tbody'];
|
|
1216
|
-
tfoot: AttributesMap['tfoot'];
|
|
1217
|
-
tr: AttributesMap['tr'];
|
|
1218
|
-
th: AttributesMap['th'];
|
|
1219
|
-
td: AttributesMap['td'];
|
|
1220
|
-
|
|
1221
|
-
// Forms
|
|
1222
|
-
form: AttributesMap['form'];
|
|
1223
|
-
label: AttributesMap['label'];
|
|
1224
|
-
input: AttributesMap['input'];
|
|
1225
|
-
textarea: AttributesMap['textarea'];
|
|
1226
|
-
select: AttributesMap['select'];
|
|
1227
|
-
option: AttributesMap['option'];
|
|
1228
|
-
optgroup: AttributesMap['optgroup'];
|
|
1229
|
-
button: AttributesMap['button'];
|
|
1230
|
-
fieldset: AttributesMap['fieldset'];
|
|
1231
|
-
legend: AttributesMap['legend'];
|
|
1232
|
-
datalist: AttributesMap['datalist'];
|
|
1233
|
-
output: AttributesMap['output'];
|
|
1234
|
-
|
|
1235
|
-
// Media & embedded
|
|
1236
|
-
img: AttributesMap['img'];
|
|
1237
|
-
picture: AttributesMap['picture'];
|
|
1238
|
-
source: AttributesMap['source'];
|
|
1239
|
-
audio: AttributesMap['audio'];
|
|
1240
|
-
video: AttributesMap['video'];
|
|
1241
|
-
track: AttributesMap['track'];
|
|
1242
|
-
iframe: AttributesMap['iframe'];
|
|
1243
|
-
embed: AttributesMap['embed'];
|
|
1244
|
-
object: AttributesMap['object'];
|
|
1245
|
-
canvas: AttributesMap['canvas'];
|
|
1246
|
-
|
|
1247
|
-
// Interactive & misc
|
|
1248
|
-
a: AttributesMap['a'] & SVGAttributesMap['a'];
|
|
1249
|
-
area: AttributesMap['area'];
|
|
1250
|
-
map: AttributesMap['map'];
|
|
1251
|
-
details: AttributesMap['details'];
|
|
1252
|
-
dialog: AttributesMap['dialog'];
|
|
1253
|
-
summary: AttributesMap['summary'];
|
|
1254
|
-
slot: AttributesMap['slot'];
|
|
1255
|
-
|
|
1256
|
-
// Scripting & styles
|
|
1257
|
-
script: AttributesMap['script'];
|
|
1258
|
-
style: AttributesMap['style'];
|
|
1259
|
-
|
|
1260
|
-
// Semantic & phrasing
|
|
1261
|
-
figure: AttributesMap['figure'];
|
|
1262
|
-
figcaption: AttributesMap['figcaption'];
|
|
1263
|
-
blockquote: AttributesMap['blockquote'];
|
|
1264
|
-
q: AttributesMap['q'];
|
|
1265
|
-
|
|
1266
|
-
// Generic elements
|
|
1267
|
-
div: AttributesMap['div'];
|
|
1268
|
-
span: AttributesMap['span'];
|
|
1269
|
-
address: AttributesMap['address'];
|
|
1270
|
-
abbr: AttributesMap['abbr'];
|
|
1271
|
-
b: AttributesMap['b'];
|
|
1272
|
-
cite: AttributesMap['cite'];
|
|
1273
|
-
dl: AttributesMap['dl'];
|
|
1274
|
-
dt: AttributesMap['dt'];
|
|
1275
|
-
dd: AttributesMap['dd'];
|
|
1276
|
-
hr: AttributesMap['hr'];
|
|
1277
|
-
|
|
1278
|
-
// SVG
|
|
1279
|
-
svg: AttributesMap['svg'];
|
|
1280
|
-
// a: SVGAttributesMap['a'];
|
|
1281
|
-
animate: SVGAttributesMap['animate'];
|
|
1282
|
-
animateMotion: SVGAttributesMap['animateMotion'];
|
|
1283
|
-
animateTransform: SVGAttributesMap['animateTransform'];
|
|
1284
|
-
circle: SVGAttributesMap['circle'];
|
|
1285
|
-
clipPath: SVGAttributesMap['clipPath'];
|
|
1286
|
-
defs: SVGAttributesMap['defs'];
|
|
1287
|
-
desc: SVGAttributesMap['desc'];
|
|
1288
|
-
ellipse: SVGAttributesMap['ellipse'];
|
|
1289
|
-
feBlend: SVGAttributesMap['feBlend'];
|
|
1290
|
-
feColorMatrix: SVGAttributesMap['feColorMatrix'];
|
|
1291
|
-
feComponentTransfer: SVGAttributesMap['feComponentTransfer'];
|
|
1292
|
-
feComposite: SVGAttributesMap['feComposite'];
|
|
1293
|
-
feConvolveMatrix: SVGAttributesMap['feConvolveMatrix'];
|
|
1294
|
-
feDiffuseLighting: SVGAttributesMap['feDiffuseLighting'];
|
|
1295
|
-
feDisplacementMap: SVGAttributesMap['feDisplacementMap'];
|
|
1296
|
-
feDistantLight: SVGAttributesMap['feDistantLight'];
|
|
1297
|
-
feDropShadow: SVGAttributesMap['feDropShadow'];
|
|
1298
|
-
feFlood: SVGAttributesMap['feFlood'];
|
|
1299
|
-
feFuncA: SVGAttributesMap['feFuncA'];
|
|
1300
|
-
feFuncB: SVGAttributesMap['feFuncB'];
|
|
1301
|
-
feFuncG: SVGAttributesMap['feFuncG'];
|
|
1302
|
-
feFuncR: SVGAttributesMap['feFuncR'];
|
|
1303
|
-
feGaussianBlur: SVGAttributesMap['feGaussianBlur'];
|
|
1304
|
-
feImage: SVGAttributesMap['feImage'];
|
|
1305
|
-
feMerge: SVGAttributesMap['feMerge'];
|
|
1306
|
-
feMergeNode: SVGAttributesMap['feMergeNode'];
|
|
1307
|
-
feMorphology: SVGAttributesMap['feMorphology'];
|
|
1308
|
-
feOffset: SVGAttributesMap['feOffset'];
|
|
1309
|
-
fePointLight: SVGAttributesMap['fePointLight'];
|
|
1310
|
-
feSpecularLighting: SVGAttributesMap['feSpecularLighting'];
|
|
1311
|
-
feSpotLight: SVGAttributesMap['feSpotLight'];
|
|
1312
|
-
feTile: SVGAttributesMap['feTile'];
|
|
1313
|
-
feTurbulence: SVGAttributesMap['feTurbulence'];
|
|
1314
|
-
filter: SVGAttributesMap['filter'];
|
|
1315
|
-
foreignObject: SVGAttributesMap['foreignObject'];
|
|
1316
|
-
g: SVGAttributesMap['g'];
|
|
1317
|
-
image: SVGAttributesMap['image'];
|
|
1318
|
-
line: SVGAttributesMap['line'];
|
|
1319
|
-
linearGradient: SVGAttributesMap['linearGradient'];
|
|
1320
|
-
marker: SVGAttributesMap['marker'];
|
|
1321
|
-
mask: SVGAttributesMap['mask'];
|
|
1322
|
-
metadata: SVGAttributesMap['metadata'];
|
|
1323
|
-
mpath: SVGAttributesMap['mpath'];
|
|
1324
|
-
path: SVGAttributesMap['path'];
|
|
1325
|
-
pattern: SVGAttributesMap['pattern'];
|
|
1326
|
-
polygon: SVGAttributesMap['polygon'];
|
|
1327
|
-
polyline: SVGAttributesMap['polyline'];
|
|
1328
|
-
radialGradient: SVGAttributesMap['radialGradient'];
|
|
1329
|
-
rect: SVGAttributesMap['rect'];
|
|
1330
|
-
set: SVGAttributesMap['set'];
|
|
1331
|
-
stop: SVGAttributesMap['stop'];
|
|
1332
|
-
switch: SVGAttributesMap['switch'];
|
|
1333
|
-
symbol: SVGAttributesMap['symbol'];
|
|
1334
|
-
text: SVGAttributesMap['text'];
|
|
1335
|
-
textPath: SVGAttributesMap['textPath'];
|
|
1336
|
-
tspan: SVGAttributesMap['tspan'];
|
|
1337
|
-
use: SVGAttributesMap['use'];
|
|
1338
|
-
view: SVGAttributesMap['view'];
|
|
1339
|
-
}
|
|
1340
|
-
|
|
1341
|
-
interface IntrinsicAttributes {
|
|
1342
|
-
ref?: KTRef<HTMLElement>;
|
|
1343
|
-
'k-if'?: any;
|
|
1344
|
-
children?: KTRawContent;
|
|
1345
|
-
}
|
|
1346
|
-
|
|
1347
|
-
interface ElementChildrenAttribute {
|
|
1348
|
-
children: {};
|
|
1349
|
-
}
|
|
1350
|
-
}
|
|
1351
|
-
}
|
|
1352
|
-
|
|
1353
|
-
type SingleContent = KTRef<any> | HTMLElement | Element | Node | string | number | boolean | null | undefined;
|
|
1354
|
-
type KTAvailableContent = SingleContent | KTAvailableContent[];
|
|
1355
|
-
type KTRawContent = KTAvailableContent | Promise<KTAvailableContent>;
|
|
1356
|
-
|
|
1357
|
-
/**
|
|
1358
|
-
* Used to create enhanced HTML elements
|
|
1359
|
-
*/
|
|
1360
|
-
interface KTBaseAttribute {
|
|
1361
|
-
[k: string]: any;
|
|
1362
|
-
|
|
1363
|
-
// # kt-specific attributes
|
|
1364
|
-
ref?: KTRef<KTHTMLElement>;
|
|
1365
|
-
'k-if'?: any;
|
|
1366
|
-
|
|
1367
|
-
// # normal HTML attributes
|
|
1368
|
-
id?: string;
|
|
1369
|
-
class?: string;
|
|
1370
|
-
className?: string;
|
|
1371
|
-
style?: string | Partial<CSSStyleDeclaration>;
|
|
1372
|
-
|
|
1373
|
-
type?:
|
|
1374
|
-
| 'text'
|
|
1375
|
-
| 'password'
|
|
1376
|
-
| 'email'
|
|
1377
|
-
| 'number'
|
|
1378
|
-
| 'tel'
|
|
1379
|
-
| 'url'
|
|
1380
|
-
| 'search'
|
|
1381
|
-
| 'date'
|
|
1382
|
-
| 'datetime-local'
|
|
1383
|
-
| 'time'
|
|
1384
|
-
| 'month'
|
|
1385
|
-
| 'week'
|
|
1386
|
-
| 'color'
|
|
1387
|
-
| 'range'
|
|
1388
|
-
| 'file'
|
|
1389
|
-
| 'checkbox'
|
|
1390
|
-
| 'radio'
|
|
1391
|
-
| 'hidden'
|
|
1392
|
-
| 'submit'
|
|
1393
|
-
| 'reset'
|
|
1394
|
-
| 'button'
|
|
1395
|
-
| 'image'
|
|
1396
|
-
| otherstring;
|
|
1397
|
-
for?: string;
|
|
1398
|
-
|
|
1399
|
-
name?: string;
|
|
1400
|
-
title?: string;
|
|
1401
|
-
placeholder?: string;
|
|
1402
|
-
contenteditable?: boolean;
|
|
1403
|
-
value?: any;
|
|
1404
|
-
valueAsDate?: Date;
|
|
1405
|
-
valueAsNumber?: number;
|
|
1406
|
-
label?: string;
|
|
1407
|
-
disabled?: boolean;
|
|
1408
|
-
|
|
1409
|
-
min?: string | number;
|
|
1410
|
-
max?: string | number;
|
|
1411
|
-
step?: string | number;
|
|
1412
|
-
|
|
1413
|
-
selected?: boolean;
|
|
1414
|
-
checked?: boolean;
|
|
1415
|
-
|
|
1416
|
-
action?: string;
|
|
1417
|
-
method?: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS' | 'CONNECT' | 'TRACE' | otherstring;
|
|
1418
|
-
}
|
|
1419
|
-
|
|
1420
|
-
type KTPrefixedEventHandlers = {
|
|
1421
|
-
[EventName in keyof HTMLElementEventMap as `on:${EventName}`]?: (ev: HTMLElementEventMap[EventName]) => void;
|
|
1422
|
-
};
|
|
1423
|
-
|
|
1424
|
-
type KTAttribute = KTBaseAttribute & KTPrefixedEventHandlers;
|
|
1425
|
-
|
|
1426
159
|
/**
|
|
1427
160
|
* Create a router view container that automatically renders route components
|
|
1428
161
|
*/
|
|
1429
162
|
declare function KTRouter({ router }: {
|
|
1430
163
|
router: Router;
|
|
1431
|
-
}):
|
|
164
|
+
}): JSX.Element;
|
|
1432
165
|
|
|
1433
166
|
/**
|
|
1434
167
|
* Create a new router instance
|
package/dist/index.iife.js
CHANGED
|
@@ -13,6 +13,7 @@ var __ktjs_router__ = (function (exports) {
|
|
|
13
13
|
* Default empty function
|
|
14
14
|
*/
|
|
15
15
|
const $emptyFn = (() => true);
|
|
16
|
+
const { get: $buttonDisabledGetter, set: $buttonDisabledSetter } = Object.getOwnPropertyDescriptor(HTMLButtonElement.prototype, 'disabled');
|
|
16
17
|
|
|
17
18
|
/**
|
|
18
19
|
* Normalize path by joining parts and ensuring leading slash
|
|
@@ -89,7 +90,7 @@ var __ktjs_router__ = (function (exports) {
|
|
|
89
90
|
|
|
90
91
|
// Shared utilities and cached native methods for kt.js framework
|
|
91
92
|
// Re-export all utilities
|
|
92
|
-
Object.defineProperty(window, '@ktjs/shared', { value: '0.
|
|
93
|
+
Object.defineProperty(window, '@ktjs/shared', { value: '0.20.0' });
|
|
93
94
|
|
|
94
95
|
/**
|
|
95
96
|
* Route matcher for finding matching routes and extracting params
|
package/dist/index.legacy.js
CHANGED
|
@@ -94,6 +94,7 @@ var __ktjs_router__ = (function (exports) {
|
|
|
94
94
|
* Default empty function
|
|
95
95
|
*/
|
|
96
96
|
const $emptyFn = (() => true);
|
|
97
|
+
const { get: $buttonDisabledGetter, set: $buttonDisabledSetter } = Object.getOwnPropertyDescriptor(HTMLButtonElement.prototype, 'disabled');
|
|
97
98
|
|
|
98
99
|
/**
|
|
99
100
|
* Normalize path by joining parts and ensuring leading slash
|
|
@@ -170,7 +171,7 @@ var __ktjs_router__ = (function (exports) {
|
|
|
170
171
|
|
|
171
172
|
// Shared utilities and cached native methods for kt.js framework
|
|
172
173
|
// Re-export all utilities
|
|
173
|
-
Object.defineProperty(window, '@ktjs/shared', { value: '0.
|
|
174
|
+
Object.defineProperty(window, '@ktjs/shared', { value: '0.20.0' });
|
|
174
175
|
|
|
175
176
|
/**
|
|
176
177
|
* Route matcher for finding matching routes and extracting params
|
package/dist/index.mjs
CHANGED
|
@@ -10,6 +10,7 @@ const $throw = (message) => {
|
|
|
10
10
|
* Default empty function
|
|
11
11
|
*/
|
|
12
12
|
const $emptyFn = (() => true);
|
|
13
|
+
const { get: $buttonDisabledGetter, set: $buttonDisabledSetter } = Object.getOwnPropertyDescriptor(HTMLButtonElement.prototype, 'disabled');
|
|
13
14
|
|
|
14
15
|
/**
|
|
15
16
|
* Normalize path by joining parts and ensuring leading slash
|
|
@@ -86,7 +87,7 @@ const extractParams = (pattern, path) => {
|
|
|
86
87
|
|
|
87
88
|
// Shared utilities and cached native methods for kt.js framework
|
|
88
89
|
// Re-export all utilities
|
|
89
|
-
Object.defineProperty(window, '@ktjs/shared', { value: '0.
|
|
90
|
+
Object.defineProperty(window, '@ktjs/shared', { value: '0.20.0' });
|
|
90
91
|
|
|
91
92
|
/**
|
|
92
93
|
* Route matcher for finding matching routes and extracting params
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ktjs/router",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.20.0",
|
|
4
4
|
"description": "Router for kt.js - client-side routing with navigation guards",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
"directory": "packages/router"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@ktjs/core": "0.
|
|
35
|
-
"@ktjs/shared": "0.
|
|
34
|
+
"@ktjs/core": "0.20.0",
|
|
35
|
+
"@ktjs/shared": "0.20.0"
|
|
36
36
|
},
|
|
37
37
|
"scripts": {
|
|
38
38
|
"build": "rollup -c rollup.config.mjs",
|