marko 5.29.2 → 5.30.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (167) hide show
  1. package/README.md +1 -1
  2. package/bin/markoc.js +18 -18
  3. package/dist/core-tags/core/await/renderer.js +5 -1
  4. package/dist/node_modules/@internal/components-beginComponent/index.js +13 -3
  5. package/dist/node_modules/@internal/components-define-widget-legacy/index-browser.js +331 -0
  6. package/dist/node_modules/@internal/components-define-widget-legacy/index.js +18 -0
  7. package/dist/node_modules/@internal/components-define-widget-legacy/package.json +11 -0
  8. package/dist/node_modules/@internal/components-entry/index-browser.js +2 -2
  9. package/dist/node_modules/@internal/components-entry/index.js +73 -45
  10. package/dist/node_modules/@internal/components-entry-legacy/index-browser.js +74 -0
  11. package/dist/node_modules/@internal/components-entry-legacy/index.js +15 -0
  12. package/dist/node_modules/@internal/components-entry-legacy/package.json +11 -0
  13. package/dist/node_modules/@internal/components-registry/index-browser.js +70 -43
  14. package/dist/node_modules/@internal/components-registry/index.js +2 -2
  15. package/dist/node_modules/@internal/components-util/index-browser.js +17 -17
  16. package/dist/node_modules/@internal/components-util/index.js +18 -8
  17. package/dist/node_modules/@internal/create-readable/index-browser.js +1 -1
  18. package/dist/node_modules/@internal/create-readable/index.js +9 -9
  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 +3 -3
  23. package/dist/runtime/components/Component.js +146 -148
  24. package/dist/runtime/components/ComponentDef.js +41 -27
  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 +13 -13
  29. package/dist/runtime/components/State.js +27 -27
  30. package/dist/runtime/components/attach-detach.js +7 -7
  31. package/dist/runtime/components/defineComponent.js +5 -5
  32. package/dist/runtime/components/dom-data.js +6 -6
  33. package/dist/runtime/components/event-delegation.js +10 -10
  34. package/dist/runtime/components/legacy/browser.json +9 -0
  35. package/dist/runtime/components/legacy/defineComponent-legacy.js +32 -0
  36. package/dist/runtime/components/legacy/defineRenderer-legacy.js +171 -0
  37. package/dist/runtime/components/legacy/defineWidget-legacy.js +1 -0
  38. package/dist/runtime/components/legacy/dependencies/html.js +3 -0
  39. package/dist/runtime/components/legacy/dependencies/index.js +178 -0
  40. package/dist/runtime/components/legacy/dependencies/vdom.js +3 -0
  41. package/dist/runtime/components/legacy/index.js +1 -0
  42. package/dist/runtime/components/legacy/jquery.js +51 -0
  43. package/dist/runtime/components/legacy/ready.js +152 -0
  44. package/dist/runtime/components/legacy/renderer-legacy.js +230 -0
  45. package/dist/runtime/components/renderer.js +30 -26
  46. package/dist/runtime/components/update-manager.js +10 -10
  47. package/dist/runtime/createOut.js +1 -1
  48. package/dist/runtime/dom-insert.js +5 -5
  49. package/dist/runtime/helpers/_change-case.js +2 -2
  50. package/dist/runtime/helpers/dynamic-tag.js +7 -9
  51. package/dist/runtime/helpers/style-value.js +7 -2
  52. package/dist/runtime/html/AsyncStream.js +20 -20
  53. package/dist/runtime/html/BufferedWriter.js +2 -2
  54. package/dist/runtime/html/helpers/_dynamic-attr.js +2 -2
  55. package/dist/runtime/html/helpers/attr.js +19 -6
  56. package/dist/runtime/html/helpers/attrs.js +7 -0
  57. package/dist/runtime/html/helpers/data-marko.js +2 -2
  58. package/dist/runtime/html/helpers/escape-quotes.js +1 -1
  59. package/dist/runtime/html/helpers/escape-xml.js +1 -1
  60. package/dist/runtime/html/helpers/merge-attrs.js +38 -7
  61. package/dist/runtime/html/index.js +2 -2
  62. package/dist/runtime/renderable.js +9 -6
  63. package/dist/runtime/vdom/AsyncVDOMBuilder.js +86 -86
  64. package/dist/runtime/vdom/VComponent.js +3 -3
  65. package/dist/runtime/vdom/VDocumentFragment.js +7 -7
  66. package/dist/runtime/vdom/VElement.js +61 -50
  67. package/dist/runtime/vdom/VFragment.js +8 -8
  68. package/dist/runtime/vdom/VNode.js +36 -36
  69. package/dist/runtime/vdom/VText.js +8 -8
  70. package/dist/runtime/vdom/helpers/attrs.js +24 -4
  71. package/dist/runtime/vdom/helpers/merge-attrs.js +16 -0
  72. package/dist/runtime/vdom/helpers/v-element.js +1 -1
  73. package/dist/runtime/vdom/helpers/v-text.js +1 -1
  74. package/dist/runtime/vdom/hot-reload.js +19 -19
  75. package/dist/runtime/vdom/index.js +2 -2
  76. package/dist/runtime/vdom/morphdom/fragment.js +5 -5
  77. package/dist/runtime/vdom/morphdom/helpers.js +5 -5
  78. package/dist/runtime/vdom/morphdom/index.js +56 -56
  79. package/dist/runtime/vdom/morphdom/specialElHandlers.js +7 -7
  80. package/dist/runtime/vdom/preserve-attrs.js +1 -1
  81. package/dist/runtime/vdom/vdom.js +14 -14
  82. package/docs/10-awesome-marko-features.md +1 -1
  83. package/docs/body-content.md +3 -3
  84. package/docs/class-components.md +6 -6
  85. package/docs/cloudflare-workers.md +3 -3
  86. package/docs/compiler.md +5 -5
  87. package/docs/express.md +2 -2
  88. package/docs/http.md +1 -1
  89. package/docs/koa.md +1 -1
  90. package/docs/lasso.md +1 -1
  91. package/docs/marko-vs-react.md +2 -2
  92. package/docs/rendering.md +6 -6
  93. package/docs/rollup.md +30 -30
  94. package/docs/troubleshooting-streaming.md +1 -1
  95. package/docs/typescript.md +1 -1
  96. package/docs/vite.md +3 -3
  97. package/docs/webpack.md +25 -25
  98. package/docs/why-is-marko-fast.md +2 -2
  99. package/index.d.ts +1 -0
  100. package/legacy-components-browser.marko +15 -0
  101. package/legacy-components.js +7 -0
  102. package/package.json +51 -45
  103. package/src/compiler/config.js +1 -1
  104. package/src/compiler/index.js +5 -5
  105. package/src/core-tags/core/__flush_here_and_after__.js +1 -1
  106. package/src/core-tags/core/await/AsyncValue.js +1 -1
  107. package/src/core-tags/core/await/renderer.js +8 -4
  108. package/src/core-tags/core/await/reorderer-renderer.js +1 -1
  109. package/src/node-require/browser-refresh.js +2 -2
  110. package/src/node-require/index.js +2 -2
  111. package/src/node_modules/@internal/components-beginComponent/index.js +16 -6
  112. package/src/node_modules/@internal/components-define-widget-legacy/index-browser.js +331 -0
  113. package/src/node_modules/@internal/components-define-widget-legacy/index.js +18 -0
  114. package/src/node_modules/@internal/components-define-widget-legacy/package.json +11 -0
  115. package/src/node_modules/@internal/components-entry/index.js +65 -37
  116. package/src/node_modules/@internal/components-entry-legacy/index-browser.js +74 -0
  117. package/src/node_modules/@internal/components-entry-legacy/index.js +15 -0
  118. package/src/node_modules/@internal/components-entry-legacy/package.json +11 -0
  119. package/src/node_modules/@internal/components-registry/index-browser.js +33 -6
  120. package/src/node_modules/@internal/components-util/index.js +10 -0
  121. package/src/runtime/RenderResult.js +3 -3
  122. package/src/runtime/components/Component.js +16 -18
  123. package/src/runtime/components/ComponentDef.js +22 -8
  124. package/src/runtime/components/ComponentsContext.js +1 -1
  125. package/src/runtime/components/State.js +2 -2
  126. package/src/runtime/components/attach-detach.js +1 -1
  127. package/src/runtime/components/dom-data.js +1 -1
  128. package/src/runtime/components/legacy/browser.json +9 -0
  129. package/src/runtime/components/legacy/defineComponent-legacy.js +32 -0
  130. package/src/runtime/components/legacy/defineRenderer-legacy.js +171 -0
  131. package/src/runtime/components/legacy/defineWidget-legacy.js +1 -0
  132. package/src/runtime/components/legacy/dependencies/html.js +3 -0
  133. package/src/runtime/components/legacy/dependencies/index.js +178 -0
  134. package/src/runtime/components/legacy/dependencies/vdom.js +3 -0
  135. package/src/runtime/components/legacy/index.js +1 -0
  136. package/src/runtime/components/legacy/jquery.js +51 -0
  137. package/src/runtime/components/legacy/ready.js +152 -0
  138. package/src/runtime/components/legacy/renderer-legacy.js +230 -0
  139. package/src/runtime/components/renderer.js +4 -0
  140. package/src/runtime/components/update-manager.js +1 -1
  141. package/src/runtime/dom-insert.js +1 -1
  142. package/src/runtime/helpers/dynamic-tag.js +2 -4
  143. package/src/runtime/helpers/style-value.js +7 -2
  144. package/src/runtime/html/AsyncStream.js +5 -5
  145. package/src/runtime/html/BufferedWriter.js +1 -1
  146. package/src/runtime/html/StringWriter.js +1 -1
  147. package/src/runtime/html/helpers/attr.js +15 -2
  148. package/src/runtime/html/helpers/attrs.js +7 -0
  149. package/src/runtime/html/helpers/merge-attrs.js +38 -7
  150. package/src/runtime/html/hot-reload.js +1 -1
  151. package/src/runtime/html/index.js +2 -2
  152. package/src/runtime/renderable.js +5 -2
  153. package/src/runtime/vdom/AsyncVDOMBuilder.js +2 -2
  154. package/src/runtime/vdom/VComponent.js +1 -1
  155. package/src/runtime/vdom/VDocumentFragment.js +1 -1
  156. package/src/runtime/vdom/VElement.js +17 -6
  157. package/src/runtime/vdom/VFragment.js +1 -1
  158. package/src/runtime/vdom/VNode.js +1 -1
  159. package/src/runtime/vdom/VText.js +1 -1
  160. package/src/runtime/vdom/helpers/attrs.js +26 -6
  161. package/src/runtime/vdom/helpers/merge-attrs.js +16 -0
  162. package/src/runtime/vdom/hot-reload.js +1 -1
  163. package/src/runtime/vdom/index.js +2 -2
  164. package/src/runtime/vdom/morphdom/fragment.js +1 -1
  165. package/src/runtime/vdom/morphdom/specialElHandlers.js +1 -1
  166. package/src/taglib/index.js +1 -1
  167. package/tags-html.d.ts +9 -0
@@ -2,30 +2,30 @@
2
2
  var specialElHandlers = require("./specialElHandlers");
3
3
  var KeySequence = require("../../components/KeySequence");
4
4
  var componentsUtil = require("@internal/components-util");
5
- var existingComponentLookup = componentsUtil.T_;
6
- var destroyNodeRecursive = componentsUtil._A_;
5
+ var existingComponentLookup = componentsUtil._o_;
6
+ var destroyNodeRecursive = componentsUtil._U_;
7
7
  var addComponentRootToKeyedElements =
8
- componentsUtil.U_;
9
- var normalizeComponentKey = componentsUtil._D_;
10
- var VElement = require("../vdom").aZ_;
11
- var virtualizeElement = VElement.bL_;
12
- var morphAttrs = VElement.bM_;
8
+ componentsUtil._p_;
9
+ var normalizeComponentKey = componentsUtil._X_;
10
+ var VElement = require("../vdom").bs_;
11
+ var virtualizeElement = VElement.ce_;
12
+ var morphAttrs = VElement.cf_;
13
13
  var eventDelegation = require("../../components/event-delegation");
14
14
  var fragment = require("./fragment");
15
15
  var helpers = require("./helpers");
16
16
  var domData = require("../../components/dom-data");
17
- var keysByDOMNode = domData._s_;
18
- var componentByDOMNode = domData.W_;
19
- var vElementByDOMNode = domData._t_;
20
- var detachedByDOMNode = domData.aE_;
21
-
22
- var insertBefore = helpers.aJ_;
23
- var insertAfter = helpers.aK_;
24
- var nextSibling = helpers.bQ_;
25
- var firstChild = helpers.ai_;
26
- var removeChild = helpers.aL_;
27
- var createFragmentNode = fragment.S_;
28
- var beginFragmentNode = fragment.bW_;
17
+ var keysByDOMNode = domData._M_;
18
+ var componentByDOMNode = domData._r_;
19
+ var vElementByDOMNode = domData._N_;
20
+ var detachedByDOMNode = domData.aT_;
21
+
22
+ var insertBefore = helpers.bd_;
23
+ var insertAfter = helpers.be_;
24
+ var nextSibling = helpers.cj_;
25
+ var firstChild = helpers.ay_;
26
+ var removeChild = helpers.bf_;
27
+ var createFragmentNode = fragment._n_;
28
+ var beginFragmentNode = fragment.cp_;
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.bF_ === toEl.bF_;
46
+ return fromEl.bZ_ === toEl.bZ_;
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.aD_(node, componentsContext);
55
+ eventDelegation.aS_(node, componentsContext);
56
56
  }
57
57
  }
58
58
 
@@ -74,12 +74,12 @@ function morphdom(fromNode, toNode, host, componentsContext) {
74
74
  ownerComponent,
75
75
  parentComponent)
76
76
  {
77
- var realNode = vNode.bw_(host, parentEl.namespaceURI);
77
+ var realNode = vNode.bQ_(host, parentEl.namespaceURI);
78
78
  insertBefore(realNode, referenceEl, parentEl);
79
79
 
80
80
  if (
81
- vNode.bz_ === ELEMENT_NODE ||
82
- vNode.bz_ === FRAGMENT_NODE)
81
+ vNode.bT_ === ELEMENT_NODE ||
82
+ vNode.bT_ === FRAGMENT_NODE)
83
83
  {
84
84
  if (key) {
85
85
  keysByDOMNode.set(realNode, key);
@@ -88,7 +88,7 @@ function morphdom(fromNode, toNode, host, componentsContext) {
88
88
  realNode;
89
89
  }
90
90
 
91
- if (vNode.bF_ !== "textarea") {
91
+ if (vNode.bZ_ !== "textarea") {
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._m_ = insertBefore(
108
+ var rootNode = component._G_ = insertBefore(
109
109
  createFragmentNode(),
110
110
  referenceNode,
111
111
  referenceNodeParentEl);
@@ -127,7 +127,7 @@ function morphdom(fromNode, toNode, host, componentsContext) {
127
127
  }
128
128
 
129
129
  function morphComponent(component, vComponent) {
130
- morphChildren(component._m_, vComponent, 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.ai_;
151
+ var curToNodeChild = toNode.ay_;
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.bQ_;
166
- curToNodeType = curToNodeChild.bz_;
167
- curToNodeKey = curToNodeChild.by_;
165
+ toNextSibling = curToNodeChild.cj_;
166
+ curToNodeType = curToNodeChild.bT_;
167
+ curToNodeKey = curToNodeChild.bS_;
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._v_ || parentComponent;
174
+ var ownerComponent = curToNodeChild._P_ || 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 === true) {
184
184
  var rootNode = beginFragmentNode(curFromNodeChild, fromNode);
185
- component._m_ = rootNode;
185
+ component._G_ = rootNode;
186
186
  componentByDOMNode.set(rootNode, component);
187
187
 
188
188
  if (ownerComponent && curToNodeKey) {
@@ -215,7 +215,7 @@ function morphdom(fromNode, toNode, host, componentsContext) {
215
215
 
216
216
  }
217
217
  } else {
218
- if (matchingFromComponent._m_ !== curFromNodeChild) {
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._m_);
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._m_,
236
+ matchingFromComponent._G_,
237
237
  curFromNodeChild,
238
238
  fromNode);
239
239
 
@@ -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())).av_(
270
+ keySequences[referenceComponent.id] = new KeySequence())).aK_(
271
271
  curToNodeKey);
272
272
 
273
273
  if (curFromNodeChild) {
@@ -315,11 +315,11 @@ function morphdom(fromNode, toNode, host, componentsContext) {
315
315
  curToNodeChild.o_ ||
316
316
  caseInsensitiveCompare(
317
317
  curFromNodeChild.nodeName,
318
- curToNodeChild.bF_ || "")))
318
+ curToNodeChild.bZ_ || "")))
319
319
 
320
320
  {
321
321
  curVFromNodeChild = virtualizeElement(curFromNodeChild);
322
- curVFromNodeChild.bF_ = curToNodeChild.bF_;
322
+ curVFromNodeChild.bZ_ = curToNodeChild.bZ_;
323
323
  keysByDOMNode.set(curFromNodeChild, curToNodeKey);
324
324
  referenceComponent.l_[curToNodeKey] =
325
325
  curFromNodeChild;
@@ -339,7 +339,7 @@ function morphdom(fromNode, toNode, host, componentsContext) {
339
339
  curFromNodeChild = fromNextSibling;
340
340
  continue;
341
341
  } else if (
342
- curToNodeChild.bz_ === FRAGMENT_NODE &&
342
+ curToNodeChild.bT_ === FRAGMENT_NODE &&
343
343
  curFromNodeChild.nodeType === COMMENT_NODE)
344
344
  {
345
345
  var content = curFromNodeChild.nodeValue;
@@ -419,7 +419,7 @@ function morphdom(fromNode, toNode, host, componentsContext) {
419
419
 
420
420
  if (
421
421
  toNextSibling &&
422
- toNextSibling.by_ === curFromNodeKey)
422
+ toNextSibling.bS_ === curFromNodeKey)
423
423
  {
424
424
  // Single element swap
425
425
 
@@ -524,18 +524,18 @@ function morphdom(fromNode, toNode, host, componentsContext) {
524
524
 
525
525
  if (
526
526
  caseInsensitiveCompare(
527
- curVFromNodeChild.bF_,
528
- curToNodeChild.bF_))
527
+ curVFromNodeChild.bZ_,
528
+ curToNodeChild.bZ_))
529
529
 
530
530
  {
531
- curVFromNodeChild.bF_ = curToNodeChild.bF_;
531
+ curVFromNodeChild.bZ_ = curToNodeChild.bZ_;
532
532
  }
533
533
  } else {
534
534
  // Skip over nodes that don't look like ours...
535
535
  curFromNodeChild = fromNextSibling;
536
536
  continue;
537
537
  }
538
- } else if (curFromNodeKey = curVFromNodeChild.by_) {
538
+ } else if (curFromNodeKey = curVFromNodeChild.bS_) {
539
539
  // We have a keyed element here but our target VDOM node
540
540
  // is not keyed so this not doesn't belong
541
541
  isCompatible = false;
@@ -569,14 +569,14 @@ function morphdom(fromNode, toNode, host, componentsContext) {
569
569
  isHydrate === true &&
570
570
  toNextSibling &&
571
571
  curFromNodeType === TEXT_NODE &&
572
- toNextSibling.bz_ === TEXT_NODE)
572
+ toNextSibling.bT_ === TEXT_NODE)
573
573
  {
574
574
  fromNextSibling = curFromNodeChild.splitText(
575
- curToNodeChild.bS_.length);
575
+ curToNodeChild.cl_.length);
576
576
 
577
577
  }
578
- if (curFromNodeChild.nodeValue !== curToNodeChild.bS_) {
579
- curFromNodeChild.nodeValue = curToNodeChild.bS_;
578
+ if (curFromNodeChild.nodeValue !== curToNodeChild.cl_) {
579
+ curFromNodeChild.nodeValue = curToNodeChild.cl_;
580
580
  }
581
581
  }
582
582
  }
@@ -610,10 +610,10 @@ function morphdom(fromNode, toNode, host, componentsContext) {
610
610
  }
611
611
 
612
612
  // We have processed all of the "to nodes".
613
- if (fromNode.bV_) {
613
+ if (fromNode.co_) {
614
614
  // If we are in an unfinished fragment, we have reached the end of the nodes
615
615
  // we were matching up and need to end the fragment
616
- fromNode.bV_(curFromNodeChild);
616
+ fromNode.co_(curFromNodeChild);
617
617
  } else {
618
618
  // If curFromNodeChild is non-null then we still have some from nodes
619
619
  // left over that need to be removed
@@ -642,7 +642,7 @@ function morphdom(fromNode, toNode, host, componentsContext) {
642
642
  referenceComponent = parentComponent;
643
643
  } else {
644
644
  referenceComponent =
645
- curVFromNodeChild && curVFromNodeChild._v_;
645
+ curVFromNodeChild && curVFromNodeChild._P_;
646
646
  }
647
647
 
648
648
  detachNode(curFromNodeChild, fromNode, referenceComponent);
@@ -653,10 +653,10 @@ function morphdom(fromNode, toNode, host, componentsContext) {
653
653
  }
654
654
 
655
655
  function morphEl(fromEl, vFromEl, toEl, parentComponent) {
656
- var nodeName = toEl.bF_;
656
+ var nodeName = toEl.bZ_;
657
657
 
658
- var constId = toEl.bH_;
659
- if (constId !== undefined && vFromEl.bH_ === constId) {
658
+ var constId = toEl.ca_;
659
+ if (constId !== undefined && vFromEl.ca_ === constId) {
660
660
  return;
661
661
  }
662
662
 
@@ -698,7 +698,7 @@ function morphdom(fromNode, toNode, host, componentsContext) {
698
698
  detachedFromComponent !== true && detachedFromComponent);
699
699
 
700
700
 
701
- if (eventDelegation._T_(node) != false) {
701
+ if (eventDelegation.al_(node) != false) {
702
702
  removeChild(node);
703
703
  }
704
704
  }
@@ -10,16 +10,16 @@
10
10
  }
11
11
 
12
12
  function forEachOption(el, fn, i) {
13
- var curChild = el.ai_;
13
+ var curChild = el.ay_;
14
14
 
15
15
  while (curChild) {
16
- if (curChild.bF_ === "option") {
16
+ if (curChild.bZ_ === "option") {
17
17
  fn(curChild, ++i);
18
18
  } else {
19
19
  i = forEachOption(curChild, fn, i);
20
20
  }
21
21
 
22
- curChild = curChild.bQ_;
22
+ curChild = curChild.cj_;
23
23
  }
24
24
 
25
25
  return i;
@@ -52,13 +52,13 @@ SpecialElHandlers.prototype = {
52
52
  fromEl.value = toEl.q_;
53
53
  }
54
54
 
55
- if (fromEl.hasAttribute("value") && !toEl.bJ_("value")) {
55
+ if (fromEl.hasAttribute("value") && !toEl.cc_("value")) {
56
56
  fromEl.removeAttribute("value");
57
57
  }
58
58
  },
59
59
 
60
60
  textarea: function (fromEl, toEl) {
61
- if (toEl.bT_) {
61
+ if (toEl.cm_) {
62
62
  return;
63
63
  }
64
64
 
@@ -84,12 +84,12 @@ SpecialElHandlers.prototype = {
84
84
  }
85
85
  },
86
86
  select: function (fromEl, toEl) {
87
- if (!toEl.bJ_("multiple")) {
87
+ if (!toEl.cc_("multiple")) {
88
88
  var selected = 0;
89
89
  forEachOption(
90
90
  toEl,
91
91
  function (option, i) {
92
- if (option.bJ_("selected")) {
92
+ if (option.cc_("selected")) {
93
93
  selected = i;
94
94
  }
95
95
  },
@@ -12,4 +12,4 @@ function removePreservedAttributes(attrs, props) {
12
12
  return attrs;
13
13
  }
14
14
 
15
- require("./VElement").bK_ = removePreservedAttributes;
15
+ require("./VElement").cd_ = removePreservedAttributes;
@@ -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.bp_(virtualize(curChild, ownerComponent));
14
+ vdomParent.bJ_(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.bL_(node, virtualizeChildNodes, ownerComponent);
22
+ return VElement.ce_(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.bp_(virtualize(curChild, ownerComponent));
41
+ vdomFragment.bJ_(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.bp_(vdomNode || new VText(value.toString()));
69
- return this.bI_();
68
+ this.bJ_(vdomNode || new VText(value.toString()));
69
+ return this.cb_();
70
70
  };
71
71
 
72
- Node_prototype.bu_ = function () {
73
- return this.bp_(new VDocumentFragment());
72
+ Node_prototype.bO_ = function () {
73
+ return this.bJ_(new VDocumentFragment());
74
74
  };
75
75
 
76
- exports.b__ = VDocumentFragment;
77
- exports.aZ_ = VElement;
78
- exports.ba_ = VText;
79
- exports.bb_ = VComponent;
80
- exports.bc_ = VFragment;
81
- exports.bL_ = virtualize;
82
- exports.bd_ = virtualizeHTML;
76
+ exports.bt_ = VDocumentFragment;
77
+ exports.bs_ = VElement;
78
+ exports.bu_ = VText;
79
+ exports.bv_ = VComponent;
80
+ exports.bw_ = VFragment;
81
+ exports.ce_ = virtualize;
82
+ exports.bx_ = virtualizeHTML;
@@ -259,7 +259,7 @@ http
259
259
  {
260
260
  name: "Frank",
261
261
  count: 30,
262
- colors: ["red", "green", "blue"]
262
+ colors: ["red", "green", "blue"],
263
263
  },
264
264
  res
265
265
  );
@@ -171,12 +171,12 @@ _Example Data:_
171
171
  [
172
172
  {
173
173
  name: "Patrick",
174
- age: 63
174
+ age: 63,
175
175
  },
176
176
  {
177
177
  name: "Austin",
178
- age: 12
179
- }
178
+ age: 12,
179
+ },
180
180
  ];
181
181
  ```
182
182
 
@@ -110,7 +110,7 @@ In your `component.js` file, export the component’s class:
110
110
  export default class {
111
111
  onCreate() {
112
112
  this.state = {
113
- count: 0
113
+ count: 0,
114
114
  };
115
115
  }
116
116
  increment() {
@@ -144,12 +144,12 @@ If you target browsers that does not support classes, a plain object of methods
144
144
  export default {
145
145
  onCreate: function () {
146
146
  this.state = {
147
- count: 0
147
+ count: 0,
148
148
  };
149
149
  },
150
150
  increment: function () {
151
151
  this.state.count++;
152
- }
152
+ },
153
153
  };
154
154
  ```
155
155
 
@@ -217,7 +217,7 @@ class {
217
217
  export default {
218
218
  shout() {
219
219
  alert(`My favorite number is ${this.number}!`);
220
- }
220
+ },
221
221
  };
222
222
  ```
223
223
 
@@ -616,7 +616,7 @@ Destroys the component by unsubscribing from all listeners made using the `subsc
616
616
  ```js
617
617
  component.destroy({
618
618
  removeNode: false, // true by default
619
- recursive: false // true by default
619
+ recursive: false, // true by default
620
620
  });
621
621
  ```
622
622
 
@@ -738,7 +738,7 @@ Changes the value of multiple state properties:
738
738
  ```js
739
739
  this.setState({
740
740
  disabled: true,
741
- size: "large"
741
+ size: "large",
742
742
  });
743
743
  ```
744
744
 
@@ -12,7 +12,7 @@ After that point, imported `.marko` files will export a `.stream` method that re
12
12
  ```js
13
13
  import Template from "./index.marko";
14
14
 
15
- addEventListener("fetch", event => {
15
+ addEventListener("fetch", (event) => {
16
16
  event.respondWith(handleRequest(event.request));
17
17
  });
18
18
 
@@ -20,8 +20,8 @@ async function handleRequest(request) {
20
20
  return new Response(Template.stream(), {
21
21
  headers: {
22
22
  status: 200,
23
- headers: { "content-type": "text/html;charset=UTF-8" }
24
- }
23
+ headers: { "content-type": "text/html;charset=UTF-8" },
24
+ },
25
25
  });
26
26
  }
27
27
  ```
package/docs/compiler.md CHANGED
@@ -46,10 +46,10 @@ compiler.compileFileSync(filename: string, options?: CompileOptions): CompileRes
46
46
  import * as compiler from "@marko/compiler";
47
47
 
48
48
  const asyncResult = await compiler.compileFile("./src/index.marko", {
49
- modules: "cjs"
49
+ modules: "cjs",
50
50
  });
51
51
  const syncResult = compiler.compileFileSync("./src/index.marko", {
52
- modules: "cjs"
52
+ modules: "cjs",
53
53
  });
54
54
  ```
55
55
 
@@ -73,7 +73,7 @@ const asyncResult = await compiler.compile(
73
73
  { modules: "cjs" }
74
74
  );
75
75
  const syncResult = compiler.compileSync("<h1>Hello!</>", "./src/index.marko", {
76
- modules: "cjs"
76
+ modules: "cjs",
77
77
  });
78
78
  ```
79
79
 
@@ -92,10 +92,10 @@ Or you can pass options objects when calling compile functions. Each property wi
92
92
  import * as compiler from "@marko/compiler";
93
93
  compiler.configure({
94
94
  output: "dom",
95
- sourceMaps: true
95
+ sourceMaps: true,
96
96
  });
97
97
  const result = compiler.compileFileSync("./example.marko", {
98
- output: "html"
98
+ output: "html",
99
99
  });
100
100
  ```
101
101
 
package/docs/express.md CHANGED
@@ -43,7 +43,7 @@ app.get("/", function (req, res) {
43
43
  res.marko(template, {
44
44
  name: "Frank",
45
45
  count: 30,
46
- colors: ["red", "green", "blue"]
46
+ colors: ["red", "green", "blue"],
47
47
  });
48
48
  });
49
49
 
@@ -56,7 +56,7 @@ app.listen(8080);
56
56
  > app.get("/", function (req, res) {
57
57
  > res.marko(template, {
58
58
  > params: req.params,
59
- > submitted: req.method === "POST" && req.body
59
+ > submitted: req.method === "POST" && req.body,
60
60
  > });
61
61
  > });
62
62
  > ```
package/docs/http.md CHANGED
@@ -17,7 +17,7 @@ server.on("request", (req, res) => {
17
17
  {
18
18
  name: "Frank",
19
19
  count: 30,
20
- colors: ["red", "green", "blue"]
20
+ colors: ["red", "green", "blue"],
21
21
  },
22
22
  res
23
23
  );
package/docs/koa.md CHANGED
@@ -22,7 +22,7 @@ app.use((ctx, next) => {
22
22
  ctx.body = Template.stream({
23
23
  name: "Frank",
24
24
  count: 30,
25
- colors: ["red", "green", "blue"]
25
+ colors: ["red", "green", "blue"],
26
26
  });
27
27
  });
28
28
 
package/docs/lasso.md CHANGED
@@ -131,7 +131,7 @@ template.render(data, (err, output) => {
131
131
  });
132
132
  res.json({
133
133
  renderedComponentsList,
134
- html
134
+ html,
135
135
  });
136
136
  ```
137
137
 
@@ -454,11 +454,11 @@ template:
454
454
  function renderColors(colors) {
455
455
  return (
456
456
  <ul>
457
- {colors.map(color => (
457
+ {colors.map((color) => (
458
458
  <li
459
459
  className="color"
460
460
  style={{
461
- backgroundColor: color
461
+ backgroundColor: color,
462
462
  }}
463
463
  >
464
464
  {color}
package/docs/rendering.md CHANGED
@@ -70,7 +70,7 @@ The `render` method returns an async `out` which is used to generate HTML on the
70
70
  import View from "./view.marko";
71
71
  var resultPromise = View.render({});
72
72
 
73
- resultPromise.then(result => {
73
+ resultPromise.then((result) => {
74
74
  result.appendTo(document.body);
75
75
  });
76
76
  ```
@@ -216,8 +216,8 @@ Global values persist across renders.
216
216
  ```js
217
217
  View.render({
218
218
  $global: {
219
- flags: ["mobile"]
220
- }
219
+ flags: ["mobile"],
220
+ },
221
221
  });
222
222
  ```
223
223
 
@@ -254,9 +254,9 @@ app.get("/", (req, res) => {
254
254
 
255
255
  serializedGlobals: {
256
256
  isIos: true, // Tell Marko to serialize `isIos`
257
- isAndroid: true // Tell Marko to serialize `isAndroid`
258
- }
259
- }
257
+ isAndroid: true, // Tell Marko to serialize `isAndroid`
258
+ },
259
+ },
260
260
  },
261
261
  res
262
262
  );