marko 5.35.7 → 5.35.8
Sign up to get free protection for your applications and to get access to all the features.
- package/bin/markoc.js +0 -2
- package/dist/compiler/index.js +2 -0
- package/dist/core-tags/core/await/AsyncValue.js +1 -0
- package/dist/core-tags/core/await/renderer.js +1 -0
- package/dist/node-require/hot-reload.js +1 -3
- package/dist/node-require/index.js +1 -1
- package/dist/node_modules/@internal/components-define-widget-legacy/index-browser.js +4 -2
- package/dist/node_modules/@internal/components-entry/index.js +13 -13
- package/dist/node_modules/@internal/components-entry-legacy/index-browser.js +4 -3
- package/dist/node_modules/@internal/components-registry/index-browser.js +40 -36
- 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 +7 -7
- package/dist/node_modules/@internal/create-readable/index-browser.js +2 -2
- 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/require/index-webpack.js +1 -0
- 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 +4 -3
- package/dist/runtime/components/Component.js +107 -106
- package/dist/runtime/components/ComponentDef.js +25 -25
- package/dist/runtime/components/ComponentsContext.js +6 -6
- package/dist/runtime/components/GlobalComponentsContext.js +3 -3
- package/dist/runtime/components/KeySequence.js +3 -3
- package/dist/runtime/components/ServerComponent.js +8 -7
- package/dist/runtime/components/State.js +20 -24
- package/dist/runtime/components/attach-detach.js +7 -7
- package/dist/runtime/components/defineComponent.js +0 -1
- package/dist/runtime/components/dom-data.js +5 -5
- package/dist/runtime/components/event-delegation.js +10 -10
- package/dist/runtime/components/legacy/defineRenderer-legacy.js +14 -13
- package/dist/runtime/components/legacy/dependencies/index.js +9 -10
- package/dist/runtime/components/legacy/jquery.js +1 -0
- package/dist/runtime/components/legacy/renderer-legacy.js +33 -32
- package/dist/runtime/components/renderer.js +29 -29
- 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 +18 -13
- package/dist/runtime/helpers/render-tag.js +1 -1
- package/dist/runtime/helpers/serialize-noop.js +5 -0
- package/dist/runtime/helpers/style-value.js +1 -1
- package/dist/runtime/helpers/tags-compat/dom-debug.mjs +1 -0
- package/dist/runtime/helpers/tags-compat/dom.mjs +1 -0
- package/dist/runtime/helpers/tags-compat/html-debug.js +1 -1
- package/dist/runtime/helpers/tags-compat/html-debug.mjs +3 -2
- package/dist/runtime/helpers/tags-compat/html.js +3 -1
- package/dist/runtime/helpers/tags-compat/html.mjs +3 -2
- package/dist/runtime/helpers/tags-compat/runtime-dom.js +38 -35
- package/dist/runtime/helpers/tags-compat/runtime-html.js +24 -65
- package/dist/runtime/html/AsyncStream.js +25 -24
- 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 +4 -3
- package/dist/runtime/html/helpers/attrs.js +1 -0
- package/dist/runtime/html/helpers/data-marko.js +2 -3
- package/dist/runtime/html/helpers/escape-quotes.js +1 -1
- package/dist/runtime/html/helpers/escape-xml.js +1 -1
- package/dist/runtime/html/helpers/merge-attrs.js +1 -0
- package/dist/runtime/html/index.js +1 -1
- package/dist/runtime/renderable.js +5 -5
- package/dist/runtime/vdom/AsyncVDOMBuilder.js +86 -85
- package/dist/runtime/vdom/VComponent.js +4 -4
- package/dist/runtime/vdom/VDocumentFragment.js +7 -7
- package/dist/runtime/vdom/VElement.js +41 -42
- package/dist/runtime/vdom/VFragment.js +9 -9
- package/dist/runtime/vdom/VNode.js +34 -35
- package/dist/runtime/vdom/VText.js +8 -8
- package/dist/runtime/vdom/helpers/attrs.js +1 -0
- 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 +67 -68
- package/dist/runtime/vdom/vdom.js +14 -14
- package/dist/taglib/index.js +1 -0
- package/index.d.ts +1 -5
- package/package.json +2 -2
- package/src/compiler/index.js +2 -0
- package/src/core-tags/core/await/AsyncValue.js +1 -0
- package/src/core-tags/core/await/renderer.js +1 -0
- package/src/node-require/hot-reload.js +0 -2
- package/src/node-require/index.js +1 -1
- package/src/node_modules/@internal/components-define-widget-legacy/index-browser.js +4 -2
- package/src/node_modules/@internal/components-entry/index.js +2 -2
- package/src/node_modules/@internal/components-entry-legacy/index-browser.js +1 -0
- package/src/node_modules/@internal/components-registry/index-browser.js +8 -4
- package/src/node_modules/@internal/components-util/index-browser.js +1 -1
- package/src/node_modules/@internal/create-readable/index-browser.js +1 -1
- package/src/node_modules/@internal/require/index-webpack.js +1 -0
- package/src/runtime/RenderResult.js +1 -0
- package/src/runtime/components/Component.js +2 -1
- package/src/runtime/components/ComponentDef.js +4 -4
- package/src/runtime/components/ServerComponent.js +1 -0
- package/src/runtime/components/State.js +6 -10
- package/src/runtime/components/defineComponent.js +0 -1
- package/src/runtime/components/legacy/defineRenderer-legacy.js +1 -0
- package/src/runtime/components/legacy/dependencies/index.js +0 -1
- package/src/runtime/components/legacy/jquery.js +1 -0
- package/src/runtime/components/legacy/renderer-legacy.js +1 -0
- package/src/runtime/helpers/dynamic-tag.js +11 -6
- package/src/runtime/helpers/serialize-noop.js +5 -0
- package/src/runtime/helpers/tags-compat/dom-debug.mjs +1 -0
- package/src/runtime/helpers/tags-compat/dom.mjs +1 -0
- package/src/runtime/helpers/tags-compat/html-debug.js +1 -1
- package/src/runtime/helpers/tags-compat/html-debug.mjs +3 -2
- package/src/runtime/helpers/tags-compat/html.js +3 -1
- package/src/runtime/helpers/tags-compat/html.mjs +3 -2
- package/src/runtime/helpers/tags-compat/runtime-dom.js +23 -20
- package/src/runtime/helpers/tags-compat/runtime-html.js +18 -59
- package/src/runtime/html/AsyncStream.js +1 -0
- package/src/runtime/html/helpers/attr.js +1 -0
- package/src/runtime/html/helpers/attrs.js +1 -0
- package/src/runtime/html/helpers/data-marko.js +0 -1
- package/src/runtime/html/helpers/merge-attrs.js +1 -0
- package/src/runtime/vdom/AsyncVDOMBuilder.js +1 -0
- package/src/runtime/vdom/VElement.js +1 -2
- package/src/runtime/vdom/VNode.js +0 -1
- package/src/runtime/vdom/helpers/attrs.js +1 -0
- package/src/runtime/vdom/morphdom/index.js +0 -1
- package/src/taglib/index.js +1 -0
- package/tags-html.d.ts +7 -9
@@ -1,79 +1,78 @@
|
|
1
|
-
"use strict";
|
2
|
-
function VNode() {}
|
1
|
+
"use strict";function VNode() {}
|
3
2
|
|
4
3
|
VNode.prototype = {
|
5
|
-
|
6
|
-
this.
|
7
|
-
this.
|
4
|
+
bX_: function (finalChildCount, ownerComponent) {
|
5
|
+
this.ck_ = finalChildCount;
|
6
|
+
this.cl_ = 0;
|
7
|
+
this.cc_ = null;
|
8
|
+
this.cm_ = null;
|
8
9
|
this.c__ = null;
|
9
|
-
this.
|
10
|
-
this.
|
11
|
-
this.bY_ = null;
|
12
|
-
this._L_ = ownerComponent;
|
10
|
+
this.ca_ = null;
|
11
|
+
this._M_ = ownerComponent;
|
13
12
|
},
|
14
13
|
|
15
|
-
get
|
16
|
-
var firstChild = this.
|
14
|
+
get aA_() {
|
15
|
+
var firstChild = this.cc_;
|
17
16
|
|
18
|
-
if (firstChild && firstChild.
|
19
|
-
var nestedFirstChild = firstChild.
|
17
|
+
if (firstChild && firstChild.cb_) {
|
18
|
+
var nestedFirstChild = firstChild.aA_;
|
20
19
|
// The first child is a DocumentFragment node.
|
21
20
|
// If the DocumentFragment node has a first child then we will return that.
|
22
21
|
// Otherwise, the DocumentFragment node is not *really* the first child and
|
23
22
|
// we need to skip to its next sibling
|
24
|
-
return nestedFirstChild || firstChild.
|
23
|
+
return nestedFirstChild || firstChild.cn_;
|
25
24
|
}
|
26
25
|
|
27
26
|
return firstChild;
|
28
27
|
},
|
29
28
|
|
30
|
-
get
|
31
|
-
var nextSibling = this.
|
29
|
+
get cn_() {
|
30
|
+
var nextSibling = this.ca_;
|
32
31
|
|
33
32
|
if (nextSibling) {
|
34
|
-
if (nextSibling.
|
35
|
-
var firstChild = nextSibling.
|
36
|
-
return firstChild || nextSibling.
|
33
|
+
if (nextSibling.cb_) {
|
34
|
+
var firstChild = nextSibling.aA_;
|
35
|
+
return firstChild || nextSibling.cn_;
|
37
36
|
}
|
38
37
|
} else {
|
39
|
-
var parentNode = this.
|
40
|
-
if (parentNode && parentNode.
|
41
|
-
return parentNode.
|
38
|
+
var parentNode = this.c__;
|
39
|
+
if (parentNode && parentNode.cb_) {
|
40
|
+
return parentNode.cn_;
|
42
41
|
}
|
43
42
|
}
|
44
43
|
|
45
44
|
return nextSibling;
|
46
45
|
},
|
47
46
|
|
48
|
-
|
49
|
-
this.
|
47
|
+
bQ_: function (child) {
|
48
|
+
this.cl_++;
|
50
49
|
|
51
|
-
if (this.
|
52
|
-
if (child.
|
53
|
-
this.
|
50
|
+
if (this.ce_ === "textarea") {
|
51
|
+
if (child.co_) {
|
52
|
+
this.cf_ += child.cp_;
|
54
53
|
} else {
|
55
54
|
throw TypeError();
|
56
55
|
}
|
57
56
|
} else {
|
58
|
-
var lastChild = this.
|
57
|
+
var lastChild = this.cm_;
|
59
58
|
|
60
|
-
child.
|
59
|
+
child.c__ = this;
|
61
60
|
|
62
61
|
if (lastChild) {
|
63
|
-
lastChild.
|
62
|
+
lastChild.ca_ = child;
|
64
63
|
} else {
|
65
|
-
this.
|
64
|
+
this.cc_ = child;
|
66
65
|
}
|
67
66
|
|
68
|
-
this.
|
67
|
+
this.cm_ = child;
|
69
68
|
}
|
70
69
|
|
71
70
|
return child;
|
72
71
|
},
|
73
72
|
|
74
|
-
|
75
|
-
if (this.
|
76
|
-
return this.
|
73
|
+
ch_: function finishChild() {
|
74
|
+
if (this.cl_ === this.ck_ && this.c__) {
|
75
|
+
return this.c__.ch_();
|
77
76
|
} else {
|
78
77
|
return this;
|
79
78
|
}
|
@@ -2,21 +2,21 @@
|
|
2
2
|
var VNode = require("./VNode");
|
3
3
|
|
4
4
|
function VText(value, ownerComponent) {
|
5
|
-
this.
|
6
|
-
this.
|
5
|
+
this.bX_(-1 /* no children */, ownerComponent);
|
6
|
+
this.cp_ = value;
|
7
7
|
}
|
8
8
|
|
9
9
|
VText.prototype = {
|
10
|
-
|
10
|
+
co_: true,
|
11
11
|
|
12
|
-
|
12
|
+
bZ_: 3,
|
13
13
|
|
14
|
-
|
15
|
-
return (host.ownerDocument || host).createTextNode(this.
|
14
|
+
bo_: function (host) {
|
15
|
+
return (host.ownerDocument || host).createTextNode(this.cp_);
|
16
16
|
},
|
17
17
|
|
18
|
-
|
19
|
-
return new VText(this.
|
18
|
+
bR_: function () {
|
19
|
+
return new VText(this.cp_);
|
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").bz_;
|
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.bQ_(
|
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
|
}
|
@@ -1,10 +1,10 @@
|
|
1
1
|
"use strict";var registry = require("@internal/components-registry");
|
2
|
-
var setImmediate = require("@internal/set-immediate").
|
2
|
+
var setImmediate = require("@internal/set-immediate")._j_;
|
3
3
|
var updateManager = require("../components/update-manager");
|
4
4
|
var runtime = require(".");
|
5
5
|
|
6
6
|
var createTemplate = runtime.t;
|
7
|
-
var createComponent = registry.
|
7
|
+
var createComponent = registry._G_;
|
8
8
|
var registered = {};
|
9
9
|
var instancesByType = {};
|
10
10
|
var queue;
|
@@ -31,12 +31,12 @@ exports.t = runtime.t = function (typeName) {
|
|
31
31
|
}
|
32
32
|
|
33
33
|
queue.push(function () {
|
34
|
-
var newProto = registry.
|
34
|
+
var newProto = registry._H_(typeName).prototype;
|
35
35
|
instances.forEach(function (instance) {
|
36
36
|
if (hasLifecycleChanged(instance.__proto__, newProto)) {
|
37
37
|
var renderer = instance.Q_;
|
38
38
|
instance.Q_ = (input, out) => {
|
39
|
-
instance.
|
39
|
+
instance.aF_(input, out);
|
40
40
|
if (instance.onInput) {
|
41
41
|
input = instance.onInput(input, out) || input;
|
42
42
|
}
|
@@ -44,18 +44,18 @@ exports.t = runtime.t = function (typeName) {
|
|
44
44
|
instance.Q_(input, out);
|
45
45
|
};
|
46
46
|
|
47
|
-
instance.
|
48
|
-
instance.
|
49
|
-
instance.
|
47
|
+
instance.cq_ = true;
|
48
|
+
instance.ao_();
|
49
|
+
instance._x_ = false;
|
50
50
|
|
51
|
-
if (instance.
|
52
|
-
instance.
|
53
|
-
instance.
|
51
|
+
if (instance.ai_) {
|
52
|
+
instance.ai_.removeAllListeners();
|
53
|
+
instance.ai_ = null;
|
54
54
|
}
|
55
55
|
}
|
56
56
|
|
57
57
|
instance.__proto__ = newProto;
|
58
|
-
instance.
|
58
|
+
instance._F_(
|
59
59
|
instance.O_, false).
|
60
60
|
afterInsert(instance.B_);
|
61
61
|
});
|
@@ -71,14 +71,14 @@ exports.t = runtime.t = function (typeName) {
|
|
71
71
|
}
|
72
72
|
};
|
73
73
|
|
74
|
-
registry.
|
74
|
+
registry._G_ = 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.cq_) {
|
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.ay_(function () {
|
108
108
|
var pending = queue;
|
109
109
|
queue = undefined;
|
110
110
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
"use strict";var helpers = require("./helpers");
|
2
|
-
var insertBefore = helpers.
|
2
|
+
var insertBefore = helpers.bf_;
|
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.cr_ = function (nextNode) {
|
84
|
+
fragment.cr_ = 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._k_ = createFragmentNode;
|
95
|
+
exports.cs_ = 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.bf_ = insertBefore;
|
39
|
+
exports.bg_ = insertAfter;
|
40
|
+
exports.cn_ = nextSibling;
|
41
|
+
exports.aA_ = firstChild;
|
42
|
+
exports.bh_ = removeChild;
|