marko 5.33.9 → 5.33.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (85) hide show
  1. package/dist/core-tags/core/await/AsyncValue.js +21 -21
  2. package/dist/core-tags/core/await/renderer.js +11 -11
  3. package/dist/core-tags/core/await/reorderer-renderer.js +3 -3
  4. package/dist/node_modules/@internal/components-beginComponent/index-browser.js +4 -4
  5. package/dist/node_modules/@internal/components-beginComponent/index.js +11 -11
  6. package/dist/node_modules/@internal/components-define-widget-legacy/index-browser.js +45 -45
  7. package/dist/node_modules/@internal/components-define-widget-legacy/index.js +3 -3
  8. package/dist/node_modules/@internal/components-endComponent/index.js +3 -3
  9. package/dist/node_modules/@internal/components-entry/index-browser.js +2 -2
  10. package/dist/node_modules/@internal/components-entry/index.js +16 -16
  11. package/dist/node_modules/@internal/components-entry-legacy/index-browser.js +6 -6
  12. package/dist/node_modules/@internal/components-registry/index-browser.js +46 -46
  13. package/dist/node_modules/@internal/components-registry/index.js +2 -2
  14. package/dist/node_modules/@internal/components-util/index-browser.js +20 -20
  15. package/dist/node_modules/@internal/components-util/index.js +10 -10
  16. package/dist/node_modules/@internal/create-readable/index-browser.js +1 -1
  17. package/dist/node_modules/@internal/create-readable/index.js +9 -9
  18. package/dist/node_modules/@internal/preserve-tag/index-browser.js +7 -7
  19. package/dist/node_modules/@internal/preserve-tag/index.js +5 -5
  20. package/dist/node_modules/@internal/set-immediate/index-browser.js +4 -2
  21. package/dist/node_modules/@internal/set-immediate/index-worker.js +31 -2
  22. package/dist/node_modules/@internal/set-immediate/index.js +3 -2
  23. package/dist/node_modules/@internal/set-immediate/queueMicrotask.js +8 -0
  24. package/dist/runtime/RenderResult.js +8 -8
  25. package/dist/runtime/components/Component.js +145 -145
  26. package/dist/runtime/components/ComponentDef.js +28 -28
  27. package/dist/runtime/components/ComponentsContext.js +15 -15
  28. package/dist/runtime/components/GlobalComponentsContext.js +4 -4
  29. package/dist/runtime/components/KeySequence.js +3 -3
  30. package/dist/runtime/components/ServerComponent.js +13 -13
  31. package/dist/runtime/components/State.js +26 -26
  32. package/dist/runtime/components/attach-detach.js +8 -8
  33. package/dist/runtime/components/defineComponent.js +5 -5
  34. package/dist/runtime/components/dom-data.js +5 -5
  35. package/dist/runtime/components/event-delegation.js +10 -10
  36. package/dist/runtime/components/legacy/defineComponent-legacy.js +1 -1
  37. package/dist/runtime/components/legacy/defineRenderer-legacy.js +16 -16
  38. package/dist/runtime/components/legacy/dependencies/index.js +7 -7
  39. package/dist/runtime/components/legacy/renderer-legacy.js +43 -43
  40. package/dist/runtime/components/renderer.js +36 -36
  41. package/dist/runtime/components/update-manager.js +4 -4
  42. package/dist/runtime/createOut.js +1 -1
  43. package/dist/runtime/dom-insert.js +5 -5
  44. package/dist/runtime/helpers/_change-case.js +2 -2
  45. package/dist/runtime/helpers/dynamic-tag.js +16 -16
  46. package/dist/runtime/helpers/render-tag.js +1 -1
  47. package/dist/runtime/helpers/style-value.js +1 -1
  48. package/dist/runtime/helpers/tags-compat/runtime-dom.js +21 -21
  49. package/dist/runtime/helpers/tags-compat/runtime-html.js +8 -8
  50. package/dist/runtime/html/AsyncStream.js +31 -28
  51. package/dist/runtime/html/BufferedWriter.js +2 -2
  52. package/dist/runtime/html/StringWriter.js +1 -1
  53. package/dist/runtime/html/helpers/_dynamic-attr.js +2 -2
  54. package/dist/runtime/html/helpers/attr.js +4 -4
  55. package/dist/runtime/html/helpers/data-marko.js +6 -6
  56. package/dist/runtime/html/helpers/escape-quotes.js +2 -2
  57. package/dist/runtime/html/helpers/escape-xml.js +1 -1
  58. package/dist/runtime/html/helpers/props-script.js +1 -1
  59. package/dist/runtime/html/index.js +2 -2
  60. package/dist/runtime/renderable.js +5 -5
  61. package/dist/runtime/vdom/AsyncVDOMBuilder.js +96 -96
  62. package/dist/runtime/vdom/VComponent.js +5 -5
  63. package/dist/runtime/vdom/VDocumentFragment.js +7 -7
  64. package/dist/runtime/vdom/VElement.js +42 -42
  65. package/dist/runtime/vdom/VFragment.js +9 -9
  66. package/dist/runtime/vdom/VNode.js +33 -33
  67. package/dist/runtime/vdom/VText.js +8 -8
  68. package/dist/runtime/vdom/helpers/const-element.js +3 -3
  69. package/dist/runtime/vdom/hot-reload.js +21 -21
  70. package/dist/runtime/vdom/index.js +2 -2
  71. package/dist/runtime/vdom/morphdom/fragment.js +5 -5
  72. package/dist/runtime/vdom/morphdom/helpers.js +5 -5
  73. package/dist/runtime/vdom/morphdom/index.js +77 -77
  74. package/dist/runtime/vdom/vdom.js +14 -14
  75. package/package.json +3 -3
  76. package/src/core-tags/core/await/AsyncValue.js +1 -1
  77. package/src/node_modules/@internal/components-registry/index-browser.js +2 -2
  78. package/src/node_modules/@internal/set-immediate/index-browser.js +2 -0
  79. package/src/node_modules/@internal/set-immediate/index-worker.js +31 -2
  80. package/src/node_modules/@internal/set-immediate/index.js +1 -0
  81. package/src/node_modules/@internal/set-immediate/queueMicrotask.js +8 -0
  82. package/src/runtime/html/AsyncStream.js +4 -1
  83. package/src/runtime/vdom/hot-reload.js +2 -2
  84. package/dist/runtime/queueMicrotask.js +0 -14
  85. package/src/runtime/queueMicrotask.js +0 -14
@@ -1,30 +1,30 @@
1
1
  "use strict";
2
2
  var componentsUtil = require("@internal/components-util");
3
- var existingComponentLookup = componentsUtil._i_;
4
- var destroyNodeRecursive = componentsUtil._O_;
3
+ var existingComponentLookup = componentsUtil._k_;
4
+ var destroyNodeRecursive = componentsUtil._Q_;
5
5
  var addComponentRootToKeyedElements =
6
- componentsUtil._j_;
7
- var normalizeComponentKey = componentsUtil._R_;
6
+ componentsUtil._l_;
7
+ var normalizeComponentKey = componentsUtil._T_;
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").bv_;
11
+ var VElement = require("../vdom").bw_;
12
12
  var fragment = require("./fragment");
13
13
  var helpers = require("./helpers");
14
- var virtualizeElement = VElement.ce_;
15
- var morphAttrs = VElement.cf_;
16
- var keysByDOMNode = domData._G_;
17
- var componentByDOMNode = domData._l_;
18
- var vElementByDOMNode = domData._H_;
19
- var detachedByDOMNode = domData.aT_;
20
-
21
- var insertBefore = helpers.bc_;
22
- var insertAfter = helpers.bd_;
23
- var nextSibling = helpers.cj_;
24
- var firstChild = helpers.ay_;
25
- var removeChild = helpers.be_;
26
- var createFragmentNode = fragment._h_;
27
- var beginFragmentNode = fragment.co_;
14
+ var virtualizeElement = VElement.cf_;
15
+ var morphAttrs = VElement.cg_;
16
+ var keysByDOMNode = domData._I_;
17
+ var componentByDOMNode = domData._n_;
18
+ var vElementByDOMNode = domData._J_;
19
+ var detachedByDOMNode = domData.aU_;
20
+
21
+ var insertBefore = helpers.bd_;
22
+ var insertAfter = helpers.be_;
23
+ var nextSibling = helpers.ck_;
24
+ var firstChild = helpers.az_;
25
+ var removeChild = helpers.bf_;
26
+ var createFragmentNode = fragment._j_;
27
+ var beginFragmentNode = fragment.cp_;
28
28
 
29
29
  var ELEMENT_NODE = 1;
30
30
  var TEXT_NODE = 3;
@@ -42,7 +42,7 @@ function isAutoKey(key) {
42
42
  }
43
43
 
44
44
  function compareNodeNames(fromEl, toEl) {
45
- return fromEl.ca_ === toEl.ca_;
45
+ return fromEl.cb_ === toEl.cb_;
46
46
  }
47
47
 
48
48
  function caseInsensitiveCompare(a, b) {
@@ -51,7 +51,7 @@ function caseInsensitiveCompare(a, b) {
51
51
 
52
52
  function onNodeAdded(node, componentsContext) {
53
53
  if (node.nodeType === ELEMENT_NODE) {
54
- eventDelegation.aS_(node, componentsContext);
54
+ eventDelegation.aT_(node, componentsContext);
55
55
  }
56
56
  }
57
57
 
@@ -61,8 +61,8 @@ function morphdom(fromNode, toNode, host, componentsContext) {
61
61
  var keySequences = Object.create(null);
62
62
 
63
63
  if (componentsContext) {
64
- globalComponentsContext = componentsContext.o_;
65
- isHydrate = globalComponentsContext._W_;
64
+ globalComponentsContext = componentsContext.p_;
65
+ isHydrate = globalComponentsContext._Y_;
66
66
  }
67
67
 
68
68
  function insertVirtualNodeBefore(
@@ -73,21 +73,21 @@ function morphdom(fromNode, toNode, host, componentsContext) {
73
73
  ownerComponent,
74
74
  parentComponent)
75
75
  {
76
- var realNode = vNode.bl_(host, parentEl.namespaceURI);
76
+ var realNode = vNode.bm_(host, parentEl.namespaceURI);
77
77
  insertBefore(realNode, referenceEl, parentEl);
78
78
 
79
79
  if (
80
- vNode.bV_ === ELEMENT_NODE ||
81
- vNode.bV_ === FRAGMENT_NODE)
80
+ vNode.bW_ === ELEMENT_NODE ||
81
+ vNode.bW_ === FRAGMENT_NODE)
82
82
  {
83
83
  if (key) {
84
84
  keysByDOMNode.set(realNode, key);
85
- (isAutoKey(key) ? parentComponent : ownerComponent).J_[
85
+ (isAutoKey(key) ? parentComponent : ownerComponent).K_[
86
86
  key] =
87
87
  realNode;
88
88
  }
89
89
 
90
- if (vNode.ca_ !== "textarea") {
90
+ if (vNode.cb_ !== "textarea") {
91
91
  morphChildren(realNode, vNode, parentComponent);
92
92
  }
93
93
 
@@ -104,7 +104,7 @@ function morphdom(fromNode, toNode, host, componentsContext) {
104
104
  ownerComponent,
105
105
  parentComponent)
106
106
  {
107
- var rootNode = component._A_ = insertBefore(
107
+ var rootNode = component._C_ = insertBefore(
108
108
  createFragmentNode(),
109
109
  referenceNode,
110
110
  referenceNodeParentEl
@@ -114,7 +114,7 @@ function morphdom(fromNode, toNode, host, componentsContext) {
114
114
  if (key && ownerComponent) {
115
115
  key = normalizeComponentKey(key, parentComponent.id);
116
116
  addComponentRootToKeyedElements(
117
- ownerComponent.J_,
117
+ ownerComponent.K_,
118
118
  key,
119
119
  rootNode,
120
120
  component.id
@@ -126,7 +126,7 @@ function morphdom(fromNode, toNode, host, componentsContext) {
126
126
  }
127
127
 
128
128
  function morphComponent(component, vComponent) {
129
- morphChildren(component._A_, vComponent, component);
129
+ morphChildren(component._C_, vComponent, component);
130
130
  }
131
131
 
132
132
  var detachedNodes = [];
@@ -147,7 +147,7 @@ function morphdom(fromNode, toNode, host, componentsContext) {
147
147
 
148
148
  function morphChildren(fromNode, toNode, parentComponent) {
149
149
  var curFromNodeChild = firstChild(fromNode);
150
- var curToNodeChild = toNode.ay_;
150
+ var curToNodeChild = toNode.az_;
151
151
 
152
152
  var curToNodeKey;
153
153
  var curFromNodeKey;
@@ -161,27 +161,27 @@ function morphdom(fromNode, toNode, host, componentsContext) {
161
161
  var fromComponent;
162
162
 
163
163
  outer: while (curToNodeChild) {
164
- toNextSibling = curToNodeChild.cj_;
165
- curToNodeType = curToNodeChild.bV_;
166
- curToNodeKey = curToNodeChild.bU_;
164
+ toNextSibling = curToNodeChild.ck_;
165
+ curToNodeType = curToNodeChild.bW_;
166
+ curToNodeKey = curToNodeChild.bV_;
167
167
 
168
168
  // Skip <!doctype>
169
169
  if (curFromNodeChild && curFromNodeChild.nodeType === DOCTYPE_NODE) {
170
170
  curFromNodeChild = nextSibling(curFromNodeChild);
171
171
  }
172
172
 
173
- var ownerComponent = curToNodeChild._J_ || parentComponent;
173
+ var ownerComponent = curToNodeChild._L_ || parentComponent;
174
174
  var referenceComponent;
175
175
 
176
176
  if (curToNodeType === COMPONENT_NODE) {
177
- var component = curToNodeChild.r_;
177
+ var component = curToNodeChild.s_;
178
178
  if (
179
179
  (matchingFromComponent = existingComponentLookup[component.id]) ===
180
180
  undefined)
181
181
  {
182
182
  if (isHydrate) {
183
183
  var rootNode = beginFragmentNode(curFromNodeChild, fromNode);
184
- component._A_ = rootNode;
184
+ component._C_ = rootNode;
185
185
  componentByDOMNode.set(rootNode, component);
186
186
 
187
187
  if (ownerComponent && curToNodeKey) {
@@ -190,7 +190,7 @@ function morphdom(fromNode, toNode, host, componentsContext) {
190
190
  parentComponent.id
191
191
  );
192
192
  addComponentRootToKeyedElements(
193
- ownerComponent.J_,
193
+ ownerComponent.K_,
194
194
  curToNodeKey,
195
195
  rootNode,
196
196
  component.id
@@ -214,17 +214,17 @@ function morphdom(fromNode, toNode, host, componentsContext) {
214
214
  );
215
215
  }
216
216
  } else {
217
- if (matchingFromComponent._A_ !== curFromNodeChild) {
217
+ if (matchingFromComponent._C_ !== curFromNodeChild) {
218
218
  if (
219
219
  curFromNodeChild && (
220
220
  fromComponent = componentByDOMNode.get(curFromNodeChild)) &&
221
- globalComponentsContext.p_[
221
+ globalComponentsContext.q_[
222
222
  fromComponent.id] ===
223
223
  undefined)
224
224
  {
225
225
  // The component associated with the current real DOM node was not rendered
226
226
  // so we should just remove it out of the real DOM by destroying it
227
- curFromNodeChild = nextSibling(fromComponent._A_);
227
+ curFromNodeChild = nextSibling(fromComponent._C_);
228
228
  destroyComponent(fromComponent);
229
229
  continue;
230
230
  }
@@ -232,7 +232,7 @@ function morphdom(fromNode, toNode, host, componentsContext) {
232
232
  // We need to move the existing component into
233
233
  // the correct location
234
234
  insertBefore(
235
- matchingFromComponent._A_,
235
+ matchingFromComponent._C_,
236
236
  curFromNodeChild,
237
237
  fromNode
238
238
  );
@@ -241,7 +241,7 @@ function morphdom(fromNode, toNode, host, componentsContext) {
241
241
  curFromNodeChild && nextSibling(curFromNodeChild);
242
242
  }
243
243
 
244
- if (!curToNodeChild.aa_) {
244
+ if (!curToNodeChild.ac_) {
245
245
  morphComponent(component, curToNodeChild);
246
246
  }
247
247
  }
@@ -266,7 +266,7 @@ function morphdom(fromNode, toNode, host, componentsContext) {
266
266
  // up elements
267
267
  curToNodeKey = (
268
268
  keySequences[referenceComponent.id] || (
269
- keySequences[referenceComponent.id] = new KeySequence())).aK_(
269
+ keySequences[referenceComponent.id] = new KeySequence())).aL_(
270
270
  curToNodeKey);
271
271
 
272
272
  if (curFromNodeChild) {
@@ -277,12 +277,12 @@ function morphdom(fromNode, toNode, host, componentsContext) {
277
277
 
278
278
  if (curFromNodeKey === curToNodeKey) {
279
279
  // Elements line up. Now we just have to make sure they are compatible
280
- if (!curToNodeChild.aa_) {
280
+ if (!curToNodeChild.ac_) {
281
281
  // We just skip over the fromNode if it is preserved
282
282
 
283
283
  if (
284
284
  curVFromNodeChild &&
285
- curToNodeType === curVFromNodeChild.bV_ && (
285
+ curToNodeType === curVFromNodeChild.bW_ && (
286
286
  curToNodeType !== ELEMENT_NODE ||
287
287
  compareNodeNames(curToNodeChild, curVFromNodeChild)))
288
288
  {
@@ -316,7 +316,7 @@ function morphdom(fromNode, toNode, host, componentsContext) {
316
316
  }
317
317
  }
318
318
  } else {
319
- matchingFromEl = referenceComponent.J_[curToNodeKey];
319
+ matchingFromEl = referenceComponent.K_[curToNodeKey];
320
320
  if (
321
321
  matchingFromEl === undefined ||
322
322
  matchingFromEl === curFromNodeChild)
@@ -324,19 +324,19 @@ function morphdom(fromNode, toNode, host, componentsContext) {
324
324
  if (isHydrate && curFromNodeChild) {
325
325
  if (
326
326
  curFromNodeChild.nodeType === ELEMENT_NODE && (
327
- curToNodeChild.aa_ ||
327
+ curToNodeChild.ac_ ||
328
328
  caseInsensitiveCompare(
329
329
  curFromNodeChild.nodeName,
330
- curToNodeChild.ca_ || ""
330
+ curToNodeChild.cb_ || ""
331
331
  )))
332
332
  {
333
333
  curVFromNodeChild = virtualizeElement(curFromNodeChild);
334
- curVFromNodeChild.ca_ = curToNodeChild.ca_;
334
+ curVFromNodeChild.cb_ = curToNodeChild.cb_;
335
335
  keysByDOMNode.set(curFromNodeChild, curToNodeKey);
336
- referenceComponent.J_[curToNodeKey] =
336
+ referenceComponent.K_[curToNodeKey] =
337
337
  curFromNodeChild;
338
338
 
339
- if (curToNodeChild.aa_) {
339
+ if (curToNodeChild.ac_) {
340
340
  vElementByDOMNode.set(curFromNodeChild, curVFromNodeChild);
341
341
  } else {
342
342
  morphEl(
@@ -351,7 +351,7 @@ function morphdom(fromNode, toNode, host, componentsContext) {
351
351
  curFromNodeChild = fromNextSibling;
352
352
  continue;
353
353
  } else if (
354
- curToNodeChild.bV_ === FRAGMENT_NODE &&
354
+ curToNodeChild.bW_ === FRAGMENT_NODE &&
355
355
  curFromNodeChild.nodeType === COMMENT_NODE)
356
356
  {
357
357
  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.J_[curToNodeKey] = fragment;
387
+ referenceComponent.K_[curToNodeKey] = fragment;
388
388
  removeChild(curFromNodeChild);
389
389
  removeChild(endNode);
390
390
 
391
- if (!curToNodeChild.aa_) {
391
+ if (!curToNodeChild.ac_) {
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.aa_) {
416
+ if (!curToNodeChild.ac_) {
417
417
  curVFromNodeChild = vElementByDOMNode.get(matchingFromEl);
418
418
 
419
419
  if (
420
420
  curVFromNodeChild &&
421
- curToNodeType === curVFromNodeChild.bV_ && (
421
+ curToNodeType === curVFromNodeChild.bW_ && (
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.bU_ === curFromNodeKey)
439
+ toNextSibling.bV_ === curFromNodeKey)
440
440
  {
441
441
  // Single element swap
442
442
 
@@ -527,7 +527,7 @@ function morphdom(fromNode, toNode, host, componentsContext) {
527
527
  curFromNodeChild = fromNextSibling;
528
528
 
529
529
  if (
530
- !globalComponentsContext.p_[fromComponent.id])
530
+ !globalComponentsContext.q_[fromComponent.id])
531
531
  {
532
532
  destroyComponent(fromComponent);
533
533
  }
@@ -549,18 +549,18 @@ function morphdom(fromNode, toNode, host, componentsContext) {
549
549
 
550
550
  if (
551
551
  caseInsensitiveCompare(
552
- curVFromNodeChild.ca_,
553
- curToNodeChild.ca_
552
+ curVFromNodeChild.cb_,
553
+ curToNodeChild.cb_
554
554
  ))
555
555
  {
556
- curVFromNodeChild.ca_ = curToNodeChild.ca_;
556
+ curVFromNodeChild.cb_ = curToNodeChild.cb_;
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.bU_) {
563
+ } else if (curFromNodeKey = curVFromNodeChild.bV_) {
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,7 +587,7 @@ 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.cl_;
590
+ var curToNodeValue = curToNodeChild.cm_;
591
591
  var curFromNodeValue = curFromNodeChild.nodeValue;
592
592
  if (curFromNodeValue !== curToNodeValue) {
593
593
  if (
@@ -638,10 +638,10 @@ function morphdom(fromNode, toNode, host, componentsContext) {
638
638
  }
639
639
 
640
640
  // We have processed all of the "to nodes".
641
- if (fromNode.cn_) {
641
+ if (fromNode.co_) {
642
642
  // If we are in an unfinished fragment, we have reached the end of the nodes
643
643
  // we were matching up and need to end the fragment
644
- fromNode.cn_(curFromNodeChild);
644
+ fromNode.co_(curFromNodeChild);
645
645
  } else {
646
646
  // If curFromNodeChild is non-null then we still have some from nodes
647
647
  // left over that need to be removed
@@ -654,7 +654,7 @@ function morphdom(fromNode, toNode, host, componentsContext) {
654
654
  if (fromComponent = componentByDOMNode.get(curFromNodeChild)) {
655
655
  curFromNodeChild = fromNextSibling;
656
656
  if (
657
- !globalComponentsContext.p_[fromComponent.id])
657
+ !globalComponentsContext.q_[fromComponent.id])
658
658
  {
659
659
  destroyComponent(fromComponent);
660
660
  }
@@ -670,7 +670,7 @@ function morphdom(fromNode, toNode, host, componentsContext) {
670
670
  referenceComponent = parentComponent;
671
671
  } else {
672
672
  referenceComponent =
673
- curVFromNodeChild && curVFromNodeChild._J_;
673
+ curVFromNodeChild && curVFromNodeChild._L_;
674
674
  }
675
675
 
676
676
  detachNode(curFromNodeChild, fromNode, referenceComponent);
@@ -681,23 +681,23 @@ function morphdom(fromNode, toNode, host, componentsContext) {
681
681
  }
682
682
 
683
683
  function morphEl(fromEl, vFromEl, toEl, parentComponent) {
684
- var nodeName = toEl.ca_;
685
- var constId = toEl.cc_;
684
+ var nodeName = toEl.cb_;
685
+ var constId = toEl.cd_;
686
686
  vElementByDOMNode.set(fromEl, toEl);
687
687
 
688
- if (constId !== undefined && vFromEl.cc_ === constId) {
688
+ if (constId !== undefined && vFromEl.cd_ === constId) {
689
689
  return;
690
690
  }
691
691
 
692
692
  morphAttrs(fromEl, vFromEl, toEl);
693
693
 
694
- if (toEl.a__) {
694
+ if (toEl.ab_) {
695
695
  return;
696
696
  }
697
697
 
698
698
  if (nodeName === "textarea") {
699
- if (toEl.cb_ !== vFromEl.cb_) {
700
- fromEl.value = toEl.cb_;
699
+ if (toEl.cc_ !== vFromEl.cc_) {
700
+ fromEl.value = toEl.cc_;
701
701
  }
702
702
  } else {
703
703
  morphChildren(fromEl, toEl, parentComponent);
@@ -709,7 +709,7 @@ function morphdom(fromNode, toNode, host, componentsContext) {
709
709
 
710
710
 
711
711
 
712
- morphChildren(fromNode, toNode, toNode.r_);
712
+ morphChildren(fromNode, toNode, toNode.s_);
713
713
 
714
714
  detachedNodes.forEach(function (node) {
715
715
  var detachedFromComponent = detachedByDOMNode.get(node);
@@ -726,7 +726,7 @@ function morphdom(fromNode, toNode, host, componentsContext) {
726
726
  detachedFromComponent !== true && detachedFromComponent
727
727
  );
728
728
 
729
- if (eventDelegation.al_(node) != false) {
729
+ if (eventDelegation.am_(node) != false) {
730
730
  removeChild(node);
731
731
  }
732
732
  }
@@ -11,7 +11,7 @@ var specialHtmlRegexp = /[&<]/;
11
11
  function virtualizeChildNodes(node, vdomParent, ownerComponent) {
12
12
  var curChild = node.firstChild;
13
13
  while (curChild) {
14
- vdomParent.bM_(virtualize(curChild, ownerComponent));
14
+ vdomParent.bN_(virtualize(curChild, ownerComponent));
15
15
  curChild = curChild.nextSibling;
16
16
  }
17
17
  }
@@ -19,7 +19,7 @@ function virtualizeChildNodes(node, vdomParent, ownerComponent) {
19
19
  function virtualize(node, ownerComponent) {
20
20
  switch (node.nodeType) {
21
21
  case 1:
22
- return VElement.ce_(node, virtualizeChildNodes, ownerComponent);
22
+ return VElement.cf_(node, virtualizeChildNodes, ownerComponent);
23
23
  case 3:
24
24
  return new VText(node.nodeValue, ownerComponent);
25
25
  case 11:
@@ -38,7 +38,7 @@ function virtualizeHTML(html, ownerComponent) {
38
38
  var curChild = parseHTML(html);
39
39
 
40
40
  while (curChild) {
41
- vdomFragment.bM_(virtualize(curChild, ownerComponent));
41
+ vdomFragment.bN_(virtualize(curChild, ownerComponent));
42
42
  curChild = curChild.nextSibling;
43
43
  }
44
44
 
@@ -65,18 +65,18 @@ Node_prototype.t = function (value) {
65
65
  }
66
66
  }
67
67
 
68
- this.bM_(vdomNode || new VText(value.toString()));
69
- return this.cd_();
68
+ this.bN_(vdomNode || new VText(value.toString()));
69
+ return this.ce_();
70
70
  };
71
71
 
72
- Node_prototype.bR_ = function () {
73
- return this.bM_(new VDocumentFragment());
72
+ Node_prototype.bS_ = function () {
73
+ return this.bN_(new VDocumentFragment());
74
74
  };
75
75
 
76
- exports.bw_ = VDocumentFragment;
77
- exports.bv_ = VElement;
78
- exports.bx_ = VText;
79
- exports.by_ = VComponent;
80
- exports.bz_ = VFragment;
81
- exports.ce_ = virtualize;
82
- exports.bA_ = virtualizeHTML;
76
+ exports.bx_ = VDocumentFragment;
77
+ exports.bw_ = VElement;
78
+ exports.by_ = VText;
79
+ exports.bz_ = VComponent;
80
+ exports.bA_ = VFragment;
81
+ exports.cf_ = virtualize;
82
+ exports.bB_ = virtualizeHTML;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "marko",
3
- "version": "5.33.9",
3
+ "version": "5.33.11",
4
4
  "description": "UI Components + streaming, async, high performance, HTML templating for Node.js and the browser.",
5
5
  "keywords": [
6
6
  "front-end",
@@ -64,8 +64,8 @@
64
64
  "build": "babel ./src --out-dir ./dist --extensions .js --copy-files --config-file ../../babel.config.js --env-name=production"
65
65
  },
66
66
  "dependencies": {
67
- "@marko/compiler": "^5.35.7",
68
- "@marko/translator-default": "^5.32.8",
67
+ "@marko/compiler": "^5.35.9",
68
+ "@marko/translator-default": "^5.32.10",
69
69
  "app-module-path": "^2.2.0",
70
70
  "argly": "^1.2.0",
71
71
  "browser-refresh-client": "1.1.4",
@@ -1,4 +1,4 @@
1
- var queueMicrotask = require("../../../runtime/queueMicrotask");
1
+ var queueMicrotask = require("@internal/set-immediate").___queueMicrotask;
2
2
 
3
3
  function AsyncValue() {
4
4
  /**
@@ -1,6 +1,6 @@
1
1
  var complain = "MARKO_DEBUG" && require("complain");
2
+ var setImmediate = require("@internal/set-immediate").___setImmediate;
2
3
  var warp10Finalize = require("warp10/finalize");
3
- var queueMicrotask = require("../../../runtime/queueMicrotask");
4
4
  var defineComponent = require("../../../runtime/components/defineComponent");
5
5
  var eventDelegation = require("../../../runtime/components/event-delegation");
6
6
  var createFragmentNode =
@@ -39,7 +39,7 @@ function register(type, def) {
39
39
 
40
40
  if (pendingForType) {
41
41
  delete pendingDefs[type];
42
- queueMicrotask(function () {
42
+ setImmediate(function () {
43
43
  pendingForType.forEach(function (args) {
44
44
  tryHydrateComponent(args[0], args[1], args[2], args[3])();
45
45
  });
@@ -15,3 +15,5 @@ exports.___setImmediate = function (callback) {
15
15
  window.postMessage(msg, "*");
16
16
  }
17
17
  };
18
+
19
+ exports.___queueMicrotask = require("./queueMicrotask");
@@ -1,2 +1,31 @@
1
- exports.___setImmediate = setTimeout;
2
- exports.___clearImmediate = clearTimeout;
1
+ var queueMicrotask = require("./queueMicrotask");
2
+ var count = 0;
3
+ var queue = new Set();
4
+ function noop() {}
5
+
6
+ exports.___setImmediate = function setImmediate(cb) {
7
+ queue.add(cb);
8
+ if (!count) {
9
+ queueMicrotaskInternal(noop);
10
+ }
11
+ return cb;
12
+ };
13
+
14
+ exports.___clearImmediate = function clearImmediate(id) {
15
+ queue.delete(id);
16
+ };
17
+
18
+ exports.___queueMicrotask = queueMicrotaskInternal;
19
+
20
+ function queueMicrotaskInternal(cb) {
21
+ count++;
22
+ queueMicrotask(function () {
23
+ if (--count === 0 && queue.size) {
24
+ for (const fn of queue) {
25
+ queueMicrotask(fn);
26
+ }
27
+ queue = new Set();
28
+ }
29
+ cb();
30
+ });
31
+ }
@@ -1,2 +1,3 @@
1
1
  exports.___setImmediate = setImmediate;
2
2
  exports.___clearImmediate = clearImmediate;
3
+ exports.___queueMicrotask = require("./queueMicrotask");
@@ -0,0 +1,8 @@
1
+ var promise;
2
+ module.exports =
3
+ typeof queueMicrotask === "function"
4
+ ? queueMicrotask
5
+ : ((promise = Promise.resolve()),
6
+ function (cb) {
7
+ promise.then(cb);
8
+ });
@@ -10,6 +10,7 @@ var escapeXmlHelper = require("./helpers/escape-xml");
10
10
  var StringWriter = require("./StringWriter");
11
11
  var escapeXmlOrNullish = escapeXmlHelper.x;
12
12
  var escapeXmlString = escapeXmlHelper.___escapeXML;
13
+ var missingSetTimeout = typeof setTimeout !== "function";
13
14
 
14
15
  function noop() {}
15
16
 
@@ -293,7 +294,9 @@ var proto = (AsyncStream.prototype = {
293
294
  }
294
295
  }
295
296
 
296
- if (timeout == null) {
297
+ if (missingSetTimeout) {
298
+ timeout = 0;
299
+ } else if (timeout == null) {
297
300
  timeout = AsyncStream.DEFAULT_TIMEOUT;
298
301
  }
299
302
 
@@ -1,6 +1,6 @@
1
1
  var registry = require("@internal/components-registry");
2
+ var setImmediate = require("@internal/set-immediate").___setImmediate;
2
3
  var updateManager = require("../components/update-manager");
3
- var queueMicrotask = require("../queueMicrotask");
4
4
  var runtime = require(".");
5
5
 
6
6
  var createTemplate = runtime.t;
@@ -27,7 +27,7 @@ exports.t = runtime.t = function (typeName) {
27
27
  if (instances.size) {
28
28
  if (!queue) {
29
29
  queue = [];
30
- queueMicrotask(batchUpdate);
30
+ setImmediate(batchUpdate);
31
31
  }
32
32
 
33
33
  queue.push(function () {
@@ -1,14 +0,0 @@
1
- "use strict";var promise;
2
- module.exports =
3
- typeof queueMicrotask === "function" ?
4
- queueMicrotask :
5
- typeof Promise === "function" && (promise = Promise.resolve()) ?
6
- function (cb) {
7
- promise.then(cb).catch(rethrow);
8
- } :
9
- setTimeout;
10
- function rethrow(err) {
11
- setTimeout(function () {
12
- throw err;
13
- });
14
- }
@@ -1,14 +0,0 @@
1
- var promise;
2
- module.exports =
3
- typeof queueMicrotask === "function"
4
- ? queueMicrotask
5
- : typeof Promise === "function" && (promise = Promise.resolve())
6
- ? function (cb) {
7
- promise.then(cb).catch(rethrow);
8
- }
9
- : setTimeout;
10
- function rethrow(err) {
11
- setTimeout(function () {
12
- throw err;
13
- });
14
- }