marko 5.37.51 → 5.37.53

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 (74) hide show
  1. package/dist/node_modules/@internal/components-beginComponent/index.js +6 -3
  2. package/dist/node_modules/@internal/components-define-widget-legacy/index-browser.js +45 -45
  3. package/dist/node_modules/@internal/components-define-widget-legacy/index.js +3 -3
  4. package/dist/node_modules/@internal/components-endComponent/index.js +2 -2
  5. package/dist/node_modules/@internal/components-entry/index-browser.js +2 -2
  6. package/dist/node_modules/@internal/components-entry/index.js +16 -16
  7. package/dist/node_modules/@internal/components-entry-legacy/index-browser.js +6 -6
  8. package/dist/node_modules/@internal/components-registry/index-browser.js +42 -42
  9. package/dist/node_modules/@internal/components-registry/index.js +2 -2
  10. package/dist/node_modules/@internal/components-util/index-browser.js +20 -20
  11. package/dist/node_modules/@internal/components-util/index.js +7 -7
  12. package/dist/node_modules/@internal/create-readable/index-browser.js +1 -1
  13. package/dist/node_modules/@internal/create-readable/index.js +9 -9
  14. package/dist/node_modules/@internal/preserve-tag/index-browser.js +6 -6
  15. package/dist/node_modules/@internal/preserve-tag/index.js +2 -2
  16. package/dist/node_modules/@internal/set-immediate/index-browser.js +1 -1
  17. package/dist/node_modules/@internal/set-immediate/index-worker.js +2 -2
  18. package/dist/node_modules/@internal/set-immediate/index.js +2 -2
  19. package/dist/runtime/RenderResult.js +3 -3
  20. package/dist/runtime/components/Component.js +144 -144
  21. package/dist/runtime/components/ComponentDef.js +24 -24
  22. package/dist/runtime/components/ComponentsContext.js +7 -7
  23. package/dist/runtime/components/GlobalComponentsContext.js +3 -3
  24. package/dist/runtime/components/KeySequence.js +3 -3
  25. package/dist/runtime/components/ServerComponent.js +22 -22
  26. package/dist/runtime/components/State.js +25 -25
  27. package/dist/runtime/components/attach-detach.js +7 -7
  28. package/dist/runtime/components/defineComponent.js +5 -5
  29. package/dist/runtime/components/dom-data.js +5 -5
  30. package/dist/runtime/components/event-delegation.js +10 -10
  31. package/dist/runtime/components/legacy/defineComponent-legacy.js +1 -1
  32. package/dist/runtime/components/legacy/defineRenderer-legacy.js +14 -14
  33. package/dist/runtime/components/legacy/dependencies/index.js +7 -7
  34. package/dist/runtime/components/legacy/renderer-legacy.js +36 -36
  35. package/dist/runtime/components/renderer.js +31 -31
  36. package/dist/runtime/components/update-manager.js +4 -4
  37. package/dist/runtime/createOut.js +1 -1
  38. package/dist/runtime/dom-insert.js +5 -5
  39. package/dist/runtime/helpers/_change-case.js +2 -2
  40. package/dist/runtime/helpers/dynamic-tag.js +11 -11
  41. package/dist/runtime/helpers/render-tag.js +1 -1
  42. package/dist/runtime/helpers/serialize-noop.js +2 -2
  43. package/dist/runtime/helpers/skip-serialize.js +2 -0
  44. package/dist/runtime/helpers/style-value.js +1 -1
  45. package/dist/runtime/helpers/tags-compat/runtime-dom.js +24 -24
  46. package/dist/runtime/helpers/tags-compat/runtime-html.js +19 -19
  47. package/dist/runtime/html/AsyncStream.js +22 -22
  48. package/dist/runtime/html/BufferedWriter.js +2 -2
  49. package/dist/runtime/html/helpers/_dynamic-attr.js +2 -2
  50. package/dist/runtime/html/helpers/attr.js +2 -2
  51. package/dist/runtime/html/helpers/data-marko.js +1 -1
  52. package/dist/runtime/html/helpers/escape-xml.js +1 -1
  53. package/dist/runtime/html/index.js +2 -2
  54. package/dist/runtime/renderable.js +3 -3
  55. package/dist/runtime/vdom/AsyncVDOMBuilder.js +91 -91
  56. package/dist/runtime/vdom/VComment.js +7 -7
  57. package/dist/runtime/vdom/VComponent.js +4 -4
  58. package/dist/runtime/vdom/VDocumentFragment.js +6 -6
  59. package/dist/runtime/vdom/VElement.js +36 -36
  60. package/dist/runtime/vdom/VFragment.js +9 -9
  61. package/dist/runtime/vdom/VNode.js +33 -33
  62. package/dist/runtime/vdom/VText.js +8 -8
  63. package/dist/runtime/vdom/helpers/const-element.js +3 -3
  64. package/dist/runtime/vdom/hot-reload.js +20 -20
  65. package/dist/runtime/vdom/index.js +2 -2
  66. package/dist/runtime/vdom/morphdom/fragment.js +5 -5
  67. package/dist/runtime/vdom/morphdom/helpers.js +5 -5
  68. package/dist/runtime/vdom/morphdom/index.js +74 -74
  69. package/dist/runtime/vdom/vdom.js +15 -15
  70. package/dist/translator/util/get-component-files.js +1 -1
  71. package/package.json +2 -2
  72. package/src/node_modules/@internal/components-beginComponent/index.js +5 -2
  73. package/src/runtime/helpers/skip-serialize.js +2 -0
  74. package/src/runtime/helpers/tags-compat/runtime-html.js +15 -15
@@ -1,9 +1,9 @@
1
1
  "use strict";const {
2
- _g_,
2
+ _h_,
3
3
  __
4
4
  } = require("@internal/components-entry");
5
5
  const {
6
- S_
6
+ T_
7
7
  } = require("../../components/ComponentsContext");
8
8
  const createRenderer = require("../../components/renderer");
9
9
  const defaultCreateOut = require("../../createOut");
@@ -33,7 +33,7 @@ exports.p = function (htmlCompat) {
33
33
  }
34
34
 
35
35
  if (componentDefs) {
36
- scripts = _g_($global, componentDefs);
36
+ scripts = _h_($global, componentDefs);
37
37
  htmlCompat.ensureState($global).walkOnNextFlush = true;
38
38
 
39
39
  if (!tagsAPI.length) {
@@ -66,7 +66,7 @@ exports.p = function (htmlCompat) {
66
66
  });
67
67
  });
68
68
 
69
- dynamicTag5.bo_ = function tagsToVdom(
69
+ dynamicTag5.bp_ = function tagsToVdom(
70
70
  tagsRenderer,
71
71
  renderBody,
72
72
  args)
@@ -155,17 +155,18 @@ exports.p = function (htmlCompat) {
155
155
  // tags to class
156
156
  const $global = htmlCompat.$global();
157
157
  const state = htmlCompat.ensureState($global);
158
+ const out = defaultCreateOut($global);
159
+ const branchId = htmlCompat.nextScopeId();
160
+
158
161
  let writers = writersByGlobal.get($global);
159
162
  if (!writers) {
160
163
  writersByGlobal.set($global, writers = { classAPI: [], tagsAPI: [] });
161
164
  }
162
165
 
163
- const out = defaultCreateOut($global);
164
- const branchId = htmlCompat.nextScopeId();
165
- let customEvents;
166
-
167
166
  if (renderer5) {
167
+ const componentsContext = T_(out);
168
168
  const originalInput = input;
169
+ let customEvents;
169
170
  input = {};
170
171
 
171
172
  for (const key in originalInput) {
@@ -182,23 +183,22 @@ exports.p = function (htmlCompat) {
182
183
  input[key === "content" ? "renderBody" : key] = value;
183
184
  }
184
185
  }
185
- }
186
186
 
187
- if (renderer5) {
187
+ componentsContext.w_ = true;
188
188
  renderer5(input, out);
189
+
190
+ const componentDef = componentsContext.b_[0];
191
+ if (componentDef) {
192
+ htmlCompat.writeSetScopeForComponent(branchId, componentDef.id);
193
+ componentDef.s_.X_ = customEvents;
194
+ if (componentDef.s_.P_.toJSON) {
195
+ componentDef.s_.P_.toJSON = undefined;
196
+ }
197
+ }
189
198
  } else {
190
199
  renderBody5(out, input, ...args);
191
200
  }
192
201
 
193
- const componentsContext = S_(out);
194
- const componentDef = componentsContext.b_[0];
195
- if (componentDef) {
196
- componentDef.s_.W_ = customEvents;
197
- componentDef._wrr = true;
198
- componentDef.u_ |= 1; // FLAG_WILL_RERENDER_IN_BROWSER
199
- htmlCompat.writeSetScopeForComponent(branchId, componentDef.id);
200
- }
201
-
202
202
  let async;
203
203
  out.once("finish", (result) => {
204
204
  if (result.out.b_) {
@@ -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.bs_;
12
+ var escapeXmlString = escapeXmlHelper.bt_;
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.aa_ = null;
106
105
  this.ab_ = null;
107
- this.bd_ = null;
108
- this.bt_ = false;
106
+ this.ac_ = null;
107
+ this.be_ = null;
108
+ this.bu_ = 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
- bu_: true,
128
+ C_: typeof document === "object" && document,
129
+ bv_: true,
130
130
 
131
131
  [Symbol.asyncIterator]() {
132
- if (this.bv_) {
133
- return this.bv_;
132
+ if (this.bw_) {
133
+ return this.bw_;
134
134
  }
135
135
 
136
136
  const originalWriter = this._state.writer;
@@ -222,7 +222,7 @@ var proto = AsyncStream.prototype = {
222
222
  };
223
223
  }
224
224
 
225
- return this.bv_ = {
225
+ return this.bw_ = {
226
226
  next: iteratorNextFn,
227
227
  return: iteratorReturnFn,
228
228
  throw: iteratorReturnFn,
@@ -279,7 +279,7 @@ var proto = AsyncStream.prototype = {
279
279
  return this;
280
280
  },
281
281
 
282
- ai_: function () {
282
+ aj_: function () {
283
283
  return this._state.writer.toString();
284
284
  },
285
285
 
@@ -287,7 +287,7 @@ var proto = AsyncStream.prototype = {
287
287
  * Legacy...
288
288
  */
289
289
  getOutput: function () {
290
- return this.ai_();
290
+ return this.aj_();
291
291
  },
292
292
 
293
293
  toString: function () {
@@ -345,7 +345,7 @@ var proto = AsyncStream.prototype = {
345
345
  }
346
346
 
347
347
  this._lastCount++;
348
- newStream.bt_ = true;
348
+ newStream.bu_ = true;
349
349
  }
350
350
 
351
351
  name = options.name;
@@ -465,7 +465,7 @@ var proto = AsyncStream.prototype = {
465
465
  parentOut._handleChildDone(this);
466
466
  }
467
467
  } else {
468
- if (childOut.bt_) {
468
+ if (childOut.bu_) {
469
469
  this._lastCount--;
470
470
  }
471
471
 
@@ -645,7 +645,7 @@ var proto = AsyncStream.prototype = {
645
645
  return newOut;
646
646
  },
647
647
 
648
- bn_: function (
648
+ bo_: function (
649
649
  tagName,
650
650
  elementAttrs,
651
651
  key,
@@ -684,7 +684,7 @@ var proto = AsyncStream.prototype = {
684
684
  this.write(str);
685
685
  },
686
686
 
687
- bl_: function (
687
+ bm_: function (
688
688
  name,
689
689
  elementAttrs,
690
690
  key,
@@ -750,14 +750,14 @@ var proto = AsyncStream.prototype = {
750
750
  }
751
751
  },
752
752
 
753
- ah_: function (host) {
753
+ ai_: function (host) {
754
754
  var node = this._node;
755
755
 
756
756
  if (!node) {
757
757
  var nextEl;
758
758
  var fragment;
759
- var html = this.ai_();
760
- if (!host) host = this.B_;
759
+ var html = this.aj_();
760
+ if (!host) host = this.C_;
761
761
  var doc = host.ownerDocument || host;
762
762
 
763
763
  if (html) {
@@ -802,15 +802,15 @@ var proto = AsyncStream.prototype = {
802
802
  },
803
803
 
804
804
  c: function (componentDef, key, customEvents) {
805
- this.aa_ = componentDef;
806
- this.ab_ = key;
807
- this.bd_ = customEvents;
805
+ this.ab_ = componentDef;
806
+ this.ac_ = key;
807
+ this.be_ = customEvents;
808
808
  }
809
809
  };
810
810
 
811
811
  // alias:
812
812
  proto.w = proto.write;
813
- proto.bm_ = proto.endElement;
813
+ proto.bn_ = proto.endElement;
814
814
 
815
815
  module.exports = AsyncStream;
816
816
 
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
 
3
3
  const immediate = require("@internal/set-immediate");
4
- const setImmediate = immediate._k_;
5
- const clearImmediate = immediate.af_;
4
+ const setImmediate = immediate._l_;
5
+ const clearImmediate = immediate.ag_;
6
6
  const StringWriter = require("./StringWriter");
7
7
 
8
8
  /**
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  var attrHelper = require("./attr");
3
- var notEmptyAttr = attrHelper.bw_;
4
- var isEmptyAttrValue = attrHelper.bx_;
3
+ var notEmptyAttr = attrHelper.bx_;
4
+ var isEmptyAttrValue = attrHelper.by_;
5
5
  var classHelper = require("./class-attr");
6
6
  var styleHelper = require("./style-attr");
7
7
 
@@ -5,8 +5,8 @@
5
5
 
6
6
  module.exports = attr;
7
7
 
8
- attr.bw_ = nonVoidAttr;
9
- attr.bx_ = isVoid;
8
+ attr.bx_ = nonVoidAttr;
9
+ attr.by_ = isVoid;
10
10
  attr.a = attrAssignment;
11
11
  attr.d = escapeDoubleQuotedAttrValue;
12
12
  attr.s = escapeSingleQuotedAttrValue;
@@ -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.aO_(key) + " " + componentDef.id
29
+ componentDef.aP_(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.bs_ = escape;
21
+ exports.bt_ = 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").bf_(
22
+ require("../createOut").bg_(
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")._k_;
4
+ var setImmediate = require("@internal/set-immediate")._l_;
5
5
  var defaultCreateOut = require("./createOut");
6
6
 
7
7
  function safeRender(renderFunc, finalData, finalOut, shouldEnd) {
@@ -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._W_;
151
+ var shouldBuffer = this._X_;
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.bu_) {
163
+ if (out && out.bv_) {
164
164
  finalOut = out;
165
165
  shouldEnd = false;
166
166
  extend(out.global, globalData);