marko 5.33.9 → 5.33.10
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/core-tags/core/await/AsyncValue.js +21 -21
- package/dist/core-tags/core/await/renderer.js +11 -11
- package/dist/core-tags/core/await/reorderer-renderer.js +3 -3
- package/dist/node_modules/@internal/components-beginComponent/index-browser.js +4 -4
- package/dist/node_modules/@internal/components-beginComponent/index.js +11 -11
- package/dist/node_modules/@internal/components-define-widget-legacy/index-browser.js +45 -45
- package/dist/node_modules/@internal/components-define-widget-legacy/index.js +3 -3
- package/dist/node_modules/@internal/components-endComponent/index.js +3 -3
- package/dist/node_modules/@internal/components-entry/index-browser.js +2 -2
- package/dist/node_modules/@internal/components-entry/index.js +16 -16
- package/dist/node_modules/@internal/components-entry-legacy/index-browser.js +6 -6
- package/dist/node_modules/@internal/components-registry/index-browser.js +46 -46
- package/dist/node_modules/@internal/components-registry/index.js +2 -2
- package/dist/node_modules/@internal/components-util/index-browser.js +20 -20
- package/dist/node_modules/@internal/components-util/index.js +10 -10
- 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 +7 -7
- package/dist/node_modules/@internal/preserve-tag/index.js +5 -5
- package/dist/node_modules/@internal/set-immediate/index-browser.js +4 -2
- package/dist/node_modules/@internal/set-immediate/index-worker.js +31 -2
- package/dist/node_modules/@internal/set-immediate/index.js +3 -2
- package/dist/node_modules/@internal/set-immediate/queueMicrotask.js +8 -0
- package/dist/runtime/RenderResult.js +8 -8
- package/dist/runtime/components/Component.js +145 -145
- package/dist/runtime/components/ComponentDef.js +28 -28
- package/dist/runtime/components/ComponentsContext.js +15 -15
- package/dist/runtime/components/GlobalComponentsContext.js +4 -4
- package/dist/runtime/components/KeySequence.js +3 -3
- package/dist/runtime/components/ServerComponent.js +13 -13
- package/dist/runtime/components/State.js +26 -26
- package/dist/runtime/components/attach-detach.js +8 -8
- package/dist/runtime/components/defineComponent.js +5 -5
- package/dist/runtime/components/dom-data.js +5 -5
- package/dist/runtime/components/event-delegation.js +10 -10
- package/dist/runtime/components/legacy/defineComponent-legacy.js +1 -1
- package/dist/runtime/components/legacy/defineRenderer-legacy.js +16 -16
- package/dist/runtime/components/legacy/dependencies/index.js +7 -7
- package/dist/runtime/components/legacy/renderer-legacy.js +43 -43
- package/dist/runtime/components/renderer.js +36 -36
- 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 +16 -16
- package/dist/runtime/helpers/render-tag.js +1 -1
- package/dist/runtime/helpers/style-value.js +1 -1
- package/dist/runtime/helpers/tags-compat/runtime-dom.js +21 -21
- package/dist/runtime/helpers/tags-compat/runtime-html.js +8 -8
- package/dist/runtime/html/AsyncStream.js +31 -28
- package/dist/runtime/html/BufferedWriter.js +2 -2
- package/dist/runtime/html/StringWriter.js +1 -1
- 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 +6 -6
- 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/vdom/AsyncVDOMBuilder.js +96 -96
- package/dist/runtime/vdom/VComponent.js +5 -5
- package/dist/runtime/vdom/VDocumentFragment.js +7 -7
- package/dist/runtime/vdom/VElement.js +42 -42
- 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 +21 -21
- package/dist/runtime/vdom/index.js +2 -2
- 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 +77 -77
- package/dist/runtime/vdom/vdom.js +14 -14
- package/package.json +3 -3
- package/src/core-tags/core/await/AsyncValue.js +1 -1
- package/src/node_modules/@internal/components-registry/index-browser.js +2 -2
- package/src/node_modules/@internal/set-immediate/index-browser.js +2 -0
- package/src/node_modules/@internal/set-immediate/index-worker.js +31 -2
- package/src/node_modules/@internal/set-immediate/index.js +1 -0
- package/src/node_modules/@internal/set-immediate/queueMicrotask.js +8 -0
- package/src/runtime/html/AsyncStream.js +4 -1
- package/src/runtime/vdom/hot-reload.js +2 -2
- package/dist/runtime/queueMicrotask.js +0 -14
- package/src/runtime/queueMicrotask.js +0 -14
@@ -2,78 +2,78 @@
|
|
2
2
|
function VNode() {}
|
3
3
|
|
4
4
|
VNode.prototype = {
|
5
|
-
|
6
|
-
this.
|
7
|
-
this.
|
8
|
-
this.
|
9
|
-
this.
|
10
|
-
this.bW_ = null;
|
5
|
+
bU_: function (finalChildCount, ownerComponent) {
|
6
|
+
this.ch_ = finalChildCount;
|
7
|
+
this.ci_ = 0;
|
8
|
+
this.c__ = null;
|
9
|
+
this.cj_ = null;
|
11
10
|
this.bX_ = null;
|
12
|
-
this.
|
11
|
+
this.bY_ = null;
|
12
|
+
this._L_ = ownerComponent;
|
13
13
|
},
|
14
14
|
|
15
|
-
get
|
16
|
-
var firstChild = this.
|
15
|
+
get az_() {
|
16
|
+
var firstChild = this.c__;
|
17
17
|
|
18
|
-
if (firstChild && firstChild.
|
19
|
-
var nestedFirstChild = firstChild.
|
18
|
+
if (firstChild && firstChild.bZ_) {
|
19
|
+
var nestedFirstChild = firstChild.az_;
|
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.ck_;
|
25
25
|
}
|
26
26
|
|
27
27
|
return firstChild;
|
28
28
|
},
|
29
29
|
|
30
|
-
get
|
31
|
-
var nextSibling = this.
|
30
|
+
get ck_() {
|
31
|
+
var nextSibling = this.bY_;
|
32
32
|
|
33
33
|
if (nextSibling) {
|
34
|
-
if (nextSibling.
|
35
|
-
var firstChild = nextSibling.
|
36
|
-
return firstChild || nextSibling.
|
34
|
+
if (nextSibling.bZ_) {
|
35
|
+
var firstChild = nextSibling.az_;
|
36
|
+
return firstChild || nextSibling.ck_;
|
37
37
|
}
|
38
38
|
} else {
|
39
|
-
var parentNode = this.
|
40
|
-
if (parentNode && parentNode.
|
41
|
-
return parentNode.
|
39
|
+
var parentNode = this.bX_;
|
40
|
+
if (parentNode && parentNode.bZ_) {
|
41
|
+
return parentNode.ck_;
|
42
42
|
}
|
43
43
|
}
|
44
44
|
|
45
45
|
return nextSibling;
|
46
46
|
},
|
47
47
|
|
48
|
-
|
49
|
-
this.
|
48
|
+
bN_: function (child) {
|
49
|
+
this.ci_++;
|
50
50
|
|
51
|
-
if (this.
|
52
|
-
if (child.
|
53
|
-
this.
|
51
|
+
if (this.cb_ === "textarea") {
|
52
|
+
if (child.cl_) {
|
53
|
+
this.cc_ += child.cm_;
|
54
54
|
} else {
|
55
55
|
throw TypeError();
|
56
56
|
}
|
57
57
|
} else {
|
58
|
-
var lastChild = this.
|
58
|
+
var lastChild = this.cj_;
|
59
59
|
|
60
|
-
child.
|
60
|
+
child.bX_ = this;
|
61
61
|
|
62
62
|
if (lastChild) {
|
63
|
-
lastChild.
|
63
|
+
lastChild.bY_ = child;
|
64
64
|
} else {
|
65
|
-
this.
|
65
|
+
this.c__ = child;
|
66
66
|
}
|
67
67
|
|
68
|
-
this.
|
68
|
+
this.cj_ = child;
|
69
69
|
}
|
70
70
|
|
71
71
|
return child;
|
72
72
|
},
|
73
73
|
|
74
|
-
|
75
|
-
if (this.
|
76
|
-
return this.
|
74
|
+
ce_: function finishChild() {
|
75
|
+
if (this.ci_ === this.ch_ && this.bX_) {
|
76
|
+
return this.bX_.ce_();
|
77
77
|
} else {
|
78
78
|
return this;
|
79
79
|
}
|
@@ -2,21 +2,21 @@
|
|
2
2
|
var VNode = require("./VNode");
|
3
3
|
|
4
4
|
function VText(value, ownerComponent) {
|
5
|
-
this.
|
6
|
-
this.
|
5
|
+
this.bU_(-1 /* no children */, ownerComponent);
|
6
|
+
this.cm_ = value;
|
7
7
|
}
|
8
8
|
|
9
9
|
VText.prototype = {
|
10
|
-
|
10
|
+
cl_: true,
|
11
11
|
|
12
|
-
|
12
|
+
bW_: 3,
|
13
13
|
|
14
|
-
|
15
|
-
return (host.ownerDocument || host).createTextNode(this.
|
14
|
+
bm_: function (host) {
|
15
|
+
return (host.ownerDocument || host).createTextNode(this.cm_);
|
16
16
|
},
|
17
17
|
|
18
|
-
|
19
|
-
return new VText(this.
|
18
|
+
bO_: function () {
|
19
|
+
return new VText(this.cm_);
|
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").bw_;
|
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.bN_(
|
17
17
|
new ConstVElement(tagName, attrs, childCount)
|
18
18
|
);
|
19
19
|
|
20
20
|
if (childCount === 0) {
|
21
|
-
return this.
|
21
|
+
return this.ce_();
|
22
22
|
} else {
|
23
23
|
return child;
|
24
24
|
}
|
@@ -1,10 +1,10 @@
|
|
1
1
|
"use strict";var registry = require("@internal/components-registry");
|
2
|
+
var setImmediate = require("@internal/set-immediate")._i_;
|
2
3
|
var updateManager = require("../components/update-manager");
|
3
|
-
var queueMicrotask = require("../queueMicrotask");
|
4
4
|
var runtime = require(".");
|
5
5
|
|
6
6
|
var createTemplate = runtime.t;
|
7
|
-
var createComponent = registry.
|
7
|
+
var createComponent = registry._E_;
|
8
8
|
var registered = {};
|
9
9
|
var instancesByType = {};
|
10
10
|
var queue;
|
@@ -27,37 +27,37 @@ exports.t = runtime.t = function (typeName) {
|
|
27
27
|
if (instances.size) {
|
28
28
|
if (!queue) {
|
29
29
|
queue = [];
|
30
|
-
|
30
|
+
setImmediate(batchUpdate);
|
31
31
|
}
|
32
32
|
|
33
33
|
queue.push(function () {
|
34
|
-
var newProto = registry.
|
34
|
+
var newProto = registry._F_(typeName).prototype;
|
35
35
|
instances.forEach(function (instance) {
|
36
36
|
if (hasLifecycleChanged(instance.__proto__, newProto)) {
|
37
|
-
var renderer = instance.
|
38
|
-
instance.
|
39
|
-
instance.
|
37
|
+
var renderer = instance.Q_;
|
38
|
+
instance.Q_ = (input, out) => {
|
39
|
+
instance.aE_(input, out);
|
40
40
|
if (instance.onInput) {
|
41
41
|
input = instance.onInput(input, out) || input;
|
42
42
|
}
|
43
|
-
instance.
|
44
|
-
instance.
|
43
|
+
instance.Q_ = renderer;
|
44
|
+
instance.Q_(input, out);
|
45
45
|
};
|
46
46
|
|
47
|
-
instance.
|
48
|
-
instance.
|
49
|
-
instance.
|
47
|
+
instance.cn_ = true;
|
48
|
+
instance.an_();
|
49
|
+
instance._v_ = false;
|
50
50
|
|
51
|
-
if (instance.
|
52
|
-
instance.
|
53
|
-
instance.
|
51
|
+
if (instance.ah_) {
|
52
|
+
instance.ah_.removeAllListeners();
|
53
|
+
instance.ah_ = null;
|
54
54
|
}
|
55
55
|
}
|
56
56
|
|
57
57
|
instance.__proto__ = newProto;
|
58
|
-
instance.
|
59
|
-
instance.
|
60
|
-
afterInsert(instance.
|
58
|
+
instance._D_(
|
59
|
+
instance.O_, false).
|
60
|
+
afterInsert(instance.B_);
|
61
61
|
});
|
62
62
|
});
|
63
63
|
}
|
@@ -71,14 +71,14 @@ exports.t = runtime.t = function (typeName) {
|
|
71
71
|
}
|
72
72
|
};
|
73
73
|
|
74
|
-
registry.
|
74
|
+
registry._E_ = function (typeName, id) {
|
75
75
|
var instances = instancesByType[typeName];
|
76
76
|
var instance = createComponent(typeName, id);
|
77
77
|
|
78
78
|
if (instances) {
|
79
79
|
instances.add(instance);
|
80
80
|
instance.once("destroy", function () {
|
81
|
-
if (!instance.
|
81
|
+
if (!instance.cn_) {
|
82
82
|
instances.delete(instance);
|
83
83
|
}
|
84
84
|
});
|
@@ -104,7 +104,7 @@ function hasLifecycleChanged(oldProto, newProto) {
|
|
104
104
|
}
|
105
105
|
|
106
106
|
function batchUpdate() {
|
107
|
-
updateManager.
|
107
|
+
updateManager.ax_(function () {
|
108
108
|
var pending = queue;
|
109
109
|
queue = undefined;
|
110
110
|
|
@@ -15,11 +15,11 @@ exports.t = function createTemplate(typeName) {
|
|
15
15
|
};
|
16
16
|
|
17
17
|
function Template(typeName) {
|
18
|
-
this.path = this.
|
18
|
+
this.path = this.R_ = typeName;
|
19
19
|
}
|
20
20
|
|
21
21
|
var AsyncVDOMBuilder = require("./AsyncVDOMBuilder");
|
22
|
-
require("../createOut").
|
22
|
+
require("../createOut").bc_(
|
23
23
|
Template.prototype.createOut = function createOut(
|
24
24
|
globalData,
|
25
25
|
parent,
|
@@ -1,5 +1,5 @@
|
|
1
1
|
"use strict";var helpers = require("./helpers");
|
2
|
-
var insertBefore = helpers.
|
2
|
+
var insertBefore = helpers.bd_;
|
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.co_ = function (nextNode) {
|
84
|
+
fragment.co_ = null;
|
85
85
|
insertBefore(
|
86
86
|
fragment.endNode,
|
87
87
|
nextNode,
|
@@ -91,5 +91,5 @@ function beginFragmentNode(startNode, parentNode) {
|
|
91
91
|
return fragment;
|
92
92
|
}
|
93
93
|
|
94
|
-
exports.
|
95
|
-
exports.
|
94
|
+
exports._j_ = createFragmentNode;
|
95
|
+
exports.cp_ = beginFragmentNode;
|
@@ -35,8 +35,8 @@ function removeChild(node) {
|
|
35
35
|
node.parentNode.removeChild(node);
|
36
36
|
}
|
37
37
|
|
38
|
-
exports.
|
39
|
-
exports.
|
40
|
-
exports.
|
41
|
-
exports.
|
42
|
-
exports.
|
38
|
+
exports.bd_ = insertBefore;
|
39
|
+
exports.be_ = insertAfter;
|
40
|
+
exports.ck_ = nextSibling;
|
41
|
+
exports.az_ = firstChild;
|
42
|
+
exports.bf_ = removeChild;
|