marko 5.35.7 → 5.35.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (127) hide show
  1. package/bin/markoc.js +0 -2
  2. package/dist/compiler/index.js +2 -0
  3. package/dist/core-tags/core/await/AsyncValue.js +1 -0
  4. package/dist/core-tags/core/await/renderer.js +1 -0
  5. package/dist/node-require/hot-reload.js +1 -3
  6. package/dist/node-require/index.js +1 -1
  7. package/dist/node_modules/@internal/components-define-widget-legacy/index-browser.js +4 -2
  8. package/dist/node_modules/@internal/components-entry/index.js +13 -13
  9. package/dist/node_modules/@internal/components-entry-legacy/index-browser.js +4 -3
  10. package/dist/node_modules/@internal/components-registry/index-browser.js +40 -36
  11. package/dist/node_modules/@internal/components-registry/index.js +2 -2
  12. package/dist/node_modules/@internal/components-util/index-browser.js +16 -16
  13. package/dist/node_modules/@internal/components-util/index.js +7 -7
  14. package/dist/node_modules/@internal/create-readable/index-browser.js +2 -2
  15. package/dist/node_modules/@internal/create-readable/index.js +9 -9
  16. package/dist/node_modules/@internal/preserve-tag/index-browser.js +5 -5
  17. package/dist/node_modules/@internal/preserve-tag/index.js +1 -1
  18. package/dist/node_modules/@internal/require/index-webpack.js +1 -0
  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 +4 -3
  23. package/dist/runtime/components/Component.js +107 -106
  24. package/dist/runtime/components/ComponentDef.js +25 -25
  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 +8 -7
  29. package/dist/runtime/components/State.js +20 -24
  30. package/dist/runtime/components/attach-detach.js +7 -7
  31. package/dist/runtime/components/defineComponent.js +0 -1
  32. package/dist/runtime/components/dom-data.js +5 -5
  33. package/dist/runtime/components/event-delegation.js +10 -10
  34. package/dist/runtime/components/legacy/defineRenderer-legacy.js +14 -13
  35. package/dist/runtime/components/legacy/dependencies/index.js +9 -10
  36. package/dist/runtime/components/legacy/jquery.js +1 -0
  37. package/dist/runtime/components/legacy/renderer-legacy.js +33 -32
  38. package/dist/runtime/components/renderer.js +29 -29
  39. package/dist/runtime/components/update-manager.js +4 -4
  40. package/dist/runtime/createOut.js +1 -1
  41. package/dist/runtime/dom-insert.js +5 -5
  42. package/dist/runtime/helpers/_change-case.js +2 -2
  43. package/dist/runtime/helpers/dynamic-tag.js +18 -13
  44. package/dist/runtime/helpers/render-tag.js +1 -1
  45. package/dist/runtime/helpers/serialize-noop.js +5 -0
  46. package/dist/runtime/helpers/style-value.js +1 -1
  47. package/dist/runtime/helpers/tags-compat/dom-debug.mjs +1 -0
  48. package/dist/runtime/helpers/tags-compat/dom.mjs +1 -0
  49. package/dist/runtime/helpers/tags-compat/html-debug.js +1 -1
  50. package/dist/runtime/helpers/tags-compat/html-debug.mjs +3 -2
  51. package/dist/runtime/helpers/tags-compat/html.js +3 -1
  52. package/dist/runtime/helpers/tags-compat/html.mjs +3 -2
  53. package/dist/runtime/helpers/tags-compat/runtime-dom.js +38 -35
  54. package/dist/runtime/helpers/tags-compat/runtime-html.js +24 -65
  55. package/dist/runtime/html/AsyncStream.js +25 -24
  56. package/dist/runtime/html/BufferedWriter.js +2 -2
  57. package/dist/runtime/html/helpers/_dynamic-attr.js +2 -2
  58. package/dist/runtime/html/helpers/attr.js +4 -3
  59. package/dist/runtime/html/helpers/attrs.js +1 -0
  60. package/dist/runtime/html/helpers/data-marko.js +2 -3
  61. package/dist/runtime/html/helpers/escape-quotes.js +1 -1
  62. package/dist/runtime/html/helpers/escape-xml.js +1 -1
  63. package/dist/runtime/html/helpers/merge-attrs.js +1 -0
  64. package/dist/runtime/html/index.js +1 -1
  65. package/dist/runtime/renderable.js +5 -5
  66. package/dist/runtime/vdom/AsyncVDOMBuilder.js +86 -85
  67. package/dist/runtime/vdom/VComponent.js +4 -4
  68. package/dist/runtime/vdom/VDocumentFragment.js +7 -7
  69. package/dist/runtime/vdom/VElement.js +41 -42
  70. package/dist/runtime/vdom/VFragment.js +9 -9
  71. package/dist/runtime/vdom/VNode.js +34 -35
  72. package/dist/runtime/vdom/VText.js +8 -8
  73. package/dist/runtime/vdom/helpers/attrs.js +1 -0
  74. package/dist/runtime/vdom/helpers/const-element.js +3 -3
  75. package/dist/runtime/vdom/hot-reload.js +14 -14
  76. package/dist/runtime/vdom/index.js +1 -1
  77. package/dist/runtime/vdom/morphdom/fragment.js +5 -5
  78. package/dist/runtime/vdom/morphdom/helpers.js +5 -5
  79. package/dist/runtime/vdom/morphdom/index.js +67 -68
  80. package/dist/runtime/vdom/vdom.js +14 -14
  81. package/dist/taglib/index.js +1 -0
  82. package/index.d.ts +1 -5
  83. package/package.json +2 -2
  84. package/src/compiler/index.js +2 -0
  85. package/src/core-tags/core/await/AsyncValue.js +1 -0
  86. package/src/core-tags/core/await/renderer.js +1 -0
  87. package/src/node-require/hot-reload.js +0 -2
  88. package/src/node-require/index.js +1 -1
  89. package/src/node_modules/@internal/components-define-widget-legacy/index-browser.js +4 -2
  90. package/src/node_modules/@internal/components-entry/index.js +2 -2
  91. package/src/node_modules/@internal/components-entry-legacy/index-browser.js +1 -0
  92. package/src/node_modules/@internal/components-registry/index-browser.js +8 -4
  93. package/src/node_modules/@internal/components-util/index-browser.js +1 -1
  94. package/src/node_modules/@internal/create-readable/index-browser.js +1 -1
  95. package/src/node_modules/@internal/require/index-webpack.js +1 -0
  96. package/src/runtime/RenderResult.js +1 -0
  97. package/src/runtime/components/Component.js +2 -1
  98. package/src/runtime/components/ComponentDef.js +4 -4
  99. package/src/runtime/components/ServerComponent.js +1 -0
  100. package/src/runtime/components/State.js +6 -10
  101. package/src/runtime/components/defineComponent.js +0 -1
  102. package/src/runtime/components/legacy/defineRenderer-legacy.js +1 -0
  103. package/src/runtime/components/legacy/dependencies/index.js +0 -1
  104. package/src/runtime/components/legacy/jquery.js +1 -0
  105. package/src/runtime/components/legacy/renderer-legacy.js +1 -0
  106. package/src/runtime/helpers/dynamic-tag.js +11 -6
  107. package/src/runtime/helpers/serialize-noop.js +5 -0
  108. package/src/runtime/helpers/tags-compat/dom-debug.mjs +1 -0
  109. package/src/runtime/helpers/tags-compat/dom.mjs +1 -0
  110. package/src/runtime/helpers/tags-compat/html-debug.js +1 -1
  111. package/src/runtime/helpers/tags-compat/html-debug.mjs +3 -2
  112. package/src/runtime/helpers/tags-compat/html.js +3 -1
  113. package/src/runtime/helpers/tags-compat/html.mjs +3 -2
  114. package/src/runtime/helpers/tags-compat/runtime-dom.js +23 -20
  115. package/src/runtime/helpers/tags-compat/runtime-html.js +18 -59
  116. package/src/runtime/html/AsyncStream.js +1 -0
  117. package/src/runtime/html/helpers/attr.js +1 -0
  118. package/src/runtime/html/helpers/attrs.js +1 -0
  119. package/src/runtime/html/helpers/data-marko.js +0 -1
  120. package/src/runtime/html/helpers/merge-attrs.js +1 -0
  121. package/src/runtime/vdom/AsyncVDOMBuilder.js +1 -0
  122. package/src/runtime/vdom/VElement.js +1 -2
  123. package/src/runtime/vdom/VNode.js +0 -1
  124. package/src/runtime/vdom/helpers/attrs.js +1 -0
  125. package/src/runtime/vdom/morphdom/index.js +0 -1
  126. package/src/taglib/index.js +1 -0
  127. package/tags-html.d.ts +7 -9
@@ -1,79 +1,78 @@
1
- "use strict"; /* jshint newcap:false */
2
- function VNode() {}
1
+ "use strict";function VNode() {}
3
2
 
4
3
  VNode.prototype = {
5
- bU_: function (finalChildCount, ownerComponent) {
6
- this.ch_ = finalChildCount;
7
- this.ci_ = 0;
4
+ bX_: function (finalChildCount, ownerComponent) {
5
+ this.ck_ = finalChildCount;
6
+ this.cl_ = 0;
7
+ this.cc_ = null;
8
+ this.cm_ = null;
8
9
  this.c__ = null;
9
- this.cj_ = null;
10
- this.bX_ = null;
11
- this.bY_ = null;
12
- this._L_ = ownerComponent;
10
+ this.ca_ = null;
11
+ this._M_ = ownerComponent;
13
12
  },
14
13
 
15
- get az_() {
16
- var firstChild = this.c__;
14
+ get aA_() {
15
+ var firstChild = this.cc_;
17
16
 
18
- if (firstChild && firstChild.bZ_) {
19
- var nestedFirstChild = firstChild.az_;
17
+ if (firstChild && firstChild.cb_) {
18
+ var nestedFirstChild = firstChild.aA_;
20
19
  // The first child is a DocumentFragment node.
21
20
  // If the DocumentFragment node has a first child then we will return that.
22
21
  // Otherwise, the DocumentFragment node is not *really* the first child and
23
22
  // we need to skip to its next sibling
24
- return nestedFirstChild || firstChild.ck_;
23
+ return nestedFirstChild || firstChild.cn_;
25
24
  }
26
25
 
27
26
  return firstChild;
28
27
  },
29
28
 
30
- get ck_() {
31
- var nextSibling = this.bY_;
29
+ get cn_() {
30
+ var nextSibling = this.ca_;
32
31
 
33
32
  if (nextSibling) {
34
- if (nextSibling.bZ_) {
35
- var firstChild = nextSibling.az_;
36
- return firstChild || nextSibling.ck_;
33
+ if (nextSibling.cb_) {
34
+ var firstChild = nextSibling.aA_;
35
+ return firstChild || nextSibling.cn_;
37
36
  }
38
37
  } else {
39
- var parentNode = this.bX_;
40
- if (parentNode && parentNode.bZ_) {
41
- return parentNode.ck_;
38
+ var parentNode = this.c__;
39
+ if (parentNode && parentNode.cb_) {
40
+ return parentNode.cn_;
42
41
  }
43
42
  }
44
43
 
45
44
  return nextSibling;
46
45
  },
47
46
 
48
- bN_: function (child) {
49
- this.ci_++;
47
+ bQ_: function (child) {
48
+ this.cl_++;
50
49
 
51
- if (this.cb_ === "textarea") {
52
- if (child.cl_) {
53
- this.cc_ += child.cm_;
50
+ if (this.ce_ === "textarea") {
51
+ if (child.co_) {
52
+ this.cf_ += child.cp_;
54
53
  } else {
55
54
  throw TypeError();
56
55
  }
57
56
  } else {
58
- var lastChild = this.cj_;
57
+ var lastChild = this.cm_;
59
58
 
60
- child.bX_ = this;
59
+ child.c__ = this;
61
60
 
62
61
  if (lastChild) {
63
- lastChild.bY_ = child;
62
+ lastChild.ca_ = child;
64
63
  } else {
65
- this.c__ = child;
64
+ this.cc_ = child;
66
65
  }
67
66
 
68
- this.cj_ = child;
67
+ this.cm_ = child;
69
68
  }
70
69
 
71
70
  return child;
72
71
  },
73
72
 
74
- ce_: function finishChild() {
75
- if (this.ci_ === this.ch_ && this.bX_) {
76
- return this.bX_.ce_();
73
+ ch_: function finishChild() {
74
+ if (this.cl_ === this.ck_ && this.c__) {
75
+ return this.c__.ch_();
77
76
  } else {
78
77
  return this;
79
78
  }
@@ -2,21 +2,21 @@
2
2
  var VNode = require("./VNode");
3
3
 
4
4
  function VText(value, ownerComponent) {
5
- this.bU_(-1 /* no children */, ownerComponent);
6
- this.cm_ = value;
5
+ this.bX_(-1 /* no children */, ownerComponent);
6
+ this.cp_ = value;
7
7
  }
8
8
 
9
9
  VText.prototype = {
10
- cl_: true,
10
+ co_: true,
11
11
 
12
- bW_: 3,
12
+ bZ_: 3,
13
13
 
14
- bm_: function (host) {
15
- return (host.ownerDocument || host).createTextNode(this.cm_);
14
+ bo_: function (host) {
15
+ return (host.ownerDocument || host).createTextNode(this.cp_);
16
16
  },
17
17
 
18
- bO_: function () {
19
- return new VText(this.cm_);
18
+ bR_: function () {
19
+ return new VText(this.cp_);
20
20
  }
21
21
  };
22
22
 
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
 
3
+ // eslint-disable-next-line no-constant-binary-expression
3
4
 
4
5
  var classHelper = require("../../helpers/class-value");
5
6
  var styleHelper = require("../../helpers/style-value");
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- var VElement = require("../vdom").bw_;
3
+ var VElement = require("../vdom").bz_;
4
4
  var i = 0;
5
5
 
6
6
  module.exports = function (tagName, attrs, childCount) {
@@ -13,12 +13,12 @@ function ConstVElement(tagName, attrs, childCount) {
13
13
 
14
14
  ConstVElement.prototype = Object.create(VElement.prototype);
15
15
  ConstVElement.prototype.e = function (tagName, attrs, childCount) {
16
- var child = this.bN_(
16
+ var child = this.bQ_(
17
17
  new ConstVElement(tagName, attrs, childCount)
18
18
  );
19
19
 
20
20
  if (childCount === 0) {
21
- return this.ce_();
21
+ return this.ch_();
22
22
  } else {
23
23
  return child;
24
24
  }
@@ -1,10 +1,10 @@
1
1
  "use strict";var registry = require("@internal/components-registry");
2
- var setImmediate = require("@internal/set-immediate")._i_;
2
+ var setImmediate = require("@internal/set-immediate")._j_;
3
3
  var updateManager = require("../components/update-manager");
4
4
  var runtime = require(".");
5
5
 
6
6
  var createTemplate = runtime.t;
7
- var createComponent = registry._F_;
7
+ var createComponent = registry._G_;
8
8
  var registered = {};
9
9
  var instancesByType = {};
10
10
  var queue;
@@ -31,12 +31,12 @@ exports.t = runtime.t = function (typeName) {
31
31
  }
32
32
 
33
33
  queue.push(function () {
34
- var newProto = registry._G_(typeName).prototype;
34
+ var newProto = registry._H_(typeName).prototype;
35
35
  instances.forEach(function (instance) {
36
36
  if (hasLifecycleChanged(instance.__proto__, newProto)) {
37
37
  var renderer = instance.Q_;
38
38
  instance.Q_ = (input, out) => {
39
- instance.aE_(input, out);
39
+ instance.aF_(input, out);
40
40
  if (instance.onInput) {
41
41
  input = instance.onInput(input, out) || input;
42
42
  }
@@ -44,18 +44,18 @@ exports.t = runtime.t = function (typeName) {
44
44
  instance.Q_(input, out);
45
45
  };
46
46
 
47
- instance.cn_ = true;
48
- instance.an_();
49
- instance._w_ = false;
47
+ instance.cq_ = true;
48
+ instance.ao_();
49
+ instance._x_ = false;
50
50
 
51
- if (instance.ah_) {
52
- instance.ah_.removeAllListeners();
53
- instance.ah_ = null;
51
+ if (instance.ai_) {
52
+ instance.ai_.removeAllListeners();
53
+ instance.ai_ = null;
54
54
  }
55
55
  }
56
56
 
57
57
  instance.__proto__ = newProto;
58
- instance._E_(
58
+ instance._F_(
59
59
  instance.O_, false).
60
60
  afterInsert(instance.B_);
61
61
  });
@@ -71,14 +71,14 @@ exports.t = runtime.t = function (typeName) {
71
71
  }
72
72
  };
73
73
 
74
- registry._F_ = function (typeName, id) {
74
+ registry._G_ = function (typeName, id) {
75
75
  var instances = instancesByType[typeName];
76
76
  var instance = createComponent(typeName, id);
77
77
 
78
78
  if (instances) {
79
79
  instances.add(instance);
80
80
  instance.once("destroy", function () {
81
- if (!instance.cn_) {
81
+ if (!instance.cq_) {
82
82
  instances.delete(instance);
83
83
  }
84
84
  });
@@ -104,7 +104,7 @@ function hasLifecycleChanged(oldProto, newProto) {
104
104
  }
105
105
 
106
106
  function batchUpdate() {
107
- updateManager.ax_(function () {
107
+ updateManager.ay_(function () {
108
108
  var pending = queue;
109
109
  queue = undefined;
110
110
 
@@ -19,7 +19,7 @@ function Template(typeName) {
19
19
  }
20
20
 
21
21
  var AsyncVDOMBuilder = require("./AsyncVDOMBuilder");
22
- require("../createOut").bc_(
22
+ require("../createOut").be_(
23
23
  Template.prototype.createOut = function createOut(
24
24
  globalData,
25
25
  parent,
@@ -1,5 +1,5 @@
1
1
  "use strict";var helpers = require("./helpers");
2
- var insertBefore = helpers.bd_;
2
+ var insertBefore = helpers.bf_;
3
3
 
4
4
  var fragmentPrototype = {
5
5
  nodeType: 12,
@@ -80,8 +80,8 @@ function createFragmentNode(startNode, nextNode, parentNode) {
80
80
 
81
81
  function beginFragmentNode(startNode, parentNode) {
82
82
  var fragment = createFragmentNode(startNode, null, parentNode);
83
- fragment.co_ = function (nextNode) {
84
- fragment.co_ = null;
83
+ fragment.cr_ = function (nextNode) {
84
+ fragment.cr_ = null;
85
85
  insertBefore(
86
86
  fragment.endNode,
87
87
  nextNode,
@@ -91,5 +91,5 @@ function beginFragmentNode(startNode, parentNode) {
91
91
  return fragment;
92
92
  }
93
93
 
94
- exports._j_ = createFragmentNode;
95
- exports.cp_ = beginFragmentNode;
94
+ exports._k_ = createFragmentNode;
95
+ exports.cs_ = beginFragmentNode;
@@ -35,8 +35,8 @@ function removeChild(node) {
35
35
  node.parentNode.removeChild(node);
36
36
  }
37
37
 
38
- exports.bd_ = insertBefore;
39
- exports.be_ = insertAfter;
40
- exports.ck_ = nextSibling;
41
- exports.az_ = firstChild;
42
- exports.bf_ = removeChild;
38
+ exports.bf_ = insertBefore;
39
+ exports.bg_ = insertAfter;
40
+ exports.cn_ = nextSibling;
41
+ exports.aA_ = firstChild;
42
+ exports.bh_ = removeChild;