marko 5.29.2 → 5.30.0

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
@@ -1,11 +1,11 @@
1
1
  "use strict";var EventEmitter = require("events-light");
2
2
  var vdom = require("./vdom");
3
- var VElement = vdom.aZ_;
4
- var VDocumentFragment = vdom.b__;
5
- var VText = vdom.ba_;
6
- var VComponent = vdom.bb_;
7
- var VFragment = vdom.bc_;
8
- var virtualizeHTML = vdom.bd_;
3
+ var VElement = vdom.bs_;
4
+ var VDocumentFragment = vdom.bt_;
5
+ var VText = vdom.bu_;
6
+ var VComponent = vdom.bv_;
7
+ var VFragment = vdom.bw_;
8
+ var virtualizeHTML = vdom.bx_;
9
9
  var RenderResult = require("../RenderResult");
10
10
  var morphdom = require("./morphdom");
11
11
  var attrsHelper = require("./helpers/attrs");
@@ -14,9 +14,9 @@ var EVENT_UPDATE = "update";
14
14
  var EVENT_FINISH = "finish";
15
15
 
16
16
  function State(tree) {
17
- this.be_ = new EventEmitter();
18
- this.bf_ = tree;
19
- this.bg_ = false;
17
+ this.by_ = new EventEmitter();
18
+ this.bz_ = tree;
19
+ this.bA_ = false;
20
20
  }
21
21
 
22
22
  function AsyncVDOMBuilder(globalData, parentNode, parentOut) {
@@ -27,48 +27,48 @@ function AsyncVDOMBuilder(globalData, parentNode, parentOut) {
27
27
  var state;
28
28
 
29
29
  if (parentOut) {
30
- state = parentOut.J_;
30
+ state = parentOut.G_;
31
31
  } else {
32
32
  state = new State(parentNode);
33
33
  }
34
34
 
35
- this.bh_ = 1;
36
- this.bi_ = 0;
37
- this.bj_ = null;
38
- this.bk_ = parentOut;
35
+ this.bB_ = 1;
36
+ this.bC_ = 0;
37
+ this.bD_ = null;
38
+ this.bE_ = parentOut;
39
39
 
40
40
  this.data = {};
41
- this.J_ = state;
41
+ this.G_ = state;
42
42
  this.m_ = parentNode;
43
43
  this.global = globalData || {};
44
- this.bl_ = [parentNode];
45
- this.bm_ = false;
46
- this.bn_ = undefined;
44
+ this.bF_ = [parentNode];
45
+ this.bG_ = false;
46
+ this.bH_ = undefined;
47
47
  this.b_ = null;
48
48
 
49
49
  this.h_ = null;
50
50
  this.j_ = null;
51
- this.aF_ = null;
51
+ this.b__ = null;
52
52
  }
53
53
 
54
54
  var proto = AsyncVDOMBuilder.prototype = {
55
- aT_: true,
56
- _b_: typeof document === "object" && document,
55
+ bn_: true,
56
+ I_: typeof document === "object" && document,
57
57
 
58
58
  bc: function (component, key, ownerComponent) {
59
59
  var vComponent = new VComponent(component, key, ownerComponent);
60
- return this.bo_(vComponent, 0, true);
60
+ return this.bI_(vComponent, 0, true);
61
61
  },
62
62
 
63
- aG_: function (component, key, ownerComponent) {
63
+ ba_: function (component, key, ownerComponent) {
64
64
  var vComponent = new VComponent(component, key, ownerComponent, true);
65
- this.bo_(vComponent, 0);
65
+ this.bI_(vComponent, 0);
66
66
  },
67
67
 
68
- bo_: function (child, childCount, pushToStack) {
69
- this.m_.bp_(child);
68
+ bI_: function (child, childCount, pushToStack) {
69
+ this.m_.bJ_(child);
70
70
  if (pushToStack === true) {
71
- this.bl_.push(child);
71
+ this.bF_.push(child);
72
72
  this.m_ = child;
73
73
  }
74
74
  return childCount === 0 ? this : child;
@@ -84,10 +84,10 @@ var proto = AsyncVDOMBuilder.prototype = {
84
84
  flags,
85
85
  props);
86
86
 
87
- return this.bo_(element, childCount);
87
+ return this.bI_(element, childCount);
88
88
  },
89
89
 
90
- aQ_: function (tagName, attrs, key, componentDef, props) {
90
+ bk_: function (tagName, attrs, key, componentDef, props) {
91
91
  return this.element(
92
92
  tagName,
93
93
  attrsHelper(attrs),
@@ -102,15 +102,15 @@ var proto = AsyncVDOMBuilder.prototype = {
102
102
  n: function (node, component) {
103
103
  // NOTE: We do a shallow clone since we assume the node is being reused
104
104
  // and a node can only have one parent node.
105
- var clone = node.bq_();
105
+ var clone = node.bK_();
106
106
  this.node(clone);
107
- clone._v_ = component;
107
+ clone._P_ = component;
108
108
 
109
109
  return this;
110
110
  },
111
111
 
112
112
  node: function (node) {
113
- this.m_.bp_(node);
113
+ this.m_.bJ_(node);
114
114
  return this;
115
115
  },
116
116
 
@@ -129,7 +129,7 @@ var proto = AsyncVDOMBuilder.prototype = {
129
129
  text = text.toString();
130
130
  }
131
131
 
132
- this.m_.bp_(new VText(text, ownerComponent));
132
+ this.m_.bJ_(new VText(text, ownerComponent));
133
133
  return this;
134
134
  },
135
135
 
@@ -160,11 +160,11 @@ var proto = AsyncVDOMBuilder.prototype = {
160
160
  flags,
161
161
  props);
162
162
 
163
- this.bo_(element, childCount, true);
163
+ this.bI_(element, childCount, true);
164
164
  return this;
165
165
  },
166
166
 
167
- aO_: function (tagName, attrs, key, componentDef, props) {
167
+ bi_: function (tagName, attrs, key, componentDef, props) {
168
168
  return this.beginElement(
169
169
  tagName,
170
170
  attrsHelper(attrs),
@@ -178,7 +178,7 @@ var proto = AsyncVDOMBuilder.prototype = {
178
178
 
179
179
  bf: function (key, component, preserve) {
180
180
  var fragment = new VFragment(key, component, preserve);
181
- this.bo_(fragment, null, true);
181
+ this.bI_(fragment, null, true);
182
182
  return this;
183
183
  },
184
184
 
@@ -187,7 +187,7 @@ var proto = AsyncVDOMBuilder.prototype = {
187
187
  },
188
188
 
189
189
  endElement: function () {
190
- var stack = this.bl_;
190
+ var stack = this.bF_;
191
191
  stack.pop();
192
192
  this.m_ = stack[stack.length - 1];
193
193
  },
@@ -195,44 +195,44 @@ var proto = AsyncVDOMBuilder.prototype = {
195
195
  end: function () {
196
196
  this.m_ = undefined;
197
197
 
198
- var remaining = --this.bh_;
199
- var parentOut = this.bk_;
198
+ var remaining = --this.bB_;
199
+ var parentOut = this.bE_;
200
200
 
201
201
  if (remaining === 0) {
202
202
  if (parentOut) {
203
- parentOut.br_();
203
+ parentOut.bL_();
204
204
  } else {
205
- this.bs_();
205
+ this.bM_();
206
206
  }
207
- } else if (remaining - this.bi_ === 0) {
208
- this.bt_();
207
+ } else if (remaining - this.bC_ === 0) {
208
+ this.bN_();
209
209
  }
210
210
 
211
211
  return this;
212
212
  },
213
213
 
214
- br_: function () {
215
- var remaining = --this.bh_;
214
+ bL_: function () {
215
+ var remaining = --this.bB_;
216
216
 
217
217
  if (remaining === 0) {
218
- var parentOut = this.bk_;
218
+ var parentOut = this.bE_;
219
219
  if (parentOut) {
220
- parentOut.br_();
220
+ parentOut.bL_();
221
221
  } else {
222
- this.bs_();
222
+ this.bM_();
223
223
  }
224
- } else if (remaining - this.bi_ === 0) {
225
- this.bt_();
224
+ } else if (remaining - this.bC_ === 0) {
225
+ this.bN_();
226
226
  }
227
227
  },
228
228
 
229
- bs_: function () {
230
- var state = this.J_;
231
- state.bg_ = true;
232
- state.be_.emit(EVENT_FINISH, this.aU_());
229
+ bM_: function () {
230
+ var state = this.G_;
231
+ state.bA_ = true;
232
+ state.by_.emit(EVENT_FINISH, this.bo_());
233
233
  },
234
234
 
235
- bt_: function () {
235
+ bN_: function () {
236
236
  var lastArray = this._last;
237
237
 
238
238
  var i = 0;
@@ -267,26 +267,26 @@ var proto = AsyncVDOMBuilder.prototype = {
267
267
  },
268
268
 
269
269
  beginAsync: function (options) {
270
- if (this.bm_) {
270
+ if (this.bG_) {
271
271
  throw Error(
272
272
  "Tried to render async while in sync mode. Note: Client side await is not currently supported in re-renders (Issue: #942).");
273
273
 
274
274
  }
275
275
 
276
- var state = this.J_;
276
+ var state = this.G_;
277
277
 
278
278
  if (options) {
279
279
  if (options.last) {
280
- this.bi_++;
280
+ this.bC_++;
281
281
  }
282
282
  }
283
283
 
284
- this.bh_++;
284
+ this.bB_++;
285
285
 
286
- var documentFragment = this.m_.bu_();
286
+ var documentFragment = this.m_.bO_();
287
287
  var asyncOut = new AsyncVDOMBuilder(this.global, documentFragment, this);
288
288
 
289
- state.be_.emit("beginAsync", {
289
+ state.by_.emit("beginAsync", {
290
290
  out: asyncOut,
291
291
  parentOut: this
292
292
  });
@@ -299,51 +299,51 @@ var proto = AsyncVDOMBuilder.prototype = {
299
299
  },
300
300
 
301
301
  flush: function () {
302
- var events = this.J_.be_;
302
+ var events = this.G_.by_;
303
303
 
304
304
  if (events.listenerCount(EVENT_UPDATE)) {
305
305
  events.emit(EVENT_UPDATE, new RenderResult(this));
306
306
  }
307
307
  },
308
308
 
309
- _M_: function () {
310
- return this.J_.bf_;
309
+ af_: function () {
310
+ return this.G_.bz_;
311
311
  },
312
312
 
313
- aU_: function () {
314
- return this.bv_ || (this.bv_ = new RenderResult(this));
313
+ bo_: function () {
314
+ return this.bP_ || (this.bP_ = new RenderResult(this));
315
315
  },
316
316
 
317
317
  on: function (event, callback) {
318
- var state = this.J_;
318
+ var state = this.G_;
319
319
 
320
- if (event === EVENT_FINISH && state.bg_) {
321
- callback(this.aU_());
320
+ if (event === EVENT_FINISH && state.bA_) {
321
+ callback(this.bo_());
322
322
  } else if (event === "last") {
323
323
  this.onLast(callback);
324
324
  } else {
325
- state.be_.on(event, callback);
325
+ state.by_.on(event, callback);
326
326
  }
327
327
 
328
328
  return this;
329
329
  },
330
330
 
331
331
  once: function (event, callback) {
332
- var state = this.J_;
332
+ var state = this.G_;
333
333
 
334
- if (event === EVENT_FINISH && state.bg_) {
335
- callback(this.aU_());
334
+ if (event === EVENT_FINISH && state.bA_) {
335
+ callback(this.bo_());
336
336
  } else if (event === "last") {
337
337
  this.onLast(callback);
338
338
  } else {
339
- state.be_.once(event, callback);
339
+ state.by_.once(event, callback);
340
340
  }
341
341
 
342
342
  return this;
343
343
  },
344
344
 
345
345
  emit: function (type, arg) {
346
- var events = this.J_.be_;
346
+ var events = this.G_.by_;
347
347
  switch (arguments.length) {
348
348
  case 1:
349
349
  events.emit(type);
@@ -359,17 +359,17 @@ var proto = AsyncVDOMBuilder.prototype = {
359
359
  },
360
360
 
361
361
  removeListener: function () {
362
- var events = this.J_.be_;
362
+ var events = this.G_.by_;
363
363
  events.removeListener.apply(events, arguments);
364
364
  return this;
365
365
  },
366
366
 
367
367
  sync: function () {
368
- this.bm_ = true;
368
+ this.bG_ = true;
369
369
  },
370
370
 
371
371
  isSync: function () {
372
- return this.bm_;
372
+ return this.bG_;
373
373
  },
374
374
 
375
375
  onLast: function (callback) {
@@ -384,20 +384,20 @@ var proto = AsyncVDOMBuilder.prototype = {
384
384
  return this;
385
385
  },
386
386
 
387
- _L_: function (host) {
388
- var node = this.bn_;
387
+ ae_: function (host) {
388
+ var node = this.bH_;
389
389
  if (!node) {
390
- var vdomTree = this._M_();
390
+ var vdomTree = this.af_();
391
391
 
392
- if (!host) host = this._b_;
393
- this.bn_ = node = vdomTree.bw_(host, null);
392
+ if (!host) host = this.I_;
393
+ this.bH_ = node = vdomTree.bQ_(host, null);
394
394
  morphdom(node, vdomTree, host, this.b_);
395
395
  }
396
396
  return node;
397
397
  },
398
398
 
399
399
  toString: function (host) {
400
- var docFragment = this._L_(host);
400
+ var docFragment = this.ae_(host);
401
401
  var html = "";
402
402
 
403
403
  var child = docFragment.firstChild;
@@ -437,13 +437,13 @@ var proto = AsyncVDOMBuilder.prototype = {
437
437
  c: function (componentDef, key, customEvents) {
438
438
  this.h_ = componentDef;
439
439
  this.j_ = key;
440
- this.aF_ = customEvents;
440
+ this.b__ = customEvents;
441
441
  }
442
442
  };
443
443
 
444
444
  proto.e = proto.element;
445
445
  proto.be = proto.beginElement;
446
- proto.ee = proto.aP_ = proto.endElement;
446
+ proto.ee = proto.bj_ = proto.endElement;
447
447
  proto.t = proto.text;
448
448
  proto.h = proto.w = proto.write = proto.html;
449
449
 
@@ -2,14 +2,14 @@
2
2
  var inherit = require("raptor-util/inherit");
3
3
 
4
4
  function VComponent(component, key, ownerComponent, preserve) {
5
- this.bx_(null /* childCount */, ownerComponent);
6
- this.by_ = key;
5
+ this.bR_(null /* childCount */, ownerComponent);
6
+ this.bS_ = key;
7
7
  this.i_ = component;
8
8
  this.o_ = preserve;
9
9
  }
10
10
 
11
11
  VComponent.prototype = {
12
- bz_: 2
12
+ bT_: 2
13
13
  };
14
14
 
15
15
  inherit(VComponent, VNode);
@@ -4,25 +4,25 @@ var extend = require("raptor-util/extend");
4
4
 
5
5
  function VDocumentFragmentClone(other) {
6
6
  extend(this, other);
7
- this.bA_ = null;
8
- this.bB_ = null;
7
+ this.bU_ = null;
8
+ this.bV_ = null;
9
9
  }
10
10
 
11
11
  function VDocumentFragment(out) {
12
- this.bx_(null /* childCount */);
12
+ this.bR_(null /* childCount */);
13
13
  this.A_ = out;
14
14
  }
15
15
 
16
16
  VDocumentFragment.prototype = {
17
- bz_: 11,
17
+ bT_: 11,
18
18
 
19
- bC_: true,
19
+ bW_: true,
20
20
 
21
- bq_: function () {
21
+ bK_: function () {
22
22
  return new VDocumentFragmentClone(this);
23
23
  },
24
24
 
25
- bw_: function (host) {
25
+ bQ_: function (host) {
26
26
  return (host.ownerDocument || host).createDocumentFragment();
27
27
  }
28
28
  };
@@ -1,8 +1,9 @@
1
1
  "use strict"; /* jshint newcap:false */
2
2
 
3
+
3
4
  var domData = require("../components/dom-data");
4
5
  var componentsUtil = require("@internal/components-util");
5
- var vElementByDOMNode = domData._t_;
6
+ var vElementByDOMNode = domData._N_;
6
7
  var VNode = require("./VNode");
7
8
  var inherit = require("raptor-util/inherit");
8
9
  var ATTR_XLINK_HREF = "xlink:href";
@@ -30,9 +31,19 @@ function convertAttrValue(type, value) {
30
31
  if (value === true) {
31
32
  return "";
32
33
  } else if (type == "object") {
33
- if (value instanceof RegExp) {
34
- return value.source;
35
- }
34
+ switch (value.toString) {
35
+ case Object.prototype.toString:
36
+ case Array.prototype.toString:
37
+ // eslint-disable-next-line no-constant-condition
38
+
39
+
40
+
41
+
42
+
43
+ return JSON.stringify(value);
44
+ case RegExp.prototype.toString:
45
+ return value.source;}
46
+
36
47
  }
37
48
 
38
49
  return value + "";
@@ -63,17 +74,17 @@ function removeAttribute(el, namespaceURI, name) {
63
74
  }
64
75
 
65
76
  function VElementClone(other) {
66
- this.bD_ = other.bD_;
67
- this.bA_ = null;
68
- this.bB_ = null;
69
-
70
- this.by_ = other.by_;
71
- this.bE_ = other.bE_;
72
- this._x_ = other._x_;
73
- this.bF_ = other.bF_;
77
+ this.bX_ = other.bX_;
78
+ this.bU_ = null;
79
+ this.bV_ = null;
80
+
81
+ this.bS_ = other.bS_;
82
+ this.bY_ = other.bY_;
83
+ this._R_ = other._R_;
84
+ this.bZ_ = other.bZ_;
74
85
  this.C_ = other.C_;
75
- this.bG_ = other.bG_;
76
- this.bH_ = other.bH_;
86
+ this.c__ = other.c__;
87
+ this.ca_ = other.ca_;
77
88
  }
78
89
 
79
90
  function VElement(
@@ -85,7 +96,7 @@ childCount,
85
96
  flags,
86
97
  props)
87
98
  {
88
- this.bx_(childCount, ownerComponent);
99
+ this.bR_(childCount, ownerComponent);
89
100
 
90
101
  var constId;
91
102
 
@@ -93,21 +104,21 @@ props)
93
104
  constId = props.i;
94
105
  }
95
106
 
96
- this.by_ = key;
107
+ this.bS_ = key;
97
108
  this.C_ = flags || 0;
98
- this.bE_ = attrs || EMPTY_OBJECT;
99
- this._x_ = props || EMPTY_OBJECT;
100
- this.bF_ = tagName;
101
- this.bG_ = null;
102
- this.bH_ = constId;
109
+ this.bY_ = attrs || EMPTY_OBJECT;
110
+ this._R_ = props || EMPTY_OBJECT;
111
+ this.bZ_ = tagName;
112
+ this.c__ = null;
113
+ this.ca_ = constId;
103
114
  this.o_ = false;
104
115
  this.n_ = false;
105
116
  }
106
117
 
107
118
  VElement.prototype = {
108
- bz_: 1,
119
+ bT_: 1,
109
120
 
110
- bq_: function () {
121
+ bK_: function () {
111
122
  return new VElementClone(this);
112
123
  },
113
124
 
@@ -119,7 +130,7 @@ VElement.prototype = {
119
130
  * @param {int|null} childCount The number of child nodes (or `null` if not known)
120
131
  */
121
132
  e: function (tagName, attrs, key, ownerComponent, childCount, flags, props) {
122
- var child = this.bp_(
133
+ var child = this.bJ_(
123
134
  new VElement(
124
135
  tagName,
125
136
  attrs,
@@ -132,7 +143,7 @@ VElement.prototype = {
132
143
 
133
144
 
134
145
  if (childCount === 0) {
135
- return this.bI_();
146
+ return this.cb_();
136
147
  } else {
137
148
  return child;
138
149
  }
@@ -145,15 +156,15 @@ VElement.prototype = {
145
156
  * @param {String} value The value for the new Comment node
146
157
  */
147
158
  n: function (node, ownerComponent) {
148
- node = node.bq_();
149
- node._v_ = ownerComponent;
150
- this.bp_(node);
151
- return this.bI_();
159
+ node = node.bK_();
160
+ node._P_ = ownerComponent;
161
+ this.bJ_(node);
162
+ return this.cb_();
152
163
  },
153
164
 
154
- bw_: function (host, parentNamespaceURI) {
155
- var tagName = this.bF_;
156
- var attributes = this.bE_;
165
+ bQ_: function (host, parentNamespaceURI) {
166
+ var tagName = this.bZ_;
167
+ var attributes = this.bY_;
157
168
  var namespaceURI = DEFAULT_NS[tagName] || parentNamespaceURI || NS_HTML;
158
169
 
159
170
  var flags = this.C_;
@@ -195,11 +206,11 @@ VElement.prototype = {
195
206
  return el;
196
207
  },
197
208
 
198
- bJ_: function (name) {
209
+ cc_: function (name) {
199
210
  // We don't care about the namespaces since the there
200
211
  // is no chance that attributes with the same name will have
201
212
  // different namespaces
202
- var value = this.bE_[name];
213
+ var value = this.bY_[name];
203
214
  return value != null && value !== false;
204
215
  }
205
216
  };
@@ -211,7 +222,7 @@ var proto = VElementClone.prototype = VElement.prototype;
211
222
  ["checked", "selected", "disabled"].forEach(function (name) {
212
223
  defineProperty(proto, name, {
213
224
  get: function () {
214
- var value = this.bE_[name];
225
+ var value = this.bY_[name];
215
226
  return value !== false && value != null;
216
227
  }
217
228
  });
@@ -219,20 +230,20 @@ var proto = VElementClone.prototype = VElement.prototype;
219
230
 
220
231
  defineProperty(proto, "q_", {
221
232
  get: function () {
222
- var value = this.bG_;
233
+ var value = this.c__;
223
234
  if (value == null) {
224
- value = this.bE_.value;
235
+ value = this.bY_.value;
225
236
  }
226
237
  return value != null && value !== false ?
227
238
  value + "" :
228
- this.bE_.type === "checkbox" ||
229
- this.bE_.type === "radio" ?
239
+ this.bY_.type === "checkbox" ||
240
+ this.bY_.type === "radio" ?
230
241
  "on" :
231
242
  "";
232
243
  }
233
244
  });
234
245
 
235
- VElement.bK_ = function (attrs) {
246
+ VElement.cd_ = function (attrs) {
236
247
  // By default this static method is a no-op, but if there are any
237
248
  // compiled components that have "no-update" attributes then
238
249
  // `preserve-attrs.js` will be imported and this method will be replaced
@@ -254,7 +265,7 @@ function virtualizeElement(node, virtualizeChildNodes, ownerComponent) {
254
265
  var attrName = attr.name;
255
266
  if (!xmlnsRegExp.test(attrName)) {
256
267
  if (attrName === "data-marko") {
257
- props = componentsUtil.Z_(node);
268
+ props = componentsUtil._t_(node);
258
269
  } else if (attr.namespaceURI === NS_XLINK) {
259
270
  attrs[ATTR_XLINK_HREF] = attr.value;
260
271
  } else {
@@ -280,8 +291,8 @@ function virtualizeElement(node, virtualizeChildNodes, ownerComponent) {
280
291
  props);
281
292
 
282
293
 
283
- if (vdomEl.bF_ === "textarea") {
284
- vdomEl.bG_ = node.value;
294
+ if (vdomEl.bZ_ === "textarea") {
295
+ vdomEl.c__ = node.value;
285
296
  } else if (virtualizeChildNodes) {
286
297
  virtualizeChildNodes(node, vdomEl, ownerComponent);
287
298
  }
@@ -289,18 +300,18 @@ function virtualizeElement(node, virtualizeChildNodes, ownerComponent) {
289
300
  return vdomEl;
290
301
  }
291
302
 
292
- VElement.bL_ = virtualizeElement;
303
+ VElement.ce_ = virtualizeElement;
293
304
 
294
- VElement.bM_ = function (fromEl, vFromEl, toEl) {
295
- var removePreservedAttributes = VElement.bK_;
305
+ VElement.cf_ = function (fromEl, vFromEl, toEl) {
306
+ var removePreservedAttributes = VElement.cd_;
296
307
 
297
308
  var fromFlags = vFromEl.C_;
298
309
  var toFlags = toEl.C_;
299
310
 
300
311
  vElementByDOMNode.set(fromEl, toEl);
301
312
 
302
- var attrs = toEl.bE_;
303
- var props = toEl._x_;
313
+ var attrs = toEl.bY_;
314
+ var props = toEl._R_;
304
315
 
305
316
  if (toFlags & FLAG_CUSTOM_ELEMENT) {
306
317
  return assign(fromEl, attrs);
@@ -316,7 +327,7 @@ VElement.bM_ = function (fromEl, vFromEl, toEl) {
316
327
  // real VElement node will not have the expando property
317
328
  // so we build the attribute map from the expando property
318
329
 
319
- var oldAttrs = vFromEl.bE_;
330
+ var oldAttrs = vFromEl.bY_;
320
331
 
321
332
  if (oldAttrs) {
322
333
  if (oldAttrs === attrs) {
@@ -388,7 +399,7 @@ VElement.bM_ = function (fromEl, vFromEl, toEl) {
388
399
  // was not a virtualized node (i.e., a node that was not rendered by a
389
400
  // Marko template, but rather a node that was created from an HTML
390
401
  // string or a real DOM node).
391
- if (toEl.by_ === null || fromFlags & FLAG_SPREAD_ATTRS) {
402
+ if (toEl.bS_ === null || fromFlags & FLAG_SPREAD_ATTRS) {
392
403
  for (attrName in oldAttrs) {
393
404
  if (!(attrName in attrs)) {
394
405
  if (attrName === ATTR_XLINK_HREF) {