vasille 2.3.9 → 3.0.2

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