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