marko 4.25.0 → 4.26.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 (317) hide show
  1. package/bin/markoc.js +18 -18
  2. package/dist/compiler/CompileContext.js +3 -8
  3. package/dist/core-tags/components/init-components-tag.js +1 -52
  4. package/dist/core-tags/components/package.json +1 -3
  5. package/dist/core-tags/components/preferred-script-location-tag.js +2 -2
  6. package/dist/core-tags/components/preserve-tag.js +1 -27
  7. package/dist/core-tags/core/await/AsyncValue.js +20 -20
  8. package/dist/core-tags/core/await/renderer.js +11 -12
  9. package/dist/core-tags/core/await/reorderer-renderer.js +11 -6
  10. package/dist/index.js +1 -39
  11. package/dist/node-require/index.js +11 -0
  12. package/dist/node_modules/@internal/components-beginComponent/index-browser.js +12 -0
  13. package/dist/{runtime/components/beginComponent.js → node_modules/@internal/components-beginComponent/index.js} +14 -14
  14. package/dist/node_modules/@internal/components-beginComponent/package.json +11 -0
  15. package/dist/{runtime/components/legacy/defineWidget-legacy-browser.js → node_modules/@internal/components-define-widget-legacy/index-browser.js} +47 -47
  16. package/dist/node_modules/@internal/components-define-widget-legacy/index.js +18 -0
  17. package/dist/node_modules/@internal/components-define-widget-legacy/package.json +11 -0
  18. package/dist/node_modules/@internal/components-endComponent/index.js +11 -0
  19. package/dist/node_modules/@internal/components-endComponent/package.json +11 -0
  20. package/dist/node_modules/@internal/components-entry/index-browser.js +9 -0
  21. package/dist/node_modules/@internal/components-entry/index.js +285 -0
  22. package/dist/node_modules/@internal/components-entry/package.json +11 -0
  23. package/dist/{runtime/components/legacy → node_modules/@internal/components-entry-legacy}/index-browser.js +14 -15
  24. package/dist/node_modules/@internal/components-entry-legacy/index.js +14 -0
  25. package/dist/node_modules/@internal/components-entry-legacy/package.json +11 -0
  26. package/dist/{runtime/components/init-components-browser.js → node_modules/@internal/components-registry/index-browser.js} +180 -79
  27. package/dist/node_modules/@internal/components-registry/index.js +34 -0
  28. package/dist/node_modules/@internal/components-registry/package.json +11 -0
  29. package/dist/{runtime/components/util-browser.js → node_modules/@internal/components-util/index-browser.js} +23 -24
  30. package/dist/{runtime/components/util.js → node_modules/@internal/components-util/index.js} +10 -12
  31. package/dist/node_modules/@internal/components-util/package.json +11 -0
  32. package/dist/node_modules/@internal/create-readable/index-browser.js +25 -0
  33. package/dist/node_modules/@internal/create-readable/index.js +52 -0
  34. package/dist/node_modules/@internal/create-readable/package.json +11 -0
  35. package/dist/node_modules/@internal/init-components-tag/index.js +52 -0
  36. package/dist/node_modules/@internal/init-components-tag/package.json +11 -0
  37. package/dist/{loader/index-default.js → node_modules/@internal/loader/index.js} +1 -1
  38. package/dist/node_modules/@internal/loader/package.json +11 -0
  39. package/dist/{core-tags/components/preserve-tag-browser.js → node_modules/@internal/preserve-tag/index-browser.js} +8 -8
  40. package/dist/node_modules/@internal/preserve-tag/index.js +27 -0
  41. package/dist/node_modules/@internal/preserve-tag/package.json +11 -0
  42. package/dist/node_modules/@internal/set-immediate/index-browser.js +17 -0
  43. package/dist/node_modules/@internal/set-immediate/index-worker.js +2 -0
  44. package/dist/node_modules/@internal/set-immediate/index.js +2 -0
  45. package/dist/node_modules/@internal/set-immediate/package.json +11 -0
  46. package/dist/runtime/RenderResult.js +24 -19
  47. package/dist/runtime/components/Component.js +154 -151
  48. package/dist/runtime/components/ComponentDef.js +28 -28
  49. package/dist/runtime/components/ComponentsContext.js +19 -19
  50. package/dist/runtime/components/GlobalComponentsContext.js +4 -4
  51. package/dist/runtime/components/KeySequence.js +3 -3
  52. package/dist/runtime/components/ServerComponent.js +13 -13
  53. package/dist/runtime/components/State.js +28 -28
  54. package/dist/runtime/components/attach-detach.js +9 -9
  55. package/dist/runtime/components/defineComponent.js +5 -5
  56. package/dist/runtime/components/dom-data.js +6 -6
  57. package/dist/runtime/components/event-delegation.js +15 -16
  58. package/dist/runtime/components/index.js +1 -285
  59. package/dist/runtime/components/legacy/browser.json +1 -1
  60. package/dist/runtime/components/legacy/defineComponent-legacy.js +1 -1
  61. package/dist/runtime/components/legacy/defineRenderer-legacy.js +18 -19
  62. package/dist/runtime/components/legacy/defineWidget-legacy.js +1 -18
  63. package/dist/runtime/components/legacy/dependencies/html.js +1 -1
  64. package/dist/runtime/components/legacy/dependencies/index.js +9 -9
  65. package/dist/runtime/components/legacy/helper-getWidgetFromOut.js +3 -3
  66. package/dist/runtime/components/legacy/index.js +1 -14
  67. package/dist/runtime/components/legacy/renderer-legacy.js +43 -43
  68. package/dist/runtime/components/registry.js +1 -34
  69. package/dist/runtime/components/renderer.js +38 -38
  70. package/dist/runtime/components/update-manager.js +10 -10
  71. package/dist/runtime/createOut.js +1 -1
  72. package/dist/runtime/dom-insert.js +6 -6
  73. package/dist/runtime/helpers/_change-case.js +2 -2
  74. package/dist/runtime/helpers/assign.js +3 -2
  75. package/dist/runtime/helpers/dynamic-tag.js +14 -16
  76. package/dist/runtime/helpers/load-template.js +1 -1
  77. package/dist/runtime/helpers/merge.js +3 -1
  78. package/dist/runtime/helpers/style-value.js +2 -2
  79. package/dist/runtime/html/AsyncStream.js +61 -52
  80. package/dist/runtime/html/BufferedWriter.js +5 -1
  81. package/dist/runtime/html/StringWriter.js +7 -3
  82. package/dist/runtime/html/helpers/_dynamic-attr.js +2 -2
  83. package/dist/runtime/html/helpers/attr.js +4 -4
  84. package/dist/runtime/html/helpers/attrs.js +3 -3
  85. package/dist/runtime/html/helpers/data-marko.js +4 -6
  86. package/dist/runtime/html/helpers/escape-quotes.js +2 -2
  87. package/dist/runtime/html/helpers/escape-xml.js +1 -1
  88. package/dist/runtime/html/helpers/props-script.js +1 -1
  89. package/dist/runtime/html/index.js +15 -12
  90. package/dist/runtime/renderable.js +5 -5
  91. package/dist/runtime/vdom/AsyncVDOMBuilder.js +102 -103
  92. package/dist/runtime/vdom/VComment.js +7 -7
  93. package/dist/runtime/vdom/VComponent.js +5 -5
  94. package/dist/runtime/vdom/VDocumentFragment.js +8 -8
  95. package/dist/runtime/vdom/VElement.js +55 -54
  96. package/dist/runtime/vdom/VFragment.js +9 -9
  97. package/dist/runtime/vdom/VNode.js +30 -30
  98. package/dist/runtime/vdom/VText.js +7 -7
  99. package/dist/runtime/vdom/helpers/v-element.js +1 -1
  100. package/dist/runtime/vdom/helpers/v-text.js +1 -1
  101. package/dist/runtime/vdom/index.js +12 -22
  102. package/dist/runtime/vdom/morphdom/fragment.js +5 -5
  103. package/dist/runtime/vdom/morphdom/helpers.js +3 -3
  104. package/dist/runtime/vdom/morphdom/index.js +72 -68
  105. package/dist/runtime/vdom/morphdom/specialElHandlers.js +8 -8
  106. package/dist/runtime/vdom/preserve-attrs.js +1 -1
  107. package/dist/runtime/vdom/vdom.js +19 -21
  108. package/docs/body-content.md +2 -2
  109. package/docs/class-components.md +3 -3
  110. package/docs/express.md +1 -1
  111. package/docs/lasso.md +3 -6
  112. package/docs/marko-v4.md +5 -5
  113. package/docs/redux.md +1 -1
  114. package/docs/server-side-rendering.md +2 -2
  115. package/docs/why-is-marko-fast.md +2 -10
  116. package/package.json +1 -1
  117. package/src/browser-refresh.js +2 -2
  118. package/src/compiler/CodeWriter.js +1 -3
  119. package/src/compiler/CompileContext.js +3 -8
  120. package/src/compiler/Compiler.js +4 -4
  121. package/src/compiler/HtmlJsParser.js +1 -1
  122. package/src/compiler/Migrator.js +1 -1
  123. package/src/compiler/Parser.js +3 -3
  124. package/src/compiler/ast/CustomTag.js +9 -11
  125. package/src/compiler/ast/HtmlAttribute/html/generateCode.js +2 -2
  126. package/src/compiler/ast/HtmlAttribute/index.js +1 -1
  127. package/src/compiler/ast/HtmlElement/vdom/HtmlElementVDOM.js +1 -1
  128. package/src/compiler/ast/HtmlElement/vdom/generateCode.js +1 -1
  129. package/src/compiler/ast/TemplateRoot.js +1 -1
  130. package/src/compiler/ast/Text/html/generateCode.js +3 -3
  131. package/src/compiler/ast/Text/vdom/generateCode.js +1 -1
  132. package/src/compiler/index.js +4 -4
  133. package/src/compiler/modules.js +4 -4
  134. package/src/compiler/util/finger-print.js +1 -1
  135. package/src/compiler/util/parseExpression.js +1 -1
  136. package/src/compiler/util/parseStatement.js +1 -1
  137. package/src/compiler/util/removeDashes.js +1 -1
  138. package/src/compiler/util/safeVarName.js +1 -1
  139. package/src/compiler/util/tokenizer.js +1 -1
  140. package/src/core-tags/cache/cached-fragment-tag-transformer.js +1 -1
  141. package/src/core-tags/cache/cached-fragment-tag.js +4 -4
  142. package/src/core-tags/cache/default-cache-manager.js +3 -3
  143. package/src/core-tags/components/TransformHelper/ComponentArgsCompiler.js +1 -1
  144. package/src/core-tags/components/TransformHelper/convertToComponent.js +1 -1
  145. package/src/core-tags/components/TransformHelper/handleComponentPreserveAttrs.js +1 -1
  146. package/src/core-tags/components/init-components-tag.js +1 -54
  147. package/src/core-tags/components/package.json +1 -3
  148. package/src/core-tags/components/preferred-script-location-tag.js +1 -1
  149. package/src/core-tags/components/preserve-tag.js +1 -27
  150. package/src/core-tags/components/util/getTransformHelper.js +1 -1
  151. package/src/core-tags/core/await/AsyncValue.js +3 -3
  152. package/src/core-tags/core/await/noop-render.js +1 -1
  153. package/src/core-tags/core/await/renderer.js +8 -7
  154. package/src/core-tags/core/await/reorderer-renderer.js +35 -14
  155. package/src/core-tags/core/await/transformer.js +1 -1
  156. package/src/core-tags/core/core-transformer.js +2 -2
  157. package/src/core-tags/migrate/all-tags/index.js +1 -1
  158. package/src/core-tags/migrate/all-templates/index.js +1 -1
  159. package/src/core-tags/migrate/include-tag.js +3 -2
  160. package/src/core-tags/migrate/util/parseFor.js +3 -2
  161. package/src/core-tags/migrate/util/printJS.js +1 -1
  162. package/src/defineRenderer.js +1 -1
  163. package/src/express.js +1 -1
  164. package/src/hot-reload.js +5 -5
  165. package/src/index.js +1 -41
  166. package/src/legacy-helpers/notEmpty.js +1 -1
  167. package/src/node-require/index.js +12 -1
  168. package/src/{runtime/components/beginComponent-browser.js → node_modules/@internal/components-beginComponent/index-browser.js} +1 -1
  169. package/src/{runtime/components/beginComponent.js → node_modules/@internal/components-beginComponent/index.js} +2 -2
  170. package/src/node_modules/@internal/components-beginComponent/package.json +11 -0
  171. package/src/{runtime/components/legacy/defineWidget-legacy-browser.js → node_modules/@internal/components-define-widget-legacy/index-browser.js} +21 -23
  172. package/src/node_modules/@internal/components-define-widget-legacy/index.js +18 -0
  173. package/src/node_modules/@internal/components-define-widget-legacy/package.json +11 -0
  174. package/src/{runtime/components/endComponent.js → node_modules/@internal/components-endComponent/index.js} +1 -1
  175. package/src/node_modules/@internal/components-endComponent/package.json +11 -0
  176. package/src/node_modules/@internal/components-entry/index-browser.js +9 -0
  177. package/src/node_modules/@internal/components-entry/index.js +301 -0
  178. package/src/node_modules/@internal/components-entry/package.json +11 -0
  179. package/src/node_modules/@internal/components-entry-legacy/index-browser.js +74 -0
  180. package/src/node_modules/@internal/components-entry-legacy/index.js +15 -0
  181. package/src/node_modules/@internal/components-entry-legacy/package.json +11 -0
  182. package/src/{runtime/components/init-components-browser.js → node_modules/@internal/components-registry/index-browser.js} +240 -75
  183. package/src/node_modules/@internal/components-registry/index.js +44 -0
  184. package/src/node_modules/@internal/components-registry/package.json +11 -0
  185. package/src/{runtime/components/util-browser.js → node_modules/@internal/components-util/index-browser.js} +11 -10
  186. package/src/{runtime/components/util.js → node_modules/@internal/components-util/index.js} +0 -2
  187. package/src/node_modules/@internal/components-util/package.json +11 -0
  188. package/src/node_modules/@internal/create-readable/index-browser.js +30 -0
  189. package/src/node_modules/@internal/create-readable/index.js +57 -0
  190. package/src/node_modules/@internal/create-readable/package.json +11 -0
  191. package/src/node_modules/@internal/init-components-tag/index.js +54 -0
  192. package/src/node_modules/@internal/init-components-tag/package.json +11 -0
  193. package/src/{loader/index-default.js → node_modules/@internal/loader/index.js} +2 -2
  194. package/src/node_modules/@internal/loader/package.json +11 -0
  195. package/src/node_modules/@internal/preserve-tag/index.js +27 -0
  196. package/src/node_modules/@internal/preserve-tag/package.json +11 -0
  197. package/src/node_modules/@internal/set-immediate/index-browser.js +17 -0
  198. package/src/node_modules/@internal/set-immediate/index-worker.js +2 -0
  199. package/src/node_modules/@internal/set-immediate/index.js +2 -0
  200. package/src/node_modules/@internal/set-immediate/package.json +11 -0
  201. package/src/runtime/RenderResult.js +20 -18
  202. package/src/runtime/components/Component.js +44 -41
  203. package/src/runtime/components/ComponentDef.js +9 -9
  204. package/src/runtime/components/ComponentsContext.js +4 -5
  205. package/src/runtime/components/GlobalComponentsContext.js +2 -1
  206. package/src/runtime/components/KeySequence.js +1 -1
  207. package/src/runtime/components/State.js +6 -6
  208. package/src/runtime/components/attach-detach.js +4 -4
  209. package/src/runtime/components/defineComponent.js +1 -1
  210. package/src/runtime/components/event-delegation.js +10 -10
  211. package/src/runtime/components/index.js +1 -301
  212. package/src/runtime/components/jquery.js +2 -2
  213. package/src/runtime/components/legacy/browser.json +1 -1
  214. package/src/runtime/components/legacy/defineRenderer-legacy.js +5 -6
  215. package/src/runtime/components/legacy/defineWidget-legacy.js +1 -18
  216. package/src/runtime/components/legacy/dependencies/html.js +1 -1
  217. package/src/runtime/components/legacy/dependencies/index.js +3 -3
  218. package/src/runtime/components/legacy/helper-getWidgetFromOut.js +3 -3
  219. package/src/runtime/components/legacy/index.js +1 -15
  220. package/src/runtime/components/legacy/renderer-legacy.js +7 -7
  221. package/src/runtime/components/ready.js +2 -2
  222. package/src/runtime/components/registry.js +1 -44
  223. package/src/runtime/components/renderer.js +4 -4
  224. package/src/runtime/components/update-manager.js +1 -1
  225. package/src/runtime/dom-insert.js +8 -8
  226. package/src/runtime/helpers/_weak-map.js +2 -2
  227. package/src/runtime/helpers/assign.js +3 -1
  228. package/src/runtime/helpers/bind-component.js +2 -2
  229. package/src/runtime/helpers/dynamic-tag.js +2 -4
  230. package/src/runtime/helpers/for-in.js +1 -1
  231. package/src/runtime/helpers/load-nested-tag.js +1 -1
  232. package/src/runtime/helpers/load-template.js +1 -1
  233. package/src/runtime/helpers/merge.js +3 -1
  234. package/src/runtime/helpers/noop.js +1 -1
  235. package/src/runtime/helpers/style-value.js +1 -1
  236. package/src/runtime/helpers/to-string.js +1 -1
  237. package/src/runtime/html/AsyncStream.js +90 -76
  238. package/src/runtime/html/BufferedWriter.js +6 -2
  239. package/src/runtime/html/StringWriter.js +15 -9
  240. package/src/runtime/html/helpers/attrs.js +3 -3
  241. package/src/runtime/html/helpers/data-marko.js +0 -2
  242. package/src/runtime/html/helpers/escape-quotes.js +1 -1
  243. package/src/runtime/html/helpers/escape-xml.js +1 -1
  244. package/src/runtime/html/index.js +23 -13
  245. package/src/runtime/queueMicrotask.js +2 -2
  246. package/src/runtime/renderable.js +9 -9
  247. package/src/runtime/vdom/AsyncVDOMBuilder.js +46 -51
  248. package/src/runtime/vdom/VComment.js +3 -3
  249. package/src/runtime/vdom/VDocumentFragment.js +3 -3
  250. package/src/runtime/vdom/VElement.js +17 -13
  251. package/src/runtime/vdom/VFragment.js +1 -1
  252. package/src/runtime/vdom/VNode.js +2 -2
  253. package/src/runtime/vdom/VText.js +3 -3
  254. package/src/runtime/vdom/helpers/attrs.js +1 -1
  255. package/src/runtime/vdom/helpers/const.js +2 -2
  256. package/src/runtime/vdom/helpers/v-element.js +1 -1
  257. package/src/runtime/vdom/helpers/v-text.js +1 -1
  258. package/src/runtime/vdom/index.js +21 -23
  259. package/src/runtime/vdom/morphdom/fragment.js +8 -7
  260. package/src/runtime/vdom/morphdom/index.js +19 -9
  261. package/src/runtime/vdom/morphdom/specialElHandlers.js +6 -6
  262. package/src/runtime/vdom/parse-html.js +4 -4
  263. package/src/runtime/vdom/preserve-attrs.js +1 -1
  264. package/src/runtime/vdom/vdom.js +5 -7
  265. package/src/taglib/taglib-finder/index.js +1 -1
  266. package/src/taglib/taglib-loader/Tag.js +5 -5
  267. package/src/taglib/taglib-loader/Taglib.js +2 -2
  268. package/src/taglib/taglib-loader/json-file-reader.js +1 -1
  269. package/src/taglib/taglib-loader/loadAttributeFromProps.js +1 -1
  270. package/src/taglib/taglib-loader/loadTagFromProps.js +5 -6
  271. package/src/taglib/taglib-loader/tag-def-from-code.js +2 -1
  272. package/src/taglib/taglib-lookup/TaglibLookup.js +2 -2
  273. package/src/taglib/taglib-lookup/index.js +1 -1
  274. package/dist/core-tags/core/await/client-reorder-browser.js +0 -1
  275. package/dist/core-tags/core/await/client-reorder-runtime.min.js +0 -5
  276. package/dist/core-tags/core/await/client-reorder.js +0 -11
  277. package/dist/core-tags/core/await/package.json +0 -6
  278. package/dist/index-browser.js +0 -4
  279. package/dist/loader/index.js +0 -7
  280. package/dist/loader/package.json +0 -5
  281. package/dist/node-require/index-browser.js +0 -1
  282. package/dist/package.json +0 -5
  283. package/dist/runtime/components/beginComponent-browser.js +0 -12
  284. package/dist/runtime/components/endComponent.js +0 -11
  285. package/dist/runtime/components/index-browser.js +0 -14
  286. package/dist/runtime/components/init-components.js +0 -1
  287. package/dist/runtime/components/legacy/package.json +0 -6
  288. package/dist/runtime/components/package.json +0 -12
  289. package/dist/runtime/components/registry-browser.js +0 -73
  290. package/dist/runtime/html/Template.js +0 -63
  291. package/dist/runtime/package.json +0 -5
  292. package/dist/runtime/setImmediate.js +0 -19
  293. package/src/core-tags/core/await/client-reorder-browser.js +0 -1
  294. package/src/core-tags/core/await/client-reorder-runtime.min.js +0 -1
  295. package/src/core-tags/core/await/client-reorder.js +0 -14
  296. package/src/core-tags/core/await/package.json +0 -6
  297. package/src/index-browser.js +0 -3
  298. package/src/loader/index.js +0 -7
  299. package/src/loader/package.json +0 -5
  300. package/src/node-require/index-browser.js +0 -1
  301. package/src/package.json +0 -5
  302. package/src/runtime/components/index-browser.js +0 -15
  303. package/src/runtime/components/init-components.js +0 -1
  304. package/src/runtime/components/legacy/index-browser.js +0 -73
  305. package/src/runtime/components/legacy/package.json +0 -6
  306. package/src/runtime/components/package.json +0 -12
  307. package/src/runtime/components/registry-browser.js +0 -103
  308. package/src/runtime/html/Template.js +0 -62
  309. package/src/runtime/package.json +0 -5
  310. package/src/runtime/setImmediate.js +0 -21
  311. /package/dist/{runtime/components/endComponent-browser.js → node_modules/@internal/components-endComponent/index-browser.js} +0 -0
  312. /package/dist/{core-tags/components/init-components-tag-browser.js → node_modules/@internal/init-components-tag/index-browser.js} +0 -0
  313. /package/dist/{loader → node_modules/@internal/loader}/index-browser.js +0 -0
  314. /package/src/{runtime/components/endComponent-browser.js → node_modules/@internal/components-endComponent/index-browser.js} +0 -0
  315. /package/src/{core-tags/components/init-components-tag-browser.js → node_modules/@internal/init-components-tag/index-browser.js} +0 -0
  316. /package/src/{loader → node_modules/@internal/loader}/index-browser.js +0 -0
  317. /package/src/{core-tags/components/preserve-tag-browser.js → node_modules/@internal/preserve-tag/index-browser.js} +0 -0
@@ -2,12 +2,13 @@
2
2
 
3
3
  var complain;
4
4
  var domData = require("../components/dom-data");
5
- var componentsUtil = require("../components/util");
6
- var vElementByDOMNode = domData.aj_;
5
+ var componentsUtil = require("@internal/components-util");
6
+ var vElementByDOMNode = domData._L_;
7
7
  var VNode = require("./VNode");
8
8
  var inherit = require("raptor-util/inherit");
9
9
  var ATTR_XLINK_HREF = "xlink:href";
10
10
  var xmlnsRegExp = /^xmlns(:|$)/;
11
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
11
12
  var NS_XLINK = "http://www.w3.org/1999/xlink";
12
13
  var NS_HTML = "http://www.w3.org/1999/xhtml";
13
14
  var NS_MATH = "http://www.w3.org/1998/Math/MathML";
@@ -46,7 +47,7 @@ function convertAttrValue(type, value) {
46
47
 
47
48
  function assign(a, b) {
48
49
  for (var key in b) {
49
- if (b.hasOwnProperty(key)) {
50
+ if (hasOwnProperty.call(b, key)) {
50
51
  a[key] = b[key];
51
52
  }
52
53
  }
@@ -69,21 +70,21 @@ function removeAttribute(el, namespaceURI, name) {
69
70
  }
70
71
 
71
72
  function VElementClone(other) {
72
- this.bW_ = other.bW_;
73
- this.bT_ = null;
74
- this.bU_ = null;
73
+ this.cb_ = other.cb_;
74
+ this.bZ_ = null;
75
+ this.c__ = null;
75
76
 
76
- this.bS_ = other.bS_;
77
- this.bX_ = other.bX_;
78
- this.aV_ = other.aV_;
79
77
  this.bY_ = other.bY_;
80
- this._N_ = other._N_;
81
- this.bZ_ = other.bZ_;
82
- this.c__ = other.c__;
78
+ this.cc_ = other.cc_;
79
+ this._P_ = other._P_;
80
+ this.cd_ = other.cd_;
81
+ this.x_ = other.x_;
82
+ this.ce_ = other.ce_;
83
+ this.cf_ = other.cf_;
83
84
  }
84
85
 
85
86
  function VElement(tagName, attrs, key, ownerComponent, childCount, flags, props) {
86
- this.bP_(childCount, ownerComponent);
87
+ this.bV_(childCount, ownerComponent);
87
88
 
88
89
  var constId;
89
90
 
@@ -91,19 +92,19 @@ function VElement(tagName, attrs, key, ownerComponent, childCount, flags, props)
91
92
  constId = props.i;
92
93
  }
93
94
 
94
- this.bS_ = key;
95
- this._N_ = flags || 0;
96
- this.bX_ = attrs || EMPTY_OBJECT;
97
- this.aV_ = props || EMPTY_OBJECT;
98
- this.bY_ = tagName;
99
- this.bZ_ = null;
100
- this.c__ = constId;
101
- this.t_ = false;
102
- this.s_ = false;
95
+ this.bY_ = key;
96
+ this.x_ = flags || 0;
97
+ this.cc_ = attrs || EMPTY_OBJECT;
98
+ this._P_ = props || EMPTY_OBJECT;
99
+ this.cd_ = tagName;
100
+ this.ce_ = null;
101
+ this.cf_ = constId;
102
+ this.ae_ = false;
103
+ this.ad_ = false;
103
104
  }
104
105
 
105
106
  VElement.prototype = {
106
- bR_: 1,
107
+ bX_: 1,
107
108
 
108
109
  __: function () {
109
110
  return new VElementClone(this);
@@ -117,10 +118,10 @@ VElement.prototype = {
117
118
  * @param {int|null} childCount The number of child nodes (or `null` if not known)
118
119
  */
119
120
  e: function (tagName, attrs, key, ownerComponent, childCount, flags, props) {
120
- var child = this.bI_(new VElement(tagName, attrs, key, ownerComponent, childCount, flags, props));
121
+ var child = this.bO_(new VElement(tagName, attrs, key, ownerComponent, childCount, flags, props));
121
122
 
122
123
  if (childCount === 0) {
123
- return this.ca_();
124
+ return this.cg_();
124
125
  } else {
125
126
  return child;
126
127
  }
@@ -134,18 +135,18 @@ VElement.prototype = {
134
135
  */
135
136
  n: function (node, ownerComponent) {
136
137
  node = node.__();
137
- node.aU_ = ownerComponent;
138
- this.bI_(node);
139
- return this.ca_();
138
+ node._N_ = ownerComponent;
139
+ this.bO_(node);
140
+ return this.cg_();
140
141
  },
141
142
 
142
- bO_: function (doc, parentNamespaceURI) {
143
- var tagName = this.bY_;
144
- var attributes = this.bX_;
143
+ bU_: function (host, parentNamespaceURI) {
144
+ var tagName = this.cd_;
145
+ var attributes = this.cc_;
145
146
  var namespaceURI = DEFAULT_NS[tagName] || parentNamespaceURI || NS_HTML;
146
147
 
147
- var flags = this._N_;
148
- var el = doc.createElementNS(namespaceURI, tagName);
148
+ var flags = this.x_;
149
+ var el = (host.ownerDocument || host).createElementNS(namespaceURI, tagName);
149
150
 
150
151
  if (flags & FLAG_CUSTOM_ELEMENT) {
151
152
  assign(el, attributes);
@@ -171,7 +172,7 @@ VElement.prototype = {
171
172
  }
172
173
 
173
174
  if (tagName === "textarea") {
174
- el.defaultValue = el.value = this.w_;
175
+ el.defaultValue = el.value = this.g_;
175
176
  }
176
177
  }
177
178
 
@@ -180,11 +181,11 @@ VElement.prototype = {
180
181
  return el;
181
182
  },
182
183
 
183
- cb_: function (name) {
184
+ ch_: function (name) {
184
185
  // We don't care about the namespaces since the there
185
186
  // is no chance that attributes with the same name will have
186
187
  // different namespaces
187
- var value = this.bX_[name];
188
+ var value = this.cc_[name];
188
189
  return value != null && value !== false;
189
190
  }
190
191
  };
@@ -196,23 +197,23 @@ var proto = VElementClone.prototype = VElement.prototype;
196
197
  ["checked", "selected", "disabled"].forEach(function (name) {
197
198
  defineProperty(proto, name, {
198
199
  get: function () {
199
- var value = this.bX_[name];
200
+ var value = this.cc_[name];
200
201
  return value !== false && value != null;
201
202
  }
202
203
  });
203
204
  });
204
205
 
205
- defineProperty(proto, "w_", {
206
+ defineProperty(proto, "g_", {
206
207
  get: function () {
207
- var value = this.bZ_;
208
+ var value = this.ce_;
208
209
  if (value == null) {
209
- value = this.bX_.value;
210
+ value = this.cc_.value;
210
211
  }
211
- return value != null && value !== false ? value + "" : this.bX_.type === "checkbox" || this.bX_.type === "radio" ? "on" : "";
212
+ return value != null && value !== false ? value + "" : this.cc_.type === "checkbox" || this.cc_.type === "radio" ? "on" : "";
212
213
  }
213
214
  });
214
215
 
215
- VElement.cc_ = function (attrs) {
216
+ VElement.ci_ = function (attrs) {
216
217
  // By default this static method is a no-op, but if there are any
217
218
  // compiled components that have "no-update" attributes then
218
219
  // `preserve-attrs.js` will be imported and this method will be replaced
@@ -234,7 +235,7 @@ function virtualizeElement(node, virtualizeChildNodes, ownerComponent) {
234
235
  var attrName = attr.name;
235
236
  if (!xmlnsRegExp.test(attrName)) {
236
237
  if (attrName === "data-marko") {
237
- props = componentsUtil.an_(node);
238
+ props = componentsUtil._r_(node);
238
239
  } else if (attr.namespaceURI === NS_XLINK) {
239
240
  attrs[ATTR_XLINK_HREF] = attr.value;
240
241
  } else {
@@ -255,8 +256,8 @@ function virtualizeElement(node, virtualizeChildNodes, ownerComponent) {
255
256
  , 0 /*flags*/
256
257
  , props);
257
258
 
258
- if (vdomEl.bY_ === "textarea") {
259
- vdomEl.bZ_ = node.value;
259
+ if (vdomEl.cd_ === "textarea") {
260
+ vdomEl.ce_ = node.value;
260
261
  } else if (virtualizeChildNodes) {
261
262
  virtualizeChildNodes(node, vdomEl, ownerComponent);
262
263
  }
@@ -264,18 +265,18 @@ function virtualizeElement(node, virtualizeChildNodes, ownerComponent) {
264
265
  return vdomEl;
265
266
  }
266
267
 
267
- VElement.cd_ = virtualizeElement;
268
+ VElement.cj_ = virtualizeElement;
268
269
 
269
- VElement.ce_ = function (fromEl, vFromEl, toEl) {
270
- var removePreservedAttributes = VElement.cc_;
270
+ VElement.ck_ = function (fromEl, vFromEl, toEl) {
271
+ var removePreservedAttributes = VElement.ci_;
271
272
 
272
- var fromFlags = vFromEl._N_;
273
- var toFlags = toEl._N_;
273
+ var fromFlags = vFromEl.x_;
274
+ var toFlags = toEl.x_;
274
275
 
275
276
  vElementByDOMNode.set(fromEl, toEl);
276
277
 
277
- var attrs = toEl.bX_;
278
- var props = toEl.aV_;
278
+ var attrs = toEl.cc_;
279
+ var props = toEl._P_;
279
280
 
280
281
  if (toFlags & FLAG_CUSTOM_ELEMENT) {
281
282
  return assign(fromEl, attrs);
@@ -291,7 +292,7 @@ VElement.ce_ = function (fromEl, vFromEl, toEl) {
291
292
  // real VElement node will not have the expando property
292
293
  // so we build the attribute map from the expando property
293
294
 
294
- var oldAttrs = vFromEl.bX_;
295
+ var oldAttrs = vFromEl.cc_;
295
296
 
296
297
  if (oldAttrs) {
297
298
  if (oldAttrs === attrs) {
@@ -363,7 +364,7 @@ VElement.ce_ = function (fromEl, vFromEl, toEl) {
363
364
  // was not a virtualized node (i.e., a node that was not rendered by a
364
365
  // Marko template, but rather a node that was created from an HTML
365
366
  // string or a real DOM node).
366
- if (toEl.bS_ === null || fromFlags & FLAG_SPREAD_ATTRS) {
367
+ if (toEl.bY_ === null || fromFlags & FLAG_SPREAD_ATTRS) {
367
368
  for (attrName in oldAttrs) {
368
369
  if (!(attrName in attrs)) {
369
370
  if (attrName === ATTR_XLINK_HREF) {
@@ -1,21 +1,21 @@
1
1
  var domData = require("../components/dom-data");
2
- var keysByDOMNode = domData.al_;
3
- var vElementByDOMNode = domData.aj_;
2
+ var keysByDOMNode = domData._K_;
3
+ var vElementByDOMNode = domData._L_;
4
4
  var VNode = require("./VNode");
5
5
  var inherit = require("raptor-util/inherit");
6
- var createFragmentNode = require("./morphdom/fragment").au_;
6
+ var createFragmentNode = require("./morphdom/fragment")._m_;
7
7
 
8
8
  function VFragment(key, ownerComponent, preserve) {
9
- this.bP_(null /* childCount */, ownerComponent);
10
- this.bS_ = key;
11
- this.t_ = preserve;
9
+ this.bV_(null /* childCount */, ownerComponent);
10
+ this.bY_ = key;
11
+ this.ae_ = preserve;
12
12
  }
13
13
 
14
14
  VFragment.prototype = {
15
- bR_: 12,
16
- bO_: function () {
15
+ bX_: 12,
16
+ bU_: function () {
17
17
  var fragment = createFragmentNode();
18
- keysByDOMNode.set(fragment, this.bS_);
18
+ keysByDOMNode.set(fragment, this.bY_);
19
19
  vElementByDOMNode.set(fragment, this);
20
20
  return fragment;
21
21
  }
@@ -2,20 +2,20 @@
2
2
  function VNode() {}
3
3
 
4
4
  VNode.prototype = {
5
- bP_: function (finalChildCount, ownerComponent) {
6
- this.cf_ = finalChildCount;
7
- this.cg_ = 0;
8
- this.bW_ = null;
9
- this.ch_ = null;
10
- this.bT_ = null;
11
- this.bU_ = null;
12
- this.aU_ = ownerComponent;
5
+ bV_: function (finalChildCount, ownerComponent) {
6
+ this.cl_ = finalChildCount;
7
+ this.cm_ = 0;
8
+ this.cb_ = null;
9
+ this.cn_ = null;
10
+ this.bZ_ = null;
11
+ this.c__ = null;
12
+ this._N_ = ownerComponent;
13
13
  },
14
14
 
15
15
  get a_() {
16
- var firstChild = this.bW_;
16
+ var firstChild = this.cb_;
17
17
 
18
- if (firstChild && firstChild.bV_) {
18
+ if (firstChild && firstChild.ca_) {
19
19
  var nestedFirstChild = firstChild.a_;
20
20
  // The first child is a DocumentFragment node.
21
21
  // If the DocumentFragment node has a first child then we will return that.
@@ -28,16 +28,16 @@ VNode.prototype = {
28
28
  },
29
29
 
30
30
  get b_() {
31
- var nextSibling = this.bU_;
31
+ var nextSibling = this.c__;
32
32
 
33
33
  if (nextSibling) {
34
- if (nextSibling.bV_) {
34
+ if (nextSibling.ca_) {
35
35
  var firstChild = nextSibling.a_;
36
36
  return firstChild || nextSibling.b_;
37
37
  }
38
38
  } else {
39
- var parentNode = this.bT_;
40
- if (parentNode && parentNode.bV_) {
39
+ var parentNode = this.bZ_;
40
+ if (parentNode && parentNode.ca_) {
41
41
  return parentNode.b_;
42
42
  }
43
43
  }
@@ -45,38 +45,38 @@ VNode.prototype = {
45
45
  return nextSibling;
46
46
  },
47
47
 
48
- bI_: function (child) {
49
- this.cg_++;
48
+ bO_: function (child) {
49
+ this.cm_++;
50
50
 
51
- if (this.bY_ === "textarea") {
52
- if (child.ci_) {
53
- var childValue = child.bQ_;
54
- this.bZ_ = (this.bZ_ || "") + childValue;
55
- } else if (child.t_ || child.s_) {
56
- this.cj_ = true;
51
+ if (this.cd_ === "textarea") {
52
+ if (child.co_) {
53
+ var childValue = child.bW_;
54
+ this.ce_ = (this.ce_ || "") + childValue;
55
+ } else if (child.ae_ || child.ad_) {
56
+ this.cp_ = true;
57
57
  } else {
58
58
  throw TypeError();
59
59
  }
60
60
  } else {
61
- var lastChild = this.ch_;
61
+ var lastChild = this.cn_;
62
62
 
63
- child.bT_ = this;
63
+ child.bZ_ = this;
64
64
 
65
65
  if (lastChild) {
66
- lastChild.bU_ = child;
66
+ lastChild.c__ = child;
67
67
  } else {
68
- this.bW_ = child;
68
+ this.cb_ = child;
69
69
  }
70
70
 
71
- this.ch_ = child;
71
+ this.cn_ = child;
72
72
  }
73
73
 
74
74
  return child;
75
75
  },
76
76
 
77
- ca_: function finishChild() {
78
- if (this.cg_ === this.cf_ && this.bT_) {
79
- return this.bT_.ca_();
77
+ cg_: function finishChild() {
78
+ if (this.cm_ === this.cl_ && this.bZ_) {
79
+ return this.bZ_.cg_();
80
80
  } else {
81
81
  return this;
82
82
  }
@@ -2,21 +2,21 @@ var VNode = require("./VNode");
2
2
  var inherit = require("raptor-util/inherit");
3
3
 
4
4
  function VText(value, ownerComponent) {
5
- this.bP_(-1 /* no children */, ownerComponent);
6
- this.bQ_ = value;
5
+ this.bV_(-1 /* no children */, ownerComponent);
6
+ this.bW_ = value;
7
7
  }
8
8
 
9
9
  VText.prototype = {
10
- ci_: true,
10
+ co_: true,
11
11
 
12
- bR_: 3,
12
+ bX_: 3,
13
13
 
14
- bO_: function (doc) {
15
- return doc.createTextNode(this.bQ_);
14
+ bU_: function (host) {
15
+ return (host.ownerDocument || host).createTextNode(this.bW_);
16
16
  },
17
17
 
18
18
  __: function () {
19
- return new VText(this.bQ_);
19
+ return new VText(this.bW_);
20
20
  }
21
21
  };
22
22
 
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- var VElement = require("../vdom").bp_;
3
+ var VElement = require("../vdom").bw_;
4
4
 
5
5
  module.exports = function (tagName, attrs, key, component, childCount, flags, props) {
6
6
  return new VElement(tagName, attrs, key, component, childCount, flags, props);
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- var VText = require("../vdom").bs_;
3
+ var VText = require("../vdom").bz_;
4
4
 
5
5
  module.exports = function (value) {
6
6
  return new VText(value);
@@ -1,11 +1,8 @@
1
1
  "use strict";
2
2
 
3
- require("../../");
4
-
5
- // helpers provide a core set of various utility methods
6
- // that are available in every template
7
- var AsyncVDOMBuilder = require("./AsyncVDOMBuilder");
8
- var makeRenderable = require("../renderable");
3
+ typeof window === "object" && (window.Marko = {
4
+ Component: function () {}
5
+ });
9
6
 
10
7
  /**
11
8
  * Method is for internal usage only. This method
@@ -13,27 +10,20 @@ var makeRenderable = require("../renderable");
13
10
  * it is used to create a new Template instance.
14
11
  * @private
15
12
  */
16
- exports.t = function createTemplate(path) {
17
- return new Template(path);
13
+ exports.t = function createTemplate(typeName) {
14
+ return new Template(typeName);
18
15
  };
19
16
 
20
- function Template(path, func) {
21
- this.path = path;
17
+ exports.Template = Template;
18
+ function Template(typeName, func) {
19
+ this.path = typeName;
22
20
  this._ = func;
23
21
  this.meta = undefined;
24
22
  }
25
23
 
26
- function createOut(globalData, parent, parentOut) {
24
+ var AsyncVDOMBuilder = require("./AsyncVDOMBuilder");
25
+ require("../createOut").bf_(Template.prototype.createOut = function createOut(globalData, parent, parentOut) {
27
26
  return new AsyncVDOMBuilder(globalData, parent, parentOut);
28
- }
29
-
30
- var Template_prototype = Template.prototype = {
31
- createOut: createOut
32
- };
33
-
34
- makeRenderable(Template_prototype);
35
-
36
- exports.Template = Template;
37
- exports.bo_ = createOut;
27
+ });
38
28
 
39
- require("../createOut").aY_(createOut);
29
+ require("../renderable")(Template.prototype);
@@ -1,5 +1,5 @@
1
1
  var helpers = require("./helpers");
2
- var insertBefore = helpers.aZ_;
2
+ var insertBefore = helpers.bg_;
3
3
 
4
4
  var fragmentPrototype = {
5
5
  nodeType: 12,
@@ -66,12 +66,12 @@ function createFragmentNode(startNode, nextNode, parentNode) {
66
66
 
67
67
  function beginFragmentNode(startNode, parentNode) {
68
68
  var fragment = createFragmentNode(startNode, null, parentNode);
69
- fragment.ck_ = function (nextNode) {
70
- fragment.ck_ = null;
69
+ fragment.cq_ = function (nextNode) {
70
+ fragment.cq_ = null;
71
71
  insertBefore(fragment.endNode, nextNode, parentNode || startNode.parentNode);
72
72
  };
73
73
  return fragment;
74
74
  }
75
75
 
76
- exports.au_ = createFragmentNode;
77
- exports.cl_ = beginFragmentNode;
76
+ exports._m_ = createFragmentNode;
77
+ exports.cr_ = beginFragmentNode;
@@ -27,8 +27,8 @@ function removeChild(node) {
27
27
  if (node.remove) node.remove();else node.parentNode.removeChild(node);
28
28
  }
29
29
 
30
- exports.aZ_ = insertBefore;
31
- exports.b__ = insertAfter;
30
+ exports.bg_ = insertBefore;
31
+ exports.bh_ = insertAfter;
32
32
  exports.b_ = nextSibling;
33
33
  exports.a_ = firstChild;
34
- exports.ba_ = removeChild;
34
+ exports.bi_ = removeChild;