vasille 1.2.8 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.gitlab-ci.yml +20 -0
- package/LICENSE.md +21 -0
- package/README.md +160 -119
- package/cdn/es2015.js +3221 -0
- package/cdn/es5.js +3673 -0
- package/flow-typed/vasille.js +837 -0
- package/lib/binding/attribute.js +32 -0
- package/lib/binding/binding.js +39 -0
- package/lib/binding/class.js +51 -0
- package/lib/binding/style.js +29 -0
- package/lib/core/core.js +178 -0
- package/lib/core/destroyable.js +45 -0
- package/lib/core/errors.js +16 -0
- package/lib/core/executor.js +154 -0
- package/lib/core/ivalue.js +56 -0
- package/lib/core/signal.js +50 -0
- package/lib/core/slot.js +47 -0
- package/lib/index.js +27 -22
- package/lib/models/array-model.js +208 -0
- package/lib/models/listener.js +130 -0
- package/lib/models/map-model.js +66 -0
- package/lib/models/model.js +1 -0
- package/lib/models/object-model.js +78 -0
- package/lib/models/set-model.js +62 -0
- package/lib/node/app.js +38 -0
- package/lib/node/interceptor.js +83 -0
- package/lib/node/node.js +1202 -0
- package/lib/node/watch.js +27 -0
- package/lib/value/expression.js +83 -0
- package/lib/value/mirror.js +58 -0
- package/lib/value/pointer.js +26 -0
- package/lib/value/reference.js +55 -0
- package/lib/views/array-view.js +23 -0
- package/lib/views/base-view.js +49 -0
- package/lib/views/map-view.js +20 -0
- package/lib/views/object-view.js +20 -0
- package/lib/views/repeat-node.js +106 -0
- package/lib/views/repeater.js +63 -0
- package/lib/views/set-view.js +23 -0
- package/package.json +27 -19
- package/types/binding/attribute.d.ts +23 -0
- package/types/binding/binding.d.ts +30 -0
- package/types/binding/class.d.ts +23 -0
- package/types/binding/style.d.ts +23 -0
- package/types/core/core.d.ts +140 -0
- package/types/core/destroyable.d.ts +15 -0
- package/types/core/errors.d.ts +4 -0
- package/types/core/executor.d.ts +87 -0
- package/types/core/ivalue.d.ts +45 -0
- package/types/core/signal.d.ts +35 -0
- package/types/core/slot.d.ts +45 -0
- package/types/index.d.ts +27 -21
- package/types/models/array-model.d.ts +103 -0
- package/types/models/listener.d.ts +74 -0
- package/types/models/map-model.d.ts +35 -0
- package/types/models/model.d.ts +19 -0
- package/types/models/object-model.d.ts +36 -0
- package/types/models/set-model.d.ts +34 -0
- package/types/node/app.d.ts +37 -0
- package/types/node/interceptor.d.ts +50 -0
- package/types/node/node.d.ts +741 -0
- package/types/node/watch.d.ts +23 -0
- package/types/value/expression.d.ts +60 -0
- package/types/value/mirror.d.ts +35 -0
- package/types/value/pointer.d.ts +19 -0
- package/types/value/reference.d.ts +30 -0
- package/types/views/array-view.d.ts +13 -0
- package/types/views/base-view.d.ts +43 -0
- package/types/views/map-view.d.ts +11 -0
- package/types/views/object-view.d.ts +11 -0
- package/types/views/repeat-node.d.ts +35 -0
- package/types/views/repeater.d.ts +38 -0
- package/types/views/set-view.d.ts +11 -0
- package/CHANGELOG.md +0 -23
- package/img/favicon.svg +0 -441
- package/img/getLocus.svg +0 -18
- package/img/logo.png +0 -0
- package/img/logo.svg +0 -550
- package/img/scores-o-log.png +0 -0
- package/img/scores-o.png +0 -0
- package/img/scores-wo-log.png +0 -0
- package/img/scores-wo.png +0 -0
- package/img/x1-x32.png +0 -0
- package/lib/attribute.js +0 -71
- package/lib/attribute.js.map +0 -1
- package/lib/bind.js +0 -286
- package/lib/bind.js.map +0 -1
- package/lib/class.js +0 -97
- package/lib/class.js.map +0 -1
- package/lib/executor.js +0 -167
- package/lib/executor.js.map +0 -1
- package/lib/index.js.map +0 -1
- package/lib/interfaces/core.js +0 -247
- package/lib/interfaces/core.js.map +0 -1
- package/lib/interfaces/destroyable.js +0 -39
- package/lib/interfaces/destroyable.js.map +0 -1
- package/lib/interfaces/errors.js +0 -49
- package/lib/interfaces/errors.js.map +0 -1
- package/lib/interfaces/ibind.js +0 -31
- package/lib/interfaces/ibind.js.map +0 -1
- package/lib/interfaces/idefinition.js +0 -64
- package/lib/interfaces/idefinition.js.map +0 -1
- package/lib/interfaces/ivalue.js +0 -60
- package/lib/interfaces/ivalue.js.map +0 -1
- package/lib/models.js +0 -579
- package/lib/models.js.map +0 -1
- package/lib/node.js +0 -2155
- package/lib/node.js.map +0 -1
- package/lib/property.js +0 -38
- package/lib/property.js.map +0 -1
- package/lib/style.js +0 -66
- package/lib/style.js.map +0 -1
- package/lib/value.js +0 -203
- package/lib/value.js.map +0 -1
- package/lib/views.js +0 -688
- package/lib/views.js.map +0 -1
- package/src/attribute.js +0 -70
- package/src/bind.js +0 -285
- package/src/class.js +0 -96
- package/src/executor.js +0 -165
- package/src/index.js +0 -20
- package/src/interfaces/core.js +0 -248
- package/src/interfaces/destroyable.js +0 -37
- package/src/interfaces/errors.js +0 -47
- package/src/interfaces/ibind.js +0 -29
- package/src/interfaces/idefinition.js +0 -62
- package/src/interfaces/ivalue.js +0 -58
- package/src/models.js +0 -577
- package/src/node.js +0 -2162
- package/src/property.js +0 -36
- package/src/style.js +0 -65
- package/src/value.js +0 -201
- package/src/views.js +0 -686
- package/types/attribute.d.ts +0 -18
- package/types/bind.d.ts +0 -72
- package/types/class.d.ts +0 -19
- package/types/data.d.ts +0 -11
- package/types/event.d.ts +0 -10
- package/types/executor.d.ts +0 -57
- package/types/interfaces/core.d.ts +0 -129
- package/types/interfaces/destroyable.d.ts +0 -11
- package/types/interfaces/errors.d.ts +0 -24
- package/types/interfaces/ibind.d.ts +0 -19
- package/types/interfaces/idefinition.d.ts +0 -29
- package/types/interfaces/ivalue.d.ts +0 -40
- package/types/models.d.ts +0 -179
- package/types/node.d.ts +0 -906
- package/types/property.d.ts +0 -9
- package/types/style.d.ts +0 -28
- package/types/value.d.ts +0 -43
- package/types/views.d.ts +0 -135
|
@@ -0,0 +1,741 @@
|
|
|
1
|
+
import { Reactive, ReactivePrivate } from "../core/core";
|
|
2
|
+
import { IValue } from "../core/ivalue";
|
|
3
|
+
import type { AppNode } from "./app";
|
|
4
|
+
/**
|
|
5
|
+
* Represents a Vasille.js node
|
|
6
|
+
* @class FragmentPrivate
|
|
7
|
+
* @extends ReactivePrivate
|
|
8
|
+
*/
|
|
9
|
+
export declare class FragmentPrivate extends ReactivePrivate {
|
|
10
|
+
/**
|
|
11
|
+
* The app node
|
|
12
|
+
* @type {AppNode}
|
|
13
|
+
*/
|
|
14
|
+
app: AppNode;
|
|
15
|
+
/**
|
|
16
|
+
* Parent node
|
|
17
|
+
* @type {Fragment}
|
|
18
|
+
*/
|
|
19
|
+
parent: Fragment;
|
|
20
|
+
/**
|
|
21
|
+
* Next node
|
|
22
|
+
* @type {?Fragment}
|
|
23
|
+
*/
|
|
24
|
+
next?: Fragment;
|
|
25
|
+
/**
|
|
26
|
+
* Previous node
|
|
27
|
+
* @type {?Fragment}
|
|
28
|
+
*/
|
|
29
|
+
prev?: Fragment;
|
|
30
|
+
constructor();
|
|
31
|
+
/**
|
|
32
|
+
* Pre-initializes the base of a fragment
|
|
33
|
+
* @param app {App} the app node
|
|
34
|
+
* @param parent {Fragment} the parent node
|
|
35
|
+
*/
|
|
36
|
+
preinit(app: AppNode, parent: Fragment): void;
|
|
37
|
+
/**
|
|
38
|
+
* Unlinks all bindings
|
|
39
|
+
*/
|
|
40
|
+
$destroy(): void;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* This class is symbolic
|
|
44
|
+
* @extends Reactive
|
|
45
|
+
*/
|
|
46
|
+
export declare class Fragment extends Reactive {
|
|
47
|
+
/**
|
|
48
|
+
* Private part
|
|
49
|
+
* @protected
|
|
50
|
+
*/
|
|
51
|
+
protected $: FragmentPrivate;
|
|
52
|
+
/**
|
|
53
|
+
* The children list
|
|
54
|
+
* @type Array
|
|
55
|
+
*/
|
|
56
|
+
$children: Array<Fragment>;
|
|
57
|
+
/**
|
|
58
|
+
* Constructs a Vasille Node
|
|
59
|
+
* @param $ {FragmentPrivate}
|
|
60
|
+
*/
|
|
61
|
+
constructor($?: FragmentPrivate);
|
|
62
|
+
/**
|
|
63
|
+
* Gets the app of node
|
|
64
|
+
*/
|
|
65
|
+
get app(): AppNode;
|
|
66
|
+
/**
|
|
67
|
+
* Prepare to init fragment
|
|
68
|
+
* @param app {AppNode} app of node
|
|
69
|
+
* @param parent {Fragment} parent of node
|
|
70
|
+
* @param data {*} additional data
|
|
71
|
+
*/
|
|
72
|
+
$preinit(app: AppNode, parent: Fragment, data?: unknown): void;
|
|
73
|
+
/**
|
|
74
|
+
* Initialize node
|
|
75
|
+
*/
|
|
76
|
+
$init(): this;
|
|
77
|
+
/** To be overloaded: created event handler */
|
|
78
|
+
$created(): void;
|
|
79
|
+
/** To be overloaded: mounted event handler */
|
|
80
|
+
$mounted(): void;
|
|
81
|
+
/** To be overloaded: ready event handler */
|
|
82
|
+
$ready(): void;
|
|
83
|
+
/** To be overloaded: signals creation milestone */
|
|
84
|
+
$createSignals(): void;
|
|
85
|
+
/** To be overloaded: watchers creation milestone */
|
|
86
|
+
$createWatchers(): void;
|
|
87
|
+
/** To be overloaded: DOM creation milestone */
|
|
88
|
+
$compose(): void;
|
|
89
|
+
/**
|
|
90
|
+
* Pushes a node to children immediately
|
|
91
|
+
* @param node {Fragment} A node to push
|
|
92
|
+
* @protected
|
|
93
|
+
*/
|
|
94
|
+
protected $$pushNode(node: Fragment): void;
|
|
95
|
+
/**
|
|
96
|
+
* Find first node in element if so exists
|
|
97
|
+
* @return {?Element}
|
|
98
|
+
* @protected
|
|
99
|
+
*/
|
|
100
|
+
protected $$findFirstChild(): Node;
|
|
101
|
+
/**
|
|
102
|
+
* Append a node to end of element
|
|
103
|
+
* @param node {Node} node to insert
|
|
104
|
+
*/
|
|
105
|
+
$$appendNode(node: Node): void;
|
|
106
|
+
/**
|
|
107
|
+
* Insert a node as a sibling of this
|
|
108
|
+
* @param node {Node} node to insert
|
|
109
|
+
*/
|
|
110
|
+
$$insertAdjacent(node: Node): void;
|
|
111
|
+
/**
|
|
112
|
+
* Defines a text fragment
|
|
113
|
+
* @param text {String | IValue} A text fragment string
|
|
114
|
+
* @param cb {function (TextNode)} Callback if previous is slot name
|
|
115
|
+
*/
|
|
116
|
+
$text(text: string | IValue<string>, cb?: (text: TextNode) => void): this;
|
|
117
|
+
$debug(text: IValue<string>): this;
|
|
118
|
+
/**
|
|
119
|
+
* Defines a tag element
|
|
120
|
+
* @param tagName {String} the tag name
|
|
121
|
+
* @param cb {function(Tag, *)} callback
|
|
122
|
+
*/
|
|
123
|
+
$tag<K extends keyof HTMLElementTagNameMap>(tagName: K, cb?: (node: Tag, element: HTMLElementTagNameMap[K]) => void): this;
|
|
124
|
+
$tag<K extends keyof SVGElementTagNameMap>(tagName: K, cb?: (node: Tag, element: SVGElementTagNameMap[K]) => void): this;
|
|
125
|
+
$tag(tagName: string, cb?: (node: Tag, element: Element) => void): this;
|
|
126
|
+
/**
|
|
127
|
+
* Defines a custom element
|
|
128
|
+
* @param node {Fragment} vasille element to insert
|
|
129
|
+
* @param callback {function($ : *)}
|
|
130
|
+
* @param callback1 {function($ : *)}
|
|
131
|
+
*/
|
|
132
|
+
$create<T extends Fragment>(node: T, callback?: ($: T) => void, callback1?: ($: T) => void): this;
|
|
133
|
+
/**
|
|
134
|
+
* Defines an if node
|
|
135
|
+
* @param cond {IValue} condition
|
|
136
|
+
* @param cb {function(Fragment)} callback to run on true
|
|
137
|
+
* @return {this}
|
|
138
|
+
*/
|
|
139
|
+
$if(cond: IValue<boolean>, cb: (node: Fragment) => void): this;
|
|
140
|
+
/**
|
|
141
|
+
* Defines a if-else node
|
|
142
|
+
* @param ifCond {IValue} `if` condition
|
|
143
|
+
* @param ifCb {function(Fragment)} Call-back to create `if` child nodes
|
|
144
|
+
* @param elseCb {function(Fragment)} Call-back to create `else` child nodes
|
|
145
|
+
*/
|
|
146
|
+
$if_else(ifCond: IValue<boolean>, ifCb: (node: Fragment) => void, elseCb: (node: Fragment) => void): this;
|
|
147
|
+
/**
|
|
148
|
+
* Defines a switch nodes: Will break after first true condition
|
|
149
|
+
* @param cases {...{ cond : IValue, cb : function(Fragment) }} cases
|
|
150
|
+
* @return {INode}
|
|
151
|
+
*/
|
|
152
|
+
$switch(...cases: Array<{
|
|
153
|
+
cond: IValue<boolean>;
|
|
154
|
+
cb: (node: Fragment) => void;
|
|
155
|
+
}>): this;
|
|
156
|
+
/**
|
|
157
|
+
* Create a case for switch
|
|
158
|
+
* @param cond {IValue<boolean>}
|
|
159
|
+
* @param cb {function(Fragment) : void}
|
|
160
|
+
* @return {{cond : IValue, cb : (function(Fragment) : void)}}
|
|
161
|
+
*/
|
|
162
|
+
$case(cond: IValue<boolean>, cb: (node: Fragment) => void): {
|
|
163
|
+
cond: IValue<boolean>;
|
|
164
|
+
cb: (node: Fragment) => void;
|
|
165
|
+
};
|
|
166
|
+
/**
|
|
167
|
+
* @param cb {(function(Fragment) : void)}
|
|
168
|
+
* @return {{cond : IValue, cb : (function(Fragment) : void)}}
|
|
169
|
+
*/
|
|
170
|
+
$default(cb: (node: Fragment) => void): {
|
|
171
|
+
cond: IValue<boolean>;
|
|
172
|
+
cb: (node: Fragment) => void;
|
|
173
|
+
};
|
|
174
|
+
$destroy(): void;
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* The private part of a text node
|
|
178
|
+
* @class TextNodePrivate
|
|
179
|
+
* @extends FragmentPrivate
|
|
180
|
+
*/
|
|
181
|
+
export declare class TextNodePrivate extends FragmentPrivate {
|
|
182
|
+
node: Text;
|
|
183
|
+
constructor();
|
|
184
|
+
/**
|
|
185
|
+
* Pre-initializes a text node
|
|
186
|
+
* @param app {AppNode} the app node
|
|
187
|
+
* @param text {IValue}
|
|
188
|
+
*/
|
|
189
|
+
preinitText(app: AppNode, parent: Fragment, text: IValue<string>): void;
|
|
190
|
+
/**
|
|
191
|
+
* Clear node data
|
|
192
|
+
*/
|
|
193
|
+
$destroy(): void;
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* Represents a text node
|
|
197
|
+
* @class TextNode
|
|
198
|
+
* @extends Fragment
|
|
199
|
+
*/
|
|
200
|
+
export declare class TextNode extends Fragment {
|
|
201
|
+
protected $: TextNodePrivate;
|
|
202
|
+
constructor();
|
|
203
|
+
$preinit(app: AppNode, parent: Fragment, text?: IValue<string>): void;
|
|
204
|
+
protected $$findFirstChild(): Node;
|
|
205
|
+
$destroy(): void;
|
|
206
|
+
}
|
|
207
|
+
/**
|
|
208
|
+
* The private part of a base node
|
|
209
|
+
* @class INodePrivate
|
|
210
|
+
* @extends FragmentPrivate
|
|
211
|
+
*/
|
|
212
|
+
export declare class INodePrivate extends FragmentPrivate {
|
|
213
|
+
/**
|
|
214
|
+
* Defines if node is unmounted
|
|
215
|
+
* @type {boolean}
|
|
216
|
+
*/
|
|
217
|
+
unmounted: boolean;
|
|
218
|
+
/**
|
|
219
|
+
* The element of vasille node
|
|
220
|
+
* @type Element
|
|
221
|
+
*/
|
|
222
|
+
node: Element;
|
|
223
|
+
constructor();
|
|
224
|
+
$destroy(): void;
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* Vasille node which can manipulate an element node
|
|
228
|
+
* @class INode
|
|
229
|
+
* @extends Fragment
|
|
230
|
+
*/
|
|
231
|
+
export declare class INode extends Fragment {
|
|
232
|
+
protected $: INodePrivate;
|
|
233
|
+
/**
|
|
234
|
+
* Constructs a base node
|
|
235
|
+
* @param $ {?INodePrivate}
|
|
236
|
+
*/
|
|
237
|
+
constructor($?: INodePrivate);
|
|
238
|
+
/**
|
|
239
|
+
* Get the bound node
|
|
240
|
+
*/
|
|
241
|
+
get node(): Element;
|
|
242
|
+
/**
|
|
243
|
+
* Initialize node
|
|
244
|
+
*/
|
|
245
|
+
$init(): this;
|
|
246
|
+
/** To be overloaded: attributes creation milestone */
|
|
247
|
+
$createAttrs(): void;
|
|
248
|
+
/** To be overloaded: $style attributes creation milestone */
|
|
249
|
+
$createStyle(): void;
|
|
250
|
+
/**
|
|
251
|
+
* Bind attribute value
|
|
252
|
+
* @param name {String} name of attribute
|
|
253
|
+
* @param value {IValue} value
|
|
254
|
+
*/
|
|
255
|
+
$attr(name: string, value: IValue<string>): this;
|
|
256
|
+
/**
|
|
257
|
+
* Creates and binds a multivalued binding to attribute
|
|
258
|
+
* @param name {String} The name of attribute
|
|
259
|
+
* @param calculator {Function} Binding calculator (must return a value)
|
|
260
|
+
* @param v1 {*} argument
|
|
261
|
+
* @param v2 {*} argument
|
|
262
|
+
* @param v3 {*} argument
|
|
263
|
+
* @param v4 {*} argument
|
|
264
|
+
* @param v5 {*} argument
|
|
265
|
+
* @param v6 {*} argument
|
|
266
|
+
* @param v7 {*} argument
|
|
267
|
+
* @param v8 {*} argument
|
|
268
|
+
* @param v9 {*} argument
|
|
269
|
+
* @return {INode} A pointer to this
|
|
270
|
+
*/
|
|
271
|
+
$bindAttr<T1>(name: string, calculator: (a1: T1) => string, v1: IValue<T1>, v2?: IValue<void>, v3?: IValue<void>, v4?: IValue<void>, v5?: IValue<void>, v6?: IValue<void>, v7?: IValue<void>, v8?: IValue<void>, v9?: IValue<void>): this;
|
|
272
|
+
$bindAttr<T1, T2>(name: string, calculator: (a1: T1, a2: T2) => string, v1: IValue<T1>, v2: IValue<T2>, v3?: IValue<void>, v4?: IValue<void>, v5?: IValue<void>, v6?: IValue<void>, v7?: IValue<void>, v8?: IValue<void>, v9?: IValue<void>): this;
|
|
273
|
+
$bindAttr<T1, T2, T3>(name: string, calculator: (a1: T1, a2: T2, a3: T3) => string, v1: IValue<T1>, v2: IValue<T2>, v3: IValue<T3>, v4?: IValue<void>, v5?: IValue<void>, v6?: IValue<void>, v7?: IValue<void>, v8?: IValue<void>, v9?: IValue<void>): this;
|
|
274
|
+
$bindAttr<T1, T2, T3, T4>(name: string, calculator: (a1: T1, a2: T2, a3: T3, a4: T4) => string, v1: IValue<T1>, v2: IValue<T2>, v3: IValue<T3>, v4: IValue<T4>, v5?: IValue<void>, v6?: IValue<void>, v7?: IValue<void>, v8?: IValue<void>, v9?: IValue<void>): this;
|
|
275
|
+
$bindAttr<T1, T2, T3, T4, T5>(name: string, calculator: (a1: T1, a2: T2, a3: T3, a4: T4, a5: T5) => string, v1: IValue<T1>, v2: IValue<T2>, v3: IValue<T3>, v4: IValue<T4>, v5: IValue<T5>, v6?: IValue<void>, v7?: IValue<void>, v8?: IValue<void>, v9?: IValue<void>): this;
|
|
276
|
+
$bindAttr<T1, T2, T3, T4, T5, T6>(name: string, calculator: (a1: T1, a2: T2, a3: T3, a4: T4, a5: T5, a6: T6) => string, v1: IValue<T1>, v2: IValue<T2>, v3: IValue<T3>, v4: IValue<T4>, v5: IValue<T5>, v6: IValue<T6>, v7?: IValue<void>, v8?: IValue<void>, v9?: IValue<void>): this;
|
|
277
|
+
$bindAttr<T1, T2, T3, T4, T5, T6, T7>(name: string, calculator: (a1: T1, a2: T2, a3: T3, a4: T4, a5: T5, a6: T6, a7: T7) => string, v1: IValue<T1>, v2: IValue<T2>, v3: IValue<T3>, v4: IValue<T4>, v5: IValue<T5>, v6: IValue<T6>, v7: IValue<T7>, v8?: IValue<void>, v9?: IValue<void>): this;
|
|
278
|
+
$bindAttr<T1, T2, T3, T4, T5, T6, T7, T8>(name: string, calculator: (a1: T1, a2: T2, a3: T3, a4: T4, a5: T5, a6: T6, a7: T7, a8: T8) => string, v1: IValue<T1>, v2: IValue<T2>, v3: IValue<T3>, v4: IValue<T4>, v5: IValue<T5>, v6: IValue<T6>, v7: IValue<T7>, v8: IValue<T8>, v9?: IValue<void>): this;
|
|
279
|
+
$bindAttr<T1, T2, T3, T4, T5, T6, T7, T8, T9>(name: string, calculator: (a1: T1, a2: T2, a3: T3, a4: T4, a5: T5, a6: T6, a7: T7, a8: T8, a9: T9) => string, v1: IValue<T1>, v2: IValue<T2>, v3: IValue<T3>, v4: IValue<T4>, v5: IValue<T5>, v6: IValue<T6>, v7: IValue<T7>, v8: IValue<T8>, v9: IValue<T9>): this;
|
|
280
|
+
/**
|
|
281
|
+
* Set attribute value
|
|
282
|
+
* @param name {string} name of attribute
|
|
283
|
+
* @param value {string} value
|
|
284
|
+
*/
|
|
285
|
+
$setAttr(name: string, value: string): this;
|
|
286
|
+
/**
|
|
287
|
+
* Adds a CSS class
|
|
288
|
+
* @param cl {string} Class name
|
|
289
|
+
*/
|
|
290
|
+
$addClass(cl: string): this;
|
|
291
|
+
/**
|
|
292
|
+
* Adds some CSS classes
|
|
293
|
+
* @param cls {...string} classes names
|
|
294
|
+
*/
|
|
295
|
+
$addClasses(...cls: Array<string>): this;
|
|
296
|
+
/**
|
|
297
|
+
* Bind a CSS class
|
|
298
|
+
* @param className {IValue}
|
|
299
|
+
*/
|
|
300
|
+
$bindClass(className: IValue<string>): this;
|
|
301
|
+
/**
|
|
302
|
+
* Bind a floating class name
|
|
303
|
+
* @param cond {IValue} condition
|
|
304
|
+
* @param className {string} class name
|
|
305
|
+
*/
|
|
306
|
+
$floatingClass(cond: IValue<boolean>, className: string): this;
|
|
307
|
+
/**
|
|
308
|
+
* Defines a style attribute
|
|
309
|
+
* @param name {String} name of style attribute
|
|
310
|
+
* @param value {IValue} value
|
|
311
|
+
*/
|
|
312
|
+
$style(name: string, value: IValue<string>): this;
|
|
313
|
+
/**
|
|
314
|
+
* Binds style property value
|
|
315
|
+
* @param name {string} name of style attribute
|
|
316
|
+
* @param calculator {function} calculator for style value
|
|
317
|
+
* @param v1 {*} argument
|
|
318
|
+
* @param v2 {*} argument
|
|
319
|
+
* @param v3 {*} argument
|
|
320
|
+
* @param v4 {*} argument
|
|
321
|
+
* @param v5 {*} argument
|
|
322
|
+
* @param v6 {*} argument
|
|
323
|
+
* @param v7 {*} argument
|
|
324
|
+
* @param v8 {*} argument
|
|
325
|
+
* @param v9 {*} argument
|
|
326
|
+
*/
|
|
327
|
+
$bindStyle<T1>(name: string, calculator: (a1: T1) => string, v1: IValue<T1>): this;
|
|
328
|
+
$bindStyle<T1, T2>(name: string, calculator: (a1: T1, a2: T2) => string, v1: IValue<T1>, v2: IValue<T2>): this;
|
|
329
|
+
$bindStyle<T1, T2, T3>(name: string, calculator: (a1: T1, a2: T2, a3: T3) => string, v1: IValue<T1>, v2: IValue<T2>, v3: IValue<T3>): this;
|
|
330
|
+
$bindStyle<T1, T2, T3, T4>(name: string, calculator: (a1: T1, a2: T2, a3: T3, a4: T4) => string, v1: IValue<T1>, v2: IValue<T2>, v3: IValue<T3>, v4: IValue<T4>): this;
|
|
331
|
+
$bindStyle<T1, T2, T3, T4, T5>(name: string, calculator: (a1: T1, a2: T2, a3: T3, a4: T4, a5: T5) => string, v1: IValue<T1>, v2: IValue<T2>, v3: IValue<T3>, v4: IValue<T4>, v5: IValue<T5>): this;
|
|
332
|
+
$bindStyle<T1, T2, T3, T4, T5, T6>(name: string, calculator: (a1: T1, a2: T2, a3: T3, a4: T4, a5: T5, a6: T6) => string, v1: IValue<T1>, v2: IValue<T2>, v3: IValue<T3>, v4: IValue<T4>, v5: IValue<T5>, v6: IValue<T6>): this;
|
|
333
|
+
$bindStyle<T1, T2, T3, T4, T5, T6, T7>(name: string, calculator: (a1: T1, a2: T2, a3: T3, a4: T4, a5: T5, a6: T6, a7: T7) => string, v1: IValue<T1>, v2: IValue<T2>, v3: IValue<T3>, v4: IValue<T4>, v5: IValue<T5>, v6: IValue<T6>, v7: IValue<T7>): this;
|
|
334
|
+
$bindStyle<T1, T2, T3, T4, T5, T6, T7, T8>(name: string, calculator: (a1: T1, a2: T2, a3: T3, a4: T4, a5: T5, a6: T6, a7: T7, a8: T8) => string, v1: IValue<T1>, v2: IValue<T2>, v3: IValue<T3>, v4: IValue<T4>, v5: IValue<T5>, v6: IValue<T6>, v7: IValue<T7>, v8: IValue<T8>): this;
|
|
335
|
+
$bindStyle<T1, T2, T3, T4, T5, T6, T7, T8, T9>(name: string, calculator: (a1: T1, a2: T2, a3: T3, a4: T4, a5: T5, a6: T6, a7: T7, a8: T8, a9: T9) => string, v1: IValue<T1>, v2: IValue<T2>, v3: IValue<T3>, v4: IValue<T4>, v5: IValue<T5>, v6: IValue<T6>, v7: IValue<T7>, v8: IValue<T8>, v9: IValue<T9>): this;
|
|
336
|
+
/**
|
|
337
|
+
* Sets a style property value
|
|
338
|
+
* @param prop {string} Property name
|
|
339
|
+
* @param value {string} Property value
|
|
340
|
+
*/
|
|
341
|
+
$setStyle(prop: string, value: string): this;
|
|
342
|
+
/**
|
|
343
|
+
* Add a listener for an event
|
|
344
|
+
* @param name {string} Event name
|
|
345
|
+
* @param handler {function (Event)} Event handler
|
|
346
|
+
* @param options {Object | boolean} addEventListener options
|
|
347
|
+
*/
|
|
348
|
+
$listen(name: string, handler: (ev: Event) => void, options?: boolean | AddEventListenerOptions): this;
|
|
349
|
+
/**
|
|
350
|
+
* @param handler {function (MouseEvent)}
|
|
351
|
+
* @param options {Object | boolean}
|
|
352
|
+
*/
|
|
353
|
+
$oncontextmenu(handler: (ev: MouseEvent) => void, options?: boolean | AddEventListenerOptions): this;
|
|
354
|
+
/**
|
|
355
|
+
* @param handler {function (MouseEvent)}
|
|
356
|
+
* @param options {Object | boolean}
|
|
357
|
+
*/
|
|
358
|
+
$onmousedown(handler: (ev: MouseEvent) => void, options?: boolean | AddEventListenerOptions): this;
|
|
359
|
+
/**
|
|
360
|
+
* @param handler {function (MouseEvent)}
|
|
361
|
+
* @param options {Object | boolean}
|
|
362
|
+
*/
|
|
363
|
+
$onmouseenter(handler: (ev: MouseEvent) => void, options?: boolean | AddEventListenerOptions): this;
|
|
364
|
+
/**
|
|
365
|
+
* @param handler {function (MouseEvent)}
|
|
366
|
+
* @param options {Object | boolean}
|
|
367
|
+
*/
|
|
368
|
+
$onmouseleave(handler: (ev: MouseEvent) => void, options?: boolean | AddEventListenerOptions): this;
|
|
369
|
+
/**
|
|
370
|
+
* @param handler {function (MouseEvent)}
|
|
371
|
+
* @param options {Object | boolean}
|
|
372
|
+
*/
|
|
373
|
+
$onmousemove(handler: (ev: MouseEvent) => void, options?: boolean | AddEventListenerOptions): this;
|
|
374
|
+
/**
|
|
375
|
+
* @param handler {function (MouseEvent)}
|
|
376
|
+
* @param options {Object | boolean}
|
|
377
|
+
*/
|
|
378
|
+
$onmouseout(handler: (ev: MouseEvent) => void, options?: boolean | AddEventListenerOptions): this;
|
|
379
|
+
/**
|
|
380
|
+
* @param handler {function (MouseEvent)}
|
|
381
|
+
* @param options {Object | boolean}
|
|
382
|
+
*/
|
|
383
|
+
$onmouseover(handler: (ev: MouseEvent) => void, options?: boolean | AddEventListenerOptions): this;
|
|
384
|
+
/**
|
|
385
|
+
* @param handler {function (MouseEvent)}
|
|
386
|
+
* @param options {Object | boolean}
|
|
387
|
+
*/
|
|
388
|
+
$onmouseup(handler: (ev: MouseEvent) => void, options?: boolean | AddEventListenerOptions): this;
|
|
389
|
+
/**
|
|
390
|
+
* @param handler {function (MouseEvent)}
|
|
391
|
+
* @param options {Object | boolean}
|
|
392
|
+
*/
|
|
393
|
+
$onclick(handler: (ev: MouseEvent) => void, options?: boolean | AddEventListenerOptions): this;
|
|
394
|
+
/**
|
|
395
|
+
* @param handler {function (MouseEvent)}
|
|
396
|
+
* @param options {Object | boolean}
|
|
397
|
+
*/
|
|
398
|
+
$ondblclick(handler: (ev: MouseEvent) => void, options?: boolean | AddEventListenerOptions): this;
|
|
399
|
+
/**
|
|
400
|
+
* @param handler {function (FocusEvent)}
|
|
401
|
+
* @param options {Object | boolean}
|
|
402
|
+
*/
|
|
403
|
+
$onblur(handler: (ev: FocusEvent) => void, options?: boolean | AddEventListenerOptions): this;
|
|
404
|
+
/**
|
|
405
|
+
* @param handler {function (FocusEvent)}
|
|
406
|
+
* @param options {Object | boolean}
|
|
407
|
+
*/
|
|
408
|
+
$onfocus(handler: (ev: FocusEvent) => void, options?: boolean | AddEventListenerOptions): this;
|
|
409
|
+
/**
|
|
410
|
+
* @param handler {function (FocusEvent)}
|
|
411
|
+
* @param options {Object | boolean}
|
|
412
|
+
*/
|
|
413
|
+
$onfocusin(handler: (ev: FocusEvent) => void, options?: boolean | AddEventListenerOptions): this;
|
|
414
|
+
/**
|
|
415
|
+
* @param handler {function (FocusEvent)}
|
|
416
|
+
* @param options {Object | boolean}
|
|
417
|
+
*/
|
|
418
|
+
$onfocusout(handler: (ev: FocusEvent) => void, options?: boolean | AddEventListenerOptions): this;
|
|
419
|
+
/**
|
|
420
|
+
* @param handler {function (KeyboardEvent)}
|
|
421
|
+
* @param options {Object | boolean}
|
|
422
|
+
*/
|
|
423
|
+
$onkeydown(handler: (ev: KeyboardEvent) => void, options?: boolean | AddEventListenerOptions): this;
|
|
424
|
+
/**
|
|
425
|
+
* @param handler {function (KeyboardEvent)}
|
|
426
|
+
* @param options {Object | boolean}
|
|
427
|
+
*/
|
|
428
|
+
$onkeyup(handler: (ev: KeyboardEvent) => void, options?: boolean | AddEventListenerOptions): this;
|
|
429
|
+
/**
|
|
430
|
+
* @param handler {function (KeyboardEvent)}
|
|
431
|
+
* @param options {Object | boolean}
|
|
432
|
+
*/
|
|
433
|
+
$onkeypress(handler: (ev: KeyboardEvent) => void, options?: boolean | AddEventListenerOptions): this;
|
|
434
|
+
/**
|
|
435
|
+
* @param handler {function (TouchEvent)}
|
|
436
|
+
* @param options {Object | boolean}
|
|
437
|
+
*/
|
|
438
|
+
$ontouchstart(handler: (ev: TouchEvent) => void, options?: boolean | AddEventListenerOptions): this;
|
|
439
|
+
/**
|
|
440
|
+
* @param handler {function (TouchEvent)}
|
|
441
|
+
* @param options {Object | boolean}
|
|
442
|
+
*/
|
|
443
|
+
$ontouchmove(handler: (ev: TouchEvent) => void, options?: boolean | AddEventListenerOptions): this;
|
|
444
|
+
/**
|
|
445
|
+
* @param handler {function (TouchEvent)}
|
|
446
|
+
* @param options {Object | boolean}
|
|
447
|
+
*/
|
|
448
|
+
$ontouchend(handler: (ev: TouchEvent) => void, options?: boolean | AddEventListenerOptions): this;
|
|
449
|
+
/**
|
|
450
|
+
* @param handler {function (TouchEvent)}
|
|
451
|
+
* @param options {Object | boolean}
|
|
452
|
+
*/
|
|
453
|
+
$ontouchcancel(handler: (ev: TouchEvent) => void, options?: boolean | AddEventListenerOptions): this;
|
|
454
|
+
/**
|
|
455
|
+
* @param handler {function (WheelEvent)}
|
|
456
|
+
* @param options {Object | boolean}
|
|
457
|
+
*/
|
|
458
|
+
$onwheel(handler: (ev: WheelEvent) => void, options?: boolean | AddEventListenerOptions): this;
|
|
459
|
+
/**
|
|
460
|
+
* @param handler {function (ProgressEvent)}
|
|
461
|
+
* @param options {Object | boolean}
|
|
462
|
+
*/
|
|
463
|
+
$onabort(handler: (ev: ProgressEvent) => void, options?: boolean | AddEventListenerOptions): this;
|
|
464
|
+
/**
|
|
465
|
+
* @param handler {function (ProgressEvent)}
|
|
466
|
+
* @param options {Object | boolean}
|
|
467
|
+
*/
|
|
468
|
+
$onerror(handler: (ev: ProgressEvent) => void, options?: boolean | AddEventListenerOptions): this;
|
|
469
|
+
/**
|
|
470
|
+
* @param handler {function (ProgressEvent)}
|
|
471
|
+
* @param options {Object | boolean}
|
|
472
|
+
*/
|
|
473
|
+
$onload(handler: (ev: ProgressEvent) => void, options?: boolean | AddEventListenerOptions): this;
|
|
474
|
+
/**
|
|
475
|
+
* @param handler {function (ProgressEvent)}
|
|
476
|
+
* @param options {Object | boolean}
|
|
477
|
+
*/
|
|
478
|
+
$onloadend(handler: (ev: ProgressEvent) => void, options?: boolean | AddEventListenerOptions): this;
|
|
479
|
+
/**
|
|
480
|
+
* @param handler {function (ProgressEvent)}
|
|
481
|
+
* @param options {Object | boolean}
|
|
482
|
+
*/
|
|
483
|
+
$onloadstart(handler: (ev: ProgressEvent) => void, options?: boolean | AddEventListenerOptions): this;
|
|
484
|
+
/**
|
|
485
|
+
* @param handler {function (ProgressEvent)}
|
|
486
|
+
* @param options {Object | boolean}
|
|
487
|
+
*/
|
|
488
|
+
$onprogress(handler: (ev: ProgressEvent) => void, options?: boolean | AddEventListenerOptions): this;
|
|
489
|
+
/**
|
|
490
|
+
* @param handler {function (ProgressEvent)}
|
|
491
|
+
* @param options {Object | boolean}
|
|
492
|
+
*/
|
|
493
|
+
$ontimeout(handler: (ev: ProgressEvent) => void, options?: boolean | AddEventListenerOptions): this;
|
|
494
|
+
/**
|
|
495
|
+
* @param handler {function (DragEvent)}
|
|
496
|
+
* @param options {Object | boolean}
|
|
497
|
+
*/
|
|
498
|
+
$ondrag(handler: (ev: DragEvent) => void, options?: boolean | AddEventListenerOptions): this;
|
|
499
|
+
/**
|
|
500
|
+
* @param handler {function (DragEvent)}
|
|
501
|
+
* @param options {Object | boolean}
|
|
502
|
+
*/
|
|
503
|
+
$ondragend(handler: (ev: DragEvent) => void, options?: boolean | AddEventListenerOptions): this;
|
|
504
|
+
/**
|
|
505
|
+
* @param handler {function (DragEvent)}
|
|
506
|
+
* @param options {Object | boolean}
|
|
507
|
+
*/
|
|
508
|
+
$ondragenter(handler: (ev: DragEvent) => void, options?: boolean | AddEventListenerOptions): this;
|
|
509
|
+
/**
|
|
510
|
+
* @param handler {function (DragEvent)}
|
|
511
|
+
* @param options {Object | boolean}
|
|
512
|
+
*/
|
|
513
|
+
$ondragexit(handler: (ev: DragEvent) => void, options?: boolean | AddEventListenerOptions): this;
|
|
514
|
+
/**
|
|
515
|
+
* @param handler {function (DragEvent)}
|
|
516
|
+
* @param options {Object | boolean}
|
|
517
|
+
*/
|
|
518
|
+
$ondragleave(handler: (ev: DragEvent) => void, options?: boolean | AddEventListenerOptions): this;
|
|
519
|
+
/**
|
|
520
|
+
* @param handler {function (DragEvent)}
|
|
521
|
+
* @param options {Object | boolean}
|
|
522
|
+
*/
|
|
523
|
+
$ondragover(handler: (ev: DragEvent) => void, options?: boolean | AddEventListenerOptions): this;
|
|
524
|
+
/**
|
|
525
|
+
* @param handler {function (DragEvent)}
|
|
526
|
+
* @param options {Object | boolean}
|
|
527
|
+
*/
|
|
528
|
+
$ondragstart(handler: (ev: DragEvent) => void, options?: boolean | AddEventListenerOptions): this;
|
|
529
|
+
/**
|
|
530
|
+
* @param handler {function (DragEvent)}
|
|
531
|
+
* @param options {Object | boolean}
|
|
532
|
+
*/
|
|
533
|
+
$ondrop(handler: (ev: DragEvent) => void, options?: boolean | AddEventListenerOptions): this;
|
|
534
|
+
/**
|
|
535
|
+
* @param handler {function (PointerEvent)}
|
|
536
|
+
* @param options {Object | boolean}
|
|
537
|
+
*/
|
|
538
|
+
$onpointerover(handler: (ev: PointerEvent) => void, options?: boolean | AddEventListenerOptions): this;
|
|
539
|
+
/**
|
|
540
|
+
* @param handler {function (PointerEvent)}
|
|
541
|
+
* @param options {Object | boolean}
|
|
542
|
+
*/
|
|
543
|
+
$onpointerenter(handler: (ev: PointerEvent) => void, options?: boolean | AddEventListenerOptions): this;
|
|
544
|
+
/**
|
|
545
|
+
* @param handler {function (PointerEvent)}
|
|
546
|
+
* @param options {Object | boolean}
|
|
547
|
+
*/
|
|
548
|
+
$onpointerdown(handler: (ev: PointerEvent) => void, options?: boolean | AddEventListenerOptions): this;
|
|
549
|
+
/**
|
|
550
|
+
* @param handler {function (PointerEvent)}
|
|
551
|
+
* @param options {Object | boolean}
|
|
552
|
+
*/
|
|
553
|
+
$onpointermove(handler: (ev: PointerEvent) => void, options?: boolean | AddEventListenerOptions): this;
|
|
554
|
+
/**
|
|
555
|
+
* @param handler {function (PointerEvent)}
|
|
556
|
+
* @param options {Object | boolean}
|
|
557
|
+
*/
|
|
558
|
+
$onpointerup(handler: (ev: PointerEvent) => void, options?: boolean | AddEventListenerOptions): this;
|
|
559
|
+
/**
|
|
560
|
+
* @param handler {function (PointerEvent)}
|
|
561
|
+
* @param options {Object | boolean}
|
|
562
|
+
*/
|
|
563
|
+
$onpointercancel(handler: (ev: PointerEvent) => void, options?: boolean | AddEventListenerOptions): this;
|
|
564
|
+
/**
|
|
565
|
+
* @param handler {function (PointerEvent)}
|
|
566
|
+
* @param options {Object | boolean}
|
|
567
|
+
*/
|
|
568
|
+
$onpointerout(handler: (ev: PointerEvent) => void, options?: boolean | AddEventListenerOptions): this;
|
|
569
|
+
/**
|
|
570
|
+
* @param handler {function (PointerEvent)}
|
|
571
|
+
* @param options {Object | boolean}
|
|
572
|
+
*/
|
|
573
|
+
$onpointerleave(handler: (ev: PointerEvent) => void, options?: boolean | AddEventListenerOptions): this;
|
|
574
|
+
/**
|
|
575
|
+
* @param handler {function (PointerEvent)}
|
|
576
|
+
* @param options {Object | boolean}
|
|
577
|
+
*/
|
|
578
|
+
$ongotpointercapture(handler: (ev: PointerEvent) => void, options?: boolean | AddEventListenerOptions): this;
|
|
579
|
+
/**
|
|
580
|
+
* @param handler {function (PointerEvent)}
|
|
581
|
+
* @param options {Object | boolean}
|
|
582
|
+
*/
|
|
583
|
+
$onlostpointercapture(handler: (ev: PointerEvent) => void, options?: boolean | AddEventListenerOptions): this;
|
|
584
|
+
/**
|
|
585
|
+
* @param handler {function (AnimationEvent)}
|
|
586
|
+
* @param options {Object | boolean}
|
|
587
|
+
*/
|
|
588
|
+
$onanimationstart(handler: (ev: AnimationEvent) => void, options?: boolean | AddEventListenerOptions): this;
|
|
589
|
+
/**
|
|
590
|
+
* @param handler {function (AnimationEvent)}
|
|
591
|
+
* @param options {Object | boolean}
|
|
592
|
+
*/
|
|
593
|
+
$onanimationend(handler: (ev: AnimationEvent) => void, options?: boolean | AddEventListenerOptions): this;
|
|
594
|
+
/**
|
|
595
|
+
* @param handler {function (AnimationEvent)}
|
|
596
|
+
* @param options {Object | boolean}
|
|
597
|
+
*/
|
|
598
|
+
$onanimationiteraton(handler: (ev: AnimationEvent) => void, options?: boolean | AddEventListenerOptions): this;
|
|
599
|
+
/**
|
|
600
|
+
* @param handler {function (ClipboardEvent)}
|
|
601
|
+
* @param options {Object | boolean}
|
|
602
|
+
*/
|
|
603
|
+
$onclipboardchange(handler: (ev: ClipboardEvent) => void, options?: boolean | AddEventListenerOptions): this;
|
|
604
|
+
/**
|
|
605
|
+
* @param handler {function (ClipboardEvent)}
|
|
606
|
+
* @param options {Object | boolean}
|
|
607
|
+
*/
|
|
608
|
+
$oncut(handler: (ev: ClipboardEvent) => void, options?: boolean | AddEventListenerOptions): this;
|
|
609
|
+
/**
|
|
610
|
+
* @param handler {function (ClipboardEvent)}
|
|
611
|
+
* @param options {Object | boolean}
|
|
612
|
+
*/
|
|
613
|
+
$oncopy(handler: (ev: ClipboardEvent) => void, options?: boolean | AddEventListenerOptions): this;
|
|
614
|
+
/**
|
|
615
|
+
* @param handler {function (ClipboardEvent)}
|
|
616
|
+
* @param options {Object | boolean}
|
|
617
|
+
*/
|
|
618
|
+
$onpaste(handler: (ev: ClipboardEvent) => void, options?: boolean | AddEventListenerOptions): this;
|
|
619
|
+
$$insertAdjacent(node: Node): void;
|
|
620
|
+
/**
|
|
621
|
+
* A v-show & ngShow alternative
|
|
622
|
+
* @param cond {IValue} show condition
|
|
623
|
+
*/
|
|
624
|
+
$bindShow(cond: IValue<boolean>): this;
|
|
625
|
+
/**
|
|
626
|
+
* bind HTML
|
|
627
|
+
* @param value {IValue}
|
|
628
|
+
*/
|
|
629
|
+
$html(value: IValue<string>): void;
|
|
630
|
+
}
|
|
631
|
+
/**
|
|
632
|
+
* Represents an Vasille.js HTML element node
|
|
633
|
+
* @class Tag
|
|
634
|
+
* @extends INode
|
|
635
|
+
*/
|
|
636
|
+
export declare class Tag extends INode {
|
|
637
|
+
constructor();
|
|
638
|
+
$preinit(app: AppNode, parent: Fragment, tagName?: string): void;
|
|
639
|
+
protected $$findFirstChild(): Node;
|
|
640
|
+
$$insertAdjacent(node: Node): void;
|
|
641
|
+
$$appendNode(node: Node): void;
|
|
642
|
+
/**
|
|
643
|
+
* Mount/Unmount a node
|
|
644
|
+
* @param cond {IValue} show condition
|
|
645
|
+
*/
|
|
646
|
+
$bindMount(cond: IValue<boolean>): this;
|
|
647
|
+
/**
|
|
648
|
+
* Runs GC
|
|
649
|
+
*/
|
|
650
|
+
$destroy(): void;
|
|
651
|
+
}
|
|
652
|
+
/**
|
|
653
|
+
* Represents a vasille extension node
|
|
654
|
+
* @class Extension
|
|
655
|
+
* @extends INode
|
|
656
|
+
*/
|
|
657
|
+
export declare class Extension extends INode {
|
|
658
|
+
$preinit(app: AppNode, parent: Fragment): void;
|
|
659
|
+
constructor($?: INodePrivate);
|
|
660
|
+
$destroy(): void;
|
|
661
|
+
}
|
|
662
|
+
/**
|
|
663
|
+
* Node which cas has just a child
|
|
664
|
+
* @class Component
|
|
665
|
+
* @extends Extension
|
|
666
|
+
*/
|
|
667
|
+
export declare class Component extends Extension {
|
|
668
|
+
constructor();
|
|
669
|
+
$mounted(): void;
|
|
670
|
+
}
|
|
671
|
+
/**
|
|
672
|
+
* Private part of switch node
|
|
673
|
+
* @class SwitchedNodePrivate
|
|
674
|
+
* @extends INodePrivate
|
|
675
|
+
*/
|
|
676
|
+
export declare class SwitchedNodePrivate extends INodePrivate {
|
|
677
|
+
/**
|
|
678
|
+
* Index of current true condition
|
|
679
|
+
* @type number
|
|
680
|
+
*/
|
|
681
|
+
index: number;
|
|
682
|
+
/**
|
|
683
|
+
* The unique child which can be absent
|
|
684
|
+
* @type Extension
|
|
685
|
+
*/
|
|
686
|
+
fragment?: Fragment;
|
|
687
|
+
/**
|
|
688
|
+
* Array of possible cases
|
|
689
|
+
* @type {Array<{cond : IValue<boolean>, cb : function(Fragment)}>}
|
|
690
|
+
*/
|
|
691
|
+
cases: {
|
|
692
|
+
cond: IValue<boolean>;
|
|
693
|
+
cb: (node: Fragment) => void;
|
|
694
|
+
}[];
|
|
695
|
+
/**
|
|
696
|
+
* A function which sync index and content, will be bounded to each condition
|
|
697
|
+
* @type {Function}
|
|
698
|
+
*/
|
|
699
|
+
sync: () => void;
|
|
700
|
+
constructor();
|
|
701
|
+
/**
|
|
702
|
+
* Runs GC
|
|
703
|
+
*/
|
|
704
|
+
$destroy(): void;
|
|
705
|
+
}
|
|
706
|
+
/**
|
|
707
|
+
* The private part of a text node
|
|
708
|
+
*/
|
|
709
|
+
export declare class DebugPrivate extends FragmentPrivate {
|
|
710
|
+
node: Comment;
|
|
711
|
+
constructor();
|
|
712
|
+
/**
|
|
713
|
+
* Pre-initializes a text node
|
|
714
|
+
* @param app {App} the app node
|
|
715
|
+
* @param parent {Fragment} parent node
|
|
716
|
+
* @param text {String | IValue}
|
|
717
|
+
*/
|
|
718
|
+
preinitComment(app: AppNode, parent: Fragment, text: IValue<string>): void;
|
|
719
|
+
/**
|
|
720
|
+
* Clear node data
|
|
721
|
+
*/
|
|
722
|
+
$destroy(): void;
|
|
723
|
+
}
|
|
724
|
+
/**
|
|
725
|
+
* Represents a debug node
|
|
726
|
+
* @class DebugNode
|
|
727
|
+
* @extends Fragment
|
|
728
|
+
*/
|
|
729
|
+
export declare class DebugNode extends Fragment {
|
|
730
|
+
/**
|
|
731
|
+
* private data
|
|
732
|
+
* @type {DebugNode}
|
|
733
|
+
*/
|
|
734
|
+
protected $: DebugPrivate;
|
|
735
|
+
constructor();
|
|
736
|
+
$preinit(app: AppNode, parent: Fragment, text?: IValue<string>): void;
|
|
737
|
+
/**
|
|
738
|
+
* Runs garbage collector
|
|
739
|
+
*/
|
|
740
|
+
$destroy(): void;
|
|
741
|
+
}
|