marko 5.35.7 → 5.35.8
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/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
|
@@ -6,37 +6,28 @@ const createRenderer = require("../../components/renderer");
|
|
|
6
6
|
const defaultCreateOut = require("../../createOut");
|
|
7
7
|
const dynamicTag5 = require("../dynamic-tag");
|
|
8
8
|
|
|
9
|
-
exports.p = function (
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
getRegistryInfo
|
|
19
|
-
} = tagsAPI;
|
|
20
|
-
const FN_TO_JSON = function () {
|
|
21
|
-
// TODO: this should instead return an object that contains getRegistryInfo
|
|
22
|
-
// then in the dom-compat, handle that object to lookup the function in the registry
|
|
23
|
-
// (we also need to do this for events)
|
|
24
|
-
return getRegistryInfo(this);
|
|
9
|
+
exports.p = function (htmlCompat) {
|
|
10
|
+
const isMarko6 = (fn) => !!fn.bq_;
|
|
11
|
+
const isMarko5 = (fn) => !fn.bq_;
|
|
12
|
+
const writeHTML = (result) => {
|
|
13
|
+
const state = result.out._state;
|
|
14
|
+
const writer = state.writer;
|
|
15
|
+
state.events.emit("c_", writer);
|
|
16
|
+
htmlCompat.writeScript(writer._scripts);
|
|
17
|
+
htmlCompat.write(writer._content);
|
|
25
18
|
};
|
|
26
19
|
|
|
27
|
-
|
|
28
|
-
const isMarko5 = (fn) => !fn.bn_;
|
|
29
|
-
|
|
30
|
-
dynamicTag5.bl_ = function tagsToVdom(
|
|
20
|
+
dynamicTag5.bn_ = function tagsToVdom(
|
|
31
21
|
tagsRenderer,
|
|
32
22
|
renderBody,
|
|
33
23
|
args)
|
|
34
24
|
{
|
|
35
|
-
if (tagsRenderer ? isMarko5(tagsRenderer) : isMarko5(renderBody))
|
|
36
|
-
|
|
25
|
+
if (tagsRenderer ? isMarko5(tagsRenderer) : isMarko5(renderBody)) {
|
|
26
|
+
return tagsRenderer;
|
|
27
|
+
}
|
|
37
28
|
|
|
38
29
|
if (!tagsRenderer && renderBody) {
|
|
39
|
-
renderBody.toJSON =
|
|
30
|
+
renderBody.toJSON = htmlCompat.toJSON;
|
|
40
31
|
}
|
|
41
32
|
|
|
42
33
|
return (input, out) =>
|
|
@@ -53,29 +44,9 @@ exports.p = function (tagsAPI) {
|
|
|
53
44
|
function (_, out, componentDef, component) {
|
|
54
45
|
const input = _.i;
|
|
55
46
|
const tagsRenderer = _.r;
|
|
56
|
-
const renderFn = createRenderFn(tagsRenderer);
|
|
57
47
|
const willRerender = componentDef._wrr;
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
if (willRerender) {
|
|
62
|
-
$global.serializedGlobals = $global.serializedGlobals || {};
|
|
63
|
-
$global.serializedGlobals.componentIdToScopeId = true;
|
|
64
|
-
$global.componentIdToScopeId = $global.componentIdToScopeId || {};
|
|
65
|
-
$global.componentIdToScopeId[component.id] = streamData.scopeId || 0;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
out.bf(out.a__, component, willRerender);
|
|
69
|
-
renderFn(
|
|
70
|
-
out.beginAsync(),
|
|
71
|
-
input,
|
|
72
|
-
{
|
|
73
|
-
...$global,
|
|
74
|
-
componentIdToScopeId: undefined,
|
|
75
|
-
streamData: undefined
|
|
76
|
-
},
|
|
77
|
-
streamData
|
|
78
|
-
);
|
|
48
|
+
out.bf(out.aa_, component, willRerender);
|
|
49
|
+
htmlCompat.render(tagsRenderer, willRerender, out, component, input);
|
|
79
50
|
out.ef();
|
|
80
51
|
},
|
|
81
52
|
// eslint-disable-next-line no-constant-condition
|
|
@@ -92,7 +63,7 @@ exports.p = function (tagsAPI) {
|
|
|
92
63
|
{}
|
|
93
64
|
);
|
|
94
65
|
|
|
95
|
-
patchDynamicTag(
|
|
66
|
+
htmlCompat.patchDynamicTag(
|
|
96
67
|
function getRenderer(tag) {
|
|
97
68
|
const renderer = tag._ || tag.renderBody || tag;
|
|
98
69
|
if (isMarko6(renderer)) return renderer;
|
|
@@ -108,8 +79,6 @@ exports.p = function (tagsAPI) {
|
|
|
108
79
|
const out = defaultCreateOut();
|
|
109
80
|
let customEvents;
|
|
110
81
|
|
|
111
|
-
out.global.streamData = tagsAPI.getStreamData();
|
|
112
|
-
|
|
113
82
|
if (renderer5) {
|
|
114
83
|
const normalizedInput = {};
|
|
115
84
|
|
|
@@ -122,7 +91,7 @@ exports.p = function (tagsAPI) {
|
|
|
122
91
|
(c === "-" ? "" : c.toLowerCase()) + key.slice(3),
|
|
123
92
|
value]
|
|
124
93
|
);
|
|
125
|
-
value.toJSON =
|
|
94
|
+
value.toJSON = htmlCompat.toJSON;
|
|
126
95
|
} else {
|
|
127
96
|
normalizedInput[key] = input[key];
|
|
128
97
|
}
|
|
@@ -135,10 +104,8 @@ exports.p = function (tagsAPI) {
|
|
|
135
104
|
const componentsContext = S_(out);
|
|
136
105
|
const component = componentsContext.b_[0];
|
|
137
106
|
if (component) {
|
|
138
|
-
component.s_.
|
|
139
|
-
|
|
140
|
-
m5c: component.id
|
|
141
|
-
});
|
|
107
|
+
component.s_.W_ = customEvents;
|
|
108
|
+
htmlCompat.writeSetScopeForComponent(component.id);
|
|
142
109
|
}
|
|
143
110
|
|
|
144
111
|
initComponentsTag({}, out);
|
|
@@ -147,7 +114,7 @@ exports.p = function (tagsAPI) {
|
|
|
147
114
|
out.once("finish", (result) => {
|
|
148
115
|
if (!async) {
|
|
149
116
|
async = false;
|
|
150
|
-
|
|
117
|
+
writeHTML(result);
|
|
151
118
|
}
|
|
152
119
|
});
|
|
153
120
|
|
|
@@ -155,23 +122,15 @@ exports.p = function (tagsAPI) {
|
|
|
155
122
|
|
|
156
123
|
if (async !== false) {
|
|
157
124
|
async = true;
|
|
158
|
-
fork(out,
|
|
159
|
-
write(result.toString());
|
|
160
|
-
});
|
|
125
|
+
htmlCompat.fork(out, writeHTML);
|
|
161
126
|
}
|
|
162
127
|
};
|
|
163
128
|
},
|
|
164
129
|
function createRenderer(renderFn) {
|
|
165
|
-
renderFn.
|
|
130
|
+
renderFn.bq_ = true;
|
|
166
131
|
return renderFn;
|
|
167
132
|
}
|
|
168
133
|
);
|
|
169
134
|
|
|
170
|
-
return
|
|
171
|
-
return serializerRegister(
|
|
172
|
-
"@marko/tags-compat-5-to-6",
|
|
173
|
-
renderer,
|
|
174
|
-
serializerRegister(id, () => {})
|
|
175
|
-
);
|
|
176
|
-
};
|
|
135
|
+
return htmlCompat.registerRenderer;
|
|
177
136
|
};
|
|
@@ -9,7 +9,7 @@ var markoAttr = require("./helpers/data-marko");
|
|
|
9
9
|
var escapeXmlHelper = require("./helpers/escape-xml");
|
|
10
10
|
var StringWriter = require("./StringWriter");
|
|
11
11
|
var escapeXmlOrNullish = escapeXmlHelper.x;
|
|
12
|
-
var escapeXmlString = escapeXmlHelper.
|
|
12
|
+
var escapeXmlString = escapeXmlHelper.br_;
|
|
13
13
|
var missingSetTimeout = typeof setTimeout !== "function";
|
|
14
14
|
|
|
15
15
|
function noop() {}
|
|
@@ -102,10 +102,10 @@ function AsyncStream(global, writer, parentOut) {
|
|
|
102
102
|
|
|
103
103
|
this.b_ = null; // ComponentsContext
|
|
104
104
|
|
|
105
|
-
this._Z_ = null;
|
|
106
105
|
this.a__ = null;
|
|
107
|
-
this.
|
|
108
|
-
this.
|
|
106
|
+
this.aa_ = null;
|
|
107
|
+
this.bc_ = null;
|
|
108
|
+
this.bs_ = false;
|
|
109
109
|
}
|
|
110
110
|
|
|
111
111
|
AsyncStream.DEFAULT_TIMEOUT = 10000;
|
|
@@ -126,11 +126,11 @@ AsyncStream.enableAsyncStackTrace = function () {
|
|
|
126
126
|
var proto = AsyncStream.prototype = {
|
|
127
127
|
constructor: AsyncStream,
|
|
128
128
|
B_: typeof document === "object" && document,
|
|
129
|
-
|
|
129
|
+
bt_: true,
|
|
130
130
|
|
|
131
131
|
[Symbol.asyncIterator]() {
|
|
132
|
-
if (this.
|
|
133
|
-
return this.
|
|
132
|
+
if (this.bu_) {
|
|
133
|
+
return this.bu_;
|
|
134
134
|
}
|
|
135
135
|
|
|
136
136
|
const originalWriter = this._state.writer;
|
|
@@ -191,7 +191,7 @@ var proto = AsyncStream.prototype = {
|
|
|
191
191
|
};
|
|
192
192
|
}
|
|
193
193
|
|
|
194
|
-
return this.
|
|
194
|
+
return this.bu_ = {
|
|
195
195
|
next: iteratorNextFn,
|
|
196
196
|
[Symbol.asyncIterator]() {
|
|
197
197
|
return this;
|
|
@@ -221,7 +221,7 @@ var proto = AsyncStream.prototype = {
|
|
|
221
221
|
return this;
|
|
222
222
|
},
|
|
223
223
|
|
|
224
|
-
|
|
224
|
+
ah_: function () {
|
|
225
225
|
return this._state.writer.toString();
|
|
226
226
|
},
|
|
227
227
|
|
|
@@ -229,14 +229,14 @@ var proto = AsyncStream.prototype = {
|
|
|
229
229
|
* Legacy...
|
|
230
230
|
*/
|
|
231
231
|
getOutput: function () {
|
|
232
|
-
return this.
|
|
232
|
+
return this.ah_();
|
|
233
233
|
},
|
|
234
234
|
|
|
235
235
|
toString: function () {
|
|
236
236
|
return this._state.writer.toString();
|
|
237
237
|
},
|
|
238
238
|
|
|
239
|
-
|
|
239
|
+
bv_: function () {
|
|
240
240
|
this._result = this._result || new RenderResult(this);
|
|
241
241
|
return this._result;
|
|
242
242
|
},
|
|
@@ -287,7 +287,7 @@ var proto = AsyncStream.prototype = {
|
|
|
287
287
|
}
|
|
288
288
|
|
|
289
289
|
this._lastCount++;
|
|
290
|
-
newStream.
|
|
290
|
+
newStream.bs_ = true;
|
|
291
291
|
}
|
|
292
292
|
|
|
293
293
|
name = options.name;
|
|
@@ -335,7 +335,7 @@ var proto = AsyncStream.prototype = {
|
|
|
335
335
|
}
|
|
336
336
|
|
|
337
337
|
if (state.events !== state.stream) {
|
|
338
|
-
state.events.emit("finish", this.
|
|
338
|
+
state.events.emit("finish", this.bv_());
|
|
339
339
|
}
|
|
340
340
|
},
|
|
341
341
|
|
|
@@ -407,7 +407,7 @@ var proto = AsyncStream.prototype = {
|
|
|
407
407
|
parentOut._handleChildDone(this);
|
|
408
408
|
}
|
|
409
409
|
} else {
|
|
410
|
-
if (childOut.
|
|
410
|
+
if (childOut.bs_) {
|
|
411
411
|
this._lastCount--;
|
|
412
412
|
}
|
|
413
413
|
|
|
@@ -448,7 +448,7 @@ var proto = AsyncStream.prototype = {
|
|
|
448
448
|
var state = this._state;
|
|
449
449
|
|
|
450
450
|
if (event === "finish" && state.finished === true) {
|
|
451
|
-
callback(this.
|
|
451
|
+
callback(this.bv_());
|
|
452
452
|
} else if (event === "last") {
|
|
453
453
|
this.onLast(callback);
|
|
454
454
|
} else {
|
|
@@ -462,7 +462,7 @@ var proto = AsyncStream.prototype = {
|
|
|
462
462
|
var state = this._state;
|
|
463
463
|
|
|
464
464
|
if (event === "finish" && state.finished === true) {
|
|
465
|
-
callback(this.
|
|
465
|
+
callback(this.bv_());
|
|
466
466
|
} else if (event === "last") {
|
|
467
467
|
this.onLast(callback);
|
|
468
468
|
} else {
|
|
@@ -587,7 +587,7 @@ var proto = AsyncStream.prototype = {
|
|
|
587
587
|
return newOut;
|
|
588
588
|
},
|
|
589
589
|
|
|
590
|
-
|
|
590
|
+
bm_: function (
|
|
591
591
|
tagName,
|
|
592
592
|
elementAttrs,
|
|
593
593
|
key,
|
|
@@ -626,7 +626,7 @@ var proto = AsyncStream.prototype = {
|
|
|
626
626
|
this.write(str);
|
|
627
627
|
},
|
|
628
628
|
|
|
629
|
-
|
|
629
|
+
bk_: function (
|
|
630
630
|
name,
|
|
631
631
|
elementAttrs,
|
|
632
632
|
key,
|
|
@@ -692,13 +692,13 @@ var proto = AsyncStream.prototype = {
|
|
|
692
692
|
}
|
|
693
693
|
},
|
|
694
694
|
|
|
695
|
-
|
|
695
|
+
ag_: function (host) {
|
|
696
696
|
var node = this._node;
|
|
697
697
|
|
|
698
698
|
if (!node) {
|
|
699
699
|
var nextEl;
|
|
700
700
|
var fragment;
|
|
701
|
-
var html = this.
|
|
701
|
+
var html = this.ah_();
|
|
702
702
|
if (!host) host = this.B_;
|
|
703
703
|
var doc = host.ownerDocument || host;
|
|
704
704
|
|
|
@@ -725,6 +725,7 @@ var proto = AsyncStream.prototype = {
|
|
|
725
725
|
},
|
|
726
726
|
|
|
727
727
|
then: function (fn, fnErr) {
|
|
728
|
+
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
728
729
|
var out = this;
|
|
729
730
|
return new Promise(function (resolve, reject) {
|
|
730
731
|
out.on("error", reject);
|
|
@@ -743,15 +744,15 @@ var proto = AsyncStream.prototype = {
|
|
|
743
744
|
},
|
|
744
745
|
|
|
745
746
|
c: function (componentDef, key, customEvents) {
|
|
746
|
-
this.
|
|
747
|
-
this.
|
|
748
|
-
this.
|
|
747
|
+
this.a__ = componentDef;
|
|
748
|
+
this.aa_ = key;
|
|
749
|
+
this.bc_ = customEvents;
|
|
749
750
|
}
|
|
750
751
|
};
|
|
751
752
|
|
|
752
753
|
// alias:
|
|
753
754
|
proto.w = proto.write;
|
|
754
|
-
proto.
|
|
755
|
+
proto.bl_ = proto.endElement;
|
|
755
756
|
|
|
756
757
|
module.exports = AsyncStream;
|
|
757
758
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
const immediate = require("@internal/set-immediate");
|
|
4
|
-
const setImmediate = immediate.
|
|
5
|
-
const clearImmediate = immediate.
|
|
4
|
+
const setImmediate = immediate._j_;
|
|
5
|
+
const clearImmediate = immediate.ae_;
|
|
6
6
|
const StringWriter = require("./StringWriter");
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var attrHelper = require("./attr");
|
|
3
|
-
var notEmptyAttr = attrHelper.
|
|
4
|
-
var isEmptyAttrValue = attrHelper.
|
|
3
|
+
var notEmptyAttr = attrHelper.bw_;
|
|
4
|
+
var isEmptyAttrValue = attrHelper.bx_;
|
|
5
5
|
var classHelper = require("./class-attr");
|
|
6
6
|
var styleHelper = require("./style-attr");
|
|
7
7
|
|
|
@@ -2,13 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
var escapeQuoteHelpers = require("./escape-quotes");
|
|
4
4
|
var escapeDoubleQuotes = escapeQuoteHelpers.n_;
|
|
5
|
-
var escapeSingleQuotes = escapeQuoteHelpers.
|
|
5
|
+
var escapeSingleQuotes = escapeQuoteHelpers.by_;
|
|
6
|
+
// eslint-disable-next-line no-constant-binary-expression
|
|
6
7
|
|
|
7
8
|
|
|
8
9
|
module.exports = maybeEmptyAttr;
|
|
9
10
|
|
|
10
|
-
maybeEmptyAttr.
|
|
11
|
-
maybeEmptyAttr.
|
|
11
|
+
maybeEmptyAttr.bw_ = notEmptyAttr;
|
|
12
|
+
maybeEmptyAttr.bx_ = isEmpty;
|
|
12
13
|
|
|
13
14
|
function maybeEmptyAttr(name, value) {
|
|
14
15
|
if (isEmpty(value)) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var escapeQuoteHelpers = require("./escape-quotes");
|
|
4
|
-
var escapeSingleQuotes = escapeQuoteHelpers.
|
|
4
|
+
var escapeSingleQuotes = escapeQuoteHelpers.by_;
|
|
5
5
|
var escapeDoubleQuotes = escapeQuoteHelpers.n_;
|
|
6
6
|
var FLAG_WILL_RERENDER_IN_BROWSER = 1;
|
|
7
7
|
// var FLAG_HAS_RENDER_BODY = 2;
|
|
@@ -15,7 +15,6 @@ module.exports = function dataMarko(out, componentDef, props, key) {
|
|
|
15
15
|
|
|
16
16
|
if (willNotRerender) {
|
|
17
17
|
if (props) {
|
|
18
|
-
// eslint-disable-next-line no-unused-vars
|
|
19
18
|
for (var _ in props) {
|
|
20
19
|
result +=
|
|
21
20
|
" data-marko='" + escapeSingleQuotes(JSON.stringify(props)) + "'";
|
|
@@ -27,7 +26,7 @@ module.exports = function dataMarko(out, componentDef, props, key) {
|
|
|
27
26
|
result +=
|
|
28
27
|
' data-marko-key="' +
|
|
29
28
|
escapeDoubleQuotes(
|
|
30
|
-
componentDef.
|
|
29
|
+
componentDef.aN_(key) + " " + componentDef.id
|
|
31
30
|
) +
|
|
32
31
|
'"';
|
|
33
32
|
}
|
|
@@ -21,7 +21,7 @@ function Template(typeName) {
|
|
|
21
21
|
Template.prototype.stream = require("@internal/create-readable");
|
|
22
22
|
|
|
23
23
|
var AsyncStream = require("./AsyncStream");
|
|
24
|
-
require("../createOut").
|
|
24
|
+
require("../createOut").be_(
|
|
25
25
|
Template.prototype.createOut = function createOut(
|
|
26
26
|
globalData,
|
|
27
27
|
writer,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var extend = require("raptor-util/extend");
|
|
4
|
-
var setImmediate = require("@internal/set-immediate").
|
|
4
|
+
var setImmediate = require("@internal/set-immediate")._j_;
|
|
5
5
|
var defaultCreateOut = require("./createOut");
|
|
6
6
|
|
|
7
7
|
function safeRender(renderFunc, finalData, finalOut, shouldEnd) {
|
|
@@ -73,7 +73,7 @@ module.exports = function (target, renderer) {
|
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
render(localData, out);
|
|
76
|
-
return out.
|
|
76
|
+
return out.bv_();
|
|
77
77
|
},
|
|
78
78
|
|
|
79
79
|
/**
|
|
@@ -148,7 +148,7 @@ module.exports = function (target, renderer) {
|
|
|
148
148
|
var finalData;
|
|
149
149
|
var globalData;
|
|
150
150
|
var render = renderFunc || this._;
|
|
151
|
-
var shouldBuffer = this.
|
|
151
|
+
var shouldBuffer = this._V_;
|
|
152
152
|
var shouldEnd = true;
|
|
153
153
|
|
|
154
154
|
if (data) {
|
|
@@ -160,7 +160,7 @@ module.exports = function (target, renderer) {
|
|
|
160
160
|
finalData = {};
|
|
161
161
|
}
|
|
162
162
|
|
|
163
|
-
if (out && out.
|
|
163
|
+
if (out && out.bt_) {
|
|
164
164
|
finalOut = out;
|
|
165
165
|
shouldEnd = false;
|
|
166
166
|
extend(out.global, globalData);
|
|
@@ -179,7 +179,7 @@ module.exports = function (target, renderer) {
|
|
|
179
179
|
if (callback) {
|
|
180
180
|
finalOut.
|
|
181
181
|
on("finish", function () {
|
|
182
|
-
callback(null, finalOut.
|
|
182
|
+
callback(null, finalOut.bv_(), finalOut);
|
|
183
183
|
}).
|
|
184
184
|
once("error", callback);
|
|
185
185
|
}
|