marko 5.37.51 → 5.37.53
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-beginComponent/index.js +6 -3
- 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 +2 -2
- 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 +42 -42
- 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 +7 -7
- 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 +6 -6
- package/dist/node_modules/@internal/preserve-tag/index.js +2 -2
- 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 +144 -144
- package/dist/runtime/components/ComponentDef.js +24 -24
- package/dist/runtime/components/ComponentsContext.js +7 -7
- package/dist/runtime/components/GlobalComponentsContext.js +3 -3
- package/dist/runtime/components/KeySequence.js +3 -3
- package/dist/runtime/components/ServerComponent.js +22 -22
- package/dist/runtime/components/State.js +25 -25
- package/dist/runtime/components/attach-detach.js +7 -7
- 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 +14 -14
- package/dist/runtime/components/legacy/dependencies/index.js +7 -7
- package/dist/runtime/components/legacy/renderer-legacy.js +36 -36
- package/dist/runtime/components/renderer.js +31 -31
- 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 +11 -11
- package/dist/runtime/helpers/render-tag.js +1 -1
- package/dist/runtime/helpers/serialize-noop.js +2 -2
- package/dist/runtime/helpers/skip-serialize.js +2 -0
- package/dist/runtime/helpers/style-value.js +1 -1
- package/dist/runtime/helpers/tags-compat/runtime-dom.js +24 -24
- package/dist/runtime/helpers/tags-compat/runtime-html.js +19 -19
- package/dist/runtime/html/AsyncStream.js +22 -22
- 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 +2 -2
- package/dist/runtime/renderable.js +3 -3
- package/dist/runtime/vdom/AsyncVDOMBuilder.js +91 -91
- 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 +20 -20
- 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 +74 -74
- package/dist/runtime/vdom/vdom.js +15 -15
- package/dist/translator/util/get-component-files.js +1 -1
- package/package.json +2 -2
- package/src/node_modules/@internal/components-beginComponent/index.js +5 -2
- package/src/runtime/helpers/skip-serialize.js +2 -0
- package/src/runtime/helpers/tags-compat/runtime-html.js +15 -15
@@ -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._p_;
|
4
|
+
var vElementByDOMNode = domData._M_;
|
5
|
+
var createFragmentNode = require("./morphdom/fragment")._m_;
|
6
6
|
var VNode = require("./VNode");
|
7
7
|
|
8
8
|
function VFragment(key, ownerComponent, preserve) {
|
9
|
-
this.
|
10
|
-
this.
|
11
|
-
this.
|
9
|
+
this.bY_(null /* childCount */, ownerComponent);
|
10
|
+
this.ca_ = key;
|
11
|
+
this.af_ = preserve;
|
12
12
|
}
|
13
13
|
|
14
14
|
VFragment.prototype = {
|
15
|
-
|
16
|
-
|
15
|
+
c__: 12,
|
16
|
+
br_: function () {
|
17
17
|
var fragment = createFragmentNode();
|
18
|
-
keysByDOMNode.set(fragment, this.
|
18
|
+
keysByDOMNode.set(fragment, this.ca_);
|
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.ca_ = null;
|
6
|
+
bY_: function (finalChildCount, ownerComponent) {
|
7
|
+
this.cm_ = finalChildCount;
|
8
|
+
this.cn_ = 0;
|
9
|
+
this.ce_ = null;
|
10
|
+
this.co_ = null;
|
12
11
|
this.cb_ = null;
|
13
|
-
this.
|
12
|
+
this.cc_ = null;
|
13
|
+
this._O_ = ownerComponent;
|
14
14
|
},
|
15
15
|
|
16
|
-
get
|
17
|
-
var firstChild = this.
|
16
|
+
get aC_() {
|
17
|
+
var firstChild = this.ce_;
|
18
18
|
|
19
|
-
if (firstChild && firstChild.
|
20
|
-
var nestedFirstChild = firstChild.
|
19
|
+
if (firstChild && firstChild.cd_) {
|
20
|
+
var nestedFirstChild = firstChild.aC_;
|
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.cp_;
|
26
26
|
}
|
27
27
|
|
28
28
|
return firstChild;
|
29
29
|
},
|
30
30
|
|
31
|
-
get
|
32
|
-
var nextSibling = this.
|
31
|
+
get cp_() {
|
32
|
+
var nextSibling = this.cc_;
|
33
33
|
|
34
34
|
if (nextSibling) {
|
35
|
-
if (nextSibling.
|
36
|
-
var firstChild = nextSibling.
|
37
|
-
return firstChild || nextSibling.
|
35
|
+
if (nextSibling.cd_) {
|
36
|
+
var firstChild = nextSibling.aC_;
|
37
|
+
return firstChild || nextSibling.cp_;
|
38
38
|
}
|
39
39
|
} else {
|
40
|
-
var parentNode = this.
|
41
|
-
if (parentNode && parentNode.
|
42
|
-
return parentNode.
|
40
|
+
var parentNode = this.cb_;
|
41
|
+
if (parentNode && parentNode.cd_) {
|
42
|
+
return parentNode.cp_;
|
43
43
|
}
|
44
44
|
}
|
45
45
|
|
46
46
|
return nextSibling;
|
47
47
|
},
|
48
48
|
|
49
|
-
|
50
|
-
this.
|
49
|
+
bR_: function (child) {
|
50
|
+
this.cn_++;
|
51
51
|
|
52
|
-
if (hasTextContent(this.
|
53
|
-
if (child.
|
54
|
-
this.
|
52
|
+
if (hasTextContent(this.cg_)) {
|
53
|
+
if (child.cq_) {
|
54
|
+
this.ch_ += child.bZ_;
|
55
55
|
} else {
|
56
56
|
throw TypeError();
|
57
57
|
}
|
58
58
|
} else {
|
59
|
-
var lastChild = this.
|
59
|
+
var lastChild = this.co_;
|
60
60
|
|
61
|
-
child.
|
61
|
+
child.cb_ = this;
|
62
62
|
|
63
63
|
if (lastChild) {
|
64
|
-
lastChild.
|
64
|
+
lastChild.cc_ = child;
|
65
65
|
} else {
|
66
|
-
this.
|
66
|
+
this.ce_ = child;
|
67
67
|
}
|
68
68
|
|
69
|
-
this.
|
69
|
+
this.co_ = child;
|
70
70
|
}
|
71
71
|
|
72
72
|
return child;
|
73
73
|
},
|
74
74
|
|
75
|
-
|
76
|
-
if (this.
|
77
|
-
return this.
|
75
|
+
cj_: function finishChild() {
|
76
|
+
if (this.cn_ === this.cm_ && this.cb_) {
|
77
|
+
return this.cb_.cj_();
|
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.bY_(-1 /* no children */, ownerComponent);
|
6
|
+
this.bZ_ = value;
|
7
7
|
}
|
8
8
|
|
9
9
|
VText.prototype = {
|
10
|
-
|
10
|
+
cq_: true,
|
11
11
|
|
12
|
-
|
12
|
+
c__: 3,
|
13
13
|
|
14
|
-
|
15
|
-
return (host.ownerDocument || host).createTextNode(this.
|
14
|
+
br_: function (host) {
|
15
|
+
return (host.ownerDocument || host).createTextNode(this.bZ_);
|
16
16
|
},
|
17
17
|
|
18
|
-
|
19
|
-
return new VText(this.
|
18
|
+
bS_: function () {
|
19
|
+
return new VText(this.bZ_);
|
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.bR_(
|
17
17
|
new ConstVElement(tagName, attrs, childCount)
|
18
18
|
);
|
19
19
|
|
20
20
|
if (childCount === 0) {
|
21
|
-
return this.
|
21
|
+
return this.cj_();
|
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")._l_;
|
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._I_;
|
8
8
|
var registered = {};
|
9
9
|
var instancesByType = {};
|
10
10
|
var queue;
|
@@ -31,33 +31,33 @@ exports.t = runtime.t = function (typeName) {
|
|
31
31
|
}
|
32
32
|
|
33
33
|
queue.push(function () {
|
34
|
-
var newProto = registry.
|
34
|
+
var newProto = registry._J_(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.R_;
|
38
|
+
instance.R_ = (input, out) => {
|
39
|
+
instance.aH_(input, out);
|
40
40
|
if (instance.onInput) {
|
41
41
|
input = instance.onInput(input, out) || input;
|
42
42
|
}
|
43
|
-
instance.
|
44
|
-
instance.
|
43
|
+
instance.R_ = renderer;
|
44
|
+
instance.R_(input, out);
|
45
45
|
};
|
46
46
|
|
47
|
-
instance.
|
48
|
-
instance.
|
49
|
-
instance.
|
47
|
+
instance.cr_ = true;
|
48
|
+
instance.aq_();
|
49
|
+
instance._z_ = false;
|
50
50
|
|
51
|
-
if (instance.
|
52
|
-
instance.
|
53
|
-
instance.
|
51
|
+
if (instance.ak_) {
|
52
|
+
instance.ak_.removeAllListeners();
|
53
|
+
instance.ak_ = null;
|
54
54
|
}
|
55
55
|
}
|
56
56
|
|
57
57
|
instance.__proto__ = newProto;
|
58
|
-
instance.
|
59
|
-
instance.
|
60
|
-
afterInsert(instance.
|
58
|
+
instance._H_(
|
59
|
+
instance.P_, false).
|
60
|
+
afterInsert(instance.C_);
|
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._I_ = 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.cr_) {
|
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.aA_(function () {
|
108
108
|
var pending = queue;
|
109
109
|
queue = undefined;
|
110
110
|
|
@@ -13,11 +13,11 @@ exports.t = function createTemplate(typeName) {
|
|
13
13
|
};
|
14
14
|
|
15
15
|
function Template(typeName) {
|
16
|
-
this.path = this.
|
16
|
+
this.path = this.S_ = typeName;
|
17
17
|
}
|
18
18
|
|
19
19
|
var AsyncVDOMBuilder = require("./AsyncVDOMBuilder");
|
20
|
-
require("../createOut").
|
20
|
+
require("../createOut").bg_(
|
21
21
|
Template.prototype.createOut = function createOut(
|
22
22
|
globalData,
|
23
23
|
parent,
|
@@ -1,5 +1,5 @@
|
|
1
1
|
"use strict";var helpers = require("./helpers");
|
2
|
-
var insertBefore = helpers.
|
2
|
+
var insertBefore = helpers.bh_;
|
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.cs_ = function (nextNode) {
|
84
|
+
fragment.cs_ = 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._m_ = createFragmentNode;
|
95
|
+
exports.ct_ = 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.bh_ = insertBefore;
|
39
|
+
exports.bi_ = insertAfter;
|
40
|
+
exports.cp_ = nextSibling;
|
41
|
+
exports.aC_ = firstChild;
|
42
|
+
exports.bj_ = removeChild;
|