@ktjs/core 0.31.3 → 0.31.6
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 +404 -357
- package/dist/index.mjs +13 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -2,20 +2,23 @@ import { otherstring, HTMLTag, SVGTag, MathMLTag, JSXTag } from '@ktjs/shared';
|
|
|
2
2
|
export { HTMLTag, InputElementTag, MathMLTag, SVGTag } from '@ktjs/shared';
|
|
3
3
|
|
|
4
4
|
// Base events available to all HTML elements
|
|
5
|
-
type BaseAttr = KTPrefixedEventAttribute &
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
type BaseAttr = KTPrefixedEventAttribute & {
|
|
6
|
+
[k: string]: KTMaybeReactive<any>;
|
|
7
|
+
[k: `on:${string}`]: ((...args: any[]) => any) | undefined;
|
|
8
|
+
} & KTMaybeReactiveProps<{
|
|
9
9
|
// # base attributes
|
|
10
|
+
id?: string;
|
|
11
|
+
name?: string;
|
|
10
12
|
class?: string;
|
|
11
13
|
className?: string;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
+
}> & {
|
|
15
|
+
style?: string | Partial<CSSStyleDeclaration> | KTReactify<string> | KTReactify<Partial<CSSStyleDeclaration>>;
|
|
16
|
+
};
|
|
14
17
|
|
|
15
18
|
interface AttributesMap {
|
|
16
19
|
// Anchor element
|
|
17
20
|
a: BaseAttr &
|
|
18
|
-
|
|
21
|
+
KTMaybeReactiveProps<{
|
|
19
22
|
download?: string;
|
|
20
23
|
href?: string;
|
|
21
24
|
hreflang?: string;
|
|
@@ -36,7 +39,7 @@ interface AttributesMap {
|
|
|
36
39
|
|
|
37
40
|
// Area element
|
|
38
41
|
area: BaseAttr &
|
|
39
|
-
|
|
42
|
+
KTMaybeReactiveProps<{
|
|
40
43
|
alt?: string;
|
|
41
44
|
coords?: string;
|
|
42
45
|
download?: string;
|
|
@@ -58,7 +61,7 @@ interface AttributesMap {
|
|
|
58
61
|
|
|
59
62
|
// Audio element
|
|
60
63
|
audio: BaseAttr &
|
|
61
|
-
|
|
64
|
+
KTMaybeReactiveProps<{
|
|
62
65
|
autoplay?: boolean;
|
|
63
66
|
controls?: boolean;
|
|
64
67
|
crossorigin?: 'anonymous' | 'use-credentials' | '';
|
|
@@ -70,20 +73,20 @@ interface AttributesMap {
|
|
|
70
73
|
|
|
71
74
|
// Base element
|
|
72
75
|
base: BaseAttr &
|
|
73
|
-
|
|
76
|
+
KTMaybeReactiveProps<{
|
|
74
77
|
href?: string;
|
|
75
78
|
target?: '_self' | '_blank' | '_parent' | '_top' | string;
|
|
76
79
|
}>;
|
|
77
80
|
|
|
78
81
|
// Body element
|
|
79
|
-
body: BaseAttr &
|
|
82
|
+
body: BaseAttr & KTMaybeReactiveProps<{}>;
|
|
80
83
|
|
|
81
84
|
// BR element
|
|
82
|
-
br: BaseAttr &
|
|
85
|
+
br: BaseAttr & KTMaybeReactiveProps<{}>;
|
|
83
86
|
|
|
84
87
|
// Button element
|
|
85
88
|
button: BaseAttr &
|
|
86
|
-
|
|
89
|
+
KTMaybeReactiveProps<{
|
|
87
90
|
disabled?: boolean;
|
|
88
91
|
form?: string;
|
|
89
92
|
formaction?: string;
|
|
@@ -98,57 +101,57 @@ interface AttributesMap {
|
|
|
98
101
|
|
|
99
102
|
// Canvas element
|
|
100
103
|
canvas: BaseAttr &
|
|
101
|
-
|
|
104
|
+
KTMaybeReactiveProps<{
|
|
102
105
|
height?: number | string;
|
|
103
106
|
width?: number | string;
|
|
104
107
|
}>;
|
|
105
108
|
|
|
106
109
|
// Table caption element
|
|
107
|
-
caption: BaseAttr &
|
|
110
|
+
caption: BaseAttr & KTMaybeReactiveProps<{}>;
|
|
108
111
|
|
|
109
112
|
// Col element
|
|
110
113
|
col: BaseAttr &
|
|
111
|
-
|
|
114
|
+
KTMaybeReactiveProps<{
|
|
112
115
|
span?: number | string;
|
|
113
116
|
}>;
|
|
114
117
|
|
|
115
118
|
// Colgroup element
|
|
116
119
|
colgroup: BaseAttr &
|
|
117
|
-
|
|
120
|
+
KTMaybeReactiveProps<{
|
|
118
121
|
span?: number | string;
|
|
119
122
|
}>;
|
|
120
123
|
|
|
121
124
|
// Data element
|
|
122
125
|
data: BaseAttr &
|
|
123
|
-
|
|
126
|
+
KTMaybeReactiveProps<{
|
|
124
127
|
value?: string;
|
|
125
128
|
}>;
|
|
126
129
|
|
|
127
130
|
// Datalist element
|
|
128
|
-
datalist: BaseAttr &
|
|
131
|
+
datalist: BaseAttr & KTMaybeReactiveProps<{}>;
|
|
129
132
|
|
|
130
133
|
// Del element
|
|
131
134
|
del: BaseAttr &
|
|
132
|
-
|
|
135
|
+
KTMaybeReactiveProps<{
|
|
133
136
|
cite?: string;
|
|
134
137
|
datetime?: string;
|
|
135
138
|
}>;
|
|
136
139
|
|
|
137
140
|
// Details element
|
|
138
141
|
details: BaseAttr &
|
|
139
|
-
|
|
142
|
+
KTMaybeReactiveProps<{
|
|
140
143
|
open?: boolean;
|
|
141
144
|
}>;
|
|
142
145
|
|
|
143
146
|
// Dialog element
|
|
144
147
|
dialog: BaseAttr &
|
|
145
|
-
|
|
148
|
+
KTMaybeReactiveProps<{
|
|
146
149
|
open?: boolean;
|
|
147
150
|
}>;
|
|
148
151
|
|
|
149
152
|
// Embed element
|
|
150
153
|
embed: BaseAttr &
|
|
151
|
-
|
|
154
|
+
KTMaybeReactiveProps<{
|
|
152
155
|
height?: number | string;
|
|
153
156
|
src?: string;
|
|
154
157
|
type?: string;
|
|
@@ -157,7 +160,7 @@ interface AttributesMap {
|
|
|
157
160
|
|
|
158
161
|
// Fieldset element
|
|
159
162
|
fieldset: BaseAttr &
|
|
160
|
-
|
|
163
|
+
KTMaybeReactiveProps<{
|
|
161
164
|
disabled?: boolean;
|
|
162
165
|
form?: string;
|
|
163
166
|
name?: string;
|
|
@@ -165,7 +168,7 @@ interface AttributesMap {
|
|
|
165
168
|
|
|
166
169
|
// Form element
|
|
167
170
|
form: BaseAttr &
|
|
168
|
-
|
|
171
|
+
KTMaybeReactiveProps<{
|
|
169
172
|
'accept-charset'?: string;
|
|
170
173
|
action?: string;
|
|
171
174
|
autocomplete?: 'on' | 'off';
|
|
@@ -178,17 +181,17 @@ interface AttributesMap {
|
|
|
178
181
|
}>;
|
|
179
182
|
|
|
180
183
|
// Head element
|
|
181
|
-
head: BaseAttr &
|
|
184
|
+
head: BaseAttr & KTMaybeReactiveProps<{}>;
|
|
182
185
|
|
|
183
186
|
// HR element
|
|
184
|
-
hr: BaseAttr &
|
|
187
|
+
hr: BaseAttr & KTMaybeReactiveProps<{}>;
|
|
185
188
|
|
|
186
189
|
// HTML element
|
|
187
|
-
html: BaseAttr &
|
|
190
|
+
html: BaseAttr & KTMaybeReactiveProps<{}>;
|
|
188
191
|
|
|
189
192
|
// IFrame element
|
|
190
193
|
iframe: BaseAttr &
|
|
191
|
-
|
|
194
|
+
KTMaybeReactiveProps<{
|
|
192
195
|
allow?: string;
|
|
193
196
|
allowfullscreen?: boolean;
|
|
194
197
|
allowpaymentrequest?: boolean;
|
|
@@ -212,7 +215,7 @@ interface AttributesMap {
|
|
|
212
215
|
|
|
213
216
|
// Image element
|
|
214
217
|
img: BaseAttr &
|
|
215
|
-
|
|
218
|
+
KTMaybeReactiveProps<{
|
|
216
219
|
alt?: string;
|
|
217
220
|
crossorigin?: 'anonymous' | 'use-credentials' | '';
|
|
218
221
|
decoding?: 'sync' | 'async' | 'auto';
|
|
@@ -237,7 +240,7 @@ interface AttributesMap {
|
|
|
237
240
|
|
|
238
241
|
// Input element
|
|
239
242
|
input: BaseAttr &
|
|
240
|
-
|
|
243
|
+
KTMaybeReactiveProps<{
|
|
241
244
|
accept?: string;
|
|
242
245
|
alt?: string;
|
|
243
246
|
autocomplete?: string;
|
|
@@ -294,29 +297,29 @@ interface AttributesMap {
|
|
|
294
297
|
|
|
295
298
|
// Ins element
|
|
296
299
|
ins: BaseAttr &
|
|
297
|
-
|
|
300
|
+
KTMaybeReactiveProps<{
|
|
298
301
|
cite?: string;
|
|
299
302
|
datetime?: string;
|
|
300
303
|
}>;
|
|
301
304
|
|
|
302
305
|
// Label element
|
|
303
306
|
label: BaseAttr &
|
|
304
|
-
|
|
307
|
+
KTMaybeReactiveProps<{
|
|
305
308
|
for?: string;
|
|
306
309
|
}>;
|
|
307
310
|
|
|
308
311
|
// Legend element
|
|
309
|
-
legend: BaseAttr &
|
|
312
|
+
legend: BaseAttr & KTMaybeReactiveProps<{}>;
|
|
310
313
|
|
|
311
314
|
// LI element
|
|
312
315
|
li: BaseAttr &
|
|
313
|
-
|
|
316
|
+
KTMaybeReactiveProps<{
|
|
314
317
|
value?: number | string;
|
|
315
318
|
}>;
|
|
316
319
|
|
|
317
320
|
// Link element
|
|
318
321
|
link: BaseAttr &
|
|
319
|
-
|
|
322
|
+
KTMaybeReactiveProps<{
|
|
320
323
|
as?: string;
|
|
321
324
|
crossorigin?: 'anonymous' | 'use-credentials' | '';
|
|
322
325
|
disabled?: boolean;
|
|
@@ -342,16 +345,16 @@ interface AttributesMap {
|
|
|
342
345
|
|
|
343
346
|
// Map element
|
|
344
347
|
map: BaseAttr &
|
|
345
|
-
|
|
348
|
+
KTMaybeReactiveProps<{
|
|
346
349
|
name?: string;
|
|
347
350
|
}>;
|
|
348
351
|
|
|
349
352
|
// Menu element
|
|
350
|
-
menu: BaseAttr &
|
|
353
|
+
menu: BaseAttr & KTMaybeReactiveProps<{}>;
|
|
351
354
|
|
|
352
355
|
// Meta element
|
|
353
356
|
meta: BaseAttr &
|
|
354
|
-
|
|
357
|
+
KTMaybeReactiveProps<{
|
|
355
358
|
charset?: string;
|
|
356
359
|
content?: string;
|
|
357
360
|
'http-equiv'?: 'content-security-policy' | 'content-type' | 'default-style' | 'refresh' | string;
|
|
@@ -360,7 +363,7 @@ interface AttributesMap {
|
|
|
360
363
|
|
|
361
364
|
// Meter element
|
|
362
365
|
meter: BaseAttr &
|
|
363
|
-
|
|
366
|
+
KTMaybeReactiveProps<{
|
|
364
367
|
form?: string;
|
|
365
368
|
high?: number | string;
|
|
366
369
|
low?: number | string;
|
|
@@ -372,7 +375,7 @@ interface AttributesMap {
|
|
|
372
375
|
|
|
373
376
|
// Object element
|
|
374
377
|
object: BaseAttr &
|
|
375
|
-
|
|
378
|
+
KTMaybeReactiveProps<{
|
|
376
379
|
data?: string;
|
|
377
380
|
form?: string;
|
|
378
381
|
height?: number | string;
|
|
@@ -384,7 +387,7 @@ interface AttributesMap {
|
|
|
384
387
|
|
|
385
388
|
// OL element
|
|
386
389
|
ol: BaseAttr &
|
|
387
|
-
|
|
390
|
+
KTMaybeReactiveProps<{
|
|
388
391
|
reversed?: boolean;
|
|
389
392
|
start?: number | string;
|
|
390
393
|
type?: '1' | 'a' | 'A' | 'i' | 'I';
|
|
@@ -392,14 +395,14 @@ interface AttributesMap {
|
|
|
392
395
|
|
|
393
396
|
// Optgroup element
|
|
394
397
|
optgroup: BaseAttr &
|
|
395
|
-
|
|
398
|
+
KTMaybeReactiveProps<{
|
|
396
399
|
disabled?: boolean;
|
|
397
400
|
label?: string;
|
|
398
401
|
}>;
|
|
399
402
|
|
|
400
403
|
// Option element
|
|
401
404
|
option: BaseAttr &
|
|
402
|
-
|
|
405
|
+
KTMaybeReactiveProps<{
|
|
403
406
|
disabled?: boolean;
|
|
404
407
|
label?: string;
|
|
405
408
|
selected?: boolean;
|
|
@@ -408,39 +411,39 @@ interface AttributesMap {
|
|
|
408
411
|
|
|
409
412
|
// Output element
|
|
410
413
|
output: BaseAttr &
|
|
411
|
-
|
|
414
|
+
KTMaybeReactiveProps<{
|
|
412
415
|
for?: string;
|
|
413
416
|
form?: string;
|
|
414
417
|
name?: string;
|
|
415
418
|
}>;
|
|
416
419
|
|
|
417
420
|
// Picture element
|
|
418
|
-
picture: BaseAttr &
|
|
421
|
+
picture: BaseAttr & KTMaybeReactiveProps<{}>;
|
|
419
422
|
|
|
420
423
|
// Pre element
|
|
421
|
-
pre: BaseAttr &
|
|
424
|
+
pre: BaseAttr & KTMaybeReactiveProps<{}>;
|
|
422
425
|
|
|
423
426
|
// Progress element
|
|
424
427
|
progress: BaseAttr &
|
|
425
|
-
|
|
428
|
+
KTMaybeReactiveProps<{
|
|
426
429
|
max?: number | string;
|
|
427
430
|
value?: number | string;
|
|
428
431
|
}>;
|
|
429
432
|
|
|
430
433
|
// Quote element (q and blockquote)
|
|
431
434
|
q: BaseAttr &
|
|
432
|
-
|
|
435
|
+
KTMaybeReactiveProps<{
|
|
433
436
|
cite?: string;
|
|
434
437
|
}>;
|
|
435
438
|
|
|
436
439
|
blockquote: BaseAttr &
|
|
437
|
-
|
|
440
|
+
KTMaybeReactiveProps<{
|
|
438
441
|
cite?: string;
|
|
439
442
|
}>;
|
|
440
443
|
|
|
441
444
|
// Script element
|
|
442
445
|
script: BaseAttr &
|
|
443
|
-
|
|
446
|
+
KTMaybeReactiveProps<{
|
|
444
447
|
async?: boolean;
|
|
445
448
|
crossorigin?: 'anonymous' | 'use-credentials' | '';
|
|
446
449
|
defer?: boolean;
|
|
@@ -461,7 +464,7 @@ interface AttributesMap {
|
|
|
461
464
|
|
|
462
465
|
// Select element
|
|
463
466
|
select: BaseAttr &
|
|
464
|
-
|
|
467
|
+
KTMaybeReactiveProps<{
|
|
465
468
|
autocomplete?: string;
|
|
466
469
|
disabled?: boolean;
|
|
467
470
|
form?: string;
|
|
@@ -473,13 +476,13 @@ interface AttributesMap {
|
|
|
473
476
|
|
|
474
477
|
// Slot element
|
|
475
478
|
slot: BaseAttr &
|
|
476
|
-
|
|
479
|
+
KTMaybeReactiveProps<{
|
|
477
480
|
name?: string;
|
|
478
481
|
}>;
|
|
479
482
|
|
|
480
483
|
// Source element
|
|
481
484
|
source: BaseAttr &
|
|
482
|
-
|
|
485
|
+
KTMaybeReactiveProps<{
|
|
483
486
|
height?: number | string;
|
|
484
487
|
media?: string;
|
|
485
488
|
sizes?: string;
|
|
@@ -491,30 +494,30 @@ interface AttributesMap {
|
|
|
491
494
|
|
|
492
495
|
// Style element
|
|
493
496
|
style: BaseAttr &
|
|
494
|
-
|
|
497
|
+
KTMaybeReactiveProps<{
|
|
495
498
|
media?: string;
|
|
496
499
|
}>;
|
|
497
500
|
|
|
498
501
|
// Table element
|
|
499
|
-
table: BaseAttr &
|
|
502
|
+
table: BaseAttr & KTMaybeReactiveProps<{}>;
|
|
500
503
|
|
|
501
504
|
// Table body/footer/header elements
|
|
502
|
-
tbody: BaseAttr &
|
|
505
|
+
tbody: BaseAttr & KTMaybeReactiveProps<{}>;
|
|
503
506
|
|
|
504
|
-
tfoot: BaseAttr &
|
|
507
|
+
tfoot: BaseAttr & KTMaybeReactiveProps<{}>;
|
|
505
508
|
|
|
506
|
-
thead: BaseAttr &
|
|
509
|
+
thead: BaseAttr & KTMaybeReactiveProps<{}>;
|
|
507
510
|
|
|
508
511
|
// Table cell elements
|
|
509
512
|
td: BaseAttr &
|
|
510
|
-
|
|
513
|
+
KTMaybeReactiveProps<{
|
|
511
514
|
colspan?: number | string;
|
|
512
515
|
headers?: string;
|
|
513
516
|
rowspan?: number | string;
|
|
514
517
|
}>;
|
|
515
518
|
|
|
516
519
|
th: BaseAttr &
|
|
517
|
-
|
|
520
|
+
KTMaybeReactiveProps<{
|
|
518
521
|
abbr?: string;
|
|
519
522
|
colspan?: number | string;
|
|
520
523
|
headers?: string;
|
|
@@ -523,11 +526,11 @@ interface AttributesMap {
|
|
|
523
526
|
}>;
|
|
524
527
|
|
|
525
528
|
// Template element
|
|
526
|
-
template: BaseAttr &
|
|
529
|
+
template: BaseAttr & KTMaybeReactiveProps<{}>;
|
|
527
530
|
|
|
528
531
|
// Textarea element
|
|
529
532
|
textarea: BaseAttr &
|
|
530
|
-
|
|
533
|
+
KTMaybeReactiveProps<{
|
|
531
534
|
autocomplete?: string;
|
|
532
535
|
cols?: number | string;
|
|
533
536
|
dirname?: string;
|
|
@@ -539,25 +542,26 @@ interface AttributesMap {
|
|
|
539
542
|
placeholder?: string;
|
|
540
543
|
readonly?: boolean;
|
|
541
544
|
required?: boolean;
|
|
542
|
-
rows?: number | string;
|
|
543
545
|
wrap?: 'hard' | 'soft' | 'off';
|
|
544
|
-
}
|
|
546
|
+
}> & {
|
|
547
|
+
rows?: KTMaybeReactive<number> | KTMaybeReactive<string>;
|
|
548
|
+
};
|
|
545
549
|
|
|
546
550
|
// Time element
|
|
547
551
|
time: BaseAttr &
|
|
548
|
-
|
|
552
|
+
KTMaybeReactiveProps<{
|
|
549
553
|
datetime?: string;
|
|
550
554
|
}>;
|
|
551
555
|
|
|
552
556
|
// Title element
|
|
553
|
-
title: BaseAttr &
|
|
557
|
+
title: BaseAttr & KTMaybeReactiveProps<{}>;
|
|
554
558
|
|
|
555
559
|
// TR element
|
|
556
|
-
tr: BaseAttr &
|
|
560
|
+
tr: BaseAttr & KTMaybeReactiveProps<{}>;
|
|
557
561
|
|
|
558
562
|
// Track element
|
|
559
563
|
track: BaseAttr &
|
|
560
|
-
|
|
564
|
+
KTMaybeReactiveProps<{
|
|
561
565
|
default?: boolean;
|
|
562
566
|
kind?: 'subtitles' | 'captions' | 'descriptions' | 'chapters' | 'metadata';
|
|
563
567
|
label?: string;
|
|
@@ -566,11 +570,11 @@ interface AttributesMap {
|
|
|
566
570
|
}>;
|
|
567
571
|
|
|
568
572
|
// UL element
|
|
569
|
-
ul: BaseAttr &
|
|
573
|
+
ul: BaseAttr & KTMaybeReactiveProps<{}>;
|
|
570
574
|
|
|
571
575
|
// Video element
|
|
572
576
|
video: BaseAttr &
|
|
573
|
-
|
|
577
|
+
KTMaybeReactiveProps<{
|
|
574
578
|
autoplay?: boolean;
|
|
575
579
|
controls?: boolean;
|
|
576
580
|
crossorigin?: 'anonymous' | 'use-credentials' | '';
|
|
@@ -585,298 +589,329 @@ interface AttributesMap {
|
|
|
585
589
|
}>;
|
|
586
590
|
|
|
587
591
|
// Generic HTMLElement (no specific attributes beyond BaseEvent)
|
|
588
|
-
abbr: BaseAttr &
|
|
589
|
-
address: BaseAttr &
|
|
590
|
-
article: BaseAttr &
|
|
591
|
-
aside: BaseAttr &
|
|
592
|
-
b: BaseAttr &
|
|
593
|
-
bdi: BaseAttr &
|
|
594
|
-
bdo: BaseAttr &
|
|
595
|
-
cite: BaseAttr &
|
|
596
|
-
code: BaseAttr &
|
|
597
|
-
dd: BaseAttr &
|
|
598
|
-
dfn: BaseAttr &
|
|
599
|
-
div: BaseAttr &
|
|
600
|
-
dl: BaseAttr &
|
|
601
|
-
dt: BaseAttr &
|
|
602
|
-
em: BaseAttr &
|
|
603
|
-
figcaption: BaseAttr &
|
|
604
|
-
figure: BaseAttr &
|
|
605
|
-
footer: BaseAttr &
|
|
606
|
-
h1: BaseAttr &
|
|
607
|
-
h2: BaseAttr &
|
|
608
|
-
h3: BaseAttr &
|
|
609
|
-
h4: BaseAttr &
|
|
610
|
-
h5: BaseAttr &
|
|
611
|
-
h6: BaseAttr &
|
|
612
|
-
header: BaseAttr &
|
|
613
|
-
hgroup: BaseAttr &
|
|
614
|
-
i: BaseAttr &
|
|
615
|
-
kbd: BaseAttr &
|
|
616
|
-
main: BaseAttr &
|
|
617
|
-
mark: BaseAttr &
|
|
618
|
-
nav: BaseAttr &
|
|
619
|
-
noscript: BaseAttr &
|
|
620
|
-
p: BaseAttr &
|
|
621
|
-
rp: BaseAttr &
|
|
622
|
-
rt: BaseAttr &
|
|
623
|
-
ruby: BaseAttr &
|
|
624
|
-
s: BaseAttr &
|
|
625
|
-
samp: BaseAttr &
|
|
626
|
-
search: BaseAttr &
|
|
627
|
-
section: BaseAttr &
|
|
628
|
-
small: BaseAttr &
|
|
629
|
-
span: BaseAttr &
|
|
630
|
-
strong: BaseAttr &
|
|
631
|
-
sub: BaseAttr &
|
|
632
|
-
summary: BaseAttr &
|
|
633
|
-
sup: BaseAttr &
|
|
634
|
-
u: BaseAttr &
|
|
635
|
-
var: BaseAttr &
|
|
636
|
-
wbr: BaseAttr &
|
|
637
|
-
|
|
638
|
-
svg: BaseAttr &
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
592
|
+
abbr: BaseAttr & KTMaybeReactiveProps<{}>;
|
|
593
|
+
address: BaseAttr & KTMaybeReactiveProps<{}>;
|
|
594
|
+
article: BaseAttr & KTMaybeReactiveProps<{}>;
|
|
595
|
+
aside: BaseAttr & KTMaybeReactiveProps<{}>;
|
|
596
|
+
b: BaseAttr & KTMaybeReactiveProps<{}>;
|
|
597
|
+
bdi: BaseAttr & KTMaybeReactiveProps<{}>;
|
|
598
|
+
bdo: BaseAttr & KTMaybeReactiveProps<{}>;
|
|
599
|
+
cite: BaseAttr & KTMaybeReactiveProps<{}>;
|
|
600
|
+
code: BaseAttr & KTMaybeReactiveProps<{}>;
|
|
601
|
+
dd: BaseAttr & KTMaybeReactiveProps<{}>;
|
|
602
|
+
dfn: BaseAttr & KTMaybeReactiveProps<{}>;
|
|
603
|
+
div: BaseAttr & KTMaybeReactiveProps<{}>;
|
|
604
|
+
dl: BaseAttr & KTMaybeReactiveProps<{}>;
|
|
605
|
+
dt: BaseAttr & KTMaybeReactiveProps<{}>;
|
|
606
|
+
em: BaseAttr & KTMaybeReactiveProps<{}>;
|
|
607
|
+
figcaption: BaseAttr & KTMaybeReactiveProps<{}>;
|
|
608
|
+
figure: BaseAttr & KTMaybeReactiveProps<{}>;
|
|
609
|
+
footer: BaseAttr & KTMaybeReactiveProps<{}>;
|
|
610
|
+
h1: BaseAttr & KTMaybeReactiveProps<{}>;
|
|
611
|
+
h2: BaseAttr & KTMaybeReactiveProps<{}>;
|
|
612
|
+
h3: BaseAttr & KTMaybeReactiveProps<{}>;
|
|
613
|
+
h4: BaseAttr & KTMaybeReactiveProps<{}>;
|
|
614
|
+
h5: BaseAttr & KTMaybeReactiveProps<{}>;
|
|
615
|
+
h6: BaseAttr & KTMaybeReactiveProps<{}>;
|
|
616
|
+
header: BaseAttr & KTMaybeReactiveProps<{}>;
|
|
617
|
+
hgroup: BaseAttr & KTMaybeReactiveProps<{}>;
|
|
618
|
+
i: BaseAttr & KTMaybeReactiveProps<{}>;
|
|
619
|
+
kbd: BaseAttr & KTMaybeReactiveProps<{}>;
|
|
620
|
+
main: BaseAttr & KTMaybeReactiveProps<{}>;
|
|
621
|
+
mark: BaseAttr & KTMaybeReactiveProps<{}>;
|
|
622
|
+
nav: BaseAttr & KTMaybeReactiveProps<{}>;
|
|
623
|
+
noscript: BaseAttr & KTMaybeReactiveProps<{}>;
|
|
624
|
+
p: BaseAttr & KTMaybeReactiveProps<{}>;
|
|
625
|
+
rp: BaseAttr & KTMaybeReactiveProps<{}>;
|
|
626
|
+
rt: BaseAttr & KTMaybeReactiveProps<{}>;
|
|
627
|
+
ruby: BaseAttr & KTMaybeReactiveProps<{}>;
|
|
628
|
+
s: BaseAttr & KTMaybeReactiveProps<{}>;
|
|
629
|
+
samp: BaseAttr & KTMaybeReactiveProps<{}>;
|
|
630
|
+
search: BaseAttr & KTMaybeReactiveProps<{}>;
|
|
631
|
+
section: BaseAttr & KTMaybeReactiveProps<{}>;
|
|
632
|
+
small: BaseAttr & KTMaybeReactiveProps<{}>;
|
|
633
|
+
span: BaseAttr & KTMaybeReactiveProps<{}>;
|
|
634
|
+
strong: BaseAttr & KTMaybeReactiveProps<{}>;
|
|
635
|
+
sub: BaseAttr & KTMaybeReactiveProps<{}>;
|
|
636
|
+
summary: BaseAttr & KTMaybeReactiveProps<{}>;
|
|
637
|
+
sup: BaseAttr & KTMaybeReactiveProps<{}>;
|
|
638
|
+
u: BaseAttr & KTMaybeReactiveProps<{}>;
|
|
639
|
+
var: BaseAttr & KTMaybeReactiveProps<{}>;
|
|
640
|
+
wbr: BaseAttr & KTMaybeReactiveProps<{}>;
|
|
641
|
+
|
|
642
|
+
svg: BaseAttr &
|
|
643
|
+
KTMaybeReactiveProps<{
|
|
644
|
+
class?: string;
|
|
645
|
+
style?: string | Partial<CSSStyleDeclaration>;
|
|
646
|
+
width?: number | string;
|
|
647
|
+
height?: number | string;
|
|
648
|
+
viewBox?: string;
|
|
649
|
+
xmlns?: string;
|
|
650
|
+
fill?: string;
|
|
651
|
+
stroke?: string;
|
|
652
|
+
strokeWidth?: number | string;
|
|
653
|
+
strokeLinecap?: 'butt' | 'round' | 'square' | 'inherit';
|
|
654
|
+
strokeLinejoin?: 'miter' | 'round' | 'bevel' | 'inherit';
|
|
655
|
+
strokeDasharray?: string;
|
|
656
|
+
strokeDashoffset?: number | string;
|
|
657
|
+
opacity?: number | string;
|
|
658
|
+
preserveAspectRatio?: string;
|
|
659
|
+
transform?: string;
|
|
660
|
+
x?: number | string;
|
|
661
|
+
y?: number | string;
|
|
662
|
+
rx?: number | string;
|
|
663
|
+
ry?: number | string;
|
|
664
|
+
r?: number | string;
|
|
665
|
+
cx?: number | string;
|
|
666
|
+
cy?: number | string;
|
|
667
|
+
d?: string;
|
|
668
|
+
points?: string;
|
|
669
|
+
pathLength?: number | string;
|
|
670
|
+
viewbox?: string;
|
|
671
|
+
role?: string;
|
|
672
|
+
focusable?: boolean | 'true' | 'false';
|
|
673
|
+
xlinkHref?: string; // legacy xlink:href
|
|
674
|
+
}>;
|
|
670
675
|
}
|
|
671
676
|
|
|
672
677
|
interface SVGAttributesMap {
|
|
673
|
-
a: AttributesMap['svg'] & { href?: string; x?: number | string; y?: number | string }
|
|
674
|
-
animate: AttributesMap['svg'] &
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
678
|
+
a: AttributesMap['svg'] & KTMaybeReactiveProps<{ href?: string; x?: number | string; y?: number | string }>;
|
|
679
|
+
animate: AttributesMap['svg'] &
|
|
680
|
+
KTMaybeReactiveProps<{
|
|
681
|
+
attributeName?: string;
|
|
682
|
+
from?: string | number;
|
|
683
|
+
to?: string | number;
|
|
684
|
+
dur?: string;
|
|
685
|
+
repeatCount?: string | number;
|
|
686
|
+
}>;
|
|
687
|
+
animateMotion: AttributesMap['svg'] & KTMaybeReactiveProps<{ path?: string; dur?: string; rotate?: string }>;
|
|
688
|
+
animateTransform: AttributesMap['svg'] &
|
|
689
|
+
KTMaybeReactiveProps<{ type?: string; from?: string; to?: string; dur?: string }>;
|
|
690
|
+
circle: AttributesMap['svg'] &
|
|
691
|
+
KTMaybeReactiveProps<{ cx?: number | string; cy?: number | string; r?: number | string }>;
|
|
692
|
+
clipPath: AttributesMap['svg'] & KTMaybeReactiveProps<{ clipPathUnits?: 'userSpaceOnUse' | 'objectBoundingBox' }>;
|
|
685
693
|
defs: AttributesMap['svg'];
|
|
686
694
|
desc: AttributesMap['svg'];
|
|
687
|
-
ellipse: AttributesMap['svg'] &
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
695
|
+
ellipse: AttributesMap['svg'] &
|
|
696
|
+
KTMaybeReactiveProps<{
|
|
697
|
+
cx?: number | string;
|
|
698
|
+
cy?: number | string;
|
|
699
|
+
rx?: number | string;
|
|
700
|
+
ry?: number | string;
|
|
701
|
+
}>;
|
|
693
702
|
|
|
694
703
|
// Filter primitives (provide common props)
|
|
695
|
-
feBlend: AttributesMap['svg'] & { in?: string; in2?: string; mode?: string }
|
|
696
|
-
feColorMatrix: AttributesMap['svg'] &
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
y?: number | string;
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
704
|
+
feBlend: AttributesMap['svg'] & KTMaybeReactiveProps<{ in?: string; in2?: string; mode?: string }>;
|
|
705
|
+
feColorMatrix: AttributesMap['svg'] &
|
|
706
|
+
KTMaybeReactiveProps<{
|
|
707
|
+
type?: 'matrix' | 'saturate' | 'hueRotate' | 'luminanceToAlpha';
|
|
708
|
+
values?: string;
|
|
709
|
+
}>;
|
|
710
|
+
feComponentTransfer: AttributesMap['svg'] & KTMaybeReactiveProps<{}>;
|
|
711
|
+
feComposite: AttributesMap['svg'] &
|
|
712
|
+
KTMaybeReactiveProps<{
|
|
713
|
+
in?: string;
|
|
714
|
+
in2?: string;
|
|
715
|
+
operator?: string;
|
|
716
|
+
k1?: number | string;
|
|
717
|
+
k2?: number | string;
|
|
718
|
+
k3?: number | string;
|
|
719
|
+
k4?: number | string;
|
|
720
|
+
}>;
|
|
721
|
+
feConvolveMatrix: AttributesMap['svg'] &
|
|
722
|
+
KTMaybeReactiveProps<{
|
|
723
|
+
order?: string | number;
|
|
724
|
+
kernelMatrix?: string;
|
|
725
|
+
divisor?: string | number;
|
|
726
|
+
bias?: string | number;
|
|
727
|
+
}>;
|
|
728
|
+
feDiffuseLighting: AttributesMap['svg'] & KTMaybeReactiveProps<{}>;
|
|
729
|
+
feDisplacementMap: AttributesMap['svg'] &
|
|
730
|
+
KTMaybeReactiveProps<{
|
|
731
|
+
in?: string;
|
|
732
|
+
in2?: string;
|
|
733
|
+
scale?: number | string;
|
|
734
|
+
xChannelSelector?: string;
|
|
735
|
+
yChannelSelector?: string;
|
|
736
|
+
}>;
|
|
737
|
+
feDistantLight: AttributesMap['svg'] &
|
|
738
|
+
KTMaybeReactiveProps<{ azimuth?: number | string; elevation?: number | string }>;
|
|
739
|
+
feDropShadow: AttributesMap['svg'] &
|
|
740
|
+
KTMaybeReactiveProps<{
|
|
741
|
+
dx?: number | string;
|
|
742
|
+
dy?: number | string;
|
|
743
|
+
stdDeviation?: number | string;
|
|
744
|
+
floodColor?: string;
|
|
745
|
+
floodOpacity?: number | string;
|
|
746
|
+
}>;
|
|
747
|
+
feFlood: AttributesMap['svg'] & KTMaybeReactiveProps<{ floodColor?: string; floodOpacity?: number | string }>;
|
|
748
|
+
feFuncA: AttributesMap['svg'] & KTMaybeReactiveProps<{}>;
|
|
749
|
+
feFuncB: AttributesMap['svg'] & KTMaybeReactiveProps<{}>;
|
|
750
|
+
feFuncG: AttributesMap['svg'] & KTMaybeReactiveProps<{}>;
|
|
751
|
+
feFuncR: AttributesMap['svg'] & KTMaybeReactiveProps<{}>;
|
|
752
|
+
feGaussianBlur: AttributesMap['svg'] & KTMaybeReactiveProps<{ stdDeviation?: number | string; edgeMode?: string }>;
|
|
753
|
+
feImage: AttributesMap['svg'] & KTMaybeReactiveProps<{ href?: string }>;
|
|
754
|
+
feMerge: AttributesMap['svg'] & KTMaybeReactiveProps<{}>;
|
|
755
|
+
feMergeNode: AttributesMap['svg'] & KTMaybeReactiveProps<{ in?: string }>;
|
|
756
|
+
feMorphology: AttributesMap['svg'] &
|
|
757
|
+
KTMaybeReactiveProps<{ operator?: 'erode' | 'dilate'; radius?: number | string }>;
|
|
758
|
+
feOffset: AttributesMap['svg'] & KTMaybeReactiveProps<{ dx?: number | string; dy?: number | string }>;
|
|
759
|
+
fePointLight: AttributesMap['svg'] &
|
|
760
|
+
KTMaybeReactiveProps<{ x?: number | string; y?: number | string; z?: number | string }>;
|
|
761
|
+
feSpecularLighting: AttributesMap['svg'] &
|
|
762
|
+
KTMaybeReactiveProps<{
|
|
763
|
+
specularConstant?: number | string;
|
|
764
|
+
specularExponent?: number | string;
|
|
765
|
+
surfaceScale?: number | string;
|
|
766
|
+
}>;
|
|
767
|
+
feSpotLight: AttributesMap['svg'] &
|
|
768
|
+
KTMaybeReactiveProps<{
|
|
769
|
+
x?: number | string;
|
|
770
|
+
y?: number | string;
|
|
771
|
+
z?: number | string;
|
|
772
|
+
pointsAtX?: number | string;
|
|
773
|
+
pointsAtY?: number | string;
|
|
774
|
+
pointsAtZ?: number | string;
|
|
775
|
+
specularExponent?: number | string;
|
|
776
|
+
limitingConeAngle?: number | string;
|
|
777
|
+
}>;
|
|
778
|
+
feTile: AttributesMap['svg'] & KTMaybeReactiveProps<{}>;
|
|
779
|
+
feTurbulence: AttributesMap['svg'] &
|
|
780
|
+
KTMaybeReactiveProps<{
|
|
781
|
+
baseFrequency?: number | string;
|
|
782
|
+
numOctaves?: number | string;
|
|
783
|
+
seed?: number | string;
|
|
784
|
+
stitchTiles?: string;
|
|
785
|
+
type?: 'fractalNoise' | 'turbulence';
|
|
786
|
+
}>;
|
|
767
787
|
|
|
768
|
-
filter: AttributesMap['svg'] &
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
788
|
+
filter: AttributesMap['svg'] &
|
|
789
|
+
KTMaybeReactiveProps<{
|
|
790
|
+
x?: number | string;
|
|
791
|
+
y?: number | string;
|
|
792
|
+
width?: number | string;
|
|
793
|
+
height?: number | string;
|
|
794
|
+
filterUnits?: string;
|
|
795
|
+
primitiveUnits?: string;
|
|
796
|
+
}>;
|
|
797
|
+
foreignObject: AttributesMap['svg'] &
|
|
798
|
+
KTMaybeReactiveProps<{
|
|
799
|
+
x?: number | string;
|
|
800
|
+
y?: number | string;
|
|
801
|
+
width?: number | string;
|
|
802
|
+
height?: number | string;
|
|
803
|
+
}>;
|
|
782
804
|
g: AttributesMap['svg'];
|
|
783
|
-
image: AttributesMap['svg'] &
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
805
|
+
image: AttributesMap['svg'] &
|
|
806
|
+
KTMaybeReactiveProps<{
|
|
807
|
+
href?: string;
|
|
808
|
+
x?: number | string;
|
|
809
|
+
y?: number | string;
|
|
810
|
+
width?: number | string;
|
|
811
|
+
height?: number | string;
|
|
812
|
+
}>;
|
|
813
|
+
line: AttributesMap['svg'] &
|
|
814
|
+
KTMaybeReactiveProps<{
|
|
815
|
+
x1?: number | string;
|
|
816
|
+
y1?: number | string;
|
|
817
|
+
x2?: number | string;
|
|
818
|
+
y2?: number | string;
|
|
819
|
+
}>;
|
|
820
|
+
linearGradient: AttributesMap['svg'] &
|
|
821
|
+
KTMaybeReactiveProps<{
|
|
822
|
+
x1?: number | string;
|
|
823
|
+
y1?: number | string;
|
|
824
|
+
x2?: number | string;
|
|
825
|
+
y2?: number | string;
|
|
826
|
+
gradientUnits?: 'userSpaceOnUse' | 'objectBoundingBox';
|
|
827
|
+
gradientTransform?: string;
|
|
828
|
+
}>;
|
|
829
|
+
marker: AttributesMap['svg'] &
|
|
830
|
+
KTMaybeReactiveProps<{
|
|
831
|
+
markerUnits?: string;
|
|
832
|
+
markerWidth?: number | string;
|
|
833
|
+
markerHeight?: number | string;
|
|
834
|
+
refX?: number | string;
|
|
835
|
+
refY?: number | string;
|
|
836
|
+
orient?: string;
|
|
837
|
+
}>;
|
|
838
|
+
mask: AttributesMap['svg'] &
|
|
839
|
+
KTMaybeReactiveProps<{
|
|
840
|
+
maskUnits?: string;
|
|
841
|
+
maskContentUnits?: string;
|
|
842
|
+
x?: number | string;
|
|
843
|
+
y?: number | string;
|
|
844
|
+
width?: number | string;
|
|
845
|
+
height?: number | string;
|
|
846
|
+
}>;
|
|
820
847
|
metadata: AttributesMap['svg'];
|
|
821
|
-
mpath: AttributesMap['svg'] & { href?: string }
|
|
822
|
-
path: AttributesMap['svg'] & { d?: string; pathLength?: number | string }
|
|
823
|
-
pattern: AttributesMap['svg'] &
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
848
|
+
mpath: AttributesMap['svg'] & KTMaybeReactiveProps<{ href?: string }>;
|
|
849
|
+
path: AttributesMap['svg'] & KTMaybeReactiveProps<{ d?: string; pathLength?: number | string }>;
|
|
850
|
+
pattern: AttributesMap['svg'] &
|
|
851
|
+
KTMaybeReactiveProps<{
|
|
852
|
+
patternUnits?: string;
|
|
853
|
+
patternContentUnits?: string;
|
|
854
|
+
width?: number | string;
|
|
855
|
+
height?: number | string;
|
|
856
|
+
x?: number | string;
|
|
857
|
+
y?: number | string;
|
|
858
|
+
}>;
|
|
859
|
+
polygon: AttributesMap['svg'] & KTMaybeReactiveProps<{ points?: string }>;
|
|
860
|
+
polyline: AttributesMap['svg'] & KTMaybeReactiveProps<{ points?: string }>;
|
|
861
|
+
radialGradient: AttributesMap['svg'] &
|
|
862
|
+
KTMaybeReactiveProps<{
|
|
863
|
+
cx?: number | string;
|
|
864
|
+
cy?: number | string;
|
|
865
|
+
r?: number | string;
|
|
866
|
+
fx?: number | string;
|
|
867
|
+
fy?: number | string;
|
|
868
|
+
gradientUnits?: 'userSpaceOnUse' | 'objectBoundingBox';
|
|
869
|
+
gradientTransform?: string;
|
|
870
|
+
}>;
|
|
871
|
+
rect: AttributesMap['svg'] &
|
|
872
|
+
KTMaybeReactiveProps<{
|
|
873
|
+
x?: number | string;
|
|
874
|
+
y?: number | string;
|
|
875
|
+
width?: number | string;
|
|
876
|
+
height?: number | string;
|
|
877
|
+
rx?: number | string;
|
|
878
|
+
ry?: number | string;
|
|
879
|
+
}>;
|
|
880
|
+
script: AttributesMap['svg'] & KTMaybeReactiveProps<{ href?: string; type?: string }>;
|
|
881
|
+
set: AttributesMap['svg'] &
|
|
882
|
+
KTMaybeReactiveProps<{ attributeName?: string; to?: string | number; begin?: string; dur?: string }>;
|
|
883
|
+
stop: AttributesMap['svg'] &
|
|
884
|
+
KTMaybeReactiveProps<{ offset?: number | string; stopColor?: string; stopOpacity?: number | string }>;
|
|
885
|
+
style: AttributesMap['svg'] & KTMaybeReactiveProps<{ media?: string }>;
|
|
854
886
|
svg: AttributesMap['svg'];
|
|
855
887
|
switch: AttributesMap['svg'];
|
|
856
|
-
symbol: AttributesMap['svg'] & { viewBox?: string; preserveAspectRatio?: string }
|
|
857
|
-
text: AttributesMap['svg'] &
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
888
|
+
symbol: AttributesMap['svg'] & KTMaybeReactiveProps<{ viewBox?: string; preserveAspectRatio?: string }>;
|
|
889
|
+
text: AttributesMap['svg'] &
|
|
890
|
+
KTMaybeReactiveProps<{
|
|
891
|
+
x?: number | string;
|
|
892
|
+
y?: number | string;
|
|
893
|
+
dx?: number | string;
|
|
894
|
+
dy?: number | string;
|
|
895
|
+
textLength?: number | string;
|
|
896
|
+
}>;
|
|
897
|
+
textPath: AttributesMap['svg'] & KTMaybeReactiveProps<{ href?: string; startOffset?: number | string }>;
|
|
865
898
|
title: AttributesMap['svg'];
|
|
866
|
-
tspan: AttributesMap['svg'] &
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
899
|
+
tspan: AttributesMap['svg'] &
|
|
900
|
+
KTMaybeReactiveProps<{
|
|
901
|
+
x?: number | string;
|
|
902
|
+
y?: number | string;
|
|
903
|
+
dx?: number | string;
|
|
904
|
+
dy?: number | string;
|
|
905
|
+
}>;
|
|
906
|
+
use: AttributesMap['svg'] &
|
|
907
|
+
KTMaybeReactiveProps<{
|
|
908
|
+
href?: string;
|
|
909
|
+
x?: number | string;
|
|
910
|
+
y?: number | string;
|
|
911
|
+
width?: number | string;
|
|
912
|
+
height?: number | string;
|
|
913
|
+
}>;
|
|
914
|
+
view: AttributesMap['svg'] & KTMaybeReactiveProps<{ viewBox?: string; preserveAspectRatio?: string }>;
|
|
880
915
|
}
|
|
881
916
|
|
|
882
917
|
declare namespace JSX {
|
|
@@ -1159,7 +1194,7 @@ declare class KTComputed<T> implements KTReactive<T> {
|
|
|
1159
1194
|
* Unregister a callback
|
|
1160
1195
|
* @param key registered listener key
|
|
1161
1196
|
*/
|
|
1162
|
-
removeOnChange(key: ReactiveChangeKey): ReactiveChangeHandler<
|
|
1197
|
+
removeOnChange(key: ReactiveChangeKey): ReactiveChangeHandler<any> | undefined;
|
|
1163
1198
|
}
|
|
1164
1199
|
/**
|
|
1165
1200
|
* Create a reactive computed value
|
|
@@ -1218,18 +1253,30 @@ declare class KTReactive<T> {
|
|
|
1218
1253
|
callback: ReactiveChangeHandler<T>,
|
|
1219
1254
|
key?: K,
|
|
1220
1255
|
): K extends undefined ? number : K;
|
|
1221
|
-
removeOnChange(key: ReactiveChangeKey): ReactiveChangeHandler<
|
|
1256
|
+
removeOnChange(key: ReactiveChangeKey): ReactiveChangeHandler<any> | undefined;
|
|
1222
1257
|
}
|
|
1223
1258
|
|
|
1224
1259
|
// & Shockingly, If T is boolean, KTReactify<T> becomes KTReactive<true> | KTReactive<false>. It causes @ktjs/mui that disabledRefs not assignable.
|
|
1225
|
-
|
|
1260
|
+
/**
|
|
1261
|
+
* Makes `KTReactify<'a' | 'b'> to be KTReactive<'a'> | KTReactive<'b'>`
|
|
1262
|
+
*/
|
|
1263
|
+
type KTReactifySplit<T> = T extends boolean ? KTReactive<boolean> : T extends any ? KTReactive<T> : never;
|
|
1226
1264
|
|
|
1227
1265
|
type KTReactifyObject<T extends object> = {
|
|
1228
|
-
[K in keyof T]:
|
|
1266
|
+
[K in keyof T]: KTReactifySplit<T[K]>;
|
|
1229
1267
|
};
|
|
1230
1268
|
|
|
1231
1269
|
type KTReactifyProps<T extends object> = {
|
|
1232
|
-
[K in keyof T]:
|
|
1270
|
+
[K in keyof T]: KTReactifySplit<Exclude<T[K], undefined>> | T[K];
|
|
1271
|
+
};
|
|
1272
|
+
|
|
1273
|
+
/**
|
|
1274
|
+
* Makes `KTReactify<'a' | 'b'>` to be `KTReactive<'a' | 'b'>`
|
|
1275
|
+
*/
|
|
1276
|
+
type KTReactify<T> = [T] extends [KTReactive<infer U>] ? KTReactive<U> : KTReactive<T>;
|
|
1277
|
+
type KTMaybeReactive<T> = T | KTReactify<T>;
|
|
1278
|
+
type KTMaybeReactiveProps<T extends object> = {
|
|
1279
|
+
[K in keyof T]: K extends `on:${string}` ? T[K] : KTMaybeReactive<Exclude<T[K], undefined>> | T[K];
|
|
1233
1280
|
};
|
|
1234
1281
|
|
|
1235
1282
|
declare class KTRef<T> implements KTReactive<T> {
|
|
@@ -1264,7 +1311,7 @@ declare class KTRef<T> implements KTReactive<T> {
|
|
|
1264
1311
|
* @param key Optional key to identify the callback, allowing multiple listeners on the same ref and individual removal. If not provided, a unique ID will be generated.
|
|
1265
1312
|
*/
|
|
1266
1313
|
addOnChange<K extends ReactiveChangeKey | undefined>(callback: ReactiveChangeHandler<T>, key?: K): K extends undefined ? number : K;
|
|
1267
|
-
removeOnChange(key: ReactiveChangeKey): ReactiveChangeHandler<
|
|
1314
|
+
removeOnChange(key: ReactiveChangeKey): ReactiveChangeHandler<any> | undefined;
|
|
1268
1315
|
}
|
|
1269
1316
|
/**
|
|
1270
1317
|
* Reference to the created HTML element.
|
|
@@ -1484,4 +1531,4 @@ declare function KTFor<T>(props: KTForProps<T>): KTForElement;
|
|
|
1484
1531
|
declare function KTConditional(condition: boolean | KTReactive<boolean>, tagIf: JSXTag, propsIf: KTAttribute, tagElse?: JSXTag, propsElse?: KTAttribute): JSX.Element;
|
|
1485
1532
|
|
|
1486
1533
|
export { $initRef, $modelOrRef, Fragment, JSX, KTAsync, KTComputed, KTConditional, KTFor, KTReactive, KTReactiveType, KTRef, applyAttr, computed, h as createElement, mathml$1 as createMathMLElement, svg$1 as createSVGElement, dereactive, effect, h, isComputed, isKT, isRef, jsx, jsxDEV, jsxs, mathml, mathml as mathmlRuntime, ref, surfaceRef, svg, svg as svgRuntime, toReactive, toRef };
|
|
1487
|
-
export type { EventHandler, HTML, KTAttribute, KTForElement, KTForProps, KTPrefixedEventAttribute, KTRawAttr, KTRawContent, KTRawContents, KTReactify, KTReactifyObject, KTReactifyProps, KTSurfaceRef, ReactiveChangeHandler, ReactiveChangeKey };
|
|
1534
|
+
export type { EventHandler, HTML, KTAttribute, KTForElement, KTForProps, KTMaybeReactive, KTMaybeReactiveProps, KTPrefixedEventAttribute, KTRawAttr, KTRawContent, KTRawContents, KTReactify, KTReactifyObject, KTReactifyProps, KTReactifySplit, KTSurfaceRef, ReactiveChangeHandler, ReactiveChangeKey };
|