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
@@ -1,14 +1,13 @@
1
1
  var EventEmitter = require("events-light");
2
2
  var vdom = require("./vdom");
3
- var VElement = vdom.bp_;
4
- var VDocumentFragment = vdom.bq_;
5
- var VComment = vdom.br_;
6
- var VText = vdom.bs_;
7
- var VComponent = vdom.bt_;
8
- var VFragment = vdom.bu_;
9
- var virtualizeHTML = vdom.bv_;
3
+ var VElement = vdom.bw_;
4
+ var VDocumentFragment = vdom.bx_;
5
+ var VComment = vdom.by_;
6
+ var VText = vdom.bz_;
7
+ var VComponent = vdom.bA_;
8
+ var VFragment = vdom.bB_;
9
+ var virtualizeHTML = vdom.bC_;
10
10
  var RenderResult = require("../RenderResult");
11
- var defaultDocument = vdom.bw_;
12
11
  var morphdom = require("./morphdom");
13
12
  var attrsHelper = require("./helpers/attrs");
14
13
 
@@ -16,9 +15,9 @@ var EVENT_UPDATE = "update";
16
15
  var EVENT_FINISH = "finish";
17
16
 
18
17
  function State(tree) {
19
- this.bx_ = new EventEmitter();
20
- this.by_ = tree;
21
- this.bz_ = false;
18
+ this.bD_ = new EventEmitter();
19
+ this.bE_ = tree;
20
+ this.bF_ = false;
22
21
  }
23
22
 
24
23
  function AsyncVDOMBuilder(globalData, parentNode, parentOut) {
@@ -29,60 +28,60 @@ function AsyncVDOMBuilder(globalData, parentNode, parentOut) {
29
28
  var state;
30
29
 
31
30
  if (parentOut) {
32
- state = parentOut.P_;
31
+ state = parentOut.C_;
33
32
  } else {
34
33
  state = new State(parentNode);
35
34
  }
36
35
 
37
- this.bA_ = 1;
38
- this.bB_ = 0;
39
- this.bC_ = null;
40
- this.bD_ = parentOut;
36
+ this.bG_ = 1;
37
+ this.bH_ = 0;
38
+ this.bI_ = null;
39
+ this.bJ_ = parentOut;
41
40
 
42
41
  this.data = {};
43
- this.P_ = state;
44
- this.r_ = parentNode;
42
+ this.C_ = state;
43
+ this.ac_ = parentNode;
45
44
  this.global = globalData || {};
46
- this.bE_ = [parentNode];
47
- this.bF_ = false;
48
- this.bG_ = undefined;
49
- this.h_ = null;
50
-
51
- this.m_ = null;
52
- this.o_ = null;
53
- this.aQ_ = null;
45
+ this.bK_ = [parentNode];
46
+ this.bL_ = false;
47
+ this.bM_ = undefined;
48
+ this.t_ = null;
49
+
50
+ this.aa_ = null;
51
+ this.ab_ = null;
52
+ this.bc_ = null;
54
53
  }
55
54
 
56
55
  var proto = AsyncVDOMBuilder.prototype = {
57
- bh_: true,
58
- _c_: defaultDocument,
56
+ bq_: true,
57
+ E_: typeof document === "object" && document,
59
58
 
60
59
  bc: function (component, key, ownerComponent) {
61
60
  var vComponent = new VComponent(component, key, ownerComponent);
62
- return this.bH_(vComponent, 0, true);
61
+ return this.bN_(vComponent, 0, true);
63
62
  },
64
63
 
65
- aS_: function (component, key, ownerComponent) {
64
+ bd_: function (component, key, ownerComponent) {
66
65
  var vComponent = new VComponent(component, key, ownerComponent, true);
67
- this.bH_(vComponent, 0);
66
+ this.bN_(vComponent, 0);
68
67
  },
69
68
 
70
- bH_: function (child, childCount, pushToStack) {
71
- this.r_.bI_(child);
69
+ bN_: function (child, childCount, pushToStack) {
70
+ this.ac_.bO_(child);
72
71
  if (pushToStack === true) {
73
- this.bE_.push(child);
74
- this.r_ = child;
72
+ this.bK_.push(child);
73
+ this.ac_ = child;
75
74
  }
76
75
  return childCount === 0 ? this : child;
77
76
  },
78
77
 
79
78
  element: function (tagName, attrs, key, component, childCount, flags, props) {
80
79
  var element = new VElement(tagName, attrs, key, component, childCount, flags, props);
81
- return this.bH_(element, childCount);
80
+ return this.bN_(element, childCount);
82
81
  },
83
82
 
84
- bf_: function (tagName, attrs, key, componentDef, props) {
85
- return this.element(tagName, attrsHelper(attrs), key, componentDef.n_, 0, 0, props);
83
+ bn_: function (tagName, attrs, key, componentDef, props) {
84
+ return this.element(tagName, attrsHelper(attrs), key, componentDef.v_, 0, 0, props);
86
85
  },
87
86
 
88
87
  n: function (node, component) {
@@ -90,13 +89,13 @@ var proto = AsyncVDOMBuilder.prototype = {
90
89
  // and a node can only have one parent node.
91
90
  var clone = node.__();
92
91
  this.node(clone);
93
- clone.aU_ = component;
92
+ clone._N_ = component;
94
93
 
95
94
  return this;
96
95
  },
97
96
 
98
97
  node: function (node) {
99
- this.r_.bI_(node);
98
+ this.ac_.bO_(node);
100
99
  return this;
101
100
  },
102
101
 
@@ -115,7 +114,7 @@ var proto = AsyncVDOMBuilder.prototype = {
115
114
  text = text.toString();
116
115
  }
117
116
 
118
- this.r_.bI_(new VText(text, ownerComponent));
117
+ this.ac_.bO_(new VText(text, ownerComponent));
119
118
  return this;
120
119
  },
121
120
 
@@ -125,7 +124,7 @@ var proto = AsyncVDOMBuilder.prototype = {
125
124
 
126
125
  html: function (html, ownerComponent) {
127
126
  if (html != null) {
128
- var vdomNode = virtualizeHTML(html, this._c_ || document, ownerComponent);
127
+ var vdomNode = virtualizeHTML(html, ownerComponent);
129
128
  this.node(vdomNode);
130
129
  }
131
130
 
@@ -134,17 +133,17 @@ var proto = AsyncVDOMBuilder.prototype = {
134
133
 
135
134
  beginElement: function (tagName, attrs, key, component, childCount, flags, props) {
136
135
  var element = new VElement(tagName, attrs, key, component, childCount, flags, props);
137
- this.bH_(element, childCount, true);
136
+ this.bN_(element, childCount, true);
138
137
  return this;
139
138
  },
140
139
 
141
- bd_: function (tagName, attrs, key, componentDef, props) {
142
- return this.beginElement(tagName, attrsHelper(attrs), key, componentDef.n_, 0, 0, props);
140
+ bl_: function (tagName, attrs, key, componentDef, props) {
141
+ return this.beginElement(tagName, attrsHelper(attrs), key, componentDef.v_, 0, 0, props);
143
142
  },
144
143
 
145
144
  bf: function (key, component, preserve) {
146
145
  var fragment = new VFragment(key, component, preserve);
147
- this.bH_(fragment, null, true);
146
+ this.bN_(fragment, null, true);
148
147
  return this;
149
148
  },
150
149
 
@@ -153,52 +152,52 @@ var proto = AsyncVDOMBuilder.prototype = {
153
152
  },
154
153
 
155
154
  endElement: function () {
156
- var stack = this.bE_;
155
+ var stack = this.bK_;
157
156
  stack.pop();
158
- this.r_ = stack[stack.length - 1];
157
+ this.ac_ = stack[stack.length - 1];
159
158
  },
160
159
 
161
160
  end: function () {
162
- this.r_ = undefined;
161
+ this.ac_ = undefined;
163
162
 
164
- var remaining = --this.bA_;
165
- var parentOut = this.bD_;
163
+ var remaining = --this.bG_;
164
+ var parentOut = this.bJ_;
166
165
 
167
166
  if (remaining === 0) {
168
167
  if (parentOut) {
169
- parentOut.bJ_();
168
+ parentOut.bP_();
170
169
  } else {
171
- this.bK_();
170
+ this.bQ_();
172
171
  }
173
- } else if (remaining - this.bB_ === 0) {
174
- this.bL_();
172
+ } else if (remaining - this.bH_ === 0) {
173
+ this.bR_();
175
174
  }
176
175
 
177
176
  return this;
178
177
  },
179
178
 
180
- bJ_: function () {
181
- var remaining = --this.bA_;
179
+ bP_: function () {
180
+ var remaining = --this.bG_;
182
181
 
183
182
  if (remaining === 0) {
184
- var parentOut = this.bD_;
183
+ var parentOut = this.bJ_;
185
184
  if (parentOut) {
186
- parentOut.bJ_();
185
+ parentOut.bP_();
187
186
  } else {
188
- this.bK_();
187
+ this.bQ_();
189
188
  }
190
- } else if (remaining - this.bB_ === 0) {
191
- this.bL_();
189
+ } else if (remaining - this.bH_ === 0) {
190
+ this.bR_();
192
191
  }
193
192
  },
194
193
 
195
- bK_: function () {
196
- var state = this.P_;
197
- state.bz_ = true;
198
- state.bx_.emit(EVENT_FINISH, this.bi_());
194
+ bQ_: function () {
195
+ var state = this.C_;
196
+ state.bF_ = true;
197
+ state.bD_.emit(EVENT_FINISH, this.br_());
199
198
  },
200
199
 
201
- bL_: function () {
200
+ bR_: function () {
202
201
  var lastArray = this._last;
203
202
 
204
203
  var i = 0;
@@ -233,24 +232,24 @@ var proto = AsyncVDOMBuilder.prototype = {
233
232
  },
234
233
 
235
234
  beginAsync: function (options) {
236
- if (this.bF_) {
235
+ if (this.bL_) {
237
236
  throw Error("Tried to render async while in sync mode. Note: Client side await is not currently supported in re-renders (Issue: #942).");
238
237
  }
239
238
 
240
- var state = this.P_;
239
+ var state = this.C_;
241
240
 
242
241
  if (options) {
243
242
  if (options.last) {
244
- this.bB_++;
243
+ this.bH_++;
245
244
  }
246
245
  }
247
246
 
248
- this.bA_++;
247
+ this.bG_++;
249
248
 
250
- var documentFragment = this.r_.bM_();
249
+ var documentFragment = this.ac_.bS_();
251
250
  var asyncOut = new AsyncVDOMBuilder(this.global, documentFragment, this);
252
251
 
253
- state.bx_.emit("beginAsync", {
252
+ state.bD_.emit("beginAsync", {
254
253
  out: asyncOut,
255
254
  parentOut: this
256
255
  });
@@ -263,51 +262,51 @@ var proto = AsyncVDOMBuilder.prototype = {
263
262
  },
264
263
 
265
264
  flush: function () {
266
- var events = this.P_.bx_;
265
+ var events = this.C_.bD_;
267
266
 
268
267
  if (events.listenerCount(EVENT_UPDATE)) {
269
268
  events.emit(EVENT_UPDATE, new RenderResult(this));
270
269
  }
271
270
  },
272
271
 
273
- H_: function () {
274
- return this.P_.by_;
272
+ aj_: function () {
273
+ return this.C_.bE_;
275
274
  },
276
275
 
277
- bi_: function () {
278
- return this.bN_ || (this.bN_ = new RenderResult(this));
276
+ br_: function () {
277
+ return this.bT_ || (this.bT_ = new RenderResult(this));
279
278
  },
280
279
 
281
280
  on: function (event, callback) {
282
- var state = this.P_;
281
+ var state = this.C_;
283
282
 
284
- if (event === EVENT_FINISH && state.bz_) {
285
- callback(this.bi_());
283
+ if (event === EVENT_FINISH && state.bF_) {
284
+ callback(this.br_());
286
285
  } else if (event === "last") {
287
286
  this.onLast(callback);
288
287
  } else {
289
- state.bx_.on(event, callback);
288
+ state.bD_.on(event, callback);
290
289
  }
291
290
 
292
291
  return this;
293
292
  },
294
293
 
295
294
  once: function (event, callback) {
296
- var state = this.P_;
295
+ var state = this.C_;
297
296
 
298
- if (event === EVENT_FINISH && state.bz_) {
299
- callback(this.bi_());
297
+ if (event === EVENT_FINISH && state.bF_) {
298
+ callback(this.br_());
300
299
  } else if (event === "last") {
301
300
  this.onLast(callback);
302
301
  } else {
303
- state.bx_.once(event, callback);
302
+ state.bD_.once(event, callback);
304
303
  }
305
304
 
306
305
  return this;
307
306
  },
308
307
 
309
308
  emit: function (type, arg) {
310
- var events = this.P_.bx_;
309
+ var events = this.C_.bD_;
311
310
  switch (arguments.length) {
312
311
  case 1:
313
312
  events.emit(type);
@@ -323,17 +322,17 @@ var proto = AsyncVDOMBuilder.prototype = {
323
322
  },
324
323
 
325
324
  removeListener: function () {
326
- var events = this.P_.bx_;
325
+ var events = this.C_.bD_;
327
326
  events.removeListener.apply(events, arguments);
328
327
  return this;
329
328
  },
330
329
 
331
330
  sync: function () {
332
- this.bF_ = true;
331
+ this.bL_ = true;
333
332
  },
334
333
 
335
334
  isSync: function () {
336
- return this.bF_;
335
+ return this.bL_;
337
336
  },
338
337
 
339
338
  onLast: function (callback) {
@@ -348,20 +347,20 @@ var proto = AsyncVDOMBuilder.prototype = {
348
347
  return this;
349
348
  },
350
349
 
351
- G_: function (doc) {
352
- var node = this.bG_;
350
+ ai_: function (host) {
351
+ var node = this.bM_;
353
352
  if (!node) {
354
- var vdomTree = this.H_();
355
- // Create the root document fragment node
356
- doc = doc || this._c_ || document;
357
- this.bG_ = node = vdomTree.bO_(doc, null);
358
- morphdom(node, vdomTree, doc, this.h_);
353
+ var vdomTree = this.aj_();
354
+
355
+ if (!host) host = this.E_;
356
+ this.bM_ = node = vdomTree.bU_(host, null);
357
+ morphdom(node, vdomTree, host, this.t_);
359
358
  }
360
359
  return node;
361
360
  },
362
361
 
363
- toString: function (doc) {
364
- var docFragment = this.G_(doc);
362
+ toString: function (host) {
363
+ var docFragment = this.ai_(host);
365
364
  var html = "";
366
365
 
367
366
  var child = docFragment.firstChild;
@@ -399,15 +398,15 @@ var proto = AsyncVDOMBuilder.prototype = {
399
398
  isVDOM: true,
400
399
 
401
400
  c: function (componentDef, key, customEvents) {
402
- this.m_ = componentDef;
403
- this.o_ = key;
404
- this.aQ_ = customEvents;
401
+ this.aa_ = componentDef;
402
+ this.ab_ = key;
403
+ this.bc_ = customEvents;
405
404
  }
406
405
  };
407
406
 
408
407
  proto.e = proto.element;
409
408
  proto.be = proto.beginElement;
410
- proto.ee = proto.be_ = proto.endElement;
409
+ proto.ee = proto.bm_ = proto.endElement;
411
410
  proto.t = proto.text;
412
411
  proto.h = proto.w = proto.write = proto.html;
413
412
 
@@ -2,20 +2,20 @@ var VNode = require("./VNode");
2
2
  var inherit = require("raptor-util/inherit");
3
3
 
4
4
  function VComment(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
  VComment.prototype = {
10
- bR_: 8,
10
+ bX_: 8,
11
11
 
12
- bO_: function (doc) {
13
- var nodeValue = this.bQ_;
14
- return doc.createComment(nodeValue);
12
+ bU_: function (host) {
13
+ var nodeValue = this.bW_;
14
+ return (host.ownerDocument || host).createComment(nodeValue);
15
15
  },
16
16
 
17
17
  __: function () {
18
- return new VComment(this.bQ_);
18
+ return new VComment(this.bW_);
19
19
  }
20
20
  };
21
21
 
@@ -2,14 +2,14 @@ var VNode = require("./VNode");
2
2
  var inherit = require("raptor-util/inherit");
3
3
 
4
4
  function VComponent(component, key, ownerComponent, preserve) {
5
- this.bP_(null /* childCount */, ownerComponent);
6
- this.bS_ = key;
7
- this.n_ = component;
8
- this.t_ = preserve;
5
+ this.bV_(null /* childCount */, ownerComponent);
6
+ this.bY_ = key;
7
+ this.v_ = component;
8
+ this.ae_ = preserve;
9
9
  }
10
10
 
11
11
  VComponent.prototype = {
12
- bR_: 2
12
+ bX_: 2
13
13
  };
14
14
 
15
15
  inherit(VComponent, VNode);
@@ -4,26 +4,26 @@ var extend = require("raptor-util/extend");
4
4
 
5
5
  function VDocumentFragmentClone(other) {
6
6
  extend(this, other);
7
- this.bT_ = null;
8
- this.bU_ = null;
7
+ this.bZ_ = null;
8
+ this.c__ = null;
9
9
  }
10
10
 
11
11
  function VDocumentFragment(out) {
12
- this.bP_(null /* childCount */);
13
- this.E_ = out;
12
+ this.bV_(null /* childCount */);
13
+ this.u_ = out;
14
14
  }
15
15
 
16
16
  VDocumentFragment.prototype = {
17
- bR_: 11,
17
+ bX_: 11,
18
18
 
19
- bV_: true,
19
+ ca_: true,
20
20
 
21
21
  __: function () {
22
22
  return new VDocumentFragmentClone(this);
23
23
  },
24
24
 
25
- bO_: function (doc) {
26
- return doc.createDocumentFragment();
25
+ bU_: function (host) {
26
+ return (host.ownerDocument || host).createDocumentFragment();
27
27
  }
28
28
  };
29
29