@ktjs/core 0.26.1 → 0.26.4
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 +119 -117
- package/dist/index.iife.js +5 -7
- package/dist/index.legacy.js +5 -7
- package/dist/index.mjs +5 -7
- package/dist/jsx/index.d.ts +117 -118
- package/dist/jsx/index.mjs +2 -7
- package/dist/jsx/jsx-runtime.d.ts +1 -1
- package/dist/jsx/jsx-runtime.mjs +2 -7
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -88,11 +88,8 @@ if (typeof Symbol === 'undefined') {
|
|
|
88
88
|
}
|
|
89
89
|
|
|
90
90
|
// Shared utilities and cached native methods for kt.js framework
|
|
91
|
-
Object.defineProperty(window, '__ktjs__', { value: '0.
|
|
91
|
+
Object.defineProperty(window, '__ktjs__', { value: '0.23.0' });
|
|
92
92
|
|
|
93
|
-
// export const KT_TYPE_REF = 1 as const;
|
|
94
|
-
// export const KT_TYPE_COMPUTED = 2 as const;
|
|
95
|
-
// export type KTReactiveTypeEnum = typeof KT_TYPE_REF | typeof KT_TYPE_COMPUTED;
|
|
96
93
|
const isKT = (obj) => obj?.isKT;
|
|
97
94
|
const isRef = (obj) => obj?.ktType === 1 /* KTReactiveType.REF */;
|
|
98
95
|
const isComputed = (obj) => obj?.ktType === 2 /* KTReactiveType.COMPUTED */;
|
|
@@ -156,12 +153,10 @@ function attrIsObject(element, attr) {
|
|
|
156
153
|
classValue.addOnChange((v) => element.setAttribute('class', v));
|
|
157
154
|
}
|
|
158
155
|
else {
|
|
159
|
-
// todo 这里要让undefined 排除出reactify类型工具之外
|
|
160
156
|
element.setAttribute('class', classValue);
|
|
161
157
|
}
|
|
162
158
|
}
|
|
163
159
|
// todo 这里加入reactive支持
|
|
164
|
-
// todo 类型定义也要支持reactive响应式
|
|
165
160
|
const style = attr.style;
|
|
166
161
|
if (style) {
|
|
167
162
|
if (typeof style === 'string') {
|
|
@@ -435,6 +430,9 @@ class KTComputed {
|
|
|
435
430
|
* @internal
|
|
436
431
|
*/
|
|
437
432
|
_onChanges = [];
|
|
433
|
+
/**
|
|
434
|
+
* @internal
|
|
435
|
+
*/
|
|
438
436
|
_subscribe(reactives) {
|
|
439
437
|
for (let i = 0; i < reactives.length; i++) {
|
|
440
438
|
const reactive = reactives[i];
|
|
@@ -596,7 +594,7 @@ let creator = htmlCreator;
|
|
|
596
594
|
* ## About
|
|
597
595
|
* @package @ktjs/core
|
|
598
596
|
* @author Kasukabe Tsumugi <futami16237@gmail.com>
|
|
599
|
-
* @version 0.26.
|
|
597
|
+
* @version 0.26.4 (Last Update: 2026.02.05 23:37:34.691)
|
|
600
598
|
* @license MIT
|
|
601
599
|
* @link https://github.com/baendlorel/kt.js
|
|
602
600
|
* @link https://baendlorel.github.io/ Welcome to my site!
|
package/dist/jsx/index.d.ts
CHANGED
|
@@ -13,7 +13,6 @@ declare class KTComputed<T> {
|
|
|
13
13
|
*/
|
|
14
14
|
isKT: true;
|
|
15
15
|
ktType: KTReactiveType;
|
|
16
|
-
private _subscribe;
|
|
17
16
|
constructor(_calculator: () => T, reactives: Array<KTReactive<unknown>>);
|
|
18
17
|
/**
|
|
19
18
|
* If new value and old value are both nodes, the old one will be replaced in the DOM
|
|
@@ -33,9 +32,9 @@ declare class KTComputed<T> {
|
|
|
33
32
|
}
|
|
34
33
|
|
|
35
34
|
type KTReactive<T> = KTRef<T> | KTComputed<T>;
|
|
36
|
-
type KTReactify<T> = T extends any ? KTReactive<T>
|
|
37
|
-
type
|
|
38
|
-
[K in keyof T]: KTReactify<T[K]
|
|
35
|
+
type KTReactify<T> = T extends any ? KTReactive<T> : never;
|
|
36
|
+
type KTReactifyProps<T extends object> = {
|
|
37
|
+
[K in keyof T]: KTReactify<Exclude<T[K], undefined>> | T[K];
|
|
39
38
|
};
|
|
40
39
|
|
|
41
40
|
declare const enum KTReactiveType {
|
|
@@ -172,7 +171,7 @@ type KTAttribute = KTBaseAttribute & KTPrefixedEventAttribute;
|
|
|
172
171
|
* ## About
|
|
173
172
|
* @package @ktjs/core
|
|
174
173
|
* @author Kasukabe Tsumugi <futami16237@gmail.com>
|
|
175
|
-
* @version 0.26.
|
|
174
|
+
* @version 0.26.4 (Last Update: 2026.02.05 23:37:34.691)
|
|
176
175
|
* @license MIT
|
|
177
176
|
* @link https://github.com/baendlorel/kt.js
|
|
178
177
|
* @link https://baendlorel.github.io/ Welcome to my site!
|
|
@@ -224,7 +223,7 @@ declare function createRedrawable<T>(creator: () => T): KTRef<T> & {
|
|
|
224
223
|
|
|
225
224
|
// Base events available to all HTML elements
|
|
226
225
|
type BaseAttr = KTPrefixedEventAttribute &
|
|
227
|
-
|
|
226
|
+
KTReactifyProps<{
|
|
228
227
|
[k: string]: any;
|
|
229
228
|
|
|
230
229
|
// # base attributes
|
|
@@ -236,7 +235,7 @@ type BaseAttr = KTPrefixedEventAttribute &
|
|
|
236
235
|
interface AttributesMap {
|
|
237
236
|
// Anchor element
|
|
238
237
|
a: BaseAttr &
|
|
239
|
-
|
|
238
|
+
KTReactifyProps<{
|
|
240
239
|
download?: string;
|
|
241
240
|
href?: string;
|
|
242
241
|
hreflang?: string;
|
|
@@ -257,7 +256,7 @@ interface AttributesMap {
|
|
|
257
256
|
|
|
258
257
|
// Area element
|
|
259
258
|
area: BaseAttr &
|
|
260
|
-
|
|
259
|
+
KTReactifyProps<{
|
|
261
260
|
alt?: string;
|
|
262
261
|
coords?: string;
|
|
263
262
|
download?: string;
|
|
@@ -279,7 +278,7 @@ interface AttributesMap {
|
|
|
279
278
|
|
|
280
279
|
// Audio element
|
|
281
280
|
audio: BaseAttr &
|
|
282
|
-
|
|
281
|
+
KTReactifyProps<{
|
|
283
282
|
autoplay?: boolean;
|
|
284
283
|
controls?: boolean;
|
|
285
284
|
crossorigin?: 'anonymous' | 'use-credentials' | '';
|
|
@@ -291,20 +290,20 @@ interface AttributesMap {
|
|
|
291
290
|
|
|
292
291
|
// Base element
|
|
293
292
|
base: BaseAttr &
|
|
294
|
-
|
|
293
|
+
KTReactifyProps<{
|
|
295
294
|
href?: string;
|
|
296
295
|
target?: '_self' | '_blank' | '_parent' | '_top' | string;
|
|
297
296
|
}>;
|
|
298
297
|
|
|
299
298
|
// Body element
|
|
300
|
-
body: BaseAttr &
|
|
299
|
+
body: BaseAttr & KTReactifyProps<{}>;
|
|
301
300
|
|
|
302
301
|
// BR element
|
|
303
|
-
br: BaseAttr &
|
|
302
|
+
br: BaseAttr & KTReactifyProps<{}>;
|
|
304
303
|
|
|
305
304
|
// Button element
|
|
306
305
|
button: BaseAttr &
|
|
307
|
-
|
|
306
|
+
KTReactifyProps<{
|
|
308
307
|
disabled?: boolean;
|
|
309
308
|
form?: string;
|
|
310
309
|
formaction?: string;
|
|
@@ -319,57 +318,57 @@ interface AttributesMap {
|
|
|
319
318
|
|
|
320
319
|
// Canvas element
|
|
321
320
|
canvas: BaseAttr &
|
|
322
|
-
|
|
321
|
+
KTReactifyProps<{
|
|
323
322
|
height?: number | string;
|
|
324
323
|
width?: number | string;
|
|
325
324
|
}>;
|
|
326
325
|
|
|
327
326
|
// Table caption element
|
|
328
|
-
caption: BaseAttr &
|
|
327
|
+
caption: BaseAttr & KTReactifyProps<{}>;
|
|
329
328
|
|
|
330
329
|
// Col element
|
|
331
330
|
col: BaseAttr &
|
|
332
|
-
|
|
331
|
+
KTReactifyProps<{
|
|
333
332
|
span?: number | string;
|
|
334
333
|
}>;
|
|
335
334
|
|
|
336
335
|
// Colgroup element
|
|
337
336
|
colgroup: BaseAttr &
|
|
338
|
-
|
|
337
|
+
KTReactifyProps<{
|
|
339
338
|
span?: number | string;
|
|
340
339
|
}>;
|
|
341
340
|
|
|
342
341
|
// Data element
|
|
343
342
|
data: BaseAttr &
|
|
344
|
-
|
|
343
|
+
KTReactifyProps<{
|
|
345
344
|
value?: string;
|
|
346
345
|
}>;
|
|
347
346
|
|
|
348
347
|
// Datalist element
|
|
349
|
-
datalist: BaseAttr &
|
|
348
|
+
datalist: BaseAttr & KTReactifyProps<{}>;
|
|
350
349
|
|
|
351
350
|
// Del element
|
|
352
351
|
del: BaseAttr &
|
|
353
|
-
|
|
352
|
+
KTReactifyProps<{
|
|
354
353
|
cite?: string;
|
|
355
354
|
datetime?: string;
|
|
356
355
|
}>;
|
|
357
356
|
|
|
358
357
|
// Details element
|
|
359
358
|
details: BaseAttr &
|
|
360
|
-
|
|
359
|
+
KTReactifyProps<{
|
|
361
360
|
open?: boolean;
|
|
362
361
|
}>;
|
|
363
362
|
|
|
364
363
|
// Dialog element
|
|
365
364
|
dialog: BaseAttr &
|
|
366
|
-
|
|
365
|
+
KTReactifyProps<{
|
|
367
366
|
open?: boolean;
|
|
368
367
|
}>;
|
|
369
368
|
|
|
370
369
|
// Embed element
|
|
371
370
|
embed: BaseAttr &
|
|
372
|
-
|
|
371
|
+
KTReactifyProps<{
|
|
373
372
|
height?: number | string;
|
|
374
373
|
src?: string;
|
|
375
374
|
type?: string;
|
|
@@ -378,7 +377,7 @@ interface AttributesMap {
|
|
|
378
377
|
|
|
379
378
|
// Fieldset element
|
|
380
379
|
fieldset: BaseAttr &
|
|
381
|
-
|
|
380
|
+
KTReactifyProps<{
|
|
382
381
|
disabled?: boolean;
|
|
383
382
|
form?: string;
|
|
384
383
|
name?: string;
|
|
@@ -386,7 +385,7 @@ interface AttributesMap {
|
|
|
386
385
|
|
|
387
386
|
// Form element
|
|
388
387
|
form: BaseAttr &
|
|
389
|
-
|
|
388
|
+
KTReactifyProps<{
|
|
390
389
|
'accept-charset'?: string;
|
|
391
390
|
action?: string;
|
|
392
391
|
autocomplete?: 'on' | 'off';
|
|
@@ -399,17 +398,17 @@ interface AttributesMap {
|
|
|
399
398
|
}>;
|
|
400
399
|
|
|
401
400
|
// Head element
|
|
402
|
-
head: BaseAttr &
|
|
401
|
+
head: BaseAttr & KTReactifyProps<{}>;
|
|
403
402
|
|
|
404
403
|
// HR element
|
|
405
|
-
hr: BaseAttr &
|
|
404
|
+
hr: BaseAttr & KTReactifyProps<{}>;
|
|
406
405
|
|
|
407
406
|
// HTML element
|
|
408
|
-
html: BaseAttr &
|
|
407
|
+
html: BaseAttr & KTReactifyProps<{}>;
|
|
409
408
|
|
|
410
409
|
// IFrame element
|
|
411
410
|
iframe: BaseAttr &
|
|
412
|
-
|
|
411
|
+
KTReactifyProps<{
|
|
413
412
|
allow?: string;
|
|
414
413
|
allowfullscreen?: boolean;
|
|
415
414
|
allowpaymentrequest?: boolean;
|
|
@@ -433,7 +432,7 @@ interface AttributesMap {
|
|
|
433
432
|
|
|
434
433
|
// Image element
|
|
435
434
|
img: BaseAttr &
|
|
436
|
-
|
|
435
|
+
KTReactifyProps<{
|
|
437
436
|
alt?: string;
|
|
438
437
|
crossorigin?: 'anonymous' | 'use-credentials' | '';
|
|
439
438
|
decoding?: 'sync' | 'async' | 'auto';
|
|
@@ -458,7 +457,7 @@ interface AttributesMap {
|
|
|
458
457
|
|
|
459
458
|
// Input element
|
|
460
459
|
input: BaseAttr &
|
|
461
|
-
|
|
460
|
+
KTReactifyProps<{
|
|
462
461
|
accept?: string;
|
|
463
462
|
alt?: string;
|
|
464
463
|
autocomplete?: string;
|
|
@@ -515,29 +514,29 @@ interface AttributesMap {
|
|
|
515
514
|
|
|
516
515
|
// Ins element
|
|
517
516
|
ins: BaseAttr &
|
|
518
|
-
|
|
517
|
+
KTReactifyProps<{
|
|
519
518
|
cite?: string;
|
|
520
519
|
datetime?: string;
|
|
521
520
|
}>;
|
|
522
521
|
|
|
523
522
|
// Label element
|
|
524
523
|
label: BaseAttr &
|
|
525
|
-
|
|
524
|
+
KTReactifyProps<{
|
|
526
525
|
for?: string;
|
|
527
526
|
}>;
|
|
528
527
|
|
|
529
528
|
// Legend element
|
|
530
|
-
legend: BaseAttr &
|
|
529
|
+
legend: BaseAttr & KTReactifyProps<{}>;
|
|
531
530
|
|
|
532
531
|
// LI element
|
|
533
532
|
li: BaseAttr &
|
|
534
|
-
|
|
533
|
+
KTReactifyProps<{
|
|
535
534
|
value?: number | string;
|
|
536
535
|
}>;
|
|
537
536
|
|
|
538
537
|
// Link element
|
|
539
538
|
link: BaseAttr &
|
|
540
|
-
|
|
539
|
+
KTReactifyProps<{
|
|
541
540
|
as?: string;
|
|
542
541
|
crossorigin?: 'anonymous' | 'use-credentials' | '';
|
|
543
542
|
disabled?: boolean;
|
|
@@ -563,16 +562,16 @@ interface AttributesMap {
|
|
|
563
562
|
|
|
564
563
|
// Map element
|
|
565
564
|
map: BaseAttr &
|
|
566
|
-
|
|
565
|
+
KTReactifyProps<{
|
|
567
566
|
name?: string;
|
|
568
567
|
}>;
|
|
569
568
|
|
|
570
569
|
// Menu element
|
|
571
|
-
menu: BaseAttr &
|
|
570
|
+
menu: BaseAttr & KTReactifyProps<{}>;
|
|
572
571
|
|
|
573
572
|
// Meta element
|
|
574
573
|
meta: BaseAttr &
|
|
575
|
-
|
|
574
|
+
KTReactifyProps<{
|
|
576
575
|
charset?: string;
|
|
577
576
|
content?: string;
|
|
578
577
|
'http-equiv'?: 'content-security-policy' | 'content-type' | 'default-style' | 'refresh' | string;
|
|
@@ -581,7 +580,7 @@ interface AttributesMap {
|
|
|
581
580
|
|
|
582
581
|
// Meter element
|
|
583
582
|
meter: BaseAttr &
|
|
584
|
-
|
|
583
|
+
KTReactifyProps<{
|
|
585
584
|
form?: string;
|
|
586
585
|
high?: number | string;
|
|
587
586
|
low?: number | string;
|
|
@@ -593,7 +592,7 @@ interface AttributesMap {
|
|
|
593
592
|
|
|
594
593
|
// Object element
|
|
595
594
|
object: BaseAttr &
|
|
596
|
-
|
|
595
|
+
KTReactifyProps<{
|
|
597
596
|
data?: string;
|
|
598
597
|
form?: string;
|
|
599
598
|
height?: number | string;
|
|
@@ -605,7 +604,7 @@ interface AttributesMap {
|
|
|
605
604
|
|
|
606
605
|
// OL element
|
|
607
606
|
ol: BaseAttr &
|
|
608
|
-
|
|
607
|
+
KTReactifyProps<{
|
|
609
608
|
reversed?: boolean;
|
|
610
609
|
start?: number | string;
|
|
611
610
|
type?: '1' | 'a' | 'A' | 'i' | 'I';
|
|
@@ -613,14 +612,14 @@ interface AttributesMap {
|
|
|
613
612
|
|
|
614
613
|
// Optgroup element
|
|
615
614
|
optgroup: BaseAttr &
|
|
616
|
-
|
|
615
|
+
KTReactifyProps<{
|
|
617
616
|
disabled?: boolean;
|
|
618
617
|
label?: string;
|
|
619
618
|
}>;
|
|
620
619
|
|
|
621
620
|
// Option element
|
|
622
621
|
option: BaseAttr &
|
|
623
|
-
|
|
622
|
+
KTReactifyProps<{
|
|
624
623
|
disabled?: boolean;
|
|
625
624
|
label?: string;
|
|
626
625
|
selected?: boolean;
|
|
@@ -629,39 +628,39 @@ interface AttributesMap {
|
|
|
629
628
|
|
|
630
629
|
// Output element
|
|
631
630
|
output: BaseAttr &
|
|
632
|
-
|
|
631
|
+
KTReactifyProps<{
|
|
633
632
|
for?: string;
|
|
634
633
|
form?: string;
|
|
635
634
|
name?: string;
|
|
636
635
|
}>;
|
|
637
636
|
|
|
638
637
|
// Picture element
|
|
639
|
-
picture: BaseAttr &
|
|
638
|
+
picture: BaseAttr & KTReactifyProps<{}>;
|
|
640
639
|
|
|
641
640
|
// Pre element
|
|
642
|
-
pre: BaseAttr &
|
|
641
|
+
pre: BaseAttr & KTReactifyProps<{}>;
|
|
643
642
|
|
|
644
643
|
// Progress element
|
|
645
644
|
progress: BaseAttr &
|
|
646
|
-
|
|
645
|
+
KTReactifyProps<{
|
|
647
646
|
max?: number | string;
|
|
648
647
|
value?: number | string;
|
|
649
648
|
}>;
|
|
650
649
|
|
|
651
650
|
// Quote element (q and blockquote)
|
|
652
651
|
q: BaseAttr &
|
|
653
|
-
|
|
652
|
+
KTReactifyProps<{
|
|
654
653
|
cite?: string;
|
|
655
654
|
}>;
|
|
656
655
|
|
|
657
656
|
blockquote: BaseAttr &
|
|
658
|
-
|
|
657
|
+
KTReactifyProps<{
|
|
659
658
|
cite?: string;
|
|
660
659
|
}>;
|
|
661
660
|
|
|
662
661
|
// Script element
|
|
663
662
|
script: BaseAttr &
|
|
664
|
-
|
|
663
|
+
KTReactifyProps<{
|
|
665
664
|
async?: boolean;
|
|
666
665
|
crossorigin?: 'anonymous' | 'use-credentials' | '';
|
|
667
666
|
defer?: boolean;
|
|
@@ -682,7 +681,7 @@ interface AttributesMap {
|
|
|
682
681
|
|
|
683
682
|
// Select element
|
|
684
683
|
select: BaseAttr &
|
|
685
|
-
|
|
684
|
+
KTReactifyProps<{
|
|
686
685
|
autocomplete?: string;
|
|
687
686
|
disabled?: boolean;
|
|
688
687
|
form?: string;
|
|
@@ -694,13 +693,13 @@ interface AttributesMap {
|
|
|
694
693
|
|
|
695
694
|
// Slot element
|
|
696
695
|
slot: BaseAttr &
|
|
697
|
-
|
|
696
|
+
KTReactifyProps<{
|
|
698
697
|
name?: string;
|
|
699
698
|
}>;
|
|
700
699
|
|
|
701
700
|
// Source element
|
|
702
701
|
source: BaseAttr &
|
|
703
|
-
|
|
702
|
+
KTReactifyProps<{
|
|
704
703
|
height?: number | string;
|
|
705
704
|
media?: string;
|
|
706
705
|
sizes?: string;
|
|
@@ -712,30 +711,30 @@ interface AttributesMap {
|
|
|
712
711
|
|
|
713
712
|
// Style element
|
|
714
713
|
style: BaseAttr &
|
|
715
|
-
|
|
714
|
+
KTReactifyProps<{
|
|
716
715
|
media?: string;
|
|
717
716
|
}>;
|
|
718
717
|
|
|
719
718
|
// Table element
|
|
720
|
-
table: BaseAttr &
|
|
719
|
+
table: BaseAttr & KTReactifyProps<{}>;
|
|
721
720
|
|
|
722
721
|
// Table body/footer/header elements
|
|
723
|
-
tbody: BaseAttr &
|
|
722
|
+
tbody: BaseAttr & KTReactifyProps<{}>;
|
|
724
723
|
|
|
725
|
-
tfoot: BaseAttr &
|
|
724
|
+
tfoot: BaseAttr & KTReactifyProps<{}>;
|
|
726
725
|
|
|
727
|
-
thead: BaseAttr &
|
|
726
|
+
thead: BaseAttr & KTReactifyProps<{}>;
|
|
728
727
|
|
|
729
728
|
// Table cell elements
|
|
730
729
|
td: BaseAttr &
|
|
731
|
-
|
|
730
|
+
KTReactifyProps<{
|
|
732
731
|
colspan?: number | string;
|
|
733
732
|
headers?: string;
|
|
734
733
|
rowspan?: number | string;
|
|
735
734
|
}>;
|
|
736
735
|
|
|
737
736
|
th: BaseAttr &
|
|
738
|
-
|
|
737
|
+
KTReactifyProps<{
|
|
739
738
|
abbr?: string;
|
|
740
739
|
colspan?: number | string;
|
|
741
740
|
headers?: string;
|
|
@@ -744,11 +743,11 @@ interface AttributesMap {
|
|
|
744
743
|
}>;
|
|
745
744
|
|
|
746
745
|
// Template element
|
|
747
|
-
template: BaseAttr &
|
|
746
|
+
template: BaseAttr & KTReactifyProps<{}>;
|
|
748
747
|
|
|
749
748
|
// Textarea element
|
|
750
749
|
textarea: BaseAttr &
|
|
751
|
-
|
|
750
|
+
KTReactifyProps<{
|
|
752
751
|
autocomplete?: string;
|
|
753
752
|
cols?: number | string;
|
|
754
753
|
dirname?: string;
|
|
@@ -766,19 +765,19 @@ interface AttributesMap {
|
|
|
766
765
|
|
|
767
766
|
// Time element
|
|
768
767
|
time: BaseAttr &
|
|
769
|
-
|
|
768
|
+
KTReactifyProps<{
|
|
770
769
|
datetime?: string;
|
|
771
770
|
}>;
|
|
772
771
|
|
|
773
772
|
// Title element
|
|
774
|
-
title: BaseAttr &
|
|
773
|
+
title: BaseAttr & KTReactifyProps<{}>;
|
|
775
774
|
|
|
776
775
|
// TR element
|
|
777
|
-
tr: BaseAttr &
|
|
776
|
+
tr: BaseAttr & KTReactifyProps<{}>;
|
|
778
777
|
|
|
779
778
|
// Track element
|
|
780
779
|
track: BaseAttr &
|
|
781
|
-
|
|
780
|
+
KTReactifyProps<{
|
|
782
781
|
default?: boolean;
|
|
783
782
|
kind?: 'subtitles' | 'captions' | 'descriptions' | 'chapters' | 'metadata';
|
|
784
783
|
label?: string;
|
|
@@ -787,11 +786,11 @@ interface AttributesMap {
|
|
|
787
786
|
}>;
|
|
788
787
|
|
|
789
788
|
// UL element
|
|
790
|
-
ul: BaseAttr &
|
|
789
|
+
ul: BaseAttr & KTReactifyProps<{}>;
|
|
791
790
|
|
|
792
791
|
// Video element
|
|
793
792
|
video: BaseAttr &
|
|
794
|
-
|
|
793
|
+
KTReactifyProps<{
|
|
795
794
|
autoplay?: boolean;
|
|
796
795
|
controls?: boolean;
|
|
797
796
|
crossorigin?: 'anonymous' | 'use-credentials' | '';
|
|
@@ -806,55 +805,55 @@ interface AttributesMap {
|
|
|
806
805
|
}>;
|
|
807
806
|
|
|
808
807
|
// Generic HTMLElement (no specific attributes beyond BaseEvent)
|
|
809
|
-
abbr: BaseAttr &
|
|
810
|
-
address: BaseAttr &
|
|
811
|
-
article: BaseAttr &
|
|
812
|
-
aside: BaseAttr &
|
|
813
|
-
b: BaseAttr &
|
|
814
|
-
bdi: BaseAttr &
|
|
815
|
-
bdo: BaseAttr &
|
|
816
|
-
cite: BaseAttr &
|
|
817
|
-
code: BaseAttr &
|
|
818
|
-
dd: BaseAttr &
|
|
819
|
-
dfn: BaseAttr &
|
|
820
|
-
div: BaseAttr &
|
|
821
|
-
dl: BaseAttr &
|
|
822
|
-
dt: BaseAttr &
|
|
823
|
-
em: BaseAttr &
|
|
824
|
-
figcaption: BaseAttr &
|
|
825
|
-
figure: BaseAttr &
|
|
826
|
-
footer: BaseAttr &
|
|
827
|
-
h1: BaseAttr &
|
|
828
|
-
h2: BaseAttr &
|
|
829
|
-
h3: BaseAttr &
|
|
830
|
-
h4: BaseAttr &
|
|
831
|
-
h5: BaseAttr &
|
|
832
|
-
h6: BaseAttr &
|
|
833
|
-
header: BaseAttr &
|
|
834
|
-
hgroup: BaseAttr &
|
|
835
|
-
i: BaseAttr &
|
|
836
|
-
kbd: BaseAttr &
|
|
837
|
-
main: BaseAttr &
|
|
838
|
-
mark: BaseAttr &
|
|
839
|
-
nav: BaseAttr &
|
|
840
|
-
noscript: BaseAttr &
|
|
841
|
-
p: BaseAttr &
|
|
842
|
-
rp: BaseAttr &
|
|
843
|
-
rt: BaseAttr &
|
|
844
|
-
ruby: BaseAttr &
|
|
845
|
-
s: BaseAttr &
|
|
846
|
-
samp: BaseAttr &
|
|
847
|
-
search: BaseAttr &
|
|
848
|
-
section: BaseAttr &
|
|
849
|
-
small: BaseAttr &
|
|
850
|
-
span: BaseAttr &
|
|
851
|
-
strong: BaseAttr &
|
|
852
|
-
sub: BaseAttr &
|
|
853
|
-
summary: BaseAttr &
|
|
854
|
-
sup: BaseAttr &
|
|
855
|
-
u: BaseAttr &
|
|
856
|
-
var: BaseAttr &
|
|
857
|
-
wbr: BaseAttr &
|
|
808
|
+
abbr: BaseAttr & KTReactifyProps<{}>;
|
|
809
|
+
address: BaseAttr & KTReactifyProps<{}>;
|
|
810
|
+
article: BaseAttr & KTReactifyProps<{}>;
|
|
811
|
+
aside: BaseAttr & KTReactifyProps<{}>;
|
|
812
|
+
b: BaseAttr & KTReactifyProps<{}>;
|
|
813
|
+
bdi: BaseAttr & KTReactifyProps<{}>;
|
|
814
|
+
bdo: BaseAttr & KTReactifyProps<{}>;
|
|
815
|
+
cite: BaseAttr & KTReactifyProps<{}>;
|
|
816
|
+
code: BaseAttr & KTReactifyProps<{}>;
|
|
817
|
+
dd: BaseAttr & KTReactifyProps<{}>;
|
|
818
|
+
dfn: BaseAttr & KTReactifyProps<{}>;
|
|
819
|
+
div: BaseAttr & KTReactifyProps<{}>;
|
|
820
|
+
dl: BaseAttr & KTReactifyProps<{}>;
|
|
821
|
+
dt: BaseAttr & KTReactifyProps<{}>;
|
|
822
|
+
em: BaseAttr & KTReactifyProps<{}>;
|
|
823
|
+
figcaption: BaseAttr & KTReactifyProps<{}>;
|
|
824
|
+
figure: BaseAttr & KTReactifyProps<{}>;
|
|
825
|
+
footer: BaseAttr & KTReactifyProps<{}>;
|
|
826
|
+
h1: BaseAttr & KTReactifyProps<{}>;
|
|
827
|
+
h2: BaseAttr & KTReactifyProps<{}>;
|
|
828
|
+
h3: BaseAttr & KTReactifyProps<{}>;
|
|
829
|
+
h4: BaseAttr & KTReactifyProps<{}>;
|
|
830
|
+
h5: BaseAttr & KTReactifyProps<{}>;
|
|
831
|
+
h6: BaseAttr & KTReactifyProps<{}>;
|
|
832
|
+
header: BaseAttr & KTReactifyProps<{}>;
|
|
833
|
+
hgroup: BaseAttr & KTReactifyProps<{}>;
|
|
834
|
+
i: BaseAttr & KTReactifyProps<{}>;
|
|
835
|
+
kbd: BaseAttr & KTReactifyProps<{}>;
|
|
836
|
+
main: BaseAttr & KTReactifyProps<{}>;
|
|
837
|
+
mark: BaseAttr & KTReactifyProps<{}>;
|
|
838
|
+
nav: BaseAttr & KTReactifyProps<{}>;
|
|
839
|
+
noscript: BaseAttr & KTReactifyProps<{}>;
|
|
840
|
+
p: BaseAttr & KTReactifyProps<{}>;
|
|
841
|
+
rp: BaseAttr & KTReactifyProps<{}>;
|
|
842
|
+
rt: BaseAttr & KTReactifyProps<{}>;
|
|
843
|
+
ruby: BaseAttr & KTReactifyProps<{}>;
|
|
844
|
+
s: BaseAttr & KTReactifyProps<{}>;
|
|
845
|
+
samp: BaseAttr & KTReactifyProps<{}>;
|
|
846
|
+
search: BaseAttr & KTReactifyProps<{}>;
|
|
847
|
+
section: BaseAttr & KTReactifyProps<{}>;
|
|
848
|
+
small: BaseAttr & KTReactifyProps<{}>;
|
|
849
|
+
span: BaseAttr & KTReactifyProps<{}>;
|
|
850
|
+
strong: BaseAttr & KTReactifyProps<{}>;
|
|
851
|
+
sub: BaseAttr & KTReactifyProps<{}>;
|
|
852
|
+
summary: BaseAttr & KTReactifyProps<{}>;
|
|
853
|
+
sup: BaseAttr & KTReactifyProps<{}>;
|
|
854
|
+
u: BaseAttr & KTReactifyProps<{}>;
|
|
855
|
+
var: BaseAttr & KTReactifyProps<{}>;
|
|
856
|
+
wbr: BaseAttr & KTReactifyProps<{}>;
|
|
858
857
|
|
|
859
858
|
svg: BaseAttr & {
|
|
860
859
|
class?: string;
|
package/dist/jsx/index.mjs
CHANGED
|
@@ -81,11 +81,8 @@ if (typeof Symbol === 'undefined') {
|
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
// Shared utilities and cached native methods for kt.js framework
|
|
84
|
-
Object.defineProperty(window, '__ktjs__', { value: '0.
|
|
84
|
+
Object.defineProperty(window, '__ktjs__', { value: '0.23.0' });
|
|
85
85
|
|
|
86
|
-
// export const KT_TYPE_REF = 1 as const;
|
|
87
|
-
// export const KT_TYPE_COMPUTED = 2 as const;
|
|
88
|
-
// export type KTReactiveTypeEnum = typeof KT_TYPE_REF | typeof KT_TYPE_COMPUTED;
|
|
89
86
|
const isKT = (obj) => obj?.isKT;
|
|
90
87
|
const isRef = (obj) => obj?.ktType === 1 /* KTReactiveType.REF */;
|
|
91
88
|
const isComputed = (obj) => obj?.ktType === 2 /* KTReactiveType.COMPUTED */;
|
|
@@ -149,12 +146,10 @@ function attrIsObject(element, attr) {
|
|
|
149
146
|
classValue.addOnChange((v) => element.setAttribute('class', v));
|
|
150
147
|
}
|
|
151
148
|
else {
|
|
152
|
-
// todo 这里要让undefined 排除出reactify类型工具之外
|
|
153
149
|
element.setAttribute('class', classValue);
|
|
154
150
|
}
|
|
155
151
|
}
|
|
156
152
|
// todo 这里加入reactive支持
|
|
157
|
-
// todo 类型定义也要支持reactive响应式
|
|
158
153
|
const style = attr.style;
|
|
159
154
|
if (style) {
|
|
160
155
|
if (typeof style === 'string') {
|
|
@@ -388,7 +383,7 @@ let creator = htmlCreator;
|
|
|
388
383
|
* ## About
|
|
389
384
|
* @package @ktjs/core
|
|
390
385
|
* @author Kasukabe Tsumugi <futami16237@gmail.com>
|
|
391
|
-
* @version 0.26.
|
|
386
|
+
* @version 0.26.4 (Last Update: 2026.02.05 23:37:34.691)
|
|
392
387
|
* @license MIT
|
|
393
388
|
* @link https://github.com/baendlorel/kt.js
|
|
394
389
|
* @link https://baendlorel.github.io/ Welcome to my site!
|
|
@@ -141,7 +141,7 @@ type KTAttribute = KTBaseAttribute & KTPrefixedEventAttribute;
|
|
|
141
141
|
* ## About
|
|
142
142
|
* @package @ktjs/core
|
|
143
143
|
* @author Kasukabe Tsumugi <futami16237@gmail.com>
|
|
144
|
-
* @version 0.26.
|
|
144
|
+
* @version 0.26.4 (Last Update: 2026.02.05 23:37:34.691)
|
|
145
145
|
* @license MIT
|
|
146
146
|
* @link https://github.com/baendlorel/kt.js
|
|
147
147
|
* @link https://baendlorel.github.io/ Welcome to my site!
|