@ktjs/core 0.22.5 → 0.24.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 +227 -298
- package/dist/index.iife.js +295 -145
- package/dist/index.legacy.js +291 -143
- package/dist/index.mjs +290 -145
- package/dist/jsx/index.d.ts +180 -322
- package/dist/jsx/index.mjs +145 -145
- package/dist/jsx/jsx-runtime.d.ts +20 -8
- package/dist/jsx/jsx-runtime.mjs +144 -98
- package/package.json +2 -2
package/dist/jsx/index.d.ts
CHANGED
|
@@ -7,13 +7,19 @@ type HTMLTag = keyof HTMLElementTagNameMap;
|
|
|
7
7
|
type SVGTag = keyof SVGElementTagNameMap;
|
|
8
8
|
type MathMLTag = keyof MathMLElementTagNameMap;
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
declare const enum KTReactiveType {
|
|
11
|
+
REF = 1,
|
|
12
|
+
COMPUTED = 2
|
|
13
|
+
}
|
|
14
|
+
type ReactiveChangeHandler<T> = (newValue: T, oldValue: T) => void;
|
|
15
|
+
|
|
11
16
|
declare class KTRef<T> {
|
|
12
17
|
/**
|
|
13
18
|
* Indicates that this is a KTRef instance
|
|
14
19
|
*/
|
|
15
|
-
isKT:
|
|
16
|
-
|
|
20
|
+
isKT: true;
|
|
21
|
+
ktType: KTReactiveType;
|
|
22
|
+
constructor(_value: T, _onChanges: Array<ReactiveChangeHandler<T>>);
|
|
17
23
|
/**
|
|
18
24
|
* If new value and old value are both nodes, the old one will be replaced in the DOM
|
|
19
25
|
*/
|
|
@@ -23,36 +29,9 @@ declare class KTRef<T> {
|
|
|
23
29
|
* Register a callback when the value changes
|
|
24
30
|
* @param callback (newValue, oldValue) => xxx
|
|
25
31
|
*/
|
|
26
|
-
addOnChange(callback:
|
|
27
|
-
removeOnChange(callback:
|
|
32
|
+
addOnChange(callback: ReactiveChangeHandler<T>): void;
|
|
33
|
+
removeOnChange(callback: ReactiveChangeHandler<T>): boolean;
|
|
28
34
|
}
|
|
29
|
-
declare const isKTRef: <T = any>(obj: any) => obj is KTRef<T>;
|
|
30
|
-
/**
|
|
31
|
-
* Reference to the created HTML element.
|
|
32
|
-
* - **Only** respond to `ref.value` changes, not reactive to internal changes of the element.
|
|
33
|
-
* - can alse be used to store normal values, but it is not reactive.
|
|
34
|
-
* - if the value is already a `KTRef`, it will be returned **directly**.
|
|
35
|
-
* @param value mostly an HTMLElement
|
|
36
|
-
*/
|
|
37
|
-
declare function ref<T = JSX.Element>(value?: T | KTRef<T>, onChange?: RefChangeHandler<T>): KTRef<T>;
|
|
38
|
-
declare function deref<T = JSX.Element>(value: T | KTRef<T>): T;
|
|
39
|
-
type KTSurfaceRef<T extends Object> = {
|
|
40
|
-
[K in keyof T]: KTRef<T[K]>;
|
|
41
|
-
} & {
|
|
42
|
-
/**
|
|
43
|
-
* Get the dereferenced object like the original one
|
|
44
|
-
*/
|
|
45
|
-
kcollect: () => T;
|
|
46
|
-
};
|
|
47
|
-
/**
|
|
48
|
-
* Make all first-level properties of the object a `KTRef`.
|
|
49
|
-
* - `obj.a.b` is not reactive
|
|
50
|
-
*/
|
|
51
|
-
declare const surfaceRef: <T extends Object>(obj: T) => KTSurfaceRef<T>;
|
|
52
|
-
/**
|
|
53
|
-
* Assert k-model to be a ref object
|
|
54
|
-
*/
|
|
55
|
-
declare const $modelOrRef: <T = any>(props: any, defaultValue?: T) => KTRef<T>;
|
|
56
35
|
|
|
57
36
|
type HTML<T extends (HTMLTag | SVGTag | MathMLTag) & otherstring> = T extends SVGTag
|
|
58
37
|
? SVGElementTagNameMap[T]
|
|
@@ -87,6 +66,12 @@ interface KTBaseAttribute {
|
|
|
87
66
|
*/
|
|
88
67
|
'k-model'?: KTRef<any>;
|
|
89
68
|
|
|
69
|
+
/**
|
|
70
|
+
* Directly apply html string to `innerHTML`.
|
|
71
|
+
* - Would be reactive if `KTRef` instance is provided
|
|
72
|
+
*/
|
|
73
|
+
'k-html'?: any;
|
|
74
|
+
|
|
90
75
|
// # normal HTML attributes
|
|
91
76
|
id?: string;
|
|
92
77
|
class?: string;
|
|
@@ -140,11 +125,11 @@ interface KTBaseAttribute {
|
|
|
140
125
|
method?: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS' | 'CONNECT' | 'TRACE' | otherstring;
|
|
141
126
|
}
|
|
142
127
|
|
|
143
|
-
type
|
|
128
|
+
type KTPrefixedEventAttribute = {
|
|
144
129
|
[EventName in keyof HTMLElementEventMap as `on:${EventName}`]?: (ev: HTMLElementEventMap[EventName]) => void;
|
|
145
130
|
};
|
|
146
131
|
|
|
147
|
-
type KTAttribute = KTBaseAttribute &
|
|
132
|
+
type KTAttribute = KTBaseAttribute & KTPrefixedEventAttribute;
|
|
148
133
|
|
|
149
134
|
/**
|
|
150
135
|
* Create an enhanced HTMLElement.
|
|
@@ -156,7 +141,7 @@ type KTAttribute = KTBaseAttribute & KTPrefixedEventHandlers;
|
|
|
156
141
|
* ## About
|
|
157
142
|
* @package @ktjs/core
|
|
158
143
|
* @author Kasukabe Tsumugi <futami16237@gmail.com>
|
|
159
|
-
* @version 0.
|
|
144
|
+
* @version 0.24.0 (Last Update: 2026.02.05 12:08:54.164)
|
|
160
145
|
* @license MIT
|
|
161
146
|
* @link https://github.com/baendlorel/kt.js
|
|
162
147
|
* @link https://baendlorel.github.io/ Welcome to my site!
|
|
@@ -207,149 +192,14 @@ declare function createRedrawable<T>(creator: () => T): KTRef<T> & {
|
|
|
207
192
|
};
|
|
208
193
|
|
|
209
194
|
// Base events available to all HTML elements
|
|
210
|
-
|
|
195
|
+
type BaseAttr = KTPrefixedEventAttribute & {
|
|
211
196
|
[k: string]: any;
|
|
212
197
|
|
|
213
198
|
// # base attributes
|
|
214
199
|
class?: string;
|
|
215
200
|
className?: string;
|
|
216
201
|
style?: string | Partial<CSSStyleDeclaration>;
|
|
217
|
-
|
|
218
|
-
// # Events
|
|
219
|
-
// Mouse events
|
|
220
|
-
'on:click'?: (ev: PointerEvent) => void;
|
|
221
|
-
'on:dblclick'?: (ev: PointerEvent) => void;
|
|
222
|
-
'on:mousedown'?: (ev: PointerEvent) => void;
|
|
223
|
-
'on:mouseup'?: (ev: MouseEvent) => void;
|
|
224
|
-
'on:mousemove'?: (ev: MouseEvent) => void;
|
|
225
|
-
'on:mouseenter'?: (ev: MouseEvent) => void;
|
|
226
|
-
'on:mouseleave'?: (ev: MouseEvent) => void;
|
|
227
|
-
'on:mouseover'?: (ev: MouseEvent) => void;
|
|
228
|
-
'on:mouseout'?: (ev: MouseEvent) => void;
|
|
229
|
-
'on:contextmenu'?: (ev: PointerEvent) => void;
|
|
230
|
-
|
|
231
|
-
// Keyboard events
|
|
232
|
-
'on:keydown'?: (ev: KeyboardEvent) => void;
|
|
233
|
-
'on:keyup'?: (ev: KeyboardEvent) => void;
|
|
234
|
-
'on:keypress'?: (ev: KeyboardEvent) => void;
|
|
235
|
-
|
|
236
|
-
// Focus events
|
|
237
|
-
'on:focus'?: (ev: FocusEvent) => void;
|
|
238
|
-
'on:blur'?: (ev: FocusEvent) => void;
|
|
239
|
-
'on:focusin'?: (ev: FocusEvent) => void;
|
|
240
|
-
'on:focusout'?: (ev: FocusEvent) => void;
|
|
241
|
-
|
|
242
|
-
// Input events
|
|
243
|
-
'on:input'?: (ev: Event) => void;
|
|
244
|
-
'on:change'?: (ev: Event) => void;
|
|
245
|
-
'on:beforeinput'?: (ev: InputEvent) => void;
|
|
246
|
-
|
|
247
|
-
// Drag events
|
|
248
|
-
'on:drag'?: (ev: DragEvent) => void;
|
|
249
|
-
'on:dragstart'?: (ev: DragEvent) => void;
|
|
250
|
-
'on:dragend'?: (ev: DragEvent) => void;
|
|
251
|
-
'on:dragenter'?: (ev: DragEvent) => void;
|
|
252
|
-
'on:dragleave'?: (ev: DragEvent) => void;
|
|
253
|
-
'on:dragover'?: (ev: DragEvent) => void;
|
|
254
|
-
'on:drop'?: (ev: DragEvent) => void;
|
|
255
|
-
|
|
256
|
-
// Clipboard events
|
|
257
|
-
'on:copy'?: (ev: ClipboardEvent) => void;
|
|
258
|
-
'on:cut'?: (ev: ClipboardEvent) => void;
|
|
259
|
-
'on:paste'?: (ev: ClipboardEvent) => void;
|
|
260
|
-
|
|
261
|
-
// Touch events
|
|
262
|
-
'on:touchstart'?: (ev: TouchEvent) => void;
|
|
263
|
-
'on:touchmove'?: (ev: TouchEvent) => void;
|
|
264
|
-
'on:touchend'?: (ev: TouchEvent) => void;
|
|
265
|
-
'on:touchcancel'?: (ev: TouchEvent) => void;
|
|
266
|
-
|
|
267
|
-
// Wheel event
|
|
268
|
-
'on:wheel'?: (ev: WheelEvent) => void;
|
|
269
|
-
|
|
270
|
-
// Animation events
|
|
271
|
-
'on:animationstart'?: (ev: AnimationEvent) => void;
|
|
272
|
-
'on:animationend'?: (ev: AnimationEvent) => void;
|
|
273
|
-
'on:animationiteration'?: (ev: AnimationEvent) => void;
|
|
274
|
-
|
|
275
|
-
// Transition events
|
|
276
|
-
'on:transitionstart'?: (ev: TransitionEvent) => void;
|
|
277
|
-
'on:transitionend'?: (ev: TransitionEvent) => void;
|
|
278
|
-
'on:transitionrun'?: (ev: TransitionEvent) => void;
|
|
279
|
-
'on:transitioncancel'?: (ev: TransitionEvent) => void;
|
|
280
|
-
|
|
281
|
-
// Pointer events
|
|
282
|
-
'on:pointerdown'?: (ev: PointerEvent) => void;
|
|
283
|
-
'on:pointerup'?: (ev: PointerEvent) => void;
|
|
284
|
-
'on:pointermove'?: (ev: PointerEvent) => void;
|
|
285
|
-
'on:pointerenter'?: (ev: PointerEvent) => void;
|
|
286
|
-
'on:pointerleave'?: (ev: PointerEvent) => void;
|
|
287
|
-
'on:pointerover'?: (ev: PointerEvent) => void;
|
|
288
|
-
'on:pointerout'?: (ev: PointerEvent) => void;
|
|
289
|
-
'on:pointercancel'?: (ev: PointerEvent) => void;
|
|
290
|
-
'on:gotpointercapture'?: (ev: PointerEvent) => void;
|
|
291
|
-
'on:lostpointercapture'?: (ev: PointerEvent) => void;
|
|
292
|
-
|
|
293
|
-
// Selection events
|
|
294
|
-
'on:select'?: (ev: Event) => void;
|
|
295
|
-
'on:selectstart'?: (ev: Event) => void;
|
|
296
|
-
|
|
297
|
-
// Scroll event
|
|
298
|
-
'on:scroll'?: (ev: Event) => void;
|
|
299
|
-
|
|
300
|
-
// Resize event
|
|
301
|
-
'on:resize'?: (ev: UIEvent) => void;
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
// Form-specific events
|
|
305
|
-
interface FormElementEvents {
|
|
306
|
-
'on:submit'?: (ev: SubmitEvent) => void;
|
|
307
|
-
'on:reset'?: (ev: Event) => void;
|
|
308
|
-
'on:invalid'?: (ev: Event) => void;
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
// Media-specific events
|
|
312
|
-
interface MediaElementEvents {
|
|
313
|
-
'on:play'?: (ev: Event) => void;
|
|
314
|
-
'on:pause'?: (ev: Event) => void;
|
|
315
|
-
'on:playing'?: (ev: Event) => void;
|
|
316
|
-
'on:ended'?: (ev: Event) => void;
|
|
317
|
-
'on:canplay'?: (ev: Event) => void;
|
|
318
|
-
'on:canplaythrough'?: (ev: Event) => void;
|
|
319
|
-
'on:durationchange'?: (ev: Event) => void;
|
|
320
|
-
'on:emptied'?: (ev: Event) => void;
|
|
321
|
-
'on:loadeddata'?: (ev: Event) => void;
|
|
322
|
-
'on:loadedmetadata'?: (ev: Event) => void;
|
|
323
|
-
'on:loadstart'?: (ev: Event) => void;
|
|
324
|
-
'on:progress'?: (ev: ProgressEvent) => void;
|
|
325
|
-
'on:ratechange'?: (ev: Event) => void;
|
|
326
|
-
'on:seeked'?: (ev: Event) => void;
|
|
327
|
-
'on:seeking'?: (ev: Event) => void;
|
|
328
|
-
'on:stalled'?: (ev: Event) => void;
|
|
329
|
-
'on:suspend'?: (ev: Event) => void;
|
|
330
|
-
'on:timeupdate'?: (ev: Event) => void;
|
|
331
|
-
'on:volumechange'?: (ev: Event) => void;
|
|
332
|
-
'on:waiting'?: (ev: Event) => void;
|
|
333
|
-
'on:abort'?: (ev: UIEvent) => void;
|
|
334
|
-
'on:error'?: (ev: ErrorEvent) => void;
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
// Details-specific events
|
|
338
|
-
interface DetailsElementEvents {
|
|
339
|
-
'on:toggle'?: (ev: Event) => void;
|
|
340
|
-
}
|
|
341
|
-
|
|
342
|
-
// Dialog-specific events
|
|
343
|
-
interface DialogElementEvents {
|
|
344
|
-
'on:cancel'?: (ev: Event) => void;
|
|
345
|
-
'on:close'?: (ev: Event) => void;
|
|
346
|
-
}
|
|
347
|
-
|
|
348
|
-
// Image-specific events
|
|
349
|
-
interface ImageElementEvents {
|
|
350
|
-
'on:load'?: (ev: Event) => void;
|
|
351
|
-
'on:error'?: (ev: ErrorEvent) => void;
|
|
352
|
-
}
|
|
202
|
+
};
|
|
353
203
|
|
|
354
204
|
interface AttributesMap {
|
|
355
205
|
// Anchor element
|
|
@@ -394,16 +244,15 @@ interface AttributesMap {
|
|
|
394
244
|
};
|
|
395
245
|
|
|
396
246
|
// Audio element
|
|
397
|
-
audio: BaseAttr &
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
};
|
|
247
|
+
audio: BaseAttr & {
|
|
248
|
+
autoplay?: boolean;
|
|
249
|
+
controls?: boolean;
|
|
250
|
+
crossorigin?: 'anonymous' | 'use-credentials' | '';
|
|
251
|
+
loop?: boolean;
|
|
252
|
+
muted?: boolean;
|
|
253
|
+
preload?: 'none' | 'metadata' | 'auto' | '';
|
|
254
|
+
src?: string;
|
|
255
|
+
};
|
|
407
256
|
|
|
408
257
|
// Base element
|
|
409
258
|
base: BaseAttr & {
|
|
@@ -465,16 +314,14 @@ interface AttributesMap {
|
|
|
465
314
|
};
|
|
466
315
|
|
|
467
316
|
// Details element
|
|
468
|
-
details: BaseAttr &
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
};
|
|
317
|
+
details: BaseAttr & {
|
|
318
|
+
open?: boolean;
|
|
319
|
+
};
|
|
472
320
|
|
|
473
321
|
// Dialog element
|
|
474
|
-
dialog: BaseAttr &
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
};
|
|
322
|
+
dialog: BaseAttr & {
|
|
323
|
+
open?: boolean;
|
|
324
|
+
};
|
|
478
325
|
|
|
479
326
|
// Embed element
|
|
480
327
|
embed: BaseAttr & {
|
|
@@ -492,18 +339,17 @@ interface AttributesMap {
|
|
|
492
339
|
};
|
|
493
340
|
|
|
494
341
|
// Form element
|
|
495
|
-
form: BaseAttr &
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
};
|
|
342
|
+
form: BaseAttr & {
|
|
343
|
+
'accept-charset'?: string;
|
|
344
|
+
action?: string;
|
|
345
|
+
autocomplete?: 'on' | 'off';
|
|
346
|
+
enctype?: 'application/x-www-form-urlencoded' | 'multipart/form-data' | 'text/plain';
|
|
347
|
+
method?: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS' | 'CONNECT' | 'TRACE' | otherstring;
|
|
348
|
+
|
|
349
|
+
name?: string;
|
|
350
|
+
novalidate?: boolean;
|
|
351
|
+
target?: '_self' | '_blank' | '_parent' | '_top' | string;
|
|
352
|
+
};
|
|
507
353
|
|
|
508
354
|
// Head element
|
|
509
355
|
head: BaseAttr & {};
|
|
@@ -515,53 +361,51 @@ interface AttributesMap {
|
|
|
515
361
|
html: BaseAttr & {};
|
|
516
362
|
|
|
517
363
|
// IFrame element
|
|
518
|
-
iframe: BaseAttr &
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
};
|
|
364
|
+
iframe: BaseAttr & {
|
|
365
|
+
allow?: string;
|
|
366
|
+
allowfullscreen?: boolean;
|
|
367
|
+
allowpaymentrequest?: boolean;
|
|
368
|
+
height?: number | string;
|
|
369
|
+
loading?: 'eager' | 'lazy';
|
|
370
|
+
name?: string;
|
|
371
|
+
referrerpolicy?:
|
|
372
|
+
| 'no-referrer'
|
|
373
|
+
| 'no-referrer-when-downgrade'
|
|
374
|
+
| 'origin'
|
|
375
|
+
| 'origin-when-cross-origin'
|
|
376
|
+
| 'same-origin'
|
|
377
|
+
| 'strict-origin'
|
|
378
|
+
| 'strict-origin-when-cross-origin'
|
|
379
|
+
| 'unsafe-url';
|
|
380
|
+
sandbox?: string;
|
|
381
|
+
src?: string;
|
|
382
|
+
srcdoc?: string;
|
|
383
|
+
width?: number | string;
|
|
384
|
+
};
|
|
540
385
|
|
|
541
386
|
// Image element
|
|
542
|
-
img: BaseAttr &
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
};
|
|
387
|
+
img: BaseAttr & {
|
|
388
|
+
alt?: string;
|
|
389
|
+
crossorigin?: 'anonymous' | 'use-credentials' | '';
|
|
390
|
+
decoding?: 'sync' | 'async' | 'auto';
|
|
391
|
+
height?: number | string;
|
|
392
|
+
ismap?: boolean;
|
|
393
|
+
loading?: 'eager' | 'lazy';
|
|
394
|
+
referrerpolicy?:
|
|
395
|
+
| 'no-referrer'
|
|
396
|
+
| 'no-referrer-when-downgrade'
|
|
397
|
+
| 'origin'
|
|
398
|
+
| 'origin-when-cross-origin'
|
|
399
|
+
| 'same-origin'
|
|
400
|
+
| 'strict-origin'
|
|
401
|
+
| 'strict-origin-when-cross-origin'
|
|
402
|
+
| 'unsafe-url';
|
|
403
|
+
sizes?: string;
|
|
404
|
+
src?: string;
|
|
405
|
+
srcset?: string;
|
|
406
|
+
usemap?: string;
|
|
407
|
+
width?: number | string;
|
|
408
|
+
};
|
|
565
409
|
|
|
566
410
|
// Input element
|
|
567
411
|
input: BaseAttr & {
|
|
@@ -639,30 +483,29 @@ interface AttributesMap {
|
|
|
639
483
|
};
|
|
640
484
|
|
|
641
485
|
// Link element
|
|
642
|
-
link: BaseAttr &
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
};
|
|
486
|
+
link: BaseAttr & {
|
|
487
|
+
as?: string;
|
|
488
|
+
crossorigin?: 'anonymous' | 'use-credentials' | '';
|
|
489
|
+
disabled?: boolean;
|
|
490
|
+
href?: string;
|
|
491
|
+
hreflang?: string;
|
|
492
|
+
imagesizes?: string;
|
|
493
|
+
imagesrcset?: string;
|
|
494
|
+
integrity?: string;
|
|
495
|
+
media?: 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
|
+
rel?: string;
|
|
506
|
+
sizes?: string;
|
|
507
|
+
type?: string;
|
|
508
|
+
};
|
|
666
509
|
|
|
667
510
|
// Map element
|
|
668
511
|
map: BaseAttr & {
|
|
@@ -692,16 +535,15 @@ interface AttributesMap {
|
|
|
692
535
|
};
|
|
693
536
|
|
|
694
537
|
// Object element
|
|
695
|
-
object: BaseAttr &
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
};
|
|
538
|
+
object: BaseAttr & {
|
|
539
|
+
data?: string;
|
|
540
|
+
form?: string;
|
|
541
|
+
height?: number | string;
|
|
542
|
+
name?: string;
|
|
543
|
+
type?: string;
|
|
544
|
+
usemap?: string;
|
|
545
|
+
width?: number | string;
|
|
546
|
+
};
|
|
705
547
|
|
|
706
548
|
// OL element
|
|
707
549
|
ol: BaseAttr & {
|
|
@@ -753,25 +595,24 @@ interface AttributesMap {
|
|
|
753
595
|
};
|
|
754
596
|
|
|
755
597
|
// Script element
|
|
756
|
-
script: BaseAttr &
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
};
|
|
598
|
+
script: BaseAttr & {
|
|
599
|
+
async?: boolean;
|
|
600
|
+
crossorigin?: 'anonymous' | 'use-credentials' | '';
|
|
601
|
+
defer?: boolean;
|
|
602
|
+
integrity?: string;
|
|
603
|
+
nomodule?: boolean;
|
|
604
|
+
referrerpolicy?:
|
|
605
|
+
| 'no-referrer'
|
|
606
|
+
| 'no-referrer-when-downgrade'
|
|
607
|
+
| 'origin'
|
|
608
|
+
| 'origin-when-cross-origin'
|
|
609
|
+
| 'same-origin'
|
|
610
|
+
| 'strict-origin'
|
|
611
|
+
| 'strict-origin-when-cross-origin'
|
|
612
|
+
| 'unsafe-url';
|
|
613
|
+
src?: string;
|
|
614
|
+
type?: string;
|
|
615
|
+
};
|
|
775
616
|
|
|
776
617
|
// Select element
|
|
777
618
|
select: BaseAttr & {
|
|
@@ -801,10 +642,9 @@ interface AttributesMap {
|
|
|
801
642
|
};
|
|
802
643
|
|
|
803
644
|
// Style element
|
|
804
|
-
style: BaseAttr &
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
};
|
|
645
|
+
style: BaseAttr & {
|
|
646
|
+
media?: string;
|
|
647
|
+
};
|
|
808
648
|
|
|
809
649
|
// Table element
|
|
810
650
|
table: BaseAttr & {};
|
|
@@ -875,20 +715,19 @@ interface AttributesMap {
|
|
|
875
715
|
ul: BaseAttr & {};
|
|
876
716
|
|
|
877
717
|
// Video element
|
|
878
|
-
video: BaseAttr &
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
};
|
|
718
|
+
video: BaseAttr & {
|
|
719
|
+
autoplay?: boolean;
|
|
720
|
+
controls?: boolean;
|
|
721
|
+
crossorigin?: 'anonymous' | 'use-credentials' | '';
|
|
722
|
+
height?: number | string;
|
|
723
|
+
loop?: boolean;
|
|
724
|
+
muted?: boolean;
|
|
725
|
+
playsinline?: boolean;
|
|
726
|
+
poster?: string;
|
|
727
|
+
preload?: 'none' | 'metadata' | 'auto' | '';
|
|
728
|
+
src?: string;
|
|
729
|
+
width?: number | string;
|
|
730
|
+
};
|
|
892
731
|
|
|
893
732
|
// Generic HTMLElement (no specific attributes beyond BaseEvent)
|
|
894
733
|
abbr: BaseAttr & {};
|
|
@@ -1423,11 +1262,31 @@ declare global {
|
|
|
1423
1262
|
// 'svg:view': SVGAttributesMap['view'];
|
|
1424
1263
|
}
|
|
1425
1264
|
|
|
1426
|
-
|
|
1265
|
+
type IntrinsicAttributes = KTPrefixedEventAttribute & {
|
|
1266
|
+
/**
|
|
1267
|
+
* Make a reference to the created element
|
|
1268
|
+
*/
|
|
1427
1269
|
ref?: KTRef<any>;
|
|
1270
|
+
|
|
1271
|
+
/**
|
|
1272
|
+
* Conditional rendering
|
|
1273
|
+
* - Provide a `KTRef` to make it reactive
|
|
1274
|
+
*/
|
|
1428
1275
|
'k-if'?: any;
|
|
1276
|
+
|
|
1277
|
+
/**
|
|
1278
|
+
* 2-way binding
|
|
1279
|
+
* - Provide a `KTRef` to make it reactive
|
|
1280
|
+
*/
|
|
1281
|
+
'k-model'?: KTRef<any>;
|
|
1282
|
+
|
|
1283
|
+
/**
|
|
1284
|
+
* Raw html binding
|
|
1285
|
+
* - Provide a `KTRef` to make it reactive
|
|
1286
|
+
*/
|
|
1287
|
+
'k-html'?: any;
|
|
1429
1288
|
children?: KTRawContent;
|
|
1430
|
-
}
|
|
1289
|
+
};
|
|
1431
1290
|
|
|
1432
1291
|
interface ElementChildrenAttribute {
|
|
1433
1292
|
children: {};
|
|
@@ -1435,5 +1294,4 @@ declare global {
|
|
|
1435
1294
|
}
|
|
1436
1295
|
}
|
|
1437
1296
|
|
|
1438
|
-
export {
|
|
1439
|
-
export type { KTSurfaceRef };
|
|
1297
|
+
export { Fragment, h as createElement, createRedrawable, jsx, jsxDEV, jsxs };
|