marko 5.37.51 → 5.37.52
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/node_modules/@internal/components-beginComponent/index.js +6 -3
- 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 +2 -2
- package/dist/node_modules/@internal/components-entry/index-browser.js +2 -2
- package/dist/node_modules/@internal/components-entry/index.js +16 -16
- package/dist/node_modules/@internal/components-entry-legacy/index-browser.js +6 -6
- package/dist/node_modules/@internal/components-registry/index-browser.js +42 -42
- 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 +7 -7
- 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 +6 -6
- package/dist/node_modules/@internal/preserve-tag/index.js +2 -2
- 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 +3 -3
- package/dist/runtime/components/Component.js +144 -144
- package/dist/runtime/components/ComponentDef.js +24 -24
- package/dist/runtime/components/ComponentsContext.js +7 -7
- package/dist/runtime/components/GlobalComponentsContext.js +3 -3
- package/dist/runtime/components/KeySequence.js +3 -3
- package/dist/runtime/components/ServerComponent.js +22 -22
- package/dist/runtime/components/State.js +25 -25
- package/dist/runtime/components/attach-detach.js +7 -7
- 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 +14 -14
- package/dist/runtime/components/legacy/dependencies/index.js +7 -7
- package/dist/runtime/components/legacy/renderer-legacy.js +36 -36
- package/dist/runtime/components/renderer.js +31 -31
- 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 +11 -11
- package/dist/runtime/helpers/render-tag.js +1 -1
- package/dist/runtime/helpers/serialize-noop.js +2 -2
- package/dist/runtime/helpers/skip-serialize.js +2 -0
- 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 +19 -19
- package/dist/runtime/html/AsyncStream.js +22 -22
- 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 +2 -2
- package/dist/runtime/html/helpers/data-marko.js +1 -1
- package/dist/runtime/html/helpers/escape-xml.js +1 -1
- package/dist/runtime/html/index.js +2 -2
- package/dist/runtime/renderable.js +3 -3
- package/dist/runtime/vdom/AsyncVDOMBuilder.js +91 -91
- package/dist/runtime/vdom/VComment.js +7 -7
- package/dist/runtime/vdom/VComponent.js +4 -4
- package/dist/runtime/vdom/VDocumentFragment.js +6 -6
- package/dist/runtime/vdom/VElement.js +36 -36
- package/dist/runtime/vdom/VFragment.js +9 -9
- package/dist/runtime/vdom/VNode.js +33 -33
- package/dist/runtime/vdom/VText.js +8 -8
- 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 +5 -5
- package/dist/runtime/vdom/morphdom/helpers.js +5 -5
- package/dist/runtime/vdom/morphdom/index.js +74 -74
- package/dist/runtime/vdom/vdom.js +15 -15
- package/dist/translator/util/get-component-files.js +1 -1
- package/package.json +1 -1
- package/src/node_modules/@internal/components-beginComponent/index.js +5 -2
- package/src/runtime/helpers/skip-serialize.js +2 -0
- package/src/runtime/helpers/tags-compat/runtime-html.js +15 -15
@@ -1,31 +1,31 @@
|
|
1
1
|
"use strict";
|
2
2
|
var componentsUtil = require("@internal/components-util");
|
3
|
-
var existingComponentLookup = componentsUtil.
|
4
|
-
var destroyNodeRecursive = componentsUtil.
|
3
|
+
var existingComponentLookup = componentsUtil._n_;
|
4
|
+
var destroyNodeRecursive = componentsUtil._T_;
|
5
5
|
var addComponentRootToKeyedElements =
|
6
|
-
componentsUtil.
|
7
|
-
var normalizeComponentKey = componentsUtil.
|
6
|
+
componentsUtil._o_;
|
7
|
+
var normalizeComponentKey = componentsUtil._W_;
|
8
8
|
var domData = require("../../components/dom-data");
|
9
9
|
var eventDelegation = require("../../components/event-delegation");
|
10
10
|
var KeySequence = require("../../components/KeySequence");
|
11
|
-
var VElement = require("../vdom").
|
11
|
+
var VElement = require("../vdom").bz_;
|
12
12
|
var fragment = require("./fragment");
|
13
13
|
var helpers = require("./helpers");
|
14
14
|
var isTextOnly = require("../is-text-only");
|
15
|
-
var virtualizeElement = VElement.
|
16
|
-
var morphAttrs = VElement.
|
17
|
-
var keysByDOMNode = domData.
|
18
|
-
var componentByDOMNode = domData.
|
19
|
-
var vElementByDOMNode = domData.
|
20
|
-
var detachedByDOMNode = domData.
|
21
|
-
|
22
|
-
var insertBefore = helpers.
|
23
|
-
var insertAfter = helpers.
|
24
|
-
var nextSibling = helpers.
|
25
|
-
var firstChild = helpers.
|
26
|
-
var removeChild = helpers.
|
27
|
-
var createFragmentNode = fragment.
|
28
|
-
var beginFragmentNode = fragment.
|
15
|
+
var virtualizeElement = VElement.ck_;
|
16
|
+
var morphAttrs = VElement.cl_;
|
17
|
+
var keysByDOMNode = domData._p_;
|
18
|
+
var componentByDOMNode = domData._r_;
|
19
|
+
var vElementByDOMNode = domData._M_;
|
20
|
+
var detachedByDOMNode = domData.aY_;
|
21
|
+
|
22
|
+
var insertBefore = helpers.bh_;
|
23
|
+
var insertAfter = helpers.bi_;
|
24
|
+
var nextSibling = helpers.cp_;
|
25
|
+
var firstChild = helpers.aC_;
|
26
|
+
var removeChild = helpers.bj_;
|
27
|
+
var createFragmentNode = fragment._m_;
|
28
|
+
var beginFragmentNode = fragment.ct_;
|
29
29
|
|
30
30
|
var ELEMENT_NODE = 1;
|
31
31
|
var TEXT_NODE = 3;
|
@@ -43,7 +43,7 @@ function isAutoKey(key) {
|
|
43
43
|
}
|
44
44
|
|
45
45
|
function compareNodeNames(fromEl, toEl) {
|
46
|
-
return fromEl.
|
46
|
+
return fromEl.cg_ === toEl.cg_;
|
47
47
|
}
|
48
48
|
|
49
49
|
function caseInsensitiveCompare(a, b) {
|
@@ -52,7 +52,7 @@ function caseInsensitiveCompare(a, b) {
|
|
52
52
|
|
53
53
|
function onNodeAdded(node, componentsContext) {
|
54
54
|
if (node.nodeType === ELEMENT_NODE) {
|
55
|
-
eventDelegation.
|
55
|
+
eventDelegation.aX_(node, componentsContext);
|
56
56
|
}
|
57
57
|
}
|
58
58
|
|
@@ -63,7 +63,7 @@ function morphdom(fromNode, toNode, host, componentsContext) {
|
|
63
63
|
|
64
64
|
if (componentsContext) {
|
65
65
|
globalComponentsContext = componentsContext.p_;
|
66
|
-
isHydrate = globalComponentsContext.
|
66
|
+
isHydrate = globalComponentsContext.aa_;
|
67
67
|
}
|
68
68
|
|
69
69
|
function insertVirtualNodeBefore(
|
@@ -74,21 +74,21 @@ function morphdom(fromNode, toNode, host, componentsContext) {
|
|
74
74
|
ownerComponent,
|
75
75
|
parentComponent)
|
76
76
|
{
|
77
|
-
var realNode = vNode.
|
77
|
+
var realNode = vNode.br_(host, parentEl.namespaceURI);
|
78
78
|
insertBefore(realNode, referenceEl, parentEl);
|
79
79
|
|
80
80
|
if (
|
81
|
-
vNode.
|
82
|
-
vNode.
|
81
|
+
vNode.c__ === ELEMENT_NODE ||
|
82
|
+
vNode.c__ === FRAGMENT_NODE)
|
83
83
|
{
|
84
84
|
if (key) {
|
85
85
|
keysByDOMNode.set(realNode, key);
|
86
|
-
(isAutoKey(key) ? parentComponent : ownerComponent).
|
86
|
+
(isAutoKey(key) ? parentComponent : ownerComponent).L_[
|
87
87
|
key] =
|
88
88
|
realNode;
|
89
89
|
}
|
90
90
|
|
91
|
-
if (!isTextOnly(vNode.
|
91
|
+
if (!isTextOnly(vNode.cg_)) {
|
92
92
|
morphChildren(realNode, vNode, parentComponent);
|
93
93
|
}
|
94
94
|
|
@@ -105,7 +105,7 @@ function morphdom(fromNode, toNode, host, componentsContext) {
|
|
105
105
|
ownerComponent,
|
106
106
|
parentComponent)
|
107
107
|
{
|
108
|
-
var rootNode = component.
|
108
|
+
var rootNode = component._G_ = insertBefore(
|
109
109
|
createFragmentNode(),
|
110
110
|
referenceNode,
|
111
111
|
referenceNodeParentEl
|
@@ -115,7 +115,7 @@ function morphdom(fromNode, toNode, host, componentsContext) {
|
|
115
115
|
if (key && ownerComponent) {
|
116
116
|
key = normalizeComponentKey(key, parentComponent.id);
|
117
117
|
addComponentRootToKeyedElements(
|
118
|
-
ownerComponent.
|
118
|
+
ownerComponent.L_,
|
119
119
|
key,
|
120
120
|
rootNode,
|
121
121
|
component.id
|
@@ -127,7 +127,7 @@ function morphdom(fromNode, toNode, host, componentsContext) {
|
|
127
127
|
}
|
128
128
|
|
129
129
|
function morphComponent(component, vComponent) {
|
130
|
-
morphChildren(component.
|
130
|
+
morphChildren(component._G_, vComponent, component);
|
131
131
|
}
|
132
132
|
|
133
133
|
var detachedNodes = [];
|
@@ -148,7 +148,7 @@ function morphdom(fromNode, toNode, host, componentsContext) {
|
|
148
148
|
|
149
149
|
function morphChildren(fromNode, toNode, parentComponent) {
|
150
150
|
var curFromNodeChild = firstChild(fromNode);
|
151
|
-
var curToNodeChild = toNode.
|
151
|
+
var curToNodeChild = toNode.aC_;
|
152
152
|
|
153
153
|
var curToNodeKey;
|
154
154
|
var curFromNodeKey;
|
@@ -162,16 +162,16 @@ function morphdom(fromNode, toNode, host, componentsContext) {
|
|
162
162
|
var fromComponent;
|
163
163
|
|
164
164
|
outer: while (curToNodeChild) {
|
165
|
-
toNextSibling = curToNodeChild.
|
166
|
-
curToNodeType = curToNodeChild.
|
167
|
-
curToNodeKey = curToNodeChild.
|
165
|
+
toNextSibling = curToNodeChild.cp_;
|
166
|
+
curToNodeType = curToNodeChild.c__;
|
167
|
+
curToNodeKey = curToNodeChild.ca_;
|
168
168
|
|
169
169
|
// Skip <!doctype>
|
170
170
|
if (curFromNodeChild && curFromNodeChild.nodeType === DOCTYPE_NODE) {
|
171
171
|
curFromNodeChild = nextSibling(curFromNodeChild);
|
172
172
|
}
|
173
173
|
|
174
|
-
var ownerComponent = curToNodeChild.
|
174
|
+
var ownerComponent = curToNodeChild._O_ || parentComponent;
|
175
175
|
var referenceComponent;
|
176
176
|
|
177
177
|
if (curToNodeType === COMPONENT_NODE) {
|
@@ -182,7 +182,7 @@ function morphdom(fromNode, toNode, host, componentsContext) {
|
|
182
182
|
{
|
183
183
|
if (isHydrate) {
|
184
184
|
var rootNode = beginFragmentNode(curFromNodeChild, fromNode);
|
185
|
-
component.
|
185
|
+
component._G_ = rootNode;
|
186
186
|
componentByDOMNode.set(rootNode, component);
|
187
187
|
|
188
188
|
if (ownerComponent && curToNodeKey) {
|
@@ -191,7 +191,7 @@ function morphdom(fromNode, toNode, host, componentsContext) {
|
|
191
191
|
parentComponent.id
|
192
192
|
);
|
193
193
|
addComponentRootToKeyedElements(
|
194
|
-
ownerComponent.
|
194
|
+
ownerComponent.L_,
|
195
195
|
curToNodeKey,
|
196
196
|
rootNode,
|
197
197
|
component.id
|
@@ -215,7 +215,7 @@ function morphdom(fromNode, toNode, host, componentsContext) {
|
|
215
215
|
);
|
216
216
|
}
|
217
217
|
} else {
|
218
|
-
if (matchingFromComponent.
|
218
|
+
if (matchingFromComponent._G_ !== curFromNodeChild) {
|
219
219
|
if (
|
220
220
|
curFromNodeChild && (
|
221
221
|
fromComponent = componentByDOMNode.get(curFromNodeChild)) &&
|
@@ -225,7 +225,7 @@ function morphdom(fromNode, toNode, host, componentsContext) {
|
|
225
225
|
{
|
226
226
|
// The component associated with the current real DOM node was not rendered
|
227
227
|
// so we should just remove it out of the real DOM by destroying it
|
228
|
-
curFromNodeChild = nextSibling(fromComponent.
|
228
|
+
curFromNodeChild = nextSibling(fromComponent._G_);
|
229
229
|
destroyComponent(fromComponent);
|
230
230
|
continue;
|
231
231
|
}
|
@@ -233,7 +233,7 @@ function morphdom(fromNode, toNode, host, componentsContext) {
|
|
233
233
|
// We need to move the existing component into
|
234
234
|
// the correct location
|
235
235
|
insertBefore(
|
236
|
-
matchingFromComponent.
|
236
|
+
matchingFromComponent._G_,
|
237
237
|
curFromNodeChild,
|
238
238
|
fromNode
|
239
239
|
);
|
@@ -242,7 +242,7 @@ function morphdom(fromNode, toNode, host, componentsContext) {
|
|
242
242
|
curFromNodeChild && nextSibling(curFromNodeChild);
|
243
243
|
}
|
244
244
|
|
245
|
-
if (!curToNodeChild.
|
245
|
+
if (!curToNodeChild.af_) {
|
246
246
|
morphComponent(component, curToNodeChild);
|
247
247
|
}
|
248
248
|
}
|
@@ -267,7 +267,7 @@ function morphdom(fromNode, toNode, host, componentsContext) {
|
|
267
267
|
// up elements
|
268
268
|
curToNodeKey = (
|
269
269
|
keySequences[referenceComponent.id] || (
|
270
|
-
keySequences[referenceComponent.id] = new KeySequence())).
|
270
|
+
keySequences[referenceComponent.id] = new KeySequence())).aP_(
|
271
271
|
curToNodeKey);
|
272
272
|
|
273
273
|
if (curFromNodeChild) {
|
@@ -278,12 +278,12 @@ function morphdom(fromNode, toNode, host, componentsContext) {
|
|
278
278
|
|
279
279
|
if (curFromNodeKey === curToNodeKey) {
|
280
280
|
// Elements line up. Now we just have to make sure they are compatible
|
281
|
-
if (!curToNodeChild.
|
281
|
+
if (!curToNodeChild.af_) {
|
282
282
|
// We just skip over the fromNode if it is preserved
|
283
283
|
|
284
284
|
if (
|
285
285
|
curVFromNodeChild &&
|
286
|
-
curToNodeType === curVFromNodeChild.
|
286
|
+
curToNodeType === curVFromNodeChild.c__ && (
|
287
287
|
curToNodeType !== ELEMENT_NODE ||
|
288
288
|
compareNodeNames(curToNodeChild, curVFromNodeChild)))
|
289
289
|
{
|
@@ -317,7 +317,7 @@ function morphdom(fromNode, toNode, host, componentsContext) {
|
|
317
317
|
}
|
318
318
|
}
|
319
319
|
} else {
|
320
|
-
matchingFromEl = referenceComponent.
|
320
|
+
matchingFromEl = referenceComponent.L_[curToNodeKey];
|
321
321
|
if (
|
322
322
|
matchingFromEl === undefined ||
|
323
323
|
matchingFromEl === curFromNodeChild)
|
@@ -325,19 +325,19 @@ function morphdom(fromNode, toNode, host, componentsContext) {
|
|
325
325
|
if (isHydrate && curFromNodeChild) {
|
326
326
|
if (
|
327
327
|
curFromNodeChild.nodeType === ELEMENT_NODE && (
|
328
|
-
curToNodeChild.
|
328
|
+
curToNodeChild.af_ ||
|
329
329
|
caseInsensitiveCompare(
|
330
330
|
curFromNodeChild.nodeName,
|
331
|
-
curToNodeChild.
|
331
|
+
curToNodeChild.cg_ || ""
|
332
332
|
)))
|
333
333
|
{
|
334
334
|
curVFromNodeChild = virtualizeElement(curFromNodeChild);
|
335
|
-
curVFromNodeChild.
|
335
|
+
curVFromNodeChild.cg_ = curToNodeChild.cg_;
|
336
336
|
keysByDOMNode.set(curFromNodeChild, curToNodeKey);
|
337
|
-
referenceComponent.
|
337
|
+
referenceComponent.L_[curToNodeKey] =
|
338
338
|
curFromNodeChild;
|
339
339
|
|
340
|
-
if (curToNodeChild.
|
340
|
+
if (curToNodeChild.af_) {
|
341
341
|
vElementByDOMNode.set(curFromNodeChild, curVFromNodeChild);
|
342
342
|
} else {
|
343
343
|
morphEl(
|
@@ -352,7 +352,7 @@ function morphdom(fromNode, toNode, host, componentsContext) {
|
|
352
352
|
curFromNodeChild = fromNextSibling;
|
353
353
|
continue;
|
354
354
|
} else if (
|
355
|
-
curToNodeChild.
|
355
|
+
curToNodeChild.c__ === FRAGMENT_NODE &&
|
356
356
|
curFromNodeChild.nodeType === COMMENT_NODE)
|
357
357
|
{
|
358
358
|
var content = curFromNodeChild.nodeValue;
|
@@ -384,11 +384,11 @@ function morphdom(fromNode, toNode, host, componentsContext) {
|
|
384
384
|
);
|
385
385
|
keysByDOMNode.set(fragment, curToNodeKey);
|
386
386
|
vElementByDOMNode.set(fragment, curToNodeChild);
|
387
|
-
referenceComponent.
|
387
|
+
referenceComponent.L_[curToNodeKey] = fragment;
|
388
388
|
removeChild(curFromNodeChild);
|
389
389
|
removeChild(endNode);
|
390
390
|
|
391
|
-
if (!curToNodeChild.
|
391
|
+
if (!curToNodeChild.af_) {
|
392
392
|
morphChildren(fragment, curToNodeChild, parentComponent);
|
393
393
|
}
|
394
394
|
|
@@ -413,12 +413,12 @@ function morphdom(fromNode, toNode, host, componentsContext) {
|
|
413
413
|
detachedByDOMNode.set(matchingFromEl, undefined);
|
414
414
|
}
|
415
415
|
|
416
|
-
if (!curToNodeChild.
|
416
|
+
if (!curToNodeChild.af_) {
|
417
417
|
curVFromNodeChild = vElementByDOMNode.get(matchingFromEl);
|
418
418
|
|
419
419
|
if (
|
420
420
|
curVFromNodeChild &&
|
421
|
-
curToNodeType === curVFromNodeChild.
|
421
|
+
curToNodeType === curVFromNodeChild.c__ && (
|
422
422
|
curToNodeType !== ELEMENT_NODE ||
|
423
423
|
compareNodeNames(curVFromNodeChild, curToNodeChild)))
|
424
424
|
{
|
@@ -436,7 +436,7 @@ function morphdom(fromNode, toNode, host, componentsContext) {
|
|
436
436
|
|
437
437
|
if (
|
438
438
|
toNextSibling &&
|
439
|
-
toNextSibling.
|
439
|
+
toNextSibling.ca_ === curFromNodeKey)
|
440
440
|
{
|
441
441
|
// Single element swap
|
442
442
|
|
@@ -549,18 +549,18 @@ function morphdom(fromNode, toNode, host, componentsContext) {
|
|
549
549
|
|
550
550
|
if (
|
551
551
|
caseInsensitiveCompare(
|
552
|
-
curVFromNodeChild.
|
553
|
-
curToNodeChild.
|
552
|
+
curVFromNodeChild.cg_,
|
553
|
+
curToNodeChild.cg_
|
554
554
|
))
|
555
555
|
{
|
556
|
-
curVFromNodeChild.
|
556
|
+
curVFromNodeChild.cg_ = curToNodeChild.cg_;
|
557
557
|
}
|
558
558
|
} else {
|
559
559
|
// Skip over nodes that don't look like ours...
|
560
560
|
curFromNodeChild = fromNextSibling;
|
561
561
|
continue;
|
562
562
|
}
|
563
|
-
} else if (curFromNodeKey = curVFromNodeChild.
|
563
|
+
} else if (curFromNodeKey = curVFromNodeChild.ca_) {
|
564
564
|
// We have a keyed element here but our target VDOM node
|
565
565
|
// is not keyed so this not doesn't belong
|
566
566
|
isCompatible = false;
|
@@ -587,18 +587,18 @@ function morphdom(fromNode, toNode, host, componentsContext) {
|
|
587
587
|
{
|
588
588
|
// Both nodes being compared are Text or Comment nodes
|
589
589
|
isCompatible = true;
|
590
|
-
var curToNodeValue = curToNodeChild.
|
590
|
+
var curToNodeValue = curToNodeChild.bZ_;
|
591
591
|
var curFromNodeValue = curFromNodeChild.nodeValue;
|
592
592
|
if (curFromNodeValue !== curToNodeValue) {
|
593
593
|
if (
|
594
594
|
isHydrate &&
|
595
595
|
toNextSibling &&
|
596
596
|
curFromNodeType === TEXT_NODE &&
|
597
|
-
toNextSibling.
|
597
|
+
toNextSibling.c__ === TEXT_NODE &&
|
598
598
|
curFromNodeValue.startsWith(curToNodeValue) &&
|
599
599
|
curFromNodeValue.
|
600
600
|
slice(curToNodeValue.length).
|
601
|
-
startsWith(toNextSibling.
|
601
|
+
startsWith(toNextSibling.bZ_))
|
602
602
|
{
|
603
603
|
// In hydrate mode we can use splitText to more efficiently handle
|
604
604
|
// adjacent text vdom nodes that were merged.
|
@@ -643,10 +643,10 @@ function morphdom(fromNode, toNode, host, componentsContext) {
|
|
643
643
|
}
|
644
644
|
|
645
645
|
// We have processed all of the "to nodes".
|
646
|
-
if (fromNode.
|
646
|
+
if (fromNode.cs_) {
|
647
647
|
// If we are in an unfinished fragment, we have reached the end of the nodes
|
648
648
|
// we were matching up and need to end the fragment
|
649
|
-
fromNode.
|
649
|
+
fromNode.cs_(curFromNodeChild);
|
650
650
|
} else {
|
651
651
|
// If curFromNodeChild is non-null then we still have some from nodes
|
652
652
|
// left over that need to be removed
|
@@ -675,7 +675,7 @@ function morphdom(fromNode, toNode, host, componentsContext) {
|
|
675
675
|
referenceComponent = parentComponent;
|
676
676
|
} else {
|
677
677
|
referenceComponent =
|
678
|
-
curVFromNodeChild && curVFromNodeChild.
|
678
|
+
curVFromNodeChild && curVFromNodeChild._O_;
|
679
679
|
}
|
680
680
|
|
681
681
|
detachNode(curFromNodeChild, fromNode, referenceComponent);
|
@@ -686,26 +686,26 @@ function morphdom(fromNode, toNode, host, componentsContext) {
|
|
686
686
|
}
|
687
687
|
|
688
688
|
function morphEl(fromEl, vFromEl, toEl, parentComponent) {
|
689
|
-
var nodeName = toEl.
|
690
|
-
var constId = toEl.
|
689
|
+
var nodeName = toEl.cg_;
|
690
|
+
var constId = toEl.ci_;
|
691
691
|
vElementByDOMNode.set(fromEl, toEl);
|
692
692
|
|
693
|
-
if (constId !== undefined && vFromEl.
|
693
|
+
if (constId !== undefined && vFromEl.ci_ === constId) {
|
694
694
|
return;
|
695
695
|
}
|
696
696
|
|
697
697
|
morphAttrs(fromEl, vFromEl, toEl);
|
698
698
|
|
699
|
-
if (toEl.
|
699
|
+
if (toEl.ae_) {
|
700
700
|
return;
|
701
701
|
}
|
702
702
|
|
703
703
|
if (isTextOnly(nodeName)) {
|
704
|
-
if (toEl.
|
704
|
+
if (toEl.ch_ !== vFromEl.ch_) {
|
705
705
|
if (nodeName === "textarea") {
|
706
|
-
fromEl.value = toEl.
|
706
|
+
fromEl.value = toEl.ch_;
|
707
707
|
} else {
|
708
|
-
fromEl.textContent = toEl.
|
708
|
+
fromEl.textContent = toEl.ch_;
|
709
709
|
}
|
710
710
|
}
|
711
711
|
} else {
|
@@ -730,7 +730,7 @@ function morphdom(fromNode, toNode, host, componentsContext) {
|
|
730
730
|
detachedFromComponent !== true && detachedFromComponent
|
731
731
|
);
|
732
732
|
|
733
|
-
if (eventDelegation.
|
733
|
+
if (eventDelegation.ap_(node) != false) {
|
734
734
|
removeChild(node);
|
735
735
|
}
|
736
736
|
}
|
@@ -12,7 +12,7 @@ var specialHtmlRegexp = /[&<]/;
|
|
12
12
|
function virtualizeChildNodes(node, vdomParent, ownerComponent) {
|
13
13
|
var curChild = node.firstChild;
|
14
14
|
while (curChild) {
|
15
|
-
vdomParent.
|
15
|
+
vdomParent.bR_(virtualize(curChild, ownerComponent));
|
16
16
|
curChild = curChild.nextSibling;
|
17
17
|
}
|
18
18
|
}
|
@@ -20,7 +20,7 @@ function virtualizeChildNodes(node, vdomParent, ownerComponent) {
|
|
20
20
|
function virtualize(node, ownerComponent) {
|
21
21
|
switch (node.nodeType) {
|
22
22
|
case 1:
|
23
|
-
return VElement.
|
23
|
+
return VElement.ck_(node, virtualizeChildNodes, ownerComponent);
|
24
24
|
case 3:
|
25
25
|
return new VText(node.nodeValue, ownerComponent);
|
26
26
|
case 8:
|
@@ -43,7 +43,7 @@ function virtualizeHTML(html, ownerComponent) {
|
|
43
43
|
|
44
44
|
while (curChild) {
|
45
45
|
virtualized = virtualize(curChild, ownerComponent);
|
46
|
-
if (virtualized) vdomFragment.
|
46
|
+
if (virtualized) vdomFragment.bR_(virtualized);
|
47
47
|
curChild = curChild.nextSibling;
|
48
48
|
}
|
49
49
|
|
@@ -70,19 +70,19 @@ Node_prototype.t = function (value) {
|
|
70
70
|
}
|
71
71
|
}
|
72
72
|
|
73
|
-
this.
|
74
|
-
return this.
|
73
|
+
this.bR_(vdomNode || new VText(value.toString()));
|
74
|
+
return this.cj_();
|
75
75
|
};
|
76
76
|
|
77
|
-
Node_prototype.
|
78
|
-
return this.
|
77
|
+
Node_prototype.bW_ = function () {
|
78
|
+
return this.bR_(new VDocumentFragment());
|
79
79
|
};
|
80
80
|
|
81
|
-
exports.
|
82
|
-
exports.
|
83
|
-
exports.
|
84
|
-
exports.
|
85
|
-
exports.
|
86
|
-
exports.
|
87
|
-
exports.
|
88
|
-
exports.
|
81
|
+
exports.bA_ = VComment;
|
82
|
+
exports.bB_ = VDocumentFragment;
|
83
|
+
exports.bz_ = VElement;
|
84
|
+
exports.bC_ = VText;
|
85
|
+
exports.bD_ = VComponent;
|
86
|
+
exports.bE_ = VFragment;
|
87
|
+
exports.ck_ = virtualize;
|
88
|
+
exports.bF_ = virtualizeHTML;
|
package/package.json
CHANGED
@@ -33,13 +33,16 @@ module.exports = function beginComponent(
|
|
33
33
|
ownerComponentDef &&
|
34
34
|
ownerComponentDef.___flags & FLAG_WILL_RERENDER_IN_BROWSER;
|
35
35
|
// On the server
|
36
|
-
if (!componentsContext.___isPreserved
|
36
|
+
if (ownerWillRerender && !componentsContext.___isPreserved) {
|
37
37
|
componentDef.___flags |= FLAG_WILL_RERENDER_IN_BROWSER;
|
38
38
|
componentDef._wrr = true;
|
39
39
|
return componentDef;
|
40
40
|
}
|
41
41
|
|
42
|
-
if (
|
42
|
+
if (componentsContext.___forceBoundary) {
|
43
|
+
componentsContext.___forceBoundary = false;
|
44
|
+
isSplitComponent = false;
|
45
|
+
} else if (isImplicitComponent === true) {
|
43
46
|
// We don't mount implicit components rendered on the server
|
44
47
|
// unless the implicit component is nested within a UI component
|
45
48
|
// that will re-render in the browser
|
@@ -155,17 +155,18 @@ exports.p = function (htmlCompat) {
|
|
155
155
|
// tags to class
|
156
156
|
const $global = htmlCompat.$global();
|
157
157
|
const state = htmlCompat.ensureState($global);
|
158
|
+
const out = defaultCreateOut($global);
|
159
|
+
const branchId = htmlCompat.nextScopeId();
|
160
|
+
|
158
161
|
let writers = writersByGlobal.get($global);
|
159
162
|
if (!writers) {
|
160
163
|
writersByGlobal.set($global, (writers = { classAPI: [], tagsAPI: [] }));
|
161
164
|
}
|
162
165
|
|
163
|
-
const out = defaultCreateOut($global);
|
164
|
-
const branchId = htmlCompat.nextScopeId();
|
165
|
-
let customEvents;
|
166
|
-
|
167
166
|
if (renderer5) {
|
167
|
+
const componentsContext = ___getComponentsContext(out);
|
168
168
|
const originalInput = input;
|
169
|
+
let customEvents;
|
169
170
|
input = {};
|
170
171
|
|
171
172
|
for (const key in originalInput) {
|
@@ -182,23 +183,22 @@ exports.p = function (htmlCompat) {
|
|
182
183
|
input[key === "content" ? "renderBody" : key] = value;
|
183
184
|
}
|
184
185
|
}
|
185
|
-
}
|
186
186
|
|
187
|
-
|
187
|
+
componentsContext.___forceBoundary = true;
|
188
188
|
renderer5(input, out);
|
189
|
+
|
190
|
+
const componentDef = componentsContext.___components[0];
|
191
|
+
if (componentDef) {
|
192
|
+
htmlCompat.writeSetScopeForComponent(branchId, componentDef.id);
|
193
|
+
componentDef.___component.___customEvents = customEvents;
|
194
|
+
if (componentDef.___component.___input.toJSON) {
|
195
|
+
componentDef.___component.___input.toJSON = undefined;
|
196
|
+
}
|
197
|
+
}
|
189
198
|
} else {
|
190
199
|
renderBody5(out, input, ...args);
|
191
200
|
}
|
192
201
|
|
193
|
-
const componentsContext = ___getComponentsContext(out);
|
194
|
-
const componentDef = componentsContext.___components[0];
|
195
|
-
if (componentDef) {
|
196
|
-
componentDef.___component.___customEvents = customEvents;
|
197
|
-
componentDef._wrr = true;
|
198
|
-
componentDef.___flags |= 1; // FLAG_WILL_RERENDER_IN_BROWSER
|
199
|
-
htmlCompat.writeSetScopeForComponent(branchId, componentDef.id);
|
200
|
-
}
|
201
|
-
|
202
202
|
let async;
|
203
203
|
out.once("finish", (result) => {
|
204
204
|
if (result.out.___components) {
|