marko 5.36.5 → 5.37.0

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 (244) hide show
  1. package/dist/compiler/index.js +11 -11
  2. package/dist/core-tags/components/init-components-tag.js +4 -4
  3. package/dist/core-tags/components/preferred-script-location-tag.js +2 -2
  4. package/dist/core-tags/core/__flush_here_and_after__.js +1 -1
  5. package/dist/core-tags/core/await/AsyncValue.js +21 -21
  6. package/dist/core-tags/core/await/renderer.js +24 -24
  7. package/dist/core-tags/core/await/reorderer-renderer.js +6 -6
  8. package/dist/node-require/browser-refresh.js +18 -1
  9. package/dist/node-require/index.js +7 -7
  10. package/dist/node_modules/@internal/components-beginComponent/index-browser.js +5 -5
  11. package/dist/node_modules/@internal/components-beginComponent/index.js +12 -12
  12. package/dist/node_modules/@internal/components-define-widget-legacy/index-browser.js +99 -99
  13. package/dist/node_modules/@internal/components-define-widget-legacy/index.js +3 -3
  14. package/dist/node_modules/@internal/components-endComponent/index.js +3 -3
  15. package/dist/node_modules/@internal/components-entry/index-browser.js +2 -2
  16. package/dist/node_modules/@internal/components-entry/index.js +29 -29
  17. package/dist/node_modules/@internal/components-entry-legacy/index-browser.js +13 -13
  18. package/dist/node_modules/@internal/components-entry-legacy/index.js +1 -1
  19. package/dist/node_modules/@internal/components-registry/index-browser.js +102 -102
  20. package/dist/node_modules/@internal/components-registry/index.js +2 -2
  21. package/dist/node_modules/@internal/components-util/index-browser.js +20 -20
  22. package/dist/node_modules/@internal/components-util/index.js +24 -20
  23. package/dist/node_modules/@internal/create-readable/index-browser.js +1 -1
  24. package/dist/node_modules/@internal/create-readable/index.js +9 -9
  25. package/dist/node_modules/@internal/preserve-tag/index-browser.js +8 -8
  26. package/dist/node_modules/@internal/preserve-tag/index.js +6 -6
  27. package/dist/node_modules/@internal/set-immediate/index-browser.js +2 -2
  28. package/dist/node_modules/@internal/set-immediate/index-worker.js +3 -3
  29. package/dist/node_modules/@internal/set-immediate/index.js +3 -3
  30. package/dist/runtime/RenderResult.js +24 -24
  31. package/dist/runtime/components/Component.js +163 -163
  32. package/dist/runtime/components/ComponentDef.js +34 -34
  33. package/dist/runtime/components/ComponentsContext.js +20 -20
  34. package/dist/runtime/components/GlobalComponentsContext.js +4 -4
  35. package/dist/runtime/components/KeySequence.js +3 -3
  36. package/dist/runtime/components/ServerComponent.js +17 -17
  37. package/dist/runtime/components/State.js +28 -28
  38. package/dist/runtime/components/attach-detach.js +8 -8
  39. package/dist/runtime/components/defineComponent.js +5 -5
  40. package/dist/runtime/components/dom-data.js +6 -6
  41. package/dist/runtime/components/event-delegation.js +10 -10
  42. package/dist/runtime/components/legacy/defineComponent-legacy.js +1 -1
  43. package/dist/runtime/components/legacy/defineRenderer-legacy.js +25 -25
  44. package/dist/runtime/components/legacy/dependencies/index.js +10 -10
  45. package/dist/runtime/components/legacy/renderer-legacy.js +56 -56
  46. package/dist/runtime/components/renderer.js +45 -45
  47. package/dist/runtime/components/update-manager.js +4 -4
  48. package/dist/runtime/createOut.js +1 -1
  49. package/dist/runtime/dom-insert.js +5 -5
  50. package/dist/runtime/helpers/_change-case.js +2 -2
  51. package/dist/runtime/helpers/dynamic-tag.js +33 -33
  52. package/dist/runtime/helpers/render-tag.js +1 -1
  53. package/dist/runtime/helpers/serialize-noop.js +2 -2
  54. package/dist/runtime/helpers/style-value.js +1 -1
  55. package/dist/runtime/helpers/tags-compat/runtime-dom.js +35 -35
  56. package/dist/runtime/helpers/tags-compat/runtime-html.js +16 -16
  57. package/dist/runtime/html/AsyncStream.js +28 -28
  58. package/dist/runtime/html/BufferedWriter.js +2 -2
  59. package/dist/runtime/html/StringWriter.js +2 -2
  60. package/dist/runtime/html/helpers/_dynamic-attr.js +2 -2
  61. package/dist/runtime/html/helpers/attr.js +11 -11
  62. package/dist/runtime/html/helpers/attrs.js +6 -6
  63. package/dist/runtime/html/helpers/data-marko.js +6 -6
  64. package/dist/runtime/html/helpers/escape-quotes.js +2 -2
  65. package/dist/runtime/html/helpers/escape-xml.js +1 -1
  66. package/dist/runtime/html/helpers/merge-attrs.js +11 -11
  67. package/dist/runtime/html/helpers/props-script.js +1 -1
  68. package/dist/runtime/html/index.js +2 -2
  69. package/dist/runtime/renderable.js +5 -5
  70. package/dist/runtime/vdom/AsyncVDOMBuilder.js +100 -100
  71. package/dist/runtime/vdom/VComment.js +7 -7
  72. package/dist/runtime/vdom/VComponent.js +5 -5
  73. package/dist/runtime/vdom/VDocumentFragment.js +8 -8
  74. package/dist/runtime/vdom/VElement.js +52 -52
  75. package/dist/runtime/vdom/VFragment.js +9 -9
  76. package/dist/runtime/vdom/VNode.js +34 -34
  77. package/dist/runtime/vdom/VText.js +8 -8
  78. package/dist/runtime/vdom/helpers/attrs.js +6 -6
  79. package/dist/runtime/vdom/helpers/const-element.js +3 -3
  80. package/dist/runtime/vdom/hot-reload.js +20 -20
  81. package/dist/runtime/vdom/index.js +2 -2
  82. package/dist/runtime/vdom/morphdom/fragment.js +10 -10
  83. package/dist/runtime/vdom/morphdom/helpers.js +5 -5
  84. package/dist/runtime/vdom/morphdom/index.js +81 -81
  85. package/dist/runtime/vdom/vdom.js +15 -15
  86. package/dist/taglib/index.js +7 -7
  87. package/dist/translator/cdata/index.js +15 -0
  88. package/dist/translator/cdata/index[html].js +15 -0
  89. package/dist/translator/cdata/index[vdom].js +12 -0
  90. package/dist/translator/class.js +65 -0
  91. package/dist/translator/comment/index.js +15 -0
  92. package/dist/translator/comment/index[html].js +17 -0
  93. package/dist/translator/comment/index[vdom].js +3 -0
  94. package/dist/translator/declaration/index.js +15 -0
  95. package/dist/translator/declaration/index[html].js +12 -0
  96. package/dist/translator/declaration/index[vdom].js +3 -0
  97. package/dist/translator/document-type/index.js +15 -0
  98. package/dist/translator/document-type/index[html].js +12 -0
  99. package/dist/translator/document-type/index[vdom].js +3 -0
  100. package/dist/translator/index.js +551 -0
  101. package/dist/translator/placeholder/index.js +15 -0
  102. package/dist/translator/placeholder/index[html].js +93 -0
  103. package/dist/translator/placeholder/index[vdom].js +22 -0
  104. package/dist/translator/scriptlet.js +4 -0
  105. package/dist/translator/tag/attribute/directives/class.js +42 -0
  106. package/dist/translator/tag/attribute/directives/index.js +15 -0
  107. package/dist/translator/tag/attribute/directives/no-update-body-if.js +15 -0
  108. package/dist/translator/tag/attribute/directives/no-update-body.js +10 -0
  109. package/dist/translator/tag/attribute/directives/no-update-if.js +12 -0
  110. package/dist/translator/tag/attribute/directives/no-update.js +48 -0
  111. package/dist/translator/tag/attribute/directives/style.js +42 -0
  112. package/dist/translator/tag/attribute/index.js +150 -0
  113. package/dist/translator/tag/attribute/modifiers/index.js +7 -0
  114. package/dist/translator/tag/attribute/modifiers/no-update.js +14 -0
  115. package/dist/translator/tag/attribute/modifiers/scoped.js +23 -0
  116. package/dist/translator/tag/attribute-tag.js +149 -0
  117. package/dist/translator/tag/custom-tag.js +146 -0
  118. package/dist/translator/tag/dynamic-tag.js +74 -0
  119. package/dist/translator/tag/index.js +287 -0
  120. package/dist/translator/tag/macro-tag.js +7 -0
  121. package/dist/translator/tag/native-tag.js +27 -0
  122. package/dist/translator/tag/native-tag[html]/attributes.js +151 -0
  123. package/dist/translator/tag/native-tag[html]/index.js +221 -0
  124. package/dist/translator/tag/native-tag[vdom]/attributes.js +105 -0
  125. package/dist/translator/tag/native-tag[vdom]/index.js +189 -0
  126. package/dist/translator/tag/util.js +246 -0
  127. package/dist/translator/taglib/core/conditional/translate-else-if.js +20 -0
  128. package/dist/translator/taglib/core/conditional/translate-else.js +20 -0
  129. package/dist/translator/taglib/core/conditional/translate-if.js +8 -0
  130. package/dist/translator/taglib/core/conditional/util.js +41 -0
  131. package/dist/translator/taglib/core/index.js +474 -0
  132. package/dist/translator/taglib/core/macro/parse.js +17 -0
  133. package/dist/translator/taglib/core/macro/translate.js +48 -0
  134. package/dist/translator/taglib/core/parse-class.js +79 -0
  135. package/dist/translator/taglib/core/parse-export.js +14 -0
  136. package/dist/translator/taglib/core/parse-import.js +14 -0
  137. package/dist/translator/taglib/core/parse-module-code.js +18 -0
  138. package/dist/translator/taglib/core/parse-static.js +18 -0
  139. package/dist/translator/taglib/core/transform-style.js +66 -0
  140. package/dist/translator/taglib/core/translate-await.js +41 -0
  141. package/dist/translator/taglib/core/translate-body.js +17 -0
  142. package/dist/translator/taglib/core/translate-for.js +156 -0
  143. package/dist/translator/taglib/core/translate-html-comment.js +52 -0
  144. package/dist/translator/taglib/core/translate-include-content.js +53 -0
  145. package/dist/translator/taglib/core/translate-server-only.js +5 -0
  146. package/dist/translator/taglib/core/translate-while.js +32 -0
  147. package/dist/translator/taglib/index.js +6 -0
  148. package/dist/translator/taglib/migrate/all-templates.js +46 -0
  149. package/dist/translator/taglib/migrate/index.js +5 -0
  150. package/dist/translator/text/index.js +10 -0
  151. package/dist/translator/text/index[html].js +12 -0
  152. package/dist/translator/text/index[vdom].js +20 -0
  153. package/dist/translator/util/add-dependencies.js +329 -0
  154. package/dist/translator/util/escape-regexp.js +4 -0
  155. package/dist/translator/util/get-component-files.js +86 -0
  156. package/dist/translator/util/html-out-write.js +15 -0
  157. package/dist/translator/util/key-manager.js +176 -0
  158. package/dist/translator/util/optimize-html-writes.js +52 -0
  159. package/dist/translator/util/optimize-vdom-create.js +164 -0
  160. package/dist/translator/util/plugin-hooks.js +22 -0
  161. package/dist/translator/util/runtime-flags.js +3 -0
  162. package/dist/translator/util/vdom-out-write.js +10 -0
  163. package/dist/translator/util/with-previous-location.js +6 -0
  164. package/package.json +7 -4
  165. package/src/taglib/index.js +2 -2
  166. package/src/translator/cdata/index.js +15 -0
  167. package/src/translator/cdata/index[html].js +15 -0
  168. package/src/translator/cdata/index[vdom].js +12 -0
  169. package/src/translator/class.js +65 -0
  170. package/src/translator/comment/index.js +15 -0
  171. package/src/translator/comment/index[html].js +17 -0
  172. package/src/translator/comment/index[vdom].js +3 -0
  173. package/src/translator/declaration/index.js +15 -0
  174. package/src/translator/declaration/index[html].js +12 -0
  175. package/src/translator/declaration/index[vdom].js +3 -0
  176. package/src/translator/document-type/index.js +15 -0
  177. package/src/translator/document-type/index[html].js +12 -0
  178. package/src/translator/document-type/index[vdom].js +3 -0
  179. package/src/translator/index.js +551 -0
  180. package/src/translator/placeholder/index.js +15 -0
  181. package/src/translator/placeholder/index[html].js +93 -0
  182. package/src/translator/placeholder/index[vdom].js +22 -0
  183. package/src/translator/scriptlet.js +4 -0
  184. package/src/translator/tag/attribute/directives/class.js +42 -0
  185. package/src/translator/tag/attribute/directives/index.js +15 -0
  186. package/src/translator/tag/attribute/directives/no-update-body-if.js +15 -0
  187. package/src/translator/tag/attribute/directives/no-update-body.js +10 -0
  188. package/src/translator/tag/attribute/directives/no-update-if.js +12 -0
  189. package/src/translator/tag/attribute/directives/no-update.js +48 -0
  190. package/src/translator/tag/attribute/directives/style.js +42 -0
  191. package/src/translator/tag/attribute/index.js +150 -0
  192. package/src/translator/tag/attribute/modifiers/index.js +7 -0
  193. package/src/translator/tag/attribute/modifiers/no-update.js +14 -0
  194. package/src/translator/tag/attribute/modifiers/scoped.js +23 -0
  195. package/src/translator/tag/attribute-tag.js +149 -0
  196. package/src/translator/tag/custom-tag.js +146 -0
  197. package/src/translator/tag/dynamic-tag.js +74 -0
  198. package/src/translator/tag/index.js +287 -0
  199. package/src/translator/tag/macro-tag.js +7 -0
  200. package/src/translator/tag/native-tag.js +27 -0
  201. package/src/translator/tag/native-tag[html]/attributes.js +151 -0
  202. package/src/translator/tag/native-tag[html]/index.js +221 -0
  203. package/src/translator/tag/native-tag[vdom]/attributes.js +105 -0
  204. package/src/translator/tag/native-tag[vdom]/index.js +189 -0
  205. package/src/translator/tag/util.js +246 -0
  206. package/src/translator/taglib/core/conditional/translate-else-if.js +20 -0
  207. package/src/translator/taglib/core/conditional/translate-else.js +20 -0
  208. package/src/translator/taglib/core/conditional/translate-if.js +8 -0
  209. package/src/translator/taglib/core/conditional/util.js +41 -0
  210. package/src/translator/taglib/core/index.js +474 -0
  211. package/src/translator/taglib/core/macro/parse.js +17 -0
  212. package/src/translator/taglib/core/macro/translate.js +48 -0
  213. package/src/translator/taglib/core/parse-class.js +79 -0
  214. package/src/translator/taglib/core/parse-export.js +14 -0
  215. package/src/translator/taglib/core/parse-import.js +14 -0
  216. package/src/translator/taglib/core/parse-module-code.js +18 -0
  217. package/src/translator/taglib/core/parse-static.js +18 -0
  218. package/src/translator/taglib/core/transform-style.js +66 -0
  219. package/src/translator/taglib/core/translate-await.js +41 -0
  220. package/src/translator/taglib/core/translate-body.js +17 -0
  221. package/src/translator/taglib/core/translate-for.js +156 -0
  222. package/src/translator/taglib/core/translate-html-comment.js +52 -0
  223. package/src/translator/taglib/core/translate-include-content.js +53 -0
  224. package/src/translator/taglib/core/translate-server-only.js +5 -0
  225. package/src/translator/taglib/core/translate-while.js +32 -0
  226. package/src/translator/taglib/index.js +7 -0
  227. package/src/translator/taglib/migrate/all-templates.js +46 -0
  228. package/src/translator/taglib/migrate/index.js +5 -0
  229. package/src/translator/text/index.js +10 -0
  230. package/src/translator/text/index[html].js +12 -0
  231. package/src/translator/text/index[vdom].js +20 -0
  232. package/src/translator/util/add-dependencies.js +329 -0
  233. package/src/translator/util/escape-regexp.js +4 -0
  234. package/src/translator/util/get-component-files.js +86 -0
  235. package/src/translator/util/html-out-write.js +15 -0
  236. package/src/translator/util/key-manager.js +176 -0
  237. package/src/translator/util/optimize-html-writes.js +52 -0
  238. package/src/translator/util/optimize-vdom-create.js +164 -0
  239. package/src/translator/util/plugin-hooks.js +22 -0
  240. package/src/translator/util/runtime-flags.js +3 -0
  241. package/src/translator/util/vdom-out-write.js +10 -0
  242. package/src/translator/util/with-previous-location.js +6 -0
  243. package/translator/index.d.ts +7 -0
  244. package/translator/package.json +5 -0
@@ -1,12 +1,12 @@
1
1
  "use strict";
2
2
  // eslint-disable-next-line no-constant-binary-expression
3
-
3
+ var complain = "MARKO_DEBUG" && require("complain");
4
4
  var extend = require("raptor-util/extend");
5
5
  var componentUtil = require("@internal/components-util");
6
- var w10NOOP = require("../helpers/serialize-noop").aK_;
7
- var attachBubblingEvent = componentUtil._U_;
6
+ var w10NOOP = require("../helpers/serialize-noop").___noop;
7
+ var attachBubblingEvent = componentUtil.___attachBubblingEvent;
8
8
  var addDelegatedEventHandler =
9
- require("./event-delegation")._t_;
9
+ require("./event-delegation").___addDelegatedEventHandler;
10
10
  var KeySequence = require("./KeySequence");
11
11
  var EMPTY_OBJECT = {};
12
12
 
@@ -21,26 +21,26 @@ var FLAG_OLD_HYDRATE_NO_CREATE = 8;
21
21
  * later (after the rendered HTML has been added to the DOM)
22
22
  */
23
23
  function ComponentDef(component, componentId, componentsContext) {
24
- this.aL_ = componentsContext; // The AsyncWriter that this component is associated with
25
- this.t_ = component;
24
+ this.___componentsContext = componentsContext; // The AsyncWriter that this component is associated with
25
+ this.___component = component;
26
26
  this.id = componentId;
27
27
 
28
- this._d_ = undefined; // An array of DOM events that need to be added (in sets of three)
28
+ this.___domEvents = undefined; // An array of DOM events that need to be added (in sets of three)
29
29
 
30
- this._v_ = false;
30
+ this.___isExisting = false;
31
31
 
32
- this.u_ = false;
33
- this.v_ = 0;
32
+ this.___renderBoundary = false;
33
+ this.___flags = 0;
34
34
 
35
- this.aM_ = 0; // The unique integer to use for the next scoped ID
36
- this.aN_ = null;
35
+ this.___nextIdIndex = 0; // The unique integer to use for the next scoped ID
36
+ this.___keySequence = null;
37
37
  }
38
38
 
39
39
  ComponentDef.prototype = {
40
- aO_: function (key) {
40
+ ___nextKey: function (key) {
41
41
  return (
42
- this.aN_ || (this.aN_ = new KeySequence())).aO_(
43
- key);
42
+ this.___keySequence || (this.___keySequence = new KeySequence())).
43
+ ___nextKey(key);
44
44
  },
45
45
 
46
46
  /**
@@ -55,9 +55,9 @@ ComponentDef.prototype = {
55
55
  } else {
56
56
  if (typeof nestedId !== "string") {
57
57
  // eslint-disable-next-line no-constant-condition
58
-
59
-
60
-
58
+ if ("MARKO_DEBUG") {
59
+ complain("Using non strings as keys is deprecated.");
60
+ }
61
61
 
62
62
  nestedId = String(nestedId);
63
63
  }
@@ -73,8 +73,8 @@ ComponentDef.prototype = {
73
73
  /**
74
74
  * Returns the next auto generated unique ID for a nested DOM element or nested DOM component
75
75
  */
76
- aP_: function () {
77
- return this.id + "-c" + this.aM_++;
76
+ ___nextComponentId: function () {
77
+ return this.id + "-c" + this.___nextIdIndex++;
78
78
  },
79
79
 
80
80
  d: function (eventName, handlerMethodName, isOnce, extraArgs) {
@@ -82,14 +82,14 @@ ComponentDef.prototype = {
82
82
  return attachBubblingEvent(this, handlerMethodName, isOnce, extraArgs);
83
83
  },
84
84
 
85
- get _r_() {
86
- return this.t_._r_;
85
+ get ___type() {
86
+ return this.___component.___type;
87
87
  }
88
88
  };
89
89
 
90
- ComponentDef.prototype.nk = ComponentDef.prototype.aO_;
90
+ ComponentDef.prototype.nk = ComponentDef.prototype.___nextKey;
91
91
 
92
- ComponentDef._E_ = function (o, types, global, registry) {
92
+ ComponentDef.___deserialize = function (o, types, global, registry) {
93
93
  var id = o[0];
94
94
  var typeName = types[o[1]];
95
95
  var input = o[2] || null;
@@ -103,16 +103,16 @@ ComponentDef._E_ = function (o, types, global, registry) {
103
103
 
104
104
  var component =
105
105
  typeName /* legacy */ &&
106
- registry._H_(typeName, id, isLegacy);
106
+ registry.___createComponent(typeName, id, isLegacy);
107
107
 
108
108
  // Prevent newly created component from being queued for update since we area
109
109
  // just building it from the server info
110
- component._c_ = true;
111
- component.al_ = global;
110
+ component.___updateQueued = true;
111
+ component.___global = global;
112
112
 
113
113
  if (isLegacy) {
114
114
  component.widgetConfig = componentProps;
115
- component.___ = renderBody;
115
+ component.___widgetBody = renderBody;
116
116
  } else if (renderBody) {
117
117
  (input || (input = {})).renderBody = renderBody;
118
118
  }
@@ -146,23 +146,23 @@ ComponentDef._E_ = function (o, types, global, registry) {
146
146
  }
147
147
  }
148
148
 
149
- component.P_ = input;
149
+ component.___input = input;
150
150
 
151
151
  if (extra.b) {
152
- component.Z_ = extra.b;
152
+ component.___bubblingDomEvents = extra.b;
153
153
  }
154
154
 
155
155
  var scope = extra.p;
156
156
  var customEvents = extra.e;
157
157
  if (customEvents) {
158
- component.aE_(customEvents, scope);
158
+ component.___setCustomEvents(customEvents, scope);
159
159
  }
160
160
 
161
161
  return {
162
162
  id: id,
163
- t_: component,
164
- _d_: extra.d,
165
- v_: extra.f || 0
163
+ ___component: component,
164
+ ___domEvents: extra.d,
165
+ ___flags: extra.f || 0
166
166
  };
167
167
  };
168
168
 
@@ -6,54 +6,54 @@ function ComponentsContext(out, parentComponentsContext) {
6
6
  var componentDef;
7
7
 
8
8
  if (parentComponentsContext) {
9
- globalComponentsContext = parentComponentsContext.q_;
10
- componentDef = parentComponentsContext.p_;
9
+ globalComponentsContext = parentComponentsContext.___globalContext;
10
+ componentDef = parentComponentsContext.___componentDef;
11
11
 
12
12
  var nestedContextsForParent;
13
13
  if (
14
- !(nestedContextsForParent = parentComponentsContext._e_))
14
+ !(nestedContextsForParent = parentComponentsContext.___nestedContexts))
15
15
  {
16
- nestedContextsForParent = parentComponentsContext._e_ = [];
16
+ nestedContextsForParent = parentComponentsContext.___nestedContexts = [];
17
17
  }
18
18
 
19
19
  nestedContextsForParent.push(this);
20
20
  } else {
21
- globalComponentsContext = out.global.b_;
21
+ globalComponentsContext = out.global.___components;
22
22
  if (globalComponentsContext === undefined) {
23
- out.global.b_ = globalComponentsContext =
23
+ out.global.___components = globalComponentsContext =
24
24
  new GlobalComponentsContext(out);
25
25
  }
26
26
  }
27
27
 
28
- this.q_ = globalComponentsContext;
29
- this.b_ = [];
30
- this.s_ = out;
31
- this.p_ = componentDef;
32
- this._e_ = undefined;
33
- this.w_ =
34
- parentComponentsContext && parentComponentsContext.w_;
28
+ this.___globalContext = globalComponentsContext;
29
+ this.___components = [];
30
+ this.___out = out;
31
+ this.___componentDef = componentDef;
32
+ this.___nestedContexts = undefined;
33
+ this.___isPreserved =
34
+ parentComponentsContext && parentComponentsContext.___isPreserved;
35
35
  }
36
36
 
37
37
  ComponentsContext.prototype = {
38
- ag_: function (host) {
39
- var componentDefs = this.b_;
38
+ ___initComponents: function (host) {
39
+ var componentDefs = this.___components;
40
40
 
41
- ComponentsContext._J_(componentDefs, host);
41
+ ComponentsContext.___initClientRendered(componentDefs, host);
42
42
 
43
- this.s_.emit("aQ_");
43
+ this.___out.emit("___componentsInitialized");
44
44
 
45
45
  // Reset things stored in global since global is retained for
46
46
  // future renders
47
- this.s_.global.b_ = undefined;
47
+ this.___out.global.___components = undefined;
48
48
 
49
49
  return componentDefs;
50
50
  }
51
51
  };
52
52
 
53
53
  function getComponentsContext(out) {
54
- return out.b_ || (out.b_ = new ComponentsContext(out));
54
+ return out.___components || (out.___components = new ComponentsContext(out));
55
55
  }
56
56
 
57
57
  module.exports = exports = ComponentsContext;
58
58
 
59
- exports.T_ = getComponentsContext;
59
+ exports.___getComponentsContext = getComponentsContext;
@@ -1,10 +1,10 @@
1
1
  "use strict";var nextComponentIdProvider =
2
- require("@internal/components-util")._T_;
2
+ require("@internal/components-util").___nextComponentIdProvider;
3
3
 
4
4
  function GlobalComponentsContext(out) {
5
- this.r_ = {};
6
- this.aA_ = undefined;
7
- this.aP_ = nextComponentIdProvider(out);
5
+ this.___renderedComponentsById = {};
6
+ this.___rerenderComponent = undefined;
7
+ this.___nextComponentId = nextComponentIdProvider(out);
8
8
  }
9
9
 
10
10
  module.exports = GlobalComponentsContext;
@@ -1,9 +1,9 @@
1
1
  "use strict";function KeySequence() {
2
- this.aR_ = Object.create(null);
2
+ this.___lookup = Object.create(null);
3
3
  }
4
4
 
5
- KeySequence.prototype.aO_ = function (key) {
6
- var lookup = this.aR_;
5
+ KeySequence.prototype.___nextKey = function (key) {
6
+ var lookup = this.___lookup;
7
7
 
8
8
  if (lookup[key]) {
9
9
  return key + "_" + lookup[key]++;
@@ -1,42 +1,42 @@
1
1
  "use strict";
2
2
  // eslint-disable-next-line no-constant-binary-expression
3
-
3
+ var complain = "MARKO_DEBUG" && require("complain");
4
4
 
5
5
  class ServerComponent {
6
6
  constructor(id, input, out, typeName, customEvents, scope) {
7
7
  this.id = id;
8
- this.X_ = customEvents;
9
- this.Y_ = scope;
8
+ this.___customEvents = customEvents;
9
+ this.___scope = scope;
10
10
  this.typeName = typeName;
11
- this.Z_ = undefined; // Used to keep track of bubbling DOM events for components rendered on the server
12
- this._a_ = 0;
11
+ this.___bubblingDomEvents = undefined; // Used to keep track of bubbling DOM events for components rendered on the server
12
+ this.___bubblingDomEventsExtraArgsCount = 0;
13
13
 
14
14
  this.onCreate(input, out);
15
- this._b_ = this.onInput(input, out) || input;
16
- if (this.P_ === undefined) {
17
- this.P_ = this._b_;
15
+ this.___updatedInput = this.onInput(input, out) || input;
16
+ if (this.___input === undefined) {
17
+ this.___input = this.___updatedInput;
18
18
  }
19
19
  this.onRender(out);
20
20
  }
21
21
 
22
22
  set input(newInput) {
23
- this.P_ = newInput;
23
+ this.___input = newInput;
24
24
  }
25
25
 
26
26
  get input() {
27
- return this.P_;
27
+ return this.___input;
28
28
  }
29
29
 
30
30
  set state(newState) {
31
- this.A_ = newState;
31
+ this.___state = newState;
32
32
  }
33
33
 
34
34
  get state() {
35
- return this.A_;
35
+ return this.___state;
36
36
  }
37
37
 
38
- get aD_() {
39
- return this.A_;
38
+ get ___rawState() {
39
+ return this.___state;
40
40
  }
41
41
 
42
42
  elId(nestedId) {
@@ -47,9 +47,9 @@ class ServerComponent {
47
47
  } else {
48
48
  if (typeof nestedId !== "string") {
49
49
  // eslint-disable-next-line no-constant-condition
50
-
51
-
52
-
50
+ if ("MARKO_DEBUG") {
51
+ complain("Using non strings as keys is deprecated.");
52
+ }
53
53
 
54
54
  nestedId = String(nestedId);
55
55
  }
@@ -5,42 +5,42 @@ function ensure(state, propertyName) {
5
5
  if (!(propertyName in proto)) {
6
6
  Object.defineProperty(proto, propertyName, {
7
7
  get: function () {
8
- return this.B_[propertyName];
8
+ return this.___raw[propertyName];
9
9
  },
10
10
  set: function (value) {
11
- this.as_(propertyName, value, false /* ensure:false */);
11
+ this.___set(propertyName, value, false /* ensure:false */);
12
12
  }
13
13
  });
14
14
  }
15
15
  }
16
16
 
17
17
  function State(component) {
18
- this.t_ = component;
19
- this.B_ = {};
18
+ this.___component = component;
19
+ this.___raw = {};
20
20
 
21
- this.am_ = false;
22
- this.ax_ = null;
23
- this.aw_ = null;
24
- this.aS_ = null; // An object that we use to keep tracking of state properties that were forced to be dirty
21
+ this.___dirty = false;
22
+ this.___old = null;
23
+ this.___changes = null;
24
+ this.___forced = null; // An object that we use to keep tracking of state properties that were forced to be dirty
25
25
 
26
26
  Object.seal(this);
27
27
  }
28
28
 
29
29
  State.prototype = {
30
- _u_: function () {
31
- this.am_ = false;
32
- this.ax_ = null;
33
- this.aw_ = null;
34
- this.aS_ = null;
30
+ ___reset: function () {
31
+ this.___dirty = false;
32
+ this.___old = null;
33
+ this.___changes = null;
34
+ this.___forced = null;
35
35
  },
36
36
 
37
- aq_: function (newState) {
37
+ ___replace: function (newState) {
38
38
  var key;
39
- var rawState = this.B_;
39
+ var rawState = this.___raw;
40
40
 
41
41
  for (key in rawState) {
42
42
  if (!(key in newState)) {
43
- this.as_(
43
+ this.___set(
44
44
  key,
45
45
  undefined,
46
46
  false /* ensure:false */,
@@ -50,7 +50,7 @@ State.prototype = {
50
50
  }
51
51
 
52
52
  for (key in newState) {
53
- this.as_(
53
+ this.___set(
54
54
  key,
55
55
  newState[key],
56
56
  true /* ensure:true */,
@@ -58,32 +58,32 @@ State.prototype = {
58
58
  );
59
59
  }
60
60
  },
61
- as_: function (name, value, shouldEnsure, forceDirty) {
62
- var rawState = this.B_;
61
+ ___set: function (name, value, shouldEnsure, forceDirty) {
62
+ var rawState = this.___raw;
63
63
 
64
64
  if (shouldEnsure) {
65
65
  ensure(this, name);
66
66
  }
67
67
 
68
68
  if (forceDirty) {
69
- var forcedDirtyState = this.aS_ || (this.aS_ = {});
69
+ var forcedDirtyState = this.___forced || (this.___forced = {});
70
70
  forcedDirtyState[name] = true;
71
71
  } else if (rawState[name] === value) {
72
72
  return;
73
73
  }
74
74
 
75
- if (!this.am_) {
75
+ if (!this.___dirty) {
76
76
  // This is the first time we are modifying the component state
77
77
  // so introduce some properties to do some tracking of
78
78
  // changes to the state
79
- this.am_ = true; // Mark the component state as dirty (i.e. modified)
80
- this.ax_ = rawState;
81
- this.B_ = rawState = extend({}, rawState);
82
- this.aw_ = {};
83
- this.t_.ar_();
79
+ this.___dirty = true; // Mark the component state as dirty (i.e. modified)
80
+ this.___old = rawState;
81
+ this.___raw = rawState = extend({}, rawState);
82
+ this.___changes = {};
83
+ this.___component.___queueUpdate();
84
84
  }
85
85
 
86
- this.aw_[name] = value;
86
+ this.___changes[name] = value;
87
87
 
88
88
  if (value === undefined) {
89
89
  // Don't store state properties with an undefined or null value
@@ -94,7 +94,7 @@ State.prototype = {
94
94
  }
95
95
  },
96
96
  toJSON: function () {
97
- return this.B_;
97
+ return this.___raw;
98
98
  }
99
99
  };
100
100
 
@@ -1,6 +1,6 @@
1
1
  "use strict";var eventDelegation = require("./event-delegation");
2
- var delegateEvent = eventDelegation.aT_;
3
- var getEventFromEl = eventDelegation.aU_;
2
+ var delegateEvent = eventDelegation.___delegateEvent;
3
+ var getEventFromEl = eventDelegation.___getEventFromEl;
4
4
 
5
5
  // var componentsUtil = require('@internal/components-util');
6
6
  // var destroyNodeRecursive = componentsUtil.___destroyNodeRecursive;
@@ -11,13 +11,13 @@ function handleNodeAttach(node, componentsContext) {
11
11
  var eventName = "onattach";
12
12
  var target = getEventFromEl(node, eventName);
13
13
  if (target) {
14
- var out = componentsContext.s_;
14
+ var out = componentsContext.___out;
15
15
  var data = out.data;
16
16
 
17
- var attachTargets = data.aV_;
17
+ var attachTargets = data.___attachTargets;
18
18
  if (!attachTargets) {
19
- attachTargets = data.aV_ = [];
20
- out.on("aQ_", function () {
19
+ attachTargets = data.___attachTargets = [];
20
+ out.on("___componentsInitialized", function () {
21
21
  for (var i = 0; i < attachTargets.length; i += 2) {
22
22
  var node = attachTargets[i];
23
23
  var target = attachTargets[i + 1];
@@ -56,5 +56,5 @@ function handleNodeDetach(node) {
56
56
  }
57
57
  }
58
58
 
59
- eventDelegation.aW_ = handleNodeAttach;
60
- eventDelegation.ao_ = handleNodeDetach;
59
+ eventDelegation.___handleNodeAttach = handleNodeAttach;
60
+ eventDelegation.___handleNodeDetach = handleNodeDetach;
@@ -5,7 +5,7 @@ var BaseComponent = require("./Component");
5
5
  var BaseState = require("./State");
6
6
 
7
7
  module.exports = function defineComponent(def, renderer) {
8
- if (def.y_) {
8
+ if (def.___isComponent) {
9
9
  return def;
10
10
  }
11
11
 
@@ -34,7 +34,7 @@ module.exports = function defineComponent(def, renderer) {
34
34
  BaseComponent.call(this, id);
35
35
  }
36
36
 
37
- if (!proto.y_) {
37
+ if (!proto.___isComponent) {
38
38
  // Inherit from Component if they didn't already
39
39
  inherit(ComponentClass, BaseComponent);
40
40
  }
@@ -47,14 +47,14 @@ module.exports = function defineComponent(def, renderer) {
47
47
 
48
48
  // Set a flag on the constructor function to make it clear this is
49
49
  // a component so that we can short-circuit this work later
50
- Component.y_ = true;
50
+ Component.___isComponent = true;
51
51
 
52
52
  function State(component) {
53
53
  BaseState.call(this, component);
54
54
  }
55
55
  inherit(State, BaseState);
56
- proto.Q_ = State;
57
- proto.R_ = renderer;
56
+ proto.___State = State;
57
+ proto.___renderer = renderer;
58
58
 
59
59
  return Component;
60
60
  };
@@ -1,8 +1,8 @@
1
1
  "use strict";module.exports = {
2
- _M_: new WeakMap(),
3
- _L_: new WeakMap(),
4
- _q_: new WeakMap(),
5
- aX_: new WeakMap(),
6
- _o_: new WeakMap(),
7
- _p_: {}
2
+ ___vPropsByDOMNode: new WeakMap(),
3
+ ___vElementByDOMNode: new WeakMap(),
4
+ ___componentByDOMNode: new WeakMap(),
5
+ ___detachedByDOMNode: new WeakMap(),
6
+ ___keyByDOMNode: new WeakMap(),
7
+ ___ssrKeyedElementsByComponentId: {}
8
8
  };
@@ -1,7 +1,7 @@
1
1
  "use strict";var componentsUtil = require("@internal/components-util");
2
- var runtimeId = componentsUtil._Q_;
3
- var componentLookup = componentsUtil._m_;
4
- var getMarkoPropsFromEl = componentsUtil._s_;
2
+ var runtimeId = componentsUtil.___runtimeId;
3
+ var componentLookup = componentsUtil.___componentLookup;
4
+ var getMarkoPropsFromEl = componentsUtil.___getMarkoPropsFromEl;
5
5
 
6
6
  var TEXT_NODE = 3;
7
7
 
@@ -54,7 +54,7 @@ function delegateEvent(node, eventName, target, event) {
54
54
 
55
55
  if (extraArgs != null) {
56
56
  if (typeof extraArgs === "number") {
57
- extraArgs = targetComponent.Z_[extraArgs];
57
+ extraArgs = targetComponent.___bubblingDomEvents[extraArgs];
58
58
  }
59
59
  }
60
60
 
@@ -132,12 +132,12 @@ function addDelegatedEventHandlerToHost(eventType, host) {
132
132
 
133
133
  function noop() {}
134
134
 
135
- exports.aW_ = noop;
136
- exports.ao_ = noop;
137
- exports.aT_ = delegateEvent;
138
- exports.aU_ = getEventFromEl;
139
- exports._t_ = addDelegatedEventHandler;
140
- exports._B_ = function (host) {
135
+ exports.___handleNodeAttach = noop;
136
+ exports.___handleNodeDetach = noop;
137
+ exports.___delegateEvent = delegateEvent;
138
+ exports.___getEventFromEl = getEventFromEl;
139
+ exports.___addDelegatedEventHandler = addDelegatedEventHandler;
140
+ exports.___init = function (host) {
141
141
  Object.keys(delegatedEvents).forEach(function (eventType) {
142
142
  addDelegatedEventHandlerToHost(eventType, host);
143
143
  });
@@ -8,7 +8,7 @@ var defineRenderer;
8
8
  var defineWidget;
9
9
 
10
10
  module.exports = function defineComponent(def) {
11
- if (def.y_) {
11
+ if (def.___isComponent) {
12
12
  return def;
13
13
  }
14
14