marko 5.35.21 → 5.35.22

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 (71) hide show
  1. package/dist/core-tags/core/await/reorderer-renderer.js +29 -19
  2. package/dist/node_modules/@internal/components-beginComponent/index-browser.js +4 -4
  3. package/dist/node_modules/@internal/components-beginComponent/index.js +11 -11
  4. package/dist/node_modules/@internal/components-define-widget-legacy/index-browser.js +45 -45
  5. package/dist/node_modules/@internal/components-define-widget-legacy/index.js +3 -3
  6. package/dist/node_modules/@internal/components-endComponent/index.js +3 -3
  7. package/dist/node_modules/@internal/components-entry/index-browser.js +2 -2
  8. package/dist/node_modules/@internal/components-entry/index.js +17 -17
  9. package/dist/node_modules/@internal/components-entry-legacy/index-browser.js +6 -6
  10. package/dist/node_modules/@internal/components-registry/index-browser.js +46 -46
  11. package/dist/node_modules/@internal/components-registry/index.js +2 -2
  12. package/dist/node_modules/@internal/components-util/index-browser.js +20 -20
  13. package/dist/node_modules/@internal/components-util/index.js +9 -9
  14. package/dist/node_modules/@internal/create-readable/index-browser.js +1 -1
  15. package/dist/node_modules/@internal/create-readable/index.js +9 -9
  16. package/dist/node_modules/@internal/preserve-tag/index-browser.js +7 -7
  17. package/dist/node_modules/@internal/preserve-tag/index.js +5 -5
  18. package/dist/node_modules/@internal/set-immediate/index-browser.js +1 -1
  19. package/dist/node_modules/@internal/set-immediate/index-worker.js +2 -2
  20. package/dist/node_modules/@internal/set-immediate/index.js +2 -2
  21. package/dist/runtime/RenderResult.js +8 -8
  22. package/dist/runtime/components/Component.js +145 -145
  23. package/dist/runtime/components/ComponentDef.js +29 -29
  24. package/dist/runtime/components/ComponentsContext.js +15 -15
  25. package/dist/runtime/components/GlobalComponentsContext.js +4 -4
  26. package/dist/runtime/components/KeySequence.js +3 -3
  27. package/dist/runtime/components/ServerComponent.js +13 -13
  28. package/dist/runtime/components/State.js +26 -26
  29. package/dist/runtime/components/attach-detach.js +8 -8
  30. package/dist/runtime/components/defineComponent.js +5 -5
  31. package/dist/runtime/components/dom-data.js +5 -5
  32. package/dist/runtime/components/event-delegation.js +10 -10
  33. package/dist/runtime/components/legacy/defineComponent-legacy.js +1 -1
  34. package/dist/runtime/components/legacy/defineRenderer-legacy.js +16 -16
  35. package/dist/runtime/components/legacy/dependencies/index.js +7 -7
  36. package/dist/runtime/components/legacy/renderer-legacy.js +43 -43
  37. package/dist/runtime/components/renderer.js +35 -35
  38. package/dist/runtime/components/update-manager.js +4 -4
  39. package/dist/runtime/createOut.js +1 -1
  40. package/dist/runtime/dom-insert.js +5 -5
  41. package/dist/runtime/helpers/_change-case.js +2 -2
  42. package/dist/runtime/helpers/dynamic-tag.js +18 -18
  43. package/dist/runtime/helpers/render-tag.js +1 -1
  44. package/dist/runtime/helpers/serialize-noop.js +2 -2
  45. package/dist/runtime/helpers/style-value.js +1 -1
  46. package/dist/runtime/helpers/tags-compat/runtime-dom.js +24 -24
  47. package/dist/runtime/helpers/tags-compat/runtime-html.js +8 -8
  48. package/dist/runtime/html/AsyncStream.js +26 -26
  49. package/dist/runtime/html/BufferedWriter.js +2 -2
  50. package/dist/runtime/html/helpers/data-marko.js +4 -4
  51. package/dist/runtime/html/helpers/escape-xml.js +1 -1
  52. package/dist/runtime/html/index.js +2 -2
  53. package/dist/runtime/renderable.js +5 -5
  54. package/dist/runtime/vdom/AsyncVDOMBuilder.js +42 -42
  55. package/dist/runtime/vdom/VComment.js +1 -1
  56. package/dist/runtime/vdom/VComponent.js +2 -2
  57. package/dist/runtime/vdom/VDocumentFragment.js +2 -2
  58. package/dist/runtime/vdom/VElement.js +13 -13
  59. package/dist/runtime/vdom/VFragment.js +5 -5
  60. package/dist/runtime/vdom/VNode.js +4 -4
  61. package/dist/runtime/vdom/VText.js +1 -1
  62. package/dist/runtime/vdom/hot-reload.js +18 -18
  63. package/dist/runtime/vdom/index.js +2 -2
  64. package/dist/runtime/vdom/morphdom/fragment.js +2 -2
  65. package/dist/runtime/vdom/morphdom/helpers.js +4 -4
  66. package/dist/runtime/vdom/morphdom/index.js +46 -46
  67. package/helpers/README.md +3 -0
  68. package/helpers/empty.js +4 -0
  69. package/helpers/notEmpty.js +11 -0
  70. package/package.json +2 -1
  71. package/src/core-tags/core/await/reorderer-renderer.js +73 -63
@@ -1,17 +1,17 @@
1
- "use strict";const { _l_ } = require("@internal/components-util");
1
+ "use strict";const { _m_ } = require("@internal/components-util");
2
2
  const {
3
- S_
3
+ T_
4
4
  } = require("../../components/ComponentsContext");
5
5
  const defineComponent = require("../../components/defineComponent");
6
6
  const { r: registerComponent } = require("../../components/registry");
7
7
  const createRenderer = require("../../components/renderer");
8
8
  const defaultCreateOut = require("../../createOut");
9
9
  const morphdom = require("../../vdom/morphdom");
10
- const { _k_ } = require("../../vdom/morphdom/fragment");
10
+ const { _l_ } = require("../../vdom/morphdom/fragment");
11
11
  const dynamicTag = require("../dynamic-tag");
12
12
 
13
13
  exports.p = function (domCompat) {
14
- dynamicTag.bn_ = function tagsToVdom(
14
+ dynamicTag.bo_ = function tagsToVdom(
15
15
  renderer,
16
16
  renderBody,
17
17
  args,
@@ -38,9 +38,9 @@ exports.p = function (domCompat) {
38
38
  const tagsRenderer = domCompat.resolveRegistered(_.r, global);
39
39
  const newNode = domCompat.render(out, component, tagsRenderer, input);
40
40
 
41
- out.bf(out.aa_, component, !newNode);
41
+ out.bf(out.ab_, component, !newNode);
42
42
  if (newNode) {
43
- out.node({ bo_: () => newNode });
43
+ out.node({ bp_: () => newNode });
44
44
  }
45
45
  out.ef();
46
46
  },
@@ -103,12 +103,12 @@ exports.p = function (domCompat) {
103
103
  if (!newRenderer) {
104
104
  const { Component } = renderer;
105
105
  if (Component) {
106
- const setCustomEvents = Component.prototype.aD_;
107
- Component.prototype.aD_ = function (
106
+ const setCustomEvents = Component.prototype.aE_;
107
+ Component.prototype.aE_ = function (
108
108
  customEvents,
109
109
  scopeId)
110
110
  {
111
- const global = this.ak_;
111
+ const global = this.al_;
112
112
  for (const customEvent of customEvents) {
113
113
  customEvent[1] = domCompat.resolveRegistered(
114
114
  customEvent[1],
@@ -127,7 +127,7 @@ exports.p = function (domCompat) {
127
127
  },
128
128
  () => {
129
129
  const realFragment = document.createDocumentFragment();
130
- _k_(null, null, realFragment);
130
+ _l_(null, null, realFragment);
131
131
  return realFragment;
132
132
  },
133
133
  (scope, input) => {
@@ -150,17 +150,17 @@ exports.p = function (domCompat) {
150
150
  let host = domCompat.getStartNode(scope);
151
151
  let rootNode = host.fragment;
152
152
  if (!rootNode) {
153
- const component = scope.bp_ =
154
- _l_[scope.m5c];
155
- rootNode = component._E_;
153
+ const component = scope.bq_ =
154
+ _m_[scope.m5c];
155
+ rootNode = component._F_;
156
156
  host = rootNode.startNode;
157
157
  domCompat.setScopeNodes(host, rootNode.endNode);
158
158
  }
159
- const existingComponent = scope.bp_;
160
- const componentsContext = S_(out);
161
- const globalComponentsContext = componentsContext.p_;
159
+ const existingComponent = scope.bq_;
160
+ const componentsContext = T_(out);
161
+ const globalComponentsContext = componentsContext.q_;
162
162
  let customEvents;
163
- globalComponentsContext.az_ = existingComponent;
163
+ globalComponentsContext.aA_ = existingComponent;
164
164
  out.sync();
165
165
  if (renderer) {
166
166
  const [rawInput] = input;
@@ -185,16 +185,16 @@ exports.p = function (domCompat) {
185
185
  }
186
186
 
187
187
  domCompat.queueEffect(scope, () => {
188
- const targetNode = out.ah_().aA_;
188
+ const targetNode = out.ai_().aB_;
189
189
  morphdom(rootNode, targetNode, host, componentsContext);
190
- const componentDefs = componentsContext.af_(
190
+ const componentDefs = componentsContext.ag_(
191
191
  getRootNode(host)
192
192
  );
193
- const component = componentDefs[0].s_;
194
- component._E_ = rootNode;
195
- component.O_ = input[0];
196
- component.W_ = customEvents;
197
- scope.bp_ = component;
193
+ const component = componentDefs[0].t_;
194
+ component._F_ = rootNode;
195
+ component.P_ = input[0];
196
+ component.X_ = customEvents;
197
+ scope.bq_ = component;
198
198
  });
199
199
  }
200
200
 
@@ -1,14 +1,14 @@
1
1
  "use strict";const initComponentsTag = require("../../../core-tags/components/init-components-tag");
2
2
  const {
3
- S_
3
+ T_
4
4
  } = require("../../components/ComponentsContext");
5
5
  const createRenderer = require("../../components/renderer");
6
6
  const defaultCreateOut = require("../../createOut");
7
7
  const dynamicTag5 = require("../dynamic-tag");
8
8
 
9
9
  exports.p = function (htmlCompat) {
10
- const isMarko6 = (fn) => !!fn.bq_;
11
- const isMarko5 = (fn) => !fn.bq_;
10
+ const isMarko6 = (fn) => !!fn.br_;
11
+ const isMarko5 = (fn) => !fn.br_;
12
12
  const writeHTML = (result) => {
13
13
  const state = result.out._state;
14
14
  const writer = state.writer;
@@ -17,7 +17,7 @@ exports.p = function (htmlCompat) {
17
17
  htmlCompat.write(writer._content);
18
18
  };
19
19
 
20
- dynamicTag5.bn_ = function tagsToVdom(
20
+ dynamicTag5.bo_ = function tagsToVdom(
21
21
  tagsRenderer,
22
22
  renderBody,
23
23
  args)
@@ -45,7 +45,7 @@ exports.p = function (htmlCompat) {
45
45
  const input = _.i;
46
46
  const tagsRenderer = _.r;
47
47
  const willRerender = componentDef._wrr;
48
- out.bf(out.aa_, component, willRerender);
48
+ out.bf(out.ab_, component, willRerender);
49
49
  htmlCompat.render(tagsRenderer, willRerender, out, component, input);
50
50
  out.ef();
51
51
  },
@@ -101,10 +101,10 @@ exports.p = function (htmlCompat) {
101
101
  renderBody5(out, input, ...args);
102
102
  }
103
103
 
104
- const componentsContext = S_(out);
104
+ const componentsContext = T_(out);
105
105
  const component = componentsContext.b_[0];
106
106
  if (component) {
107
- component.s_.W_ = customEvents;
107
+ component.t_.X_ = customEvents;
108
108
  htmlCompat.writeSetScopeForComponent(component.id);
109
109
  }
110
110
 
@@ -127,7 +127,7 @@ exports.p = function (htmlCompat) {
127
127
  };
128
128
  },
129
129
  function createRenderer(renderFn) {
130
- renderFn.bq_ = true;
130
+ renderFn.br_ = true;
131
131
  return renderFn;
132
132
  }
133
133
  );
@@ -9,7 +9,7 @@ var markoAttr = require("./helpers/data-marko");
9
9
  var escapeXmlHelper = require("./helpers/escape-xml");
10
10
  var StringWriter = require("./StringWriter");
11
11
  var escapeXmlOrNullish = escapeXmlHelper.x;
12
- var escapeXmlString = escapeXmlHelper.br_;
12
+ var escapeXmlString = escapeXmlHelper.bs_;
13
13
  var missingSetTimeout = typeof setTimeout !== "function";
14
14
 
15
15
  function noop() {}
@@ -102,10 +102,10 @@ function AsyncStream(global, writer, parentOut) {
102
102
 
103
103
  this.b_ = null; // ComponentsContext
104
104
 
105
- this.a__ = null;
106
105
  this.aa_ = null;
107
- this.bc_ = null;
108
- this.bs_ = false;
106
+ this.ab_ = null;
107
+ this.bd_ = null;
108
+ this.bt_ = false;
109
109
  }
110
110
 
111
111
  AsyncStream.DEFAULT_TIMEOUT = 10000;
@@ -125,12 +125,12 @@ AsyncStream.enableAsyncStackTrace = function () {
125
125
 
126
126
  var proto = AsyncStream.prototype = {
127
127
  constructor: AsyncStream,
128
- B_: typeof document === "object" && document,
129
- bt_: true,
128
+ C_: typeof document === "object" && document,
129
+ bu_: true,
130
130
 
131
131
  [Symbol.asyncIterator]() {
132
- if (this.bu_) {
133
- return this.bu_;
132
+ if (this.bv_) {
133
+ return this.bv_;
134
134
  }
135
135
 
136
136
  const originalWriter = this._state.writer;
@@ -191,7 +191,7 @@ var proto = AsyncStream.prototype = {
191
191
  };
192
192
  }
193
193
 
194
- return this.bu_ = {
194
+ return this.bv_ = {
195
195
  next: iteratorNextFn,
196
196
  [Symbol.asyncIterator]() {
197
197
  return this;
@@ -221,7 +221,7 @@ var proto = AsyncStream.prototype = {
221
221
  return this;
222
222
  },
223
223
 
224
- ah_: function () {
224
+ ai_: function () {
225
225
  return this._state.writer.toString();
226
226
  },
227
227
 
@@ -229,14 +229,14 @@ var proto = AsyncStream.prototype = {
229
229
  * Legacy...
230
230
  */
231
231
  getOutput: function () {
232
- return this.ah_();
232
+ return this.ai_();
233
233
  },
234
234
 
235
235
  toString: function () {
236
236
  return this._state.writer.toString();
237
237
  },
238
238
 
239
- bv_: function () {
239
+ o_: function () {
240
240
  this._result = this._result || new RenderResult(this);
241
241
  return this._result;
242
242
  },
@@ -287,7 +287,7 @@ var proto = AsyncStream.prototype = {
287
287
  }
288
288
 
289
289
  this._lastCount++;
290
- newStream.bs_ = true;
290
+ newStream.bt_ = true;
291
291
  }
292
292
 
293
293
  name = options.name;
@@ -335,7 +335,7 @@ var proto = AsyncStream.prototype = {
335
335
  }
336
336
 
337
337
  if (state.events !== state.stream) {
338
- state.events.emit("finish", this.bv_());
338
+ state.events.emit("finish", this.o_());
339
339
  }
340
340
  },
341
341
 
@@ -407,7 +407,7 @@ var proto = AsyncStream.prototype = {
407
407
  parentOut._handleChildDone(this);
408
408
  }
409
409
  } else {
410
- if (childOut.bs_) {
410
+ if (childOut.bt_) {
411
411
  this._lastCount--;
412
412
  }
413
413
 
@@ -448,7 +448,7 @@ var proto = AsyncStream.prototype = {
448
448
  var state = this._state;
449
449
 
450
450
  if (event === "finish" && state.finished === true) {
451
- callback(this.bv_());
451
+ callback(this.o_());
452
452
  } else if (event === "last") {
453
453
  this.onLast(callback);
454
454
  } else {
@@ -462,7 +462,7 @@ var proto = AsyncStream.prototype = {
462
462
  var state = this._state;
463
463
 
464
464
  if (event === "finish" && state.finished === true) {
465
- callback(this.bv_());
465
+ callback(this.o_());
466
466
  } else if (event === "last") {
467
467
  this.onLast(callback);
468
468
  } else {
@@ -587,7 +587,7 @@ var proto = AsyncStream.prototype = {
587
587
  return newOut;
588
588
  },
589
589
 
590
- bm_: function (
590
+ bn_: function (
591
591
  tagName,
592
592
  elementAttrs,
593
593
  key,
@@ -626,7 +626,7 @@ var proto = AsyncStream.prototype = {
626
626
  this.write(str);
627
627
  },
628
628
 
629
- bk_: function (
629
+ bl_: function (
630
630
  name,
631
631
  elementAttrs,
632
632
  key,
@@ -692,14 +692,14 @@ var proto = AsyncStream.prototype = {
692
692
  }
693
693
  },
694
694
 
695
- ag_: function (host) {
695
+ ah_: function (host) {
696
696
  var node = this._node;
697
697
 
698
698
  if (!node) {
699
699
  var nextEl;
700
700
  var fragment;
701
- var html = this.ah_();
702
- if (!host) host = this.B_;
701
+ var html = this.ai_();
702
+ if (!host) host = this.C_;
703
703
  var doc = host.ownerDocument || host;
704
704
 
705
705
  if (html) {
@@ -744,15 +744,15 @@ var proto = AsyncStream.prototype = {
744
744
  },
745
745
 
746
746
  c: function (componentDef, key, customEvents) {
747
- this.a__ = componentDef;
748
- this.aa_ = key;
749
- this.bc_ = customEvents;
747
+ this.aa_ = componentDef;
748
+ this.ab_ = key;
749
+ this.bd_ = customEvents;
750
750
  }
751
751
  };
752
752
 
753
753
  // alias:
754
754
  proto.w = proto.write;
755
- proto.bl_ = proto.endElement;
755
+ proto.bm_ = proto.endElement;
756
756
 
757
757
  module.exports = AsyncStream;
758
758
 
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
 
3
3
  const immediate = require("@internal/set-immediate");
4
- const setImmediate = immediate._j_;
5
- const clearImmediate = immediate.ae_;
4
+ const setImmediate = immediate._k_;
5
+ const clearImmediate = immediate.af_;
6
6
  const StringWriter = require("./StringWriter");
7
7
 
8
8
  /**
@@ -9,9 +9,9 @@ var FLAG_WILL_RERENDER_IN_BROWSER = 1;
9
9
  module.exports = function dataMarko(out, componentDef, props, key) {
10
10
  var result = "";
11
11
  var willNotRerender =
12
- out.b_.v_ ||
13
- componentDef.t_ &&
14
- (componentDef.u_ & FLAG_WILL_RERENDER_IN_BROWSER) === 0;
12
+ out.b_.w_ ||
13
+ componentDef.u_ &&
14
+ (componentDef.v_ & FLAG_WILL_RERENDER_IN_BROWSER) === 0;
15
15
 
16
16
  if (willNotRerender) {
17
17
  if (props) {
@@ -26,7 +26,7 @@ module.exports = function dataMarko(out, componentDef, props, key) {
26
26
  result +=
27
27
  ' data-marko-key="' +
28
28
  escapeDoubleQuotes(
29
- componentDef.aN_(key) + " " + componentDef.id
29
+ componentDef.aO_(key) + " " + componentDef.id
30
30
  ) +
31
31
  '"';
32
32
  }
@@ -18,4 +18,4 @@ module.exports.x = function (value) {
18
18
  return escape(value + "");
19
19
  };
20
20
 
21
- exports.br_ = escape;
21
+ exports.bs_ = escape;
@@ -13,13 +13,13 @@ exports.t = function createTemplate(typeName) {
13
13
  };
14
14
 
15
15
  function Template(typeName) {
16
- this.path = this.R_ = typeName;
16
+ this.path = this.S_ = typeName;
17
17
  }
18
18
 
19
19
  Template.prototype.stream = require("@internal/create-readable");
20
20
 
21
21
  var AsyncStream = require("./AsyncStream");
22
- require("../createOut").be_(
22
+ require("../createOut").bf_(
23
23
  Template.prototype.createOut = function createOut(
24
24
  globalData,
25
25
  writer,
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
 
3
3
  var extend = require("raptor-util/extend");
4
- var setImmediate = require("@internal/set-immediate")._j_;
4
+ var setImmediate = require("@internal/set-immediate")._k_;
5
5
  var defaultCreateOut = require("./createOut");
6
6
 
7
7
  function safeRender(renderFunc, finalData, finalOut, shouldEnd) {
@@ -73,7 +73,7 @@ module.exports = function (target, renderer) {
73
73
  }
74
74
 
75
75
  render(localData, out);
76
- return out.bv_();
76
+ return out.o_();
77
77
  },
78
78
 
79
79
  /**
@@ -148,7 +148,7 @@ module.exports = function (target, renderer) {
148
148
  var finalData;
149
149
  var globalData;
150
150
  var render = renderFunc || this._;
151
- var shouldBuffer = this._V_;
151
+ var shouldBuffer = this._W_;
152
152
  var shouldEnd = true;
153
153
 
154
154
  if (data) {
@@ -160,7 +160,7 @@ module.exports = function (target, renderer) {
160
160
  finalData = {};
161
161
  }
162
162
 
163
- if (out && out.bt_) {
163
+ if (out && out.bu_) {
164
164
  finalOut = out;
165
165
  shouldEnd = false;
166
166
  extend(out.global, globalData);
@@ -179,7 +179,7 @@ module.exports = function (target, renderer) {
179
179
  if (callback) {
180
180
  finalOut.
181
181
  on("finish", function () {
182
- callback(null, finalOut.bv_(), finalOut);
182
+ callback(null, finalOut.o_(), finalOut);
183
183
  }).
184
184
  once("error", callback);
185
185
  }