marko 5.37.2 → 5.37.4
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/index.js +2 -1
- package/dist/translator/util/get-component-files.js +1 -1
- package/docs/typescript.md +1 -1
- package/package.json +2 -2
- package/src/translator/index.js +1 -0
package/dist/compiler/index.js
CHANGED
|
@@ -4,7 +4,7 @@ var ok = require("assert").ok;
|
|
|
4
4
|
var fs = require("fs");
|
|
5
5
|
|
|
6
6
|
// eslint-disable-next-line no-constant-binary-expression
|
|
7
|
-
|
|
7
|
+
|
|
8
8
|
var compiler = require("@marko/compiler");
|
|
9
9
|
var extend = require("raptor-util/extend");
|
|
10
10
|
var taglib = require("../taglib");
|
|
@@ -12,16 +12,16 @@ var globalConfig = require("./config");
|
|
|
12
12
|
var defaults = extend({}, globalConfig);
|
|
13
13
|
|
|
14
14
|
// eslint-disable-next-line no-constant-condition
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
25
|
|
|
26
26
|
var defaultOptionsExportDefinition = {
|
|
27
27
|
get: function () {
|
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
const INIT_COMPONENTS_KEY = Symbol();
|
|
4
4
|
|
|
5
5
|
const addComponentsFromContext =
|
|
6
|
-
require("../../runtime/components").
|
|
6
|
+
require("../../runtime/components").__;
|
|
7
7
|
const getInitComponentsCode =
|
|
8
|
-
require("../../runtime/components").
|
|
8
|
+
require("../../runtime/components").a_;
|
|
9
9
|
|
|
10
10
|
function addComponentsFromOut(source, target) {
|
|
11
11
|
const sourceOut = source.out || source;
|
|
12
12
|
const targetOut = target || sourceOut;
|
|
13
|
-
const componentsContext = sourceOut.
|
|
13
|
+
const componentsContext = sourceOut.b_;
|
|
14
14
|
const componentDefs = targetOut.writer.get("componentDefs");
|
|
15
15
|
addComponentsFromContext(componentsContext, componentDefs);
|
|
16
16
|
}
|
|
@@ -27,7 +27,7 @@ module.exports = function render(input, out) {
|
|
|
27
27
|
$global[INIT_COMPONENTS_KEY] = true;
|
|
28
28
|
|
|
29
29
|
out.on("await:finish", addComponentsFromOut);
|
|
30
|
-
out.on("
|
|
30
|
+
out.on("c_", addInitScript);
|
|
31
31
|
|
|
32
32
|
if (out.isSync() === true) {
|
|
33
33
|
// Generate initialization code for any of the UI components that were
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
function forceScriptTagAtThisPoint(out) {
|
|
4
4
|
const writer = out.writer;
|
|
5
5
|
|
|
6
|
-
out.global.
|
|
6
|
+
out.global.d_ = true;
|
|
7
7
|
const htmlSoFar = writer.toString();
|
|
8
|
-
out.global.
|
|
8
|
+
out.global.d_ = undefined;
|
|
9
9
|
|
|
10
10
|
writer.clear();
|
|
11
11
|
writer.write(htmlSoFar);
|
|
@@ -16,7 +16,7 @@ module.exports = function __flushHereAndAfter__(input, out) {
|
|
|
16
16
|
const asyncOut = out.beginAsync({ last: true });
|
|
17
17
|
const nextWriter = out.writer;
|
|
18
18
|
|
|
19
|
-
out.on("
|
|
19
|
+
out.on("c_", (writer) => {
|
|
20
20
|
if (writer instanceof BufferedWriter) {
|
|
21
21
|
if (flushed) {
|
|
22
22
|
const detachedOut = out.createOut();
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
"use strict";var queueMicrotask = require("@internal/set-immediate").
|
|
1
|
+
"use strict";var queueMicrotask = require("@internal/set-immediate").e_;
|
|
2
2
|
|
|
3
3
|
function AsyncValue() {
|
|
4
4
|
/**
|
|
5
5
|
* The data that was provided via call to resolve(data).
|
|
6
6
|
* This property is assumed to be public and available for inspection.
|
|
7
7
|
*/
|
|
8
|
-
this.
|
|
8
|
+
this.f_ = undefined;
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* The data that was provided via call to reject(err)
|
|
12
12
|
* This property is assumed to be public and available for inspection.
|
|
13
13
|
*/
|
|
14
|
-
this.
|
|
14
|
+
this.g_ = undefined;
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* The queue of callbacks that are waiting for data
|
|
18
18
|
*/
|
|
19
|
-
this.
|
|
19
|
+
this.h_ = undefined;
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
22
|
* The state of the data holder (STATE_INITIAL, STATE_RESOLVED, or STATE_REJECTED)
|
|
23
23
|
*/
|
|
24
|
-
this.
|
|
24
|
+
this.i_ = false;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
function notifyCallbacks(asyncValue, err, value) {
|
|
28
|
-
var callbacks = asyncValue.
|
|
28
|
+
var callbacks = asyncValue.h_;
|
|
29
29
|
if (callbacks) {
|
|
30
30
|
// clear out the registered callbacks (we still have reference to the original value)
|
|
31
|
-
asyncValue.
|
|
31
|
+
asyncValue.h_ = undefined;
|
|
32
32
|
|
|
33
33
|
// invoke all of the callbacks and use their scope
|
|
34
34
|
for (var i = 0; i < callbacks.length; i++) {
|
|
@@ -46,14 +46,14 @@ AsyncValue.prototype = {
|
|
|
46
46
|
* The given callback will be invoked when there is an error or resolved data
|
|
47
47
|
* available.
|
|
48
48
|
*/
|
|
49
|
-
|
|
49
|
+
j_: function (callback) {
|
|
50
50
|
// Do we already have data or error?
|
|
51
|
-
if (this.
|
|
51
|
+
if (this.i_) {
|
|
52
52
|
// invoke the callback immediately
|
|
53
|
-
return callback(this.
|
|
53
|
+
return callback(this.g_, this.f_);
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
var callbacks = this.
|
|
56
|
+
var callbacks = this.h_ || (this.h_ = []);
|
|
57
57
|
callbacks.push(callback);
|
|
58
58
|
},
|
|
59
59
|
|
|
@@ -63,19 +63,19 @@ AsyncValue.prototype = {
|
|
|
63
63
|
* its initial state so that any future requests to load data will trigger a
|
|
64
64
|
* new load call.
|
|
65
65
|
*/
|
|
66
|
-
|
|
67
|
-
if (this.
|
|
66
|
+
k_: function (err) {
|
|
67
|
+
if (this.i_) {
|
|
68
68
|
return;
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
// remember the error
|
|
72
|
-
this.
|
|
72
|
+
this.g_ = err;
|
|
73
73
|
|
|
74
74
|
// Go to the rejected state if we don't have a loader.
|
|
75
75
|
// If we do have a loader then return to the initial state
|
|
76
76
|
// (we do this so that next call to done() will trigger load
|
|
77
77
|
// again in case the error was transient).
|
|
78
|
-
this.
|
|
78
|
+
this.i_ = true;
|
|
79
79
|
|
|
80
80
|
// always notify callbacks regardless of whether or not we return to the initial state
|
|
81
81
|
notifyCallbacks(this, err, null);
|
|
@@ -84,8 +84,8 @@ AsyncValue.prototype = {
|
|
|
84
84
|
/**
|
|
85
85
|
* This method will trigger any callbacks to be notified of data.
|
|
86
86
|
*/
|
|
87
|
-
|
|
88
|
-
if (this.
|
|
87
|
+
l_: function (value) {
|
|
88
|
+
if (this.i_) {
|
|
89
89
|
return;
|
|
90
90
|
}
|
|
91
91
|
|
|
@@ -95,10 +95,10 @@ AsyncValue.prototype = {
|
|
|
95
95
|
|
|
96
96
|
var finalPromise = value.then(
|
|
97
97
|
function onFulfilled(value) {
|
|
98
|
-
queueMicrotask(asyncValue.
|
|
98
|
+
queueMicrotask(asyncValue.l_.bind(asyncValue, value));
|
|
99
99
|
},
|
|
100
100
|
function onRejected(err) {
|
|
101
|
-
queueMicrotask(asyncValue.
|
|
101
|
+
queueMicrotask(asyncValue.k_.bind(asyncValue, err));
|
|
102
102
|
}
|
|
103
103
|
);
|
|
104
104
|
|
|
@@ -107,10 +107,10 @@ AsyncValue.prototype = {
|
|
|
107
107
|
}
|
|
108
108
|
} else {
|
|
109
109
|
// remember the state
|
|
110
|
-
this.
|
|
110
|
+
this.f_ = value;
|
|
111
111
|
|
|
112
112
|
// go to the resolved state
|
|
113
|
-
this.
|
|
113
|
+
this.i_ = true;
|
|
114
114
|
|
|
115
115
|
// notify callbacks
|
|
116
116
|
notifyCallbacks(this, null, value);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// eslint-disable-next-line no-constant-binary-expression
|
|
3
|
-
|
|
3
|
+
|
|
4
4
|
var AsyncValue = require("./AsyncValue");
|
|
5
5
|
|
|
6
6
|
function safeRenderBody(renderBody, targetOut, data) {
|
|
@@ -16,18 +16,18 @@ function requestData(provider, timeout) {
|
|
|
16
16
|
|
|
17
17
|
if (typeof provider === "function") {
|
|
18
18
|
// eslint-disable-next-line no-constant-condition
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
25
|
|
|
26
26
|
var callback = function (err, data) {
|
|
27
27
|
if (err) {
|
|
28
|
-
asyncValue.
|
|
28
|
+
asyncValue.k_(err);
|
|
29
29
|
} else {
|
|
30
|
-
asyncValue.
|
|
30
|
+
asyncValue.l_(data);
|
|
31
31
|
}
|
|
32
32
|
};
|
|
33
33
|
|
|
@@ -39,11 +39,11 @@ function requestData(provider, timeout) {
|
|
|
39
39
|
provider(null, callback);
|
|
40
40
|
|
|
41
41
|
if (value !== undefined) {
|
|
42
|
-
asyncValue.
|
|
42
|
+
asyncValue.l_(value);
|
|
43
43
|
}
|
|
44
44
|
} else {
|
|
45
45
|
// Assume the provider is a data object...
|
|
46
|
-
asyncValue.
|
|
46
|
+
asyncValue.l_(provider);
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
if (timeout == null) {
|
|
@@ -53,22 +53,22 @@ function requestData(provider, timeout) {
|
|
|
53
53
|
var error;
|
|
54
54
|
var errorMsg = "Timed out after " + timeout + "ms";
|
|
55
55
|
// eslint-disable-next-line no-constant-condition
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
62
|
if (timeout > 0) {
|
|
63
63
|
let timeoutId = setTimeout(function () {
|
|
64
64
|
timeoutId = null;
|
|
65
65
|
if (!error) error = new Error(errorMsg);
|
|
66
66
|
error.code = "ERR_AWAIT_TIMEDOUT";
|
|
67
67
|
error.name = "TimeoutError";
|
|
68
|
-
asyncValue.
|
|
68
|
+
asyncValue.k_(error);
|
|
69
69
|
}, timeout);
|
|
70
70
|
|
|
71
|
-
asyncValue.
|
|
71
|
+
asyncValue.j_(function () {
|
|
72
72
|
if (timeoutId != null) {
|
|
73
73
|
clearTimeout(timeoutId);
|
|
74
74
|
}
|
|
@@ -92,8 +92,8 @@ module.exports = function awaitTag(input, out) {
|
|
|
92
92
|
var asyncValue = requestData(provider, timeout);
|
|
93
93
|
var placeholderRenderer = input.placeholder && input.placeholder.renderBody;
|
|
94
94
|
|
|
95
|
-
if (asyncValue.
|
|
96
|
-
renderContents(asyncValue.
|
|
95
|
+
if (asyncValue.i_) {
|
|
96
|
+
renderContents(asyncValue.g_, asyncValue.f_, input, out);
|
|
97
97
|
return;
|
|
98
98
|
}
|
|
99
99
|
|
|
@@ -111,8 +111,8 @@ module.exports = function awaitTag(input, out) {
|
|
|
111
111
|
awaitInfo.after = input.showAfter;
|
|
112
112
|
|
|
113
113
|
clientReorderContext =
|
|
114
|
-
out.global.
|
|
115
|
-
out.global.
|
|
114
|
+
out.global.m_ || (
|
|
115
|
+
out.global.m_ = {
|
|
116
116
|
instances: [],
|
|
117
117
|
nextId: 0
|
|
118
118
|
});
|
|
@@ -218,7 +218,7 @@ module.exports = function awaitTag(input, out) {
|
|
|
218
218
|
}
|
|
219
219
|
}
|
|
220
220
|
|
|
221
|
-
asyncValue.
|
|
221
|
+
asyncValue.j_(renderBody);
|
|
222
222
|
};
|
|
223
223
|
|
|
224
224
|
function renderContents(err, data, input, out) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var escapeDoubleQuotes =
|
|
4
|
-
require("../../../runtime/html/helpers/escape-quotes").
|
|
4
|
+
require("../../../runtime/html/helpers/escape-quotes").n_;
|
|
5
5
|
|
|
6
6
|
module.exports = function (input, out) {
|
|
7
7
|
// We cannot call beginSync() when using renderSync(). In this case we will
|
|
@@ -20,7 +20,7 @@ module.exports = function (input, out) {
|
|
|
20
20
|
|
|
21
21
|
global.__awaitReordererInvoked = true;
|
|
22
22
|
|
|
23
|
-
if (out.global.
|
|
23
|
+
if (out.global.m_) {
|
|
24
24
|
out.flush();
|
|
25
25
|
}
|
|
26
26
|
|
|
@@ -35,7 +35,7 @@ module.exports = function (input, out) {
|
|
|
35
35
|
});
|
|
36
36
|
|
|
37
37
|
out.onLast(function (next) {
|
|
38
|
-
var awaitContext = global.
|
|
38
|
+
var awaitContext = global.m_;
|
|
39
39
|
var remaining;
|
|
40
40
|
|
|
41
41
|
// Validate that we have remaining <await> instances that need handled
|
|
@@ -55,11 +55,11 @@ module.exports = function (input, out) {
|
|
|
55
55
|
let flushedPlaceholder = awaitInfo.parent._state.finished;
|
|
56
56
|
if (flushedPlaceholder) {
|
|
57
57
|
if (awaitInfo.out._state.finished) {
|
|
58
|
-
writeResult(awaitInfo.out.
|
|
58
|
+
writeResult(awaitInfo.out.o_());
|
|
59
59
|
return;
|
|
60
60
|
}
|
|
61
61
|
} else {
|
|
62
|
-
awaitInfo.parent.on("
|
|
62
|
+
awaitInfo.parent.on("c_", () => {
|
|
63
63
|
flushedPlaceholder = true;
|
|
64
64
|
if (!flushedScript && flushedContent) {
|
|
65
65
|
flushedScript = true;
|
|
@@ -76,7 +76,7 @@ module.exports = function (input, out) {
|
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
awaitInfo.out.
|
|
79
|
-
on("
|
|
79
|
+
on("c_", out.emit.bind(out, "c_")).
|
|
80
80
|
on("finish", writeResult).
|
|
81
81
|
on("error", function (err) {
|
|
82
82
|
asyncOut.error(err);
|
|
@@ -1,18 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
if ("MARKO_DEBUG") {
|
|
3
|
-
const browserRefreshClient = require("browser-refresh-client");
|
|
4
|
-
if (browserRefreshClient.isBrowserRefreshEnabled()) {
|
|
5
|
-
const extensions = require(".").getExtensions();
|
|
6
|
-
const hotReload = require("./hot-reload");
|
|
7
|
-
|
|
8
|
-
browserRefreshClient.
|
|
9
|
-
enableSpecialReload(
|
|
10
|
-
`${extensions.
|
|
11
|
-
map((ext) => `*${ext}`).
|
|
12
|
-
join(" ")} marko.json marko-tag.json`
|
|
13
|
-
).
|
|
14
|
-
onFileModified((path) => {
|
|
15
|
-
hotReload.handleFileModified(path);
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
}
|
|
1
|
+
"use strict";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// eslint-disable-next-line no-constant-binary-expression
|
|
3
|
-
|
|
3
|
+
|
|
4
4
|
const path = require("path");
|
|
5
5
|
const resolveFrom = require("resolve-from");
|
|
6
6
|
const requiredCompilerOptions = { modules: "cjs" };
|
|
7
7
|
const defaultCompilerOptions = {
|
|
8
8
|
// eslint-disable-next-line no-constant-condition
|
|
9
|
-
sourceMaps:
|
|
9
|
+
sourceMaps: false,
|
|
10
10
|
meta: true,
|
|
11
11
|
babelConfig: {
|
|
12
12
|
babelrc: false,
|
|
@@ -17,11 +17,11 @@ const defaultCompilerOptions = {
|
|
|
17
17
|
const MARKO_EXTENSIONS = Symbol("MARKO_EXTENSIONS");
|
|
18
18
|
|
|
19
19
|
// eslint-disable-next-line no-constant-condition
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
25
|
|
|
26
26
|
function normalizeExtension(extension) {
|
|
27
27
|
if (extension.charAt(0) !== ".") {
|
|
@@ -7,17 +7,17 @@ key,
|
|
|
7
7
|
ownerComponentDef)
|
|
8
8
|
{
|
|
9
9
|
var componentId = component.id;
|
|
10
|
-
var componentDef = componentsContext.
|
|
10
|
+
var componentDef = componentsContext.p_ = new ComponentDef(
|
|
11
11
|
component,
|
|
12
12
|
componentId,
|
|
13
13
|
componentsContext
|
|
14
14
|
);
|
|
15
|
-
componentsContext.
|
|
15
|
+
componentsContext.q_.r_[
|
|
16
16
|
componentId] =
|
|
17
17
|
true;
|
|
18
|
-
componentsContext.
|
|
18
|
+
componentsContext.b_.push(componentDef);
|
|
19
19
|
|
|
20
|
-
var out = componentsContext.
|
|
21
|
-
out.bc(component, key, ownerComponentDef && ownerComponentDef.
|
|
20
|
+
var out = componentsContext.s_;
|
|
21
|
+
out.bc(component, key, ownerComponentDef && ownerComponentDef.t_);
|
|
22
22
|
return componentDef;
|
|
23
23
|
};
|
|
@@ -21,20 +21,20 @@ existingComponentDef)
|
|
|
21
21
|
// widget. It should be removed when the legacy compat layer is removed.
|
|
22
22
|
var componentDef =
|
|
23
23
|
existingComponentDef || (
|
|
24
|
-
componentsContext.
|
|
24
|
+
componentsContext.p_ = new ComponentDef(
|
|
25
25
|
component,
|
|
26
26
|
componentId,
|
|
27
27
|
componentsContext
|
|
28
28
|
));
|
|
29
29
|
|
|
30
30
|
var ownerIsRenderBoundary =
|
|
31
|
-
ownerComponentDef && ownerComponentDef.
|
|
31
|
+
ownerComponentDef && ownerComponentDef.u_;
|
|
32
32
|
var ownerWillRerender =
|
|
33
33
|
ownerComponentDef &&
|
|
34
|
-
ownerComponentDef.
|
|
34
|
+
ownerComponentDef.v_ & FLAG_WILL_RERENDER_IN_BROWSER;
|
|
35
35
|
// On the server
|
|
36
|
-
if (!componentsContext.
|
|
37
|
-
componentDef.
|
|
36
|
+
if (!componentsContext.w_ && ownerWillRerender) {
|
|
37
|
+
componentDef.v_ |= FLAG_WILL_RERENDER_IN_BROWSER;
|
|
38
38
|
componentDef._wrr = true;
|
|
39
39
|
return componentDef;
|
|
40
40
|
}
|
|
@@ -46,22 +46,22 @@ existingComponentDef)
|
|
|
46
46
|
return componentDef;
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
componentsContext.
|
|
49
|
+
componentsContext.b_.push(componentDef);
|
|
50
50
|
|
|
51
|
-
let out = componentsContext.
|
|
51
|
+
let out = componentsContext.s_;
|
|
52
52
|
let runtimeId = out.global.runtimeId;
|
|
53
53
|
|
|
54
|
-
componentDef.
|
|
55
|
-
componentDef.
|
|
54
|
+
componentDef.u_ = true;
|
|
55
|
+
componentDef.x_ = componentsContext.w_;
|
|
56
56
|
|
|
57
57
|
if (isSplitComponent === false && out.global.noBrowserRerender !== true) {
|
|
58
|
-
componentDef.
|
|
58
|
+
componentDef.v_ |= FLAG_WILL_RERENDER_IN_BROWSER;
|
|
59
59
|
componentDef._wrr = true;
|
|
60
|
-
componentsContext.
|
|
60
|
+
componentsContext.w_ = false;
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
if (out.global.oldHydrateNoCreate === true) {
|
|
64
|
-
componentDef.
|
|
64
|
+
componentDef.v_ |= FLAG_OLD_HYDRATE_NO_CREATE;
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
if ((ownerIsRenderBoundary || ownerWillRerender) && key != null) {
|