marko 5.35.7 → 5.35.8

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.
Files changed (127) hide show
  1. package/bin/markoc.js +0 -2
  2. package/dist/compiler/index.js +2 -0
  3. package/dist/core-tags/core/await/AsyncValue.js +1 -0
  4. package/dist/core-tags/core/await/renderer.js +1 -0
  5. package/dist/node-require/hot-reload.js +1 -3
  6. package/dist/node-require/index.js +1 -1
  7. package/dist/node_modules/@internal/components-define-widget-legacy/index-browser.js +4 -2
  8. package/dist/node_modules/@internal/components-entry/index.js +13 -13
  9. package/dist/node_modules/@internal/components-entry-legacy/index-browser.js +4 -3
  10. package/dist/node_modules/@internal/components-registry/index-browser.js +40 -36
  11. package/dist/node_modules/@internal/components-registry/index.js +2 -2
  12. package/dist/node_modules/@internal/components-util/index-browser.js +16 -16
  13. package/dist/node_modules/@internal/components-util/index.js +7 -7
  14. package/dist/node_modules/@internal/create-readable/index-browser.js +2 -2
  15. package/dist/node_modules/@internal/create-readable/index.js +9 -9
  16. package/dist/node_modules/@internal/preserve-tag/index-browser.js +5 -5
  17. package/dist/node_modules/@internal/preserve-tag/index.js +1 -1
  18. package/dist/node_modules/@internal/require/index-webpack.js +1 -0
  19. package/dist/node_modules/@internal/set-immediate/index-browser.js +1 -1
  20. package/dist/node_modules/@internal/set-immediate/index-worker.js +2 -2
  21. package/dist/node_modules/@internal/set-immediate/index.js +2 -2
  22. package/dist/runtime/RenderResult.js +4 -3
  23. package/dist/runtime/components/Component.js +107 -106
  24. package/dist/runtime/components/ComponentDef.js +25 -25
  25. package/dist/runtime/components/ComponentsContext.js +6 -6
  26. package/dist/runtime/components/GlobalComponentsContext.js +3 -3
  27. package/dist/runtime/components/KeySequence.js +3 -3
  28. package/dist/runtime/components/ServerComponent.js +8 -7
  29. package/dist/runtime/components/State.js +20 -24
  30. package/dist/runtime/components/attach-detach.js +7 -7
  31. package/dist/runtime/components/defineComponent.js +0 -1
  32. package/dist/runtime/components/dom-data.js +5 -5
  33. package/dist/runtime/components/event-delegation.js +10 -10
  34. package/dist/runtime/components/legacy/defineRenderer-legacy.js +14 -13
  35. package/dist/runtime/components/legacy/dependencies/index.js +9 -10
  36. package/dist/runtime/components/legacy/jquery.js +1 -0
  37. package/dist/runtime/components/legacy/renderer-legacy.js +33 -32
  38. package/dist/runtime/components/renderer.js +29 -29
  39. package/dist/runtime/components/update-manager.js +4 -4
  40. package/dist/runtime/createOut.js +1 -1
  41. package/dist/runtime/dom-insert.js +5 -5
  42. package/dist/runtime/helpers/_change-case.js +2 -2
  43. package/dist/runtime/helpers/dynamic-tag.js +18 -13
  44. package/dist/runtime/helpers/render-tag.js +1 -1
  45. package/dist/runtime/helpers/serialize-noop.js +5 -0
  46. package/dist/runtime/helpers/style-value.js +1 -1
  47. package/dist/runtime/helpers/tags-compat/dom-debug.mjs +1 -0
  48. package/dist/runtime/helpers/tags-compat/dom.mjs +1 -0
  49. package/dist/runtime/helpers/tags-compat/html-debug.js +1 -1
  50. package/dist/runtime/helpers/tags-compat/html-debug.mjs +3 -2
  51. package/dist/runtime/helpers/tags-compat/html.js +3 -1
  52. package/dist/runtime/helpers/tags-compat/html.mjs +3 -2
  53. package/dist/runtime/helpers/tags-compat/runtime-dom.js +38 -35
  54. package/dist/runtime/helpers/tags-compat/runtime-html.js +24 -65
  55. package/dist/runtime/html/AsyncStream.js +25 -24
  56. package/dist/runtime/html/BufferedWriter.js +2 -2
  57. package/dist/runtime/html/helpers/_dynamic-attr.js +2 -2
  58. package/dist/runtime/html/helpers/attr.js +4 -3
  59. package/dist/runtime/html/helpers/attrs.js +1 -0
  60. package/dist/runtime/html/helpers/data-marko.js +2 -3
  61. package/dist/runtime/html/helpers/escape-quotes.js +1 -1
  62. package/dist/runtime/html/helpers/escape-xml.js +1 -1
  63. package/dist/runtime/html/helpers/merge-attrs.js +1 -0
  64. package/dist/runtime/html/index.js +1 -1
  65. package/dist/runtime/renderable.js +5 -5
  66. package/dist/runtime/vdom/AsyncVDOMBuilder.js +86 -85
  67. package/dist/runtime/vdom/VComponent.js +4 -4
  68. package/dist/runtime/vdom/VDocumentFragment.js +7 -7
  69. package/dist/runtime/vdom/VElement.js +41 -42
  70. package/dist/runtime/vdom/VFragment.js +9 -9
  71. package/dist/runtime/vdom/VNode.js +34 -35
  72. package/dist/runtime/vdom/VText.js +8 -8
  73. package/dist/runtime/vdom/helpers/attrs.js +1 -0
  74. package/dist/runtime/vdom/helpers/const-element.js +3 -3
  75. package/dist/runtime/vdom/hot-reload.js +14 -14
  76. package/dist/runtime/vdom/index.js +1 -1
  77. package/dist/runtime/vdom/morphdom/fragment.js +5 -5
  78. package/dist/runtime/vdom/morphdom/helpers.js +5 -5
  79. package/dist/runtime/vdom/morphdom/index.js +67 -68
  80. package/dist/runtime/vdom/vdom.js +14 -14
  81. package/dist/taglib/index.js +1 -0
  82. package/index.d.ts +1 -5
  83. package/package.json +2 -2
  84. package/src/compiler/index.js +2 -0
  85. package/src/core-tags/core/await/AsyncValue.js +1 -0
  86. package/src/core-tags/core/await/renderer.js +1 -0
  87. package/src/node-require/hot-reload.js +0 -2
  88. package/src/node-require/index.js +1 -1
  89. package/src/node_modules/@internal/components-define-widget-legacy/index-browser.js +4 -2
  90. package/src/node_modules/@internal/components-entry/index.js +2 -2
  91. package/src/node_modules/@internal/components-entry-legacy/index-browser.js +1 -0
  92. package/src/node_modules/@internal/components-registry/index-browser.js +8 -4
  93. package/src/node_modules/@internal/components-util/index-browser.js +1 -1
  94. package/src/node_modules/@internal/create-readable/index-browser.js +1 -1
  95. package/src/node_modules/@internal/require/index-webpack.js +1 -0
  96. package/src/runtime/RenderResult.js +1 -0
  97. package/src/runtime/components/Component.js +2 -1
  98. package/src/runtime/components/ComponentDef.js +4 -4
  99. package/src/runtime/components/ServerComponent.js +1 -0
  100. package/src/runtime/components/State.js +6 -10
  101. package/src/runtime/components/defineComponent.js +0 -1
  102. package/src/runtime/components/legacy/defineRenderer-legacy.js +1 -0
  103. package/src/runtime/components/legacy/dependencies/index.js +0 -1
  104. package/src/runtime/components/legacy/jquery.js +1 -0
  105. package/src/runtime/components/legacy/renderer-legacy.js +1 -0
  106. package/src/runtime/helpers/dynamic-tag.js +11 -6
  107. package/src/runtime/helpers/serialize-noop.js +5 -0
  108. package/src/runtime/helpers/tags-compat/dom-debug.mjs +1 -0
  109. package/src/runtime/helpers/tags-compat/dom.mjs +1 -0
  110. package/src/runtime/helpers/tags-compat/html-debug.js +1 -1
  111. package/src/runtime/helpers/tags-compat/html-debug.mjs +3 -2
  112. package/src/runtime/helpers/tags-compat/html.js +3 -1
  113. package/src/runtime/helpers/tags-compat/html.mjs +3 -2
  114. package/src/runtime/helpers/tags-compat/runtime-dom.js +23 -20
  115. package/src/runtime/helpers/tags-compat/runtime-html.js +18 -59
  116. package/src/runtime/html/AsyncStream.js +1 -0
  117. package/src/runtime/html/helpers/attr.js +1 -0
  118. package/src/runtime/html/helpers/attrs.js +1 -0
  119. package/src/runtime/html/helpers/data-marko.js +0 -1
  120. package/src/runtime/html/helpers/merge-attrs.js +1 -0
  121. package/src/runtime/vdom/AsyncVDOMBuilder.js +1 -0
  122. package/src/runtime/vdom/VElement.js +1 -2
  123. package/src/runtime/vdom/VNode.js +0 -1
  124. package/src/runtime/vdom/helpers/attrs.js +1 -0
  125. package/src/runtime/vdom/morphdom/index.js +0 -1
  126. package/src/taglib/index.js +1 -0
  127. package/tags-html.d.ts +7 -9
@@ -1,30 +1,30 @@
1
1
  "use strict";
2
2
  var componentsUtil = require("@internal/components-util");
3
- var existingComponentLookup = componentsUtil._k_;
4
- var destroyNodeRecursive = componentsUtil._Q_;
3
+ var existingComponentLookup = componentsUtil._l_;
4
+ var destroyNodeRecursive = componentsUtil._R_;
5
5
  var addComponentRootToKeyedElements =
6
- componentsUtil._l_;
7
- var normalizeComponentKey = componentsUtil._T_;
6
+ componentsUtil._m_;
7
+ var normalizeComponentKey = componentsUtil._U_;
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").bw_;
11
+ var VElement = require("../vdom").bz_;
12
12
  var fragment = require("./fragment");
13
13
  var helpers = require("./helpers");
14
- var virtualizeElement = VElement.cf_;
15
- var morphAttrs = VElement.cg_;
16
- var keysByDOMNode = domData._m_;
17
- var componentByDOMNode = domData._o_;
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_;
14
+ var virtualizeElement = VElement.ci_;
15
+ var morphAttrs = VElement.cj_;
16
+ var keysByDOMNode = domData._n_;
17
+ var componentByDOMNode = domData._p_;
18
+ var vElementByDOMNode = domData._K_;
19
+ var detachedByDOMNode = domData.aW_;
20
+
21
+ var insertBefore = helpers.bf_;
22
+ var insertAfter = helpers.bg_;
23
+ var nextSibling = helpers.cn_;
24
+ var firstChild = helpers.aA_;
25
+ var removeChild = helpers.bh_;
26
+ var createFragmentNode = fragment._k_;
27
+ var beginFragmentNode = fragment.cs_;
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.cb_ === toEl.cb_;
45
+ return fromEl.ce_ === toEl.ce_;
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.aT_(node, componentsContext);
54
+ eventDelegation.aV_(node, componentsContext);
55
55
  }
56
56
  }
57
57
 
@@ -62,7 +62,7 @@ function morphdom(fromNode, toNode, host, componentsContext) {
62
62
 
63
63
  if (componentsContext) {
64
64
  globalComponentsContext = componentsContext.p_;
65
- isHydrate = globalComponentsContext._Y_;
65
+ isHydrate = globalComponentsContext._Z_;
66
66
  }
67
67
 
68
68
  function insertVirtualNodeBefore(
@@ -73,12 +73,12 @@ function morphdom(fromNode, toNode, host, componentsContext) {
73
73
  ownerComponent,
74
74
  parentComponent)
75
75
  {
76
- var realNode = vNode.bm_(host, parentEl.namespaceURI);
76
+ var realNode = vNode.bo_(host, parentEl.namespaceURI);
77
77
  insertBefore(realNode, referenceEl, parentEl);
78
78
 
79
79
  if (
80
- vNode.bW_ === ELEMENT_NODE ||
81
- vNode.bW_ === FRAGMENT_NODE)
80
+ vNode.bZ_ === ELEMENT_NODE ||
81
+ vNode.bZ_ === FRAGMENT_NODE)
82
82
  {
83
83
  if (key) {
84
84
  keysByDOMNode.set(realNode, key);
@@ -87,7 +87,7 @@ function morphdom(fromNode, toNode, host, componentsContext) {
87
87
  realNode;
88
88
  }
89
89
 
90
- if (vNode.cb_ !== "textarea") {
90
+ if (vNode.ce_ !== "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._D_ = insertBefore(
107
+ var rootNode = component._E_ = insertBefore(
108
108
  createFragmentNode(),
109
109
  referenceNode,
110
110
  referenceNodeParentEl
@@ -126,7 +126,7 @@ function morphdom(fromNode, toNode, host, componentsContext) {
126
126
  }
127
127
 
128
128
  function morphComponent(component, vComponent) {
129
- morphChildren(component._D_, vComponent, component);
129
+ morphChildren(component._E_, 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.az_;
150
+ var curToNodeChild = toNode.aA_;
151
151
 
152
152
  var curToNodeKey;
153
153
  var curFromNodeKey;
@@ -161,16 +161,16 @@ function morphdom(fromNode, toNode, host, componentsContext) {
161
161
  var fromComponent;
162
162
 
163
163
  outer: while (curToNodeChild) {
164
- toNextSibling = curToNodeChild.ck_;
165
- curToNodeType = curToNodeChild.bW_;
166
- curToNodeKey = curToNodeChild.bV_;
164
+ toNextSibling = curToNodeChild.cn_;
165
+ curToNodeType = curToNodeChild.bZ_;
166
+ curToNodeKey = curToNodeChild.bY_;
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._L_ || parentComponent;
173
+ var ownerComponent = curToNodeChild._M_ || parentComponent;
174
174
  var referenceComponent;
175
175
 
176
176
  if (curToNodeType === COMPONENT_NODE) {
@@ -181,7 +181,7 @@ function morphdom(fromNode, toNode, host, componentsContext) {
181
181
  {
182
182
  if (isHydrate) {
183
183
  var rootNode = beginFragmentNode(curFromNodeChild, fromNode);
184
- component._D_ = rootNode;
184
+ component._E_ = rootNode;
185
185
  componentByDOMNode.set(rootNode, component);
186
186
 
187
187
  if (ownerComponent && curToNodeKey) {
@@ -214,7 +214,7 @@ function morphdom(fromNode, toNode, host, componentsContext) {
214
214
  );
215
215
  }
216
216
  } else {
217
- if (matchingFromComponent._D_ !== curFromNodeChild) {
217
+ if (matchingFromComponent._E_ !== curFromNodeChild) {
218
218
  if (
219
219
  curFromNodeChild && (
220
220
  fromComponent = componentByDOMNode.get(curFromNodeChild)) &&
@@ -224,7 +224,7 @@ function morphdom(fromNode, toNode, host, componentsContext) {
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._D_);
227
+ curFromNodeChild = nextSibling(fromComponent._E_);
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._D_,
235
+ matchingFromComponent._E_,
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.ac_) {
244
+ if (!curToNodeChild.ad_) {
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())).aL_(
269
+ keySequences[referenceComponent.id] = new KeySequence())).aN_(
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.ac_) {
280
+ if (!curToNodeChild.ad_) {
281
281
  // We just skip over the fromNode if it is preserved
282
282
 
283
283
  if (
284
284
  curVFromNodeChild &&
285
- curToNodeType === curVFromNodeChild.bW_ && (
285
+ curToNodeType === curVFromNodeChild.bZ_ && (
286
286
  curToNodeType !== ELEMENT_NODE ||
287
287
  compareNodeNames(curToNodeChild, curVFromNodeChild)))
288
288
  {
@@ -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.ac_ ||
327
+ curToNodeChild.ad_ ||
328
328
  caseInsensitiveCompare(
329
329
  curFromNodeChild.nodeName,
330
- curToNodeChild.cb_ || ""
330
+ curToNodeChild.ce_ || ""
331
331
  )))
332
332
  {
333
333
  curVFromNodeChild = virtualizeElement(curFromNodeChild);
334
- curVFromNodeChild.cb_ = curToNodeChild.cb_;
334
+ curVFromNodeChild.ce_ = curToNodeChild.ce_;
335
335
  keysByDOMNode.set(curFromNodeChild, curToNodeKey);
336
336
  referenceComponent.K_[curToNodeKey] =
337
337
  curFromNodeChild;
338
338
 
339
- if (curToNodeChild.ac_) {
339
+ if (curToNodeChild.ad_) {
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.bW_ === FRAGMENT_NODE &&
354
+ curToNodeChild.bZ_ === FRAGMENT_NODE &&
355
355
  curFromNodeChild.nodeType === COMMENT_NODE)
356
356
  {
357
357
  var content = curFromNodeChild.nodeValue;
@@ -360,7 +360,6 @@ function morphdom(fromNode, toNode, host, componentsContext) {
360
360
  var depth = 0;
361
361
  var nodeValue;
362
362
 
363
- // eslint-disable-next-line no-constant-condition
364
363
  while (true) {
365
364
  if (endNode.nodeType === COMMENT_NODE) {
366
365
  nodeValue = endNode.nodeValue;
@@ -388,7 +387,7 @@ function morphdom(fromNode, toNode, host, componentsContext) {
388
387
  removeChild(curFromNodeChild);
389
388
  removeChild(endNode);
390
389
 
391
- if (!curToNodeChild.ac_) {
390
+ if (!curToNodeChild.ad_) {
392
391
  morphChildren(fragment, curToNodeChild, parentComponent);
393
392
  }
394
393
 
@@ -413,12 +412,12 @@ function morphdom(fromNode, toNode, host, componentsContext) {
413
412
  detachedByDOMNode.set(matchingFromEl, undefined);
414
413
  }
415
414
 
416
- if (!curToNodeChild.ac_) {
415
+ if (!curToNodeChild.ad_) {
417
416
  curVFromNodeChild = vElementByDOMNode.get(matchingFromEl);
418
417
 
419
418
  if (
420
419
  curVFromNodeChild &&
421
- curToNodeType === curVFromNodeChild.bW_ && (
420
+ curToNodeType === curVFromNodeChild.bZ_ && (
422
421
  curToNodeType !== ELEMENT_NODE ||
423
422
  compareNodeNames(curVFromNodeChild, curToNodeChild)))
424
423
  {
@@ -436,7 +435,7 @@ function morphdom(fromNode, toNode, host, componentsContext) {
436
435
 
437
436
  if (
438
437
  toNextSibling &&
439
- toNextSibling.bV_ === curFromNodeKey)
438
+ toNextSibling.bY_ === curFromNodeKey)
440
439
  {
441
440
  // Single element swap
442
441
 
@@ -549,18 +548,18 @@ function morphdom(fromNode, toNode, host, componentsContext) {
549
548
 
550
549
  if (
551
550
  caseInsensitiveCompare(
552
- curVFromNodeChild.cb_,
553
- curToNodeChild.cb_
551
+ curVFromNodeChild.ce_,
552
+ curToNodeChild.ce_
554
553
  ))
555
554
  {
556
- curVFromNodeChild.cb_ = curToNodeChild.cb_;
555
+ curVFromNodeChild.ce_ = curToNodeChild.ce_;
557
556
  }
558
557
  } else {
559
558
  // Skip over nodes that don't look like ours...
560
559
  curFromNodeChild = fromNextSibling;
561
560
  continue;
562
561
  }
563
- } else if (curFromNodeKey = curVFromNodeChild.bV_) {
562
+ } else if (curFromNodeKey = curVFromNodeChild.bY_) {
564
563
  // We have a keyed element here but our target VDOM node
565
564
  // is not keyed so this not doesn't belong
566
565
  isCompatible = false;
@@ -587,18 +586,18 @@ function morphdom(fromNode, toNode, host, componentsContext) {
587
586
  {
588
587
  // Both nodes being compared are Text or Comment nodes
589
588
  isCompatible = true;
590
- var curToNodeValue = curToNodeChild.cm_;
589
+ var curToNodeValue = curToNodeChild.cp_;
591
590
  var curFromNodeValue = curFromNodeChild.nodeValue;
592
591
  if (curFromNodeValue !== curToNodeValue) {
593
592
  if (
594
593
  isHydrate &&
595
594
  toNextSibling &&
596
595
  curFromNodeType === TEXT_NODE &&
597
- toNextSibling.bW_ === TEXT_NODE &&
596
+ toNextSibling.bZ_ === TEXT_NODE &&
598
597
  curFromNodeValue.startsWith(curToNodeValue) &&
599
598
  curFromNodeValue.
600
599
  slice(curToNodeValue.length).
601
- startsWith(toNextSibling.cm_))
600
+ startsWith(toNextSibling.cp_))
602
601
  {
603
602
  // In hydrate mode we can use splitText to more efficiently handle
604
603
  // adjacent text vdom nodes that were merged.
@@ -643,10 +642,10 @@ function morphdom(fromNode, toNode, host, componentsContext) {
643
642
  }
644
643
 
645
644
  // We have processed all of the "to nodes".
646
- if (fromNode.co_) {
645
+ if (fromNode.cr_) {
647
646
  // If we are in an unfinished fragment, we have reached the end of the nodes
648
647
  // we were matching up and need to end the fragment
649
- fromNode.co_(curFromNodeChild);
648
+ fromNode.cr_(curFromNodeChild);
650
649
  } else {
651
650
  // If curFromNodeChild is non-null then we still have some from nodes
652
651
  // left over that need to be removed
@@ -675,7 +674,7 @@ function morphdom(fromNode, toNode, host, componentsContext) {
675
674
  referenceComponent = parentComponent;
676
675
  } else {
677
676
  referenceComponent =
678
- curVFromNodeChild && curVFromNodeChild._L_;
677
+ curVFromNodeChild && curVFromNodeChild._M_;
679
678
  }
680
679
 
681
680
  detachNode(curFromNodeChild, fromNode, referenceComponent);
@@ -686,23 +685,23 @@ function morphdom(fromNode, toNode, host, componentsContext) {
686
685
  }
687
686
 
688
687
  function morphEl(fromEl, vFromEl, toEl, parentComponent) {
689
- var nodeName = toEl.cb_;
690
- var constId = toEl.cd_;
688
+ var nodeName = toEl.ce_;
689
+ var constId = toEl.cg_;
691
690
  vElementByDOMNode.set(fromEl, toEl);
692
691
 
693
- if (constId !== undefined && vFromEl.cd_ === constId) {
692
+ if (constId !== undefined && vFromEl.cg_ === constId) {
694
693
  return;
695
694
  }
696
695
 
697
696
  morphAttrs(fromEl, vFromEl, toEl);
698
697
 
699
- if (toEl.ab_) {
698
+ if (toEl.ac_) {
700
699
  return;
701
700
  }
702
701
 
703
702
  if (nodeName === "textarea") {
704
- if (toEl.cc_ !== vFromEl.cc_) {
705
- fromEl.value = toEl.cc_;
703
+ if (toEl.cf_ !== vFromEl.cf_) {
704
+ fromEl.value = toEl.cf_;
706
705
  }
707
706
  } else {
708
707
  morphChildren(fromEl, toEl, parentComponent);
@@ -731,7 +730,7 @@ function morphdom(fromNode, toNode, host, componentsContext) {
731
730
  detachedFromComponent !== true && detachedFromComponent
732
731
  );
733
732
 
734
- if (eventDelegation.am_(node) != false) {
733
+ if (eventDelegation.an_(node) != false) {
735
734
  removeChild(node);
736
735
  }
737
736
  }
@@ -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.bN_(virtualize(curChild, ownerComponent));
14
+ vdomParent.bQ_(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.cf_(node, virtualizeChildNodes, ownerComponent);
22
+ return VElement.ci_(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.bN_(virtualize(curChild, ownerComponent));
41
+ vdomFragment.bQ_(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.bN_(vdomNode || new VText(value.toString()));
69
- return this.ce_();
68
+ this.bQ_(vdomNode || new VText(value.toString()));
69
+ return this.ch_();
70
70
  };
71
71
 
72
- Node_prototype.bS_ = function () {
73
- return this.bN_(new VDocumentFragment());
72
+ Node_prototype.bV_ = function () {
73
+ return this.bQ_(new VDocumentFragment());
74
74
  };
75
75
 
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;
76
+ exports.bA_ = VDocumentFragment;
77
+ exports.bz_ = VElement;
78
+ exports.bB_ = VText;
79
+ exports.bC_ = VComponent;
80
+ exports.bD_ = VFragment;
81
+ exports.ci_ = virtualize;
82
+ exports.bE_ = virtualizeHTML;
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
 
3
+ // eslint-disable-next-line no-constant-binary-expression
3
4
 
4
5
  const compiler = require("@marko/compiler");
5
6
 
package/index.d.ts CHANGED
@@ -7,7 +7,6 @@ declare module "*.marko" {
7
7
 
8
8
  declare global {
9
9
  namespace NodeJS {
10
- // eslint-disable-next-line @typescript-eslint/no-empty-interface
11
10
  interface ReadableStream {}
12
11
  }
13
12
 
@@ -79,11 +78,9 @@ declare global {
79
78
  }
80
79
 
81
80
  /** Body content created from by a component, typically held in an object with a renderBody property. */
82
- // eslint-disable-next-line @typescript-eslint/no-empty-interface
81
+
83
82
  export interface Body<
84
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
85
83
  in Params extends readonly any[] = [],
86
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
87
84
  out Return = void,
88
85
  > {}
89
86
 
@@ -214,7 +211,6 @@ declare global {
214
211
  }
215
212
 
216
213
  /** The top level api for a Marko Template. */
217
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
218
214
  export abstract class Template<Input = unknown, Return = unknown> {
219
215
  /** Creates a Marko compatible output stream. */
220
216
  createOut(): Out;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "marko",
3
- "version": "5.35.7",
3
+ "version": "5.35.8",
4
4
  "description": "UI Components + streaming, async, high performance, HTML templating for Node.js and the browser.",
5
5
  "keywords": [
6
6
  "front-end",
@@ -74,7 +74,7 @@
74
74
  "csstype": "^3.1.3",
75
75
  "events-light": "^1.0.5",
76
76
  "listener-tracker": "^2.0.0",
77
- "minimatch": "^9.0.4",
77
+ "minimatch": "^10.0.1",
78
78
  "raptor-util": "^3.2.0",
79
79
  "resolve-from": "^5.0.0",
80
80
  "self-closing-tags": "^1.0.1",
@@ -2,6 +2,8 @@
2
2
 
3
3
  var ok = require("assert").ok;
4
4
  var fs = require("fs");
5
+
6
+ // eslint-disable-next-line no-constant-binary-expression
5
7
  var complain = "MARKO_DEBUG" && require("complain");
6
8
  var compiler = require("@marko/compiler");
7
9
  var extend = require("raptor-util/extend");
@@ -90,6 +90,7 @@ AsyncValue.prototype = {
90
90
  }
91
91
 
92
92
  if (value && typeof value.then === "function") {
93
+ // eslint-disable-next-line @typescript-eslint/no-this-alias
93
94
  var asyncValue = this;
94
95
 
95
96
  var finalPromise = value.then(
@@ -1,4 +1,5 @@
1
1
  "use strict";
2
+ // eslint-disable-next-line no-constant-binary-expression
2
3
  var complain = "MARKO_DEBUG" && require("complain");
3
4
  var AsyncValue = require("./AsyncValue");
4
5
 
@@ -1,5 +1,3 @@
1
- /* eslint-disable no-console */
2
-
3
1
  const fs = require("fs");
4
2
  const path = require("path");
5
3
  const compiler = require("../compiler");
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
-
2
+ // eslint-disable-next-line no-constant-binary-expression
3
3
  const complain = "MARKO_DEBUG" && require("complain");
4
4
  const path = require("path");
5
5
  const resolveFrom = require("resolve-from");
@@ -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
-
11
+ // eslint-disable-next-line no-constant-binary-expression
12
12
  var complain = "MARKO_DEBUG" && require("complain");
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 (proto.hasOwnProperty(propName)) {
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.___keyedElements["@_wbind"];
195
197
  var prevEl = this.___currentLegacyBindEl;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
 
3
3
  var warp10 = require("warp10");
4
- var w10NOOP = require("warp10/constants").NOOP;
4
+ var w10ToJSON = require("../../../runtime/helpers/serialize-noop").___toJSON;
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";
@@ -136,7 +136,7 @@ function addComponentsFromContext(componentsContext, componentsToHydrate) {
136
136
  }
137
137
  }
138
138
 
139
- if (typeof renderBody === "function" && renderBody.toJSON && renderBody.toJSON() === w10NOOP) {
139
+ if (typeof renderBody === "function" && renderBody.toJSON === w10ToJSON) {
140
140
  flags |= FLAG_HAS_RENDER_BODY;
141
141
  renderBody = input.renderBody = undefined;
142
142
  }
@@ -3,6 +3,7 @@ var req = require("@internal/require");
3
3
  var getComponentForEl =
4
4
  require("@internal/components-util").___getComponentForEl;
5
5
 
6
+ // eslint-disable-next-line no-constant-binary-expression
6
7
  var complain = "MARKO_DEBUG" && require("complain");
7
8
 
8
9
  // expose legacy
@@ -1,3 +1,4 @@
1
+ // eslint-disable-next-line no-constant-binary-expression
1
2
  var complain = "MARKO_DEBUG" && require("complain");
2
3
  var setImmediate = require("@internal/set-immediate").___setImmediate;
3
4
  var warp10Finalize = require("warp10/finalize");
@@ -124,7 +125,7 @@ function getComponentClass(typeName, isLegacy) {
124
125
  .replace(/^[^a-z$_]/i, "_$&")
125
126
  .replace(/[^0-9a-z$_]+/gi, "_");
126
127
  className = className[0].toUpperCase() + className.slice(1);
127
- // eslint-disable-next-line no-unused-vars
128
+
128
129
  var OldComponentClass = ComponentClass;
129
130
  ComponentClass = {
130
131
  [className]: function (id, doc) {
@@ -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
 
@@ -470,8 +471,11 @@ function initServerRendered(renderedComponents, host) {
470
471
  indexServerComponentBoundaries(host, runtimeId);
471
472
  eventDelegation.___init(host);
472
473
 
473
- if (renderedComponents.g) {
474
- meta.___globals = renderedComponents.g;
474
+ if (!meta.___globals) {
475
+ meta.___globals = Object.assign({
476
+ runtimeId: runtimeId,
477
+ componentIdPrefix: prefix,
478
+ }, renderedComponents.g);
475
479
  }
476
480
 
477
481
  if (renderedComponents.t) {
@@ -153,7 +153,7 @@ if ("MARKO_DEBUG") {
153
153
 
154
154
  baseError.stack = baseError.stack.replace(/.*warnNodeRemoved.*\n/, "");
155
155
 
156
- // eslint-disable-next-line no-console
156
+
157
157
  console.warn(baseError);
158
158
  return error;
159
159
  };
@@ -2,7 +2,7 @@ var encoder = new TextEncoder();
2
2
  var noop = function () {};
3
3
 
4
4
  module.exports = function (data) {
5
- // eslint-disable-next-line no-undef
5
+
6
6
  var transformStream = new TransformStream();
7
7
  var writer = transformStream.writable.getWriter();
8
8
  var facade = {
@@ -3,6 +3,7 @@ load.e = exists;
3
3
  module.exports = load;
4
4
 
5
5
  function load(id) {
6
+ // eslint-disable-next-line no-undef
6
7
  return interopRequire(__webpack_require__(id));
7
8
  }
8
9
 
@@ -1,4 +1,5 @@
1
1
  var domInsert = require("./dom-insert");
2
+ // eslint-disable-next-line no-constant-binary-expression
2
3
  var complain = "MARKO_DEBUG" && require("complain");
3
4
 
4
5
  function getRootNode(el) {