marko 5.37.46 → 5.37.48
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/node_modules/@internal/components-entry/index.js +17 -10
- package/dist/node_modules/@internal/components-entry-legacy/index-browser.js +3 -3
- package/dist/node_modules/@internal/components-registry/index-browser.js +33 -33
- package/dist/node_modules/@internal/components-registry/index.js +2 -2
- package/dist/node_modules/@internal/components-util/index-browser.js +16 -16
- package/dist/node_modules/@internal/components-util/index.js +4 -4
- package/dist/node_modules/@internal/create-readable/index-browser.js +1 -1
- package/dist/node_modules/@internal/create-readable/index.js +9 -9
- package/dist/node_modules/@internal/preserve-tag/index-browser.js +5 -5
- package/dist/node_modules/@internal/preserve-tag/index.js +1 -1
- package/dist/node_modules/@internal/set-immediate/index-browser.js +1 -1
- package/dist/node_modules/@internal/set-immediate/index-worker.js +2 -2
- package/dist/node_modules/@internal/set-immediate/index.js +2 -2
- package/dist/runtime/RenderResult.js +3 -3
- package/dist/runtime/components/Component.js +95 -95
- package/dist/runtime/components/ComponentDef.js +18 -18
- package/dist/runtime/components/ComponentsContext.js +3 -3
- package/dist/runtime/components/GlobalComponentsContext.js +3 -3
- package/dist/runtime/components/KeySequence.js +3 -3
- package/dist/runtime/components/ServerComponent.js +1 -1
- package/dist/runtime/components/State.js +19 -19
- package/dist/runtime/components/attach-detach.js +7 -7
- package/dist/runtime/components/dom-data.js +5 -5
- package/dist/runtime/components/event-delegation.js +9 -9
- package/dist/runtime/components/legacy/defineRenderer-legacy.js +11 -11
- package/dist/runtime/components/legacy/dependencies/index.js +7 -7
- package/dist/runtime/components/legacy/renderer-legacy.js +28 -28
- package/dist/runtime/components/renderer.js +27 -27
- package/dist/runtime/components/update-manager.js +4 -4
- package/dist/runtime/createOut.js +1 -1
- package/dist/runtime/dom-insert.js +5 -5
- package/dist/runtime/helpers/_change-case.js +2 -2
- package/dist/runtime/helpers/dynamic-tag.js +9 -9
- package/dist/runtime/helpers/render-tag.js +1 -1
- package/dist/runtime/helpers/serialize-noop.js +1 -1
- package/dist/runtime/helpers/style-value.js +1 -1
- package/dist/runtime/helpers/tags-compat/runtime-dom.js +23 -23
- package/dist/runtime/helpers/tags-compat/runtime-html.js +67 -24
- package/dist/runtime/html/AsyncStream.js +20 -20
- package/dist/runtime/html/BufferedWriter.js +2 -2
- package/dist/runtime/html/helpers/_dynamic-attr.js +2 -2
- package/dist/runtime/html/helpers/attr.js +2 -2
- package/dist/runtime/html/helpers/data-marko.js +1 -1
- package/dist/runtime/html/helpers/escape-xml.js +1 -1
- package/dist/runtime/html/index.js +1 -1
- package/dist/runtime/renderable.js +3 -3
- package/dist/runtime/vdom/AsyncVDOMBuilder.js +83 -83
- package/dist/runtime/vdom/VComment.js +7 -7
- package/dist/runtime/vdom/VComponent.js +4 -4
- package/dist/runtime/vdom/VDocumentFragment.js +6 -6
- package/dist/runtime/vdom/VElement.js +36 -36
- package/dist/runtime/vdom/VFragment.js +9 -9
- package/dist/runtime/vdom/VNode.js +33 -33
- package/dist/runtime/vdom/VText.js +8 -8
- package/dist/runtime/vdom/helpers/const-element.js +3 -3
- package/dist/runtime/vdom/hot-reload.js +14 -14
- package/dist/runtime/vdom/index.js +1 -1
- package/dist/runtime/vdom/morphdom/fragment.js +5 -5
- package/dist/runtime/vdom/morphdom/helpers.js +5 -5
- package/dist/runtime/vdom/morphdom/index.js +68 -68
- package/dist/runtime/vdom/vdom.js +15 -15
- package/dist/translator/util/get-component-files.js +1 -1
- package/index.d.ts +1 -1
- package/package.json +1 -1
- package/src/node_modules/@internal/components-entry/index.js +19 -12
- package/src/runtime/helpers/tags-compat/runtime-dom.js +3 -3
- package/src/runtime/helpers/tags-compat/runtime-html.js +66 -23
- package/tags-html.d.ts +1 -1
@@ -3,21 +3,21 @@ var RenderResult = require("../RenderResult");
|
|
3
3
|
var attrsHelper = require("./helpers/attrs");
|
4
4
|
var morphdom = require("./morphdom");
|
5
5
|
var vdom = require("./vdom");
|
6
|
-
var VElement = vdom.
|
7
|
-
var VComment = vdom.
|
8
|
-
var VDocumentFragment = vdom.
|
9
|
-
var VText = vdom.
|
10
|
-
var VComponent = vdom.
|
11
|
-
var VFragment = vdom.
|
12
|
-
var virtualizeHTML = vdom.
|
6
|
+
var VElement = vdom.by_;
|
7
|
+
var VComment = vdom.bz_;
|
8
|
+
var VDocumentFragment = vdom.bA_;
|
9
|
+
var VText = vdom.bB_;
|
10
|
+
var VComponent = vdom.bC_;
|
11
|
+
var VFragment = vdom.bD_;
|
12
|
+
var virtualizeHTML = vdom.bE_;
|
13
13
|
|
14
14
|
var EVENT_UPDATE = "update";
|
15
15
|
var EVENT_FINISH = "finish";
|
16
16
|
|
17
17
|
function State(tree) {
|
18
|
-
this.
|
19
|
-
this.
|
20
|
-
this.
|
18
|
+
this.bF_ = new EventEmitter();
|
19
|
+
this.bG_ = tree;
|
20
|
+
this.bH_ = false;
|
21
21
|
}
|
22
22
|
|
23
23
|
function AsyncVDOMBuilder(globalData, parentNode, parentOut) {
|
@@ -33,44 +33,44 @@ function AsyncVDOMBuilder(globalData, parentNode, parentOut) {
|
|
33
33
|
state = new State(parentNode);
|
34
34
|
}
|
35
35
|
|
36
|
-
this.
|
37
|
-
this.
|
38
|
-
this.
|
39
|
-
this.
|
36
|
+
this.bI_ = 1;
|
37
|
+
this.bJ_ = 0;
|
38
|
+
this.bK_ = null;
|
39
|
+
this.bL_ = parentOut;
|
40
40
|
|
41
41
|
this.data = {};
|
42
42
|
this.z_ = state;
|
43
|
-
this.
|
43
|
+
this.ac_ = parentNode;
|
44
44
|
this.global = globalData || {};
|
45
|
-
this.
|
46
|
-
this.
|
47
|
-
this.
|
45
|
+
this.bM_ = [parentNode];
|
46
|
+
this.bN_ = false;
|
47
|
+
this.bO_ = undefined;
|
48
48
|
this.b_ = null;
|
49
49
|
|
50
|
-
this.a__ = null;
|
51
50
|
this.aa_ = null;
|
52
|
-
this.
|
51
|
+
this.ab_ = null;
|
52
|
+
this.bd_ = null;
|
53
53
|
}
|
54
54
|
|
55
55
|
var proto = AsyncVDOMBuilder.prototype = {
|
56
|
-
|
56
|
+
bu_: true,
|
57
57
|
B_: typeof document === "object" && document,
|
58
58
|
|
59
59
|
bc: function (component, key, ownerComponent) {
|
60
60
|
var vComponent = new VComponent(component, key, ownerComponent);
|
61
|
-
return this.
|
61
|
+
return this.bP_(vComponent, 0, true);
|
62
62
|
},
|
63
63
|
|
64
|
-
|
64
|
+
be_: function (component, key, ownerComponent) {
|
65
65
|
var vComponent = new VComponent(component, key, ownerComponent, true);
|
66
|
-
this.
|
66
|
+
this.bP_(vComponent, 0);
|
67
67
|
},
|
68
68
|
|
69
|
-
|
70
|
-
this.
|
69
|
+
bP_: function (child, childCount, pushToStack) {
|
70
|
+
this.ac_.bQ_(child);
|
71
71
|
if (pushToStack === true) {
|
72
|
-
this.
|
73
|
-
this.
|
72
|
+
this.bM_.push(child);
|
73
|
+
this.ac_ = child;
|
74
74
|
}
|
75
75
|
return childCount === 0 ? this : child;
|
76
76
|
},
|
@@ -85,10 +85,10 @@ var proto = AsyncVDOMBuilder.prototype = {
|
|
85
85
|
flags,
|
86
86
|
props
|
87
87
|
);
|
88
|
-
return this.
|
88
|
+
return this.bP_(element, childCount);
|
89
89
|
},
|
90
90
|
|
91
|
-
|
91
|
+
bn_: function (tagName, attrs, key, componentDef, props) {
|
92
92
|
return this.element(
|
93
93
|
tagName,
|
94
94
|
attrsHelper(attrs),
|
@@ -103,15 +103,15 @@ var proto = AsyncVDOMBuilder.prototype = {
|
|
103
103
|
n: function (node, component) {
|
104
104
|
// NOTE: We do a shallow clone since we assume the node is being reused
|
105
105
|
// and a node can only have one parent node.
|
106
|
-
var clone = node.
|
106
|
+
var clone = node.bR_();
|
107
107
|
this.node(clone);
|
108
|
-
clone.
|
108
|
+
clone._N_ = component;
|
109
109
|
|
110
110
|
return this;
|
111
111
|
},
|
112
112
|
|
113
113
|
node: function (node) {
|
114
|
-
this.
|
114
|
+
this.ac_.bQ_(node);
|
115
115
|
return this;
|
116
116
|
},
|
117
117
|
|
@@ -130,7 +130,7 @@ var proto = AsyncVDOMBuilder.prototype = {
|
|
130
130
|
text = text.toString();
|
131
131
|
}
|
132
132
|
|
133
|
-
this.
|
133
|
+
this.ac_.bQ_(new VText(text, ownerComponent));
|
134
134
|
return this;
|
135
135
|
},
|
136
136
|
|
@@ -165,11 +165,11 @@ var proto = AsyncVDOMBuilder.prototype = {
|
|
165
165
|
flags,
|
166
166
|
props
|
167
167
|
);
|
168
|
-
this.
|
168
|
+
this.bP_(element, childCount, true);
|
169
169
|
return this;
|
170
170
|
},
|
171
171
|
|
172
|
-
|
172
|
+
bl_: function (tagName, attrs, key, componentDef, props) {
|
173
173
|
return this.beginElement(
|
174
174
|
tagName,
|
175
175
|
attrsHelper(attrs),
|
@@ -183,7 +183,7 @@ var proto = AsyncVDOMBuilder.prototype = {
|
|
183
183
|
|
184
184
|
bf: function (key, component, preserve) {
|
185
185
|
var fragment = new VFragment(key, component, preserve);
|
186
|
-
this.
|
186
|
+
this.bP_(fragment, null, true);
|
187
187
|
return this;
|
188
188
|
},
|
189
189
|
|
@@ -192,52 +192,52 @@ var proto = AsyncVDOMBuilder.prototype = {
|
|
192
192
|
},
|
193
193
|
|
194
194
|
endElement: function () {
|
195
|
-
var stack = this.
|
195
|
+
var stack = this.bM_;
|
196
196
|
stack.pop();
|
197
|
-
this.
|
197
|
+
this.ac_ = stack[stack.length - 1];
|
198
198
|
},
|
199
199
|
|
200
200
|
end: function () {
|
201
|
-
this.
|
201
|
+
this.ac_ = undefined;
|
202
202
|
|
203
|
-
var remaining = --this.
|
204
|
-
var parentOut = this.
|
203
|
+
var remaining = --this.bI_;
|
204
|
+
var parentOut = this.bL_;
|
205
205
|
|
206
206
|
if (remaining === 0) {
|
207
207
|
if (parentOut) {
|
208
|
-
parentOut.
|
208
|
+
parentOut.bS_();
|
209
209
|
} else {
|
210
|
-
this.
|
210
|
+
this.bT_();
|
211
211
|
}
|
212
|
-
} else if (remaining - this.
|
213
|
-
this.
|
212
|
+
} else if (remaining - this.bJ_ === 0) {
|
213
|
+
this.bU_();
|
214
214
|
}
|
215
215
|
|
216
216
|
return this;
|
217
217
|
},
|
218
218
|
|
219
|
-
|
220
|
-
var remaining = --this.
|
219
|
+
bS_: function () {
|
220
|
+
var remaining = --this.bI_;
|
221
221
|
|
222
222
|
if (remaining === 0) {
|
223
|
-
var parentOut = this.
|
223
|
+
var parentOut = this.bL_;
|
224
224
|
if (parentOut) {
|
225
|
-
parentOut.
|
225
|
+
parentOut.bS_();
|
226
226
|
} else {
|
227
|
-
this.
|
227
|
+
this.bT_();
|
228
228
|
}
|
229
|
-
} else if (remaining - this.
|
230
|
-
this.
|
229
|
+
} else if (remaining - this.bJ_ === 0) {
|
230
|
+
this.bU_();
|
231
231
|
}
|
232
232
|
},
|
233
233
|
|
234
|
-
|
234
|
+
bT_: function () {
|
235
235
|
var state = this.z_;
|
236
|
-
state.
|
237
|
-
state.
|
236
|
+
state.bH_ = true;
|
237
|
+
state.bF_.emit(EVENT_FINISH, this.n_());
|
238
238
|
},
|
239
239
|
|
240
|
-
|
240
|
+
bU_: function () {
|
241
241
|
var lastArray = this._last;
|
242
242
|
|
243
243
|
var i = 0;
|
@@ -272,7 +272,7 @@ var proto = AsyncVDOMBuilder.prototype = {
|
|
272
272
|
},
|
273
273
|
|
274
274
|
beginAsync: function (options) {
|
275
|
-
if (this.
|
275
|
+
if (this.bN_) {
|
276
276
|
throw Error(
|
277
277
|
"Tried to render async while in sync mode. Note: Client side await is not currently supported in re-renders (Issue: #942)."
|
278
278
|
);
|
@@ -282,16 +282,16 @@ var proto = AsyncVDOMBuilder.prototype = {
|
|
282
282
|
|
283
283
|
if (options) {
|
284
284
|
if (options.last) {
|
285
|
-
this.
|
285
|
+
this.bJ_++;
|
286
286
|
}
|
287
287
|
}
|
288
288
|
|
289
|
-
this.
|
289
|
+
this.bI_++;
|
290
290
|
|
291
|
-
var documentFragment = this.
|
291
|
+
var documentFragment = this.ac_.bV_();
|
292
292
|
var asyncOut = new AsyncVDOMBuilder(this.global, documentFragment, this);
|
293
293
|
|
294
|
-
state.
|
294
|
+
state.bF_.emit("beginAsync", {
|
295
295
|
out: asyncOut,
|
296
296
|
parentOut: this
|
297
297
|
});
|
@@ -304,30 +304,30 @@ var proto = AsyncVDOMBuilder.prototype = {
|
|
304
304
|
},
|
305
305
|
|
306
306
|
flush: function () {
|
307
|
-
var events = this.z_.
|
307
|
+
var events = this.z_.bF_;
|
308
308
|
|
309
309
|
if (events.listenerCount(EVENT_UPDATE)) {
|
310
310
|
events.emit(EVENT_UPDATE, new RenderResult(this));
|
311
311
|
}
|
312
312
|
},
|
313
313
|
|
314
|
-
|
315
|
-
return this.z_.
|
314
|
+
ai_: function () {
|
315
|
+
return this.z_.bG_;
|
316
316
|
},
|
317
317
|
|
318
318
|
n_: function () {
|
319
|
-
return this.
|
319
|
+
return this.bW_ || (this.bW_ = new RenderResult(this));
|
320
320
|
},
|
321
321
|
|
322
322
|
on: function (event, callback) {
|
323
323
|
var state = this.z_;
|
324
324
|
|
325
|
-
if (event === EVENT_FINISH && state.
|
325
|
+
if (event === EVENT_FINISH && state.bH_) {
|
326
326
|
callback(this.n_());
|
327
327
|
} else if (event === "last") {
|
328
328
|
this.onLast(callback);
|
329
329
|
} else {
|
330
|
-
state.
|
330
|
+
state.bF_.on(event, callback);
|
331
331
|
}
|
332
332
|
|
333
333
|
return this;
|
@@ -336,19 +336,19 @@ var proto = AsyncVDOMBuilder.prototype = {
|
|
336
336
|
once: function (event, callback) {
|
337
337
|
var state = this.z_;
|
338
338
|
|
339
|
-
if (event === EVENT_FINISH && state.
|
339
|
+
if (event === EVENT_FINISH && state.bH_) {
|
340
340
|
callback(this.n_());
|
341
341
|
} else if (event === "last") {
|
342
342
|
this.onLast(callback);
|
343
343
|
} else {
|
344
|
-
state.
|
344
|
+
state.bF_.once(event, callback);
|
345
345
|
}
|
346
346
|
|
347
347
|
return this;
|
348
348
|
},
|
349
349
|
|
350
350
|
emit: function (type, arg) {
|
351
|
-
var events = this.z_.
|
351
|
+
var events = this.z_.bF_;
|
352
352
|
switch (arguments.length) {
|
353
353
|
case 1:
|
354
354
|
events.emit(type);
|
@@ -364,17 +364,17 @@ var proto = AsyncVDOMBuilder.prototype = {
|
|
364
364
|
},
|
365
365
|
|
366
366
|
removeListener: function () {
|
367
|
-
var events = this.z_.
|
367
|
+
var events = this.z_.bF_;
|
368
368
|
events.removeListener.apply(events, arguments);
|
369
369
|
return this;
|
370
370
|
},
|
371
371
|
|
372
372
|
sync: function () {
|
373
|
-
this.
|
373
|
+
this.bN_ = true;
|
374
374
|
},
|
375
375
|
|
376
376
|
isSync: function () {
|
377
|
-
return this.
|
377
|
+
return this.bN_;
|
378
378
|
},
|
379
379
|
|
380
380
|
onLast: function (callback) {
|
@@ -389,20 +389,20 @@ var proto = AsyncVDOMBuilder.prototype = {
|
|
389
389
|
return this;
|
390
390
|
},
|
391
391
|
|
392
|
-
|
393
|
-
var node = this.
|
392
|
+
ah_: function (host) {
|
393
|
+
var node = this.bO_;
|
394
394
|
if (!node) {
|
395
|
-
var vdomTree = this.
|
395
|
+
var vdomTree = this.ai_();
|
396
396
|
|
397
397
|
if (!host) host = this.B_;
|
398
|
-
this.
|
398
|
+
this.bO_ = node = vdomTree.bq_(host, null);
|
399
399
|
morphdom(node, vdomTree, host, this.b_);
|
400
400
|
}
|
401
401
|
return node;
|
402
402
|
},
|
403
403
|
|
404
404
|
toString: function (host) {
|
405
|
-
var docFragment = this.
|
405
|
+
var docFragment = this.ah_(host);
|
406
406
|
var html = "";
|
407
407
|
|
408
408
|
var child = docFragment.firstChild;
|
@@ -441,15 +441,15 @@ var proto = AsyncVDOMBuilder.prototype = {
|
|
441
441
|
isVDOM: true,
|
442
442
|
|
443
443
|
c: function (componentDef, key, customEvents) {
|
444
|
-
this.
|
445
|
-
this.
|
446
|
-
this.
|
444
|
+
this.aa_ = componentDef;
|
445
|
+
this.ab_ = key;
|
446
|
+
this.bd_ = customEvents;
|
447
447
|
}
|
448
448
|
};
|
449
449
|
|
450
450
|
proto.e = proto.element;
|
451
451
|
proto.be = proto.beginElement;
|
452
|
-
proto.ee = proto.
|
452
|
+
proto.ee = proto.bm_ = proto.endElement;
|
453
453
|
proto.t = proto.text;
|
454
454
|
proto.h = proto.w = proto.write = proto.html;
|
455
455
|
|
@@ -2,20 +2,20 @@
|
|
2
2
|
var inherit = require("raptor-util/inherit");
|
3
3
|
|
4
4
|
function VComment(value, ownerComponent) {
|
5
|
-
this.
|
6
|
-
this.
|
5
|
+
this.bX_(-1 /* no children */, ownerComponent);
|
6
|
+
this.bY_ = value;
|
7
7
|
}
|
8
8
|
|
9
9
|
VComment.prototype = {
|
10
|
-
|
10
|
+
bZ_: 8,
|
11
11
|
|
12
|
-
|
13
|
-
var nodeValue = this.
|
12
|
+
bq_: function (host) {
|
13
|
+
var nodeValue = this.bY_;
|
14
14
|
return (host.ownerDocument || host).createComment(nodeValue);
|
15
15
|
},
|
16
16
|
|
17
|
-
|
18
|
-
return new VComment(this.
|
17
|
+
bR_: function () {
|
18
|
+
return new VComment(this.bY_);
|
19
19
|
}
|
20
20
|
};
|
21
21
|
|
@@ -2,14 +2,14 @@
|
|
2
2
|
var VNode = require("./VNode");
|
3
3
|
|
4
4
|
function VComponent(component, key, ownerComponent, preserve) {
|
5
|
-
this.
|
6
|
-
this.
|
5
|
+
this.bX_(null /* childCount */, ownerComponent);
|
6
|
+
this.c__ = key;
|
7
7
|
this.s_ = component;
|
8
|
-
this.
|
8
|
+
this.ae_ = preserve;
|
9
9
|
}
|
10
10
|
|
11
11
|
VComponent.prototype = {
|
12
|
-
|
12
|
+
bZ_: 2
|
13
13
|
};
|
14
14
|
|
15
15
|
inherit(VComponent, VNode);
|
@@ -4,25 +4,25 @@ var VNode = require("./VNode");
|
|
4
4
|
|
5
5
|
function VDocumentFragmentClone(other) {
|
6
6
|
extend(this, other);
|
7
|
-
this.c__ = null;
|
8
7
|
this.ca_ = null;
|
8
|
+
this.cb_ = null;
|
9
9
|
}
|
10
10
|
|
11
11
|
function VDocumentFragment(out) {
|
12
|
-
this.
|
12
|
+
this.bX_(null /* childCount */);
|
13
13
|
this.r_ = out;
|
14
14
|
}
|
15
15
|
|
16
16
|
VDocumentFragment.prototype = {
|
17
|
-
|
17
|
+
bZ_: 11,
|
18
18
|
|
19
|
-
|
19
|
+
cc_: true,
|
20
20
|
|
21
|
-
|
21
|
+
bR_: function () {
|
22
22
|
return new VDocumentFragmentClone(this);
|
23
23
|
},
|
24
24
|
|
25
|
-
|
25
|
+
bq_: function (host) {
|
26
26
|
return (host.ownerDocument || host).createDocumentFragment();
|
27
27
|
}
|
28
28
|
};
|
@@ -3,7 +3,7 @@
|
|
3
3
|
var inherit = require("raptor-util/inherit");
|
4
4
|
var componentsUtil = require("@internal/components-util");
|
5
5
|
var domData = require("../components/dom-data");
|
6
|
-
var vElementByDOMNode = domData.
|
6
|
+
var vElementByDOMNode = domData._L_;
|
7
7
|
var VNode = require("./VNode");
|
8
8
|
var isTextOnly = require("./is-text-only");
|
9
9
|
var ATTR_XLINK_HREF = "xlink:href";
|
@@ -81,17 +81,17 @@ function assign(a, b) {
|
|
81
81
|
}
|
82
82
|
|
83
83
|
function VElementClone(other) {
|
84
|
-
this.
|
85
|
-
this.c__ = null;
|
84
|
+
this.cd_ = other.cd_;
|
86
85
|
this.ca_ = null;
|
86
|
+
this.cb_ = null;
|
87
87
|
|
88
|
-
this.
|
89
|
-
this.cd_ = other.cd_;
|
90
|
-
this._O_ = other._O_;
|
88
|
+
this.c__ = other.c__;
|
91
89
|
this.ce_ = other.ce_;
|
92
|
-
this.
|
90
|
+
this._P_ = other._P_;
|
93
91
|
this.cf_ = other.cf_;
|
92
|
+
this.u_ = other.u_;
|
94
93
|
this.cg_ = other.cg_;
|
94
|
+
this.ch_ = other.ch_;
|
95
95
|
}
|
96
96
|
|
97
97
|
function VElement(
|
@@ -103,7 +103,7 @@ childCount,
|
|
103
103
|
flags,
|
104
104
|
props)
|
105
105
|
{
|
106
|
-
this.
|
106
|
+
this.bX_(childCount, ownerComponent);
|
107
107
|
|
108
108
|
var constId;
|
109
109
|
|
@@ -111,21 +111,21 @@ props)
|
|
111
111
|
constId = props.i;
|
112
112
|
}
|
113
113
|
|
114
|
-
this.
|
114
|
+
this.c__ = key;
|
115
115
|
this.u_ = flags || 0;
|
116
|
-
this.
|
117
|
-
this.
|
118
|
-
this.
|
119
|
-
this.
|
120
|
-
this.
|
116
|
+
this.ce_ = attrs || EMPTY_OBJECT;
|
117
|
+
this._P_ = props || EMPTY_OBJECT;
|
118
|
+
this.cf_ = tagName;
|
119
|
+
this.cg_ = "";
|
120
|
+
this.ch_ = constId;
|
121
|
+
this.ae_ = false;
|
121
122
|
this.ad_ = false;
|
122
|
-
this.ac_ = false;
|
123
123
|
}
|
124
124
|
|
125
125
|
VElement.prototype = {
|
126
|
-
|
126
|
+
bZ_: 1,
|
127
127
|
|
128
|
-
|
128
|
+
bR_: function () {
|
129
129
|
return new VElementClone(this);
|
130
130
|
},
|
131
131
|
|
@@ -137,7 +137,7 @@ VElement.prototype = {
|
|
137
137
|
* @param {int|null} childCount The number of child nodes (or `null` if not known)
|
138
138
|
*/
|
139
139
|
e: function (tagName, attrs, key, ownerComponent, childCount, flags, props) {
|
140
|
-
var child = this.
|
140
|
+
var child = this.bQ_(
|
141
141
|
new VElement(
|
142
142
|
tagName,
|
143
143
|
attrs,
|
@@ -150,7 +150,7 @@ VElement.prototype = {
|
|
150
150
|
);
|
151
151
|
|
152
152
|
if (childCount === 0) {
|
153
|
-
return this.
|
153
|
+
return this.ci_();
|
154
154
|
} else {
|
155
155
|
return child;
|
156
156
|
}
|
@@ -163,15 +163,15 @@ VElement.prototype = {
|
|
163
163
|
* @param {String} value The value for the new Comment node
|
164
164
|
*/
|
165
165
|
n: function (node, ownerComponent) {
|
166
|
-
node = node.
|
167
|
-
node.
|
168
|
-
this.
|
169
|
-
return this.
|
166
|
+
node = node.bR_();
|
167
|
+
node._N_ = ownerComponent;
|
168
|
+
this.bQ_(node);
|
169
|
+
return this.ci_();
|
170
170
|
},
|
171
171
|
|
172
|
-
|
173
|
-
var tagName = this.
|
174
|
-
var attributes = this.
|
172
|
+
bq_: function (host, parentNamespaceURI) {
|
173
|
+
var tagName = this.cf_;
|
174
|
+
var attributes = this.ce_;
|
175
175
|
var namespaceURI = DEFAULT_NS[tagName] || parentNamespaceURI || NS_HTML;
|
176
176
|
|
177
177
|
var flags = this.u_;
|
@@ -196,7 +196,7 @@ VElement.prototype = {
|
|
196
196
|
}
|
197
197
|
|
198
198
|
if (isTextOnly(tagName)) {
|
199
|
-
el.textContent = this.
|
199
|
+
el.textContent = this.cg_;
|
200
200
|
}
|
201
201
|
}
|
202
202
|
|
@@ -224,7 +224,7 @@ function virtualizeElement(node, virtualizeChildNodes, ownerComponent) {
|
|
224
224
|
var attrName = attr.name;
|
225
225
|
if (!xmlnsRegExp.test(attrName)) {
|
226
226
|
if (attrName === "data-marko") {
|
227
|
-
props = componentsUtil.
|
227
|
+
props = componentsUtil._s_(node);
|
228
228
|
} else if (attr.namespaceURI === NS_XLINK) {
|
229
229
|
attrs[ATTR_XLINK_HREF] = attr.value;
|
230
230
|
} else {
|
@@ -251,7 +251,7 @@ function virtualizeElement(node, virtualizeChildNodes, ownerComponent) {
|
|
251
251
|
);
|
252
252
|
|
253
253
|
if (isTextOnly(tagName)) {
|
254
|
-
vdomEl.
|
254
|
+
vdomEl.cg_ = node.textContent;
|
255
255
|
} else if (virtualizeChildNodes) {
|
256
256
|
virtualizeChildNodes(node, vdomEl, ownerComponent);
|
257
257
|
}
|
@@ -259,18 +259,18 @@ function virtualizeElement(node, virtualizeChildNodes, ownerComponent) {
|
|
259
259
|
return vdomEl;
|
260
260
|
}
|
261
261
|
|
262
|
-
VElement.
|
262
|
+
VElement.cj_ = virtualizeElement;
|
263
263
|
|
264
|
-
VElement.
|
264
|
+
VElement.ck_ = function (fromEl, vFromEl, toEl) {
|
265
265
|
var fromFlags = vFromEl.u_;
|
266
266
|
var toFlags = toEl.u_;
|
267
|
-
var attrs = toEl.
|
267
|
+
var attrs = toEl.ce_;
|
268
268
|
|
269
269
|
if (toFlags & FLAG_CUSTOM_ELEMENT) {
|
270
270
|
return assign(fromEl, attrs);
|
271
271
|
}
|
272
272
|
|
273
|
-
var props = toEl.
|
273
|
+
var props = toEl._P_;
|
274
274
|
var attrName;
|
275
275
|
|
276
276
|
// We use expando properties to associate the previous HTML
|
@@ -281,7 +281,7 @@ VElement.cj_ = function (fromEl, vFromEl, toEl) {
|
|
281
281
|
// real VElement node will not have the expando property
|
282
282
|
// so we build the attribute map from the expando property
|
283
283
|
|
284
|
-
var oldAttrs = vFromEl.
|
284
|
+
var oldAttrs = vFromEl.ce_;
|
285
285
|
|
286
286
|
if (oldAttrs === attrs) {
|
287
287
|
// For constant attributes the same object will be provided
|
@@ -319,7 +319,7 @@ VElement.cj_ = function (fromEl, vFromEl, toEl) {
|
|
319
319
|
}
|
320
320
|
|
321
321
|
var preserve = props && props.pa || EMPTY_OBJECT;
|
322
|
-
var specialAttrs = specialElHandlers[toEl.
|
322
|
+
var specialAttrs = specialElHandlers[toEl.cf_] || EMPTY_OBJECT;
|
323
323
|
var specialAttr;
|
324
324
|
|
325
325
|
// Loop over all of the attributes in the attribute map and compare
|
@@ -356,7 +356,7 @@ VElement.cj_ = function (fromEl, vFromEl, toEl) {
|
|
356
356
|
// was not a virtualized node (i.e., a node that was not rendered by a
|
357
357
|
// Marko template, but rather a node that was created from an HTML
|
358
358
|
// string or a real DOM node).
|
359
|
-
if (toEl.
|
359
|
+
if (toEl.c__ === null || fromFlags & FLAG_SPREAD_ATTRS) {
|
360
360
|
for (attrName in oldAttrs) {
|
361
361
|
if (!(attrName in attrs)) {
|
362
362
|
if (specialAttr = specialAttrs[attrName]) {
|
@@ -1,21 +1,21 @@
|
|
1
1
|
"use strict";var inherit = require("raptor-util/inherit");
|
2
2
|
var domData = require("../components/dom-data");
|
3
|
-
var keysByDOMNode = domData.
|
4
|
-
var vElementByDOMNode = domData.
|
5
|
-
var createFragmentNode = require("./morphdom/fragment").
|
3
|
+
var keysByDOMNode = domData._o_;
|
4
|
+
var vElementByDOMNode = domData._L_;
|
5
|
+
var createFragmentNode = require("./morphdom/fragment")._l_;
|
6
6
|
var VNode = require("./VNode");
|
7
7
|
|
8
8
|
function VFragment(key, ownerComponent, preserve) {
|
9
|
-
this.
|
10
|
-
this.
|
11
|
-
this.
|
9
|
+
this.bX_(null /* childCount */, ownerComponent);
|
10
|
+
this.c__ = key;
|
11
|
+
this.ae_ = preserve;
|
12
12
|
}
|
13
13
|
|
14
14
|
VFragment.prototype = {
|
15
|
-
|
16
|
-
|
15
|
+
bZ_: 12,
|
16
|
+
bq_: function () {
|
17
17
|
var fragment = createFragmentNode();
|
18
|
-
keysByDOMNode.set(fragment, this.
|
18
|
+
keysByDOMNode.set(fragment, this.c__);
|
19
19
|
vElementByDOMNode.set(fragment, this);
|
20
20
|
return fragment;
|
21
21
|
}
|