marko 5.17.6 → 5.17.7
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/components/update-manager.js +7 -7
- package/dist/runtime/components/update-manager.js.map +1 -1
- package/dist/runtime/components/util/index-browser.js +4 -4
- package/dist/runtime/components/util/index.js +1 -1
- package/dist/runtime/createOut.js +1 -1
- package/dist/runtime/dom-insert.js +4 -4
- package/dist/runtime/helpers/_change-case.js +2 -2
- package/dist/runtime/helpers/dynamic-tag.js +4 -4
- package/dist/runtime/helpers/style-value.js +1 -1
- package/dist/runtime/html/AsyncStream.js +12 -12
- package/dist/runtime/html/BufferedWriter.js +4 -2
- package/dist/runtime/html/BufferedWriter.js.map +1 -1
- package/dist/runtime/html/StringWriter.js +1 -1
- package/dist/runtime/html/create-readable/index-browser.js +2 -2
- package/dist/runtime/html/create-readable/index-browser.js.map +1 -1
- package/dist/runtime/html/create-readable/index.js +9 -9
- package/dist/runtime/html/helpers/_dynamic-attr.js +2 -2
- package/dist/runtime/html/helpers/attr.js +4 -4
- package/dist/runtime/html/helpers/data-marko.js +2 -2
- package/dist/runtime/html/helpers/escape-quotes.js +2 -2
- package/dist/runtime/html/helpers/escape-xml.js +1 -1
- package/dist/runtime/html/helpers/props-script.js +1 -1
- package/dist/runtime/html/index.js +2 -2
- package/dist/runtime/renderable.js +5 -5
- package/dist/runtime/renderable.js.map +1 -1
- package/dist/runtime/setImmediate/index-browser.js +1 -1
- package/dist/runtime/setImmediate/index-browser.js.map +1 -1
- package/dist/runtime/setImmediate/index-worker.js +2 -16
- package/dist/runtime/setImmediate/index-worker.js.map +1 -1
- package/dist/runtime/setImmediate/index.js +2 -1
- package/dist/runtime/setImmediate/index.js.map +1 -1
- package/dist/runtime/vdom/AsyncVDOMBuilder.js +71 -71
- package/dist/runtime/vdom/VComponent.js +3 -3
- package/dist/runtime/vdom/VDocumentFragment.js +7 -7
- package/dist/runtime/vdom/VElement.js +43 -43
- package/dist/runtime/vdom/VFragment.js +5 -5
- package/dist/runtime/vdom/VNode.js +32 -32
- package/dist/runtime/vdom/VText.js +8 -8
- package/dist/runtime/vdom/helpers/v-element.js +1 -1
- package/dist/runtime/vdom/helpers/v-text.js +1 -1
- package/dist/runtime/vdom/hot-reload.js +5 -5
- package/dist/runtime/vdom/index.js +2 -2
- package/dist/runtime/vdom/morphdom/fragment.js +4 -4
- package/dist/runtime/vdom/morphdom/helpers.js +4 -4
- package/dist/runtime/vdom/morphdom/index.js +36 -36
- package/dist/runtime/vdom/morphdom/specialElHandlers.js +6 -6
- package/dist/runtime/vdom/preserve-attrs.js +1 -1
- package/dist/runtime/vdom/vdom.js +14 -14
- package/package.json +3 -3
- package/src/runtime/components/update-manager.js +1 -1
- package/src/runtime/html/BufferedWriter.js +4 -2
- package/src/runtime/html/create-readable/index-browser.js +1 -1
- package/src/runtime/renderable.js +1 -1
- package/src/runtime/setImmediate/index-browser.js +1 -1
- package/src/runtime/setImmediate/index-worker.js +2 -16
- package/src/runtime/setImmediate/index.js +2 -1
@@ -2,81 +2,81 @@
|
|
2
2
|
function VNode() {}
|
3
3
|
|
4
4
|
VNode.prototype = {
|
5
|
-
|
6
|
-
this.
|
7
|
-
this.
|
5
|
+
bA_: function (finalChildCount, ownerComponent) {
|
6
|
+
this.bQ_ = finalChildCount;
|
7
|
+
this.bR_ = 0;
|
8
|
+
this.bG_ = null;
|
9
|
+
this.bS_ = null;
|
10
|
+
this.bD_ = null;
|
8
11
|
this.bE_ = null;
|
9
|
-
this.
|
10
|
-
this.bB_ = null;
|
11
|
-
this.bC_ = null;
|
12
|
-
this.aA_ = ownerComponent;
|
12
|
+
this.aB_ = ownerComponent;
|
13
13
|
},
|
14
14
|
|
15
15
|
get _r_() {
|
16
|
-
var firstChild = this.
|
16
|
+
var firstChild = this.bG_;
|
17
17
|
|
18
|
-
if (firstChild && firstChild.
|
18
|
+
if (firstChild && firstChild.bF_) {
|
19
19
|
var nestedFirstChild = firstChild._r_;
|
20
20
|
// The first child is a DocumentFragment node.
|
21
21
|
// If the DocumentFragment node has a first child then we will return that.
|
22
22
|
// Otherwise, the DocumentFragment node is not *really* the first child and
|
23
23
|
// we need to skip to its next sibling
|
24
|
-
return nestedFirstChild || firstChild.
|
24
|
+
return nestedFirstChild || firstChild.bT_;
|
25
25
|
}
|
26
26
|
|
27
27
|
return firstChild;
|
28
28
|
},
|
29
29
|
|
30
|
-
get
|
31
|
-
var nextSibling = this.
|
30
|
+
get bT_() {
|
31
|
+
var nextSibling = this.bE_;
|
32
32
|
|
33
33
|
if (nextSibling) {
|
34
|
-
if (nextSibling.
|
34
|
+
if (nextSibling.bF_) {
|
35
35
|
var firstChild = nextSibling._r_;
|
36
|
-
return firstChild || nextSibling.
|
36
|
+
return firstChild || nextSibling.bT_;
|
37
37
|
}
|
38
38
|
} else {
|
39
|
-
var parentNode = this.
|
40
|
-
if (parentNode && parentNode.
|
41
|
-
return parentNode.
|
39
|
+
var parentNode = this.bD_;
|
40
|
+
if (parentNode && parentNode.bF_) {
|
41
|
+
return parentNode.bT_;
|
42
42
|
}
|
43
43
|
}
|
44
44
|
|
45
45
|
return nextSibling;
|
46
46
|
},
|
47
47
|
|
48
|
-
|
49
|
-
this.
|
48
|
+
bs_: function (child) {
|
49
|
+
this.bR_++;
|
50
50
|
|
51
|
-
if (this.
|
52
|
-
if (child.
|
53
|
-
var childValue = child.
|
54
|
-
this.
|
51
|
+
if (this.bI_ === "textarea") {
|
52
|
+
if (child.bU_) {
|
53
|
+
var childValue = child.bV_;
|
54
|
+
this.bJ_ = (this.bJ_ || "") + childValue;
|
55
55
|
} else if (child.n_ || child.m_) {
|
56
|
-
this.
|
56
|
+
this.bW_ = true;
|
57
57
|
} else {
|
58
58
|
throw TypeError();
|
59
59
|
}
|
60
60
|
} else {
|
61
|
-
var lastChild = this.
|
61
|
+
var lastChild = this.bS_;
|
62
62
|
|
63
|
-
child.
|
63
|
+
child.bD_ = this;
|
64
64
|
|
65
65
|
if (lastChild) {
|
66
|
-
lastChild.
|
66
|
+
lastChild.bE_ = child;
|
67
67
|
} else {
|
68
|
-
this.
|
68
|
+
this.bG_ = child;
|
69
69
|
}
|
70
70
|
|
71
|
-
this.
|
71
|
+
this.bS_ = child;
|
72
72
|
}
|
73
73
|
|
74
74
|
return child;
|
75
75
|
},
|
76
76
|
|
77
|
-
|
78
|
-
if (this.
|
79
|
-
return this.
|
77
|
+
bL_: function finishChild() {
|
78
|
+
if (this.bR_ === this.bQ_ && this.bD_) {
|
79
|
+
return this.bD_.bL_();
|
80
80
|
} else {
|
81
81
|
return this;
|
82
82
|
}
|
@@ -2,21 +2,21 @@
|
|
2
2
|
var inherit = require("raptor-util/inherit");
|
3
3
|
|
4
4
|
function VText(value, ownerComponent) {
|
5
|
-
this.
|
6
|
-
this.
|
5
|
+
this.bA_(-1 /* no children */, ownerComponent);
|
6
|
+
this.bV_ = value;
|
7
7
|
}
|
8
8
|
|
9
9
|
VText.prototype = {
|
10
|
-
|
10
|
+
bU_: true,
|
11
11
|
|
12
|
-
|
12
|
+
bC_: 3,
|
13
13
|
|
14
|
-
|
15
|
-
return (host.ownerDocument || host).createTextNode(this.
|
14
|
+
bz_: function (host) {
|
15
|
+
return (host.ownerDocument || host).createTextNode(this.bV_);
|
16
16
|
},
|
17
17
|
|
18
|
-
|
19
|
-
return new VText(this.
|
18
|
+
bt_: function () {
|
19
|
+
return new VText(this.bV_);
|
20
20
|
} };
|
21
21
|
|
22
22
|
|
@@ -16,7 +16,7 @@ runtime.t = function (typeName) {
|
|
16
16
|
|
17
17
|
var renderFn;
|
18
18
|
var template = registered[typeName] = createTemplate(typeName);
|
19
|
-
var instances = template.
|
19
|
+
var instances = template.bX_ = [];
|
20
20
|
Object.defineProperty(template, "_", {
|
21
21
|
get: function () {
|
22
22
|
return renderFn && proxyRenderer;
|
@@ -39,7 +39,7 @@ runtime.t = function (typeName) {
|
|
39
39
|
var parentNode = startNode.parentNode;
|
40
40
|
var curNode;
|
41
41
|
|
42
|
-
instance.
|
42
|
+
instance.bY_ = true;
|
43
43
|
instance._a_();
|
44
44
|
instance._b_();
|
45
45
|
|
@@ -53,7 +53,7 @@ runtime.t = function (typeName) {
|
|
53
53
|
parentNode.removeChild(curNode);
|
54
54
|
}
|
55
55
|
|
56
|
-
instance.
|
56
|
+
instance.bY_ = false;
|
57
57
|
instance.R_ = false;
|
58
58
|
}
|
59
59
|
|
@@ -79,10 +79,10 @@ registry._P_ = function (typeName, id) {
|
|
79
79
|
var instance = createComponent(typeName, id);
|
80
80
|
|
81
81
|
if (template) {
|
82
|
-
var instances = template.
|
82
|
+
var instances = template.bX_;
|
83
83
|
instances.push(instance);
|
84
84
|
instance.once("destroy", function () {
|
85
|
-
if (!instance.
|
85
|
+
if (!instance.bY_) {
|
86
86
|
instances.splice(1, instances.indexOf(instance));
|
87
87
|
}
|
88
88
|
});
|
@@ -11,11 +11,11 @@ exports.t = function createTemplate(typeName) {
|
|
11
11
|
};
|
12
12
|
|
13
13
|
function Template(typeName) {
|
14
|
-
this.
|
14
|
+
this.ba_ = typeName;
|
15
15
|
}
|
16
16
|
|
17
17
|
var AsyncVDOMBuilder = require("./AsyncVDOMBuilder");
|
18
|
-
require("../createOut").
|
18
|
+
require("../createOut").aF_(
|
19
19
|
Template.prototype.createOut = function createOut(
|
20
20
|
globalData,
|
21
21
|
parent,
|
@@ -1,5 +1,5 @@
|
|
1
1
|
"use strict";var helpers = require("./helpers");
|
2
|
-
var insertBefore = helpers.
|
2
|
+
var insertBefore = helpers.aG_;
|
3
3
|
|
4
4
|
var fragmentPrototype = {
|
5
5
|
nodeType: 12,
|
@@ -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.bZ_ = function (nextNode) {
|
84
|
+
fragment.bZ_ = null;
|
85
85
|
insertBefore(
|
86
86
|
fragment.endNode,
|
87
87
|
nextNode,
|
@@ -92,5 +92,5 @@ function beginFragmentNode(startNode, parentNode) {
|
|
92
92
|
}
|
93
93
|
|
94
94
|
exports.ao_ = createFragmentNode;
|
95
|
-
exports.
|
95
|
+
exports.c__ = beginFragmentNode;
|
96
96
|
//# sourceMappingURL=fragment.js.map
|
@@ -35,9 +35,9 @@ function removeChild(node) {
|
|
35
35
|
node.parentNode.removeChild(node);
|
36
36
|
}
|
37
37
|
|
38
|
-
exports.
|
39
|
-
exports.
|
40
|
-
exports.
|
38
|
+
exports.aG_ = insertBefore;
|
39
|
+
exports.aH_ = insertAfter;
|
40
|
+
exports.bT_ = nextSibling;
|
41
41
|
exports._r_ = firstChild;
|
42
|
-
exports.
|
42
|
+
exports.aI_ = removeChild;
|
43
43
|
//# sourceMappingURL=helpers.js.map
|
@@ -6,10 +6,10 @@ var existingComponentLookup = componentsUtil.C_;
|
|
6
6
|
var destroyNodeRecursive = componentsUtil.D_;
|
7
7
|
var addComponentRootToKeyedElements =
|
8
8
|
componentsUtil.ap_;
|
9
|
-
var normalizeComponentKey = componentsUtil.
|
10
|
-
var VElement = require("../vdom").
|
11
|
-
var virtualizeElement = VElement.
|
12
|
-
var morphAttrs = VElement.
|
9
|
+
var normalizeComponentKey = componentsUtil.aE_;
|
10
|
+
var VElement = require("../vdom").bb_;
|
11
|
+
var virtualizeElement = VElement.bO_;
|
12
|
+
var morphAttrs = VElement.bP_;
|
13
13
|
var eventDelegation = require("../../components/event-delegation");
|
14
14
|
var fragment = require("./fragment");
|
15
15
|
var helpers = require("./helpers");
|
@@ -19,13 +19,13 @@ var componentByDOMNode = domData.E_;
|
|
19
19
|
var vElementByDOMNode = domData.ae_;
|
20
20
|
var detachedByDOMNode = domData.af_;
|
21
21
|
|
22
|
-
var insertBefore = helpers.
|
23
|
-
var insertAfter = helpers.
|
24
|
-
var nextSibling = helpers.
|
22
|
+
var insertBefore = helpers.aG_;
|
23
|
+
var insertAfter = helpers.aH_;
|
24
|
+
var nextSibling = helpers.bT_;
|
25
25
|
var firstChild = helpers._r_;
|
26
|
-
var removeChild = helpers.
|
26
|
+
var removeChild = helpers.aI_;
|
27
27
|
var createFragmentNode = fragment.ao_;
|
28
|
-
var beginFragmentNode = fragment.
|
28
|
+
var beginFragmentNode = fragment.c__;
|
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.bI_ === toEl.bI_;
|
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.bz_(host, parentEl.namespaceURI);
|
78
78
|
insertBefore(realNode, referenceEl, parentEl);
|
79
79
|
|
80
80
|
if (
|
81
|
-
vNode.
|
82
|
-
vNode.
|
81
|
+
vNode.bC_ === ELEMENT_NODE ||
|
82
|
+
vNode.bC_ === 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 (vNode.
|
91
|
+
if (vNode.bI_ !== "textarea") {
|
92
92
|
morphChildren(realNode, vNode, parentComponent);
|
93
93
|
}
|
94
94
|
|
@@ -162,16 +162,16 @@ 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.bT_;
|
166
|
+
curToNodeType = curToNodeChild.bC_;
|
167
|
+
curToNodeKey = curToNodeChild.bB_;
|
168
168
|
|
169
169
|
// Skip <!doctype>
|
170
170
|
if (curFromNodeChild && curFromNodeChild.nodeType === DOCTYPE_NODE) {
|
171
171
|
curFromNodeChild = nextSibling(curFromNodeChild);
|
172
172
|
}
|
173
173
|
|
174
|
-
var ownerComponent = curToNodeChild.
|
174
|
+
var ownerComponent = curToNodeChild.aB_ || parentComponent;
|
175
175
|
var referenceComponent;
|
176
176
|
|
177
177
|
if (curToNodeType === COMPONENT_NODE) {
|
@@ -315,11 +315,11 @@ function morphdom(fromNode, toNode, host, componentsContext) {
|
|
315
315
|
curToNodeChild.n_ ||
|
316
316
|
caseInsensitiveCompare(
|
317
317
|
curFromNodeChild.nodeName,
|
318
|
-
curToNodeChild.
|
318
|
+
curToNodeChild.bI_ || "")))
|
319
319
|
|
320
320
|
{
|
321
321
|
curVFromNodeChild = virtualizeElement(curFromNodeChild);
|
322
|
-
curVFromNodeChild.
|
322
|
+
curVFromNodeChild.bI_ = curToNodeChild.bI_;
|
323
323
|
keysByDOMNode.set(curFromNodeChild, curToNodeKey);
|
324
324
|
referenceComponent.k_[curToNodeKey] =
|
325
325
|
curFromNodeChild;
|
@@ -339,7 +339,7 @@ function morphdom(fromNode, toNode, host, componentsContext) {
|
|
339
339
|
curFromNodeChild = fromNextSibling;
|
340
340
|
continue;
|
341
341
|
} else if (
|
342
|
-
curToNodeChild.
|
342
|
+
curToNodeChild.bC_ === FRAGMENT_NODE &&
|
343
343
|
curFromNodeChild.nodeType === COMMENT_NODE)
|
344
344
|
{
|
345
345
|
var content = curFromNodeChild.nodeValue;
|
@@ -419,7 +419,7 @@ function morphdom(fromNode, toNode, host, componentsContext) {
|
|
419
419
|
|
420
420
|
if (
|
421
421
|
toNextSibling &&
|
422
|
-
toNextSibling.
|
422
|
+
toNextSibling.bB_ === curFromNodeKey)
|
423
423
|
{
|
424
424
|
// Single element swap
|
425
425
|
|
@@ -524,18 +524,18 @@ function morphdom(fromNode, toNode, host, componentsContext) {
|
|
524
524
|
|
525
525
|
if (
|
526
526
|
caseInsensitiveCompare(
|
527
|
-
curVFromNodeChild.
|
528
|
-
curToNodeChild.
|
527
|
+
curVFromNodeChild.bI_,
|
528
|
+
curToNodeChild.bI_))
|
529
529
|
|
530
530
|
{
|
531
|
-
curVFromNodeChild.
|
531
|
+
curVFromNodeChild.bI_ = curToNodeChild.bI_;
|
532
532
|
}
|
533
533
|
} else {
|
534
534
|
// Skip over nodes that don't look like ours...
|
535
535
|
curFromNodeChild = fromNextSibling;
|
536
536
|
continue;
|
537
537
|
}
|
538
|
-
} else if (curFromNodeKey = curVFromNodeChild.
|
538
|
+
} else if (curFromNodeKey = curVFromNodeChild.bB_) {
|
539
539
|
// We have a keyed element here but our target VDOM node
|
540
540
|
// is not keyed so this not doesn't belong
|
541
541
|
isCompatible = false;
|
@@ -569,14 +569,14 @@ function morphdom(fromNode, toNode, host, componentsContext) {
|
|
569
569
|
isHydrate === true &&
|
570
570
|
toNextSibling &&
|
571
571
|
curFromNodeType === TEXT_NODE &&
|
572
|
-
toNextSibling.
|
572
|
+
toNextSibling.bC_ === TEXT_NODE)
|
573
573
|
{
|
574
574
|
fromNextSibling = curFromNodeChild.splitText(
|
575
|
-
curToNodeChild.
|
575
|
+
curToNodeChild.bV_.length);
|
576
576
|
|
577
577
|
}
|
578
|
-
if (curFromNodeChild.nodeValue !== curToNodeChild.
|
579
|
-
curFromNodeChild.nodeValue = curToNodeChild.
|
578
|
+
if (curFromNodeChild.nodeValue !== curToNodeChild.bV_) {
|
579
|
+
curFromNodeChild.nodeValue = curToNodeChild.bV_;
|
580
580
|
}
|
581
581
|
}
|
582
582
|
}
|
@@ -610,10 +610,10 @@ function morphdom(fromNode, toNode, host, componentsContext) {
|
|
610
610
|
}
|
611
611
|
|
612
612
|
// We have processed all of the "to nodes".
|
613
|
-
if (fromNode.
|
613
|
+
if (fromNode.bZ_) {
|
614
614
|
// If we are in an unfinished fragment, we have reached the end of the nodes
|
615
615
|
// we were matching up and need to end the fragment
|
616
|
-
fromNode.
|
616
|
+
fromNode.bZ_(curFromNodeChild);
|
617
617
|
} else {
|
618
618
|
// If curFromNodeChild is non-null then we still have some from nodes
|
619
619
|
// left over that need to be removed
|
@@ -642,7 +642,7 @@ function morphdom(fromNode, toNode, host, componentsContext) {
|
|
642
642
|
referenceComponent = parentComponent;
|
643
643
|
} else {
|
644
644
|
referenceComponent =
|
645
|
-
curVFromNodeChild && curVFromNodeChild.
|
645
|
+
curVFromNodeChild && curVFromNodeChild.aB_;
|
646
646
|
}
|
647
647
|
|
648
648
|
detachNode(curFromNodeChild, fromNode, referenceComponent);
|
@@ -653,10 +653,10 @@ function morphdom(fromNode, toNode, host, componentsContext) {
|
|
653
653
|
}
|
654
654
|
|
655
655
|
function morphEl(fromEl, vFromEl, toEl, parentComponent) {
|
656
|
-
var nodeName = toEl.
|
656
|
+
var nodeName = toEl.bI_;
|
657
657
|
|
658
|
-
var constId = toEl.
|
659
|
-
if (constId !== undefined && vFromEl.
|
658
|
+
var constId = toEl.bK_;
|
659
|
+
if (constId !== undefined && vFromEl.bK_ === constId) {
|
660
660
|
return;
|
661
661
|
}
|
662
662
|
|
@@ -13,13 +13,13 @@ function forEachOption(el, fn, i) {
|
|
13
13
|
var curChild = el._r_;
|
14
14
|
|
15
15
|
while (curChild) {
|
16
|
-
if (curChild.
|
16
|
+
if (curChild.bI_ === "option") {
|
17
17
|
fn(curChild, ++i);
|
18
18
|
} else {
|
19
19
|
i = forEachOption(curChild, fn, i);
|
20
20
|
}
|
21
21
|
|
22
|
-
curChild = curChild.
|
22
|
+
curChild = curChild.bT_;
|
23
23
|
}
|
24
24
|
|
25
25
|
return i;
|
@@ -52,13 +52,13 @@ SpecialElHandlers.prototype = {
|
|
52
52
|
fromEl.value = toEl.q_;
|
53
53
|
}
|
54
54
|
|
55
|
-
if (fromEl.hasAttribute("value") && !toEl.
|
55
|
+
if (fromEl.hasAttribute("value") && !toEl.bM_("value")) {
|
56
56
|
fromEl.removeAttribute("value");
|
57
57
|
}
|
58
58
|
},
|
59
59
|
|
60
60
|
textarea: function (fromEl, toEl) {
|
61
|
-
if (toEl.
|
61
|
+
if (toEl.bW_) {
|
62
62
|
return;
|
63
63
|
}
|
64
64
|
|
@@ -84,12 +84,12 @@ SpecialElHandlers.prototype = {
|
|
84
84
|
}
|
85
85
|
},
|
86
86
|
select: function (fromEl, toEl) {
|
87
|
-
if (!toEl.
|
87
|
+
if (!toEl.bM_("multiple")) {
|
88
88
|
var selected = 0;
|
89
89
|
forEachOption(
|
90
90
|
toEl,
|
91
91
|
function (option, i) {
|
92
|
-
if (option.
|
92
|
+
if (option.bM_("selected")) {
|
93
93
|
selected = i;
|
94
94
|
}
|
95
95
|
},
|
@@ -11,7 +11,7 @@ var specialHtmlRegexp = /[&<]/;
|
|
11
11
|
function virtualizeChildNodes(node, vdomParent, ownerComponent) {
|
12
12
|
var curChild = node.firstChild;
|
13
13
|
while (curChild) {
|
14
|
-
vdomParent.
|
14
|
+
vdomParent.bs_(virtualize(curChild, ownerComponent));
|
15
15
|
curChild = curChild.nextSibling;
|
16
16
|
}
|
17
17
|
}
|
@@ -19,7 +19,7 @@ function virtualizeChildNodes(node, vdomParent, ownerComponent) {
|
|
19
19
|
function virtualize(node, ownerComponent) {
|
20
20
|
switch (node.nodeType) {
|
21
21
|
case 1:
|
22
|
-
return VElement.
|
22
|
+
return VElement.bO_(node, virtualizeChildNodes, ownerComponent);
|
23
23
|
case 3:
|
24
24
|
return new VText(node.nodeValue, ownerComponent);
|
25
25
|
case 11:
|
@@ -38,7 +38,7 @@ function virtualizeHTML(html, ownerComponent) {
|
|
38
38
|
var curChild = parseHTML(html);
|
39
39
|
|
40
40
|
while (curChild) {
|
41
|
-
vdomFragment.
|
41
|
+
vdomFragment.bs_(virtualize(curChild, ownerComponent));
|
42
42
|
curChild = curChild.nextSibling;
|
43
43
|
}
|
44
44
|
|
@@ -65,19 +65,19 @@ Node_prototype.t = function (value) {
|
|
65
65
|
}
|
66
66
|
}
|
67
67
|
|
68
|
-
this.
|
69
|
-
return this.
|
68
|
+
this.bs_(vdomNode || new VText(value.toString()));
|
69
|
+
return this.bL_();
|
70
70
|
};
|
71
71
|
|
72
|
-
Node_prototype.
|
73
|
-
return this.
|
72
|
+
Node_prototype.bx_ = function () {
|
73
|
+
return this.bs_(new VDocumentFragment());
|
74
74
|
};
|
75
75
|
|
76
|
-
exports.
|
77
|
-
exports.
|
78
|
-
exports.
|
79
|
-
exports.
|
80
|
-
exports.
|
81
|
-
exports.
|
82
|
-
exports.
|
76
|
+
exports.bc_ = VDocumentFragment;
|
77
|
+
exports.bb_ = VElement;
|
78
|
+
exports.bd_ = VText;
|
79
|
+
exports.be_ = VComponent;
|
80
|
+
exports.bf_ = VFragment;
|
81
|
+
exports.bO_ = virtualize;
|
82
|
+
exports.bg_ = virtualizeHTML;
|
83
83
|
//# sourceMappingURL=vdom.js.map
|
package/package.json
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
{
|
2
2
|
"name": "marko",
|
3
|
-
"version": "5.17.
|
3
|
+
"version": "5.17.7",
|
4
4
|
"license": "MIT",
|
5
5
|
"description": "UI Components + streaming, async, high performance, HTML templating for Node.js and the browser.",
|
6
6
|
"dependencies": {
|
7
7
|
"@marko/compiler": "^5.17.6",
|
8
|
-
"@marko/translator-default": "^5.17.
|
8
|
+
"@marko/translator-default": "^5.17.7",
|
9
9
|
"app-module-path": "^2.2.0",
|
10
10
|
"argly": "^1.2.0",
|
11
11
|
"browser-refresh-client": "1.1.4",
|
@@ -72,5 +72,5 @@
|
|
72
72
|
"index.js",
|
73
73
|
"node-require.js"
|
74
74
|
],
|
75
|
-
"gitHead": "
|
75
|
+
"gitHead": "38c4498f3a4e1f6a46275d6e444c340d04bd8648"
|
76
76
|
}
|
@@ -4,7 +4,7 @@ var updatesScheduled = false;
|
|
4
4
|
var batchStack = []; // A stack of batched updates
|
5
5
|
var unbatchedQueue = []; // Used for scheduled batched updates
|
6
6
|
|
7
|
-
var setImmediate = require("../setImmediate");
|
7
|
+
var setImmediate = require("../setImmediate").___setImmediate;
|
8
8
|
|
9
9
|
/**
|
10
10
|
* This function is called when we schedule the update of "unbatched"
|
@@ -1,5 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
|
+
const immediate = require("../setImmediate");
|
3
4
|
const StringWriter = require("./StringWriter");
|
4
5
|
|
5
6
|
/**
|
@@ -18,7 +19,7 @@ BufferedWriter.prototype = Object.assign(
|
|
18
19
|
{
|
19
20
|
scheduleFlush() {
|
20
21
|
if (!this._scheduled) {
|
21
|
-
this._scheduled =
|
22
|
+
this._scheduled = immediate.___setImmediate(flush.bind(0, this));
|
22
23
|
}
|
23
24
|
},
|
24
25
|
|
@@ -41,7 +42,8 @@ function flush(writer) {
|
|
41
42
|
writer._wrapped.flush();
|
42
43
|
}
|
43
44
|
}
|
44
|
-
|
45
|
+
|
46
|
+
immediate.___clearImmediate(writer._scheduled);
|
45
47
|
writer._scheduled = null;
|
46
48
|
}
|
47
49
|
|
@@ -3,7 +3,7 @@ var encoder = new TextEncoder();
|
|
3
3
|
module.exports = function (data) {
|
4
4
|
// eslint-disable-next-line no-undef
|
5
5
|
var transformStream = new TransformStream();
|
6
|
-
var writer = transformStream.getWriter();
|
6
|
+
var writer = transformStream.writable.getWriter();
|
7
7
|
var out = this.createOut(
|
8
8
|
data && data.$global,
|
9
9
|
{
|
@@ -1,5 +1,5 @@
|
|
1
1
|
var defaultCreateOut = require("./createOut");
|
2
|
-
var setImmediate = require("./setImmediate");
|
2
|
+
var setImmediate = require("./setImmediate").___setImmediate;
|
3
3
|
var extend = require("raptor-util/extend");
|
4
4
|
|
5
5
|
function safeRender(renderFunc, finalData, finalOut, shouldEnd) {
|
@@ -1,16 +1,2 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
channel.port1.onmessage = function () {
|
5
|
-
var callbacks = queue;
|
6
|
-
queue = [];
|
7
|
-
for (var i = 0; i < callbacks.length; i++) {
|
8
|
-
callbacks[i]();
|
9
|
-
}
|
10
|
-
};
|
11
|
-
|
12
|
-
module.exports = function (cb) {
|
13
|
-
if (queue.push(cb) === 1) {
|
14
|
-
channel.port2.postMessage(0);
|
15
|
-
}
|
16
|
-
};
|
1
|
+
exports.___setImmediate = setTimeout;
|
2
|
+
exports.___clearImmediate = clearTimeout;
|