marko 5.35.7 → 5.35.9
Sign up to get free protection for your applications and to get access to all the features.
- 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 +4 -4
- 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
package/bin/markoc.js
CHANGED
package/dist/compiler/index.js
CHANGED
@@ -8,8 +8,9 @@ var req = require("@internal/require");
|
|
8
8
|
var registry = require("@internal/components-registry");
|
9
9
|
var jQuery = require("../../../runtime/components/legacy/jquery");
|
10
10
|
var ready = require("../../../runtime/components/legacy/ready");
|
11
|
+
// eslint-disable-next-line no-constant-binary-expression
|
11
12
|
|
12
|
-
|
13
|
+
var hasHowOwnProperty = {}.hasOwnProperty;
|
13
14
|
var stateToJSONDef = {
|
14
15
|
enumerable: false,
|
15
16
|
value: function returnSelf() {
|
@@ -55,7 +56,7 @@ module.exports = function defineWidget(def, renderer) {
|
|
55
56
|
// Inherit from Component if they didn't already
|
56
57
|
ComponentClass.prototype = Object.create(BaseComponent.prototype);
|
57
58
|
for (var propName in proto) {
|
58
|
-
if (
|
59
|
+
if (hasOwnProperty.call(proto, propName)) {
|
59
60
|
ComponentClass.prototype[propName] = proto[propName];
|
60
61
|
}
|
61
62
|
}
|
@@ -190,6 +191,7 @@ module.exports = function defineWidget(def, renderer) {
|
|
190
191
|
};
|
191
192
|
|
192
193
|
function modernMountOrUpdate() {
|
194
|
+
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
193
195
|
var self = this;
|
194
196
|
var el = this.K_["@_wbind"];
|
195
197
|
var prevEl = this.C_;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
3
|
var warp10 = require("warp10");
|
4
|
-
var
|
4
|
+
var w10ToJSON = require("../../../runtime/helpers/serialize-noop").V_;
|
5
5
|
var safeJSONRegExp = /<\/|\u2028|\u2029/g;
|
6
6
|
var IGNORE_GLOBAL_TYPES = new Set(["undefined", "function", "symbol"]);
|
7
7
|
var DEFAULT_RUNTIME_ID = "M";
|
@@ -73,9 +73,9 @@ function addComponentsFromContext(componentsContext, componentsToHydrate) {
|
|
73
73
|
var state = component.state;
|
74
74
|
var input = component.input || 0;
|
75
75
|
var typeName = component.typeName;
|
76
|
-
var customEvents = component.
|
77
|
-
var scope = component.
|
78
|
-
var bubblingDomEvents = component.
|
76
|
+
var customEvents = component.W_;
|
77
|
+
var scope = component.X_;
|
78
|
+
var bubblingDomEvents = component.Y_;
|
79
79
|
|
80
80
|
var needsState;
|
81
81
|
var serializedProps;
|
@@ -83,7 +83,7 @@ function addComponentsFromContext(componentsContext, componentsToHydrate) {
|
|
83
83
|
|
84
84
|
if (isLegacy) {
|
85
85
|
flags |= FLAG_IS_LEGACY;
|
86
|
-
renderBody = component.
|
86
|
+
renderBody = component.Z_;
|
87
87
|
|
88
88
|
if (component.widgetConfig && isNotEmpty(component.widgetConfig)) {
|
89
89
|
serializedProps = component.widgetConfig;
|
@@ -99,12 +99,12 @@ function addComponentsFromContext(componentsContext, componentsToHydrate) {
|
|
99
99
|
component.O_ = undefined; // We don't use `delete` to avoid V8 deoptimization
|
100
100
|
component.typeName = undefined;
|
101
101
|
component.id = undefined;
|
102
|
-
component.V_ = undefined;
|
103
102
|
component.W_ = undefined;
|
104
103
|
component.X_ = undefined;
|
105
|
-
component.
|
104
|
+
component.Y_ = undefined;
|
106
105
|
component.___ = undefined;
|
107
106
|
component._a_ = undefined;
|
107
|
+
component._b_ = undefined;
|
108
108
|
|
109
109
|
needsState = true;
|
110
110
|
|
@@ -136,14 +136,14 @@ function addComponentsFromContext(componentsContext, componentsToHydrate) {
|
|
136
136
|
}
|
137
137
|
}
|
138
138
|
|
139
|
-
if (typeof renderBody === "function" && renderBody.toJSON
|
139
|
+
if (typeof renderBody === "function" && renderBody.toJSON === w10ToJSON) {
|
140
140
|
flags |= FLAG_HAS_RENDER_BODY;
|
141
141
|
renderBody = input.renderBody = undefined;
|
142
142
|
}
|
143
143
|
|
144
144
|
var extra = {
|
145
145
|
b: bubblingDomEvents,
|
146
|
-
d: componentDef.
|
146
|
+
d: componentDef._c_,
|
147
147
|
e: customEvents,
|
148
148
|
f: flags || undefined,
|
149
149
|
p: customEvents && scope, // Only serialize scope if we need to attach custom events
|
@@ -172,7 +172,7 @@ function addComponentsFromContext(componentsContext, componentsToHydrate) {
|
|
172
172
|
components.length = 0;
|
173
173
|
|
174
174
|
// Also add any components from nested contexts
|
175
|
-
var nestedContexts = componentsContext.
|
175
|
+
var nestedContexts = componentsContext._d_;
|
176
176
|
if (nestedContexts !== undefined) {
|
177
177
|
nestedContexts.forEach(function (nestedContext) {
|
178
178
|
addComponentsFromContext(nestedContext, componentsToHydrate);
|
@@ -184,7 +184,7 @@ function getInitComponentsData(out, componentDefs) {
|
|
184
184
|
const len = componentDefs.length;
|
185
185
|
const $global = out.global;
|
186
186
|
const isLast = $global.d_;
|
187
|
-
const didSerializeComponents = $global.
|
187
|
+
const didSerializeComponents = $global._e_;
|
188
188
|
const prefix = $global.componentIdPrefix || $global.widgetIdPrefix;
|
189
189
|
|
190
190
|
if (len === 0) {
|
@@ -197,7 +197,7 @@ function getInitComponentsData(out, componentDefs) {
|
|
197
197
|
|
198
198
|
const TYPE_INDEX = 1;
|
199
199
|
const typesLookup =
|
200
|
-
$global.
|
200
|
+
$global._f_ || ($global._f_ = new Map());
|
201
201
|
let newTypes;
|
202
202
|
|
203
203
|
for (let i = 0; i < len; i++) {
|
@@ -222,7 +222,7 @@ function getInitComponentsData(out, componentDefs) {
|
|
222
222
|
let serializedGlobals;
|
223
223
|
|
224
224
|
if (!didSerializeComponents) {
|
225
|
-
$global.
|
225
|
+
$global._e_ = true;
|
226
226
|
serializedGlobals = getSerializedGlobals($global);
|
227
227
|
}
|
228
228
|
|
@@ -3,10 +3,11 @@ var req = require("@internal/require");
|
|
3
3
|
var getComponentForEl =
|
4
4
|
require("@internal/components-util").T_;
|
5
5
|
|
6
|
+
// eslint-disable-next-line no-constant-binary-expression
|
6
7
|
|
7
8
|
|
8
9
|
// expose legacy
|
9
|
-
require("@internal/components-registry").
|
10
|
+
require("@internal/components-registry")._g_ = exports;
|
10
11
|
exports.load = function (typeName) {
|
11
12
|
return exports.defineWidget(req(typeName));
|
12
13
|
};
|
@@ -40,8 +41,8 @@ require("@internal/components-registry").U_;
|
|
40
41
|
if (Widget) {
|
41
42
|
var WidgetProto = Widget.prototype;
|
42
43
|
WidgetProto.setProps = function (newInput) {
|
43
|
-
this.
|
44
|
-
this.
|
44
|
+
this._h_ = true;
|
45
|
+
this._i_(newInput);
|
45
46
|
};
|
46
47
|
WidgetProto.rerender = function (newInput) {
|
47
48
|
if (newInput) {
|
@@ -1,20 +1,21 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
1
|
+
"use strict"; // eslint-disable-next-line no-constant-binary-expression
|
2
|
+
|
3
|
+
var setImmediate = require("@internal/set-immediate")._j_;
|
3
4
|
var warp10Finalize = require("warp10/finalize");
|
4
5
|
var defineComponent = require("../../../runtime/components/defineComponent");
|
5
6
|
var eventDelegation = require("../../../runtime/components/event-delegation");
|
6
7
|
var createFragmentNode =
|
7
|
-
require("../../../runtime/vdom/morphdom/fragment").
|
8
|
+
require("../../../runtime/vdom/morphdom/fragment")._k_;
|
8
9
|
var ComponentDef = require("../../../runtime/components/ComponentDef");
|
9
10
|
var domData = require("../../../runtime/components/dom-data");
|
10
11
|
var componentsUtil = require("@internal/components-util");
|
11
12
|
var req = require("@internal/require");
|
12
|
-
var componentLookup = componentsUtil.
|
13
|
+
var componentLookup = componentsUtil._l_;
|
13
14
|
var addComponentRootToKeyedElements =
|
14
|
-
componentsUtil.
|
15
|
-
var keysByDOMNode = domData.
|
16
|
-
var keyedElementsByComponentId = domData.
|
17
|
-
var componentsByDOMNode = domData.
|
15
|
+
componentsUtil._m_;
|
16
|
+
var keysByDOMNode = domData._n_;
|
17
|
+
var keyedElementsByComponentId = domData._o_;
|
18
|
+
var componentsByDOMNode = domData._p_;
|
18
19
|
var serverComponentRootNodes = {};
|
19
20
|
var serverRenderedMeta = {};
|
20
21
|
var win = window;
|
@@ -70,7 +71,7 @@ function load(typeName, isLegacy) {
|
|
70
71
|
if (target) {
|
71
72
|
target = target();
|
72
73
|
} else if (isLegacy) {
|
73
|
-
target = exports.
|
74
|
+
target = exports._g_.load(typeName);
|
74
75
|
} else {
|
75
76
|
target = req(typeName);
|
76
77
|
// eslint-disable-next-line no-constant-condition
|
@@ -107,7 +108,7 @@ function getComponentClass(typeName, isLegacy) {
|
|
107
108
|
}
|
108
109
|
|
109
110
|
// Make the component "type" accessible on each component instance
|
110
|
-
ComponentClass.prototype.
|
111
|
+
ComponentClass.prototype._q_ = typeName;
|
111
112
|
|
112
113
|
// eslint-disable-next-line no-constant-condition
|
113
114
|
|
@@ -210,7 +211,7 @@ function indexServerComponentBoundaries(node, runtimeId, stack) {
|
|
210
211
|
} else if (node.nodeType === 1) {
|
211
212
|
// HTML element node
|
212
213
|
var markoKey = node.getAttribute("data-marko-key");
|
213
|
-
var markoProps = componentsUtil.
|
214
|
+
var markoProps = componentsUtil._r_(node);
|
214
215
|
if (markoKey) {
|
215
216
|
var separatorIndex = markoKey.indexOf(" ");
|
216
217
|
ownerId = markoKey.substring(separatorIndex + 1);
|
@@ -229,7 +230,7 @@ function indexServerComponentBoundaries(node, runtimeId, stack) {
|
|
229
230
|
if (markoProps) {
|
230
231
|
Object.keys(markoProps).forEach(function (key) {
|
231
232
|
if (key.slice(0, 2) === "on") {
|
232
|
-
eventDelegation.
|
233
|
+
eventDelegation._s_(key.slice(2));
|
233
234
|
}
|
234
235
|
});
|
235
236
|
}
|
@@ -297,16 +298,16 @@ function initComponent(componentDef, host) {
|
|
297
298
|
return; // legacy
|
298
299
|
}
|
299
300
|
|
300
|
-
component.
|
301
|
+
component._t_();
|
301
302
|
component.B_ = host;
|
302
303
|
|
303
|
-
var isExisting = componentDef.
|
304
|
+
var isExisting = componentDef._u_;
|
304
305
|
|
305
306
|
if (isExisting) {
|
306
|
-
component.
|
307
|
+
component._v_();
|
307
308
|
}
|
308
309
|
|
309
|
-
var domEvents = componentDef.
|
310
|
+
var domEvents = componentDef._c_;
|
310
311
|
if (domEvents) {
|
311
312
|
var eventListenerHandles = [];
|
312
313
|
|
@@ -331,15 +332,15 @@ function initComponent(componentDef, host) {
|
|
331
332
|
});
|
332
333
|
|
333
334
|
if (eventListenerHandles.length) {
|
334
|
-
component.
|
335
|
+
component._w_ = eventListenerHandles;
|
335
336
|
}
|
336
337
|
}
|
337
338
|
|
338
|
-
if (component.
|
339
|
-
component._x_();
|
340
|
-
} else {
|
341
|
-
component._w_ = true;
|
339
|
+
if (component._x_) {
|
342
340
|
component._y_();
|
341
|
+
} else {
|
342
|
+
component._x_ = true;
|
343
|
+
component._z_();
|
343
344
|
}
|
344
345
|
}
|
345
346
|
|
@@ -355,7 +356,7 @@ function initClientRendered(componentDefs, host) {
|
|
355
356
|
if (!host) host = document;
|
356
357
|
// Ensure that event handlers to handle delegating events are
|
357
358
|
// always attached before initializing any components
|
358
|
-
eventDelegation.
|
359
|
+
eventDelegation._A_(host);
|
359
360
|
var len = componentDefs.length;
|
360
361
|
var componentDef;
|
361
362
|
var i;
|
@@ -449,7 +450,7 @@ function initServerRendered(renderedComponents, host) {
|
|
449
450
|
|
450
451
|
|
451
452
|
|
452
|
-
var prefix = renderedComponents.p || "";
|
453
|
+
var prefix = renderedComponents.p || "s";
|
453
454
|
var meta = serverRenderedMeta[prefix];
|
454
455
|
var isLast = renderedComponents.l;
|
455
456
|
|
@@ -468,15 +469,18 @@ function initServerRendered(renderedComponents, host) {
|
|
468
469
|
// Ensure that event handlers to handle delegating events are
|
469
470
|
// always attached before initializing any components
|
470
471
|
indexServerComponentBoundaries(host, runtimeId);
|
471
|
-
eventDelegation.
|
472
|
+
eventDelegation._A_(host);
|
472
473
|
|
473
|
-
if (
|
474
|
-
meta.
|
474
|
+
if (!meta._B_) {
|
475
|
+
meta._B_ = Object.assign({
|
476
|
+
runtimeId: runtimeId,
|
477
|
+
componentIdPrefix: prefix
|
478
|
+
}, renderedComponents.g);
|
475
479
|
}
|
476
480
|
|
477
481
|
if (renderedComponents.t) {
|
478
|
-
meta.
|
479
|
-
meta.
|
482
|
+
meta._C_ = meta._C_ ?
|
483
|
+
meta._C_.concat(renderedComponents.t) :
|
480
484
|
renderedComponents.t;
|
481
485
|
}
|
482
486
|
|
@@ -484,7 +488,7 @@ function initServerRendered(renderedComponents, host) {
|
|
484
488
|
// and return an array of functions to mount these components
|
485
489
|
(renderedComponents.w || []).
|
486
490
|
map(function (componentDef) {
|
487
|
-
var typeName = meta.
|
491
|
+
var typeName = meta._C_[componentDef[1]];
|
488
492
|
|
489
493
|
return registered[typeName] ||
|
490
494
|
req.e(typeName) ?
|
@@ -498,10 +502,10 @@ function initServerRendered(renderedComponents, host) {
|
|
498
502
|
}
|
499
503
|
|
500
504
|
function tryHydrateComponent(rawDef, meta, host, runtimeId) {
|
501
|
-
var componentDef = ComponentDef.
|
505
|
+
var componentDef = ComponentDef._D_(
|
502
506
|
rawDef,
|
507
|
+
meta._C_,
|
503
508
|
meta._B_,
|
504
|
-
meta._A_,
|
505
509
|
exports
|
506
510
|
);
|
507
511
|
var mount = hydrateComponentAndGetMount(componentDef, host);
|
@@ -539,12 +543,12 @@ function hydrateComponentAndGetMount(componentDef, host) {
|
|
539
543
|
if (rootNode) {
|
540
544
|
delete serverComponentRootNodes[componentId];
|
541
545
|
|
542
|
-
component.
|
546
|
+
component._E_ = rootNode;
|
543
547
|
componentsByDOMNode.set(rootNode, component);
|
544
548
|
|
545
549
|
if (componentDef.u_ & FLAG_WILL_RERENDER_IN_BROWSER) {
|
546
550
|
component.B_ = host;
|
547
|
-
renderResult = component.
|
551
|
+
renderResult = component._F_(component.O_, true);
|
548
552
|
trackComponent(componentDef);
|
549
553
|
return function mount() {
|
550
554
|
renderResult.afterInsert(host);
|
@@ -571,9 +575,9 @@ function tryInvoke(fn) {
|
|
571
575
|
}
|
572
576
|
|
573
577
|
exports.r = register;
|
574
|
-
exports.
|
575
|
-
exports.
|
578
|
+
exports._G_ = createComponent;
|
579
|
+
exports._H_ = getComponentClass;
|
576
580
|
exports.U_ = win.$initComponents = initServerRendered;
|
577
581
|
|
578
|
-
require("../../../runtime/components/ComponentsContext").
|
582
|
+
require("../../../runtime/components/ComponentsContext")._I_ =
|
579
583
|
initClientRendered;
|
@@ -1,8 +1,8 @@
|
|
1
1
|
"use strict";var domData = require("../../../runtime/components/dom-data");
|
2
|
-
var componentsByDOMNode = domData.
|
3
|
-
var keysByDOMNode = domData.
|
4
|
-
var vElementsByDOMNode = domData.
|
5
|
-
var vPropsByDOMNode = domData.
|
2
|
+
var componentsByDOMNode = domData._p_;
|
3
|
+
var keysByDOMNode = domData._n_;
|
4
|
+
var vElementsByDOMNode = domData._K_;
|
5
|
+
var vPropsByDOMNode = domData._L_;
|
6
6
|
var markoUID = window.$MUID || (window.$MUID = { i: 0 });
|
7
7
|
var runtimeId = markoUID.i++;
|
8
8
|
|
@@ -27,7 +27,7 @@ function getComponentForEl(el, host) {
|
|
27
27
|
component = componentsByDOMNode.get(node);
|
28
28
|
}
|
29
29
|
} else if (vElement = vElementsByDOMNode.get(node)) {
|
30
|
-
component = vElement.
|
30
|
+
component = vElement._M_;
|
31
31
|
}
|
32
32
|
|
33
33
|
if (component) {
|
@@ -41,7 +41,7 @@ function getComponentForEl(el, host) {
|
|
41
41
|
function destroyComponentForNode(node) {
|
42
42
|
var componentToDestroy = componentsByDOMNode.get(node.fragment || node);
|
43
43
|
if (componentToDestroy) {
|
44
|
-
componentToDestroy.
|
44
|
+
componentToDestroy._N_();
|
45
45
|
delete componentLookup[componentToDestroy.id];
|
46
46
|
}
|
47
47
|
}
|
@@ -103,7 +103,7 @@ function getMarkoPropsFromEl(el) {
|
|
103
103
|
var virtualProps;
|
104
104
|
|
105
105
|
if (vElement) {
|
106
|
-
virtualProps = vElement.
|
106
|
+
virtualProps = vElement._O_;
|
107
107
|
} else {
|
108
108
|
virtualProps = vPropsByDOMNode.get(el);
|
109
109
|
if (!virtualProps) {
|
@@ -167,13 +167,13 @@ componentId)
|
|
167
167
|
|
168
168
|
|
169
169
|
|
170
|
-
exports.
|
171
|
-
exports.
|
170
|
+
exports._P_ = runtimeId;
|
171
|
+
exports._l_ = componentLookup;
|
172
172
|
exports.T_ = getComponentForEl;
|
173
|
-
exports.
|
174
|
-
exports.
|
175
|
-
exports.
|
176
|
-
exports.
|
177
|
-
exports.
|
178
|
-
exports.
|
179
|
-
exports.
|
173
|
+
exports._Q_ = destroyComponentForNode;
|
174
|
+
exports._R_ = destroyNodeRecursive;
|
175
|
+
exports._S_ = nextComponentIdProvider;
|
176
|
+
exports._T_ = attachBubblingEvent;
|
177
|
+
exports._r_ = getMarkoPropsFromEl;
|
178
|
+
exports._m_ = addComponentRootToKeyedElements;
|
179
|
+
exports._U_ = normalizeComponentKey;
|
@@ -29,7 +29,7 @@ extraArgs)
|
|
29
29
|
if (handlerMethodName) {
|
30
30
|
if (extraArgs) {
|
31
31
|
var component = componentDef.s_;
|
32
|
-
var eventIndex = component.
|
32
|
+
var eventIndex = component.___++;
|
33
33
|
|
34
34
|
// If we are not going to be doing a rerender in the browser
|
35
35
|
// then we need to actually store the extra args with the UI component
|
@@ -41,9 +41,9 @@ extraArgs)
|
|
41
41
|
|
42
42
|
if (!(componentDef.u_ & FLAG_WILL_RERENDER_IN_BROWSER)) {
|
43
43
|
if (eventIndex === 0) {
|
44
|
-
component.
|
44
|
+
component.Y_ = [extraArgs];
|
45
45
|
} else {
|
46
|
-
component.
|
46
|
+
component.Y_.push(extraArgs);
|
47
47
|
}
|
48
48
|
}
|
49
49
|
|
@@ -62,10 +62,10 @@ extraArgs)
|
|
62
62
|
}
|
63
63
|
}
|
64
64
|
|
65
|
-
exports.
|
66
|
-
exports.
|
67
|
-
exports.
|
68
|
-
exports._P_ = function noop() {};
|
65
|
+
exports._S_ = nextComponentIdProvider;
|
66
|
+
exports._J_ = true;
|
67
|
+
exports._T_ = attachBubblingEvent;
|
69
68
|
exports._Q_ = function noop() {};
|
69
|
+
exports._R_ = function noop() {};
|
70
70
|
|
71
71
|
// eslint-disable-next-line no-constant-condition
|
@@ -2,7 +2,7 @@
|
|
2
2
|
var noop = function () {};
|
3
3
|
|
4
4
|
module.exports = function (data) {
|
5
|
-
|
5
|
+
|
6
6
|
var transformStream = new TransformStream();
|
7
7
|
var writer = transformStream.writable.getWriter();
|
8
8
|
var facade = {
|
@@ -17,7 +17,7 @@ module.exports = function (data) {
|
|
17
17
|
data && data.$global,
|
18
18
|
facade,
|
19
19
|
undefined,
|
20
|
-
this.
|
20
|
+
this._V_
|
21
21
|
);
|
22
22
|
out.once("error", (err) => {
|
23
23
|
facade.write = facade.end = noop;
|
@@ -17,9 +17,9 @@ if (String(OutgoingMessageProto.flush).indexOf("deprecated") !== -1) {
|
|
17
17
|
class Readable extends stream.Readable {
|
18
18
|
constructor(template, data) {
|
19
19
|
super();
|
20
|
-
this.
|
21
|
-
this.
|
22
|
-
this.
|
20
|
+
this._W_ = template;
|
21
|
+
this._X_ = data;
|
22
|
+
this._Y_ = false;
|
23
23
|
}
|
24
24
|
|
25
25
|
write(data) {
|
@@ -33,19 +33,19 @@ class Readable extends stream.Readable {
|
|
33
33
|
}
|
34
34
|
|
35
35
|
_read() {
|
36
|
-
if (this.
|
36
|
+
if (this._Y_) {
|
37
37
|
return;
|
38
38
|
}
|
39
39
|
|
40
|
-
this.
|
41
|
-
var template = this.
|
42
|
-
var data = this.
|
40
|
+
this._Y_ = true;
|
41
|
+
var template = this._W_;
|
42
|
+
var data = this._X_;
|
43
43
|
var globalData = data && data.$global;
|
44
|
-
var out = this.
|
44
|
+
var out = this._W_.createOut(
|
45
45
|
globalData,
|
46
46
|
this,
|
47
47
|
undefined,
|
48
|
-
template.
|
48
|
+
template._V_
|
49
49
|
);
|
50
50
|
template.render(data, out);
|
51
51
|
out.end();
|
@@ -3,10 +3,10 @@
|
|
3
3
|
var shouldPreserve = !("i" in input) || input.i;
|
4
4
|
var componentsContext = out.b_;
|
5
5
|
var isHydrate =
|
6
|
-
componentsContext && componentsContext.p_.
|
7
|
-
var ownerComponent = out.
|
6
|
+
componentsContext && componentsContext.p_._Z_;
|
7
|
+
var ownerComponent = out.a__.s_;
|
8
8
|
var referenceComponent = ownerComponent;
|
9
|
-
var key = out.
|
9
|
+
var key = out.aa_;
|
10
10
|
var checkKey = key;
|
11
11
|
|
12
12
|
if (key[0] !== "@") {
|
@@ -33,10 +33,10 @@
|
|
33
33
|
} else {
|
34
34
|
if (isPreserved) {
|
35
35
|
if (input.b) {
|
36
|
-
out.
|
36
|
+
out.ab_.ac_ = true;
|
37
37
|
} else {
|
38
38
|
out.beginElement("", null, key, ownerComponent);
|
39
|
-
out.
|
39
|
+
out.ab_.ad_ = true;
|
40
40
|
out.endElement();
|
41
41
|
}
|
42
42
|
} else if (input.renderBody) {
|
@@ -3,7 +3,7 @@ var count = 0;
|
|
3
3
|
var queue = new Set();
|
4
4
|
function noop() {}
|
5
5
|
|
6
|
-
exports.
|
6
|
+
exports._j_ = function setImmediate(cb) {
|
7
7
|
queue.add(cb);
|
8
8
|
if (!count) {
|
9
9
|
queueMicrotaskInternal(noop);
|
@@ -11,7 +11,7 @@ exports._i_ = function setImmediate(cb) {
|
|
11
11
|
return cb;
|
12
12
|
};
|
13
13
|
|
14
|
-
exports.
|
14
|
+
exports.ae_ = function clearImmediate(id) {
|
15
15
|
queue.delete(id);
|
16
16
|
};
|
17
17
|
|
@@ -1,3 +1,3 @@
|
|
1
|
-
"use strict";exports.
|
2
|
-
exports.
|
1
|
+
"use strict";exports._j_ = setImmediate;
|
2
|
+
exports.ae_ = clearImmediate;
|
3
3
|
exports.e_ = require("./queueMicrotask");
|
@@ -1,4 +1,5 @@
|
|
1
1
|
"use strict";var domInsert = require("./dom-insert");
|
2
|
+
// eslint-disable-next-line no-constant-binary-expression
|
2
3
|
|
3
4
|
|
4
5
|
function getRootNode(el) {
|
@@ -50,7 +51,7 @@ var proto = RenderResult.prototype = {
|
|
50
51
|
var out = this.r_;
|
51
52
|
var componentsContext = out.b_;
|
52
53
|
if (componentsContext) {
|
53
|
-
this.b_ = componentsContext.
|
54
|
+
this.b_ = componentsContext.af_(host);
|
54
55
|
} else {
|
55
56
|
this.b_ = null;
|
56
57
|
}
|
@@ -58,10 +59,10 @@ var proto = RenderResult.prototype = {
|
|
58
59
|
return this;
|
59
60
|
},
|
60
61
|
getNode: function (host) {
|
61
|
-
return this.r_.
|
62
|
+
return this.r_.ag_(host);
|
62
63
|
},
|
63
64
|
getOutput: function () {
|
64
|
-
return this.r_.
|
65
|
+
return this.r_.ah_();
|
65
66
|
},
|
66
67
|
toString: function () {
|
67
68
|
return this.r_.toString();
|