marko 5.37.45 → 5.37.47
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/runtime/helpers/tags-compat/runtime-dom.js +24 -30
- package/dist/runtime/helpers/tags-compat/runtime-html.js +3 -1
- package/dist/runtime/html/AsyncStream.js +8 -8
- package/dist/runtime/html/helpers/_dynamic-attr.js +2 -2
- package/dist/runtime/html/helpers/attr.js +2 -2
- package/dist/runtime/html/helpers/escape-xml.js +1 -1
- package/dist/runtime/renderable.js +1 -1
- package/dist/runtime/vdom/AsyncVDOMBuilder.js +65 -65
- package/dist/runtime/vdom/VComment.js +7 -7
- package/dist/runtime/vdom/VComponent.js +3 -3
- package/dist/runtime/vdom/VDocumentFragment.js +6 -6
- package/dist/runtime/vdom/VElement.js +30 -30
- package/dist/runtime/vdom/VFragment.js +5 -5
- package/dist/runtime/vdom/VNode.js +29 -29
- 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 +2 -2
- package/dist/runtime/vdom/morphdom/fragment.js +3 -3
- package/dist/runtime/vdom/morphdom/helpers.js +1 -1
- package/dist/runtime/vdom/morphdom/index.js +34 -34
- 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/runtime/helpers/tags-compat/runtime-dom.js +20 -26
- package/src/runtime/helpers/tags-compat/runtime-html.js +3 -1
- package/tags-html.d.ts +1 -1
@@ -81,17 +81,17 @@ function assign(a, b) {
|
|
81
81
|
}
|
82
82
|
|
83
83
|
function VElementClone(other) {
|
84
|
-
this.
|
85
|
-
this.bZ_ = null;
|
84
|
+
this.cc_ = other.cc_;
|
86
85
|
this.c__ = null;
|
86
|
+
this.ca_ = null;
|
87
87
|
|
88
|
-
this.
|
89
|
-
this.cc_ = other.cc_;
|
90
|
-
this._O_ = other._O_;
|
88
|
+
this.bZ_ = other.bZ_;
|
91
89
|
this.cd_ = other.cd_;
|
92
|
-
this.
|
90
|
+
this._O_ = other._O_;
|
93
91
|
this.ce_ = other.ce_;
|
92
|
+
this.u_ = other.u_;
|
94
93
|
this.cf_ = other.cf_;
|
94
|
+
this.cg_ = other.cg_;
|
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.bW_(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.bZ_ = key;
|
115
115
|
this.u_ = flags || 0;
|
116
|
-
this.
|
116
|
+
this.cd_ = attrs || EMPTY_OBJECT;
|
117
117
|
this._O_ = props || EMPTY_OBJECT;
|
118
|
-
this.
|
119
|
-
this.
|
120
|
-
this.
|
118
|
+
this.ce_ = tagName;
|
119
|
+
this.cf_ = "";
|
120
|
+
this.cg_ = constId;
|
121
121
|
this.ad_ = false;
|
122
122
|
this.ac_ = false;
|
123
123
|
}
|
124
124
|
|
125
125
|
VElement.prototype = {
|
126
|
-
|
126
|
+
bY_: 1,
|
127
127
|
|
128
|
-
|
128
|
+
bQ_: 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.bP_(
|
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.ch_();
|
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.
|
166
|
+
node = node.bQ_();
|
167
167
|
node._M_ = ownerComponent;
|
168
|
-
this.
|
169
|
-
return this.
|
168
|
+
this.bP_(node);
|
169
|
+
return this.ch_();
|
170
170
|
},
|
171
171
|
|
172
|
-
|
173
|
-
var tagName = this.
|
174
|
-
var attributes = this.
|
172
|
+
bp_: function (host, parentNamespaceURI) {
|
173
|
+
var tagName = this.ce_;
|
174
|
+
var attributes = this.cd_;
|
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.cf_;
|
200
200
|
}
|
201
201
|
}
|
202
202
|
|
@@ -251,7 +251,7 @@ function virtualizeElement(node, virtualizeChildNodes, ownerComponent) {
|
|
251
251
|
);
|
252
252
|
|
253
253
|
if (isTextOnly(tagName)) {
|
254
|
-
vdomEl.
|
254
|
+
vdomEl.cf_ = node.textContent;
|
255
255
|
} else if (virtualizeChildNodes) {
|
256
256
|
virtualizeChildNodes(node, vdomEl, ownerComponent);
|
257
257
|
}
|
@@ -259,12 +259,12 @@ function virtualizeElement(node, virtualizeChildNodes, ownerComponent) {
|
|
259
259
|
return vdomEl;
|
260
260
|
}
|
261
261
|
|
262
|
-
VElement.
|
262
|
+
VElement.ci_ = virtualizeElement;
|
263
263
|
|
264
|
-
VElement.
|
264
|
+
VElement.cj_ = function (fromEl, vFromEl, toEl) {
|
265
265
|
var fromFlags = vFromEl.u_;
|
266
266
|
var toFlags = toEl.u_;
|
267
|
-
var attrs = toEl.
|
267
|
+
var attrs = toEl.cd_;
|
268
268
|
|
269
269
|
if (toFlags & FLAG_CUSTOM_ELEMENT) {
|
270
270
|
return assign(fromEl, attrs);
|
@@ -281,7 +281,7 @@ VElement.ci_ = 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.cd_;
|
285
285
|
|
286
286
|
if (oldAttrs === attrs) {
|
287
287
|
// For constant attributes the same object will be provided
|
@@ -319,7 +319,7 @@ VElement.ci_ = 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.ce_] || 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.ci_ = 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.bZ_ === null || fromFlags & FLAG_SPREAD_ATTRS) {
|
360
360
|
for (attrName in oldAttrs) {
|
361
361
|
if (!(attrName in attrs)) {
|
362
362
|
if (specialAttr = specialAttrs[attrName]) {
|
@@ -6,16 +6,16 @@ var createFragmentNode = require("./morphdom/fragment")._k_;
|
|
6
6
|
var VNode = require("./VNode");
|
7
7
|
|
8
8
|
function VFragment(key, ownerComponent, preserve) {
|
9
|
-
this.
|
10
|
-
this.
|
9
|
+
this.bW_(null /* childCount */, ownerComponent);
|
10
|
+
this.bZ_ = key;
|
11
11
|
this.ad_ = preserve;
|
12
12
|
}
|
13
13
|
|
14
14
|
VFragment.prototype = {
|
15
|
-
|
16
|
-
|
15
|
+
bY_: 12,
|
16
|
+
bp_: function () {
|
17
17
|
var fragment = createFragmentNode();
|
18
|
-
keysByDOMNode.set(fragment, this.
|
18
|
+
keysByDOMNode.set(fragment, this.bZ_);
|
19
19
|
vElementByDOMNode.set(fragment, this);
|
20
20
|
return fragment;
|
21
21
|
}
|
@@ -3,78 +3,78 @@
|
|
3
3
|
function VNode() {}
|
4
4
|
|
5
5
|
VNode.prototype = {
|
6
|
-
|
7
|
-
this.
|
8
|
-
this.
|
9
|
-
this.
|
10
|
-
this.
|
11
|
-
this.bZ_ = null;
|
6
|
+
bW_: function (finalChildCount, ownerComponent) {
|
7
|
+
this.ck_ = finalChildCount;
|
8
|
+
this.cl_ = 0;
|
9
|
+
this.cc_ = null;
|
10
|
+
this.cm_ = null;
|
12
11
|
this.c__ = null;
|
12
|
+
this.ca_ = null;
|
13
13
|
this._M_ = ownerComponent;
|
14
14
|
},
|
15
15
|
|
16
16
|
get aA_() {
|
17
|
-
var firstChild = this.
|
17
|
+
var firstChild = this.cc_;
|
18
18
|
|
19
|
-
if (firstChild && firstChild.
|
19
|
+
if (firstChild && firstChild.cb_) {
|
20
20
|
var nestedFirstChild = firstChild.aA_;
|
21
21
|
// The first child is a DocumentFragment node.
|
22
22
|
// If the DocumentFragment node has a first child then we will return that.
|
23
23
|
// Otherwise, the DocumentFragment node is not *really* the first child and
|
24
24
|
// we need to skip to its next sibling
|
25
|
-
return nestedFirstChild || firstChild.
|
25
|
+
return nestedFirstChild || firstChild.cn_;
|
26
26
|
}
|
27
27
|
|
28
28
|
return firstChild;
|
29
29
|
},
|
30
30
|
|
31
|
-
get
|
32
|
-
var nextSibling = this.
|
31
|
+
get cn_() {
|
32
|
+
var nextSibling = this.ca_;
|
33
33
|
|
34
34
|
if (nextSibling) {
|
35
|
-
if (nextSibling.
|
35
|
+
if (nextSibling.cb_) {
|
36
36
|
var firstChild = nextSibling.aA_;
|
37
|
-
return firstChild || nextSibling.
|
37
|
+
return firstChild || nextSibling.cn_;
|
38
38
|
}
|
39
39
|
} else {
|
40
|
-
var parentNode = this.
|
41
|
-
if (parentNode && parentNode.
|
42
|
-
return parentNode.
|
40
|
+
var parentNode = this.c__;
|
41
|
+
if (parentNode && parentNode.cb_) {
|
42
|
+
return parentNode.cn_;
|
43
43
|
}
|
44
44
|
}
|
45
45
|
|
46
46
|
return nextSibling;
|
47
47
|
},
|
48
48
|
|
49
|
-
|
50
|
-
this.
|
49
|
+
bP_: function (child) {
|
50
|
+
this.cl_++;
|
51
51
|
|
52
|
-
if (hasTextContent(this.
|
53
|
-
if (child.
|
54
|
-
this.
|
52
|
+
if (hasTextContent(this.ce_)) {
|
53
|
+
if (child.co_) {
|
54
|
+
this.cf_ += child.bX_;
|
55
55
|
} else {
|
56
56
|
throw TypeError();
|
57
57
|
}
|
58
58
|
} else {
|
59
|
-
var lastChild = this.
|
59
|
+
var lastChild = this.cm_;
|
60
60
|
|
61
|
-
child.
|
61
|
+
child.c__ = this;
|
62
62
|
|
63
63
|
if (lastChild) {
|
64
|
-
lastChild.
|
64
|
+
lastChild.ca_ = child;
|
65
65
|
} else {
|
66
|
-
this.
|
66
|
+
this.cc_ = child;
|
67
67
|
}
|
68
68
|
|
69
|
-
this.
|
69
|
+
this.cm_ = child;
|
70
70
|
}
|
71
71
|
|
72
72
|
return child;
|
73
73
|
},
|
74
74
|
|
75
|
-
|
76
|
-
if (this.
|
77
|
-
return this.
|
75
|
+
ch_: function finishChild() {
|
76
|
+
if (this.cl_ === this.ck_ && this.c__) {
|
77
|
+
return this.c__.ch_();
|
78
78
|
} else {
|
79
79
|
return this;
|
80
80
|
}
|
@@ -2,21 +2,21 @@
|
|
2
2
|
var VNode = require("./VNode");
|
3
3
|
|
4
4
|
function VText(value, ownerComponent) {
|
5
|
-
this.
|
6
|
-
this.
|
5
|
+
this.bW_(-1 /* no children */, ownerComponent);
|
6
|
+
this.bX_ = value;
|
7
7
|
}
|
8
8
|
|
9
9
|
VText.prototype = {
|
10
|
-
|
10
|
+
co_: true,
|
11
11
|
|
12
|
-
|
12
|
+
bY_: 3,
|
13
13
|
|
14
|
-
|
15
|
-
return (host.ownerDocument || host).createTextNode(this.
|
14
|
+
bp_: function (host) {
|
15
|
+
return (host.ownerDocument || host).createTextNode(this.bX_);
|
16
16
|
},
|
17
17
|
|
18
|
-
|
19
|
-
return new VText(this.
|
18
|
+
bQ_: function () {
|
19
|
+
return new VText(this.bX_);
|
20
20
|
}
|
21
21
|
};
|
22
22
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
|
-
var VElement = require("../vdom").
|
3
|
+
var VElement = require("../vdom").bx_;
|
4
4
|
var i = 0;
|
5
5
|
|
6
6
|
module.exports = function (tagName, attrs, childCount) {
|
@@ -13,12 +13,12 @@ function ConstVElement(tagName, attrs, childCount) {
|
|
13
13
|
|
14
14
|
ConstVElement.prototype = Object.create(VElement.prototype);
|
15
15
|
ConstVElement.prototype.e = function (tagName, attrs, childCount) {
|
16
|
-
var child = this.
|
16
|
+
var child = this.bP_(
|
17
17
|
new ConstVElement(tagName, attrs, childCount)
|
18
18
|
);
|
19
19
|
|
20
20
|
if (childCount === 0) {
|
21
|
-
return this.
|
21
|
+
return this.ch_();
|
22
22
|
} else {
|
23
23
|
return child;
|
24
24
|
}
|
@@ -44,7 +44,7 @@ exports.t = runtime.t = function (typeName) {
|
|
44
44
|
instance.Q_(input, out);
|
45
45
|
};
|
46
46
|
|
47
|
-
instance.
|
47
|
+
instance.cp_ = true;
|
48
48
|
instance.ao_();
|
49
49
|
instance._x_ = false;
|
50
50
|
|
@@ -78,7 +78,7 @@ registry._G_ = function (typeName, id) {
|
|
78
78
|
if (instances) {
|
79
79
|
instances.add(instance);
|
80
80
|
instance.once("destroy", function () {
|
81
|
-
if (!instance.
|
81
|
+
if (!instance.cp_) {
|
82
82
|
instances.delete(instance);
|
83
83
|
}
|
84
84
|
});
|
@@ -80,8 +80,8 @@ function createFragmentNode(startNode, nextNode, parentNode) {
|
|
80
80
|
|
81
81
|
function beginFragmentNode(startNode, parentNode) {
|
82
82
|
var fragment = createFragmentNode(startNode, null, parentNode);
|
83
|
-
fragment.
|
84
|
-
fragment.
|
83
|
+
fragment.cq_ = function (nextNode) {
|
84
|
+
fragment.cq_ = null;
|
85
85
|
insertBefore(
|
86
86
|
fragment.endNode,
|
87
87
|
nextNode,
|
@@ -92,4 +92,4 @@ function beginFragmentNode(startNode, parentNode) {
|
|
92
92
|
}
|
93
93
|
|
94
94
|
exports._k_ = createFragmentNode;
|
95
|
-
exports.
|
95
|
+
exports.cr_ = beginFragmentNode;
|
@@ -8,12 +8,12 @@ var normalizeComponentKey = componentsUtil._U_;
|
|
8
8
|
var domData = require("../../components/dom-data");
|
9
9
|
var eventDelegation = require("../../components/event-delegation");
|
10
10
|
var KeySequence = require("../../components/KeySequence");
|
11
|
-
var VElement = require("../vdom").
|
11
|
+
var VElement = require("../vdom").bx_;
|
12
12
|
var fragment = require("./fragment");
|
13
13
|
var helpers = require("./helpers");
|
14
14
|
var isTextOnly = require("../is-text-only");
|
15
|
-
var virtualizeElement = VElement.
|
16
|
-
var morphAttrs = VElement.
|
15
|
+
var virtualizeElement = VElement.ci_;
|
16
|
+
var morphAttrs = VElement.cj_;
|
17
17
|
var keysByDOMNode = domData._n_;
|
18
18
|
var componentByDOMNode = domData._p_;
|
19
19
|
var vElementByDOMNode = domData._K_;
|
@@ -21,11 +21,11 @@ var detachedByDOMNode = domData.aW_;
|
|
21
21
|
|
22
22
|
var insertBefore = helpers.bf_;
|
23
23
|
var insertAfter = helpers.bg_;
|
24
|
-
var nextSibling = helpers.
|
24
|
+
var nextSibling = helpers.cn_;
|
25
25
|
var firstChild = helpers.aA_;
|
26
26
|
var removeChild = helpers.bh_;
|
27
27
|
var createFragmentNode = fragment._k_;
|
28
|
-
var beginFragmentNode = fragment.
|
28
|
+
var beginFragmentNode = fragment.cr_;
|
29
29
|
|
30
30
|
var ELEMENT_NODE = 1;
|
31
31
|
var TEXT_NODE = 3;
|
@@ -43,7 +43,7 @@ function isAutoKey(key) {
|
|
43
43
|
}
|
44
44
|
|
45
45
|
function compareNodeNames(fromEl, toEl) {
|
46
|
-
return fromEl.
|
46
|
+
return fromEl.ce_ === toEl.ce_;
|
47
47
|
}
|
48
48
|
|
49
49
|
function caseInsensitiveCompare(a, b) {
|
@@ -74,12 +74,12 @@ function morphdom(fromNode, toNode, host, componentsContext) {
|
|
74
74
|
ownerComponent,
|
75
75
|
parentComponent)
|
76
76
|
{
|
77
|
-
var realNode = vNode.
|
77
|
+
var realNode = vNode.bp_(host, parentEl.namespaceURI);
|
78
78
|
insertBefore(realNode, referenceEl, parentEl);
|
79
79
|
|
80
80
|
if (
|
81
|
-
vNode.
|
82
|
-
vNode.
|
81
|
+
vNode.bY_ === ELEMENT_NODE ||
|
82
|
+
vNode.bY_ === FRAGMENT_NODE)
|
83
83
|
{
|
84
84
|
if (key) {
|
85
85
|
keysByDOMNode.set(realNode, key);
|
@@ -88,7 +88,7 @@ function morphdom(fromNode, toNode, host, componentsContext) {
|
|
88
88
|
realNode;
|
89
89
|
}
|
90
90
|
|
91
|
-
if (!isTextOnly(vNode.
|
91
|
+
if (!isTextOnly(vNode.ce_)) {
|
92
92
|
morphChildren(realNode, vNode, parentComponent);
|
93
93
|
}
|
94
94
|
|
@@ -162,9 +162,9 @@ function morphdom(fromNode, toNode, host, componentsContext) {
|
|
162
162
|
var fromComponent;
|
163
163
|
|
164
164
|
outer: while (curToNodeChild) {
|
165
|
-
toNextSibling = curToNodeChild.
|
166
|
-
curToNodeType = curToNodeChild.
|
167
|
-
curToNodeKey = curToNodeChild.
|
165
|
+
toNextSibling = curToNodeChild.cn_;
|
166
|
+
curToNodeType = curToNodeChild.bY_;
|
167
|
+
curToNodeKey = curToNodeChild.bZ_;
|
168
168
|
|
169
169
|
// Skip <!doctype>
|
170
170
|
if (curFromNodeChild && curFromNodeChild.nodeType === DOCTYPE_NODE) {
|
@@ -283,7 +283,7 @@ function morphdom(fromNode, toNode, host, componentsContext) {
|
|
283
283
|
|
284
284
|
if (
|
285
285
|
curVFromNodeChild &&
|
286
|
-
curToNodeType === curVFromNodeChild.
|
286
|
+
curToNodeType === curVFromNodeChild.bY_ && (
|
287
287
|
curToNodeType !== ELEMENT_NODE ||
|
288
288
|
compareNodeNames(curToNodeChild, curVFromNodeChild)))
|
289
289
|
{
|
@@ -328,11 +328,11 @@ function morphdom(fromNode, toNode, host, componentsContext) {
|
|
328
328
|
curToNodeChild.ad_ ||
|
329
329
|
caseInsensitiveCompare(
|
330
330
|
curFromNodeChild.nodeName,
|
331
|
-
curToNodeChild.
|
331
|
+
curToNodeChild.ce_ || ""
|
332
332
|
)))
|
333
333
|
{
|
334
334
|
curVFromNodeChild = virtualizeElement(curFromNodeChild);
|
335
|
-
curVFromNodeChild.
|
335
|
+
curVFromNodeChild.ce_ = curToNodeChild.ce_;
|
336
336
|
keysByDOMNode.set(curFromNodeChild, curToNodeKey);
|
337
337
|
referenceComponent.K_[curToNodeKey] =
|
338
338
|
curFromNodeChild;
|
@@ -352,7 +352,7 @@ function morphdom(fromNode, toNode, host, componentsContext) {
|
|
352
352
|
curFromNodeChild = fromNextSibling;
|
353
353
|
continue;
|
354
354
|
} else if (
|
355
|
-
curToNodeChild.
|
355
|
+
curToNodeChild.bY_ === FRAGMENT_NODE &&
|
356
356
|
curFromNodeChild.nodeType === COMMENT_NODE)
|
357
357
|
{
|
358
358
|
var content = curFromNodeChild.nodeValue;
|
@@ -418,7 +418,7 @@ function morphdom(fromNode, toNode, host, componentsContext) {
|
|
418
418
|
|
419
419
|
if (
|
420
420
|
curVFromNodeChild &&
|
421
|
-
curToNodeType === curVFromNodeChild.
|
421
|
+
curToNodeType === curVFromNodeChild.bY_ && (
|
422
422
|
curToNodeType !== ELEMENT_NODE ||
|
423
423
|
compareNodeNames(curVFromNodeChild, curToNodeChild)))
|
424
424
|
{
|
@@ -436,7 +436,7 @@ function morphdom(fromNode, toNode, host, componentsContext) {
|
|
436
436
|
|
437
437
|
if (
|
438
438
|
toNextSibling &&
|
439
|
-
toNextSibling.
|
439
|
+
toNextSibling.bZ_ === curFromNodeKey)
|
440
440
|
{
|
441
441
|
// Single element swap
|
442
442
|
|
@@ -549,18 +549,18 @@ function morphdom(fromNode, toNode, host, componentsContext) {
|
|
549
549
|
|
550
550
|
if (
|
551
551
|
caseInsensitiveCompare(
|
552
|
-
curVFromNodeChild.
|
553
|
-
curToNodeChild.
|
552
|
+
curVFromNodeChild.ce_,
|
553
|
+
curToNodeChild.ce_
|
554
554
|
))
|
555
555
|
{
|
556
|
-
curVFromNodeChild.
|
556
|
+
curVFromNodeChild.ce_ = curToNodeChild.ce_;
|
557
557
|
}
|
558
558
|
} else {
|
559
559
|
// Skip over nodes that don't look like ours...
|
560
560
|
curFromNodeChild = fromNextSibling;
|
561
561
|
continue;
|
562
562
|
}
|
563
|
-
} else if (curFromNodeKey = curVFromNodeChild.
|
563
|
+
} else if (curFromNodeKey = curVFromNodeChild.bZ_) {
|
564
564
|
// We have a keyed element here but our target VDOM node
|
565
565
|
// is not keyed so this not doesn't belong
|
566
566
|
isCompatible = false;
|
@@ -587,18 +587,18 @@ function morphdom(fromNode, toNode, host, componentsContext) {
|
|
587
587
|
{
|
588
588
|
// Both nodes being compared are Text or Comment nodes
|
589
589
|
isCompatible = true;
|
590
|
-
var curToNodeValue = curToNodeChild.
|
590
|
+
var curToNodeValue = curToNodeChild.bX_;
|
591
591
|
var curFromNodeValue = curFromNodeChild.nodeValue;
|
592
592
|
if (curFromNodeValue !== curToNodeValue) {
|
593
593
|
if (
|
594
594
|
isHydrate &&
|
595
595
|
toNextSibling &&
|
596
596
|
curFromNodeType === TEXT_NODE &&
|
597
|
-
toNextSibling.
|
597
|
+
toNextSibling.bY_ === TEXT_NODE &&
|
598
598
|
curFromNodeValue.startsWith(curToNodeValue) &&
|
599
599
|
curFromNodeValue.
|
600
600
|
slice(curToNodeValue.length).
|
601
|
-
startsWith(toNextSibling.
|
601
|
+
startsWith(toNextSibling.bX_))
|
602
602
|
{
|
603
603
|
// In hydrate mode we can use splitText to more efficiently handle
|
604
604
|
// adjacent text vdom nodes that were merged.
|
@@ -643,10 +643,10 @@ function morphdom(fromNode, toNode, host, componentsContext) {
|
|
643
643
|
}
|
644
644
|
|
645
645
|
// We have processed all of the "to nodes".
|
646
|
-
if (fromNode.
|
646
|
+
if (fromNode.cq_) {
|
647
647
|
// If we are in an unfinished fragment, we have reached the end of the nodes
|
648
648
|
// we were matching up and need to end the fragment
|
649
|
-
fromNode.
|
649
|
+
fromNode.cq_(curFromNodeChild);
|
650
650
|
} else {
|
651
651
|
// If curFromNodeChild is non-null then we still have some from nodes
|
652
652
|
// left over that need to be removed
|
@@ -686,11 +686,11 @@ function morphdom(fromNode, toNode, host, componentsContext) {
|
|
686
686
|
}
|
687
687
|
|
688
688
|
function morphEl(fromEl, vFromEl, toEl, parentComponent) {
|
689
|
-
var nodeName = toEl.
|
690
|
-
var constId = toEl.
|
689
|
+
var nodeName = toEl.ce_;
|
690
|
+
var constId = toEl.cg_;
|
691
691
|
vElementByDOMNode.set(fromEl, toEl);
|
692
692
|
|
693
|
-
if (constId !== undefined && vFromEl.
|
693
|
+
if (constId !== undefined && vFromEl.cg_ === constId) {
|
694
694
|
return;
|
695
695
|
}
|
696
696
|
|
@@ -701,11 +701,11 @@ function morphdom(fromNode, toNode, host, componentsContext) {
|
|
701
701
|
}
|
702
702
|
|
703
703
|
if (isTextOnly(nodeName)) {
|
704
|
-
if (toEl.
|
704
|
+
if (toEl.cf_ !== vFromEl.cf_) {
|
705
705
|
if (nodeName === "textarea") {
|
706
|
-
fromEl.value = toEl.
|
706
|
+
fromEl.value = toEl.cf_;
|
707
707
|
} else {
|
708
|
-
fromEl.textContent = toEl.
|
708
|
+
fromEl.textContent = toEl.cf_;
|
709
709
|
}
|
710
710
|
}
|
711
711
|
} else {
|
@@ -12,7 +12,7 @@ var specialHtmlRegexp = /[&<]/;
|
|
12
12
|
function virtualizeChildNodes(node, vdomParent, ownerComponent) {
|
13
13
|
var curChild = node.firstChild;
|
14
14
|
while (curChild) {
|
15
|
-
vdomParent.
|
15
|
+
vdomParent.bP_(virtualize(curChild, ownerComponent));
|
16
16
|
curChild = curChild.nextSibling;
|
17
17
|
}
|
18
18
|
}
|
@@ -20,7 +20,7 @@ function virtualizeChildNodes(node, vdomParent, ownerComponent) {
|
|
20
20
|
function virtualize(node, ownerComponent) {
|
21
21
|
switch (node.nodeType) {
|
22
22
|
case 1:
|
23
|
-
return VElement.
|
23
|
+
return VElement.ci_(node, virtualizeChildNodes, ownerComponent);
|
24
24
|
case 3:
|
25
25
|
return new VText(node.nodeValue, ownerComponent);
|
26
26
|
case 8:
|
@@ -43,7 +43,7 @@ function virtualizeHTML(html, ownerComponent) {
|
|
43
43
|
|
44
44
|
while (curChild) {
|
45
45
|
virtualized = virtualize(curChild, ownerComponent);
|
46
|
-
if (virtualized) vdomFragment.
|
46
|
+
if (virtualized) vdomFragment.bP_(virtualized);
|
47
47
|
curChild = curChild.nextSibling;
|
48
48
|
}
|
49
49
|
|
@@ -70,19 +70,19 @@ Node_prototype.t = function (value) {
|
|
70
70
|
}
|
71
71
|
}
|
72
72
|
|
73
|
-
this.
|
74
|
-
return this.
|
73
|
+
this.bP_(vdomNode || new VText(value.toString()));
|
74
|
+
return this.ch_();
|
75
75
|
};
|
76
76
|
|
77
|
-
Node_prototype.
|
78
|
-
return this.
|
77
|
+
Node_prototype.bU_ = function () {
|
78
|
+
return this.bP_(new VDocumentFragment());
|
79
79
|
};
|
80
80
|
|
81
|
-
exports.
|
82
|
-
exports.
|
83
|
-
exports.
|
84
|
-
exports.
|
85
|
-
exports.
|
86
|
-
exports.
|
87
|
-
exports.
|
88
|
-
exports.
|
81
|
+
exports.by_ = VComment;
|
82
|
+
exports.bz_ = VDocumentFragment;
|
83
|
+
exports.bx_ = VElement;
|
84
|
+
exports.bA_ = VText;
|
85
|
+
exports.bB_ = VComponent;
|
86
|
+
exports.bC_ = VFragment;
|
87
|
+
exports.ci_ = virtualize;
|
88
|
+
exports.bD_ = virtualizeHTML;
|