marko 5.37.3 → 5.37.5
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/compiler/index.js +11 -11
- package/dist/core-tags/components/init-components-tag.js +4 -4
- package/dist/core-tags/components/preferred-script-location-tag.js +2 -2
- package/dist/core-tags/core/__flush_here_and_after__.js +1 -1
- package/dist/core-tags/core/await/AsyncValue.js +21 -21
- package/dist/core-tags/core/await/renderer.js +24 -24
- package/dist/core-tags/core/await/reorderer-renderer.js +6 -6
- package/dist/node-require/browser-refresh.js +1 -18
- package/dist/node-require/index.js +7 -7
- package/dist/node_modules/@internal/components-beginComponent/index-browser.js +5 -5
- package/dist/node_modules/@internal/components-beginComponent/index.js +12 -12
- package/dist/node_modules/@internal/components-define-widget-legacy/index-browser.js +99 -99
- 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 +29 -29
- package/dist/node_modules/@internal/components-entry-legacy/index-browser.js +13 -13
- package/dist/node_modules/@internal/components-entry-legacy/index.js +1 -1
- package/dist/node_modules/@internal/components-registry/index-browser.js +102 -102
- 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 +20 -24
- 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 +8 -8
- package/dist/node_modules/@internal/preserve-tag/index.js +6 -6
- package/dist/node_modules/@internal/set-immediate/index-browser.js +2 -2
- package/dist/node_modules/@internal/set-immediate/index-worker.js +3 -3
- package/dist/node_modules/@internal/set-immediate/index.js +3 -3
- package/dist/runtime/RenderResult.js +24 -24
- package/dist/runtime/components/Component.js +163 -163
- package/dist/runtime/components/ComponentDef.js +34 -34
- package/dist/runtime/components/ComponentsContext.js +20 -20
- package/dist/runtime/components/GlobalComponentsContext.js +4 -4
- package/dist/runtime/components/KeySequence.js +3 -3
- package/dist/runtime/components/ServerComponent.js +17 -17
- package/dist/runtime/components/State.js +28 -28
- package/dist/runtime/components/attach-detach.js +8 -8
- package/dist/runtime/components/defineComponent.js +5 -5
- package/dist/runtime/components/dom-data.js +6 -6
- 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 +25 -25
- package/dist/runtime/components/legacy/dependencies/index.js +10 -10
- package/dist/runtime/components/legacy/renderer-legacy.js +56 -56
- package/dist/runtime/components/renderer.js +45 -45
- 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 +33 -33
- package/dist/runtime/helpers/render-tag.js +1 -1
- package/dist/runtime/helpers/serialize-noop.js +2 -2
- package/dist/runtime/helpers/style-value.js +1 -1
- package/dist/runtime/helpers/tags-compat/runtime-dom.js +35 -35
- package/dist/runtime/helpers/tags-compat/runtime-html.js +16 -16
- package/dist/runtime/html/AsyncStream.js +28 -28
- package/dist/runtime/html/BufferedWriter.js +2 -2
- package/dist/runtime/html/StringWriter.js +2 -2
- package/dist/runtime/html/helpers/_dynamic-attr.js +2 -2
- package/dist/runtime/html/helpers/attr.js +11 -11
- package/dist/runtime/html/helpers/attrs.js +6 -6
- 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/merge-attrs.js +11 -11
- 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 +100 -100
- package/dist/runtime/vdom/VComment.js +7 -7
- package/dist/runtime/vdom/VComponent.js +5 -5
- package/dist/runtime/vdom/VDocumentFragment.js +8 -8
- package/dist/runtime/vdom/VElement.js +52 -52
- package/dist/runtime/vdom/VFragment.js +9 -9
- package/dist/runtime/vdom/VNode.js +34 -34
- package/dist/runtime/vdom/VText.js +8 -8
- package/dist/runtime/vdom/helpers/attrs.js +6 -6
- 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 +10 -10
- package/dist/runtime/vdom/morphdom/helpers.js +5 -5
- package/dist/runtime/vdom/morphdom/index.js +81 -81
- package/dist/runtime/vdom/vdom.js +15 -15
- package/dist/taglib/index.js +6 -6
- package/dist/translator/util/get-component-files.js +1 -1
- package/docs/typescript.md +1 -1
- package/package.json +2 -2
|
@@ -4,25 +4,25 @@ var VNode = require("./VNode");
|
|
|
4
4
|
|
|
5
5
|
function VDocumentFragmentClone(other) {
|
|
6
6
|
extend(this, other);
|
|
7
|
-
this.
|
|
8
|
-
this.
|
|
7
|
+
this.cb_ = null;
|
|
8
|
+
this.cc_ = null;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
function VDocumentFragment(out) {
|
|
12
|
-
this.
|
|
13
|
-
this.
|
|
12
|
+
this.bY_(null /* childCount */);
|
|
13
|
+
this.s_ = out;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
VDocumentFragment.prototype = {
|
|
17
|
-
|
|
17
|
+
c__: 11,
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
cd_: true,
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
bS_: function () {
|
|
22
22
|
return new VDocumentFragmentClone(this);
|
|
23
23
|
},
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
bp_: function (host) {
|
|
26
26
|
return (host.ownerDocument || host).createDocumentFragment();
|
|
27
27
|
}
|
|
28
28
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict"; // eslint-disable-next-line no-constant-binary-expression
|
|
2
|
-
|
|
2
|
+
|
|
3
3
|
var inherit = require("raptor-util/inherit");
|
|
4
4
|
var componentsUtil = require("@internal/components-util");
|
|
5
5
|
var domData = require("../components/dom-data");
|
|
6
|
-
var vElementByDOMNode = domData.
|
|
6
|
+
var vElementByDOMNode = domData._L_;
|
|
7
7
|
var VNode = require("./VNode");
|
|
8
8
|
var isTextOnly = require("./is-text-only");
|
|
9
9
|
var ATTR_XLINK_HREF = "xlink:href";
|
|
@@ -57,11 +57,11 @@ function normalizeValue(value) {
|
|
|
57
57
|
case Object.prototype.toString:
|
|
58
58
|
case Array.prototype.toString:
|
|
59
59
|
// eslint-disable-next-line no-constant-condition
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
|
|
65
65
|
return JSON.stringify(value);
|
|
66
66
|
case RegExp.prototype.toString:
|
|
67
67
|
return value.source;
|
|
@@ -81,17 +81,17 @@ function assign(a, b) {
|
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
function VElementClone(other) {
|
|
84
|
-
this.
|
|
85
|
-
this.
|
|
86
|
-
this.
|
|
87
|
-
|
|
88
|
-
this.
|
|
89
|
-
this.
|
|
90
|
-
this.
|
|
91
|
-
this.
|
|
92
|
-
this.
|
|
93
|
-
this.
|
|
94
|
-
this.
|
|
84
|
+
this.ce_ = other.ce_;
|
|
85
|
+
this.cb_ = null;
|
|
86
|
+
this.cc_ = null;
|
|
87
|
+
|
|
88
|
+
this.ca_ = other.ca_;
|
|
89
|
+
this.cf_ = other.cf_;
|
|
90
|
+
this._P_ = other._P_;
|
|
91
|
+
this.cg_ = other.cg_;
|
|
92
|
+
this.v_ = other.v_;
|
|
93
|
+
this.ch_ = other.ch_;
|
|
94
|
+
this.ci_ = other.ci_;
|
|
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.bY_(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.
|
|
115
|
-
this.
|
|
116
|
-
this.
|
|
117
|
-
this.
|
|
118
|
-
this.
|
|
119
|
-
this.
|
|
120
|
-
this.
|
|
121
|
-
this.
|
|
122
|
-
this.
|
|
114
|
+
this.ca_ = key;
|
|
115
|
+
this.v_ = flags || 0;
|
|
116
|
+
this.cf_ = attrs || EMPTY_OBJECT;
|
|
117
|
+
this._P_ = props || EMPTY_OBJECT;
|
|
118
|
+
this.cg_ = tagName;
|
|
119
|
+
this.ch_ = "";
|
|
120
|
+
this.ci_ = constId;
|
|
121
|
+
this.ae_ = false;
|
|
122
|
+
this.ad_ = false;
|
|
123
123
|
}
|
|
124
124
|
|
|
125
125
|
VElement.prototype = {
|
|
126
|
-
|
|
126
|
+
c__: 1,
|
|
127
127
|
|
|
128
|
-
|
|
128
|
+
bS_: 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.bR_(
|
|
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.cj_();
|
|
154
154
|
} else {
|
|
155
155
|
return child;
|
|
156
156
|
}
|
|
@@ -163,18 +163,18 @@ 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.
|
|
167
|
-
node.
|
|
168
|
-
this.
|
|
169
|
-
return this.
|
|
166
|
+
node = node.bS_();
|
|
167
|
+
node._N_ = ownerComponent;
|
|
168
|
+
this.bR_(node);
|
|
169
|
+
return this.cj_();
|
|
170
170
|
},
|
|
171
171
|
|
|
172
|
-
|
|
173
|
-
var tagName = this.
|
|
174
|
-
var attributes = this.
|
|
172
|
+
bp_: function (host, parentNamespaceURI) {
|
|
173
|
+
var tagName = this.cg_;
|
|
174
|
+
var attributes = this.cf_;
|
|
175
175
|
var namespaceURI = DEFAULT_NS[tagName] || parentNamespaceURI || NS_HTML;
|
|
176
176
|
|
|
177
|
-
var flags = this.
|
|
177
|
+
var flags = this.v_;
|
|
178
178
|
var el = (host.ownerDocument || host).createElementNS(
|
|
179
179
|
namespaceURI,
|
|
180
180
|
tagName
|
|
@@ -196,7 +196,7 @@ VElement.prototype = {
|
|
|
196
196
|
}
|
|
197
197
|
|
|
198
198
|
if (isTextOnly(tagName)) {
|
|
199
|
-
el.textContent = this.
|
|
199
|
+
el.textContent = this.ch_;
|
|
200
200
|
}
|
|
201
201
|
}
|
|
202
202
|
|
|
@@ -224,7 +224,7 @@ function virtualizeElement(node, virtualizeChildNodes, ownerComponent) {
|
|
|
224
224
|
var attrName = attr.name;
|
|
225
225
|
if (!xmlnsRegExp.test(attrName)) {
|
|
226
226
|
if (attrName === "data-marko") {
|
|
227
|
-
props = componentsUtil.
|
|
227
|
+
props = componentsUtil._s_(node);
|
|
228
228
|
} else if (attr.namespaceURI === NS_XLINK) {
|
|
229
229
|
attrs[ATTR_XLINK_HREF] = attr.value;
|
|
230
230
|
} else {
|
|
@@ -251,7 +251,7 @@ function virtualizeElement(node, virtualizeChildNodes, ownerComponent) {
|
|
|
251
251
|
);
|
|
252
252
|
|
|
253
253
|
if (isTextOnly(tagName)) {
|
|
254
|
-
vdomEl.
|
|
254
|
+
vdomEl.ch_ = node.textContent;
|
|
255
255
|
} else if (virtualizeChildNodes) {
|
|
256
256
|
virtualizeChildNodes(node, vdomEl, ownerComponent);
|
|
257
257
|
}
|
|
@@ -259,18 +259,18 @@ function virtualizeElement(node, virtualizeChildNodes, ownerComponent) {
|
|
|
259
259
|
return vdomEl;
|
|
260
260
|
}
|
|
261
261
|
|
|
262
|
-
VElement.
|
|
262
|
+
VElement.ck_ = virtualizeElement;
|
|
263
263
|
|
|
264
|
-
VElement.
|
|
265
|
-
var fromFlags = vFromEl.
|
|
266
|
-
var toFlags = toEl.
|
|
267
|
-
var attrs = toEl.
|
|
264
|
+
VElement.cl_ = function (fromEl, vFromEl, toEl) {
|
|
265
|
+
var fromFlags = vFromEl.v_;
|
|
266
|
+
var toFlags = toEl.v_;
|
|
267
|
+
var attrs = toEl.cf_;
|
|
268
268
|
|
|
269
269
|
if (toFlags & FLAG_CUSTOM_ELEMENT) {
|
|
270
270
|
return assign(fromEl, attrs);
|
|
271
271
|
}
|
|
272
272
|
|
|
273
|
-
var props = toEl.
|
|
273
|
+
var props = toEl._P_;
|
|
274
274
|
var attrName;
|
|
275
275
|
|
|
276
276
|
// We use expando properties to associate the previous HTML
|
|
@@ -281,7 +281,7 @@ VElement.___morphAttrs = 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.cf_;
|
|
285
285
|
|
|
286
286
|
if (oldAttrs === attrs) {
|
|
287
287
|
// For constant attributes the same object will be provided
|
|
@@ -319,7 +319,7 @@ VElement.___morphAttrs = 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.cg_] || EMPTY_OBJECT;
|
|
323
323
|
var specialAttr;
|
|
324
324
|
|
|
325
325
|
// Loop over all of the attributes in the attribute map and compare
|
|
@@ -357,7 +357,7 @@ VElement.___morphAttrs = function (fromEl, vFromEl, toEl) {
|
|
|
357
357
|
// was not a virtualized node (i.e., a node that was not rendered by a
|
|
358
358
|
// Marko template, but rather a node that was created from an HTML
|
|
359
359
|
// string or a real DOM node).
|
|
360
|
-
if (toEl.
|
|
360
|
+
if (toEl.ca_ === null || fromFlags & FLAG_SPREAD_ATTRS) {
|
|
361
361
|
for (attrName in oldAttrs) {
|
|
362
362
|
if (!(attrName in attrs)) {
|
|
363
363
|
if (specialAttr = specialAttrs[attrName]) {
|
|
@@ -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._o_;
|
|
4
|
+
var vElementByDOMNode = domData._L_;
|
|
5
|
+
var createFragmentNode = require("./morphdom/fragment")._l_;
|
|
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.ae_ = preserve;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
VFragment.prototype = {
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
c__: 12,
|
|
16
|
+
bp_: 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.
|
|
12
|
-
this.
|
|
13
|
-
this.
|
|
6
|
+
bY_: function (finalChildCount, ownerComponent) {
|
|
7
|
+
this.cm_ = finalChildCount;
|
|
8
|
+
this.cn_ = 0;
|
|
9
|
+
this.ce_ = null;
|
|
10
|
+
this.co_ = null;
|
|
11
|
+
this.cb_ = null;
|
|
12
|
+
this.cc_ = null;
|
|
13
|
+
this._N_ = ownerComponent;
|
|
14
14
|
},
|
|
15
15
|
|
|
16
|
-
get
|
|
17
|
-
var firstChild = this.
|
|
16
|
+
get aB_() {
|
|
17
|
+
var firstChild = this.ce_;
|
|
18
18
|
|
|
19
|
-
if (firstChild && firstChild.
|
|
20
|
-
var nestedFirstChild = firstChild.
|
|
19
|
+
if (firstChild && firstChild.cd_) {
|
|
20
|
+
var nestedFirstChild = firstChild.aB_;
|
|
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.aB_;
|
|
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
|
+
bp_: 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,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
// eslint-disable-next-line no-constant-binary-expression
|
|
4
|
-
|
|
4
|
+
|
|
5
5
|
var classHelper = require("../../helpers/class-value");
|
|
6
6
|
var styleHelper = require("../../helpers/style-value");
|
|
7
7
|
var parseHTML = require("../parse-html");
|
|
@@ -12,11 +12,11 @@ var parseHTML = require("../parse-html");
|
|
|
12
12
|
module.exports = function (attributes) {
|
|
13
13
|
if (typeof attributes === "string") {
|
|
14
14
|
// eslint-disable-next-line no-constant-condition
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
20
|
return parseAttrs(attributes);
|
|
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")._k_;
|
|
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._H_;
|
|
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._I_(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.aG_(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.ap_();
|
|
49
|
+
instance._y_ = false;
|
|
50
50
|
|
|
51
|
-
if (instance.
|
|
52
|
-
instance.
|
|
53
|
-
instance.
|
|
51
|
+
if (instance.aj_) {
|
|
52
|
+
instance.aj_.removeAllListeners();
|
|
53
|
+
instance.aj_ = null;
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
instance.__proto__ = newProto;
|
|
58
|
-
instance.
|
|
59
|
-
|
|
60
|
-
afterInsert(instance.
|
|
58
|
+
instance._G_(
|
|
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._H_ = 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.az_(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").bf_(
|
|
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.bg_;
|
|
3
3
|
|
|
4
4
|
var fragmentPrototype = {
|
|
5
5
|
nodeType: 12,
|
|
@@ -23,11 +23,11 @@ var fragmentPrototype = {
|
|
|
23
23
|
},
|
|
24
24
|
get nodes() {
|
|
25
25
|
// eslint-disable-next-line no-constant-condition
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
31
|
var nodes = [];
|
|
32
32
|
var current = this.startNode;
|
|
33
33
|
while (current !== this.endNode) {
|
|
@@ -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._l_ = 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.bg_ = insertBefore;
|
|
39
|
+
exports.bh_ = insertAfter;
|
|
40
|
+
exports.cp_ = nextSibling;
|
|
41
|
+
exports.aB_ = firstChild;
|
|
42
|
+
exports.bi_ = removeChild;
|