marko 5.36.4 → 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";var extend = require("raptor-util/extend");
2
2
  var componentsUtil = require("@internal/components-util");
3
- var destroyComponentForNode = componentsUtil._R_;
4
- var destroyNodeRecursive = componentsUtil._S_;
3
+ var destroyComponentForNode = componentsUtil.___destroyComponentForNode;
4
+ var destroyNodeRecursive = componentsUtil.___destroyNodeRecursive;
5
5
  var helpers = require("./vdom/morphdom/helpers");
6
6
 
7
- var insertBefore = helpers.bg_;
8
- var insertAfter = helpers.bh_;
9
- var removeChild = helpers.bi_;
7
+ var insertBefore = helpers.___insertBefore;
8
+ var insertAfter = helpers.___insertAfter;
9
+ var removeChild = helpers.___removeChild;
10
10
 
11
11
  function resolveEl(el) {
12
12
  if (typeof el == "string") {
@@ -6,7 +6,7 @@ var dashToCamelLookup = Object.create(null);
6
6
  /**
7
7
  * Helper for converting camelCase to dash-case.
8
8
  */
9
- exports.bj_ = function camelToDashCase(name) {
9
+ exports.___camelToDashCase = function camelToDashCase(name) {
10
10
  var nameDashed = camelToDashLookup[name];
11
11
  if (!nameDashed) {
12
12
  nameDashed = camelToDashLookup[name] = name.
@@ -24,7 +24,7 @@ exports.bj_ = function camelToDashCase(name) {
24
24
  /**
25
25
  * Helper for converting dash-case to camelCase.
26
26
  */
27
- exports.bk_ = function dashToCamelCase(name) {
27
+ exports.___dashToCamelCase = function dashToCamelCase(name) {
28
28
  var nameCamel = dashToCamelLookup[name];
29
29
  if (!nameCamel) {
30
30
  nameCamel = dashToCamelLookup[name] = name.replace(
@@ -1,14 +1,14 @@
1
1
  "use strict";
2
2
 
3
3
  // eslint-disable-next-line no-constant-binary-expression
4
-
4
+ var complain = "MARKO_DEBUG" && require("complain");
5
5
  var ComponentDef = require("../components/ComponentDef");
6
6
  var ComponentsContext = require("../components/ComponentsContext");
7
7
  var serializeNOOP = require("../helpers/serialize-noop");
8
- var w10NOOP = serializeNOOP.aK_;
9
- var w10ToJSON = serializeNOOP.W_;
8
+ var w10NOOP = serializeNOOP.___noop;
9
+ var w10ToJSON = serializeNOOP.___toJSON;
10
10
  var changeCase = require("./_change-case");
11
- var getComponentsContext = ComponentsContext.T_;
11
+ var getComponentsContext = ComponentsContext.___getComponentsContext;
12
12
 
13
13
  var FLAG_WILL_RERENDER_IN_BROWSER = 1;
14
14
  // var FLAG_HAS_RENDER_BODY = 2;
@@ -34,10 +34,10 @@ customEvents)
34
34
  }
35
35
 
36
36
  var attrs = getAttrs && getAttrs();
37
- var component = componentDef && componentDef.t_;
37
+ var component = componentDef && componentDef.___component;
38
38
  if (typeof tag === "string") {
39
39
  if (renderBody) {
40
- out.bl_(
40
+ out.___beginElementDynamic(
41
41
  tag,
42
42
  attrs,
43
43
  key,
@@ -45,9 +45,9 @@ customEvents)
45
45
  addEvents(componentDef, customEvents, props)
46
46
  );
47
47
  renderBody(out);
48
- out.bm_();
48
+ out.___endElement();
49
49
  } else {
50
- out.bn_(
50
+ out.___elementDynamic(
51
51
  tag,
52
52
  attrs,
53
53
  key,
@@ -71,16 +71,16 @@ customEvents)
71
71
  var render = tag && tag.renderBody || tag;
72
72
 
73
73
  // eslint-disable-next-line no-constant-condition
74
+ if ("MARKO_DEBUG") {
75
+ if (tag.renderer && tag.renderer.renderer) {
76
+ complain(
77
+ "An object with a 'renderer' was passed to the dynamic tag, but renderer was another template."
78
+ );
79
+ }
80
+ }
74
81
 
75
-
76
-
77
-
78
-
79
-
80
-
81
-
82
- if (dynamicTag.bo_) {
83
- renderer = dynamicTag.bo_(
82
+ if (dynamicTag.___runtimeCompat) {
83
+ renderer = dynamicTag.___runtimeCompat(
84
84
  renderer,
85
85
  render,
86
86
  args,
@@ -91,31 +91,31 @@ customEvents)
91
91
  if (renderer) {
92
92
  out.c(componentDef, key, customEvents);
93
93
  renderer(attrs, out);
94
- out.aa_ = null;
94
+ out.___assignedComponentDef = null;
95
95
  } else {
96
96
  var isFn = typeof render === "function";
97
97
 
98
98
  // eslint-disable-next-line no-constant-condition
99
-
100
-
101
-
102
-
103
-
104
-
105
-
99
+ if ("MARKO_DEBUG") {
100
+ if (render.safeHTML || render.toHTML) {
101
+ throw new Error(
102
+ "Using `<include(x)/>` or the `<${dynamic}/>` tags with a `{ safeHTML: ... }` object is no longer supported. Use the unescaped text placeholder syntax instead."
103
+ );
104
+ }
105
+ }
106
106
  if (isFn) {
107
- var flags = componentDef ? componentDef.v_ : 0;
107
+ var flags = componentDef ? componentDef.___flags : 0;
108
108
  var willRerender = flags & FLAG_WILL_RERENDER_IN_BROWSER;
109
109
  var isW10NOOP = render === w10NOOP;
110
110
  var preserve = IS_SERVER ? willRerender : isW10NOOP;
111
111
  out.bf(key, component, preserve);
112
112
  if (!isW10NOOP && isFn) {
113
113
  var componentsContext = getComponentsContext(out);
114
- var parentComponentDef = componentsContext.p_;
115
- var globalContext = componentsContext.q_;
116
- componentsContext.p_ = new ComponentDef(
114
+ var parentComponentDef = componentsContext.___componentDef;
115
+ var globalContext = componentsContext.___globalContext;
116
+ componentsContext.___componentDef = new ComponentDef(
117
117
  component,
118
- parentComponentDef.id + "-" + parentComponentDef.aO_(key),
118
+ parentComponentDef.id + "-" + parentComponentDef.___nextKey(key),
119
119
  globalContext
120
120
  );
121
121
  render.toJSON = w10ToJSON;
@@ -126,7 +126,7 @@ customEvents)
126
126
  render(out, attrs);
127
127
  }
128
128
 
129
- componentsContext.p_ = parentComponentDef;
129
+ componentsContext.___componentDef = parentComponentDef;
130
130
  }
131
131
  out.ef();
132
132
  } else {
@@ -140,7 +140,7 @@ customEvents)
140
140
  component,
141
141
  IS_SERVER &&
142
142
  componentDef &&
143
- componentDef.v_ & FLAG_WILL_RERENDER_IN_BROWSER
143
+ componentDef.___flags & FLAG_WILL_RERENDER_IN_BROWSER
144
144
  );
145
145
  renderBody(out);
146
146
  out.ef();
@@ -151,7 +151,7 @@ function attrsToCamelCase(attrs) {
151
151
  var result = {};
152
152
 
153
153
  for (var key in attrs) {
154
- result[changeCase.bk_(key)] = attrs[key];
154
+ result[changeCase.___dashToCamelCase(key)] = attrs[key];
155
155
  }
156
156
 
157
157
  return result;
@@ -16,5 +16,5 @@ customEvents)
16
16
  input,
17
17
  out
18
18
  );
19
- out.aa_ = null;
19
+ out.___assignedComponentDef = null;
20
20
  };
@@ -1,5 +1,5 @@
1
1
  "use strict";var w10NOOP = require("warp10/constants").NOOP;
2
- exports.aK_ = w10NOOP;
3
- exports.W_ = function () {
2
+ exports.___noop = w10NOOP;
3
+ exports.___toJSON = function () {
4
4
  return w10NOOP;
5
5
  };
@@ -32,7 +32,7 @@ module.exports = function styleHelper(style) {
32
32
  value += "px";
33
33
  }
34
34
 
35
- styles += sep + changeCase.bj_(name) + ":" + value;
35
+ styles += sep + changeCase.___camelToDashCase(name) + ":" + value;
36
36
  sep = ";";
37
37
  }
38
38
  }
@@ -1,17 +1,17 @@
1
- "use strict";const { _m_ } = require("@internal/components-util");
1
+ "use strict";const { ___componentLookup } = require("@internal/components-util");
2
2
  const {
3
- T_
3
+ ___getComponentsContext
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 { _l_ } = require("../../vdom/morphdom/fragment");
10
+ const { ___createFragmentNode } = require("../../vdom/morphdom/fragment");
11
11
  const dynamicTag = require("../dynamic-tag");
12
12
 
13
13
  exports.p = function (domCompat) {
14
- dynamicTag.bo_ = function tagsToVdom(
14
+ dynamicTag.___runtimeCompat = function tagsToVdom(
15
15
  renderer,
16
16
  renderBody,
17
17
  args,
@@ -38,18 +38,18 @@ 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.ab_, component, !newNode);
41
+ out.bf(out.___assignedKey, component, !newNode);
42
42
  if (newNode) {
43
- out.node({ bp_: () => newNode });
43
+ out.node({ ___actualize: () => newNode });
44
44
  }
45
45
  out.ef();
46
46
  },
47
47
  // eslint-disable-next-line no-constant-condition
48
-
49
-
50
-
51
-
52
-
48
+ "MARKO_DEBUG" ?
49
+ {
50
+ t: TagsCompatId,
51
+ d: true
52
+ } :
53
53
  {
54
54
  t: TagsCompatId
55
55
  },
@@ -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.aE_;
107
- Component.prototype.aE_ = function (
106
+ const setCustomEvents = Component.prototype.___setCustomEvents;
107
+ Component.prototype.___setCustomEvents = function (
108
108
  customEvents,
109
109
  scopeId)
110
110
  {
111
- const global = this.al_;
111
+ const global = this.___global;
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
- _l_(null, null, realFragment);
130
+ ___createFragmentNode(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.bq_ =
154
- _m_[scope.m5c];
155
- rootNode = component._F_;
153
+ const component = scope.___marko5Component =
154
+ ___componentLookup[scope.m5c];
155
+ rootNode = component.___rootNode;
156
156
  host = rootNode.startNode;
157
157
  domCompat.setScopeNodes(host, rootNode.endNode);
158
158
  }
159
- const existingComponent = scope.bq_;
160
- const componentsContext = T_(out);
161
- const globalComponentsContext = componentsContext.q_;
159
+ const existingComponent = scope.___marko5Component;
160
+ const componentsContext = ___getComponentsContext(out);
161
+ const globalComponentsContext = componentsContext.___globalContext;
162
162
  let customEvents;
163
- globalComponentsContext.aA_ = existingComponent;
163
+ globalComponentsContext.___rerenderComponent = 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.ai_().aB_;
188
+ const targetNode = out.___getOutput().___firstChild;
189
189
  morphdom(rootNode, targetNode, host, componentsContext);
190
- const componentDefs = componentsContext.ag_(
190
+ const componentDefs = componentsContext.___initComponents(
191
191
  getRootNode(host)
192
192
  );
193
- const component = componentDefs[0].t_;
194
- component._F_ = rootNode;
195
- component.P_ = input[0];
196
- component.X_ = customEvents;
197
- scope.bq_ = component;
193
+ const component = componentDefs[0].___component;
194
+ component.___rootNode = rootNode;
195
+ component.___input = input[0];
196
+ component.___customEvents = customEvents;
197
+ scope.___marko5Component = component;
198
198
  });
199
199
  }
200
200
 
@@ -219,12 +219,12 @@ exports.p = function (domCompat) {
219
219
  );
220
220
  },
221
221
  // eslint-disable-next-line no-constant-condition
222
-
223
-
224
-
225
-
226
-
227
-
222
+ "MARKO_DEBUG" ?
223
+ {
224
+ t: RenderBodyComponentId,
225
+ i: true,
226
+ d: true
227
+ } :
228
228
  {
229
229
  t: RenderBodyComponentId,
230
230
  i: true
@@ -1,23 +1,23 @@
1
1
  "use strict";const initComponentsTag = require("../../../core-tags/components/init-components-tag");
2
2
  const {
3
- T_
3
+ ___getComponentsContext
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.br_;
11
- const isMarko5 = (fn) => !fn.br_;
10
+ const isMarko6 = (fn) => !!fn.___isTagsAPI;
11
+ const isMarko5 = (fn) => !fn.___isTagsAPI;
12
12
  const writeHTML = (result) => {
13
13
  const state = result.out._state;
14
14
  const writer = state.writer;
15
- state.events.emit("c_", writer);
15
+ state.events.emit("___toString", writer);
16
16
  htmlCompat.writeScript(writer._scripts);
17
17
  htmlCompat.write(writer._content);
18
18
  };
19
19
 
20
- dynamicTag5.bo_ = function tagsToVdom(
20
+ dynamicTag5.___runtimeCompat = function tagsToVdom(
21
21
  tagsRenderer,
22
22
  renderBody,
23
23
  args)
@@ -45,17 +45,17 @@ exports.p = function (htmlCompat) {
45
45
  const input = _.i;
46
46
  const tagsRenderer = _.r;
47
47
  const willRerender = componentDef._wrr;
48
- out.bf(out.ab_, component, willRerender);
48
+ out.bf(out.___assignedKey, component, willRerender);
49
49
  htmlCompat.render(tagsRenderer, willRerender, out, component, input);
50
50
  out.ef();
51
51
  },
52
52
  // eslint-disable-next-line no-constant-condition
53
-
54
-
55
-
56
-
57
-
58
-
53
+ "MARKO_DEBUG" ?
54
+ {
55
+ t: TagsCompatId,
56
+ i: true,
57
+ d: true
58
+ } :
59
59
  {
60
60
  t: TagsCompatId,
61
61
  i: true
@@ -101,10 +101,10 @@ exports.p = function (htmlCompat) {
101
101
  renderBody5(out, input, ...args);
102
102
  }
103
103
 
104
- const componentsContext = T_(out);
105
- const component = componentsContext.b_[0];
104
+ const componentsContext = ___getComponentsContext(out);
105
+ const component = componentsContext.___components[0];
106
106
  if (component) {
107
- component.t_.X_ = customEvents;
107
+ component.___component.___customEvents = 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.br_ = true;
130
+ renderFn.___isTagsAPI = 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.bs_;
12
+ var escapeXmlString = escapeXmlHelper.___escapeXML;
13
13
  var missingSetTimeout = typeof setTimeout !== "function";
14
14
 
15
15
  function noop() {}
@@ -100,12 +100,12 @@ function AsyncStream(global, writer, parentOut) {
100
100
 
101
101
  this._elStack = undefined; // Array
102
102
 
103
- this.b_ = null; // ComponentsContext
103
+ this.___components = null; // ComponentsContext
104
104
 
105
- this.aa_ = null;
106
- this.ab_ = null;
107
- this.bd_ = null;
108
- this.bt_ = false;
105
+ this.___assignedComponentDef = null;
106
+ this.___assignedKey = null;
107
+ this.___assignedCustomEvents = null;
108
+ this.___isLast = 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
- C_: typeof document === "object" && document,
129
- bu_: true,
128
+ ___host: typeof document === "object" && document,
129
+ ___isOut: true,
130
130
 
131
131
  [Symbol.asyncIterator]() {
132
- if (this.bv_) {
133
- return this.bv_;
132
+ if (this.___iterator) {
133
+ return this.___iterator;
134
134
  }
135
135
 
136
136
  const originalWriter = this._state.writer;
@@ -221,7 +221,7 @@ var proto = AsyncStream.prototype = {
221
221
  };
222
222
  }
223
223
 
224
- return this.bv_ = {
224
+ return this.___iterator = {
225
225
  next: iteratorNextFn,
226
226
  return: iteratorReturnFn,
227
227
  throw: iteratorReturnFn,
@@ -253,7 +253,7 @@ var proto = AsyncStream.prototype = {
253
253
  return this;
254
254
  },
255
255
 
256
- ai_: function () {
256
+ ___getOutput: function () {
257
257
  return this._state.writer.toString();
258
258
  },
259
259
 
@@ -261,14 +261,14 @@ var proto = AsyncStream.prototype = {
261
261
  * Legacy...
262
262
  */
263
263
  getOutput: function () {
264
- return this.ai_();
264
+ return this.___getOutput();
265
265
  },
266
266
 
267
267
  toString: function () {
268
268
  return this._state.writer.toString();
269
269
  },
270
270
 
271
- o_: function () {
271
+ ___getResult: function () {
272
272
  this._result = this._result || new RenderResult(this);
273
273
  return this._result;
274
274
  },
@@ -319,7 +319,7 @@ var proto = AsyncStream.prototype = {
319
319
  }
320
320
 
321
321
  this._lastCount++;
322
- newStream.bt_ = true;
322
+ newStream.___isLast = true;
323
323
  }
324
324
 
325
325
  name = options.name;
@@ -367,7 +367,7 @@ var proto = AsyncStream.prototype = {
367
367
  }
368
368
 
369
369
  if (state.events !== state.stream) {
370
- state.events.emit("finish", this.o_());
370
+ state.events.emit("finish", this.___getResult());
371
371
  }
372
372
  },
373
373
 
@@ -439,7 +439,7 @@ var proto = AsyncStream.prototype = {
439
439
  parentOut._handleChildDone(this);
440
440
  }
441
441
  } else {
442
- if (childOut.bt_) {
442
+ if (childOut.___isLast) {
443
443
  this._lastCount--;
444
444
  }
445
445
 
@@ -480,7 +480,7 @@ var proto = AsyncStream.prototype = {
480
480
  var state = this._state;
481
481
 
482
482
  if (event === "finish" && state.finished === true) {
483
- callback(this.o_());
483
+ callback(this.___getResult());
484
484
  } else if (event === "last") {
485
485
  this.onLast(callback);
486
486
  } else {
@@ -494,7 +494,7 @@ var proto = AsyncStream.prototype = {
494
494
  var state = this._state;
495
495
 
496
496
  if (event === "finish" && state.finished === true) {
497
- callback(this.o_());
497
+ callback(this.___getResult());
498
498
  } else if (event === "last") {
499
499
  this.onLast(callback);
500
500
  } else {
@@ -619,7 +619,7 @@ var proto = AsyncStream.prototype = {
619
619
  return newOut;
620
620
  },
621
621
 
622
- bn_: function (
622
+ ___elementDynamic: function (
623
623
  tagName,
624
624
  elementAttrs,
625
625
  key,
@@ -658,7 +658,7 @@ var proto = AsyncStream.prototype = {
658
658
  this.write(str);
659
659
  },
660
660
 
661
- bl_: function (
661
+ ___beginElementDynamic: function (
662
662
  name,
663
663
  elementAttrs,
664
664
  key,
@@ -724,14 +724,14 @@ var proto = AsyncStream.prototype = {
724
724
  }
725
725
  },
726
726
 
727
- ah_: function (host) {
727
+ ___getNode: function (host) {
728
728
  var node = this._node;
729
729
 
730
730
  if (!node) {
731
731
  var nextEl;
732
732
  var fragment;
733
- var html = this.ai_();
734
- if (!host) host = this.C_;
733
+ var html = this.___getOutput();
734
+ if (!host) host = this.___host;
735
735
  var doc = host.ownerDocument || host;
736
736
 
737
737
  if (html) {
@@ -776,15 +776,15 @@ var proto = AsyncStream.prototype = {
776
776
  },
777
777
 
778
778
  c: function (componentDef, key, customEvents) {
779
- this.aa_ = componentDef;
780
- this.ab_ = key;
781
- this.bd_ = customEvents;
779
+ this.___assignedComponentDef = componentDef;
780
+ this.___assignedKey = key;
781
+ this.___assignedCustomEvents = customEvents;
782
782
  }
783
783
  };
784
784
 
785
785
  // alias:
786
786
  proto.w = proto.write;
787
- proto.bm_ = proto.endElement;
787
+ proto.___endElement = proto.endElement;
788
788
 
789
789
  module.exports = AsyncStream;
790
790
 
@@ -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.___setImmediate;
5
+ const clearImmediate = immediate.___clearImmediate;
6
6
  const StringWriter = require("./StringWriter");
7
7
 
8
8
  /**
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
 
3
3
  var escapeDoubleQuotes =
4
- require("./helpers/escape-quotes").n_;
4
+ require("./helpers/escape-quotes").___escapeDoubleQuotes;
5
5
 
6
6
  function StringWriter() {
7
7
  this._content = "";
@@ -56,7 +56,7 @@ StringWriter.prototype = {
56
56
  },
57
57
 
58
58
  toString: function () {
59
- this.state.events.emit("c_", this);
59
+ this.state.events.emit("___toString", this);
60
60
  let str = this._content;
61
61
  if (this._scripts) {
62
62
  const outGlobal = this.state.root.global;
@@ -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.___notEmptyAttr;
4
+ var isEmptyAttrValue = attrHelper.___isEmptyAttrValue;
5
5
  var classHelper = require("./class-attr");
6
6
  var styleHelper = require("./style-attr");
7
7
 
@@ -1,15 +1,15 @@
1
1
  "use strict";
2
2
 
3
3
  var escapeQuoteHelpers = require("./escape-quotes");
4
- var escapeDoubleQuotes = escapeQuoteHelpers.n_;
5
- var escapeSingleQuotes = escapeQuoteHelpers.by_;
4
+ var escapeDoubleQuotes = escapeQuoteHelpers.___escapeDoubleQuotes;
5
+ var escapeSingleQuotes = escapeQuoteHelpers.___escapeSingleQuotes;
6
6
  // eslint-disable-next-line no-constant-binary-expression
7
-
7
+ var complain = "MARKO_DEBUG" && require("complain");
8
8
 
9
9
  module.exports = maybeEmptyAttr;
10
10
 
11
- maybeEmptyAttr.bw_ = notEmptyAttr;
12
- maybeEmptyAttr.bx_ = isEmpty;
11
+ maybeEmptyAttr.___notEmptyAttr = notEmptyAttr;
12
+ maybeEmptyAttr.___isEmptyAttrValue = isEmpty;
13
13
 
14
14
  function maybeEmptyAttr(name, value) {
15
15
  if (isEmpty(value)) {
@@ -32,12 +32,12 @@ function notEmptyAttr(name, value) {
32
32
  case Object.prototype.toString:
33
33
  case Array.prototype.toString:
34
34
  // eslint-disable-next-line no-constant-condition
35
-
36
-
37
-
38
-
39
-
40
-
35
+ if ("MARKO_DEBUG") {
36
+ complain(
37
+ "Relying on JSON.stringify for attribute values is deprecated, in future versions of Marko these will be cast to strings instead.",
38
+ { locationIndex: 2 }
39
+ );
40
+ }
41
41
 
42
42
  return " " + name + singleQuote(JSON.stringify(value), 2);
43
43
  case RegExp.prototype.toString: