marko 5.31.0 → 5.31.2
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 +10 -10
- package/dist/core-tags/components/preserve-tag.js +1 -81
- package/dist/core-tags/core/await/AsyncValue.js +25 -25
- package/dist/core-tags/core/await/renderer.js +11 -11
- package/dist/core-tags/core/await/reorderer-renderer.js +31 -31
- package/dist/node-require/hot-reload.js +5 -5
- package/dist/node-require/index.js +8 -8
- package/dist/node_modules/@internal/components-beginComponent/index-browser.js +8 -8
- package/dist/node_modules/@internal/components-beginComponent/index.js +25 -25
- package/dist/node_modules/@internal/components-define-widget-legacy/index-browser.js +53 -51
- 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 +3 -2
- package/dist/node_modules/@internal/components-entry/index.js +24 -24
- package/dist/node_modules/@internal/components-entry-legacy/index-browser.js +10 -9
- package/dist/node_modules/@internal/components-entry-legacy/index.js +2 -1
- package/dist/node_modules/@internal/components-registry/index-browser.js +84 -92
- package/dist/node_modules/@internal/components-registry/index.js +2 -2
- package/dist/node_modules/@internal/components-util/index-browser.js +23 -23
- package/dist/node_modules/@internal/components-util/index.js +10 -10
- package/dist/node_modules/@internal/create-readable/index-browser.js +5 -5
- package/dist/node_modules/@internal/create-readable/index.js +13 -13
- package/dist/node_modules/@internal/loader/fallback-node.js +89 -0
- package/dist/node_modules/@internal/loader/index-browser.js +1 -3
- package/dist/node_modules/@internal/loader/index.js +20 -85
- package/dist/node_modules/@internal/loader/package.json +2 -3
- package/dist/node_modules/@internal/preserve-tag/index-browser.js +45 -0
- package/dist/node_modules/@internal/preserve-tag/index.js +34 -0
- package/dist/node_modules/@internal/preserve-tag/package.json +11 -0
- package/dist/node_modules/@internal/require/index-browser.js +13 -0
- package/dist/node_modules/@internal/require/index-legacy-browser.js +20 -0
- package/dist/node_modules/@internal/require/index-webpack.js +11 -0
- package/dist/node_modules/@internal/require/index.js +15 -0
- package/dist/node_modules/@internal/require/package.json +11 -0
- package/dist/runtime/RenderResult.js +15 -14
- package/dist/runtime/components/Component.js +106 -106
- package/dist/runtime/components/ComponentDef.js +19 -19
- package/dist/runtime/components/ComponentsContext.js +14 -14
- package/dist/runtime/components/GlobalComponentsContext.js +2 -2
- package/dist/runtime/components/ServerComponent.js +12 -12
- package/dist/runtime/components/State.js +19 -19
- package/dist/runtime/components/attach-detach.js +1 -1
- package/dist/runtime/components/defineComponent.js +5 -5
- package/dist/runtime/components/dom-data.js +5 -5
- package/dist/runtime/components/event-delegation.js +55 -55
- package/dist/runtime/components/legacy/defineComponent-legacy.js +1 -6
- package/dist/runtime/components/legacy/defineRenderer-legacy.js +16 -21
- package/dist/runtime/components/legacy/dependencies/index.js +7 -7
- package/dist/runtime/components/legacy/renderer-legacy.js +82 -82
- package/dist/runtime/components/renderer.js +44 -44
- package/dist/runtime/dom-insert.js +2 -2
- package/dist/runtime/helpers/_change-case.js +3 -3
- package/dist/runtime/helpers/class-value.js +2 -2
- package/dist/runtime/helpers/dynamic-tag.js +35 -35
- package/dist/runtime/helpers/render-tag.js +4 -4
- package/dist/runtime/html/AsyncStream.js +16 -16
- package/dist/runtime/html/BufferedWriter.js +14 -14
- 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 +6 -6
- package/dist/runtime/html/helpers/attrs.js +2 -2
- package/dist/runtime/html/helpers/data-marko.js +6 -6
- package/dist/runtime/html/helpers/escape-quotes.js +1 -1
- package/dist/runtime/html/helpers/escape-xml.js +2 -2
- package/dist/runtime/html/helpers/props-script.js +1 -1
- package/dist/runtime/html/index.js +10 -10
- package/dist/runtime/renderable.js +5 -5
- package/dist/runtime/vdom/AsyncVDOMBuilder.js +61 -61
- package/dist/runtime/vdom/VComponent.js +2 -2
- package/dist/runtime/vdom/VDocumentFragment.js +1 -1
- package/dist/runtime/vdom/VElement.js +38 -38
- package/dist/runtime/vdom/VFragment.js +4 -4
- package/dist/runtime/vdom/VNode.js +2 -2
- package/dist/runtime/vdom/hot-reload.js +11 -11
- package/dist/runtime/vdom/index.js +9 -9
- package/dist/runtime/vdom/morphdom/fragment.js +9 -9
- package/dist/runtime/vdom/morphdom/helpers.js +7 -7
- package/dist/runtime/vdom/morphdom/index.js +126 -126
- package/dist/runtime/vdom/morphdom/specialElHandlers.js +11 -11
- package/dist/runtime/vdom/vdom.js +2 -2
- package/dist/taglib/index.js +3 -3
- package/package.json +1 -1
- package/src/core-tags/components/preserve-tag.js +1 -81
- package/src/node_modules/@internal/components-define-widget-legacy/index-browser.js +17 -15
- package/src/node_modules/@internal/components-define-widget-legacy/index.js +1 -1
- package/src/node_modules/@internal/components-entry/index-browser.js +2 -1
- package/src/node_modules/@internal/components-entry/index.js +2 -2
- package/src/node_modules/@internal/components-entry-legacy/index-browser.js +4 -3
- package/src/node_modules/@internal/components-entry-legacy/index.js +2 -1
- package/src/node_modules/@internal/components-registry/index-browser.js +9 -17
- package/src/node_modules/@internal/create-readable/index-browser.js +2 -2
- package/src/node_modules/@internal/loader/fallback-node.js +89 -0
- package/src/node_modules/@internal/loader/index-browser.js +1 -3
- package/src/node_modules/@internal/loader/index.js +21 -86
- package/src/node_modules/@internal/loader/package.json +2 -3
- package/src/node_modules/@internal/preserve-tag/index-browser.js +45 -0
- package/src/node_modules/@internal/preserve-tag/index.js +34 -0
- package/src/node_modules/@internal/preserve-tag/package.json +11 -0
- package/src/node_modules/@internal/require/index-browser.js +13 -0
- package/src/node_modules/@internal/require/index-legacy-browser.js +20 -0
- package/src/node_modules/@internal/require/index-webpack.js +11 -0
- package/src/node_modules/@internal/require/index.js +15 -0
- package/src/node_modules/@internal/require/package.json +11 -0
- package/src/runtime/components/legacy/defineComponent-legacy.js +0 -5
- package/src/runtime/components/legacy/defineRenderer-legacy.js +3 -8
|
@@ -91,8 +91,8 @@ function AsyncStream(global, writer, parentOut) {
|
|
|
91
91
|
|
|
92
92
|
this.b_ = null; // ComponentsContext
|
|
93
93
|
|
|
94
|
-
this.
|
|
95
|
-
this.
|
|
94
|
+
this._X_ = null;
|
|
95
|
+
this._Y_ = null;
|
|
96
96
|
this.b__ = null;
|
|
97
97
|
this.bm_ = false;
|
|
98
98
|
}
|
|
@@ -114,7 +114,7 @@ AsyncStream.enableAsyncStackTrace = function () {
|
|
|
114
114
|
|
|
115
115
|
var proto = AsyncStream.prototype = {
|
|
116
116
|
constructor: AsyncStream,
|
|
117
|
-
|
|
117
|
+
A_: typeof document === "object" && document,
|
|
118
118
|
bn_: true,
|
|
119
119
|
|
|
120
120
|
sync: function () {
|
|
@@ -222,14 +222,14 @@ var proto = AsyncStream.prototype = {
|
|
|
222
222
|
if (timeout > 0) {
|
|
223
223
|
newStream._timeoutId = setTimeout(function () {
|
|
224
224
|
newStream.error(
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
225
|
+
new Error(
|
|
226
|
+
"Async fragment " + (
|
|
227
|
+
name ? "(" + name + ") " : "") +
|
|
228
|
+
"timed out after " +
|
|
229
|
+
timeout +
|
|
230
|
+
"ms"
|
|
231
|
+
)
|
|
232
|
+
);
|
|
233
233
|
}, timeout);
|
|
234
234
|
}
|
|
235
235
|
|
|
@@ -430,8 +430,8 @@ var proto = AsyncStream.prototype = {
|
|
|
430
430
|
break;
|
|
431
431
|
default:
|
|
432
432
|
events.emit.apply(events, arguments);
|
|
433
|
-
break;
|
|
434
|
-
|
|
433
|
+
break;
|
|
434
|
+
}
|
|
435
435
|
return this;
|
|
436
436
|
},
|
|
437
437
|
|
|
@@ -610,7 +610,7 @@ var proto = AsyncStream.prototype = {
|
|
|
610
610
|
var nextEl;
|
|
611
611
|
var fragment;
|
|
612
612
|
var html = this.af_();
|
|
613
|
-
if (!host) host = this.
|
|
613
|
+
if (!host) host = this.A_;
|
|
614
614
|
var doc = host.ownerDocument || host;
|
|
615
615
|
|
|
616
616
|
if (html) {
|
|
@@ -652,8 +652,8 @@ var proto = AsyncStream.prototype = {
|
|
|
652
652
|
},
|
|
653
653
|
|
|
654
654
|
c: function (componentDef, key, customEvents) {
|
|
655
|
-
this.
|
|
656
|
-
this.
|
|
655
|
+
this._X_ = componentDef;
|
|
656
|
+
this._Y_ = key;
|
|
657
657
|
this.b__ = customEvents;
|
|
658
658
|
}
|
|
659
659
|
};
|
|
@@ -18,22 +18,22 @@ function BufferedWriter(wrappedStream) {
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
BufferedWriter.prototype = Object.assign(
|
|
21
|
-
{
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
{
|
|
22
|
+
scheduleFlush() {
|
|
23
|
+
if (!this._scheduled) {
|
|
24
|
+
this._scheduled = setImmediate(flush.bind(0, this));
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
|
|
28
|
+
end: function () {
|
|
29
|
+
flush(this);
|
|
30
|
+
if (!this._wrapped.isTTY) {
|
|
31
|
+
this._wrapped.end();
|
|
32
|
+
}
|
|
25
33
|
}
|
|
26
34
|
},
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
flush(this);
|
|
30
|
-
if (!this._wrapped.isTTY) {
|
|
31
|
-
this._wrapped.end();
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
StringWriter.prototype);
|
|
36
|
-
|
|
35
|
+
StringWriter.prototype
|
|
36
|
+
);
|
|
37
37
|
|
|
38
38
|
function flush(writer) {
|
|
39
39
|
const contents = writer.toString();
|
|
@@ -16,8 +16,8 @@ module.exports = function dynamicAttr(name, value) {
|
|
|
16
16
|
default:
|
|
17
17
|
return isEmptyAttrValue(value) || isInvalidAttrName(name) ?
|
|
18
18
|
"" :
|
|
19
|
-
notEmptyAttr(name, value);
|
|
20
|
-
|
|
19
|
+
notEmptyAttr(name, value);
|
|
20
|
+
}
|
|
21
21
|
};
|
|
22
22
|
|
|
23
23
|
// https://html.spec.whatwg.org/multipage/syntax.html#attributes-2
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var escapeQuoteHelpers = require("./escape-quotes");
|
|
4
|
-
var escapeDoubleQuotes = escapeQuoteHelpers.
|
|
4
|
+
var escapeDoubleQuotes = escapeQuoteHelpers.m_;
|
|
5
5
|
var escapeSingleQuotes = escapeQuoteHelpers.br_;
|
|
6
6
|
|
|
7
7
|
|
|
@@ -40,9 +40,9 @@ function notEmptyAttr(name, value) {
|
|
|
40
40
|
|
|
41
41
|
return " " + name + singleQuote(JSON.stringify(value), 2);
|
|
42
42
|
case RegExp.prototype.toString:
|
|
43
|
-
return " " + name + guessQuotes(value.source);
|
|
44
|
-
|
|
45
|
-
|
|
43
|
+
return " " + name + guessQuotes(value.source);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
46
|
|
|
47
47
|
return " " + name + guessQuotes(value + "");
|
|
48
48
|
}
|
|
@@ -71,8 +71,8 @@ function guessQuotes(value) {
|
|
|
71
71
|
case "\n":
|
|
72
72
|
case "\r":
|
|
73
73
|
case "\f":
|
|
74
|
-
return doubleQuote(value, i + 1);
|
|
75
|
-
|
|
74
|
+
return doubleQuote(value, i + 1);
|
|
75
|
+
}
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
return value && "=" + (value[len - 1] === "/" ? value + " " : value);
|
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
var escapeQuoteHelpers = require("./escape-quotes");
|
|
4
4
|
var escapeSingleQuotes = escapeQuoteHelpers.br_;
|
|
5
|
-
var escapeDoubleQuotes = escapeQuoteHelpers.
|
|
5
|
+
var escapeDoubleQuotes = escapeQuoteHelpers.m_;
|
|
6
6
|
var FLAG_WILL_RERENDER_IN_BROWSER = 1;
|
|
7
7
|
// var FLAG_HAS_RENDER_BODY = 2;
|
|
8
8
|
|
|
9
9
|
module.exports = function dataMarko(out, componentDef, props, key) {
|
|
10
10
|
var result = "";
|
|
11
11
|
var willNotRerender =
|
|
12
|
-
out.b_.
|
|
13
|
-
componentDef.
|
|
14
|
-
(componentDef.
|
|
12
|
+
out.b_.u_ ||
|
|
13
|
+
componentDef.s_ &&
|
|
14
|
+
(componentDef.t_ & FLAG_WILL_RERENDER_IN_BROWSER) === 0;
|
|
15
15
|
|
|
16
16
|
if (willNotRerender) {
|
|
17
17
|
if (props) {
|
|
@@ -27,8 +27,8 @@ module.exports = function dataMarko(out, componentDef, props, key) {
|
|
|
27
27
|
result +=
|
|
28
28
|
' data-marko-key="' +
|
|
29
29
|
escapeDoubleQuotes(
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
componentDef.aK_(key) + " " + componentDef.id
|
|
31
|
+
) +
|
|
32
32
|
'"';
|
|
33
33
|
}
|
|
34
34
|
}
|
|
@@ -15,21 +15,21 @@ exports.t = function createTemplate(typeName) {
|
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
function Template(typeName) {
|
|
18
|
-
this.path = this.
|
|
18
|
+
this.path = this.Q_ = typeName;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
Template.prototype.stream = require("@internal/create-readable");
|
|
22
22
|
|
|
23
23
|
var AsyncStream = require("./AsyncStream");
|
|
24
24
|
require("../createOut").bc_(
|
|
25
|
-
Template.prototype.createOut = function createOut(
|
|
26
|
-
globalData,
|
|
27
|
-
writer,
|
|
28
|
-
parentOut,
|
|
29
|
-
buffer)
|
|
30
|
-
{
|
|
31
|
-
|
|
32
|
-
}
|
|
33
|
-
|
|
25
|
+
Template.prototype.createOut = function createOut(
|
|
26
|
+
globalData,
|
|
27
|
+
writer,
|
|
28
|
+
parentOut,
|
|
29
|
+
buffer)
|
|
30
|
+
{
|
|
31
|
+
return new AsyncStream(globalData, writer, parentOut, buffer);
|
|
32
|
+
}
|
|
33
|
+
);
|
|
34
34
|
|
|
35
35
|
require("../renderable")(Template.prototype);
|
|
@@ -99,7 +99,7 @@ module.exports = function (target, renderer) {
|
|
|
99
99
|
var finalData;
|
|
100
100
|
var globalData;
|
|
101
101
|
var render = renderFunc || this._;
|
|
102
|
-
var shouldBuffer = this.
|
|
102
|
+
var shouldBuffer = this._S_;
|
|
103
103
|
var shouldEnd = true;
|
|
104
104
|
|
|
105
105
|
if (data) {
|
|
@@ -120,10 +120,10 @@ module.exports = function (target, renderer) {
|
|
|
120
120
|
callback = out;
|
|
121
121
|
} else {
|
|
122
122
|
finalOut = createOut(
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
123
|
+
globalData, // global
|
|
124
|
+
out, // writer(AsyncStream) or parentNode(AsyncVDOMBuilder)
|
|
125
|
+
undefined, // parentOut
|
|
126
|
+
shouldBuffer // ignored by AsyncVDOMBuilder
|
|
127
127
|
);
|
|
128
128
|
}
|
|
129
129
|
|
|
@@ -27,7 +27,7 @@ function AsyncVDOMBuilder(globalData, parentNode, parentOut) {
|
|
|
27
27
|
var state;
|
|
28
28
|
|
|
29
29
|
if (parentOut) {
|
|
30
|
-
state = parentOut.
|
|
30
|
+
state = parentOut.y_;
|
|
31
31
|
} else {
|
|
32
32
|
state = new State(parentNode);
|
|
33
33
|
}
|
|
@@ -38,22 +38,22 @@ function AsyncVDOMBuilder(globalData, parentNode, parentOut) {
|
|
|
38
38
|
this.bE_ = parentOut;
|
|
39
39
|
|
|
40
40
|
this.data = {};
|
|
41
|
-
this.
|
|
42
|
-
this.
|
|
41
|
+
this.y_ = state;
|
|
42
|
+
this._Z_ = parentNode;
|
|
43
43
|
this.global = globalData || {};
|
|
44
44
|
this.bF_ = [parentNode];
|
|
45
45
|
this.bG_ = false;
|
|
46
46
|
this.bH_ = undefined;
|
|
47
47
|
this.b_ = null;
|
|
48
48
|
|
|
49
|
-
this.
|
|
50
|
-
this.
|
|
49
|
+
this._X_ = null;
|
|
50
|
+
this._Y_ = null;
|
|
51
51
|
this.b__ = null;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
var proto = AsyncVDOMBuilder.prototype = {
|
|
55
55
|
bn_: true,
|
|
56
|
-
|
|
56
|
+
A_: typeof document === "object" && document,
|
|
57
57
|
|
|
58
58
|
bc: function (component, key, ownerComponent) {
|
|
59
59
|
var vComponent = new VComponent(component, key, ownerComponent);
|
|
@@ -66,37 +66,37 @@ var proto = AsyncVDOMBuilder.prototype = {
|
|
|
66
66
|
},
|
|
67
67
|
|
|
68
68
|
bI_: function (child, childCount, pushToStack) {
|
|
69
|
-
this.
|
|
69
|
+
this._Z_.bJ_(child);
|
|
70
70
|
if (pushToStack === true) {
|
|
71
71
|
this.bF_.push(child);
|
|
72
|
-
this.
|
|
72
|
+
this._Z_ = child;
|
|
73
73
|
}
|
|
74
74
|
return childCount === 0 ? this : child;
|
|
75
75
|
},
|
|
76
76
|
|
|
77
77
|
element: function (tagName, attrs, key, component, childCount, flags, props) {
|
|
78
78
|
var element = new VElement(
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
79
|
+
tagName,
|
|
80
|
+
attrs,
|
|
81
|
+
key,
|
|
82
|
+
component,
|
|
83
|
+
childCount,
|
|
84
|
+
flags,
|
|
85
|
+
props
|
|
86
|
+
);
|
|
87
87
|
return this.bI_(element, childCount);
|
|
88
88
|
},
|
|
89
89
|
|
|
90
90
|
bk_: function (tagName, attrs, key, componentDef, props) {
|
|
91
91
|
return this.element(
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
92
|
+
tagName,
|
|
93
|
+
attrsHelper(attrs),
|
|
94
|
+
key,
|
|
95
|
+
componentDef.r_,
|
|
96
|
+
0,
|
|
97
|
+
0,
|
|
98
|
+
props
|
|
99
|
+
);
|
|
100
100
|
},
|
|
101
101
|
|
|
102
102
|
n: function (node, component) {
|
|
@@ -104,13 +104,13 @@ var proto = AsyncVDOMBuilder.prototype = {
|
|
|
104
104
|
// and a node can only have one parent node.
|
|
105
105
|
var clone = node.bK_();
|
|
106
106
|
this.node(clone);
|
|
107
|
-
clone.
|
|
107
|
+
clone._J_ = component;
|
|
108
108
|
|
|
109
109
|
return this;
|
|
110
110
|
},
|
|
111
111
|
|
|
112
112
|
node: function (node) {
|
|
113
|
-
this.
|
|
113
|
+
this._Z_.bJ_(node);
|
|
114
114
|
return this;
|
|
115
115
|
},
|
|
116
116
|
|
|
@@ -129,7 +129,7 @@ var proto = AsyncVDOMBuilder.prototype = {
|
|
|
129
129
|
text = text.toString();
|
|
130
130
|
}
|
|
131
131
|
|
|
132
|
-
this.
|
|
132
|
+
this._Z_.bJ_(new VText(text, ownerComponent));
|
|
133
133
|
return this;
|
|
134
134
|
},
|
|
135
135
|
|
|
@@ -152,28 +152,28 @@ var proto = AsyncVDOMBuilder.prototype = {
|
|
|
152
152
|
props)
|
|
153
153
|
{
|
|
154
154
|
var element = new VElement(
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
155
|
+
tagName,
|
|
156
|
+
attrs,
|
|
157
|
+
key,
|
|
158
|
+
component,
|
|
159
|
+
childCount,
|
|
160
|
+
flags,
|
|
161
|
+
props
|
|
162
|
+
);
|
|
163
163
|
this.bI_(element, childCount, true);
|
|
164
164
|
return this;
|
|
165
165
|
},
|
|
166
166
|
|
|
167
167
|
bi_: function (tagName, attrs, key, componentDef, props) {
|
|
168
168
|
return this.beginElement(
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
169
|
+
tagName,
|
|
170
|
+
attrsHelper(attrs),
|
|
171
|
+
key,
|
|
172
|
+
componentDef.r_,
|
|
173
|
+
0,
|
|
174
|
+
0,
|
|
175
|
+
props
|
|
176
|
+
);
|
|
177
177
|
},
|
|
178
178
|
|
|
179
179
|
bf: function (key, component, preserve) {
|
|
@@ -189,11 +189,11 @@ var proto = AsyncVDOMBuilder.prototype = {
|
|
|
189
189
|
endElement: function () {
|
|
190
190
|
var stack = this.bF_;
|
|
191
191
|
stack.pop();
|
|
192
|
-
this.
|
|
192
|
+
this._Z_ = stack[stack.length - 1];
|
|
193
193
|
},
|
|
194
194
|
|
|
195
195
|
end: function () {
|
|
196
|
-
this.
|
|
196
|
+
this._Z_ = undefined;
|
|
197
197
|
|
|
198
198
|
var remaining = --this.bB_;
|
|
199
199
|
var parentOut = this.bE_;
|
|
@@ -227,7 +227,7 @@ var proto = AsyncVDOMBuilder.prototype = {
|
|
|
227
227
|
},
|
|
228
228
|
|
|
229
229
|
bM_: function () {
|
|
230
|
-
var state = this.
|
|
230
|
+
var state = this.y_;
|
|
231
231
|
state.bA_ = true;
|
|
232
232
|
state.by_.emit(EVENT_FINISH, this.bo_());
|
|
233
233
|
},
|
|
@@ -269,11 +269,11 @@ var proto = AsyncVDOMBuilder.prototype = {
|
|
|
269
269
|
beginAsync: function (options) {
|
|
270
270
|
if (this.bG_) {
|
|
271
271
|
throw Error(
|
|
272
|
-
|
|
273
|
-
|
|
272
|
+
"Tried to render async while in sync mode. Note: Client side await is not currently supported in re-renders (Issue: #942)."
|
|
273
|
+
);
|
|
274
274
|
}
|
|
275
275
|
|
|
276
|
-
var state = this.
|
|
276
|
+
var state = this.y_;
|
|
277
277
|
|
|
278
278
|
if (options) {
|
|
279
279
|
if (options.last) {
|
|
@@ -283,7 +283,7 @@ var proto = AsyncVDOMBuilder.prototype = {
|
|
|
283
283
|
|
|
284
284
|
this.bB_++;
|
|
285
285
|
|
|
286
|
-
var documentFragment = this.
|
|
286
|
+
var documentFragment = this._Z_.bO_();
|
|
287
287
|
var asyncOut = new AsyncVDOMBuilder(this.global, documentFragment, this);
|
|
288
288
|
|
|
289
289
|
state.by_.emit("beginAsync", {
|
|
@@ -299,7 +299,7 @@ var proto = AsyncVDOMBuilder.prototype = {
|
|
|
299
299
|
},
|
|
300
300
|
|
|
301
301
|
flush: function () {
|
|
302
|
-
var events = this.
|
|
302
|
+
var events = this.y_.by_;
|
|
303
303
|
|
|
304
304
|
if (events.listenerCount(EVENT_UPDATE)) {
|
|
305
305
|
events.emit(EVENT_UPDATE, new RenderResult(this));
|
|
@@ -307,7 +307,7 @@ var proto = AsyncVDOMBuilder.prototype = {
|
|
|
307
307
|
},
|
|
308
308
|
|
|
309
309
|
af_: function () {
|
|
310
|
-
return this.
|
|
310
|
+
return this.y_.bz_;
|
|
311
311
|
},
|
|
312
312
|
|
|
313
313
|
bo_: function () {
|
|
@@ -315,7 +315,7 @@ var proto = AsyncVDOMBuilder.prototype = {
|
|
|
315
315
|
},
|
|
316
316
|
|
|
317
317
|
on: function (event, callback) {
|
|
318
|
-
var state = this.
|
|
318
|
+
var state = this.y_;
|
|
319
319
|
|
|
320
320
|
if (event === EVENT_FINISH && state.bA_) {
|
|
321
321
|
callback(this.bo_());
|
|
@@ -329,7 +329,7 @@ var proto = AsyncVDOMBuilder.prototype = {
|
|
|
329
329
|
},
|
|
330
330
|
|
|
331
331
|
once: function (event, callback) {
|
|
332
|
-
var state = this.
|
|
332
|
+
var state = this.y_;
|
|
333
333
|
|
|
334
334
|
if (event === EVENT_FINISH && state.bA_) {
|
|
335
335
|
callback(this.bo_());
|
|
@@ -343,7 +343,7 @@ var proto = AsyncVDOMBuilder.prototype = {
|
|
|
343
343
|
},
|
|
344
344
|
|
|
345
345
|
emit: function (type, arg) {
|
|
346
|
-
var events = this.
|
|
346
|
+
var events = this.y_.by_;
|
|
347
347
|
switch (arguments.length) {
|
|
348
348
|
case 1:
|
|
349
349
|
events.emit(type);
|
|
@@ -353,13 +353,13 @@ var proto = AsyncVDOMBuilder.prototype = {
|
|
|
353
353
|
break;
|
|
354
354
|
default:
|
|
355
355
|
events.emit.apply(events, arguments);
|
|
356
|
-
break;
|
|
357
|
-
|
|
356
|
+
break;
|
|
357
|
+
}
|
|
358
358
|
return this;
|
|
359
359
|
},
|
|
360
360
|
|
|
361
361
|
removeListener: function () {
|
|
362
|
-
var events = this.
|
|
362
|
+
var events = this.y_.by_;
|
|
363
363
|
events.removeListener.apply(events, arguments);
|
|
364
364
|
return this;
|
|
365
365
|
},
|
|
@@ -389,7 +389,7 @@ var proto = AsyncVDOMBuilder.prototype = {
|
|
|
389
389
|
if (!node) {
|
|
390
390
|
var vdomTree = this.af_();
|
|
391
391
|
|
|
392
|
-
if (!host) host = this.
|
|
392
|
+
if (!host) host = this.A_;
|
|
393
393
|
this.bH_ = node = vdomTree.bQ_(host, null);
|
|
394
394
|
morphdom(node, vdomTree, host, this.b_);
|
|
395
395
|
}
|
|
@@ -435,8 +435,8 @@ var proto = AsyncVDOMBuilder.prototype = {
|
|
|
435
435
|
isVDOM: true,
|
|
436
436
|
|
|
437
437
|
c: function (componentDef, key, customEvents) {
|
|
438
|
-
this.
|
|
439
|
-
this.
|
|
438
|
+
this._X_ = componentDef;
|
|
439
|
+
this._Y_ = key;
|
|
440
440
|
this.b__ = customEvents;
|
|
441
441
|
}
|
|
442
442
|
};
|
|
@@ -4,8 +4,8 @@ var inherit = require("raptor-util/inherit");
|
|
|
4
4
|
function VComponent(component, key, ownerComponent, preserve) {
|
|
5
5
|
this.bR_(null /* childCount */, ownerComponent);
|
|
6
6
|
this.bS_ = key;
|
|
7
|
-
this.
|
|
8
|
-
this.
|
|
7
|
+
this.r_ = component;
|
|
8
|
+
this.aa_ = preserve;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
VComponent.prototype = {
|