@ktjs/core 0.23.0 → 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 +221 -298
- package/dist/index.iife.js +271 -147
- package/dist/index.legacy.js +267 -145
- package/dist/index.mjs +266 -147
- package/dist/jsx/index.d.ts +174 -322
- package/dist/jsx/index.mjs +121 -147
- package/dist/jsx/jsx-runtime.d.ts +14 -8
- package/dist/jsx/jsx-runtime.mjs +120 -100
- 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]
|
|
@@ -146,11 +125,11 @@ interface KTBaseAttribute {
|
|
|
146
125
|
method?: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS' | 'CONNECT' | 'TRACE' | otherstring;
|
|
147
126
|
}
|
|
148
127
|
|
|
149
|
-
type
|
|
128
|
+
type KTPrefixedEventAttribute = {
|
|
150
129
|
[EventName in keyof HTMLElementEventMap as `on:${EventName}`]?: (ev: HTMLElementEventMap[EventName]) => void;
|
|
151
130
|
};
|
|
152
131
|
|
|
153
|
-
type KTAttribute = KTBaseAttribute &
|
|
132
|
+
type KTAttribute = KTBaseAttribute & KTPrefixedEventAttribute;
|
|
154
133
|
|
|
155
134
|
/**
|
|
156
135
|
* Create an enhanced HTMLElement.
|
|
@@ -162,7 +141,7 @@ type KTAttribute = KTBaseAttribute & KTPrefixedEventHandlers;
|
|
|
162
141
|
* ## About
|
|
163
142
|
* @package @ktjs/core
|
|
164
143
|
* @author Kasukabe Tsumugi <futami16237@gmail.com>
|
|
165
|
-
* @version 0.
|
|
144
|
+
* @version 0.24.0 (Last Update: 2026.02.05 12:08:54.164)
|
|
166
145
|
* @license MIT
|
|
167
146
|
* @link https://github.com/baendlorel/kt.js
|
|
168
147
|
* @link https://baendlorel.github.io/ Welcome to my site!
|
|
@@ -213,149 +192,14 @@ declare function createRedrawable<T>(creator: () => T): KTRef<T> & {
|
|
|
213
192
|
};
|
|
214
193
|
|
|
215
194
|
// Base events available to all HTML elements
|
|
216
|
-
|
|
195
|
+
type BaseAttr = KTPrefixedEventAttribute & {
|
|
217
196
|
[k: string]: any;
|
|
218
197
|
|
|
219
198
|
// # base attributes
|
|
220
199
|
class?: string;
|
|
221
200
|
className?: string;
|
|
222
201
|
style?: string | Partial<CSSStyleDeclaration>;
|
|
223
|
-
|
|
224
|
-
// # Events
|
|
225
|
-
// Mouse events
|
|
226
|
-
'on:click'?: (ev: PointerEvent) => void;
|
|
227
|
-
'on:dblclick'?: (ev: PointerEvent) => void;
|
|
228
|
-
'on:mousedown'?: (ev: PointerEvent) => void;
|
|
229
|
-
'on:mouseup'?: (ev: MouseEvent) => void;
|
|
230
|
-
'on:mousemove'?: (ev: MouseEvent) => void;
|
|
231
|
-
'on:mouseenter'?: (ev: MouseEvent) => void;
|
|
232
|
-
'on:mouseleave'?: (ev: MouseEvent) => void;
|
|
233
|
-
'on:mouseover'?: (ev: MouseEvent) => void;
|
|
234
|
-
'on:mouseout'?: (ev: MouseEvent) => void;
|
|
235
|
-
'on:contextmenu'?: (ev: PointerEvent) => void;
|
|
236
|
-
|
|
237
|
-
// Keyboard events
|
|
238
|
-
'on:keydown'?: (ev: KeyboardEvent) => void;
|
|
239
|
-
'on:keyup'?: (ev: KeyboardEvent) => void;
|
|
240
|
-
'on:keypress'?: (ev: KeyboardEvent) => void;
|
|
241
|
-
|
|
242
|
-
// Focus events
|
|
243
|
-
'on:focus'?: (ev: FocusEvent) => void;
|
|
244
|
-
'on:blur'?: (ev: FocusEvent) => void;
|
|
245
|
-
'on:focusin'?: (ev: FocusEvent) => void;
|
|
246
|
-
'on:focusout'?: (ev: FocusEvent) => void;
|
|
247
|
-
|
|
248
|
-
// Input events
|
|
249
|
-
'on:input'?: (ev: Event) => void;
|
|
250
|
-
'on:change'?: (ev: Event) => void;
|
|
251
|
-
'on:beforeinput'?: (ev: InputEvent) => void;
|
|
252
|
-
|
|
253
|
-
// Drag events
|
|
254
|
-
'on:drag'?: (ev: DragEvent) => void;
|
|
255
|
-
'on:dragstart'?: (ev: DragEvent) => void;
|
|
256
|
-
'on:dragend'?: (ev: DragEvent) => void;
|
|
257
|
-
'on:dragenter'?: (ev: DragEvent) => void;
|
|
258
|
-
'on:dragleave'?: (ev: DragEvent) => void;
|
|
259
|
-
'on:dragover'?: (ev: DragEvent) => void;
|
|
260
|
-
'on:drop'?: (ev: DragEvent) => void;
|
|
261
|
-
|
|
262
|
-
// Clipboard events
|
|
263
|
-
'on:copy'?: (ev: ClipboardEvent) => void;
|
|
264
|
-
'on:cut'?: (ev: ClipboardEvent) => void;
|
|
265
|
-
'on:paste'?: (ev: ClipboardEvent) => void;
|
|
266
|
-
|
|
267
|
-
// Touch events
|
|
268
|
-
'on:touchstart'?: (ev: TouchEvent) => void;
|
|
269
|
-
'on:touchmove'?: (ev: TouchEvent) => void;
|
|
270
|
-
'on:touchend'?: (ev: TouchEvent) => void;
|
|
271
|
-
'on:touchcancel'?: (ev: TouchEvent) => void;
|
|
272
|
-
|
|
273
|
-
// Wheel event
|
|
274
|
-
'on:wheel'?: (ev: WheelEvent) => void;
|
|
275
|
-
|
|
276
|
-
// Animation events
|
|
277
|
-
'on:animationstart'?: (ev: AnimationEvent) => void;
|
|
278
|
-
'on:animationend'?: (ev: AnimationEvent) => void;
|
|
279
|
-
'on:animationiteration'?: (ev: AnimationEvent) => void;
|
|
280
|
-
|
|
281
|
-
// Transition events
|
|
282
|
-
'on:transitionstart'?: (ev: TransitionEvent) => void;
|
|
283
|
-
'on:transitionend'?: (ev: TransitionEvent) => void;
|
|
284
|
-
'on:transitionrun'?: (ev: TransitionEvent) => void;
|
|
285
|
-
'on:transitioncancel'?: (ev: TransitionEvent) => void;
|
|
286
|
-
|
|
287
|
-
// Pointer events
|
|
288
|
-
'on:pointerdown'?: (ev: PointerEvent) => void;
|
|
289
|
-
'on:pointerup'?: (ev: PointerEvent) => void;
|
|
290
|
-
'on:pointermove'?: (ev: PointerEvent) => void;
|
|
291
|
-
'on:pointerenter'?: (ev: PointerEvent) => void;
|
|
292
|
-
'on:pointerleave'?: (ev: PointerEvent) => void;
|
|
293
|
-
'on:pointerover'?: (ev: PointerEvent) => void;
|
|
294
|
-
'on:pointerout'?: (ev: PointerEvent) => void;
|
|
295
|
-
'on:pointercancel'?: (ev: PointerEvent) => void;
|
|
296
|
-
'on:gotpointercapture'?: (ev: PointerEvent) => void;
|
|
297
|
-
'on:lostpointercapture'?: (ev: PointerEvent) => void;
|
|
298
|
-
|
|
299
|
-
// Selection events
|
|
300
|
-
'on:select'?: (ev: Event) => void;
|
|
301
|
-
'on:selectstart'?: (ev: Event) => void;
|
|
302
|
-
|
|
303
|
-
// Scroll event
|
|
304
|
-
'on:scroll'?: (ev: Event) => void;
|
|
305
|
-
|
|
306
|
-
// Resize event
|
|
307
|
-
'on:resize'?: (ev: UIEvent) => void;
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
// Form-specific events
|
|
311
|
-
interface FormElementEvents {
|
|
312
|
-
'on:submit'?: (ev: SubmitEvent) => void;
|
|
313
|
-
'on:reset'?: (ev: Event) => void;
|
|
314
|
-
'on:invalid'?: (ev: Event) => void;
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
// Media-specific events
|
|
318
|
-
interface MediaElementEvents {
|
|
319
|
-
'on:play'?: (ev: Event) => void;
|
|
320
|
-
'on:pause'?: (ev: Event) => void;
|
|
321
|
-
'on:playing'?: (ev: Event) => void;
|
|
322
|
-
'on:ended'?: (ev: Event) => void;
|
|
323
|
-
'on:canplay'?: (ev: Event) => void;
|
|
324
|
-
'on:canplaythrough'?: (ev: Event) => void;
|
|
325
|
-
'on:durationchange'?: (ev: Event) => void;
|
|
326
|
-
'on:emptied'?: (ev: Event) => void;
|
|
327
|
-
'on:loadeddata'?: (ev: Event) => void;
|
|
328
|
-
'on:loadedmetadata'?: (ev: Event) => void;
|
|
329
|
-
'on:loadstart'?: (ev: Event) => void;
|
|
330
|
-
'on:progress'?: (ev: ProgressEvent) => void;
|
|
331
|
-
'on:ratechange'?: (ev: Event) => void;
|
|
332
|
-
'on:seeked'?: (ev: Event) => void;
|
|
333
|
-
'on:seeking'?: (ev: Event) => void;
|
|
334
|
-
'on:stalled'?: (ev: Event) => void;
|
|
335
|
-
'on:suspend'?: (ev: Event) => void;
|
|
336
|
-
'on:timeupdate'?: (ev: Event) => void;
|
|
337
|
-
'on:volumechange'?: (ev: Event) => void;
|
|
338
|
-
'on:waiting'?: (ev: Event) => void;
|
|
339
|
-
'on:abort'?: (ev: UIEvent) => void;
|
|
340
|
-
'on:error'?: (ev: ErrorEvent) => void;
|
|
341
|
-
}
|
|
342
|
-
|
|
343
|
-
// Details-specific events
|
|
344
|
-
interface DetailsElementEvents {
|
|
345
|
-
'on:toggle'?: (ev: Event) => void;
|
|
346
|
-
}
|
|
347
|
-
|
|
348
|
-
// Dialog-specific events
|
|
349
|
-
interface DialogElementEvents {
|
|
350
|
-
'on:cancel'?: (ev: Event) => void;
|
|
351
|
-
'on:close'?: (ev: Event) => void;
|
|
352
|
-
}
|
|
353
|
-
|
|
354
|
-
// Image-specific events
|
|
355
|
-
interface ImageElementEvents {
|
|
356
|
-
'on:load'?: (ev: Event) => void;
|
|
357
|
-
'on:error'?: (ev: ErrorEvent) => void;
|
|
358
|
-
}
|
|
202
|
+
};
|
|
359
203
|
|
|
360
204
|
interface AttributesMap {
|
|
361
205
|
// Anchor element
|
|
@@ -400,16 +244,15 @@ interface AttributesMap {
|
|
|
400
244
|
};
|
|
401
245
|
|
|
402
246
|
// Audio element
|
|
403
|
-
audio: BaseAttr &
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
};
|
|
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
|
+
};
|
|
413
256
|
|
|
414
257
|
// Base element
|
|
415
258
|
base: BaseAttr & {
|
|
@@ -471,16 +314,14 @@ interface AttributesMap {
|
|
|
471
314
|
};
|
|
472
315
|
|
|
473
316
|
// Details element
|
|
474
|
-
details: BaseAttr &
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
};
|
|
317
|
+
details: BaseAttr & {
|
|
318
|
+
open?: boolean;
|
|
319
|
+
};
|
|
478
320
|
|
|
479
321
|
// Dialog element
|
|
480
|
-
dialog: BaseAttr &
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
};
|
|
322
|
+
dialog: BaseAttr & {
|
|
323
|
+
open?: boolean;
|
|
324
|
+
};
|
|
484
325
|
|
|
485
326
|
// Embed element
|
|
486
327
|
embed: BaseAttr & {
|
|
@@ -498,18 +339,17 @@ interface AttributesMap {
|
|
|
498
339
|
};
|
|
499
340
|
|
|
500
341
|
// Form element
|
|
501
|
-
form: BaseAttr &
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
};
|
|
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
|
+
};
|
|
513
353
|
|
|
514
354
|
// Head element
|
|
515
355
|
head: BaseAttr & {};
|
|
@@ -521,53 +361,51 @@ interface AttributesMap {
|
|
|
521
361
|
html: BaseAttr & {};
|
|
522
362
|
|
|
523
363
|
// IFrame element
|
|
524
|
-
iframe: BaseAttr &
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
};
|
|
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
|
+
};
|
|
546
385
|
|
|
547
386
|
// Image element
|
|
548
|
-
img: BaseAttr &
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
};
|
|
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
|
+
};
|
|
571
409
|
|
|
572
410
|
// Input element
|
|
573
411
|
input: BaseAttr & {
|
|
@@ -645,30 +483,29 @@ interface AttributesMap {
|
|
|
645
483
|
};
|
|
646
484
|
|
|
647
485
|
// Link element
|
|
648
|
-
link: BaseAttr &
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
};
|
|
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
|
+
};
|
|
672
509
|
|
|
673
510
|
// Map element
|
|
674
511
|
map: BaseAttr & {
|
|
@@ -698,16 +535,15 @@ interface AttributesMap {
|
|
|
698
535
|
};
|
|
699
536
|
|
|
700
537
|
// Object element
|
|
701
|
-
object: BaseAttr &
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
};
|
|
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
|
+
};
|
|
711
547
|
|
|
712
548
|
// OL element
|
|
713
549
|
ol: BaseAttr & {
|
|
@@ -759,25 +595,24 @@ interface AttributesMap {
|
|
|
759
595
|
};
|
|
760
596
|
|
|
761
597
|
// Script element
|
|
762
|
-
script: BaseAttr &
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
};
|
|
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
|
+
};
|
|
781
616
|
|
|
782
617
|
// Select element
|
|
783
618
|
select: BaseAttr & {
|
|
@@ -807,10 +642,9 @@ interface AttributesMap {
|
|
|
807
642
|
};
|
|
808
643
|
|
|
809
644
|
// Style element
|
|
810
|
-
style: BaseAttr &
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
};
|
|
645
|
+
style: BaseAttr & {
|
|
646
|
+
media?: string;
|
|
647
|
+
};
|
|
814
648
|
|
|
815
649
|
// Table element
|
|
816
650
|
table: BaseAttr & {};
|
|
@@ -881,20 +715,19 @@ interface AttributesMap {
|
|
|
881
715
|
ul: BaseAttr & {};
|
|
882
716
|
|
|
883
717
|
// Video element
|
|
884
|
-
video: BaseAttr &
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
};
|
|
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
|
+
};
|
|
898
731
|
|
|
899
732
|
// Generic HTMLElement (no specific attributes beyond BaseEvent)
|
|
900
733
|
abbr: BaseAttr & {};
|
|
@@ -1429,11 +1262,31 @@ declare global {
|
|
|
1429
1262
|
// 'svg:view': SVGAttributesMap['view'];
|
|
1430
1263
|
}
|
|
1431
1264
|
|
|
1432
|
-
|
|
1265
|
+
type IntrinsicAttributes = KTPrefixedEventAttribute & {
|
|
1266
|
+
/**
|
|
1267
|
+
* Make a reference to the created element
|
|
1268
|
+
*/
|
|
1433
1269
|
ref?: KTRef<any>;
|
|
1270
|
+
|
|
1271
|
+
/**
|
|
1272
|
+
* Conditional rendering
|
|
1273
|
+
* - Provide a `KTRef` to make it reactive
|
|
1274
|
+
*/
|
|
1434
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;
|
|
1435
1288
|
children?: KTRawContent;
|
|
1436
|
-
}
|
|
1289
|
+
};
|
|
1437
1290
|
|
|
1438
1291
|
interface ElementChildrenAttribute {
|
|
1439
1292
|
children: {};
|
|
@@ -1441,5 +1294,4 @@ declare global {
|
|
|
1441
1294
|
}
|
|
1442
1295
|
}
|
|
1443
1296
|
|
|
1444
|
-
export {
|
|
1445
|
-
export type { KTSurfaceRef };
|
|
1297
|
+
export { Fragment, h as createElement, createRedrawable, jsx, jsxDEV, jsxs };
|