marko 5.21.4 → 5.21.7
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 +26 -6
- package/dist/runtime/RenderResult.js +7 -7
- package/dist/runtime/components/Component.js +129 -129
- package/dist/runtime/components/ComponentDef.js +25 -25
- package/dist/runtime/components/ComponentsContext.js +8 -8
- 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 +25 -25
- package/dist/runtime/components/attach-detach.js +8 -8
- package/dist/runtime/components/beginComponent/index-browser.js +2 -2
- package/dist/runtime/components/beginComponent/index.js +7 -7
- package/dist/runtime/components/defineComponent.js +5 -5
- package/dist/runtime/components/dom-data.js +3 -3
- package/dist/runtime/components/endComponent/index.js +2 -2
- package/dist/runtime/components/entry/index-browser.js +4 -4
- package/dist/runtime/components/entry/index.js +15 -15
- package/dist/runtime/components/event-delegation.js +10 -10
- package/dist/runtime/components/init-components/index-browser.js +34 -34
- package/dist/runtime/components/registry/index-browser.js +7 -7
- package/dist/runtime/components/registry/index.js +2 -2
- package/dist/runtime/components/renderer.js +26 -26
- package/dist/runtime/components/update-manager.js +10 -10
- package/dist/runtime/components/util/index-browser.js +17 -17
- package/dist/runtime/components/util/index.js +9 -9
- 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 +7 -7
- package/dist/runtime/helpers/style-value.js +1 -1
- package/dist/runtime/html/AsyncStream.js +20 -20
- package/dist/runtime/html/BufferedWriter.js +2 -2
- package/dist/runtime/html/StringWriter.js +1 -1
- package/dist/runtime/html/helpers/attr.js +1 -1
- package/dist/runtime/html/helpers/data-marko.js +4 -4
- 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/props-script.js +1 -1
- package/dist/runtime/html/index.js +1 -1
- package/dist/runtime/renderable.js +4 -4
- package/dist/runtime/setImmediate/index-browser.js +1 -1
- package/dist/runtime/setImmediate/index-worker.js +2 -2
- package/dist/runtime/setImmediate/index.js +2 -2
- package/dist/runtime/vdom/AsyncVDOMBuilder.js +28 -28
- package/dist/runtime/vdom/VDocumentFragment.js +1 -1
- package/dist/runtime/vdom/VElement.js +11 -11
- package/dist/runtime/vdom/VFragment.js +3 -3
- package/dist/runtime/vdom/VNode.js +4 -4
- package/dist/runtime/vdom/hot-reload.js +15 -15
- package/dist/runtime/vdom/index.js +1 -1
- 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 +28 -28
- package/dist/runtime/vdom/morphdom/specialElHandlers.js +1 -1
- package/package.json +2 -2
- package/src/core-tags/core/await/reorderer-renderer.js +27 -7
@@ -2,9 +2,9 @@
|
|
2
2
|
|
3
3
|
var w10Noop = require("warp10/constants").NOOP;
|
4
4
|
var componentUtil = require("./util");
|
5
|
-
var attachBubblingEvent = componentUtil.
|
5
|
+
var attachBubblingEvent = componentUtil._D_;
|
6
6
|
var addDelegatedEventHandler =
|
7
|
-
require("./event-delegation").
|
7
|
+
require("./event-delegation")._E_;
|
8
8
|
var extend = require("raptor-util/extend");
|
9
9
|
var KeySequence = require("./KeySequence");
|
10
10
|
var EMPTY_OBJECT = {};
|
@@ -18,25 +18,25 @@ var FLAG_HAS_RENDER_BODY = 2;
|
|
18
18
|
* later (after the rendered HTML has been added to the DOM)
|
19
19
|
*/
|
20
20
|
function ComponentDef(component, componentId, componentsContext) {
|
21
|
-
this.
|
21
|
+
this._F_ = componentsContext; // The AsyncWriter that this component is associated with
|
22
22
|
this.h_ = component;
|
23
23
|
this.id = componentId;
|
24
24
|
|
25
|
-
this.
|
26
|
-
|
27
|
-
this._G_ = false;
|
25
|
+
this._G_ = undefined; // An array of DOM events that need to be added (in sets of three)
|
28
26
|
|
29
27
|
this._H_ = false;
|
30
|
-
this._I_ = 0;
|
31
28
|
|
32
|
-
this.
|
33
|
-
this.
|
29
|
+
this._I_ = false;
|
30
|
+
this._J_ = 0;
|
31
|
+
|
32
|
+
this._K_ = 0; // The unique integer to use for the next scoped ID
|
33
|
+
this._L_ = null;
|
34
34
|
}
|
35
35
|
|
36
36
|
ComponentDef.prototype = {
|
37
|
-
|
37
|
+
_M_: function (key) {
|
38
38
|
return (
|
39
|
-
this.
|
39
|
+
this._L_ || (this._L_ = new KeySequence()))._M_(
|
40
40
|
key);
|
41
41
|
},
|
42
42
|
|
@@ -70,8 +70,8 @@ ComponentDef.prototype = {
|
|
70
70
|
/**
|
71
71
|
* Returns the next auto generated unique ID for a nested DOM element or nested DOM component
|
72
72
|
*/
|
73
|
-
|
74
|
-
return this.id + "-c" + this.
|
73
|
+
_N_: function () {
|
74
|
+
return this.id + "-c" + this._K_++;
|
75
75
|
},
|
76
76
|
|
77
77
|
d: function (eventName, handlerMethodName, isOnce, extraArgs) {
|
@@ -79,14 +79,14 @@ ComponentDef.prototype = {
|
|
79
79
|
return attachBubblingEvent(this, handlerMethodName, isOnce, extraArgs);
|
80
80
|
},
|
81
81
|
|
82
|
-
get
|
83
|
-
return this.h_.
|
82
|
+
get _O_() {
|
83
|
+
return this.h_._O_;
|
84
84
|
} };
|
85
85
|
|
86
86
|
|
87
|
-
ComponentDef.prototype.nk = ComponentDef.prototype.
|
87
|
+
ComponentDef.prototype.nk = ComponentDef.prototype._M_;
|
88
88
|
|
89
|
-
ComponentDef.
|
89
|
+
ComponentDef._P_ = function (o, types, global, registry) {
|
90
90
|
var id = o[0];
|
91
91
|
var typeName = types[o[1]];
|
92
92
|
var input = o[2] || null;
|
@@ -95,11 +95,11 @@ ComponentDef._O_ = function (o, types, global, registry) {
|
|
95
95
|
var state = extra.s;
|
96
96
|
var componentProps = extra.w;
|
97
97
|
var flags = extra.f;
|
98
|
-
var component = registry.
|
98
|
+
var component = registry._Q_(typeName, id);
|
99
99
|
|
100
100
|
// Prevent newly created component from being queued for update since we area
|
101
101
|
// just building it from the server info
|
102
|
-
component.
|
102
|
+
component.V_ = true;
|
103
103
|
|
104
104
|
if (flags & FLAG_HAS_RENDER_BODY) {
|
105
105
|
(input || (input = {})).renderBody = w10Noop;
|
@@ -130,25 +130,25 @@ ComponentDef._O_ = function (o, types, global, registry) {
|
|
130
130
|
}
|
131
131
|
}
|
132
132
|
|
133
|
-
component.
|
133
|
+
component.R_ = input;
|
134
134
|
|
135
135
|
if (extra.b) {
|
136
|
-
component.
|
136
|
+
component.O_ = extra.b;
|
137
137
|
}
|
138
138
|
|
139
139
|
var scope = extra.p;
|
140
140
|
var customEvents = extra.e;
|
141
141
|
if (customEvents) {
|
142
|
-
component.
|
142
|
+
component._w_(customEvents, scope);
|
143
143
|
}
|
144
144
|
|
145
|
-
component.
|
145
|
+
component.T_ = global;
|
146
146
|
|
147
147
|
return {
|
148
148
|
id: id,
|
149
149
|
h_: component,
|
150
|
-
|
151
|
-
|
150
|
+
_G_: extra.d,
|
151
|
+
_J_: extra.f || 0 };
|
152
152
|
|
153
153
|
};
|
154
154
|
|
@@ -11,9 +11,9 @@ function ComponentsContext(out, parentComponentsContext) {
|
|
11
11
|
|
12
12
|
var nestedContextsForParent;
|
13
13
|
if (
|
14
|
-
!(nestedContextsForParent = parentComponentsContext.
|
14
|
+
!(nestedContextsForParent = parentComponentsContext._R_))
|
15
15
|
{
|
16
|
-
nestedContextsForParent = parentComponentsContext.
|
16
|
+
nestedContextsForParent = parentComponentsContext._R_ = [];
|
17
17
|
}
|
18
18
|
|
19
19
|
nestedContextsForParent.push(this);
|
@@ -27,24 +27,24 @@ function ComponentsContext(out, parentComponentsContext) {
|
|
27
27
|
|
28
28
|
this.e_ = globalComponentsContext;
|
29
29
|
this.b_ = [];
|
30
|
-
this.
|
30
|
+
this.z_ = out;
|
31
31
|
this.j_ = componentDef;
|
32
|
-
this.
|
32
|
+
this._R_ = undefined;
|
33
33
|
this.p_ =
|
34
34
|
parentComponentsContext && parentComponentsContext.p_;
|
35
35
|
}
|
36
36
|
|
37
37
|
ComponentsContext.prototype = {
|
38
|
-
|
38
|
+
A_: function (host) {
|
39
39
|
var componentDefs = this.b_;
|
40
40
|
|
41
|
-
ComponentsContext.
|
41
|
+
ComponentsContext._S_(componentDefs, host);
|
42
42
|
|
43
|
-
this.
|
43
|
+
this.z_.emit("_T_");
|
44
44
|
|
45
45
|
// Reset things stored in global since global is retained for
|
46
46
|
// future renders
|
47
|
-
this.
|
47
|
+
this.z_.global.b_ = undefined;
|
48
48
|
|
49
49
|
return componentDefs;
|
50
50
|
} };
|
@@ -1,9 +1,9 @@
|
|
1
|
-
"use strict";var nextComponentIdProvider = require("./util").
|
1
|
+
"use strict";var nextComponentIdProvider = require("./util")._U_;
|
2
2
|
|
3
3
|
function GlobalComponentsContext(out) {
|
4
|
-
this.
|
5
|
-
this.
|
6
|
-
this.
|
4
|
+
this._V_ = {};
|
5
|
+
this._r_ = undefined;
|
6
|
+
this._N_ = nextComponentIdProvider(out);
|
7
7
|
}
|
8
8
|
|
9
9
|
module.exports = GlobalComponentsContext;
|
@@ -1,9 +1,9 @@
|
|
1
1
|
"use strict";function KeySequence() {
|
2
|
-
this.
|
2
|
+
this._W_ = Object.create(null);
|
3
3
|
}
|
4
4
|
|
5
|
-
KeySequence.prototype.
|
6
|
-
var lookup = this.
|
5
|
+
KeySequence.prototype._M_ = function (key) {
|
6
|
+
var lookup = this._W_;
|
7
7
|
|
8
8
|
if (lookup[key]) {
|
9
9
|
return key + "_" + lookup[key]++;
|
@@ -4,38 +4,38 @@
|
|
4
4
|
class ServerComponent {
|
5
5
|
constructor(id, input, out, typeName, customEvents, scope) {
|
6
6
|
this.id = id;
|
7
|
-
this.
|
8
|
-
this.
|
7
|
+
this.P_ = customEvents;
|
8
|
+
this.H_ = scope;
|
9
9
|
this.typeName = typeName;
|
10
|
-
this.
|
11
|
-
this.
|
10
|
+
this.O_ = undefined; // Used to keep track of bubbling DOM events for components rendered on the server
|
11
|
+
this._X_ = 0;
|
12
12
|
|
13
13
|
this.onCreate(input, out);
|
14
|
-
this.
|
15
|
-
if (this.
|
16
|
-
this.
|
14
|
+
this._Y_ = this.onInput(input, out) || input;
|
15
|
+
if (this.R_ === undefined) {
|
16
|
+
this.R_ = this._Y_;
|
17
17
|
}
|
18
18
|
this.onRender(out);
|
19
19
|
}
|
20
20
|
|
21
21
|
set input(newInput) {
|
22
|
-
this.
|
22
|
+
this.R_ = newInput;
|
23
23
|
}
|
24
24
|
|
25
25
|
get input() {
|
26
|
-
return this.
|
26
|
+
return this.R_;
|
27
27
|
}
|
28
28
|
|
29
29
|
set state(newState) {
|
30
|
-
this.
|
30
|
+
this.K_ = newState;
|
31
31
|
}
|
32
32
|
|
33
33
|
get state() {
|
34
|
-
return this.
|
34
|
+
return this.K_;
|
35
35
|
}
|
36
36
|
|
37
|
-
get
|
38
|
-
return this.
|
37
|
+
get _u_() {
|
38
|
+
return this.K_;
|
39
39
|
}
|
40
40
|
|
41
41
|
elId(nestedId) {
|
@@ -5,10 +5,10 @@ function ensure(state, propertyName) {
|
|
5
5
|
if (!(propertyName in proto)) {
|
6
6
|
Object.defineProperty(proto, propertyName, {
|
7
7
|
get: function () {
|
8
|
-
return this.
|
8
|
+
return this._v_[propertyName];
|
9
9
|
},
|
10
10
|
set: function (value) {
|
11
|
-
this.
|
11
|
+
this._g_(propertyName, value, false /* ensure:false */);
|
12
12
|
} });
|
13
13
|
|
14
14
|
}
|
@@ -16,35 +16,35 @@ function ensure(state, propertyName) {
|
|
16
16
|
|
17
17
|
function State(component) {
|
18
18
|
this.h_ = component;
|
19
|
-
this.
|
19
|
+
this._v_ = {};
|
20
20
|
|
21
|
-
this.
|
21
|
+
this.W_ = false;
|
22
|
+
this._m_ = null;
|
22
23
|
this._l_ = null;
|
23
|
-
this.
|
24
|
-
this._Y_ = null; // An object that we use to keep tracking of state properties that were forced to be dirty
|
24
|
+
this._Z_ = null; // An object that we use to keep tracking of state properties that were forced to be dirty
|
25
25
|
|
26
26
|
Object.seal(this);
|
27
27
|
}
|
28
28
|
|
29
29
|
State.prototype = {
|
30
|
-
|
30
|
+
J_: function () {
|
31
31
|
var self = this;
|
32
32
|
|
33
|
-
self.
|
33
|
+
self.W_ = false;
|
34
|
+
self._m_ = null;
|
34
35
|
self._l_ = null;
|
35
|
-
self.
|
36
|
-
self._Y_ = null;
|
36
|
+
self._Z_ = null;
|
37
37
|
},
|
38
38
|
|
39
|
-
|
39
|
+
_e_: function (newState) {
|
40
40
|
var state = this;
|
41
41
|
var key;
|
42
42
|
|
43
|
-
var rawState = this.
|
43
|
+
var rawState = this._v_;
|
44
44
|
|
45
45
|
for (key in rawState) {
|
46
46
|
if (!(key in newState)) {
|
47
|
-
state.
|
47
|
+
state._g_(
|
48
48
|
key,
|
49
49
|
undefined,
|
50
50
|
false /* ensure:false */,
|
@@ -54,7 +54,7 @@ State.prototype = {
|
|
54
54
|
}
|
55
55
|
|
56
56
|
for (key in newState) {
|
57
|
-
state.
|
57
|
+
state._g_(
|
58
58
|
key,
|
59
59
|
newState[key],
|
60
60
|
true /* ensure:true */,
|
@@ -62,32 +62,32 @@ State.prototype = {
|
|
62
62
|
|
63
63
|
}
|
64
64
|
},
|
65
|
-
|
66
|
-
var rawState = this.
|
65
|
+
_g_: function (name, value, shouldEnsure, forceDirty) {
|
66
|
+
var rawState = this._v_;
|
67
67
|
|
68
68
|
if (shouldEnsure) {
|
69
69
|
ensure(this, name);
|
70
70
|
}
|
71
71
|
|
72
72
|
if (forceDirty) {
|
73
|
-
var forcedDirtyState = this.
|
73
|
+
var forcedDirtyState = this._Z_ || (this._Z_ = {});
|
74
74
|
forcedDirtyState[name] = true;
|
75
75
|
} else if (rawState[name] === value) {
|
76
76
|
return;
|
77
77
|
}
|
78
78
|
|
79
|
-
if (!this.
|
79
|
+
if (!this.W_) {
|
80
80
|
// This is the first time we are modifying the component state
|
81
81
|
// so introduce some properties to do some tracking of
|
82
82
|
// changes to the state
|
83
|
-
this.
|
84
|
-
this.
|
85
|
-
this.
|
86
|
-
this.
|
87
|
-
this.h_.
|
83
|
+
this.W_ = true; // Mark the component state as dirty (i.e. modified)
|
84
|
+
this._m_ = rawState;
|
85
|
+
this._v_ = rawState = extend({}, rawState);
|
86
|
+
this._l_ = {};
|
87
|
+
this.h_._f_();
|
88
88
|
}
|
89
89
|
|
90
|
-
this.
|
90
|
+
this._l_[name] = value;
|
91
91
|
|
92
92
|
if (value === undefined) {
|
93
93
|
// Don't store state properties with an undefined or null value
|
@@ -98,7 +98,7 @@ State.prototype = {
|
|
98
98
|
}
|
99
99
|
},
|
100
100
|
toJSON: function () {
|
101
|
-
return this.
|
101
|
+
return this._v_;
|
102
102
|
} };
|
103
103
|
|
104
104
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";var eventDelegation = require("./event-delegation");
|
2
|
-
var delegateEvent = eventDelegation.
|
3
|
-
var getEventFromEl = eventDelegation.
|
2
|
+
var delegateEvent = eventDelegation.a__;
|
3
|
+
var getEventFromEl = eventDelegation.aa_;
|
4
4
|
|
5
5
|
// var componentsUtil = require('./util');
|
6
6
|
// var destroyNodeRecursive = componentsUtil.___destroyNodeRecursive;
|
@@ -11,13 +11,13 @@ function handleNodeAttach(node, componentsContext) {
|
|
11
11
|
var eventName = "onattach";
|
12
12
|
var target = getEventFromEl(node, eventName);
|
13
13
|
if (target) {
|
14
|
-
var out = componentsContext.
|
14
|
+
var out = componentsContext.z_;
|
15
15
|
var data = out.data;
|
16
16
|
|
17
|
-
var attachTargets = data.
|
17
|
+
var attachTargets = data.ab_;
|
18
18
|
if (!attachTargets) {
|
19
|
-
attachTargets = data.
|
20
|
-
out.on("
|
19
|
+
attachTargets = data.ab_ = [];
|
20
|
+
out.on("_T_", function () {
|
21
21
|
for (var i = 0; i < attachTargets.length; i += 2) {
|
22
22
|
var node = attachTargets[i];
|
23
23
|
var target = attachTargets[i + 1];
|
@@ -56,5 +56,5 @@ function handleNodeDetach(node) {
|
|
56
56
|
}
|
57
57
|
}
|
58
58
|
|
59
|
-
eventDelegation.
|
60
|
-
eventDelegation.
|
59
|
+
eventDelegation.ac_ = handleNodeAttach;
|
60
|
+
eventDelegation._a_ = handleNodeDetach;
|
@@ -12,12 +12,12 @@ ownerComponentDef)
|
|
12
12
|
componentId,
|
13
13
|
componentsContext);
|
14
14
|
|
15
|
-
componentsContext.e_.
|
15
|
+
componentsContext.e_._V_[
|
16
16
|
componentId] =
|
17
17
|
true;
|
18
18
|
componentsContext.b_.push(componentDef);
|
19
19
|
|
20
|
-
var out = componentsContext.
|
20
|
+
var out = componentsContext.z_;
|
21
21
|
out.bc(component, key, ownerComponentDef && ownerComponentDef.h_);
|
22
22
|
return componentDef;
|
23
23
|
};
|
@@ -22,13 +22,13 @@ isImplicitComponent)
|
|
22
22
|
|
23
23
|
|
24
24
|
var ownerIsRenderBoundary =
|
25
|
-
ownerComponentDef && ownerComponentDef.
|
25
|
+
ownerComponentDef && ownerComponentDef._I_;
|
26
26
|
var ownerWillRerender =
|
27
27
|
ownerComponentDef &&
|
28
|
-
ownerComponentDef.
|
28
|
+
ownerComponentDef._J_ & FLAG_WILL_RERENDER_IN_BROWSER;
|
29
29
|
// On the server
|
30
30
|
if (!componentsContext.p_ && ownerWillRerender) {
|
31
|
-
componentDef.
|
31
|
+
componentDef._J_ |= FLAG_WILL_RERENDER_IN_BROWSER;
|
32
32
|
componentDef._wrr = true;
|
33
33
|
return componentDef;
|
34
34
|
}
|
@@ -42,14 +42,14 @@ isImplicitComponent)
|
|
42
42
|
|
43
43
|
componentsContext.b_.push(componentDef);
|
44
44
|
|
45
|
-
let out = componentsContext.
|
45
|
+
let out = componentsContext.z_;
|
46
46
|
let runtimeId = out.global.runtimeId;
|
47
47
|
|
48
|
-
componentDef.
|
49
|
-
componentDef.
|
48
|
+
componentDef._I_ = true;
|
49
|
+
componentDef.ad_ = componentsContext.p_;
|
50
50
|
|
51
51
|
if (isSplitComponent === false && out.global.noBrowserRerender !== true) {
|
52
|
-
componentDef.
|
52
|
+
componentDef._J_ |= FLAG_WILL_RERENDER_IN_BROWSER;
|
53
53
|
componentDef._wrr = true;
|
54
54
|
componentsContext.p_ = false;
|
55
55
|
}
|
@@ -6,7 +6,7 @@ var BaseComponent = require("./Component");
|
|
6
6
|
var inherit = require("raptor-util/inherit");
|
7
7
|
|
8
8
|
module.exports = function defineComponent(def, renderer) {
|
9
|
-
if (def.
|
9
|
+
if (def.Z_) {
|
10
10
|
return def;
|
11
11
|
}
|
12
12
|
|
@@ -35,7 +35,7 @@ module.exports = function defineComponent(def, renderer) {
|
|
35
35
|
BaseComponent.call(this, id);
|
36
36
|
}
|
37
37
|
|
38
|
-
if (!proto.
|
38
|
+
if (!proto.Z_) {
|
39
39
|
// Inherit from Component if they didn't already
|
40
40
|
inherit(ComponentClass, BaseComponent);
|
41
41
|
}
|
@@ -48,14 +48,14 @@ module.exports = function defineComponent(def, renderer) {
|
|
48
48
|
|
49
49
|
// Set a flag on the constructor function to make it clear this is
|
50
50
|
// a component so that we can short-circuit this work later
|
51
|
-
Component.
|
51
|
+
Component.Z_ = true;
|
52
52
|
|
53
53
|
function State(component) {
|
54
54
|
BaseState.call(this, component);
|
55
55
|
}
|
56
56
|
inherit(State, BaseState);
|
57
|
-
proto.
|
58
|
-
proto.
|
57
|
+
proto._d_ = State;
|
58
|
+
proto._o_ = renderer;
|
59
59
|
|
60
60
|
return Component;
|
61
61
|
};
|
@@ -4,8 +4,8 @@ var ComponentsContext = require("../ComponentsContext");
|
|
4
4
|
var getComponentsContext = ComponentsContext.o_;
|
5
5
|
|
6
6
|
module.exports = function endComponent(out, componentDef) {
|
7
|
-
if (componentDef.
|
7
|
+
if (componentDef._I_) {
|
8
8
|
out.w("<!--" + out.global.runtimeId + "/-->");
|
9
|
-
getComponentsContext(out).p_ = componentDef.
|
9
|
+
getComponentsContext(out).p_ = componentDef.ad_;
|
10
10
|
}
|
11
11
|
};
|
@@ -1,9 +1,9 @@
|
|
1
1
|
"use strict";var initComponents = require("../init-components");
|
2
|
-
require("../ComponentsContext").
|
3
|
-
initComponents.
|
2
|
+
require("../ComponentsContext")._S_ =
|
3
|
+
initComponents._S_;
|
4
4
|
|
5
|
-
exports.getComponentForEl = require("../util").
|
6
|
-
exports.init = window.$initComponents = initComponents.
|
5
|
+
exports.getComponentForEl = require("../util").ai_;
|
6
|
+
exports.init = window.$initComponents = initComponents.aj_;
|
7
7
|
|
8
8
|
var registry = require("../registry");
|
9
9
|
exports.register = function (id, component) {
|
@@ -64,12 +64,12 @@ function addComponentsFromContext(componentsContext, componentsToHydrate) {
|
|
64
64
|
var componentDef = components[i];
|
65
65
|
var id = componentDef.id;
|
66
66
|
var component = componentDef.h_;
|
67
|
-
var flags = componentDef.
|
67
|
+
var flags = componentDef._J_;
|
68
68
|
var input = component.input || 0;
|
69
69
|
var typeName = component.typeName;
|
70
|
-
var customEvents = component.
|
71
|
-
var scope = component.
|
72
|
-
var bubblingDomEvents = component.
|
70
|
+
var customEvents = component.P_;
|
71
|
+
var scope = component.H_;
|
72
|
+
var bubblingDomEvents = component.O_;
|
73
73
|
|
74
74
|
var state;
|
75
75
|
var serializedProps;
|
@@ -100,16 +100,16 @@ function addComponentsFromContext(componentsContext, componentsToHydrate) {
|
|
100
100
|
}
|
101
101
|
}
|
102
102
|
|
103
|
-
component.
|
104
|
-
component.
|
103
|
+
component.K_ = undefined; // We don't use `delete` to avoid V8 deoptimization
|
104
|
+
component.R_ = undefined; // We don't use `delete` to avoid V8 deoptimization
|
105
105
|
component.typeName = undefined;
|
106
106
|
component.id = undefined;
|
107
|
+
component.P_ = undefined;
|
108
|
+
component.H_ = undefined;
|
107
109
|
component.O_ = undefined;
|
108
|
-
component.G_ = undefined;
|
109
|
-
component.N_ = undefined;
|
110
|
-
component._W_ = undefined;
|
111
110
|
component._X_ = undefined;
|
112
|
-
component.
|
111
|
+
component._Y_ = undefined;
|
112
|
+
component.V_ = undefined;
|
113
113
|
|
114
114
|
if (isNotEmpty(component)) {
|
115
115
|
serializedProps = component;
|
@@ -118,7 +118,7 @@ function addComponentsFromContext(componentsContext, componentsToHydrate) {
|
|
118
118
|
|
119
119
|
var extra = {
|
120
120
|
b: bubblingDomEvents,
|
121
|
-
d: componentDef.
|
121
|
+
d: componentDef._G_,
|
122
122
|
e: customEvents,
|
123
123
|
f: flags || undefined,
|
124
124
|
p: customEvents && scope, // Only serialize scope if we need to attach custom events
|
@@ -146,7 +146,7 @@ function addComponentsFromContext(componentsContext, componentsToHydrate) {
|
|
146
146
|
components.length = 0;
|
147
147
|
|
148
148
|
// Also add any components from nested contexts
|
149
|
-
var nestedContexts = componentsContext.
|
149
|
+
var nestedContexts = componentsContext._R_;
|
150
150
|
if (nestedContexts !== undefined) {
|
151
151
|
nestedContexts.forEach(function (nestedContext) {
|
152
152
|
addComponentsFromContext(nestedContext, componentsToHydrate);
|
@@ -158,7 +158,7 @@ function getInitComponentsData(out, componentDefs) {
|
|
158
158
|
const len = componentDefs.length;
|
159
159
|
const $global = out.global;
|
160
160
|
const isLast = $global.d_;
|
161
|
-
const didSerializeComponents = $global.
|
161
|
+
const didSerializeComponents = $global.ak_;
|
162
162
|
const prefix = $global.componentIdPrefix || $global.widgetIdPrefix;
|
163
163
|
|
164
164
|
if (len === 0) {
|
@@ -171,7 +171,7 @@ function getInitComponentsData(out, componentDefs) {
|
|
171
171
|
|
172
172
|
const TYPE_INDEX = 1;
|
173
173
|
const typesLookup =
|
174
|
-
$global.
|
174
|
+
$global.al_ || ($global.al_ = new Map());
|
175
175
|
let newTypes;
|
176
176
|
|
177
177
|
for (let i = 0; i < len; i++) {
|
@@ -196,7 +196,7 @@ function getInitComponentsData(out, componentDefs) {
|
|
196
196
|
let serializedGlobals;
|
197
197
|
|
198
198
|
if (!didSerializeComponents) {
|
199
|
-
$global.
|
199
|
+
$global.ak_ = true;
|
200
200
|
serializedGlobals = getSerializedGlobals($global);
|
201
201
|
}
|
202
202
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
"use strict";var componentsUtil = require("./util");
|
2
|
-
var runtimeId = componentsUtil.
|
3
|
-
var componentLookup = componentsUtil.
|
4
|
-
var getMarkoPropsFromEl = componentsUtil.
|
2
|
+
var runtimeId = componentsUtil.am_;
|
3
|
+
var componentLookup = componentsUtil.D_;
|
4
|
+
var getMarkoPropsFromEl = componentsUtil.an_;
|
5
5
|
|
6
6
|
var TEXT_NODE = 3;
|
7
7
|
|
@@ -54,7 +54,7 @@ function delegateEvent(node, eventName, target, event) {
|
|
54
54
|
|
55
55
|
if (extraArgs != null) {
|
56
56
|
if (typeof extraArgs === "number") {
|
57
|
-
extraArgs = targetComponent.
|
57
|
+
extraArgs = targetComponent.O_[extraArgs];
|
58
58
|
}
|
59
59
|
}
|
60
60
|
|
@@ -132,12 +132,12 @@ function addDelegatedEventHandlerToHost(eventType, host) {
|
|
132
132
|
|
133
133
|
function noop() {}
|
134
134
|
|
135
|
-
exports.
|
136
|
-
exports.
|
137
|
-
exports.
|
138
|
-
exports.
|
139
|
-
exports.
|
140
|
-
exports.
|
135
|
+
exports.ac_ = noop;
|
136
|
+
exports._a_ = noop;
|
137
|
+
exports.a__ = delegateEvent;
|
138
|
+
exports.aa_ = getEventFromEl;
|
139
|
+
exports._E_ = addDelegatedEventHandler;
|
140
|
+
exports.ao_ = function (host) {
|
141
141
|
Object.keys(delegatedEvents).forEach(function (eventType) {
|
142
142
|
addDelegatedEventHandlerToHost(eventType, host);
|
143
143
|
});
|