vasille 2.3.2 → 2.3.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.
@@ -1,36 +1,232 @@
1
1
  declare module "vasille" {
2
2
  declare type Record<K, T> = {[k : K] : T};
3
3
  /**
4
- * Declares a notifiable bind to a value
5
- * @class Mirror
6
- * @extends IValue
7
- * @version 2
4
+ * Mark an object which can be destroyed
5
+ * @class Destroyable
8
6
  */
9
- declare class Mirror<T> extends Reference<T> {
7
+ declare class Destroyable {
10
8
  /**
11
- * pointed value
12
- * @type IValue
9
+ * Make object fields non configurable
10
+ * @protected
13
11
  */
14
- $pointedValue: IValue<T>;
12
+ $seal(): void;
15
13
  /**
16
- * Collection of handlers
17
- * @type Set
14
+ * Garbage collector method
18
15
  */
19
- $handler: any;
16
+ $destroy(): void;
17
+ }
18
+
19
+
20
+ declare function notOverwritten(): string;
21
+ declare function internalError(msg: string): string;
22
+ declare function userError(msg: string, err: string): string;
23
+ declare function wrongBinding(msg: string): string;
24
+
25
+
26
+ declare class Switchable extends Destroyable {
20
27
  /**
21
- * Ensure forward only synchronization
28
+ * Enable update handlers triggering
22
29
  */
23
- $forwardOnly: boolean;
30
+ $enable(): void;
24
31
  /**
25
- * Constructs a notifiable bind to a value
26
- * @param value {IValue} is initial value
27
- * @param forwardOnly {boolean} ensure forward only synchronization
32
+ * disable update handlers triggering
33
+ */
34
+ $disable(): void;
35
+ }
36
+ /**
37
+ * Interface which describes a value
38
+ * @class IValue
39
+ * @extends Destroyable
40
+ */
41
+ declare class IValue<T> extends Switchable {
42
+ /**
43
+ * Is enabled state flag
44
+ * @protected
45
+ */
46
+ isEnabled: boolean;
47
+ /**
48
+ * @param isEnabled {boolean} initial is enabled state
49
+ */
50
+ constructor(isEnabled: boolean): void;
51
+ /**
52
+ * Get the encapsulated value
53
+ * @return {*} the encapsulated value
28
54
  */
29
- constructor(value: IValue<T>, forwardOnly?: boolean): void;
30
55
  get $(): T;
31
- set $(v: T): void;
56
+ /**
57
+ * Sets the encapsulated value
58
+ * @param value {*} value to encapsulate
59
+ */
60
+ set $(value: T): void;
61
+ /**
62
+ * Add a new handler to value change
63
+ * @param handler {function(value : *)} the handler to add
64
+ */
65
+ $on(handler: (value: T) => void): void;
66
+ /**
67
+ * Removes a handler of value change
68
+ * @param handler {function(value : *)} the handler to remove
69
+ */
70
+ $off(handler: (value: T) => void): void;
71
+ }
72
+
73
+
74
+ declare var current: Reactive | null;
75
+ declare function stack(node: Reactive): void;
76
+ declare function unstack(): void;
77
+ /**
78
+ * Private stuff of a reactive object
79
+ * @class ReactivePrivate
80
+ * @extends Destroyable
81
+ */
82
+ declare class ReactivePrivate extends Destroyable {
83
+ /**
84
+ * A list of user-defined values
85
+ * @type {Set}
86
+ */
87
+ watch: Set<Switchable>;
88
+ /**
89
+ * A list of user-defined bindings
90
+ * @type {Set}
91
+ */
92
+ bindings: Set<Destroyable>;
93
+ /**
94
+ * A list of user defined models
95
+ */
96
+ models: Set<IModel>;
97
+ /**
98
+ * Reactivity switch state
99
+ * @type {boolean}
100
+ */
101
+ enabled: boolean;
102
+ /**
103
+ * The frozen state of object
104
+ * @type {boolean}
105
+ */
106
+ frozen: boolean;
107
+ /**
108
+ * An expression which will freeze/unfreeze the object
109
+ * @type {IValue<void>}
110
+ */
111
+ freezeExpr: Expression<void, [boolean]>;
112
+ /**
113
+ * Parent node
114
+ * @type {Reactive}
115
+ */
116
+ parent: Reactive;
117
+ onDestroy?: () => void;
118
+ constructor(): void;
119
+ $destroy(): void;
120
+ }
121
+ /**
122
+ * A reactive object
123
+ * @class Reactive
124
+ * @extends Destroyable
125
+ */
126
+ declare class Reactive<T> extends Destroyable {
127
+ /**
128
+ * Private stuff
129
+ * @protected
130
+ */
131
+ $: ReactivePrivate;
132
+ input: T;
133
+ constructor(input: T, $?: ReactivePrivate): void;
134
+ /**
135
+ * Get parent node
136
+ */
137
+ get parent(): Reactive;
138
+ /**
139
+ * Create a reference
140
+ * @param value {*} value to reference
141
+ */
142
+ ref<T>(value: T): IValue<T>;
143
+ /**
144
+ * Create a mirror
145
+ * @param value {IValue} value to mirror
146
+ */
147
+ mirror<T>(value: IValue<T>): Mirror<T>;
148
+ /**
149
+ * Create a forward-only mirror
150
+ * @param value {IValue} value to mirror
151
+ */
152
+ forward<T>(value: IValue<T>): Mirror<T>;
153
+ /**
154
+ * Creates a pointer
155
+ * @param value {*} default value to point
156
+ * @param forwardOnly {boolean} forward only sync
157
+ */
158
+ point<T>(value: IValue<T>, forwardOnly?: boolean): Pointer<T>;
159
+ /**
160
+ * Register a model
161
+ * @param model
162
+ */
163
+ register<T>(model: T): T;
164
+ /**
165
+ * Creates a watcher
166
+ * @param func {function} function to run on any argument change
167
+ * @param values
168
+ */
169
+ watch<Args>(func: (...args: Args) => void, ...values: KindOfIValue<Args>): void;
170
+ /**
171
+ * Creates a computed value
172
+ * @param func {function} function to run on any argument change
173
+ * @param values
174
+ * @return {IValue} the created ivalue
175
+ */
176
+ expr<T,Args>(func: (...args: Args) => T, ...values: KindOfIValue<Args>): IValue<T>;
177
+ /**
178
+ * Enable reactivity of fields
179
+ */
180
+ enable(): void;
181
+ /**
182
+ * Disable reactivity of fields
183
+ */
184
+ disable(): void;
185
+ /**
186
+ * Disable/Enable reactivity of object fields with feedback
187
+ * @param cond {IValue} show condition
188
+ * @param onOff {function} on show feedback
189
+ * @param onOn {function} on hide feedback
190
+ */
191
+ bindAlive(cond: IValue<boolean>, onOff?: () => void, onOn?: () => void): this;
192
+ init(): T['return'];
193
+ applyOptions(input: T): void;
194
+ applyOptionsNow(): void;
195
+ compose(input: T): T['return'];
196
+ composeNow(): void;
197
+ runFunctional<F>(f: F, ...args: Parameters<F>): ReturnType<F>;
198
+ runOnDestroy(func: () => void): void;
199
+ $destroy(): void;
200
+ }
201
+
202
+
203
+ /**
204
+ * Declares a notifiable value
205
+ * @class Reference
206
+ * @extends IValue
207
+ */
208
+ declare class Reference<T> extends IValue<T> {
209
+ /**
210
+ * The encapsulated value
211
+ * @type {*}
212
+ */
213
+ $value: any;
214
+ /**
215
+ * Array of handlers
216
+ * @type {Set}
217
+ * @readonly
218
+ */
219
+ $onchange: any;
220
+ /**
221
+ * @param value {any} the initial value
222
+ */
223
+ constructor(value: T): void;
224
+ get $(): T;
225
+ set $(value: T): void;
32
226
  $enable(): void;
33
227
  $disable(): void;
228
+ $on(handler: (value: T) => void): void;
229
+ $off(handler: (value: T) => void): void;
34
230
  $destroy(): void;
35
231
  }
36
232
 
@@ -82,32 +278,36 @@ declare class Expression<T,Args> extends IValue<T> {
82
278
 
83
279
 
84
280
  /**
85
- * Declares a notifiable value
86
- * @class Reference
281
+ * Declares a notifiable bind to a value
282
+ * @class Mirror
87
283
  * @extends IValue
284
+ * @version 2
88
285
  */
89
- declare class Reference<T> extends IValue<T> {
286
+ declare class Mirror<T> extends Reference<T> {
90
287
  /**
91
- * The encapsulated value
92
- * @type {*}
288
+ * pointed value
289
+ * @type IValue
93
290
  */
94
- $value: any;
291
+ $pointedValue: IValue<T>;
95
292
  /**
96
- * Array of handlers
97
- * @type {Set}
98
- * @readonly
293
+ * Collection of handlers
294
+ * @type Set
99
295
  */
100
- $onchange: any;
296
+ $handler: any;
101
297
  /**
102
- * @param value {any} the initial value
298
+ * Ensure forward only synchronization
103
299
  */
104
- constructor(value: T): void;
105
- get $(): T;
106
- set $(value: T): void;
107
- $enable(): void;
300
+ $forwardOnly: boolean;
301
+ /**
302
+ * Constructs a notifiable bind to a value
303
+ * @param value {IValue} is initial value
304
+ * @param forwardOnly {boolean} ensure forward only synchronization
305
+ */
306
+ constructor(value: IValue<T>, forwardOnly?: boolean): void;
307
+ get $(): T;
308
+ set $(v: T): void;
309
+ $enable(): void;
108
310
  $disable(): void;
109
- $on(handler: (value: T) => void): void;
110
- $off(handler: (value: T) => void): void;
111
311
  $destroy(): void;
112
312
  }
113
313
 
@@ -132,185 +332,100 @@ declare class Pointer<T> extends Mirror<T> {
132
332
 
133
333
 
134
334
  /**
135
- * Create a children pack for each object field
136
- * @class ObjectView
137
- * @extends BaseView
138
- */
139
- declare class ObjectView<T> extends BaseView<string, T, ObjectModel<T>> {
140
- compose(input: BSO<string, T, ObjectModel<T>>): void;
141
- }
142
-
143
-
144
- /**
145
- * Create a children pack for each map value
146
- * @class MapView
147
- * @extends BaseView
148
- */
149
- declare class MapView<K, T> extends BaseView<K, T, MapModel<K, T>> {
150
- compose(input: BSO<K, T, MapModel<K, T>>): void;
151
- }
152
-
153
-
154
- /**
155
- * Private part of repeat node
156
- * @class RepeatNodePrivate
157
- * @extends INodePrivate
335
+ * Represent a listener for a model
336
+ * @class Listener
158
337
  */
159
- declare class RepeatNodePrivate<IdT> extends INodePrivate {
338
+ declare class Listener<ValueT, IndexT = string | number> {
160
339
  /**
161
- * Children node hash
162
- * @type {Map}
340
+ * Functions to run on adding new items
341
+ * @type Set
163
342
  */
164
- nodes: Map<IdT, Fragment>;
165
- constructor(): void;
166
- $destroy(): void;
167
- }
168
- declare interface RNO<T, IdT> extends FragmentOptions {
169
- slot?: (node: Fragment, value: T, index: IdT) => void;
170
- }
171
- /**
172
- * Repeat node repeats its children
173
- * @class RepeatNode
174
- * @extends Fragment
175
- */
176
- declare class RepeatNode<IdT, T,Opts> extends Fragment<Opts> {
177
- $: RepeatNodePrivate<IdT>;
343
+ onAdded: any;
178
344
  /**
179
- * If false will use timeout executor, otherwise the app executor
345
+ * Functions to run on item removing
346
+ * @type Set
180
347
  */
181
- freezeUi: boolean;
182
- constructor(input: Opts, $: RepeatNodePrivate<IdT>): void;
183
- createChild(opts: Opts, id: IdT, item: T, before?: Fragment): any;
184
- destroyChild(id: IdT, item: T): void;
185
- }
186
-
187
-
188
- /**
189
- * Represents a view of an array model
190
- * @class ArrayView
191
- * @extends BaseView
192
- */
193
- declare class ArrayView<T> extends BaseView<T, T, ArrayModel<T>> {
194
- createChild(input: BSO<T, T, ArrayModel<T>>, id: T, item: T, before?: Fragment): any;
195
- compose(input: BSO<T, T, ArrayModel<T>>): void;
196
- }
197
-
198
-
199
- /**
200
- * Create a children pack for each set value
201
- * @class SetView
202
- * @extends BaseView
203
- */
204
- declare class SetView<T> extends BaseView<T, T, SetModel<T>> {
205
- compose(input: BSO<T, T, SetModel<T>>): void;
206
- }
207
-
208
-
209
- /**
210
- * Private part of BaseView
211
- * @class BaseViewPrivate
212
- * @extends RepeatNodePrivate
213
- */
214
- declare class BaseViewPrivate<K, T> extends RepeatNodePrivate<K> {
348
+ onRemoved: any;
215
349
  /**
216
- * Handler to catch values addition
217
- * @type {Function}
350
+ * Describe the frozen state of model
351
+ * @type boolean
352
+ * @private
218
353
  */
219
- addHandler: (index: K, value: T) => void;
354
+ frozen: any;
220
355
  /**
221
- * Handler to catch values removes
222
- * @type {Function}
356
+ * The queue of operations in frozen state
357
+ * @type Object[]
358
+ * @private
223
359
  */
224
- removeHandler: (index: K, value: T) => void;
360
+ queue: any;
225
361
  constructor(): void;
226
- }
227
- declare interface BSO<K, T,Model> extends RNO<T, K> {
228
- model: Model;
229
- }
230
- /**
231
- * Base class of default views
232
- * @class BaseView
233
- * @extends RepeatNode
234
- * @implements IModel
235
- */
236
- declare class BaseView<K, T,Model> extends RepeatNode<K, T, BSO<K, T, Model>> {
237
- $: BaseViewPrivate<K, T>;
238
- input: BSO<K, T, Model>;
239
- constructor(input: BSO<K, T, Model>, $?: BaseViewPrivate<K, T>): void;
240
- compose(input: BSO<K, T, Model>): void;
241
- }
242
-
243
-
244
- /**
245
- * Object based model
246
- * @extends Object
247
- */
248
- declare class ObjectModel<T> extends Object implements ListenableModel<string, T> {
249
- listener: Listener<T, string>;
250
- container: any;
251
362
  /**
252
- * Constructs a object model
253
- * @param obj {Object} input data
363
+ * Exclude the repeated operation in queue
364
+ * @private
254
365
  */
255
- constructor(obj?: {
256
- [p: string]: T;
257
- }) : void;
366
+ excludeRepeat: any;
258
367
  /**
259
- * Gets a value of a field
260
- * @param key {string}
261
- * @return {*}
368
+ * Emits added event to listeners
369
+ * @param index {*} index of value
370
+ * @param value {*} value of added item
262
371
  */
263
- get(key: string): T;
372
+ emitAdded(index: IndexT, value: ValueT): void;
264
373
  /**
265
- * Sets an object property value
266
- * @param key {string} property name
267
- * @param v {*} property value
268
- * @return {ObjectModel} a pointer to this
374
+ * Emits removed event to listeners
375
+ * @param index {*} index of removed value
376
+ * @param value {*} value of removed item
269
377
  */
270
- set(key: string, v: T): this;
271
- get values(): Record<string, T>;
378
+ emitRemoved(index: IndexT, value: ValueT): void;
272
379
  /**
273
- * Deletes an object property
274
- * @param key {string} property name
380
+ * Adds a handler to added event
381
+ * @param handler {function} function to run on event emitting
382
+ */
383
+ onAdd(handler: (index: IndexT, value: ValueT) => void): void;
384
+ /**
385
+ * Adds a handler to removed event
386
+ * @param handler {function} function to run on event emitting
387
+ */
388
+ onRemove(handler: (index: IndexT, value: ValueT) => void): void;
389
+ /**
390
+ * Removes an handler from added event
391
+ * @param handler {function} handler to remove
392
+ */
393
+ offAdd(handler: (index: IndexT, value: ValueT) => void): void;
394
+ /**
395
+ * Removes an handler form removed event
396
+ * @param handler {function} handler to remove
397
+ */
398
+ offRemove(handler: (index: IndexT, value: ValueT) => void): void;
399
+ /**
400
+ * Run all queued operation and enable reactivity
275
401
  */
276
- delete(key: string): void;
277
402
  enableReactivity(): void;
403
+ /**
404
+ * Disable the reactivity and enable the queue
405
+ */
278
406
  disableReactivity(): void;
279
407
  }
280
408
 
281
409
 
282
410
  /**
283
- * A Map based memory
284
- * @class MapModel
285
- * @extends Map
286
- * @implements IModel
411
+ * @declare interface IModel
287
412
  */
288
- declare class MapModel<K, T> extends Map<K, T> implements ListenableModel<K, T> {
289
- listener: Listener<T, K>;
290
- /**
291
- * Constructs a map model
292
- * @param map {[*, *][]} input data
293
- */
294
- constructor(map?: [K, T][]): void;
413
+ declare interface IModel {
295
414
  /**
296
- * Calls Map.clear and notify abut changes
415
+ * Enable the reactivity of model
297
416
  */
298
- clear(): void;
417
+ enableReactivity(): void;
299
418
  /**
300
- * Calls Map.delete and notify abut changes
301
- * @param key {*} key
302
- * @return {boolean} true if removed something, otherwise false
419
+ * Disable the reactivity of model
303
420
  */
304
- delete(key: any): boolean;
421
+ disableReactivity(): void;
422
+ }
423
+ declare interface ListenableModel<K, T> extends IModel {
305
424
  /**
306
- * Calls Map.set and notify abut changes
307
- * @param key {*} key
308
- * @param value {*} value
309
- * @return {MapModel} a pointer to this
425
+ * The listener of model
426
+ * @type Listener
310
427
  */
311
- set(key: K, value: T): this;
312
- enableReactivity(): void;
313
- disableReactivity(): void;
428
+ listener: Listener<T, K>;
314
429
  }
315
430
 
316
431
 
@@ -419,2189 +534,2076 @@ declare class ArrayModel<T> extends Array<T> implements ListenableModel<T, T> {
419
534
 
420
535
 
421
536
  /**
422
- * A Set based model
423
- * @class SetModel
424
- * @extends Set
537
+ * A Map based memory
538
+ * @class MapModel
539
+ * @extends Map
425
540
  * @implements IModel
426
541
  */
427
- declare class SetModel<T> extends Set<T> implements ListenableModel<T, T> {
428
- listener: Listener<T, T>;
429
- /**
430
- * Constructs a set model based on a set
431
- * @param set {Set} input data
432
- */
433
- constructor(set?: T[]): void;
542
+ declare class MapModel<K, T> extends Map<K, T> implements ListenableModel<K, T> {
543
+ listener: Listener<T, K>;
434
544
  /**
435
- * Calls Set.add and notify abut changes
436
- * @param value {*} value
437
- * @return {this} a pointer to this
545
+ * Constructs a map model
546
+ * @param map {[*, *][]} input data
438
547
  */
439
- add(value: T): this;
548
+ constructor(map?: [K, T][]): void;
440
549
  /**
441
- * Calls Set.clear and notify abut changes
550
+ * Calls Map.clear and notify abut changes
442
551
  */
443
552
  clear(): void;
444
553
  /**
445
- * Calls Set.delete and notify abut changes
446
- * @param value {*}
447
- * @return {boolean} true if a value was deleted, otherwise false
554
+ * Calls Map.delete and notify abut changes
555
+ * @param key {*} key
556
+ * @return {boolean} true if removed something, otherwise false
448
557
  */
449
- delete(value: T): boolean;
450
- enableReactivity(): void;
451
- disableReactivity(): void;
558
+ delete(key: any): boolean;
559
+ /**
560
+ * Calls Map.set and notify abut changes
561
+ * @param key {*} key
562
+ * @param value {*} value
563
+ * @return {MapModel} a pointer to this
564
+ */
565
+ set(key: K, value: T): this;
566
+ enableReactivity(): void;
567
+ disableReactivity(): void;
452
568
  }
453
569
 
454
570
 
455
571
  /**
456
- * Represent a listener for a model
457
- * @class Listener
572
+ * Object based model
573
+ * @extends Object
458
574
  */
459
- declare class Listener<ValueT, IndexT = string | number> {
460
- /**
461
- * Functions to run on adding new items
462
- * @type Set
463
- */
464
- onAdded: any;
465
- /**
466
- * Functions to run on item removing
467
- * @type Set
468
- */
469
- onRemoved: any;
470
- /**
471
- * Describe the frozen state of model
472
- * @type boolean
473
- * @private
474
- */
475
- frozen: any;
476
- /**
477
- * The queue of operations in frozen state
478
- * @type Object[]
479
- * @private
480
- */
481
- queue: any;
482
- constructor(): void;
483
- /**
484
- * Exclude the repeated operation in queue
485
- * @private
486
- */
487
- excludeRepeat: any;
488
- /**
489
- * Emits added event to listeners
490
- * @param index {*} index of value
491
- * @param value {*} value of added item
492
- */
493
- emitAdded(index: IndexT, value: ValueT): void;
494
- /**
495
- * Emits removed event to listeners
496
- * @param index {*} index of removed value
497
- * @param value {*} value of removed item
498
- */
499
- emitRemoved(index: IndexT, value: ValueT): void;
500
- /**
501
- * Adds a handler to added event
502
- * @param handler {function} function to run on event emitting
503
- */
504
- onAdd(handler: (index: IndexT, value: ValueT) => void): void;
575
+ declare class ObjectModel<T> extends Object implements ListenableModel<string, T> {
576
+ listener: Listener<T, string>;
577
+ container: any;
505
578
  /**
506
- * Adds a handler to removed event
507
- * @param handler {function} function to run on event emitting
579
+ * Constructs a object model
580
+ * @param obj {Object} input data
508
581
  */
509
- onRemove(handler: (index: IndexT, value: ValueT) => void): void;
582
+ constructor(obj?: {
583
+ [p: string]: T;
584
+ }) : void;
510
585
  /**
511
- * Removes an handler from added event
512
- * @param handler {function} handler to remove
586
+ * Gets a value of a field
587
+ * @param key {string}
588
+ * @return {*}
513
589
  */
514
- offAdd(handler: (index: IndexT, value: ValueT) => void): void;
590
+ get(key: string): T;
515
591
  /**
516
- * Removes an handler form removed event
517
- * @param handler {function} handler to remove
592
+ * Sets an object property value
593
+ * @param key {string} property name
594
+ * @param v {*} property value
595
+ * @return {ObjectModel} a pointer to this
518
596
  */
519
- offRemove(handler: (index: IndexT, value: ValueT) => void): void;
597
+ set(key: string, v: T): this;
598
+ get values(): Record<string, T>;
520
599
  /**
521
- * Run all queued operation and enable reactivity
600
+ * Deletes an object property
601
+ * @param key {string} property name
522
602
  */
603
+ delete(key: string): void;
523
604
  enableReactivity(): void;
524
- /**
525
- * Disable the reactivity and enable the queue
526
- */
527
605
  disableReactivity(): void;
528
606
  }
529
607
 
530
608
 
531
609
  /**
532
- * @declare interface IModel
610
+ * A Set based model
611
+ * @class SetModel
612
+ * @extends Set
613
+ * @implements IModel
533
614
  */
534
- declare interface IModel {
615
+ declare class SetModel<T> extends Set<T> implements ListenableModel<T, T> {
616
+ listener: Listener<T, T>;
535
617
  /**
536
- * Enable the reactivity of model
618
+ * Constructs a set model based on a set
619
+ * @param set {Set} input data
537
620
  */
538
- enableReactivity(): void;
621
+ constructor(set?: T[]): void;
539
622
  /**
540
- * Disable the reactivity of model
623
+ * Calls Set.add and notify abut changes
624
+ * @param value {*} value
625
+ * @return {this} a pointer to this
541
626
  */
542
- disableReactivity(): void;
543
- }
544
- declare interface ListenableModel<K, T> extends IModel {
627
+ add(value: T): this;
545
628
  /**
546
- * The listener of model
547
- * @type Listener
629
+ * Calls Set.clear and notify abut changes
548
630
  */
549
- listener: Listener<T, K>;
631
+ clear(): void;
632
+ /**
633
+ * Calls Set.delete and notify abut changes
634
+ * @param value {*}
635
+ * @return {boolean} true if a value was deleted, otherwise false
636
+ */
637
+ delete(value: T): boolean;
638
+ enableReactivity(): void;
639
+ disableReactivity(): void;
550
640
  }
551
641
 
552
642
 
553
- declare interface WatchOptions<T> extends FragmentOptions {
554
- model: IValue<T>;
555
- slot?: (node: Fragment, value: T) => void;
643
+ declare type EventHandler<T> = (ev: T) => any;
644
+ declare interface Tag<Attrs, Events> {
645
+ attrs: Attrs;
646
+ events: Events;
556
647
  }
557
- /**
558
- * Watch Node
559
- * @class Watch
560
- * @extends Fragment
561
- */
562
- declare class Watch<T> extends Fragment<WatchOptions<T>> {
563
- input: WatchOptions<T>;
564
- compose(input: WatchOptions<T>): void;
648
+ declare type TagEvents = {
649
+ [K : string]: EventHandler<HTMLElementEventMap[K]> | undefined;
650
+ };
651
+ declare interface TagAttrs {
652
+ id: string;
653
+ accesskey: string;
654
+ autocapitalize: "off" | "none" | "on" | "sentences" | "words" | "characters";
655
+ autofocus: "" | boolean;
656
+ contenteditable: "true" | "false" | "" | boolean;
657
+ dir: "ltr" | "rtl" | "auto";
658
+ draggable: "true" | "false" | "" | boolean;
659
+ enterkeyhint: "enter" | "done" | "go" | "next" | "previous" | "search" | "send";
660
+ hidden: "until-found" | "hidden" | "" | boolean;
661
+ inert: boolean;
662
+ inputmode: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search";
663
+ is: string;
664
+ itemid: string;
665
+ itemprop: string;
666
+ itemref: string;
667
+ itemscope: boolean;
668
+ itemtype: string;
669
+ lang: string;
670
+ nonce: string;
671
+ spellcheck: "true" | "false" | "" | boolean;
672
+ tabindex: number;
673
+ title: string;
674
+ translate: "yes" | "no" | "" | boolean;
565
675
  }
566
-
567
-
568
-
569
- /**
570
- * Represents a Vasille.js node
571
- * @class FragmentPrivate
572
- * @extends ReactivePrivate
573
- */
574
- declare class FragmentPrivate extends ReactivePrivate {
575
- /**
576
- * The app node
577
- * @type {AppNode}
578
- */
579
- app: AppNode;
580
- /**
581
- * Parent node
582
- * @type {Fragment}
583
- */
584
- parent: Fragment;
585
- /**
586
- * Next node
587
- * @type {?Fragment}
588
- */
589
- next?: Fragment;
590
- /**
591
- * Previous node
592
- * @type {?Fragment}
593
- */
594
- prev?: Fragment;
595
- constructor(): void;
596
- /**
597
- * Pre-initializes the base of a fragment
598
- * @param app {App} the app node
599
- * @param parent {Fragment} the parent node
600
- */
601
- preinit(app: AppNode, parent: Fragment): void;
602
- /**
603
- * Unlinks all bindings
604
- */
605
- $destroy(): void;
676
+ declare interface MediaTagAttrs extends TagAttrs {
677
+ src: string;
678
+ crossorigin: "anonymous" | "use-credentials" | "" | boolean;
679
+ preload: "none" | "metadata" | "auto";
680
+ autoplay: boolean;
681
+ loop: boolean;
682
+ muted: boolean;
683
+ controls: boolean;
606
684
  }
607
- /**
608
- * This class is symbolic
609
- * @extends Reactive
610
- */
611
- declare class Fragment<T> extends Reactive {
612
- /**
613
- * Private part
614
- * @protected
615
- */
616
- $: FragmentPrivate;
617
- /**
618
- * The children list
619
- * @type Array
620
- */
621
- children: Set<Fragment>;
622
- lastChild: Fragment | null;
623
- /**
624
- * Constructs a Vasille Node
625
- * @param input
626
- * @param $ {FragmentPrivate}
627
- */
628
- constructor(input: T, $?: FragmentPrivate): void;
629
- /**
630
- * Gets the app of node
631
- */
632
- get app(): AppNode;
633
- /**
634
- * Prepare to init fragment
635
- * @param app {AppNode} app of node
636
- * @param parent {Fragment} parent of node
637
- * @param data {*} additional data
638
- */
639
- preinit(app: AppNode, parent: Fragment, data?: any): void;
640
- init(): T['return'];
641
- compose(input: T): void;
642
- /** To be overloaded: ready event handler */
643
- ready(): void;
644
- /**
645
- * Pushes a node to children immediately
646
- * @param node {Fragment} A node to push
647
- * @protected
648
- */
649
- pushNode(node: Fragment): void;
650
- /**
651
- * Find first node in element if so exists
652
- * @return {?Element}
653
- * @protected
654
- */
655
- findFirstChild(): Node;
656
- /**
657
- * Append a node to end of element
658
- * @param node {Node} node to insert
659
- */
660
- appendNode(node: Node): void;
661
- /**
662
- * Insert a node as a sibling of this
663
- * @param node {Node} node to insert
664
- */
665
- insertAdjacent(node: Node): void;
666
- /**
667
- * Defines a text fragment
668
- * @param text {String | IValue} A text fragment string
669
- * @param cb {function (TextNode)} Callback if previous is slot name
670
- */
671
- text(text: string | IValue<string>, cb?: (text: TextNode) => void): void;
672
- debug(text: IValue<string>): void;
673
- /**
674
- * Defines a tag element
675
- * @param tagName {String} the tag name
676
- * @param input
677
- * @param cb {function(Tag, *)} callback
678
- */
679
- tag<K>(tagName: K, input: TagOptionsWithSlot<K>, cb?: (node: Tag<K>) => void): (HTMLElementTagNameMap & SVGElementTagNameMap)[K];
680
- /**
681
- * Defines a custom element
682
- * @param node {Fragment} vasille element to insert
683
- * @param callback {function($ : *)}
684
- */
685
- create<T>(node: T, callback?: T['input']['slot']): T['input']['return'];
686
- /**
687
- * Defines an if node
688
- * @param cond {IValue} condition
689
- * @param cb {function(Fragment)} callback to run on true
690
- * @return {this}
691
- */
692
- if(cond: IValue<boolean>, cb: (node: Fragment) => void): void;
693
- else(cb: (node: Fragment) => void): void;
694
- elif(cond: IValue<boolean>, cb: (node: Fragment) => void): void;
695
- /**
696
- * Create a case for switch
697
- * @param cond {IValue<boolean>}
698
- * @param cb {function(Fragment) : void}
699
- * @return {{cond : IValue, cb : (function(Fragment) : void)}}
700
- */
701
- case(cond: IValue<boolean>, cb: (node: Fragment) => void): {
702
- cond: IValue<boolean>;
703
- cb: (node: Fragment) => void;
704
- };
705
- /**
706
- * @param cb {(function(Fragment) : void)}
707
- * @return {{cond : IValue, cb : (function(Fragment) : void)}}
708
- */
709
- default(cb: (node: Fragment) => void): {
710
- cond: IValue<boolean>;
711
- cb: (node: Fragment) => void;
712
- };
713
- insertBefore(node: Fragment): void;
714
- insertAfter(node: Fragment): void;
715
- remove(): void;
716
- $destroy(): void;
685
+ declare type MediaEvents = {
686
+ [K : string]: EventHandler<HTMLMediaElementEventMap[K]> | undefined;
687
+ };
688
+ declare type VideoEvents = {
689
+ [K : string]: EventHandler<HTMLVideoElementEventMap[K]> | undefined;
690
+ };
691
+ declare interface BaseAttrs extends TagAttrs {
692
+ href: string;
693
+ target: string;
717
694
  }
718
- /**
719
- * The part of a text node
720
- * @class TextNodePrivate
721
- * @extends FragmentPrivate
722
- */
723
- declare class TextNodePrivate extends FragmentPrivate {
724
- node: Text;
725
- constructor(): void;
726
- /**
727
- * Pre-initializes a text node
728
- * @param app {AppNode} the app node
729
- * @param parent
730
- * @param text {IValue}
731
- */
732
- preinitText(app: AppNode, parent: Fragment, text: IValue<string> | string): void;
733
- /**
734
- * Clear node data
735
- */
736
- $destroy(): void;
695
+ declare interface LinkAttrs extends TagAttrs {
696
+ href: string;
697
+ crossorigin: "anonymous" | "use-credentials" | "" | boolean;
698
+ rel: string;
699
+ media: string;
700
+ integrity: string;
701
+ hreflang: string;
702
+ type: string;
703
+ referrerpolicy: string;
704
+ sizes: string;
705
+ imagesrcset: string;
706
+ imagesizes: string;
707
+ as: string;
708
+ blocking: boolean;
709
+ color: string;
737
710
  }
738
- /**
739
- * Represents a text node
740
- * @class TextNode
741
- * @extends Fragment
742
- */
743
- declare class TextNode extends Fragment {
744
- $: TextNodePrivate;
745
- constructor($?: TextNodePrivate): void;
746
- preinit(app: AppNode, parent: Fragment, text?: IValue<string> | string): void;
747
- findFirstChild(): Node;
748
- $destroy(): void;
711
+ declare interface MetaAttrs extends TagAttrs {
712
+ name: string;
713
+ 'http-equiv': string;
714
+ content: string;
715
+ charset: string;
716
+ media: string;
749
717
  }
750
- /**
751
- * The part of a base node
752
- * @class INodePrivate
753
- * @extends FragmentPrivate
754
- */
755
- declare class INodePrivate extends FragmentPrivate {
756
- /**
757
- * Defines if node is unmounted
758
- * @type {boolean}
759
- */
760
- unmounted: boolean;
761
- /**
762
- * The element of vasille node
763
- * @type Element
764
- */
765
- node: Element;
766
- constructor(): void;
767
- $destroy(): void;
718
+ declare interface StyleAttrs extends TagAttrs {
719
+ media: string;
720
+ blocking: string;
768
721
  }
769
- /**
770
- * Vasille node which can manipulate an element node
771
- * @class INode
772
- * @extends Fragment
773
- */
774
- declare class INode<T> extends Fragment<T> {
775
- $: INodePrivate;
776
- /**
777
- * Constructs a base node
778
- * @param input
779
- * @param $ {?INodePrivate}
780
- */
781
- constructor(input: T, $?: INodePrivate): void;
782
- /**
783
- * Get the bound node
784
- */
785
- get node(): Element;
786
- /**
787
- * Bind attribute value
788
- * @param name {String} name of attribute
789
- * @param value {IValue} value
790
- */
791
- attr(name: string, value: IValue<string | number | boolean>): void;
792
- /**
793
- * Set attribute value
794
- * @param name {string} name of attribute
795
- * @param value {string} value
796
- */
797
- setAttr(name: string, value: string | number | boolean): this;
798
- /**
799
- * Adds a CSS class
800
- * @param cl {string} Class name
801
- */
802
- addClass(cl: string): this;
803
- /**
804
- * Adds some CSS classes
805
- * @param cls {...string} classes names
806
- */
807
- removeClasse(cl: string): this;
808
- /**
809
- * Bind a CSS class
810
- * @param className {IValue}
811
- */
812
- bindClass(className: IValue<string>): this;
813
- /**
814
- * Bind a floating class name
815
- * @param cond {IValue} condition
816
- * @param className {string} class name
817
- */
818
- floatingClass(cond: IValue<boolean>, className: string): this;
819
- /**
820
- * Defines a style attribute
821
- * @param name {String} name of style attribute
822
- * @param value {IValue} value
823
- */
824
- style(name: string, value: IValue<string>): this;
825
- /**
826
- * Sets a style property value
827
- * @param prop {string} Property name
828
- * @param value {string} Property value
829
- */
830
- setStyle(prop: string, value: string): this;
831
- /**
832
- * Add a listener for an event
833
- * @param name {string} Event name
834
- * @param handler {function (Event)} Event handler
835
- * @param options {Object | boolean} addEventListener options
836
- */
837
- listen(name: string, handler: (ev: Event) => void, options?: boolean | AddEventListenerOptions): this;
838
- insertAdjacent(node: Node): void;
839
- /**
840
- * A v-show & ngShow alternative
841
- * @param cond {IValue} show condition
842
- */
843
- bindShow(cond: IValue<boolean>): this;
844
- /**
845
- * bind HTML
846
- * @param value {IValue}
847
- */
848
- bindDomApi(name: string, value: IValue<string>): void;
849
- applyOptions(options: T): void;
722
+ declare type BodyEvents = {
723
+ [K : string]: EventHandler<HTMLBodyElementEventMap[K]> | undefined;
724
+ };
725
+ declare interface BlockQuoteAttrs extends TagAttrs {
726
+ cite: string;
850
727
  }
851
- declare interface TagOptionsWithSlot<K> extends TagOptions<K> {
852
- slot?: (tag: Tag<K>) => void;
728
+ declare interface OlAttrs extends TagAttrs {
729
+ reversed: boolean;
730
+ start: number;
731
+ type: "1" | "a" | "A" | "i" | "I";
853
732
  }
854
- /**
855
- * Represents an Vasille.js HTML element node
856
- * @class Tag
857
- * @extends INode
858
- */
859
- declare class Tag<K> extends INode<TagOptionsWithSlot<K>> {
860
- constructor(input: TagOptionsWithSlot<K>): void;
861
- preinit(app: AppNode, parent: Fragment, tagName?: string): void;
862
- compose(input: TagOptionsWithSlot<K>): void;
863
- findFirstChild(): Node;
864
- insertAdjacent(node: Node): void;
865
- appendNode(node: Node): void;
866
- /**
867
- * Mount/Unmount a node
868
- * @param cond {IValue} show condition
869
- */
870
- bindMount(cond: IValue<boolean>): void;
871
- /**
872
- * Runs GC
873
- */
874
- $destroy(): void;
733
+ declare interface AAttrs extends TagAttrs {
734
+ href: string;
735
+ target: string;
736
+ download: string;
737
+ ping: string;
738
+ hreflang: string;
739
+ type: string;
740
+ referrerpolicy: string;
875
741
  }
876
- /**
877
- * Represents a vasille extension node
878
- * @class Extension
879
- * @extends INode
880
- */
881
- declare class Extension<T> extends INode<T> {
882
- preinit(app: AppNode, parent: Fragment): void;
883
- extend(options: T): void;
884
- $destroy(): void;
742
+ declare interface QAttrs extends TagAttrs {
743
+ cite: string;
885
744
  }
886
- /**
887
- * Node which cas has just a child
888
- * @class Component
889
- * @extends Extension
890
- */
891
- declare class Component<T> extends Extension<T> {
892
- init(): void;
893
- ready(): void;
894
- preinit(app: AppNode, parent: Fragment): void;
745
+ declare interface DataAttr extends TagAttrs {
746
+ value: string;
895
747
  }
896
- /**
897
- * Private part of switch node
898
- * @class SwitchedNodePrivate
899
- * @extends INodePrivate
900
- */
901
- declare class SwitchedNodePrivate extends FragmentPrivate {
902
- /**
903
- * Index of current true condition
904
- * @type number
905
- */
906
- index: number;
907
- /**
908
- * Array of possible cases
909
- * @type {Array<{cond : IValue<boolean>, cb : function(Fragment)}>}
910
- */
911
- cases: {
912
- cond: IValue<boolean>;
913
- cb: (node: Fragment) => void;
914
- }[];
915
- /**
916
- * A function which sync index and content, will be bounded to each condition
917
- * @type {Function}
918
- */
919
- sync: () => void;
920
- constructor(): void;
921
- /**
922
- * Runs GC
923
- */
924
- $destroy(): void;
748
+ declare interface BdoAttrs extends TagAttrs {
749
+ dir: "ltr" | "rtl";
925
750
  }
926
- /**
927
- * Defines a node witch can switch its children conditionally
928
- */
929
- declare class SwitchedNode extends Fragment {
930
- $: SwitchedNodePrivate;
931
- /**
932
- * Constructs a switch node and define a sync function
933
- */
934
- constructor(): void;
935
- addCase(case_: {
936
- cond: IValue<boolean>;
937
- cb: (node: Fragment) => void;
938
- }): void;
939
- /**
940
- * Creates a child node
941
- * @param cb {function(Fragment)} Call-back
942
- */
943
- createChild(cb: (node: Fragment) => void): void;
944
- ready(): void;
945
- $destroy(): void;
751
+ declare interface SourceAttrs extends TagAttrs {
752
+ type: string;
753
+ src: string;
754
+ srcset: string;
755
+ sizes: string;
756
+ media: string;
757
+ width: number;
758
+ height: number;
946
759
  }
947
- /**
948
- * The part of a text node
949
- */
950
- declare class DebugPrivate extends FragmentPrivate {
951
- node: Comment;
952
- constructor(): void;
953
- /**
954
- * Pre-initializes a text node
955
- * @param app {App} the app node
956
- * @param parent {Fragment} parent node
957
- * @param text {String | IValue}
958
- */
959
- preinitComment(app: AppNode, parent: Fragment, text: IValue<string>): void;
960
- /**
961
- * Clear node data
962
- */
963
- $destroy(): void;
760
+ declare interface ImgAttrs extends TagAttrs {
761
+ alt: string;
762
+ src: string;
763
+ srcset: string;
764
+ sizes: string;
765
+ crossorigin: "anonymous" | "use-credentials" | "" | boolean;
766
+ usemap: string;
767
+ ismap: string;
768
+ width: number;
769
+ height: number;
770
+ referrerpolicy: string;
771
+ decoding: string;
772
+ loading: string;
964
773
  }
965
- /**
966
- * Represents a debug node
967
- * @class DebugNode
968
- * @extends Fragment
969
- */
970
- declare class DebugNode extends Fragment {
971
- /**
972
- * data
973
- * @type {DebugNode}
974
- */
975
- $: DebugPrivate;
976
- constructor(): void;
977
- preinit(app: AppNode, parent: Fragment, text?: IValue<string>): void;
978
- /**
979
- * Runs garbage collector
980
- */
981
- $destroy(): void;
774
+ declare interface IframeAttrs extends TagAttrs {
775
+ src: string;
776
+ srcdoc: string;
777
+ name: string;
778
+ sandbox: string;
779
+ allow: string;
780
+ allowfullscreen: string;
781
+ width: number;
782
+ height: number;
783
+ referrerpolicy: string;
784
+ loading: string;
982
785
  }
983
-
984
-
985
- declare interface AppOptions<K> extends TagOptions<K> {
986
- debugUi?: boolean;
786
+ declare interface EmbedAttrs extends TagAttrs {
787
+ src: string;
788
+ type: string;
789
+ width: number;
790
+ height: number;
987
791
  }
988
- /**
989
- * Application Node
990
- * @class AppNode
991
- * @extends INode
992
- */
993
- declare class AppNode<T> extends INode<T> {
994
- /**
995
- * Enables debug comments
996
- */
997
- debugUi: boolean;
998
- /**
999
- * @param input
1000
- */
1001
- constructor(input: T): void;
792
+ declare interface ObjectAttrs extends TagAttrs {
793
+ data: string;
794
+ type: string;
795
+ name: string;
796
+ form: string;
797
+ width: number;
798
+ height: number;
1002
799
  }
1003
- /**
1004
- * Represents a Vasille.js application
1005
- * @class App
1006
- * @extends AppNode
1007
- */
1008
- declare class App<T> extends AppNode<T> {
1009
- /**
1010
- * Constructs an app node
1011
- * @param node {Element} The root of application
1012
- * @param input
1013
- */
1014
- constructor(node: Element, input: T): void;
1015
- appendNode(node: Node): void;
800
+ declare interface ParamAttrs extends TagAttrs {
801
+ name: string;
802
+ value: string;
1016
803
  }
1017
- declare interface PortalOptions extends AppOptions<'div'> {
1018
- node: Element;
1019
- slot?: (node: Fragment) => void;
804
+ declare interface VideoAttrs extends MediaTagAttrs {
805
+ poster: string;
806
+ playsinline: boolean;
807
+ width: number;
808
+ height: number;
1020
809
  }
1021
- declare class Portal extends AppNode<PortalOptions> {
1022
- constructor(input: PortalOptions): void;
1023
- appendNode(node: Node): void;
810
+ declare interface TrackAttrs extends TagAttrs {
811
+ kind: string;
812
+ src: string;
813
+ srclang: string;
814
+ label: string;
815
+ defautl: boolean;
1024
816
  }
1025
-
1026
-
1027
-
1028
- /**
1029
- * Describe a common binding logic
1030
- * @class Binding
1031
- * @extends Destroyable
1032
- */
1033
- declare class Binding<T> extends Destroyable {
1034
- binding: any;
1035
- func: any;
1036
- /**
1037
- * Constructs a common binding logic
1038
- * @param value {IValue} the value to bind
1039
- */
1040
- constructor(value: IValue<T>): void;
1041
- init(bounded: (v: T) => void): void;
1042
- /**
1043
- * Just clear bindings
1044
- */
1045
- $destroy(): void;
817
+ declare interface MapAttrs extends TagAttrs {
818
+ name: string;
1046
819
  }
1047
-
1048
-
1049
- /**
1050
- * Represents an Attribute binding description
1051
- * @class AttributeBinding
1052
- * @extends Binding
1053
- */
1054
- declare class AttributeBinding extends Binding<string | number | boolean | null> {
1055
- /**
1056
- * Constructs an attribute binding description
1057
- * @param node {INode} the vasille node
1058
- * @param name {String} the name of attribute
1059
- * @param value {IValue} value to bind
1060
- */
1061
- constructor(node: INode, name: string, value: IValue<string | number | boolean | null>): void;
820
+ declare interface AreaAttrs extends TagAttrs {
821
+ alt: string;
822
+ coords: string;
823
+ shape: string;
824
+ href: string;
825
+ target: string;
826
+ download: string;
827
+ ping: string;
828
+ rel: string;
829
+ referrerpolicy: string;
1062
830
  }
1063
-
1064
-
1065
- declare class StaticClassBinding extends Binding<boolean> {
1066
- current: any;
1067
- constructor(node: INode, name: string, value: IValue<boolean>): void;
831
+ declare interface ColAttrs extends TagAttrs {
832
+ span: number;
1068
833
  }
1069
- declare class DynamicalClassBinding extends Binding<string> {
1070
- current: any;
1071
- constructor(node: INode, value: IValue<string>): void;
834
+ declare interface TdAttrs extends TagAttrs {
835
+ colspan: number;
836
+ rowspan: number;
837
+ headers: string;
1072
838
  }
1073
-
1074
-
1075
- /**
1076
- * Describes a style attribute binding
1077
- * @class StyleBinding
1078
- * @extends Binding
1079
- */
1080
- declare class StyleBinding extends Binding<string> {
1081
- /**
1082
- * Constructs a style binding attribute
1083
- * @param node {INode} the vasille node
1084
- * @param name {string} the name of style property
1085
- * @param value {IValue} the value to bind
1086
- */
1087
- constructor(node: INode, name: string, value: IValue<string>): void;
839
+ declare interface ThAttrs extends TdAttrs {
840
+ scope: string;
841
+ abbr: string;
1088
842
  }
1089
-
1090
-
1091
- declare interface FragmentOptions {
1092
- "v:is"?: Record<string, IValue<any>>;
1093
- return?: any;
1094
- slot?: (node: Fragment, ...args: any[]) => void;
843
+ declare interface FormAttrs extends TagAttrs {
844
+ 'accept-charset': string;
845
+ action: string;
846
+ autocomplete: string;
847
+ enctype: string;
848
+ method: string;
849
+ name: string;
850
+ novalidate: string;
851
+ target: string;
852
+ rel: string;
1095
853
  }
1096
- declare type AttrType<T> = IValue<T | string | null> | T | string | null | undefined;
1097
- declare interface TagOptions<T> extends FragmentOptions {
1098
- "v:attr"?: {
1099
- [K : string]:? AttrType<AcceptedTagsSpec[T]['attrs'][K]>;
1100
- } & Record<string, AttrType<number | boolean>>;
1101
- class?: (string | IValue<string> | Record<string, boolean | IValue<boolean>>)[] | ({
1102
- $: IValue<string>[];
1103
- } & Record<string, boolean | IValue<boolean>>);
1104
- style?: Record<string, string | IValue<string> | [number | string | IValue<number | string>, string]>;
1105
- "v:events"?: Partial<AcceptedTagsSpec[T]['events']>;
1106
- "v:set"?: Partial<AcceptedTagsMap[T]> & Record<string, any>;
1107
- "v:bind"?: {
1108
- [K : string]:? IValue<AcceptedTagsMap[T][K]>;
1109
- } & Record<string, IValue<any>>;
854
+ declare interface LabelAttrs extends TagAttrs {
855
+ for: string;
1110
856
  }
1111
-
1112
-
1113
- /**
1114
- * Mark an object which can be destroyed
1115
- * @class Destroyable
1116
- */
1117
- declare class Destroyable {
1118
- /**
1119
- * Make object fields non configurable
1120
- * @protected
1121
- */
1122
- $seal(): void;
1123
- /**
1124
- * Garbage collector method
1125
- */
1126
- $destroy(): void;
857
+ declare interface InputAttrs extends TagAttrs {
858
+ accept: string;
859
+ alt: string;
860
+ autocomplete: boolean;
861
+ checked: boolean;
862
+ dirname: string;
863
+ disabled: boolean;
864
+ form: string;
865
+ formaction: string;
866
+ formenctype: string;
867
+ formmethod: string;
868
+ formnovalidate: string;
869
+ formtarget: string;
870
+ height: number;
871
+ list: string;
872
+ max: number;
873
+ maxlength: number;
874
+ min: number;
875
+ minlength: number;
876
+ multiple: boolean;
877
+ name: string;
878
+ pattern: string;
879
+ placeholder: string;
880
+ readonly: string;
881
+ required: string;
882
+ size: number;
883
+ src: string;
884
+ step: string;
885
+ type: string;
886
+ width: number;
1127
887
  }
1128
-
1129
-
1130
- declare function notOverwritten(): string;
1131
- declare function internalError(msg: string): string;
1132
- declare function userError(msg: string, err: string): string;
1133
- declare function wrongBinding(msg: string): string;
1134
-
1135
-
1136
- declare class Switchable extends Destroyable {
1137
- /**
1138
- * Enable update handlers triggering
1139
- */
1140
- $enable(): void;
1141
- /**
1142
- * disable update handlers triggering
1143
- */
1144
- $disable(): void;
888
+ declare interface ButtonAttrs extends TagAttrs {
889
+ disabled: boolean;
890
+ form: string;
891
+ formaction: string;
892
+ formenctype: string;
893
+ formmethod: string;
894
+ formnovalidate: string;
895
+ formtarget: string;
896
+ name: string;
897
+ type: string;
898
+ value: string;
1145
899
  }
1146
- /**
1147
- * Interface which describes a value
1148
- * @class IValue
1149
- * @extends Destroyable
1150
- */
1151
- declare class IValue<T> extends Switchable {
1152
- /**
1153
- * Is enabled state flag
1154
- * @protected
1155
- */
1156
- isEnabled: boolean;
1157
- /**
1158
- * @param isEnabled {boolean} initial is enabled state
1159
- */
1160
- constructor(isEnabled: boolean): void;
1161
- /**
1162
- * Get the encapsulated value
1163
- * @return {*} the encapsulated value
1164
- */
1165
- get $(): T;
1166
- /**
1167
- * Sets the encapsulated value
1168
- * @param value {*} value to encapsulate
1169
- */
1170
- set $(value: T): void;
1171
- /**
1172
- * Add a new handler to value change
1173
- * @param handler {function(value : *)} the handler to add
1174
- */
1175
- $on(handler: (value: T) => void): void;
1176
- /**
1177
- * Removes a handler of value change
1178
- * @param handler {function(value : *)} the handler to remove
1179
- */
1180
- $off(handler: (value: T) => void): void;
900
+ declare interface SelectAttrs extends TagAttrs {
901
+ autocomplete: boolean;
902
+ disabled: boolean;
903
+ form: string;
904
+ multiple: boolean;
905
+ name: string;
906
+ required: boolean;
907
+ size: number;
1181
908
  }
1182
-
1183
-
1184
- declare var current: Reactive | null;
1185
- /**
1186
- * Private stuff of a reactive object
1187
- * @class ReactivePrivate
1188
- * @extends Destroyable
1189
- */
1190
- declare class ReactivePrivate extends Destroyable {
1191
- /**
1192
- * A list of user-defined values
1193
- * @type {Set}
1194
- */
1195
- watch: Set<Switchable>;
1196
- /**
1197
- * A list of user-defined bindings
1198
- * @type {Set}
1199
- */
1200
- bindings: Set<Destroyable>;
1201
- /**
1202
- * A list of user defined models
1203
- */
1204
- models: Set<IModel>;
1205
- /**
1206
- * Reactivity switch state
1207
- * @type {boolean}
1208
- */
1209
- enabled: boolean;
1210
- /**
1211
- * The frozen state of object
1212
- * @type {boolean}
1213
- */
1214
- frozen: boolean;
1215
- /**
1216
- * An expression which will freeze/unfreeze the object
1217
- * @type {IValue<void>}
1218
- */
1219
- freezeExpr: Expression<void, [boolean]>;
1220
- /**
1221
- * Parent node
1222
- * @type {Reactive}
1223
- */
1224
- parent: Reactive;
1225
- onDestroy?: () => void;
1226
- constructor(): void;
1227
- $destroy(): void;
909
+ declare interface OptgroupAttrs extends TagAttrs {
910
+ disabled: boolean;
911
+ label: string;
1228
912
  }
1229
- /**
1230
- * A reactive object
1231
- * @class Reactive
1232
- * @extends Destroyable
1233
- */
1234
- declare class Reactive<T> extends Destroyable {
1235
- /**
1236
- * Private stuff
1237
- * @protected
1238
- */
1239
- $: ReactivePrivate;
1240
- input: T;
1241
- constructor(input: T, $?: ReactivePrivate): void;
1242
- /**
1243
- * Get parent node
1244
- */
1245
- get parent(): Reactive;
1246
- /**
1247
- * Create a reference
1248
- * @param value {*} value to reference
1249
- */
1250
- ref<T>(value: T): IValue<T>;
1251
- /**
1252
- * Create a mirror
1253
- * @param value {IValue} value to mirror
1254
- */
1255
- mirror<T>(value: IValue<T>): Mirror<T>;
1256
- /**
1257
- * Create a forward-only mirror
1258
- * @param value {IValue} value to mirror
1259
- */
1260
- forward<T>(value: IValue<T>): Mirror<T>;
1261
- /**
1262
- * Creates a pointer
1263
- * @param value {*} default value to point
1264
- * @param forwardOnly {boolean} forward only sync
1265
- */
1266
- point<T>(value: IValue<T>, forwardOnly?: boolean): Pointer<T>;
1267
- /**
1268
- * Register a model
1269
- * @param model
1270
- */
1271
- register<T>(model: T): T;
1272
- /**
1273
- * Creates a watcher
1274
- * @param func {function} function to run on any argument change
1275
- * @param values
1276
- */
1277
- watch<Args>(func: (...args: Args) => void, ...values: KindOfIValue<Args>): void;
1278
- /**
1279
- * Creates a computed value
1280
- * @param func {function} function to run on any argument change
1281
- * @param values
1282
- * @return {IValue} the created ivalue
1283
- */
1284
- expr<T,Args>(func: (...args: Args) => T, ...values: KindOfIValue<Args>): IValue<T>;
1285
- /**
1286
- * Enable reactivity of fields
1287
- */
1288
- enable(): void;
1289
- /**
1290
- * Disable reactivity of fields
1291
- */
1292
- disable(): void;
1293
- /**
1294
- * Disable/Enable reactivity of object fields with feedback
1295
- * @param cond {IValue} show condition
1296
- * @param onOff {function} on show feedback
1297
- * @param onOn {function} on hide feedback
1298
- */
1299
- bindAlive(cond: IValue<boolean>, onOff?: () => void, onOn?: () => void): this;
1300
- init(): T['return'];
1301
- applyOptions(input: T): void;
1302
- applyOptionsNow(): void;
1303
- compose(input: T): T['return'];
1304
- composeNow(): void;
1305
- runFunctional<F>(f: F, ...args: Parameters<F>): ReturnType<F>;
1306
- runOnDestroy(func: () => void): void;
1307
- $destroy(): void;
1308
- }
1309
-
1310
-
1311
- declare type SvgEvents = {
1312
- [K : string]: EventHandler<SVGElementEventMap[K]> | undefined;
1313
- };
1314
- declare interface SvgAreaAttrs {
1315
- "aria-activedescendant": string;
1316
- "aria-atomic": string;
1317
- "aria-autocomplete": string;
1318
- "aria-busy": string;
1319
- "aria-checked": string;
1320
- "aria-colcount": string;
1321
- "aria-colindex": string;
1322
- "aria-colspan": string;
1323
- "aria-controls": string;
1324
- "aria-current": string;
1325
- "aria-describedby": string;
1326
- "aria-details": string;
1327
- "aria-disabled": string;
1328
- "aria-dropeffect": string;
1329
- "aria-errormessage": string;
1330
- "aria-expanded": string;
1331
- "aria-flowto": string;
1332
- "aria-grabbed": string;
1333
- "aria-haspopup": string;
1334
- "aria-hidden": string;
1335
- "aria-invalid": string;
1336
- "aria-keyshortcuts": string;
1337
- "aria-label": string;
1338
- "aria-labelledby": string;
1339
- "aria-level": string;
1340
- "aria-live": string;
1341
- "aria-modal": string;
1342
- "aria-multiline": string;
1343
- "aria-multiselectable": string;
1344
- "aria-orientation": string;
1345
- "aria-owns": string;
1346
- "aria-placeholder": string;
1347
- "aria-posinset": string;
1348
- "aria-pressed": string;
1349
- "aria-readonly": string;
1350
- "aria-relevant": string;
1351
- "aria-required": string;
1352
- "aria-roledescription": string;
1353
- "aria-rowcount": string;
1354
- "aria-rowindex": string;
1355
- "aria-rowspan": string;
1356
- "aria-selected": string;
1357
- "aria-setsize": string;
1358
- "aria-sort": string;
1359
- "aria-valuemax": string;
1360
- "aria-valuemin": string;
1361
- "aria-valuenow": string;
1362
- "aria-valuetext": string;
1363
- "role": string;
1364
- }
1365
- declare interface SvgConditionalProcessingAtttrs {
1366
- "requiredExtensions": string;
1367
- "systemLanguage": string;
1368
- }
1369
- declare interface SvgCoreAttrs {
1370
- "id": string;
1371
- "tabindex": string;
1372
- "lang": string;
1373
- "xml:space": string;
1374
- }
1375
- declare interface SvgSvgAttrs extends SvgAreaAttrs, SvgConditionalProcessingAtttrs, SvgCoreAttrs {
1376
- "viewBox": string;
1377
- "preserveAspectRatio": string;
1378
- "zoomAndPan": string;
1379
- "transform": string;
1380
- x: number;
1381
- y: number;
1382
- width: number;
1383
- height: number;
1384
- }
1385
- declare interface Svg3in1Attrs extends SvgAreaAttrs, SvgConditionalProcessingAtttrs, SvgCoreAttrs {
1386
- }
1387
- declare interface SvgUseAttrs extends Svg3in1Attrs {
1388
- href: string;
1389
- }
1390
- declare interface SvgPathLengthAttrs extends Svg3in1Attrs {
1391
- pathLength: number;
1392
- "marker-start": string;
1393
- "marker-mid": string;
1394
- "marker-end": string;
1395
- }
1396
- declare interface SvgPathAttrs extends SvgPathLengthAttrs {
1397
- d: string;
1398
- }
1399
- declare interface SvgRectAttrs extends SvgPathLengthAttrs {
1400
- x: number;
1401
- y: number;
1402
- width: number;
1403
- height: number;
1404
- rx: number;
1405
- ry: number;
1406
- }
1407
- declare interface SvgCircleAttrs extends SvgPathLengthAttrs {
1408
- cx: number;
1409
- cy: number;
1410
- r: number;
1411
- }
1412
- declare interface SvgEllipseAttrs extends SvgPathLengthAttrs {
1413
- cx: number;
1414
- cy: number;
1415
- rx: number;
1416
- ry: number;
913
+ declare interface OptionAttrs extends TagAttrs {
914
+ disabled: boolean;
915
+ label: string;
916
+ selected: boolean;
917
+ value: string;
1417
918
  }
1418
- declare interface SvgLineAttrs extends SvgPathLengthAttrs {
1419
- x1: number;
1420
- y1: number;
1421
- x2: number;
1422
- y2: number;
919
+ declare interface TextareaAttrs extends TagAttrs {
920
+ autocomplete: boolean;
921
+ cols: number;
922
+ dirname: string;
923
+ disabled: boolean;
924
+ form: string;
925
+ maxlength: number;
926
+ minlength: number;
927
+ name: string;
928
+ placeholder: string;
929
+ readonly: boolean;
930
+ required: boolean;
931
+ rows: number;
932
+ wrap: string;
1423
933
  }
1424
- declare interface SvgPolygonAttrs extends SvgPathLengthAttrs {
1425
- points: number;
934
+ declare interface OutputAttrs extends TagAttrs {
935
+ for: string;
936
+ form: string;
937
+ name: string;
1426
938
  }
1427
- declare interface SvgCommonTextAttrs extends Svg3in1Attrs {
1428
- x: number;
1429
- y: number;
1430
- dx: number;
1431
- dy: number;
1432
- rotate: number;
1433
- textLength: number;
1434
- lengthAdjust: 'spacing' | 'spacingAndGlyphs';
939
+ declare interface ProgressAttrs extends TagAttrs {
940
+ value: number;
941
+ max: number;
1435
942
  }
1436
- declare interface SvgTextPathAttrs extends Svg3in1Attrs {
1437
- "lengthAdjust": 'spacing' | 'spacingAndGlyphs';
1438
- "textLength": number;
1439
- "path": string;
1440
- "href": string;
1441
- "startOffset": number;
1442
- "method": 'align' | 'stretch';
1443
- "spacing": 'auto' | 'exact';
1444
- "side": 'left' | 'right';
943
+ declare interface MeterAttrs extends TagAttrs {
944
+ value: number;
945
+ min: number;
946
+ max: number;
947
+ low: number;
948
+ high: number;
949
+ optimum: number;
1445
950
  }
1446
- declare interface SvgImageAttrs extends Svg3in1Attrs {
1447
- "preserveAspectRatio": string;
1448
- "href": string;
1449
- "crossorigin": string;
1450
- x: number;
1451
- y: number;
1452
- width: number;
1453
- height: number;
951
+ declare interface FieldsetAttrs extends TagAttrs {
952
+ disabled: boolean;
953
+ form: string;
954
+ name: string;
1454
955
  }
1455
- declare interface SvgForeignObjectAttrs extends Svg3in1Attrs {
1456
- x: number;
1457
- y: number;
1458
- width: number;
1459
- height: number;
956
+ declare interface DetailsAttrs extends TagAttrs {
957
+ open: boolean;
1460
958
  }
1461
- declare interface SvgMarkerAttrs extends Svg3in1Attrs {
1462
- "viewBox": string;
1463
- "preserveAspectRatio": string;
1464
- "refX": number;
1465
- "refY": number;
1466
- "markerUnits": 'strokeWidth' | 'userSpaceOnUse';
1467
- "markerWidth": number | 'left' | 'center' | 'right';
1468
- "markerHeight": number | 'top' | 'center' | 'bottom';
1469
- "orient": 'auto' | 'auto-start-reverse' | number;
1470
- }
1471
- declare interface SvgAAttrs extends SvgCoreAttrs {
1472
- href: string;
1473
- "target": '_self' | '_parent' | '_top' | '_blank';
1474
- "download": string;
1475
- "ping": string;
1476
- "rel": string;
1477
- "hreflang": string;
1478
- "type": string;
1479
- "referrerpolicy": string;
959
+ declare interface HtmlTagMap {
960
+ "a": Tag<AAttrs, TagEvents>;
961
+ "abbr": Tag<TagAttrs, TagEvents>;
962
+ "address": Tag<TagAttrs, TagEvents>;
963
+ "area": Tag<AreaAttrs, TagEvents>;
964
+ "article": Tag<TagAttrs, TagEvents>;
965
+ "aside": Tag<TagAttrs, TagEvents>;
966
+ "audio": Tag<MediaTagAttrs, MediaEvents>;
967
+ "b": Tag<TagAttrs, TagEvents>;
968
+ "base": Tag<BaseAttrs, TagEvents>;
969
+ "bdi": Tag<TagAttrs, TagEvents>;
970
+ "bdo": Tag<BdoAttrs, TagEvents>;
971
+ "blockquote": Tag<BlockQuoteAttrs, TagEvents>;
972
+ "body": Tag<TagAttrs, BodyEvents>;
973
+ "br": Tag<TagAttrs, TagEvents>;
974
+ "button": Tag<ButtonAttrs, TagEvents>;
975
+ "canvas": Tag<TagAttrs, TagEvents>;
976
+ "caption": Tag<TagAttrs, TagEvents>;
977
+ "cite": Tag<TagAttrs, TagEvents>;
978
+ "code": Tag<TagAttrs, TagEvents>;
979
+ "col": Tag<ColAttrs, TagEvents>;
980
+ "colgroup": Tag<ColAttrs, TagEvents>;
981
+ "data": Tag<DataAttr, TagEvents>;
982
+ "datalist": Tag<TagAttrs, TagEvents>;
983
+ "dd": Tag<TagAttrs, TagEvents>;
984
+ "del": Tag<TagAttrs, TagEvents>;
985
+ "details": Tag<DetailsAttrs, TagEvents>;
986
+ "dfn": Tag<TagAttrs, TagEvents>;
987
+ "dialog": Tag<TagAttrs, TagEvents>;
988
+ "dir": Tag<TagAttrs, TagEvents>;
989
+ "div": Tag<TagAttrs, TagEvents>;
990
+ "dl": Tag<TagAttrs, TagEvents>;
991
+ "dt": Tag<TagAttrs, TagEvents>;
992
+ "em": Tag<TagAttrs, TagEvents>;
993
+ "embed": Tag<EmbedAttrs, TagEvents>;
994
+ "fieldset": Tag<FieldsetAttrs, TagEvents>;
995
+ "figcaption": Tag<TagAttrs, TagEvents>;
996
+ "figure": Tag<TagAttrs, TagEvents>;
997
+ "font": Tag<TagAttrs, TagEvents>;
998
+ "footer": Tag<TagAttrs, TagEvents>;
999
+ "form": Tag<FormAttrs, TagEvents>;
1000
+ "frame": Tag<TagAttrs, TagEvents>;
1001
+ "frameset": Tag<TagAttrs, TagEvents>;
1002
+ "h1": Tag<TagAttrs, TagEvents>;
1003
+ "h2": Tag<TagAttrs, TagEvents>;
1004
+ "h3": Tag<TagAttrs, TagEvents>;
1005
+ "h4": Tag<TagAttrs, TagEvents>;
1006
+ "h5": Tag<TagAttrs, TagEvents>;
1007
+ "h6": Tag<TagAttrs, TagEvents>;
1008
+ "head": Tag<TagAttrs, TagEvents>;
1009
+ "header": Tag<TagAttrs, TagEvents>;
1010
+ "hgroup": Tag<TagAttrs, TagEvents>;
1011
+ "hr": Tag<TagAttrs, TagEvents>;
1012
+ "html": Tag<TagAttrs, TagEvents>;
1013
+ "i": Tag<TagAttrs, TagEvents>;
1014
+ "iframe": Tag<IframeAttrs, TagEvents>;
1015
+ "img": Tag<ImgAttrs, TagEvents>;
1016
+ "input": Tag<InputAttrs, TagEvents>;
1017
+ "ins": Tag<TagAttrs, TagEvents>;
1018
+ "kbd": Tag<TagAttrs, TagEvents>;
1019
+ "label": Tag<LabelAttrs, TagEvents>;
1020
+ "legend": Tag<TagAttrs, TagEvents>;
1021
+ "li": Tag<TagAttrs, TagEvents>;
1022
+ "link": Tag<LinkAttrs, TagEvents>;
1023
+ "main": Tag<TagAttrs, TagEvents>;
1024
+ "map": Tag<MapAttrs, TagEvents>;
1025
+ "mark": Tag<TagAttrs, TagEvents>;
1026
+ "marquee": Tag<TagAttrs, TagEvents>;
1027
+ "menu": Tag<TagAttrs, TagEvents>;
1028
+ "meta": Tag<MetaAttrs, TagEvents>;
1029
+ "meter": Tag<MeterAttrs, TagEvents>;
1030
+ "nav": Tag<TagAttrs, TagEvents>;
1031
+ "noscript": Tag<TagAttrs, TagEvents>;
1032
+ "object": Tag<ObjectAttrs, TagEvents>;
1033
+ "ol": Tag<OlAttrs, TagEvents>;
1034
+ "optgroup": Tag<OptgroupAttrs, TagEvents>;
1035
+ "option": Tag<OptionAttrs, TagEvents>;
1036
+ "output": Tag<OutputAttrs, TagEvents>;
1037
+ "p": Tag<TagAttrs, TagEvents>;
1038
+ "param": Tag<ParamAttrs, TagEvents>;
1039
+ "picture": Tag<TagAttrs, TagEvents>;
1040
+ "pre": Tag<TagAttrs, TagEvents>;
1041
+ "progress": Tag<ProgressAttrs, TagEvents>;
1042
+ "q": Tag<QAttrs, TagEvents>;
1043
+ "rp": Tag<TagAttrs, TagEvents>;
1044
+ "rt": Tag<TagAttrs, TagEvents>;
1045
+ "ruby": Tag<TagAttrs, TagEvents>;
1046
+ "s": Tag<TagAttrs, TagEvents>;
1047
+ "samp": Tag<TagAttrs, TagEvents>;
1048
+ "script": Tag<TagAttrs, TagEvents>;
1049
+ "section": Tag<TagAttrs, TagEvents>;
1050
+ "select": Tag<SelectAttrs, TagEvents>;
1051
+ "slot": Tag<TagAttrs, TagEvents>;
1052
+ "small": Tag<TagAttrs, TagEvents>;
1053
+ "source": Tag<SourceAttrs, TagEvents>;
1054
+ "span": Tag<TagAttrs, TagEvents>;
1055
+ "strong": Tag<TagAttrs, TagEvents>;
1056
+ "style": Tag<StyleAttrs, TagEvents>;
1057
+ "sub": Tag<TagAttrs, TagEvents>;
1058
+ "summary": Tag<TagAttrs, TagEvents>;
1059
+ "sup": Tag<TagAttrs, TagEvents>;
1060
+ "table": Tag<TagAttrs, TagEvents>;
1061
+ "tbody": Tag<TagAttrs, TagEvents>;
1062
+ "td": Tag<TdAttrs, TagEvents>;
1063
+ "template": Tag<TagAttrs, TagEvents>;
1064
+ "textarea": Tag<TextareaAttrs, TagEvents>;
1065
+ "tfoot": Tag<TagAttrs, TagEvents>;
1066
+ "th": Tag<ThAttrs, TagEvents>;
1067
+ "thead": Tag<TagAttrs, TagEvents>;
1068
+ "time": Tag<TagAttrs, TagEvents>;
1069
+ "title": Tag<TagAttrs, TagEvents>;
1070
+ "tr": Tag<TagAttrs, TagEvents>;
1071
+ "track": Tag<TrackAttrs, TagEvents>;
1072
+ "u": Tag<TagAttrs, TagEvents>;
1073
+ "ul": Tag<TagAttrs, TagEvents>;
1074
+ "var": Tag<TagAttrs, TagEvents>;
1075
+ "video": Tag<VideoAttrs, VideoEvents>;
1076
+ "wbr": Tag<TagAttrs, TagEvents>;
1077
+ [K: string]: Tag<TagAttrs, TagEvents>;
1480
1078
  }
1481
- declare interface SvgViewAttrs extends SvgCoreAttrs, SvgAreaAttrs {
1482
- "viewBox": string;
1483
- "preserveAspectRatio": string;
1484
- "zoomAndPan": string;
1079
+ declare type HtmlOrSvgTag = HTMLElement | SVGElement;
1080
+ declare interface HtmlAndSvgEvents {
1081
+ onabort?: ((this: HtmlOrSvgTag, ev: UIEvent) => any) | null;
1082
+ onanimationcancel?: ((this: HtmlOrSvgTag, ev: AnimationEvent) => any) | null;
1083
+ onanimationend?: ((this: HtmlOrSvgTag, ev: AnimationEvent) => any) | null;
1084
+ onanimationiteration?: ((this: HtmlOrSvgTag, ev: AnimationEvent) => any) | null;
1085
+ onanimationstart?: ((this: HtmlOrSvgTag, ev: AnimationEvent) => any) | null;
1086
+ onauxclick?: ((this: HtmlOrSvgTag, ev: MouseEvent) => any) | null;
1087
+ onblur?: ((this: HtmlOrSvgTag, ev: FocusEvent) => any) | null;
1088
+ oncanplay?: ((this: HtmlOrSvgTag, ev: Event) => any) | null;
1089
+ oncanplaythrough?: ((this: HtmlOrSvgTag, ev: Event) => any) | null;
1090
+ onchange?: ((this: HtmlOrSvgTag, ev: Event) => any) | null;
1091
+ onclick?: ((this: HtmlOrSvgTag, ev: MouseEvent) => any) | null;
1092
+ onclose?: ((this: HtmlOrSvgTag, ev: Event) => any) | null;
1093
+ oncontextmenu?: ((this: HtmlOrSvgTag, ev: MouseEvent) => any) | null;
1094
+ oncopy?: ((this: HtmlOrSvgTag, ev: ClipboardEvent) => any) | null;
1095
+ oncut?: ((this: HtmlOrSvgTag, ev: ClipboardEvent) => any) | null;
1096
+ oncuechange?: ((this: HtmlOrSvgTag, ev: Event) => any) | null;
1097
+ ondblclick?: ((this: HtmlOrSvgTag, ev: MouseEvent) => any) | null;
1098
+ ondrag?: ((this: HtmlOrSvgTag, ev: DragEvent) => any) | null;
1099
+ ondragend?: ((this: HtmlOrSvgTag, ev: DragEvent) => any) | null;
1100
+ ondragenter?: ((this: HtmlOrSvgTag, ev: DragEvent) => any) | null;
1101
+ ondragleave?: ((this: HtmlOrSvgTag, ev: DragEvent) => any) | null;
1102
+ ondragover?: ((this: HtmlOrSvgTag, ev: DragEvent) => any) | null;
1103
+ ondragstart?: ((this: HtmlOrSvgTag, ev: DragEvent) => any) | null;
1104
+ ondrop?: ((this: HtmlOrSvgTag, ev: DragEvent) => any) | null;
1105
+ ondurationchange?: ((this: HtmlOrSvgTag, ev: Event) => any) | null;
1106
+ onemptied?: ((this: HtmlOrSvgTag, ev: Event) => any) | null;
1107
+ onended?: ((this: HtmlOrSvgTag, ev: Event) => any) | null;
1108
+ onerror?: ((event: Event | string, source?: string, lineno?: number, colno?: number, error?: Error) => any) | null;
1109
+ onfocus?: ((this: HtmlOrSvgTag, ev: FocusEvent) => any) | null;
1110
+ onformdata?: ((this: HtmlOrSvgTag, ev: FormDataEvent) => any) | null;
1111
+ onfullscreenchange?: ((this: HtmlOrSvgTag, ev: Event) => any) | null;
1112
+ onfullscreenerror?: ((this: HtmlOrSvgTag, ev: Event) => any) | null;
1113
+ ongotpointercapture?: ((this: HtmlOrSvgTag, ev: PointerEvent) => any) | null;
1114
+ oninput?: ((this: HtmlOrSvgTag, ev: Event) => any) | null;
1115
+ oninvalid?: ((this: HtmlOrSvgTag, ev: Event) => any) | null;
1116
+ onkeydown?: ((this: HtmlOrSvgTag, ev: KeyboardEvent) => any) | null;
1117
+ onkeypress?: ((this: HtmlOrSvgTag, ev: KeyboardEvent) => any) | null;
1118
+ onkeyup?: ((this: HtmlOrSvgTag, ev: KeyboardEvent) => any) | null;
1119
+ onload?: ((this: HtmlOrSvgTag, ev: Event) => any) | null;
1120
+ onloadeddata?: ((this: HtmlOrSvgTag, ev: Event) => any) | null;
1121
+ onloadedmetadata?: ((this: HtmlOrSvgTag, ev: Event) => any) | null;
1122
+ onloadstart?: ((this: HtmlOrSvgTag, ev: Event) => any) | null;
1123
+ onlostpointercapture?: ((this: HtmlOrSvgTag, ev: PointerEvent) => any) | null;
1124
+ onmousedown?: ((this: HtmlOrSvgTag, ev: MouseEvent) => any) | null;
1125
+ onmouseenter?: ((this: HtmlOrSvgTag, ev: MouseEvent) => any) | null;
1126
+ onmouseleave?: ((this: HtmlOrSvgTag, ev: MouseEvent) => any) | null;
1127
+ onmousemove?: ((this: HtmlOrSvgTag, ev: MouseEvent) => any) | null;
1128
+ onmouseout?: ((this: HtmlOrSvgTag, ev: MouseEvent) => any) | null;
1129
+ onmouseover?: ((this: HtmlOrSvgTag, ev: MouseEvent) => any) | null;
1130
+ onmouseup?: ((this: HtmlOrSvgTag, ev: MouseEvent) => any) | null;
1131
+ onpaste?: ((this: HtmlOrSvgTag, ev: ClipboardEvent) => any) | null;
1132
+ onpause?: ((this: HtmlOrSvgTag, ev: Event) => any) | null;
1133
+ onplay?: ((this: HtmlOrSvgTag, ev: Event) => any) | null;
1134
+ onplaying?: ((this: HtmlOrSvgTag, ev: Event) => any) | null;
1135
+ onpointercancel?: ((this: HtmlOrSvgTag, ev: PointerEvent) => any) | null;
1136
+ onpointerdown?: ((this: HtmlOrSvgTag, ev: PointerEvent) => any) | null;
1137
+ onpointerenter?: ((this: HtmlOrSvgTag, ev: PointerEvent) => any) | null;
1138
+ onpointerleave?: ((this: HtmlOrSvgTag, ev: PointerEvent) => any) | null;
1139
+ onpointermove?: ((this: HtmlOrSvgTag, ev: PointerEvent) => any) | null;
1140
+ onpointerout?: ((this: HtmlOrSvgTag, ev: PointerEvent) => any) | null;
1141
+ onpointerover?: ((this: HtmlOrSvgTag, ev: PointerEvent) => any) | null;
1142
+ onpointerup?: ((this: HtmlOrSvgTag, ev: PointerEvent) => any) | null;
1143
+ onprogress?: ((this: HtmlOrSvgTag, ev: ProgressEvent) => any) | null;
1144
+ onratechange?: ((this: HtmlOrSvgTag, ev: Event) => any) | null;
1145
+ onreset?: ((this: HtmlOrSvgTag, ev: Event) => any) | null;
1146
+ onresize?: ((this: HtmlOrSvgTag, ev: UIEvent) => any) | null;
1147
+ onscroll?: ((this: HtmlOrSvgTag, ev: Event) => any) | null;
1148
+ onseeked?: ((this: HtmlOrSvgTag, ev: Event) => any) | null;
1149
+ onseeking?: ((this: HtmlOrSvgTag, ev: Event) => any) | null;
1150
+ onselect?: ((this: HtmlOrSvgTag, ev: Event) => any) | null;
1151
+ onselectionchange?: ((this: HtmlOrSvgTag, ev: Event) => any) | null;
1152
+ onselectstart?: ((this: HtmlOrSvgTag, ev: Event) => any) | null;
1153
+ onstalled?: ((this: HtmlOrSvgTag, ev: Event) => any) | null;
1154
+ onsubmit?: ((this: HtmlOrSvgTag, ev: SubmitEvent) => any) | null;
1155
+ onsuspend?: ((this: HtmlOrSvgTag, ev: Event) => any) | null;
1156
+ ontimeupdate?: ((this: HtmlOrSvgTag, ev: Event) => any) | null;
1157
+ ontoggle?: ((this: HtmlOrSvgTag, ev: Event) => any) | null;
1158
+ ontouchcancel?: ((this: HtmlOrSvgTag, ev: TouchEvent) => any) | null | undefined;
1159
+ ontouchend?: ((this: HtmlOrSvgTag, ev: TouchEvent) => any) | null | undefined;
1160
+ ontouchmove?: ((this: HtmlOrSvgTag, ev: TouchEvent) => any) | null | undefined;
1161
+ ontouchstart?: ((this: HtmlOrSvgTag, ev: TouchEvent) => any) | null | undefined;
1162
+ ontransitioncancel?: ((this: HtmlOrSvgTag, ev: TransitionEvent) => any) | null;
1163
+ ontransitionend?: ((this: HtmlOrSvgTag, ev: TransitionEvent) => any) | null;
1164
+ ontransitionrun?: ((this: HtmlOrSvgTag, ev: TransitionEvent) => any) | null;
1165
+ ontransitionstart?: ((this: HtmlOrSvgTag, ev: TransitionEvent) => any) | null;
1166
+ onvolumechange?: ((this: HtmlOrSvgTag, ev: Event) => any) | null;
1167
+ onwaiting?: ((this: HtmlOrSvgTag, ev: Event) => any) | null;
1168
+ onwheel?: ((this: HtmlOrSvgTag, ev: WheelEvent) => any) | null;
1485
1169
  }
1486
- declare interface SvgTagMap {
1487
- "a": Tag<SvgAAttrs, SvgEvents>;
1488
- "animate": Tag<SvgCoreAttrs, SvgEvents>;
1489
- "animateMotion": Tag<SvgCoreAttrs, SvgEvents>;
1490
- "animateTransform": Tag<SvgCoreAttrs, SvgEvents>;
1491
- "circle": Tag<SvgCircleAttrs, SvgEvents>;
1492
- "clipPath": Tag<SvgCoreAttrs, SvgEvents>;
1493
- "defs": Tag<SvgCoreAttrs, SvgEvents>;
1494
- "desc": Tag<SvgCoreAttrs, SvgEvents>;
1495
- "ellipse": Tag<SvgEllipseAttrs, SvgEvents>;
1496
- "feBlend": Tag<SvgCoreAttrs, SvgEvents>;
1497
- "feColorMatrix": Tag<SvgCoreAttrs, SvgEvents>;
1498
- "feComponentTransfer": Tag<SvgCoreAttrs, SvgEvents>;
1499
- "feComposite": Tag<SvgCoreAttrs, SvgEvents>;
1500
- "feConvolveMatrix": Tag<SvgCoreAttrs, SvgEvents>;
1501
- "feDiffuseLighting": Tag<SvgCoreAttrs, SvgEvents>;
1502
- "feDisplacementMap": Tag<SvgCoreAttrs, SvgEvents>;
1503
- "feDistantLight": Tag<SvgCoreAttrs, SvgEvents>;
1504
- "feDropShadow": Tag<SvgCoreAttrs, SvgEvents>;
1505
- "feFlood": Tag<SvgCoreAttrs, SvgEvents>;
1506
- "feFuncA": Tag<SvgCoreAttrs, SvgEvents>;
1507
- "feFuncB": Tag<SvgCoreAttrs, SvgEvents>;
1508
- "feFuncG": Tag<SvgCoreAttrs, SvgEvents>;
1509
- "feFuncR": Tag<SvgCoreAttrs, SvgEvents>;
1510
- "feGaussianBlur": Tag<SvgCoreAttrs, SvgEvents>;
1511
- "feImage": Tag<SvgCoreAttrs, SvgEvents>;
1512
- "feMerge": Tag<SvgCoreAttrs, SvgEvents>;
1513
- "feMergeNode": Tag<SvgCoreAttrs, SvgEvents>;
1514
- "feMorphology": Tag<SvgCoreAttrs, SvgEvents>;
1515
- "feOffset": Tag<SvgCoreAttrs, SvgEvents>;
1516
- "fePointLight": Tag<SvgCoreAttrs, SvgEvents>;
1517
- "feSpecularLighting": Tag<SvgCoreAttrs, SvgEvents>;
1518
- "feSpotLight": Tag<SvgCoreAttrs, SvgEvents>;
1519
- "feTile": Tag<SvgCoreAttrs, SvgEvents>;
1520
- "feTurbulence": Tag<SvgCoreAttrs, SvgEvents>;
1521
- "filter": Tag<SvgCoreAttrs, SvgEvents>;
1522
- "foreignObject": Tag<SvgForeignObjectAttrs, SvgEvents>;
1523
- "g": Tag<Svg3in1Attrs, SvgEvents>;
1524
- "image": Tag<SvgImageAttrs, SvgEvents>;
1525
- "line": Tag<SvgLineAttrs, SvgEvents>;
1526
- "linearGradient": Tag<SvgCoreAttrs, SvgEvents>;
1527
- "marker": Tag<SvgMarkerAttrs, SvgEvents>;
1528
- "mask": Tag<SvgCoreAttrs, SvgEvents>;
1529
- "metadata": Tag<SvgCoreAttrs, SvgEvents>;
1530
- "mpath": Tag<SvgCoreAttrs, SvgEvents>;
1531
- "path": Tag<SvgPathAttrs, SvgEvents>;
1532
- "pattern": Tag<SvgCoreAttrs, SvgEvents>;
1533
- "polygon": Tag<SvgCoreAttrs, SvgEvents>;
1534
- "polyline": Tag<SvgPolygonAttrs, SvgEvents>;
1535
- "radialGradient": Tag<SvgCoreAttrs, SvgEvents>;
1536
- "rect": Tag<SvgRectAttrs, SvgEvents>;
1537
- "script": Tag<SvgCoreAttrs, SvgEvents>;
1538
- "set": Tag<SvgCoreAttrs, SvgEvents>;
1539
- "stop": Tag<SvgCoreAttrs, SvgEvents>;
1540
- "style": Tag<SvgCoreAttrs, SvgEvents>;
1541
- "svg": Tag<SvgSvgAttrs, SvgEvents>;
1542
- "switch": Tag<Svg3in1Attrs, SvgEvents>;
1543
- "symbol": Tag<SvgCoreAttrs, SvgEvents>;
1544
- "text": Tag<SvgCommonTextAttrs, SvgEvents>;
1545
- "textPath": Tag<SvgTextPathAttrs, SvgEvents>;
1546
- "title": Tag<SvgCoreAttrs, SvgEvents>;
1547
- "tspan": Tag<SvgCommonTextAttrs, SvgEvents>;
1548
- "use": Tag<SvgUseAttrs, SvgEvents>;
1549
- "view": Tag<SvgViewAttrs, SvgEvents>;
1170
+ declare interface HtmlTag extends HtmlAndSvgEvents {
1171
+ autofocus?: boolean;
1172
+ className?: string;
1173
+ nonce?: string | undefined;
1174
+ tabIndex?: number;
1175
+ accessKey?: string;
1176
+ autocapitalize?: string;
1177
+ dir?: string;
1178
+ draggable?: boolean;
1179
+ hidden?: boolean;
1180
+ innerText?: string;
1181
+ lang?: string;
1182
+ outerText?: string;
1183
+ spellcheck?: boolean;
1184
+ title?: string;
1185
+ translate?: boolean;
1550
1186
  }
1551
- declare type SvgTag = HtmlAndSvgEvents;
1552
- declare interface SvgATag extends SvgTag {
1187
+ declare interface AnchorTag extends HtmlTag {
1188
+ download: string;
1189
+ hreflang: string;
1190
+ ping: string;
1191
+ referrerPolicy: string;
1553
1192
  rel: string;
1554
- }
1555
- declare interface SvgSvgTag extends SvgTag {
1556
- currentScale: number;
1557
- }
1558
- declare interface SvgTagNameMap {
1559
- "a": SvgATag;
1560
- "animate": SvgTag;
1561
- "animateMotion": SvgTag;
1562
- "animateTransform": SvgTag;
1563
- "circle": SvgTag;
1564
- "clipPath": SvgTag;
1565
- "defs": SvgTag;
1566
- "desc": SvgTag;
1567
- "ellipse": SvgTag;
1568
- "feBlend": SvgTag;
1569
- "feColorMatrix": SvgTag;
1570
- "feComponentTransfer": SvgTag;
1571
- "feComposite": SvgTag;
1572
- "feConvolveMatrix": SvgTag;
1573
- "feDiffuseLighting": SvgTag;
1574
- "feDisplacementMap": SvgTag;
1575
- "feDistantLight": SvgTag;
1576
- "feDropShadow": SvgTag;
1577
- "feFlood": SvgTag;
1578
- "feFuncA": SvgTag;
1579
- "feFuncB": SvgTag;
1580
- "feFuncG": SvgTag;
1581
- "feFuncR": SvgTag;
1582
- "feGaussianBlur": SvgTag;
1583
- "feImage": SvgTag;
1584
- "feMerge": SvgTag;
1585
- "feMergeNode": SvgTag;
1586
- "feMorphology": SvgTag;
1587
- "feOffset": SvgTag;
1588
- "fePointLight": SvgTag;
1589
- "feSpecularLighting": SvgTag;
1590
- "feSpotLight": SvgTag;
1591
- "feTile": SvgTag;
1592
- "feTurbulence": SvgTag;
1593
- "filter": SvgTag;
1594
- "foreignObject": SvgTag;
1595
- "g": SvgTag;
1596
- "image": SvgTag;
1597
- "line": SvgTag;
1598
- "linearGradient": SvgTag;
1599
- "marker": SvgTag;
1600
- "mask": SvgTag;
1601
- "metadata": SvgTag;
1602
- "mpath": SvgTag;
1603
- "path": SvgTag;
1604
- "pattern": SvgTag;
1605
- "polygon": SvgTag;
1606
- "polyline": SvgTag;
1607
- "radialGradient": SvgTag;
1608
- "rect": SvgTag;
1609
- "script": SvgTag;
1610
- "set": SvgTag;
1611
- "stop": SvgTag;
1612
- "style": SvgTag;
1613
- "svg": SvgSvgTag;
1614
- "switch": SvgTag;
1615
- "symbol": SvgTag;
1616
- "text": SvgTag;
1617
- "textPath": SvgTag;
1618
- "title": SvgTag;
1619
- "tspan": SvgTag;
1620
- "use": SvgTag;
1621
- "view": SvgTag;
1622
- }
1623
-
1624
-
1625
-
1626
- declare type AcceptedTagsMap = TagNameMap & SvgTagNameMap;
1627
- declare type AcceptedTagsSpec = HtmlTagMap & SvgTagMap;
1628
-
1629
-
1630
- declare type EventHandler<T> = (ev: T) => any;
1631
- declare interface Tag<Attrs, Events> {
1632
- attrs: Attrs;
1633
- events: Events;
1634
- }
1635
- declare type TagEvents = {
1636
- [K : string]: EventHandler<HTMLElementEventMap[K]> | undefined;
1637
- };
1638
- declare interface TagAttrs {
1639
- id: string;
1640
- accesskey: string;
1641
- autocapitalize: "off" | "none" | "on" | "sentences" | "words" | "characters";
1642
- autofocus: "" | boolean;
1643
- contenteditable: "true" | "false" | "" | boolean;
1644
- dir: "ltr" | "rtl" | "auto";
1645
- draggable: "true" | "false" | "" | boolean;
1646
- enterkeyhint: "enter" | "done" | "go" | "next" | "previous" | "search" | "send";
1647
- hidden: "until-found" | "hidden" | "" | boolean;
1648
- inert: boolean;
1649
- inputmode: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search";
1650
- is: string;
1651
- itemid: string;
1652
- itemprop: string;
1653
- itemref: string;
1654
- itemscope: boolean;
1655
- itemtype: string;
1656
- lang: string;
1657
- nonce: string;
1658
- spellcheck: "true" | "false" | "" | boolean;
1659
- tabindex: number;
1660
- title: string;
1661
- translate: "yes" | "no" | "" | boolean;
1662
- }
1663
- declare interface MediaTagAttrs extends TagAttrs {
1664
- src: string;
1665
- crossorigin: "anonymous" | "use-credentials" | "" | boolean;
1666
- preload: "none" | "metadata" | "auto";
1667
- autoplay: boolean;
1668
- loop: boolean;
1669
- muted: boolean;
1670
- controls: boolean;
1671
- }
1672
- declare type MediaEvents = {
1673
- [K : string]: EventHandler<HTMLMediaElementEventMap[K]> | undefined;
1674
- };
1675
- declare type VideoEvents = {
1676
- [K : string]: EventHandler<HTMLVideoElementEventMap[K]> | undefined;
1677
- };
1678
- declare interface BaseAttrs extends TagAttrs {
1679
- href: string;
1680
1193
  target: string;
1681
- }
1682
- declare interface LinkAttrs extends TagAttrs {
1683
- href: string;
1684
- crossorigin: "anonymous" | "use-credentials" | "" | boolean;
1685
- rel: string;
1686
- media: string;
1687
- integrity: string;
1688
- hreflang: string;
1194
+ text: string;
1689
1195
  type: string;
1690
- referrerpolicy: string;
1691
- sizes: string;
1692
- imagesrcset: string;
1693
- imagesizes: string;
1694
- as: string;
1695
- blocking: boolean;
1696
- color: string;
1697
- }
1698
- declare interface MetaAttrs extends TagAttrs {
1699
- name: string;
1700
- 'http-equiv': string;
1701
- content: string;
1702
- charset: string;
1703
- media: string;
1704
- }
1705
- declare interface StyleAttrs extends TagAttrs {
1706
- media: string;
1707
- blocking: string;
1708
1196
  }
1709
- declare type BodyEvents = {
1710
- [K : string]: EventHandler<HTMLBodyElementEventMap[K]> | undefined;
1711
- };
1712
- declare interface BlockQuoteAttrs extends TagAttrs {
1713
- cite: string;
1197
+ declare interface AreaTag extends HtmlTag {
1198
+ alt: string;
1199
+ coords: string;
1200
+ download: string;
1201
+ ping: string;
1202
+ referrerPolicy: string;
1203
+ rel: string;
1204
+ shape: string;
1205
+ target: string;
1714
1206
  }
1715
- declare interface OlAttrs extends TagAttrs {
1716
- reversed: boolean;
1717
- start: number;
1718
- type: "1" | "a" | "A" | "i" | "I";
1207
+ declare interface MediaTag extends HtmlTag {
1208
+ autoplay?: boolean;
1209
+ controls?: boolean;
1210
+ crossOrigin?: string | null;
1211
+ currentTime?: number;
1212
+ defaultMuted?: boolean;
1213
+ defaultPlaybackRate?: number;
1214
+ disableRemotePlayback?: boolean;
1215
+ loop?: boolean;
1216
+ muted?: boolean;
1217
+ onencrypted?: ((this: HTMLMediaElement, ev: MediaEncryptedEvent) => any) | null;
1218
+ onwaitingforkey?: ((this: HTMLMediaElement, ev: Event) => any) | null;
1219
+ playbackRate?: number;
1220
+ preload?: "none" | "metadata" | "auto" | "";
1221
+ src?: string;
1222
+ srcObject?: MediaProvider | null;
1223
+ volume?: number;
1719
1224
  }
1720
- declare interface AAttrs extends TagAttrs {
1225
+ declare interface BaseTag extends HtmlTag {
1721
1226
  href: string;
1722
1227
  target: string;
1723
- download: string;
1724
- ping: string;
1725
- hreflang: string;
1726
- type: string;
1727
- referrerpolicy: string;
1728
1228
  }
1729
- declare interface QAttrs extends TagAttrs {
1229
+ declare interface QuoteTag extends HtmlTag {
1730
1230
  cite: string;
1731
1231
  }
1732
- declare interface DataAttr extends TagAttrs {
1733
- value: string;
1734
- }
1735
- declare interface BdoAttrs extends TagAttrs {
1736
- dir: "ltr" | "rtl";
1737
- }
1738
- declare interface SourceAttrs extends TagAttrs {
1232
+ declare interface ButtonTag extends HtmlTag {
1233
+ disabled: boolean;
1234
+ formAction: string;
1235
+ formEnctype: string;
1236
+ formMethod: string;
1237
+ formNoValidate: boolean;
1238
+ formTarget: string;
1239
+ name: string;
1739
1240
  type: string;
1740
- src: string;
1741
- srcset: string;
1742
- sizes: string;
1743
- media: string;
1744
- width: number;
1745
- height: number;
1746
- }
1747
- declare interface ImgAttrs extends TagAttrs {
1748
- alt: string;
1749
- src: string;
1750
- srcset: string;
1751
- sizes: string;
1752
- crossorigin: "anonymous" | "use-credentials" | "" | boolean;
1753
- usemap: string;
1754
- ismap: string;
1755
- width: number;
1756
- height: number;
1757
- referrerpolicy: string;
1758
- decoding: string;
1759
- loading: string;
1241
+ value: string;
1760
1242
  }
1761
- declare interface IframeAttrs extends TagAttrs {
1762
- src: string;
1763
- srcdoc: string;
1764
- name: string;
1765
- sandbox: string;
1766
- allow: string;
1767
- allowfullscreen: string;
1768
- width: number;
1243
+ declare interface CanvasTag extends HtmlTag {
1769
1244
  height: number;
1770
- referrerpolicy: string;
1771
- loading: string;
1772
- }
1773
- declare interface EmbedAttrs extends TagAttrs {
1774
- src: string;
1775
- type: string;
1776
1245
  width: number;
1777
- height: number;
1778
1246
  }
1779
- declare interface ObjectAttrs extends TagAttrs {
1780
- data: string;
1781
- type: string;
1782
- name: string;
1783
- form: string;
1784
- width: number;
1785
- height: number;
1247
+ declare interface TableColTag extends HtmlTag {
1248
+ span: number;
1786
1249
  }
1787
- declare interface ParamAttrs extends TagAttrs {
1788
- name: string;
1250
+ declare interface DataTag extends HtmlTag {
1789
1251
  value: string;
1790
1252
  }
1791
- declare interface VideoAttrs extends MediaTagAttrs {
1792
- poster: string;
1793
- playsinline: boolean;
1794
- width: number;
1795
- height: number;
1253
+ declare interface ModTag extends HtmlTag {
1254
+ cite: string;
1255
+ dateTime: string;
1796
1256
  }
1797
- declare interface TrackAttrs extends TagAttrs {
1798
- kind: string;
1257
+ declare interface DetailsTag extends HtmlTag {
1258
+ open: boolean;
1259
+ }
1260
+ declare interface EmbedTag extends HtmlTag {
1261
+ height: string;
1799
1262
  src: string;
1800
- srclang: string;
1801
- label: string;
1802
- defautl: boolean;
1263
+ type: string;
1264
+ width: string;
1803
1265
  }
1804
- declare interface MapAttrs extends TagAttrs {
1266
+ declare interface FieldSetTag extends HtmlTag {
1267
+ disabled: boolean;
1805
1268
  name: string;
1806
1269
  }
1807
- declare interface AreaAttrs extends TagAttrs {
1808
- alt: string;
1809
- coords: string;
1810
- shape: string;
1811
- href: string;
1812
- target: string;
1813
- download: string;
1814
- ping: string;
1815
- rel: string;
1816
- referrerpolicy: string;
1817
- }
1818
- declare interface ColAttrs extends TagAttrs {
1819
- span: number;
1820
- }
1821
- declare interface TdAttrs extends TagAttrs {
1822
- colspan: number;
1823
- rowspan: number;
1824
- headers: string;
1825
- }
1826
- declare interface ThAttrs extends TdAttrs {
1827
- scope: string;
1828
- abbr: string;
1829
- }
1830
- declare interface FormAttrs extends TagAttrs {
1831
- 'accept-charset': string;
1270
+ declare interface FormTag extends HtmlTag {
1271
+ acceptCharset: string;
1832
1272
  action: string;
1833
1273
  autocomplete: string;
1274
+ encoding: string;
1834
1275
  enctype: string;
1835
1276
  method: string;
1836
1277
  name: string;
1837
- novalidate: string;
1278
+ noValidate: boolean;
1838
1279
  target: string;
1839
- rel: string;
1840
1280
  }
1841
- declare interface LabelAttrs extends TagAttrs {
1842
- for: string;
1281
+ declare interface IFrameTag extends HtmlTag {
1282
+ allow: string;
1283
+ allowFullscreen: boolean;
1284
+ height: string;
1285
+ name: string;
1286
+ referrerPolicy: ReferrerPolicy;
1287
+ src: string;
1288
+ srcdoc: string;
1289
+ width: string;
1843
1290
  }
1844
- declare interface InputAttrs extends TagAttrs {
1291
+ declare interface ImageTag extends HtmlTag {
1292
+ alt: string;
1293
+ crossOrigin: string | null;
1294
+ decoding: "async" | "sync" | "auto";
1295
+ height: number;
1296
+ isMap: boolean;
1297
+ loading: string;
1298
+ referrerPolicy: string;
1299
+ sizes: string;
1300
+ src: string;
1301
+ srcset: string;
1302
+ useMap: string;
1303
+ width: number;
1304
+ }
1305
+ declare interface InputTag extends HtmlTag {
1845
1306
  accept: string;
1846
1307
  alt: string;
1847
- autocomplete: boolean;
1308
+ autocomplete: string;
1309
+ capture: string;
1848
1310
  checked: boolean;
1849
- dirname: string;
1311
+ defaultChecked: boolean;
1312
+ defaultValue: string;
1313
+ dirName: string;
1850
1314
  disabled: boolean;
1851
- form: string;
1852
- formaction: string;
1853
- formenctype: string;
1854
- formmethod: string;
1855
- formnovalidate: string;
1856
- formtarget: string;
1315
+ files: FileList | null;
1316
+ formAction: string;
1317
+ formEnctype: string;
1318
+ formMethod: string;
1319
+ formNoValidate: boolean;
1320
+ formTarget: string;
1857
1321
  height: number;
1858
- list: string;
1859
- max: number;
1860
- maxlength: number;
1861
- min: number;
1862
- minlength: number;
1322
+ indeterminate: boolean;
1323
+ max: string;
1324
+ maxLength: number;
1325
+ min: string;
1326
+ minLength: number;
1863
1327
  multiple: boolean;
1864
1328
  name: string;
1865
1329
  pattern: string;
1866
1330
  placeholder: string;
1867
- readonly: string;
1868
- required: string;
1331
+ readOnly: boolean;
1332
+ required: boolean;
1333
+ selectionDirection: "forward" | "backward" | "none" | null;
1334
+ selectionEnd: number | null;
1335
+ selectionStart: number | null;
1869
1336
  size: number;
1870
1337
  src: string;
1871
1338
  step: string;
1872
1339
  type: string;
1340
+ value: string;
1341
+ valueAsDate: Date | null;
1342
+ valueAsNumber: number;
1343
+ webkitdirectory: boolean;
1873
1344
  width: number;
1874
1345
  }
1875
- declare interface ButtonAttrs extends TagAttrs {
1876
- disabled: boolean;
1877
- form: string;
1878
- formaction: string;
1879
- formenctype: string;
1880
- formmethod: string;
1881
- formnovalidate: string;
1882
- formtarget: string;
1346
+ declare interface LabelTag extends HtmlTag {
1347
+ htmlFor: string;
1348
+ }
1349
+ declare interface LITag extends HtmlTag {
1350
+ value: number;
1351
+ }
1352
+ declare interface LinkTag extends HtmlTag {
1353
+ as: string;
1354
+ crossOrigin: string | null;
1355
+ disabled: boolean;
1356
+ href: string;
1357
+ hreflang: string;
1358
+ imageSizes: string;
1359
+ imageSrcset: string;
1360
+ integrity: string;
1361
+ media: string;
1362
+ referrerPolicy: string;
1363
+ rel: string;
1364
+ type: string;
1365
+ }
1366
+ declare interface MapTag extends HtmlTag {
1367
+ name: string;
1368
+ }
1369
+ declare interface MeterTag extends HtmlTag {
1370
+ high: number;
1371
+ low: number;
1372
+ max: number;
1373
+ min: number;
1374
+ optimum: number;
1375
+ value: number;
1376
+ }
1377
+ declare interface ObjectTag extends HtmlTag {
1378
+ data: string;
1379
+ height: string;
1380
+ name: string;
1381
+ type: string;
1382
+ useMap: string;
1383
+ width: string;
1384
+ }
1385
+ declare interface OListTag extends HtmlTag {
1386
+ reversed: boolean;
1387
+ start: number;
1388
+ type: string;
1389
+ }
1390
+ declare interface OptGroupTag extends HtmlTag {
1391
+ disabled: boolean;
1392
+ label: string;
1393
+ }
1394
+ declare interface OptionTag extends HtmlTag {
1395
+ defaultSelected: boolean;
1396
+ disabled: boolean;
1397
+ label: string;
1398
+ selected: boolean;
1399
+ text: string;
1400
+ value: string;
1401
+ }
1402
+ declare interface OutputTag extends HtmlTag {
1403
+ defaultValue: string;
1404
+ name: string;
1405
+ value: string;
1406
+ }
1407
+ declare interface ParamTag extends HtmlTag {
1883
1408
  name: string;
1884
- type: string;
1885
1409
  value: string;
1886
1410
  }
1887
- declare interface SelectAttrs extends TagAttrs {
1888
- autocomplete: boolean;
1411
+ declare interface ProgressTag extends HtmlTag {
1412
+ max: number;
1413
+ value: number;
1414
+ }
1415
+ declare interface ScriptTag extends HtmlTag {
1416
+ async: boolean;
1417
+ crossOrigin: string | null;
1418
+ defer: boolean;
1419
+ integrity: string;
1420
+ noModule: boolean;
1421
+ referrerPolicy: string;
1422
+ src: string;
1423
+ text: string;
1424
+ type: string;
1425
+ }
1426
+ declare interface SelectTag extends HtmlTag {
1427
+ autocomplete: string;
1889
1428
  disabled: boolean;
1890
- form: string;
1429
+ length: number;
1891
1430
  multiple: boolean;
1892
1431
  name: string;
1893
1432
  required: boolean;
1433
+ selectedIndex: number;
1894
1434
  size: number;
1435
+ value: string;
1895
1436
  }
1896
- declare interface OptgroupAttrs extends TagAttrs {
1897
- disabled: boolean;
1898
- label: string;
1437
+ declare interface SlotTag extends HtmlTag {
1438
+ name: string;
1899
1439
  }
1900
- declare interface OptionAttrs extends TagAttrs {
1901
- disabled: boolean;
1902
- label: string;
1903
- selected: boolean;
1904
- value: string;
1440
+ declare interface SourceTag extends HtmlTag {
1441
+ media: string;
1442
+ sizes: string;
1443
+ src: string;
1444
+ srcset: string;
1445
+ type: string;
1905
1446
  }
1906
- declare interface TextareaAttrs extends TagAttrs {
1907
- autocomplete: boolean;
1447
+ declare interface StyleTag extends HtmlTag {
1448
+ media: string;
1449
+ }
1450
+ declare interface TableTag extends HtmlTag {
1451
+ caption: HTMLTableCaptionElement | null;
1452
+ tFoot: HTMLTableSectionElement | null;
1453
+ tHead: HTMLTableSectionElement | null;
1454
+ }
1455
+ declare interface TableCellTag extends HtmlTag {
1456
+ abbr: string;
1457
+ colSpan: number;
1458
+ headers: string;
1459
+ rowSpan: number;
1460
+ scope: string;
1461
+ }
1462
+ declare interface TextAreaTag extends HtmlTag {
1463
+ autocomplete: string;
1908
1464
  cols: number;
1909
- dirname: string;
1465
+ defaultValue: string;
1466
+ dirName: string;
1910
1467
  disabled: boolean;
1911
- form: string;
1912
- maxlength: number;
1913
- minlength: number;
1468
+ maxLength: number;
1469
+ minLength: number;
1914
1470
  name: string;
1915
1471
  placeholder: string;
1916
- readonly: boolean;
1472
+ readOnly: boolean;
1917
1473
  required: boolean;
1918
1474
  rows: number;
1475
+ selectionDirection: "forward" | "backward" | "none";
1476
+ selectionEnd: number;
1477
+ selectionStart: number;
1478
+ value: string;
1919
1479
  wrap: string;
1920
1480
  }
1921
- declare interface OutputAttrs extends TagAttrs {
1922
- for: string;
1923
- form: string;
1924
- name: string;
1481
+ declare interface TimeTag extends HtmlTag {
1482
+ dateTime: string;
1925
1483
  }
1926
- declare interface ProgressAttrs extends TagAttrs {
1927
- value: number;
1928
- max: number;
1484
+ declare interface TitleTag extends HtmlTag {
1485
+ text: string;
1929
1486
  }
1930
- declare interface MeterAttrs extends TagAttrs {
1931
- value: number;
1932
- min: number;
1933
- max: number;
1934
- low: number;
1935
- high: number;
1936
- optimum: number;
1487
+ declare interface TrackTag extends HtmlTag {
1488
+ default: boolean;
1489
+ kind: string;
1490
+ label: string;
1491
+ src: string;
1492
+ srclang: string;
1937
1493
  }
1938
- declare interface FieldsetAttrs extends TagAttrs {
1939
- disabled: boolean;
1940
- form: string;
1941
- name: string;
1494
+ declare interface VideoTag extends MediaTag {
1495
+ disablePictureInPicture?: boolean;
1496
+ height?: number;
1497
+ onenterpictureinpicture?: ((this: HTMLVideoElement, ev: Event) => any) | null;
1498
+ onleavepictureinpicture?: ((this: HTMLVideoElement, ev: Event) => any) | null;
1499
+ playsInline?: boolean;
1500
+ poster?: string;
1501
+ width?: number;
1502
+ }
1503
+ declare interface TagNameMap {
1504
+ "a": AnchorTag;
1505
+ "abbr": HtmlTag;
1506
+ "address": HtmlTag;
1507
+ "area": AreaTag;
1508
+ "article": HtmlTag;
1509
+ "aside": HtmlTag;
1510
+ "audio": MediaTag;
1511
+ "b": HtmlTag;
1512
+ "base": BaseTag;
1513
+ "bdi": HtmlTag;
1514
+ "bdo": HtmlTag;
1515
+ "blockquote": QuoteTag;
1516
+ "body": HtmlTag;
1517
+ "br": HtmlTag;
1518
+ "button": ButtonTag;
1519
+ "canvas": CanvasTag;
1520
+ "caption": HtmlTag;
1521
+ "cite": HtmlTag;
1522
+ "code": HtmlTag;
1523
+ "col": TableColTag;
1524
+ "colgroup": TableColTag;
1525
+ "data": DataTag;
1526
+ "datalist": HtmlTag;
1527
+ "dd": HtmlTag;
1528
+ "del": ModTag;
1529
+ "details": DetailsTag;
1530
+ "dfn": HtmlTag;
1531
+ "dialog": HtmlTag;
1532
+ "div": HtmlTag;
1533
+ "dl": HtmlTag;
1534
+ "dt": HtmlTag;
1535
+ "em": HtmlTag;
1536
+ "embed": EmbedTag;
1537
+ "fieldset": FieldSetTag;
1538
+ "figcaption": HtmlTag;
1539
+ "figure": HtmlTag;
1540
+ "footer": HtmlTag;
1541
+ "form": FormTag;
1542
+ "h1": HtmlTag;
1543
+ "h2": HtmlTag;
1544
+ "h3": HtmlTag;
1545
+ "h4": HtmlTag;
1546
+ "h5": HtmlTag;
1547
+ "h6": HtmlTag;
1548
+ "head": HtmlTag;
1549
+ "header": HtmlTag;
1550
+ "hgroup": HtmlTag;
1551
+ "hr": HtmlTag;
1552
+ "html": HtmlTag;
1553
+ "i": HtmlTag;
1554
+ "iframe": IFrameTag;
1555
+ "img": ImageTag;
1556
+ "input": InputTag;
1557
+ "ins": ModTag;
1558
+ "kbd": HtmlTag;
1559
+ "label": LabelTag;
1560
+ "legend": HtmlTag;
1561
+ "li": LITag;
1562
+ "link": LinkTag;
1563
+ "main": HtmlTag;
1564
+ "map": MapTag;
1565
+ "mark": HtmlTag;
1566
+ "menu": HtmlTag;
1567
+ "meta": HtmlTag;
1568
+ "meter": MeterTag;
1569
+ "nav": HtmlTag;
1570
+ "noscript": HtmlTag;
1571
+ "object": ObjectTag;
1572
+ "ol": OListTag;
1573
+ "optgroup": OptGroupTag;
1574
+ "option": OptionTag;
1575
+ "output": OutputTag;
1576
+ "p": HtmlTag;
1577
+ "param": ParamTag;
1578
+ "picture": HtmlTag;
1579
+ "pre": HtmlTag;
1580
+ "progress": ProgressTag;
1581
+ "q": QuoteTag;
1582
+ "rp": HtmlTag;
1583
+ "rt": HtmlTag;
1584
+ "ruby": HtmlTag;
1585
+ "s": HtmlTag;
1586
+ "samp": HtmlTag;
1587
+ "script": ScriptTag;
1588
+ "section": HtmlTag;
1589
+ "select": SelectTag;
1590
+ "slot": SlotTag;
1591
+ "small": HtmlTag;
1592
+ "source": SourceTag;
1593
+ "span": HtmlTag;
1594
+ "strong": HtmlTag;
1595
+ "style": StyleTag;
1596
+ "sub": HtmlTag;
1597
+ "summary": HtmlTag;
1598
+ "sup": HtmlTag;
1599
+ "table": TableTag;
1600
+ "tbody": HtmlTag;
1601
+ "td": TableCellTag;
1602
+ "template": HtmlTag;
1603
+ "textarea": TextAreaTag;
1604
+ "tfoot": HtmlTag;
1605
+ "th": TableCellTag;
1606
+ "thead": HtmlTag;
1607
+ "time": TimeTag;
1608
+ "title": TitleTag;
1609
+ "tr": HtmlTag;
1610
+ "track": TrackTag;
1611
+ "u": HtmlTag;
1612
+ "ul": HtmlTag;
1613
+ "var": HtmlTag;
1614
+ "video": VideoTag;
1615
+ "wbr": HtmlTag;
1616
+ }
1617
+
1618
+
1619
+
1620
+ declare type SvgEvents = {
1621
+ [K : string]: EventHandler<SVGElementEventMap[K]> | undefined;
1622
+ };
1623
+ declare interface SvgAreaAttrs {
1624
+ "aria-activedescendant": string;
1625
+ "aria-atomic": string;
1626
+ "aria-autocomplete": string;
1627
+ "aria-busy": string;
1628
+ "aria-checked": string;
1629
+ "aria-colcount": string;
1630
+ "aria-colindex": string;
1631
+ "aria-colspan": string;
1632
+ "aria-controls": string;
1633
+ "aria-current": string;
1634
+ "aria-describedby": string;
1635
+ "aria-details": string;
1636
+ "aria-disabled": string;
1637
+ "aria-dropeffect": string;
1638
+ "aria-errormessage": string;
1639
+ "aria-expanded": string;
1640
+ "aria-flowto": string;
1641
+ "aria-grabbed": string;
1642
+ "aria-haspopup": string;
1643
+ "aria-hidden": string;
1644
+ "aria-invalid": string;
1645
+ "aria-keyshortcuts": string;
1646
+ "aria-label": string;
1647
+ "aria-labelledby": string;
1648
+ "aria-level": string;
1649
+ "aria-live": string;
1650
+ "aria-modal": string;
1651
+ "aria-multiline": string;
1652
+ "aria-multiselectable": string;
1653
+ "aria-orientation": string;
1654
+ "aria-owns": string;
1655
+ "aria-placeholder": string;
1656
+ "aria-posinset": string;
1657
+ "aria-pressed": string;
1658
+ "aria-readonly": string;
1659
+ "aria-relevant": string;
1660
+ "aria-required": string;
1661
+ "aria-roledescription": string;
1662
+ "aria-rowcount": string;
1663
+ "aria-rowindex": string;
1664
+ "aria-rowspan": string;
1665
+ "aria-selected": string;
1666
+ "aria-setsize": string;
1667
+ "aria-sort": string;
1668
+ "aria-valuemax": string;
1669
+ "aria-valuemin": string;
1670
+ "aria-valuenow": string;
1671
+ "aria-valuetext": string;
1672
+ "role": string;
1942
1673
  }
1943
- declare interface DetailsAttrs extends TagAttrs {
1944
- open: boolean;
1674
+ declare interface SvgConditionalProcessingAtttrs {
1675
+ "requiredExtensions": string;
1676
+ "systemLanguage": string;
1945
1677
  }
1946
- declare interface HtmlTagMap {
1947
- "a": Tag<AAttrs, TagEvents>;
1948
- "abbr": Tag<TagAttrs, TagEvents>;
1949
- "address": Tag<TagAttrs, TagEvents>;
1950
- "area": Tag<AreaAttrs, TagEvents>;
1951
- "article": Tag<TagAttrs, TagEvents>;
1952
- "aside": Tag<TagAttrs, TagEvents>;
1953
- "audio": Tag<MediaTagAttrs, MediaEvents>;
1954
- "b": Tag<TagAttrs, TagEvents>;
1955
- "base": Tag<BaseAttrs, TagEvents>;
1956
- "bdi": Tag<TagAttrs, TagEvents>;
1957
- "bdo": Tag<BdoAttrs, TagEvents>;
1958
- "blockquote": Tag<BlockQuoteAttrs, TagEvents>;
1959
- "body": Tag<TagAttrs, BodyEvents>;
1960
- "br": Tag<TagAttrs, TagEvents>;
1961
- "button": Tag<ButtonAttrs, TagEvents>;
1962
- "canvas": Tag<TagAttrs, TagEvents>;
1963
- "caption": Tag<TagAttrs, TagEvents>;
1964
- "cite": Tag<TagAttrs, TagEvents>;
1965
- "code": Tag<TagAttrs, TagEvents>;
1966
- "col": Tag<ColAttrs, TagEvents>;
1967
- "colgroup": Tag<ColAttrs, TagEvents>;
1968
- "data": Tag<DataAttr, TagEvents>;
1969
- "datalist": Tag<TagAttrs, TagEvents>;
1970
- "dd": Tag<TagAttrs, TagEvents>;
1971
- "del": Tag<TagAttrs, TagEvents>;
1972
- "details": Tag<DetailsAttrs, TagEvents>;
1973
- "dfn": Tag<TagAttrs, TagEvents>;
1974
- "dialog": Tag<TagAttrs, TagEvents>;
1975
- "dir": Tag<TagAttrs, TagEvents>;
1976
- "div": Tag<TagAttrs, TagEvents>;
1977
- "dl": Tag<TagAttrs, TagEvents>;
1978
- "dt": Tag<TagAttrs, TagEvents>;
1979
- "em": Tag<TagAttrs, TagEvents>;
1980
- "embed": Tag<EmbedAttrs, TagEvents>;
1981
- "fieldset": Tag<FieldsetAttrs, TagEvents>;
1982
- "figcaption": Tag<TagAttrs, TagEvents>;
1983
- "figure": Tag<TagAttrs, TagEvents>;
1984
- "font": Tag<TagAttrs, TagEvents>;
1985
- "footer": Tag<TagAttrs, TagEvents>;
1986
- "form": Tag<FormAttrs, TagEvents>;
1987
- "frame": Tag<TagAttrs, TagEvents>;
1988
- "frameset": Tag<TagAttrs, TagEvents>;
1989
- "h1": Tag<TagAttrs, TagEvents>;
1990
- "h2": Tag<TagAttrs, TagEvents>;
1991
- "h3": Tag<TagAttrs, TagEvents>;
1992
- "h4": Tag<TagAttrs, TagEvents>;
1993
- "h5": Tag<TagAttrs, TagEvents>;
1994
- "h6": Tag<TagAttrs, TagEvents>;
1995
- "head": Tag<TagAttrs, TagEvents>;
1996
- "header": Tag<TagAttrs, TagEvents>;
1997
- "hgroup": Tag<TagAttrs, TagEvents>;
1998
- "hr": Tag<TagAttrs, TagEvents>;
1999
- "html": Tag<TagAttrs, TagEvents>;
2000
- "i": Tag<TagAttrs, TagEvents>;
2001
- "iframe": Tag<IframeAttrs, TagEvents>;
2002
- "img": Tag<ImgAttrs, TagEvents>;
2003
- "input": Tag<InputAttrs, TagEvents>;
2004
- "ins": Tag<TagAttrs, TagEvents>;
2005
- "kbd": Tag<TagAttrs, TagEvents>;
2006
- "label": Tag<LabelAttrs, TagEvents>;
2007
- "legend": Tag<TagAttrs, TagEvents>;
2008
- "li": Tag<TagAttrs, TagEvents>;
2009
- "link": Tag<LinkAttrs, TagEvents>;
2010
- "main": Tag<TagAttrs, TagEvents>;
2011
- "map": Tag<MapAttrs, TagEvents>;
2012
- "mark": Tag<TagAttrs, TagEvents>;
2013
- "marquee": Tag<TagAttrs, TagEvents>;
2014
- "menu": Tag<TagAttrs, TagEvents>;
2015
- "meta": Tag<MetaAttrs, TagEvents>;
2016
- "meter": Tag<MeterAttrs, TagEvents>;
2017
- "nav": Tag<TagAttrs, TagEvents>;
2018
- "noscript": Tag<TagAttrs, TagEvents>;
2019
- "object": Tag<ObjectAttrs, TagEvents>;
2020
- "ol": Tag<OlAttrs, TagEvents>;
2021
- "optgroup": Tag<OptgroupAttrs, TagEvents>;
2022
- "option": Tag<OptionAttrs, TagEvents>;
2023
- "output": Tag<OutputAttrs, TagEvents>;
2024
- "p": Tag<TagAttrs, TagEvents>;
2025
- "param": Tag<ParamAttrs, TagEvents>;
2026
- "picture": Tag<TagAttrs, TagEvents>;
2027
- "pre": Tag<TagAttrs, TagEvents>;
2028
- "progress": Tag<ProgressAttrs, TagEvents>;
2029
- "q": Tag<QAttrs, TagEvents>;
2030
- "rp": Tag<TagAttrs, TagEvents>;
2031
- "rt": Tag<TagAttrs, TagEvents>;
2032
- "ruby": Tag<TagAttrs, TagEvents>;
2033
- "s": Tag<TagAttrs, TagEvents>;
2034
- "samp": Tag<TagAttrs, TagEvents>;
2035
- "script": Tag<TagAttrs, TagEvents>;
2036
- "section": Tag<TagAttrs, TagEvents>;
2037
- "select": Tag<SelectAttrs, TagEvents>;
2038
- "slot": Tag<TagAttrs, TagEvents>;
2039
- "small": Tag<TagAttrs, TagEvents>;
2040
- "source": Tag<SourceAttrs, TagEvents>;
2041
- "span": Tag<TagAttrs, TagEvents>;
2042
- "strong": Tag<TagAttrs, TagEvents>;
2043
- "style": Tag<StyleAttrs, TagEvents>;
2044
- "sub": Tag<TagAttrs, TagEvents>;
2045
- "summary": Tag<TagAttrs, TagEvents>;
2046
- "sup": Tag<TagAttrs, TagEvents>;
2047
- "table": Tag<TagAttrs, TagEvents>;
2048
- "tbody": Tag<TagAttrs, TagEvents>;
2049
- "td": Tag<TdAttrs, TagEvents>;
2050
- "template": Tag<TagAttrs, TagEvents>;
2051
- "textarea": Tag<TextareaAttrs, TagEvents>;
2052
- "tfoot": Tag<TagAttrs, TagEvents>;
2053
- "th": Tag<ThAttrs, TagEvents>;
2054
- "thead": Tag<TagAttrs, TagEvents>;
2055
- "time": Tag<TagAttrs, TagEvents>;
2056
- "title": Tag<TagAttrs, TagEvents>;
2057
- "tr": Tag<TagAttrs, TagEvents>;
2058
- "track": Tag<TrackAttrs, TagEvents>;
2059
- "u": Tag<TagAttrs, TagEvents>;
2060
- "ul": Tag<TagAttrs, TagEvents>;
2061
- "var": Tag<TagAttrs, TagEvents>;
2062
- "video": Tag<VideoAttrs, VideoEvents>;
2063
- "wbr": Tag<TagAttrs, TagEvents>;
2064
- [K: string]: Tag<TagAttrs, TagEvents>;
1678
+ declare interface SvgCoreAttrs {
1679
+ "id": string;
1680
+ "tabindex": string;
1681
+ "lang": string;
1682
+ "xml:space": string;
2065
1683
  }
2066
- declare type HtmlOrSvgTag = HTMLElement | SVGElement;
2067
- declare interface HtmlAndSvgEvents {
2068
- onabort?: ((this: HtmlOrSvgTag, ev: UIEvent) => any) | null;
2069
- onanimationcancel?: ((this: HtmlOrSvgTag, ev: AnimationEvent) => any) | null;
2070
- onanimationend?: ((this: HtmlOrSvgTag, ev: AnimationEvent) => any) | null;
2071
- onanimationiteration?: ((this: HtmlOrSvgTag, ev: AnimationEvent) => any) | null;
2072
- onanimationstart?: ((this: HtmlOrSvgTag, ev: AnimationEvent) => any) | null;
2073
- onauxclick?: ((this: HtmlOrSvgTag, ev: MouseEvent) => any) | null;
2074
- onblur?: ((this: HtmlOrSvgTag, ev: FocusEvent) => any) | null;
2075
- oncanplay?: ((this: HtmlOrSvgTag, ev: Event) => any) | null;
2076
- oncanplaythrough?: ((this: HtmlOrSvgTag, ev: Event) => any) | null;
2077
- onchange?: ((this: HtmlOrSvgTag, ev: Event) => any) | null;
2078
- onclick?: ((this: HtmlOrSvgTag, ev: MouseEvent) => any) | null;
2079
- onclose?: ((this: HtmlOrSvgTag, ev: Event) => any) | null;
2080
- oncontextmenu?: ((this: HtmlOrSvgTag, ev: MouseEvent) => any) | null;
2081
- oncopy?: ((this: HtmlOrSvgTag, ev: ClipboardEvent) => any) | null;
2082
- oncut?: ((this: HtmlOrSvgTag, ev: ClipboardEvent) => any) | null;
2083
- oncuechange?: ((this: HtmlOrSvgTag, ev: Event) => any) | null;
2084
- ondblclick?: ((this: HtmlOrSvgTag, ev: MouseEvent) => any) | null;
2085
- ondrag?: ((this: HtmlOrSvgTag, ev: DragEvent) => any) | null;
2086
- ondragend?: ((this: HtmlOrSvgTag, ev: DragEvent) => any) | null;
2087
- ondragenter?: ((this: HtmlOrSvgTag, ev: DragEvent) => any) | null;
2088
- ondragleave?: ((this: HtmlOrSvgTag, ev: DragEvent) => any) | null;
2089
- ondragover?: ((this: HtmlOrSvgTag, ev: DragEvent) => any) | null;
2090
- ondragstart?: ((this: HtmlOrSvgTag, ev: DragEvent) => any) | null;
2091
- ondrop?: ((this: HtmlOrSvgTag, ev: DragEvent) => any) | null;
2092
- ondurationchange?: ((this: HtmlOrSvgTag, ev: Event) => any) | null;
2093
- onemptied?: ((this: HtmlOrSvgTag, ev: Event) => any) | null;
2094
- onended?: ((this: HtmlOrSvgTag, ev: Event) => any) | null;
2095
- onerror?: ((event: Event | string, source?: string, lineno?: number, colno?: number, error?: Error) => any) | null;
2096
- onfocus?: ((this: HtmlOrSvgTag, ev: FocusEvent) => any) | null;
2097
- onformdata?: ((this: HtmlOrSvgTag, ev: FormDataEvent) => any) | null;
2098
- onfullscreenchange?: ((this: HtmlOrSvgTag, ev: Event) => any) | null;
2099
- onfullscreenerror?: ((this: HtmlOrSvgTag, ev: Event) => any) | null;
2100
- ongotpointercapture?: ((this: HtmlOrSvgTag, ev: PointerEvent) => any) | null;
2101
- oninput?: ((this: HtmlOrSvgTag, ev: Event) => any) | null;
2102
- oninvalid?: ((this: HtmlOrSvgTag, ev: Event) => any) | null;
2103
- onkeydown?: ((this: HtmlOrSvgTag, ev: KeyboardEvent) => any) | null;
2104
- onkeypress?: ((this: HtmlOrSvgTag, ev: KeyboardEvent) => any) | null;
2105
- onkeyup?: ((this: HtmlOrSvgTag, ev: KeyboardEvent) => any) | null;
2106
- onload?: ((this: HtmlOrSvgTag, ev: Event) => any) | null;
2107
- onloadeddata?: ((this: HtmlOrSvgTag, ev: Event) => any) | null;
2108
- onloadedmetadata?: ((this: HtmlOrSvgTag, ev: Event) => any) | null;
2109
- onloadstart?: ((this: HtmlOrSvgTag, ev: Event) => any) | null;
2110
- onlostpointercapture?: ((this: HtmlOrSvgTag, ev: PointerEvent) => any) | null;
2111
- onmousedown?: ((this: HtmlOrSvgTag, ev: MouseEvent) => any) | null;
2112
- onmouseenter?: ((this: HtmlOrSvgTag, ev: MouseEvent) => any) | null;
2113
- onmouseleave?: ((this: HtmlOrSvgTag, ev: MouseEvent) => any) | null;
2114
- onmousemove?: ((this: HtmlOrSvgTag, ev: MouseEvent) => any) | null;
2115
- onmouseout?: ((this: HtmlOrSvgTag, ev: MouseEvent) => any) | null;
2116
- onmouseover?: ((this: HtmlOrSvgTag, ev: MouseEvent) => any) | null;
2117
- onmouseup?: ((this: HtmlOrSvgTag, ev: MouseEvent) => any) | null;
2118
- onpaste?: ((this: HtmlOrSvgTag, ev: ClipboardEvent) => any) | null;
2119
- onpause?: ((this: HtmlOrSvgTag, ev: Event) => any) | null;
2120
- onplay?: ((this: HtmlOrSvgTag, ev: Event) => any) | null;
2121
- onplaying?: ((this: HtmlOrSvgTag, ev: Event) => any) | null;
2122
- onpointercancel?: ((this: HtmlOrSvgTag, ev: PointerEvent) => any) | null;
2123
- onpointerdown?: ((this: HtmlOrSvgTag, ev: PointerEvent) => any) | null;
2124
- onpointerenter?: ((this: HtmlOrSvgTag, ev: PointerEvent) => any) | null;
2125
- onpointerleave?: ((this: HtmlOrSvgTag, ev: PointerEvent) => any) | null;
2126
- onpointermove?: ((this: HtmlOrSvgTag, ev: PointerEvent) => any) | null;
2127
- onpointerout?: ((this: HtmlOrSvgTag, ev: PointerEvent) => any) | null;
2128
- onpointerover?: ((this: HtmlOrSvgTag, ev: PointerEvent) => any) | null;
2129
- onpointerup?: ((this: HtmlOrSvgTag, ev: PointerEvent) => any) | null;
2130
- onprogress?: ((this: HtmlOrSvgTag, ev: ProgressEvent) => any) | null;
2131
- onratechange?: ((this: HtmlOrSvgTag, ev: Event) => any) | null;
2132
- onreset?: ((this: HtmlOrSvgTag, ev: Event) => any) | null;
2133
- onresize?: ((this: HtmlOrSvgTag, ev: UIEvent) => any) | null;
2134
- onscroll?: ((this: HtmlOrSvgTag, ev: Event) => any) | null;
2135
- onseeked?: ((this: HtmlOrSvgTag, ev: Event) => any) | null;
2136
- onseeking?: ((this: HtmlOrSvgTag, ev: Event) => any) | null;
2137
- onselect?: ((this: HtmlOrSvgTag, ev: Event) => any) | null;
2138
- onselectionchange?: ((this: HtmlOrSvgTag, ev: Event) => any) | null;
2139
- onselectstart?: ((this: HtmlOrSvgTag, ev: Event) => any) | null;
2140
- onstalled?: ((this: HtmlOrSvgTag, ev: Event) => any) | null;
2141
- onsubmit?: ((this: HtmlOrSvgTag, ev: SubmitEvent) => any) | null;
2142
- onsuspend?: ((this: HtmlOrSvgTag, ev: Event) => any) | null;
2143
- ontimeupdate?: ((this: HtmlOrSvgTag, ev: Event) => any) | null;
2144
- ontoggle?: ((this: HtmlOrSvgTag, ev: Event) => any) | null;
2145
- ontouchcancel?: ((this: HtmlOrSvgTag, ev: TouchEvent) => any) | null | undefined;
2146
- ontouchend?: ((this: HtmlOrSvgTag, ev: TouchEvent) => any) | null | undefined;
2147
- ontouchmove?: ((this: HtmlOrSvgTag, ev: TouchEvent) => any) | null | undefined;
2148
- ontouchstart?: ((this: HtmlOrSvgTag, ev: TouchEvent) => any) | null | undefined;
2149
- ontransitioncancel?: ((this: HtmlOrSvgTag, ev: TransitionEvent) => any) | null;
2150
- ontransitionend?: ((this: HtmlOrSvgTag, ev: TransitionEvent) => any) | null;
2151
- ontransitionrun?: ((this: HtmlOrSvgTag, ev: TransitionEvent) => any) | null;
2152
- ontransitionstart?: ((this: HtmlOrSvgTag, ev: TransitionEvent) => any) | null;
2153
- onvolumechange?: ((this: HtmlOrSvgTag, ev: Event) => any) | null;
2154
- onwaiting?: ((this: HtmlOrSvgTag, ev: Event) => any) | null;
2155
- onwheel?: ((this: HtmlOrSvgTag, ev: WheelEvent) => any) | null;
1684
+ declare interface SvgSvgAttrs extends SvgAreaAttrs, SvgConditionalProcessingAtttrs, SvgCoreAttrs {
1685
+ "viewBox": string;
1686
+ "preserveAspectRatio": string;
1687
+ "zoomAndPan": string;
1688
+ "transform": string;
1689
+ x: number;
1690
+ y: number;
1691
+ width: number;
1692
+ height: number;
2156
1693
  }
2157
- declare interface HtmlTag extends HtmlAndSvgEvents {
2158
- autofocus?: boolean;
2159
- className?: string;
2160
- nonce?: string | undefined;
2161
- tabIndex?: number;
2162
- accessKey?: string;
2163
- autocapitalize?: string;
2164
- dir?: string;
2165
- draggable?: boolean;
2166
- hidden?: boolean;
2167
- innerText?: string;
2168
- lang?: string;
2169
- outerText?: string;
2170
- spellcheck?: boolean;
2171
- title?: string;
2172
- translate?: boolean;
1694
+ declare interface Svg3in1Attrs extends SvgAreaAttrs, SvgConditionalProcessingAtttrs, SvgCoreAttrs {
2173
1695
  }
2174
- declare interface AnchorTag extends HtmlTag {
2175
- download: string;
2176
- hreflang: string;
2177
- ping: string;
2178
- referrerPolicy: string;
2179
- rel: string;
2180
- target: string;
2181
- text: string;
2182
- type: string;
1696
+ declare interface SvgUseAttrs extends Svg3in1Attrs {
1697
+ href: string;
2183
1698
  }
2184
- declare interface AreaTag extends HtmlTag {
2185
- alt: string;
2186
- coords: string;
2187
- download: string;
2188
- ping: string;
2189
- referrerPolicy: string;
2190
- rel: string;
2191
- shape: string;
2192
- target: string;
1699
+ declare interface SvgPathLengthAttrs extends Svg3in1Attrs {
1700
+ pathLength: number;
1701
+ "marker-start": string;
1702
+ "marker-mid": string;
1703
+ "marker-end": string;
2193
1704
  }
2194
- declare interface MediaTag extends HtmlTag {
2195
- autoplay?: boolean;
2196
- controls?: boolean;
2197
- crossOrigin?: string | null;
2198
- currentTime?: number;
2199
- defaultMuted?: boolean;
2200
- defaultPlaybackRate?: number;
2201
- disableRemotePlayback?: boolean;
2202
- loop?: boolean;
2203
- muted?: boolean;
2204
- onencrypted?: ((this: HTMLMediaElement, ev: MediaEncryptedEvent) => any) | null;
2205
- onwaitingforkey?: ((this: HTMLMediaElement, ev: Event) => any) | null;
2206
- playbackRate?: number;
2207
- preload?: "none" | "metadata" | "auto" | "";
2208
- src?: string;
2209
- srcObject?: MediaProvider | null;
2210
- volume?: number;
1705
+ declare interface SvgPathAttrs extends SvgPathLengthAttrs {
1706
+ d: string;
2211
1707
  }
2212
- declare interface BaseTag extends HtmlTag {
1708
+ declare interface SvgRectAttrs extends SvgPathLengthAttrs {
1709
+ x: number;
1710
+ y: number;
1711
+ width: number;
1712
+ height: number;
1713
+ rx: number;
1714
+ ry: number;
1715
+ }
1716
+ declare interface SvgCircleAttrs extends SvgPathLengthAttrs {
1717
+ cx: number;
1718
+ cy: number;
1719
+ r: number;
1720
+ }
1721
+ declare interface SvgEllipseAttrs extends SvgPathLengthAttrs {
1722
+ cx: number;
1723
+ cy: number;
1724
+ rx: number;
1725
+ ry: number;
1726
+ }
1727
+ declare interface SvgLineAttrs extends SvgPathLengthAttrs {
1728
+ x1: number;
1729
+ y1: number;
1730
+ x2: number;
1731
+ y2: number;
1732
+ }
1733
+ declare interface SvgPolygonAttrs extends SvgPathLengthAttrs {
1734
+ points: number;
1735
+ }
1736
+ declare interface SvgCommonTextAttrs extends Svg3in1Attrs {
1737
+ x: number;
1738
+ y: number;
1739
+ dx: number;
1740
+ dy: number;
1741
+ rotate: number;
1742
+ textLength: number;
1743
+ lengthAdjust: 'spacing' | 'spacingAndGlyphs';
1744
+ }
1745
+ declare interface SvgTextPathAttrs extends Svg3in1Attrs {
1746
+ "lengthAdjust": 'spacing' | 'spacingAndGlyphs';
1747
+ "textLength": number;
1748
+ "path": string;
1749
+ "href": string;
1750
+ "startOffset": number;
1751
+ "method": 'align' | 'stretch';
1752
+ "spacing": 'auto' | 'exact';
1753
+ "side": 'left' | 'right';
1754
+ }
1755
+ declare interface SvgImageAttrs extends Svg3in1Attrs {
1756
+ "preserveAspectRatio": string;
1757
+ "href": string;
1758
+ "crossorigin": string;
1759
+ x: number;
1760
+ y: number;
1761
+ width: number;
1762
+ height: number;
1763
+ }
1764
+ declare interface SvgForeignObjectAttrs extends Svg3in1Attrs {
1765
+ x: number;
1766
+ y: number;
1767
+ width: number;
1768
+ height: number;
1769
+ }
1770
+ declare interface SvgMarkerAttrs extends Svg3in1Attrs {
1771
+ "viewBox": string;
1772
+ "preserveAspectRatio": string;
1773
+ "refX": number;
1774
+ "refY": number;
1775
+ "markerUnits": 'strokeWidth' | 'userSpaceOnUse';
1776
+ "markerWidth": number | 'left' | 'center' | 'right';
1777
+ "markerHeight": number | 'top' | 'center' | 'bottom';
1778
+ "orient": 'auto' | 'auto-start-reverse' | number;
1779
+ }
1780
+ declare interface SvgAAttrs extends SvgCoreAttrs {
2213
1781
  href: string;
2214
- target: string;
1782
+ "target": '_self' | '_parent' | '_top' | '_blank';
1783
+ "download": string;
1784
+ "ping": string;
1785
+ "rel": string;
1786
+ "hreflang": string;
1787
+ "type": string;
1788
+ "referrerpolicy": string;
2215
1789
  }
2216
- declare interface QuoteTag extends HtmlTag {
2217
- cite: string;
1790
+ declare interface SvgViewAttrs extends SvgCoreAttrs, SvgAreaAttrs {
1791
+ "viewBox": string;
1792
+ "preserveAspectRatio": string;
1793
+ "zoomAndPan": string;
2218
1794
  }
2219
- declare interface ButtonTag extends HtmlTag {
2220
- disabled: boolean;
2221
- formAction: string;
2222
- formEnctype: string;
2223
- formMethod: string;
2224
- formNoValidate: boolean;
2225
- formTarget: string;
2226
- name: string;
2227
- type: string;
2228
- value: string;
1795
+ declare interface SvgTagMap {
1796
+ "a": Tag<SvgAAttrs, SvgEvents>;
1797
+ "animate": Tag<SvgCoreAttrs, SvgEvents>;
1798
+ "animateMotion": Tag<SvgCoreAttrs, SvgEvents>;
1799
+ "animateTransform": Tag<SvgCoreAttrs, SvgEvents>;
1800
+ "circle": Tag<SvgCircleAttrs, SvgEvents>;
1801
+ "clipPath": Tag<SvgCoreAttrs, SvgEvents>;
1802
+ "defs": Tag<SvgCoreAttrs, SvgEvents>;
1803
+ "desc": Tag<SvgCoreAttrs, SvgEvents>;
1804
+ "ellipse": Tag<SvgEllipseAttrs, SvgEvents>;
1805
+ "feBlend": Tag<SvgCoreAttrs, SvgEvents>;
1806
+ "feColorMatrix": Tag<SvgCoreAttrs, SvgEvents>;
1807
+ "feComponentTransfer": Tag<SvgCoreAttrs, SvgEvents>;
1808
+ "feComposite": Tag<SvgCoreAttrs, SvgEvents>;
1809
+ "feConvolveMatrix": Tag<SvgCoreAttrs, SvgEvents>;
1810
+ "feDiffuseLighting": Tag<SvgCoreAttrs, SvgEvents>;
1811
+ "feDisplacementMap": Tag<SvgCoreAttrs, SvgEvents>;
1812
+ "feDistantLight": Tag<SvgCoreAttrs, SvgEvents>;
1813
+ "feDropShadow": Tag<SvgCoreAttrs, SvgEvents>;
1814
+ "feFlood": Tag<SvgCoreAttrs, SvgEvents>;
1815
+ "feFuncA": Tag<SvgCoreAttrs, SvgEvents>;
1816
+ "feFuncB": Tag<SvgCoreAttrs, SvgEvents>;
1817
+ "feFuncG": Tag<SvgCoreAttrs, SvgEvents>;
1818
+ "feFuncR": Tag<SvgCoreAttrs, SvgEvents>;
1819
+ "feGaussianBlur": Tag<SvgCoreAttrs, SvgEvents>;
1820
+ "feImage": Tag<SvgCoreAttrs, SvgEvents>;
1821
+ "feMerge": Tag<SvgCoreAttrs, SvgEvents>;
1822
+ "feMergeNode": Tag<SvgCoreAttrs, SvgEvents>;
1823
+ "feMorphology": Tag<SvgCoreAttrs, SvgEvents>;
1824
+ "feOffset": Tag<SvgCoreAttrs, SvgEvents>;
1825
+ "fePointLight": Tag<SvgCoreAttrs, SvgEvents>;
1826
+ "feSpecularLighting": Tag<SvgCoreAttrs, SvgEvents>;
1827
+ "feSpotLight": Tag<SvgCoreAttrs, SvgEvents>;
1828
+ "feTile": Tag<SvgCoreAttrs, SvgEvents>;
1829
+ "feTurbulence": Tag<SvgCoreAttrs, SvgEvents>;
1830
+ "filter": Tag<SvgCoreAttrs, SvgEvents>;
1831
+ "foreignObject": Tag<SvgForeignObjectAttrs, SvgEvents>;
1832
+ "g": Tag<Svg3in1Attrs, SvgEvents>;
1833
+ "image": Tag<SvgImageAttrs, SvgEvents>;
1834
+ "line": Tag<SvgLineAttrs, SvgEvents>;
1835
+ "linearGradient": Tag<SvgCoreAttrs, SvgEvents>;
1836
+ "marker": Tag<SvgMarkerAttrs, SvgEvents>;
1837
+ "mask": Tag<SvgCoreAttrs, SvgEvents>;
1838
+ "metadata": Tag<SvgCoreAttrs, SvgEvents>;
1839
+ "mpath": Tag<SvgCoreAttrs, SvgEvents>;
1840
+ "path": Tag<SvgPathAttrs, SvgEvents>;
1841
+ "pattern": Tag<SvgCoreAttrs, SvgEvents>;
1842
+ "polygon": Tag<SvgCoreAttrs, SvgEvents>;
1843
+ "polyline": Tag<SvgPolygonAttrs, SvgEvents>;
1844
+ "radialGradient": Tag<SvgCoreAttrs, SvgEvents>;
1845
+ "rect": Tag<SvgRectAttrs, SvgEvents>;
1846
+ "script": Tag<SvgCoreAttrs, SvgEvents>;
1847
+ "set": Tag<SvgCoreAttrs, SvgEvents>;
1848
+ "stop": Tag<SvgCoreAttrs, SvgEvents>;
1849
+ "style": Tag<SvgCoreAttrs, SvgEvents>;
1850
+ "svg": Tag<SvgSvgAttrs, SvgEvents>;
1851
+ "switch": Tag<Svg3in1Attrs, SvgEvents>;
1852
+ "symbol": Tag<SvgCoreAttrs, SvgEvents>;
1853
+ "text": Tag<SvgCommonTextAttrs, SvgEvents>;
1854
+ "textPath": Tag<SvgTextPathAttrs, SvgEvents>;
1855
+ "title": Tag<SvgCoreAttrs, SvgEvents>;
1856
+ "tspan": Tag<SvgCommonTextAttrs, SvgEvents>;
1857
+ "use": Tag<SvgUseAttrs, SvgEvents>;
1858
+ "view": Tag<SvgViewAttrs, SvgEvents>;
1859
+ }
1860
+ declare type SvgTag = HtmlAndSvgEvents;
1861
+ declare interface SvgATag extends SvgTag {
1862
+ rel: string;
1863
+ }
1864
+ declare interface SvgSvgTag extends SvgTag {
1865
+ currentScale: number;
1866
+ }
1867
+ declare interface SvgTagNameMap {
1868
+ "a": SvgATag;
1869
+ "animate": SvgTag;
1870
+ "animateMotion": SvgTag;
1871
+ "animateTransform": SvgTag;
1872
+ "circle": SvgTag;
1873
+ "clipPath": SvgTag;
1874
+ "defs": SvgTag;
1875
+ "desc": SvgTag;
1876
+ "ellipse": SvgTag;
1877
+ "feBlend": SvgTag;
1878
+ "feColorMatrix": SvgTag;
1879
+ "feComponentTransfer": SvgTag;
1880
+ "feComposite": SvgTag;
1881
+ "feConvolveMatrix": SvgTag;
1882
+ "feDiffuseLighting": SvgTag;
1883
+ "feDisplacementMap": SvgTag;
1884
+ "feDistantLight": SvgTag;
1885
+ "feDropShadow": SvgTag;
1886
+ "feFlood": SvgTag;
1887
+ "feFuncA": SvgTag;
1888
+ "feFuncB": SvgTag;
1889
+ "feFuncG": SvgTag;
1890
+ "feFuncR": SvgTag;
1891
+ "feGaussianBlur": SvgTag;
1892
+ "feImage": SvgTag;
1893
+ "feMerge": SvgTag;
1894
+ "feMergeNode": SvgTag;
1895
+ "feMorphology": SvgTag;
1896
+ "feOffset": SvgTag;
1897
+ "fePointLight": SvgTag;
1898
+ "feSpecularLighting": SvgTag;
1899
+ "feSpotLight": SvgTag;
1900
+ "feTile": SvgTag;
1901
+ "feTurbulence": SvgTag;
1902
+ "filter": SvgTag;
1903
+ "foreignObject": SvgTag;
1904
+ "g": SvgTag;
1905
+ "image": SvgTag;
1906
+ "line": SvgTag;
1907
+ "linearGradient": SvgTag;
1908
+ "marker": SvgTag;
1909
+ "mask": SvgTag;
1910
+ "metadata": SvgTag;
1911
+ "mpath": SvgTag;
1912
+ "path": SvgTag;
1913
+ "pattern": SvgTag;
1914
+ "polygon": SvgTag;
1915
+ "polyline": SvgTag;
1916
+ "radialGradient": SvgTag;
1917
+ "rect": SvgTag;
1918
+ "script": SvgTag;
1919
+ "set": SvgTag;
1920
+ "stop": SvgTag;
1921
+ "style": SvgTag;
1922
+ "svg": SvgSvgTag;
1923
+ "switch": SvgTag;
1924
+ "symbol": SvgTag;
1925
+ "text": SvgTag;
1926
+ "textPath": SvgTag;
1927
+ "title": SvgTag;
1928
+ "tspan": SvgTag;
1929
+ "use": SvgTag;
1930
+ "view": SvgTag;
2229
1931
  }
2230
- declare interface CanvasTag extends HtmlTag {
2231
- height: number;
2232
- width: number;
1932
+
1933
+
1934
+
1935
+ declare type AcceptedTagsMap = TagNameMap & SvgTagNameMap;
1936
+ declare type AcceptedTagsSpec = HtmlTagMap & SvgTagMap;
1937
+
1938
+
1939
+ /**
1940
+ * Describe a common binding logic
1941
+ * @class Binding
1942
+ * @extends Destroyable
1943
+ */
1944
+ declare class Binding<T> extends Destroyable {
1945
+ binding: any;
1946
+ func: any;
1947
+ /**
1948
+ * Constructs a common binding logic
1949
+ * @param value {IValue} the value to bind
1950
+ */
1951
+ constructor(value: IValue<T>): void;
1952
+ init(bounded: (v: T) => void): void;
1953
+ /**
1954
+ * Just clear bindings
1955
+ */
1956
+ $destroy(): void;
2233
1957
  }
2234
- declare interface TableColTag extends HtmlTag {
2235
- span: number;
1958
+
1959
+
1960
+ /**
1961
+ * Represents an Attribute binding description
1962
+ * @class AttributeBinding
1963
+ * @extends Binding
1964
+ */
1965
+ declare class AttributeBinding extends Binding<string | number | boolean | null> {
1966
+ /**
1967
+ * Constructs an attribute binding description
1968
+ * @param node {INode} the vasille node
1969
+ * @param name {String} the name of attribute
1970
+ * @param value {IValue} value to bind
1971
+ */
1972
+ constructor(node: INode, name: string, value: IValue<string | number | boolean | null>): void;
2236
1973
  }
2237
- declare interface DataTag extends HtmlTag {
2238
- value: string;
1974
+
1975
+
1976
+ declare class StaticClassBinding extends Binding<boolean> {
1977
+ current: any;
1978
+ constructor(node: INode, name: string, value: IValue<boolean>): void;
2239
1979
  }
2240
- declare interface ModTag extends HtmlTag {
2241
- cite: string;
2242
- dateTime: string;
1980
+ declare class DynamicalClassBinding extends Binding<string> {
1981
+ current: any;
1982
+ constructor(node: INode, value: IValue<string>): void;
2243
1983
  }
2244
- declare interface DetailsTag extends HtmlTag {
2245
- open: boolean;
1984
+
1985
+
1986
+ /**
1987
+ * Describes a style attribute binding
1988
+ * @class StyleBinding
1989
+ * @extends Binding
1990
+ */
1991
+ declare class StyleBinding extends Binding<string> {
1992
+ /**
1993
+ * Constructs a style binding attribute
1994
+ * @param node {INode} the vasille node
1995
+ * @param name {string} the name of style property
1996
+ * @param value {IValue} the value to bind
1997
+ */
1998
+ constructor(node: INode, name: string, value: IValue<string>): void;
2246
1999
  }
2247
- declare interface EmbedTag extends HtmlTag {
2248
- height: string;
2249
- src: string;
2250
- type: string;
2251
- width: string;
2000
+
2001
+
2002
+ declare interface AppOptions<K> extends TagOptions<K> {
2003
+ debugUi?: boolean;
2252
2004
  }
2253
- declare interface FieldSetTag extends HtmlTag {
2254
- disabled: boolean;
2255
- name: string;
2005
+ /**
2006
+ * Application Node
2007
+ * @class AppNode
2008
+ * @extends INode
2009
+ */
2010
+ declare class AppNode<T> extends INode<T> {
2011
+ /**
2012
+ * Enables debug comments
2013
+ */
2014
+ debugUi: boolean;
2015
+ /**
2016
+ * @param input
2017
+ */
2018
+ constructor(input: T): void;
2256
2019
  }
2257
- declare interface FormTag extends HtmlTag {
2258
- acceptCharset: string;
2259
- action: string;
2260
- autocomplete: string;
2261
- encoding: string;
2262
- enctype: string;
2263
- method: string;
2264
- name: string;
2265
- noValidate: boolean;
2266
- target: string;
2020
+ /**
2021
+ * Represents a Vasille.js application
2022
+ * @class App
2023
+ * @extends AppNode
2024
+ */
2025
+ declare class App<T> extends AppNode<T> {
2026
+ /**
2027
+ * Constructs an app node
2028
+ * @param node {Element} The root of application
2029
+ * @param input
2030
+ */
2031
+ constructor(node: Element, input: T): void;
2032
+ appendNode(node: Node): void;
2267
2033
  }
2268
- declare interface IFrameTag extends HtmlTag {
2269
- allow: string;
2270
- allowFullscreen: boolean;
2271
- height: string;
2272
- name: string;
2273
- referrerPolicy: ReferrerPolicy;
2274
- src: string;
2275
- srcdoc: string;
2276
- width: string;
2034
+ declare interface PortalOptions extends AppOptions<'div'> {
2035
+ node: Element;
2036
+ slot?: (node: Fragment) => void;
2277
2037
  }
2278
- declare interface ImageTag extends HtmlTag {
2279
- alt: string;
2280
- crossOrigin: string | null;
2281
- decoding: "async" | "sync" | "auto";
2282
- height: number;
2283
- isMap: boolean;
2284
- loading: string;
2285
- referrerPolicy: string;
2286
- sizes: string;
2287
- src: string;
2288
- srcset: string;
2289
- useMap: string;
2290
- width: number;
2038
+ declare class Portal extends AppNode<PortalOptions> {
2039
+ constructor(input: PortalOptions): void;
2040
+ appendNode(node: Node): void;
2291
2041
  }
2292
- declare interface InputTag extends HtmlTag {
2293
- accept: string;
2294
- alt: string;
2295
- autocomplete: string;
2296
- capture: string;
2297
- checked: boolean;
2298
- defaultChecked: boolean;
2299
- defaultValue: string;
2300
- dirName: string;
2301
- disabled: boolean;
2302
- files: FileList | null;
2303
- formAction: string;
2304
- formEnctype: string;
2305
- formMethod: string;
2306
- formNoValidate: boolean;
2307
- formTarget: string;
2308
- height: number;
2309
- indeterminate: boolean;
2310
- max: string;
2311
- maxLength: number;
2312
- min: string;
2313
- minLength: number;
2314
- multiple: boolean;
2315
- name: string;
2316
- pattern: string;
2317
- placeholder: string;
2318
- readOnly: boolean;
2319
- required: boolean;
2320
- selectionDirection: "forward" | "backward" | "none" | null;
2321
- selectionEnd: number | null;
2322
- selectionStart: number | null;
2323
- size: number;
2324
- src: string;
2325
- step: string;
2326
- type: string;
2327
- value: string;
2328
- valueAsDate: Date | null;
2329
- valueAsNumber: number;
2330
- webkitdirectory: boolean;
2331
- width: number;
2042
+
2043
+
2044
+
2045
+ /**
2046
+ * Represents a Vasille.js node
2047
+ * @class FragmentPrivate
2048
+ * @extends ReactivePrivate
2049
+ */
2050
+ declare class FragmentPrivate extends ReactivePrivate {
2051
+ /**
2052
+ * The app node
2053
+ * @type {AppNode}
2054
+ */
2055
+ app: AppNode;
2056
+ /**
2057
+ * Parent node
2058
+ * @type {Fragment}
2059
+ */
2060
+ parent: Fragment;
2061
+ /**
2062
+ * Next node
2063
+ * @type {?Fragment}
2064
+ */
2065
+ next?: Fragment;
2066
+ /**
2067
+ * Previous node
2068
+ * @type {?Fragment}
2069
+ */
2070
+ prev?: Fragment;
2071
+ constructor(): void;
2072
+ /**
2073
+ * Pre-initializes the base of a fragment
2074
+ * @param app {App} the app node
2075
+ * @param parent {Fragment} the parent node
2076
+ */
2077
+ preinit(app: AppNode, parent: Fragment): void;
2078
+ /**
2079
+ * Unlinks all bindings
2080
+ */
2081
+ $destroy(): void;
2332
2082
  }
2333
- declare interface LabelTag extends HtmlTag {
2334
- htmlFor: string;
2083
+ /**
2084
+ * This class is symbolic
2085
+ * @extends Reactive
2086
+ */
2087
+ declare class Fragment<T> extends Reactive {
2088
+ /**
2089
+ * Private part
2090
+ * @protected
2091
+ */
2092
+ $: FragmentPrivate;
2093
+ /**
2094
+ * The children list
2095
+ * @type Array
2096
+ */
2097
+ children: Set<Fragment>;
2098
+ lastChild: Fragment | null;
2099
+ /**
2100
+ * Constructs a Vasille Node
2101
+ * @param input
2102
+ * @param $ {FragmentPrivate}
2103
+ */
2104
+ constructor(input: T, $?: FragmentPrivate): void;
2105
+ /**
2106
+ * Gets the app of node
2107
+ */
2108
+ get app(): AppNode;
2109
+ /**
2110
+ * Prepare to init fragment
2111
+ * @param app {AppNode} app of node
2112
+ * @param parent {Fragment} parent of node
2113
+ * @param data {*} additional data
2114
+ */
2115
+ preinit(app: AppNode, parent: Fragment, data?: any): void;
2116
+ init(): T['return'];
2117
+ compose(input: T): void;
2118
+ /** To be overloaded: ready event handler */
2119
+ ready(): void;
2120
+ /**
2121
+ * Pushes a node to children immediately
2122
+ * @param node {Fragment} A node to push
2123
+ * @protected
2124
+ */
2125
+ pushNode(node: Fragment): void;
2126
+ /**
2127
+ * Find first node in element if so exists
2128
+ * @return {?Element}
2129
+ * @protected
2130
+ */
2131
+ findFirstChild(): Node;
2132
+ /**
2133
+ * Append a node to end of element
2134
+ * @param node {Node} node to insert
2135
+ */
2136
+ appendNode(node: Node): void;
2137
+ /**
2138
+ * Insert a node as a sibling of this
2139
+ * @param node {Node} node to insert
2140
+ */
2141
+ insertAdjacent(node: Node): void;
2142
+ /**
2143
+ * Defines a text fragment
2144
+ * @param text {String | IValue} A text fragment string
2145
+ * @param cb {function (TextNode)} Callback if previous is slot name
2146
+ */
2147
+ text(text: string | IValue<string>, cb?: (text: TextNode) => void): void;
2148
+ debug(text: IValue<string>): void;
2149
+ /**
2150
+ * Defines a tag element
2151
+ * @param tagName {String} the tag name
2152
+ * @param input
2153
+ * @param cb {function(Tag, *)} callback
2154
+ */
2155
+ tag<K>(tagName: K, input: TagOptionsWithSlot<K>, cb?: (node: Tag<K>) => void): (HTMLElementTagNameMap & SVGElementTagNameMap)[K];
2156
+ /**
2157
+ * Defines a custom element
2158
+ * @param node {Fragment} vasille element to insert
2159
+ * @param callback {function($ : *)}
2160
+ */
2161
+ create<T>(node: T, callback?: T['input']['slot']): T['input']['return'];
2162
+ /**
2163
+ * Defines an if node
2164
+ * @param cond {IValue} condition
2165
+ * @param cb {function(Fragment)} callback to run on true
2166
+ * @return {this}
2167
+ */
2168
+ if(cond: IValue<boolean>, cb: (node: Fragment) => void): void;
2169
+ else(cb: (node: Fragment) => void): void;
2170
+ elif(cond: IValue<boolean>, cb: (node: Fragment) => void): void;
2171
+ /**
2172
+ * Create a case for switch
2173
+ * @param cond {IValue<boolean>}
2174
+ * @param cb {function(Fragment) : void}
2175
+ * @return {{cond : IValue, cb : (function(Fragment) : void)}}
2176
+ */
2177
+ case(cond: IValue<boolean>, cb: (node: Fragment) => void): {
2178
+ cond: IValue<boolean>;
2179
+ cb: (node: Fragment) => void;
2180
+ };
2181
+ /**
2182
+ * @param cb {(function(Fragment) : void)}
2183
+ * @return {{cond : IValue, cb : (function(Fragment) : void)}}
2184
+ */
2185
+ default(cb: (node: Fragment) => void): {
2186
+ cond: IValue<boolean>;
2187
+ cb: (node: Fragment) => void;
2188
+ };
2189
+ insertBefore(node: Fragment): void;
2190
+ insertAfter(node: Fragment): void;
2191
+ remove(): void;
2192
+ $destroy(): void;
2335
2193
  }
2336
- declare interface LITag extends HtmlTag {
2337
- value: number;
2194
+ /**
2195
+ * The part of a text node
2196
+ * @class TextNodePrivate
2197
+ * @extends FragmentPrivate
2198
+ */
2199
+ declare class TextNodePrivate extends FragmentPrivate {
2200
+ node: Text;
2201
+ constructor(): void;
2202
+ /**
2203
+ * Pre-initializes a text node
2204
+ * @param app {AppNode} the app node
2205
+ * @param parent
2206
+ * @param text {IValue}
2207
+ */
2208
+ preinitText(app: AppNode, parent: Fragment, text: IValue<string> | string): void;
2209
+ /**
2210
+ * Clear node data
2211
+ */
2212
+ $destroy(): void;
2338
2213
  }
2339
- declare interface LinkTag extends HtmlTag {
2340
- as: string;
2341
- crossOrigin: string | null;
2342
- disabled: boolean;
2343
- href: string;
2344
- hreflang: string;
2345
- imageSizes: string;
2346
- imageSrcset: string;
2347
- integrity: string;
2348
- media: string;
2349
- referrerPolicy: string;
2350
- rel: string;
2351
- type: string;
2214
+ /**
2215
+ * Represents a text node
2216
+ * @class TextNode
2217
+ * @extends Fragment
2218
+ */
2219
+ declare class TextNode extends Fragment {
2220
+ $: TextNodePrivate;
2221
+ constructor($?: TextNodePrivate): void;
2222
+ preinit(app: AppNode, parent: Fragment, text?: IValue<string> | string): void;
2223
+ findFirstChild(): Node;
2224
+ $destroy(): void;
2352
2225
  }
2353
- declare interface MapTag extends HtmlTag {
2354
- name: string;
2226
+ /**
2227
+ * The part of a base node
2228
+ * @class INodePrivate
2229
+ * @extends FragmentPrivate
2230
+ */
2231
+ declare class INodePrivate extends FragmentPrivate {
2232
+ /**
2233
+ * Defines if node is unmounted
2234
+ * @type {boolean}
2235
+ */
2236
+ unmounted: boolean;
2237
+ /**
2238
+ * The element of vasille node
2239
+ * @type Element
2240
+ */
2241
+ node: Element;
2242
+ constructor(): void;
2243
+ $destroy(): void;
2244
+ }
2245
+ /**
2246
+ * Vasille node which can manipulate an element node
2247
+ * @class INode
2248
+ * @extends Fragment
2249
+ */
2250
+ declare class INode<T> extends Fragment<T> {
2251
+ $: INodePrivate;
2252
+ /**
2253
+ * Constructs a base node
2254
+ * @param input
2255
+ * @param $ {?INodePrivate}
2256
+ */
2257
+ constructor(input: T, $?: INodePrivate): void;
2258
+ /**
2259
+ * Get the bound node
2260
+ */
2261
+ get node(): Element;
2262
+ /**
2263
+ * Bind attribute value
2264
+ * @param name {String} name of attribute
2265
+ * @param value {IValue} value
2266
+ */
2267
+ attr(name: string, value: IValue<string | number | boolean>): void;
2268
+ /**
2269
+ * Set attribute value
2270
+ * @param name {string} name of attribute
2271
+ * @param value {string} value
2272
+ */
2273
+ setAttr(name: string, value: string | number | boolean): this;
2274
+ /**
2275
+ * Adds a CSS class
2276
+ * @param cl {string} Class name
2277
+ */
2278
+ addClass(cl: string): this;
2279
+ /**
2280
+ * Adds some CSS classes
2281
+ * @param cls {...string} classes names
2282
+ */
2283
+ removeClasse(cl: string): this;
2284
+ /**
2285
+ * Bind a CSS class
2286
+ * @param className {IValue}
2287
+ */
2288
+ bindClass(className: IValue<string>): this;
2289
+ /**
2290
+ * Bind a floating class name
2291
+ * @param cond {IValue} condition
2292
+ * @param className {string} class name
2293
+ */
2294
+ floatingClass(cond: IValue<boolean>, className: string): this;
2295
+ /**
2296
+ * Defines a style attribute
2297
+ * @param name {String} name of style attribute
2298
+ * @param value {IValue} value
2299
+ */
2300
+ style(name: string, value: IValue<string>): this;
2301
+ /**
2302
+ * Sets a style property value
2303
+ * @param prop {string} Property name
2304
+ * @param value {string} Property value
2305
+ */
2306
+ setStyle(prop: string, value: string): this;
2307
+ /**
2308
+ * Add a listener for an event
2309
+ * @param name {string} Event name
2310
+ * @param handler {function (Event)} Event handler
2311
+ * @param options {Object | boolean} addEventListener options
2312
+ */
2313
+ listen(name: string, handler: (ev: Event) => void, options?: boolean | AddEventListenerOptions): this;
2314
+ insertAdjacent(node: Node): void;
2315
+ /**
2316
+ * A v-show & ngShow alternative
2317
+ * @param cond {IValue} show condition
2318
+ */
2319
+ bindShow(cond: IValue<boolean>): this;
2320
+ /**
2321
+ * bind HTML
2322
+ * @param value {IValue}
2323
+ */
2324
+ bindDomApi(name: string, value: IValue<string>): void;
2325
+ applyOptions(options: T): void;
2355
2326
  }
2356
- declare interface MeterTag extends HtmlTag {
2357
- high: number;
2358
- low: number;
2359
- max: number;
2360
- min: number;
2361
- optimum: number;
2362
- value: number;
2327
+ declare interface TagOptionsWithSlot<K> extends TagOptions<K> {
2328
+ slot?: (tag: Tag<K>) => void;
2363
2329
  }
2364
- declare interface ObjectTag extends HtmlTag {
2365
- data: string;
2366
- height: string;
2367
- name: string;
2368
- type: string;
2369
- useMap: string;
2370
- width: string;
2330
+ /**
2331
+ * Represents an Vasille.js HTML element node
2332
+ * @class Tag
2333
+ * @extends INode
2334
+ */
2335
+ declare class Tag<K> extends INode<TagOptionsWithSlot<K>> {
2336
+ constructor(input: TagOptionsWithSlot<K>): void;
2337
+ preinit(app: AppNode, parent: Fragment, tagName?: string): void;
2338
+ compose(input: TagOptionsWithSlot<K>): void;
2339
+ findFirstChild(): Node;
2340
+ insertAdjacent(node: Node): void;
2341
+ appendNode(node: Node): void;
2342
+ /**
2343
+ * Mount/Unmount a node
2344
+ * @param cond {IValue} show condition
2345
+ */
2346
+ bindMount(cond: IValue<boolean>): void;
2347
+ /**
2348
+ * Runs GC
2349
+ */
2350
+ $destroy(): void;
2371
2351
  }
2372
- declare interface OListTag extends HtmlTag {
2373
- reversed: boolean;
2374
- start: number;
2375
- type: string;
2352
+ /**
2353
+ * Represents a vasille extension node
2354
+ * @class Extension
2355
+ * @extends INode
2356
+ */
2357
+ declare class Extension<T> extends INode<T> {
2358
+ preinit(app: AppNode, parent: Fragment): void;
2359
+ extend(options: T): void;
2360
+ $destroy(): void;
2376
2361
  }
2377
- declare interface OptGroupTag extends HtmlTag {
2378
- disabled: boolean;
2379
- label: string;
2362
+ /**
2363
+ * Node which cas has just a child
2364
+ * @class Component
2365
+ * @extends Extension
2366
+ */
2367
+ declare class Component<T> extends Extension<T> {
2368
+ init(): void;
2369
+ ready(): void;
2370
+ preinit(app: AppNode, parent: Fragment): void;
2380
2371
  }
2381
- declare interface OptionTag extends HtmlTag {
2382
- defaultSelected: boolean;
2383
- disabled: boolean;
2384
- label: string;
2385
- selected: boolean;
2386
- text: string;
2387
- value: string;
2372
+ /**
2373
+ * Private part of switch node
2374
+ * @class SwitchedNodePrivate
2375
+ * @extends INodePrivate
2376
+ */
2377
+ declare class SwitchedNodePrivate extends FragmentPrivate {
2378
+ /**
2379
+ * Index of current true condition
2380
+ * @type number
2381
+ */
2382
+ index: number;
2383
+ /**
2384
+ * Array of possible cases
2385
+ * @type {Array<{cond : IValue<boolean>, cb : function(Fragment)}>}
2386
+ */
2387
+ cases: {
2388
+ cond: IValue<boolean>;
2389
+ cb: (node: Fragment) => void;
2390
+ }[];
2391
+ /**
2392
+ * A function which sync index and content, will be bounded to each condition
2393
+ * @type {Function}
2394
+ */
2395
+ sync: () => void;
2396
+ constructor(): void;
2397
+ /**
2398
+ * Runs GC
2399
+ */
2400
+ $destroy(): void;
2388
2401
  }
2389
- declare interface OutputTag extends HtmlTag {
2390
- defaultValue: string;
2391
- name: string;
2392
- value: string;
2402
+ /**
2403
+ * Defines a node witch can switch its children conditionally
2404
+ */
2405
+ declare class SwitchedNode extends Fragment {
2406
+ $: SwitchedNodePrivate;
2407
+ /**
2408
+ * Constructs a switch node and define a sync function
2409
+ */
2410
+ constructor(): void;
2411
+ addCase(case_: {
2412
+ cond: IValue<boolean>;
2413
+ cb: (node: Fragment) => void;
2414
+ }): void;
2415
+ /**
2416
+ * Creates a child node
2417
+ * @param cb {function(Fragment)} Call-back
2418
+ */
2419
+ createChild(cb: (node: Fragment) => void): void;
2420
+ ready(): void;
2421
+ $destroy(): void;
2393
2422
  }
2394
- declare interface ParamTag extends HtmlTag {
2395
- name: string;
2396
- value: string;
2423
+ /**
2424
+ * The part of a text node
2425
+ */
2426
+ declare class DebugPrivate extends FragmentPrivate {
2427
+ node: Comment;
2428
+ constructor(): void;
2429
+ /**
2430
+ * Pre-initializes a text node
2431
+ * @param app {App} the app node
2432
+ * @param parent {Fragment} parent node
2433
+ * @param text {String | IValue}
2434
+ */
2435
+ preinitComment(app: AppNode, parent: Fragment, text: IValue<string>): void;
2436
+ /**
2437
+ * Clear node data
2438
+ */
2439
+ $destroy(): void;
2397
2440
  }
2398
- declare interface ProgressTag extends HtmlTag {
2399
- max: number;
2400
- value: number;
2441
+ /**
2442
+ * Represents a debug node
2443
+ * @class DebugNode
2444
+ * @extends Fragment
2445
+ */
2446
+ declare class DebugNode extends Fragment {
2447
+ /**
2448
+ * data
2449
+ * @type {DebugNode}
2450
+ */
2451
+ $: DebugPrivate;
2452
+ constructor(): void;
2453
+ preinit(app: AppNode, parent: Fragment, text?: IValue<string>): void;
2454
+ /**
2455
+ * Runs garbage collector
2456
+ */
2457
+ $destroy(): void;
2401
2458
  }
2402
- declare interface ScriptTag extends HtmlTag {
2403
- async: boolean;
2404
- crossOrigin: string | null;
2405
- defer: boolean;
2406
- integrity: string;
2407
- noModule: boolean;
2408
- referrerPolicy: string;
2409
- src: string;
2410
- text: string;
2411
- type: string;
2459
+
2460
+
2461
+ declare interface WatchOptions<T> extends FragmentOptions {
2462
+ model: IValue<T>;
2463
+ slot?: (node: Fragment, value: T) => void;
2412
2464
  }
2413
- declare interface SelectTag extends HtmlTag {
2414
- autocomplete: string;
2415
- disabled: boolean;
2416
- length: number;
2417
- multiple: boolean;
2418
- name: string;
2419
- required: boolean;
2420
- selectedIndex: number;
2421
- size: number;
2422
- value: string;
2465
+ /**
2466
+ * Watch Node
2467
+ * @class Watch
2468
+ * @extends Fragment
2469
+ */
2470
+ declare class Watch<T> extends Fragment<WatchOptions<T>> {
2471
+ input: WatchOptions<T>;
2472
+ compose(input: WatchOptions<T>): void;
2423
2473
  }
2424
- declare interface SlotTag extends HtmlTag {
2425
- name: string;
2474
+
2475
+
2476
+
2477
+ declare interface FragmentOptions {
2478
+ "v:is"?: Record<string, IValue<any>>;
2479
+ return?: any;
2480
+ slot?: (node: Fragment, ...args: any[]) => void;
2426
2481
  }
2427
- declare interface SourceTag extends HtmlTag {
2428
- media: string;
2429
- sizes: string;
2430
- src: string;
2431
- srcset: string;
2432
- type: string;
2482
+ declare type AttrType<T> = IValue<T | string | null> | T | string | null | undefined;
2483
+ declare interface TagOptions<T> extends FragmentOptions {
2484
+ "v:attr"?: {
2485
+ [K : string]:? AttrType<AcceptedTagsSpec[T]['attrs'][K]>;
2486
+ } & Record<string, AttrType<number | boolean>>;
2487
+ class?: (string | IValue<string> | Record<string, boolean | IValue<boolean>>)[] | ({
2488
+ $: IValue<string>[];
2489
+ } & Record<string, boolean | IValue<boolean>>);
2490
+ style?: Record<string, string | IValue<string> | [number | string | IValue<number | string>, string]>;
2491
+ "v:events"?: Partial<AcceptedTagsSpec[T]['events']>;
2492
+ "v:set"?: Partial<AcceptedTagsMap[T]> & Record<string, any>;
2493
+ "v:bind"?: {
2494
+ [K : string]:? IValue<AcceptedTagsMap[T][K]>;
2495
+ } & Record<string, IValue<any>>;
2433
2496
  }
2434
- declare interface StyleTag extends HtmlTag {
2435
- media: string;
2497
+
2498
+
2499
+ /**
2500
+ * Private part of repeat node
2501
+ * @class RepeatNodePrivate
2502
+ * @extends INodePrivate
2503
+ */
2504
+ declare class RepeatNodePrivate<IdT> extends INodePrivate {
2505
+ /**
2506
+ * Children node hash
2507
+ * @type {Map}
2508
+ */
2509
+ nodes: Map<IdT, Fragment>;
2510
+ constructor(): void;
2511
+ $destroy(): void;
2436
2512
  }
2437
- declare interface TableTag extends HtmlTag {
2438
- caption: HTMLTableCaptionElement | null;
2439
- tFoot: HTMLTableSectionElement | null;
2440
- tHead: HTMLTableSectionElement | null;
2513
+ declare interface RNO<T, IdT> extends FragmentOptions {
2514
+ slot?: (node: Fragment, value: T, index: IdT) => void;
2441
2515
  }
2442
- declare interface TableCellTag extends HtmlTag {
2443
- abbr: string;
2444
- colSpan: number;
2445
- headers: string;
2446
- rowSpan: number;
2447
- scope: string;
2516
+ /**
2517
+ * Repeat node repeats its children
2518
+ * @class RepeatNode
2519
+ * @extends Fragment
2520
+ */
2521
+ declare class RepeatNode<IdT, T,Opts> extends Fragment<Opts> {
2522
+ $: RepeatNodePrivate<IdT>;
2523
+ /**
2524
+ * If false will use timeout executor, otherwise the app executor
2525
+ */
2526
+ freezeUi: boolean;
2527
+ constructor(input: Opts, $: RepeatNodePrivate<IdT>): void;
2528
+ createChild(opts: Opts, id: IdT, item: T, before?: Fragment): any;
2529
+ destroyChild(id: IdT, item: T): void;
2448
2530
  }
2449
- declare interface TextAreaTag extends HtmlTag {
2450
- autocomplete: string;
2451
- cols: number;
2452
- defaultValue: string;
2453
- dirName: string;
2454
- disabled: boolean;
2455
- maxLength: number;
2456
- minLength: number;
2457
- name: string;
2458
- placeholder: string;
2459
- readOnly: boolean;
2460
- required: boolean;
2461
- rows: number;
2462
- selectionDirection: "forward" | "backward" | "none";
2463
- selectionEnd: number;
2464
- selectionStart: number;
2465
- value: string;
2466
- wrap: string;
2531
+
2532
+
2533
+ /**
2534
+ * Private part of BaseView
2535
+ * @class BaseViewPrivate
2536
+ * @extends RepeatNodePrivate
2537
+ */
2538
+ declare class BaseViewPrivate<K, T> extends RepeatNodePrivate<K> {
2539
+ /**
2540
+ * Handler to catch values addition
2541
+ * @type {Function}
2542
+ */
2543
+ addHandler: (index: K, value: T) => void;
2544
+ /**
2545
+ * Handler to catch values removes
2546
+ * @type {Function}
2547
+ */
2548
+ removeHandler: (index: K, value: T) => void;
2549
+ constructor(): void;
2467
2550
  }
2468
- declare interface TimeTag extends HtmlTag {
2469
- dateTime: string;
2551
+ declare interface BSO<K, T,Model> extends RNO<T, K> {
2552
+ model: Model;
2470
2553
  }
2471
- declare interface TitleTag extends HtmlTag {
2472
- text: string;
2554
+ /**
2555
+ * Base class of default views
2556
+ * @class BaseView
2557
+ * @extends RepeatNode
2558
+ * @implements IModel
2559
+ */
2560
+ declare class BaseView<K, T,Model> extends RepeatNode<K, T, BSO<K, T, Model>> {
2561
+ $: BaseViewPrivate<K, T>;
2562
+ input: BSO<K, T, Model>;
2563
+ constructor(input: BSO<K, T, Model>, $?: BaseViewPrivate<K, T>): void;
2564
+ compose(input: BSO<K, T, Model>): void;
2473
2565
  }
2474
- declare interface TrackTag extends HtmlTag {
2475
- default: boolean;
2476
- kind: string;
2477
- label: string;
2478
- src: string;
2479
- srclang: string;
2566
+
2567
+
2568
+ /**
2569
+ * Represents a view of an array model
2570
+ * @class ArrayView
2571
+ * @extends BaseView
2572
+ */
2573
+ declare class ArrayView<T> extends BaseView<T, T, ArrayModel<T>> {
2574
+ createChild(input: BSO<T, T, ArrayModel<T>>, id: T, item: T, before?: Fragment): any;
2575
+ compose(input: BSO<T, T, ArrayModel<T>>): void;
2480
2576
  }
2481
- declare interface VideoTag extends MediaTag {
2482
- disablePictureInPicture?: boolean;
2483
- height?: number;
2484
- onenterpictureinpicture?: ((this: HTMLVideoElement, ev: Event) => any) | null;
2485
- onleavepictureinpicture?: ((this: HTMLVideoElement, ev: Event) => any) | null;
2486
- playsInline?: boolean;
2487
- poster?: string;
2488
- width?: number;
2577
+
2578
+
2579
+ /**
2580
+ * Create a children pack for each map value
2581
+ * @class MapView
2582
+ * @extends BaseView
2583
+ */
2584
+ declare class MapView<K, T> extends BaseView<K, T, MapModel<K, T>> {
2585
+ compose(input: BSO<K, T, MapModel<K, T>>): void;
2489
2586
  }
2490
- declare interface TagNameMap {
2491
- "a": AnchorTag;
2492
- "abbr": HtmlTag;
2493
- "address": HtmlTag;
2494
- "area": AreaTag;
2495
- "article": HtmlTag;
2496
- "aside": HtmlTag;
2497
- "audio": MediaTag;
2498
- "b": HtmlTag;
2499
- "base": BaseTag;
2500
- "bdi": HtmlTag;
2501
- "bdo": HtmlTag;
2502
- "blockquote": QuoteTag;
2503
- "body": HtmlTag;
2504
- "br": HtmlTag;
2505
- "button": ButtonTag;
2506
- "canvas": CanvasTag;
2507
- "caption": HtmlTag;
2508
- "cite": HtmlTag;
2509
- "code": HtmlTag;
2510
- "col": TableColTag;
2511
- "colgroup": TableColTag;
2512
- "data": DataTag;
2513
- "datalist": HtmlTag;
2514
- "dd": HtmlTag;
2515
- "del": ModTag;
2516
- "details": DetailsTag;
2517
- "dfn": HtmlTag;
2518
- "dialog": HtmlTag;
2519
- "div": HtmlTag;
2520
- "dl": HtmlTag;
2521
- "dt": HtmlTag;
2522
- "em": HtmlTag;
2523
- "embed": EmbedTag;
2524
- "fieldset": FieldSetTag;
2525
- "figcaption": HtmlTag;
2526
- "figure": HtmlTag;
2527
- "footer": HtmlTag;
2528
- "form": FormTag;
2529
- "h1": HtmlTag;
2530
- "h2": HtmlTag;
2531
- "h3": HtmlTag;
2532
- "h4": HtmlTag;
2533
- "h5": HtmlTag;
2534
- "h6": HtmlTag;
2535
- "head": HtmlTag;
2536
- "header": HtmlTag;
2537
- "hgroup": HtmlTag;
2538
- "hr": HtmlTag;
2539
- "html": HtmlTag;
2540
- "i": HtmlTag;
2541
- "iframe": IFrameTag;
2542
- "img": ImageTag;
2543
- "input": InputTag;
2544
- "ins": ModTag;
2545
- "kbd": HtmlTag;
2546
- "label": LabelTag;
2547
- "legend": HtmlTag;
2548
- "li": LITag;
2549
- "link": LinkTag;
2550
- "main": HtmlTag;
2551
- "map": MapTag;
2552
- "mark": HtmlTag;
2553
- "menu": HtmlTag;
2554
- "meta": HtmlTag;
2555
- "meter": MeterTag;
2556
- "nav": HtmlTag;
2557
- "noscript": HtmlTag;
2558
- "object": ObjectTag;
2559
- "ol": OListTag;
2560
- "optgroup": OptGroupTag;
2561
- "option": OptionTag;
2562
- "output": OutputTag;
2563
- "p": HtmlTag;
2564
- "param": ParamTag;
2565
- "picture": HtmlTag;
2566
- "pre": HtmlTag;
2567
- "progress": ProgressTag;
2568
- "q": QuoteTag;
2569
- "rp": HtmlTag;
2570
- "rt": HtmlTag;
2571
- "ruby": HtmlTag;
2572
- "s": HtmlTag;
2573
- "samp": HtmlTag;
2574
- "script": ScriptTag;
2575
- "section": HtmlTag;
2576
- "select": SelectTag;
2577
- "slot": SlotTag;
2578
- "small": HtmlTag;
2579
- "source": SourceTag;
2580
- "span": HtmlTag;
2581
- "strong": HtmlTag;
2582
- "style": StyleTag;
2583
- "sub": HtmlTag;
2584
- "summary": HtmlTag;
2585
- "sup": HtmlTag;
2586
- "table": TableTag;
2587
- "tbody": HtmlTag;
2588
- "td": TableCellTag;
2589
- "template": HtmlTag;
2590
- "textarea": TextAreaTag;
2591
- "tfoot": HtmlTag;
2592
- "th": TableCellTag;
2593
- "thead": HtmlTag;
2594
- "time": TimeTag;
2595
- "title": TitleTag;
2596
- "tr": HtmlTag;
2597
- "track": TrackTag;
2598
- "u": HtmlTag;
2599
- "ul": HtmlTag;
2600
- "var": HtmlTag;
2601
- "video": VideoTag;
2602
- "wbr": HtmlTag;
2587
+
2588
+
2589
+ /**
2590
+ * Create a children pack for each object field
2591
+ * @class ObjectView
2592
+ * @extends BaseView
2593
+ */
2594
+ declare class ObjectView<T> extends BaseView<string, T, ObjectModel<T>> {
2595
+ compose(input: BSO<string, T, ObjectModel<T>>): void;
2603
2596
  }
2604
2597
 
2605
2598
 
2599
+ /**
2600
+ * Create a children pack for each set value
2601
+ * @class SetView
2602
+ * @extends BaseView
2603
+ */
2604
+ declare class SetView<T> extends BaseView<T, T, SetModel<T>> {
2605
+ compose(input: BSO<T, T, SetModel<T>>): void;
2606
+ }
2607
+
2606
2608
 
2607
2609
  }