marko 5.35.21 → 5.35.22
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/core-tags/core/await/reorderer-renderer.js +29 -19
- package/dist/node_modules/@internal/components-beginComponent/index-browser.js +4 -4
- package/dist/node_modules/@internal/components-beginComponent/index.js +11 -11
- 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 +3 -3
- package/dist/node_modules/@internal/components-entry/index-browser.js +2 -2
- package/dist/node_modules/@internal/components-entry/index.js +17 -17
- package/dist/node_modules/@internal/components-entry-legacy/index-browser.js +6 -6
- package/dist/node_modules/@internal/components-registry/index-browser.js +46 -46
- 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 +9 -9
- 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 +7 -7
- package/dist/node_modules/@internal/preserve-tag/index.js +5 -5
- 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 +8 -8
- package/dist/runtime/components/Component.js +145 -145
- package/dist/runtime/components/ComponentDef.js +29 -29
- package/dist/runtime/components/ComponentsContext.js +15 -15
- package/dist/runtime/components/GlobalComponentsContext.js +4 -4
- package/dist/runtime/components/KeySequence.js +3 -3
- package/dist/runtime/components/ServerComponent.js +13 -13
- package/dist/runtime/components/State.js +26 -26
- package/dist/runtime/components/attach-detach.js +8 -8
- 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 +16 -16
- package/dist/runtime/components/legacy/dependencies/index.js +7 -7
- package/dist/runtime/components/legacy/renderer-legacy.js +43 -43
- package/dist/runtime/components/renderer.js +35 -35
- 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 -18
- 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 +24 -24
- package/dist/runtime/helpers/tags-compat/runtime-html.js +8 -8
- package/dist/runtime/html/AsyncStream.js +26 -26
- package/dist/runtime/html/BufferedWriter.js +2 -2
- package/dist/runtime/html/helpers/data-marko.js +4 -4
- package/dist/runtime/html/helpers/escape-xml.js +1 -1
- package/dist/runtime/html/index.js +2 -2
- package/dist/runtime/renderable.js +5 -5
- package/dist/runtime/vdom/AsyncVDOMBuilder.js +42 -42
- package/dist/runtime/vdom/VComment.js +1 -1
- package/dist/runtime/vdom/VComponent.js +2 -2
- package/dist/runtime/vdom/VDocumentFragment.js +2 -2
- package/dist/runtime/vdom/VElement.js +13 -13
- package/dist/runtime/vdom/VFragment.js +5 -5
- package/dist/runtime/vdom/VNode.js +4 -4
- package/dist/runtime/vdom/VText.js +1 -1
- package/dist/runtime/vdom/hot-reload.js +18 -18
- package/dist/runtime/vdom/index.js +2 -2
- package/dist/runtime/vdom/morphdom/fragment.js +2 -2
- package/dist/runtime/vdom/morphdom/helpers.js +4 -4
- package/dist/runtime/vdom/morphdom/index.js +46 -46
- package/helpers/README.md +3 -0
- package/helpers/empty.js +4 -0
- package/helpers/notEmpty.js +11 -0
- package/package.json +2 -1
- package/src/core-tags/core/await/reorderer-renderer.js +73 -63
@@ -1,17 +1,17 @@
|
|
1
|
-
"use strict";const {
|
1
|
+
"use strict";const { _m_ } = require("@internal/components-util");
|
2
2
|
const {
|
3
|
-
|
3
|
+
T_
|
4
4
|
} = require("../../components/ComponentsContext");
|
5
5
|
const defineComponent = require("../../components/defineComponent");
|
6
6
|
const { r: registerComponent } = require("../../components/registry");
|
7
7
|
const createRenderer = require("../../components/renderer");
|
8
8
|
const defaultCreateOut = require("../../createOut");
|
9
9
|
const morphdom = require("../../vdom/morphdom");
|
10
|
-
const {
|
10
|
+
const { _l_ } = require("../../vdom/morphdom/fragment");
|
11
11
|
const dynamicTag = require("../dynamic-tag");
|
12
12
|
|
13
13
|
exports.p = function (domCompat) {
|
14
|
-
dynamicTag.
|
14
|
+
dynamicTag.bo_ = function tagsToVdom(
|
15
15
|
renderer,
|
16
16
|
renderBody,
|
17
17
|
args,
|
@@ -38,9 +38,9 @@ exports.p = function (domCompat) {
|
|
38
38
|
const tagsRenderer = domCompat.resolveRegistered(_.r, global);
|
39
39
|
const newNode = domCompat.render(out, component, tagsRenderer, input);
|
40
40
|
|
41
|
-
out.bf(out.
|
41
|
+
out.bf(out.ab_, component, !newNode);
|
42
42
|
if (newNode) {
|
43
|
-
out.node({
|
43
|
+
out.node({ bp_: () => newNode });
|
44
44
|
}
|
45
45
|
out.ef();
|
46
46
|
},
|
@@ -103,12 +103,12 @@ exports.p = function (domCompat) {
|
|
103
103
|
if (!newRenderer) {
|
104
104
|
const { Component } = renderer;
|
105
105
|
if (Component) {
|
106
|
-
const setCustomEvents = Component.prototype.
|
107
|
-
Component.prototype.
|
106
|
+
const setCustomEvents = Component.prototype.aE_;
|
107
|
+
Component.prototype.aE_ = function (
|
108
108
|
customEvents,
|
109
109
|
scopeId)
|
110
110
|
{
|
111
|
-
const global = this.
|
111
|
+
const global = this.al_;
|
112
112
|
for (const customEvent of customEvents) {
|
113
113
|
customEvent[1] = domCompat.resolveRegistered(
|
114
114
|
customEvent[1],
|
@@ -127,7 +127,7 @@ exports.p = function (domCompat) {
|
|
127
127
|
},
|
128
128
|
() => {
|
129
129
|
const realFragment = document.createDocumentFragment();
|
130
|
-
|
130
|
+
_l_(null, null, realFragment);
|
131
131
|
return realFragment;
|
132
132
|
},
|
133
133
|
(scope, input) => {
|
@@ -150,17 +150,17 @@ exports.p = function (domCompat) {
|
|
150
150
|
let host = domCompat.getStartNode(scope);
|
151
151
|
let rootNode = host.fragment;
|
152
152
|
if (!rootNode) {
|
153
|
-
const component = scope.
|
154
|
-
|
155
|
-
rootNode = component.
|
153
|
+
const component = scope.bq_ =
|
154
|
+
_m_[scope.m5c];
|
155
|
+
rootNode = component._F_;
|
156
156
|
host = rootNode.startNode;
|
157
157
|
domCompat.setScopeNodes(host, rootNode.endNode);
|
158
158
|
}
|
159
|
-
const existingComponent = scope.
|
160
|
-
const componentsContext =
|
161
|
-
const globalComponentsContext = componentsContext.
|
159
|
+
const existingComponent = scope.bq_;
|
160
|
+
const componentsContext = T_(out);
|
161
|
+
const globalComponentsContext = componentsContext.q_;
|
162
162
|
let customEvents;
|
163
|
-
globalComponentsContext.
|
163
|
+
globalComponentsContext.aA_ = existingComponent;
|
164
164
|
out.sync();
|
165
165
|
if (renderer) {
|
166
166
|
const [rawInput] = input;
|
@@ -185,16 +185,16 @@ exports.p = function (domCompat) {
|
|
185
185
|
}
|
186
186
|
|
187
187
|
domCompat.queueEffect(scope, () => {
|
188
|
-
const targetNode = out.
|
188
|
+
const targetNode = out.ai_().aB_;
|
189
189
|
morphdom(rootNode, targetNode, host, componentsContext);
|
190
|
-
const componentDefs = componentsContext.
|
190
|
+
const componentDefs = componentsContext.ag_(
|
191
191
|
getRootNode(host)
|
192
192
|
);
|
193
|
-
const component = componentDefs[0].
|
194
|
-
component.
|
195
|
-
component.
|
196
|
-
component.
|
197
|
-
scope.
|
193
|
+
const component = componentDefs[0].t_;
|
194
|
+
component._F_ = rootNode;
|
195
|
+
component.P_ = input[0];
|
196
|
+
component.X_ = customEvents;
|
197
|
+
scope.bq_ = component;
|
198
198
|
});
|
199
199
|
}
|
200
200
|
|
@@ -1,14 +1,14 @@
|
|
1
1
|
"use strict";const initComponentsTag = require("../../../core-tags/components/init-components-tag");
|
2
2
|
const {
|
3
|
-
|
3
|
+
T_
|
4
4
|
} = require("../../components/ComponentsContext");
|
5
5
|
const createRenderer = require("../../components/renderer");
|
6
6
|
const defaultCreateOut = require("../../createOut");
|
7
7
|
const dynamicTag5 = require("../dynamic-tag");
|
8
8
|
|
9
9
|
exports.p = function (htmlCompat) {
|
10
|
-
const isMarko6 = (fn) => !!fn.
|
11
|
-
const isMarko5 = (fn) => !fn.
|
10
|
+
const isMarko6 = (fn) => !!fn.br_;
|
11
|
+
const isMarko5 = (fn) => !fn.br_;
|
12
12
|
const writeHTML = (result) => {
|
13
13
|
const state = result.out._state;
|
14
14
|
const writer = state.writer;
|
@@ -17,7 +17,7 @@ exports.p = function (htmlCompat) {
|
|
17
17
|
htmlCompat.write(writer._content);
|
18
18
|
};
|
19
19
|
|
20
|
-
dynamicTag5.
|
20
|
+
dynamicTag5.bo_ = function tagsToVdom(
|
21
21
|
tagsRenderer,
|
22
22
|
renderBody,
|
23
23
|
args)
|
@@ -45,7 +45,7 @@ exports.p = function (htmlCompat) {
|
|
45
45
|
const input = _.i;
|
46
46
|
const tagsRenderer = _.r;
|
47
47
|
const willRerender = componentDef._wrr;
|
48
|
-
out.bf(out.
|
48
|
+
out.bf(out.ab_, component, willRerender);
|
49
49
|
htmlCompat.render(tagsRenderer, willRerender, out, component, input);
|
50
50
|
out.ef();
|
51
51
|
},
|
@@ -101,10 +101,10 @@ exports.p = function (htmlCompat) {
|
|
101
101
|
renderBody5(out, input, ...args);
|
102
102
|
}
|
103
103
|
|
104
|
-
const componentsContext =
|
104
|
+
const componentsContext = T_(out);
|
105
105
|
const component = componentsContext.b_[0];
|
106
106
|
if (component) {
|
107
|
-
component.
|
107
|
+
component.t_.X_ = customEvents;
|
108
108
|
htmlCompat.writeSetScopeForComponent(component.id);
|
109
109
|
}
|
110
110
|
|
@@ -127,7 +127,7 @@ exports.p = function (htmlCompat) {
|
|
127
127
|
};
|
128
128
|
},
|
129
129
|
function createRenderer(renderFn) {
|
130
|
-
renderFn.
|
130
|
+
renderFn.br_ = true;
|
131
131
|
return renderFn;
|
132
132
|
}
|
133
133
|
);
|
@@ -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.bs_;
|
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.a__ = null;
|
106
105
|
this.aa_ = null;
|
107
|
-
this.
|
108
|
-
this.
|
106
|
+
this.ab_ = null;
|
107
|
+
this.bd_ = null;
|
108
|
+
this.bt_ = false;
|
109
109
|
}
|
110
110
|
|
111
111
|
AsyncStream.DEFAULT_TIMEOUT = 10000;
|
@@ -125,12 +125,12 @@ AsyncStream.enableAsyncStackTrace = function () {
|
|
125
125
|
|
126
126
|
var proto = AsyncStream.prototype = {
|
127
127
|
constructor: AsyncStream,
|
128
|
-
|
129
|
-
|
128
|
+
C_: typeof document === "object" && document,
|
129
|
+
bu_: true,
|
130
130
|
|
131
131
|
[Symbol.asyncIterator]() {
|
132
|
-
if (this.
|
133
|
-
return this.
|
132
|
+
if (this.bv_) {
|
133
|
+
return this.bv_;
|
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.bv_ = {
|
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
|
+
ai_: 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.ai_();
|
233
233
|
},
|
234
234
|
|
235
235
|
toString: function () {
|
236
236
|
return this._state.writer.toString();
|
237
237
|
},
|
238
238
|
|
239
|
-
|
239
|
+
o_: 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.bt_ = 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.o_());
|
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.bt_) {
|
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.o_());
|
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.o_());
|
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
|
+
bn_: 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
|
+
bl_: function (
|
630
630
|
name,
|
631
631
|
elementAttrs,
|
632
632
|
key,
|
@@ -692,14 +692,14 @@ var proto = AsyncStream.prototype = {
|
|
692
692
|
}
|
693
693
|
},
|
694
694
|
|
695
|
-
|
695
|
+
ah_: 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.
|
702
|
-
if (!host) host = this.
|
701
|
+
var html = this.ai_();
|
702
|
+
if (!host) host = this.C_;
|
703
703
|
var doc = host.ownerDocument || host;
|
704
704
|
|
705
705
|
if (html) {
|
@@ -744,15 +744,15 @@ var proto = AsyncStream.prototype = {
|
|
744
744
|
},
|
745
745
|
|
746
746
|
c: function (componentDef, key, customEvents) {
|
747
|
-
this.
|
748
|
-
this.
|
749
|
-
this.
|
747
|
+
this.aa_ = componentDef;
|
748
|
+
this.ab_ = key;
|
749
|
+
this.bd_ = customEvents;
|
750
750
|
}
|
751
751
|
};
|
752
752
|
|
753
753
|
// alias:
|
754
754
|
proto.w = proto.write;
|
755
|
-
proto.
|
755
|
+
proto.bm_ = proto.endElement;
|
756
756
|
|
757
757
|
module.exports = AsyncStream;
|
758
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._k_;
|
5
|
+
const clearImmediate = immediate.af_;
|
6
6
|
const StringWriter = require("./StringWriter");
|
7
7
|
|
8
8
|
/**
|
@@ -9,9 +9,9 @@ var FLAG_WILL_RERENDER_IN_BROWSER = 1;
|
|
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_.w_ ||
|
13
|
+
componentDef.u_ &&
|
14
|
+
(componentDef.v_ & FLAG_WILL_RERENDER_IN_BROWSER) === 0;
|
15
15
|
|
16
16
|
if (willNotRerender) {
|
17
17
|
if (props) {
|
@@ -26,7 +26,7 @@ module.exports = function dataMarko(out, componentDef, props, key) {
|
|
26
26
|
result +=
|
27
27
|
' data-marko-key="' +
|
28
28
|
escapeDoubleQuotes(
|
29
|
-
componentDef.
|
29
|
+
componentDef.aO_(key) + " " + componentDef.id
|
30
30
|
) +
|
31
31
|
'"';
|
32
32
|
}
|
@@ -13,13 +13,13 @@ 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
|
Template.prototype.stream = require("@internal/create-readable");
|
20
20
|
|
21
21
|
var AsyncStream = require("./AsyncStream");
|
22
|
-
require("../createOut").
|
22
|
+
require("../createOut").bf_(
|
23
23
|
Template.prototype.createOut = function createOut(
|
24
24
|
globalData,
|
25
25
|
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")._k_;
|
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.o_();
|
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._W_;
|
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.bu_) {
|
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.o_(), finalOut);
|
183
183
|
}).
|
184
184
|
once("error", callback);
|
185
185
|
}
|