marko 4.24.6 → 4.26.0

Sign up to get free protection for your applications and to get access to all the features.
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 +4 -4
  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
package/bin/markoc.js CHANGED
@@ -99,7 +99,7 @@ var args = require("argly")
99
99
  "Delete all *.marko.js files in the current directory",
100
100
  "$0 . --clean"
101
101
  )
102
- .validate(function(result) {
102
+ .validate(function (result) {
103
103
  if (result.help) {
104
104
  this.printUsage();
105
105
  process.exit(0);
@@ -116,7 +116,7 @@ var args = require("argly")
116
116
  process.exit(1);
117
117
  }
118
118
  })
119
- .onError(function(err) {
119
+ .onError(function (err) {
120
120
  this.printUsage();
121
121
 
122
122
  if (err) {
@@ -151,7 +151,7 @@ if (force) {
151
151
 
152
152
  var paths = args.paths;
153
153
  if (paths && paths.length) {
154
- paths.forEach(function(path) {
154
+ paths.forEach(function (path) {
155
155
  appModulePath.addPath(nodePath.resolve(cwd, path));
156
156
  });
157
157
  }
@@ -162,12 +162,12 @@ if (!ignoreRules) {
162
162
  ignoreRules = ["/node_modules", ".*"];
163
163
  }
164
164
 
165
- ignoreRules = ignoreRules.filter(function(s) {
165
+ ignoreRules = ignoreRules.filter(function (s) {
166
166
  s = s.trim();
167
167
  return s && !s.match(/^#/);
168
168
  });
169
169
 
170
- ignoreRules = ignoreRules.map(function(pattern) {
170
+ ignoreRules = ignoreRules.map(function (pattern) {
171
171
  return new Minimatch(pattern, mmOptions);
172
172
  });
173
173
 
@@ -223,10 +223,10 @@ function walk(files, options, done) {
223
223
  var fileCallback = options.file;
224
224
  var context = {
225
225
  errors: [],
226
- beginAsync: function() {
226
+ beginAsync: function () {
227
227
  pending++;
228
228
  },
229
- endAsync: function(err) {
229
+ endAsync: function (err) {
230
230
  if (err) {
231
231
  this.errors.push(err);
232
232
  }
@@ -245,17 +245,17 @@ function walk(files, options, done) {
245
245
 
246
246
  function doWalk(dir) {
247
247
  context.beginAsync();
248
- fs.readdir(dir, function(err, list) {
248
+ fs.readdir(dir, function (err, list) {
249
249
  if (err) {
250
250
  return context.endAsync(err);
251
251
  }
252
252
 
253
253
  if (list.length) {
254
- list.forEach(function(basename) {
254
+ list.forEach(function (basename) {
255
255
  var file = nodePath.join(dir, basename);
256
256
 
257
257
  context.beginAsync();
258
- fs.stat(file, function(err, stat) {
258
+ fs.stat(file, function (err, stat) {
259
259
  if (err) {
260
260
  return context.endAsync(err);
261
261
  }
@@ -296,7 +296,7 @@ if (args.clean) {
296
296
  walk(
297
297
  args.files,
298
298
  {
299
- file: function(file, context) {
299
+ file: function (file, context) {
300
300
  var basename = nodePath.basename(file);
301
301
 
302
302
  if (
@@ -305,7 +305,7 @@ if (args.clean) {
305
305
  basename.endsWith(".marko.xml.js")
306
306
  ) {
307
307
  context.beginAsync();
308
- fs.unlink(file, function(err) {
308
+ fs.unlink(file, function (err) {
309
309
  if (err) {
310
310
  return context.endAsync(err);
311
311
  }
@@ -316,7 +316,7 @@ if (args.clean) {
316
316
  }
317
317
  }
318
318
  },
319
- function() {
319
+ function () {
320
320
  if (deleteCount === 0) {
321
321
  console.log("No *.marko.js files were found. Already clean.");
322
322
  } else {
@@ -329,7 +329,7 @@ if (args.clean) {
329
329
  var compileCount = 0;
330
330
  var failed = [];
331
331
 
332
- var compile = function(path, context) {
332
+ var compile = function (path, context) {
333
333
  if (found[path]) {
334
334
  return;
335
335
  }
@@ -348,7 +348,7 @@ if (args.clean) {
348
348
 
349
349
  context.beginAsync();
350
350
 
351
- markoCompiler.compileFile(path, compileOptions, function(err, src) {
351
+ markoCompiler.compileFile(path, compileOptions, function (err, src) {
352
352
  if (err) {
353
353
  failed.push(
354
354
  'Failed to compile "' +
@@ -361,7 +361,7 @@ if (args.clean) {
361
361
  }
362
362
 
363
363
  context.beginAsync();
364
- fs.writeFile(outPath, src, { encoding: "utf8" }, function(err) {
364
+ fs.writeFile(outPath, src, { encoding: "utf8" }, function (err) {
365
365
  if (err) {
366
366
  failed.push(
367
367
  'Failed to write "' + path + '". Error: ' + (err.stack || err)
@@ -382,7 +382,7 @@ if (args.clean) {
382
382
  walk(
383
383
  args.files,
384
384
  {
385
- file: function(file, context) {
385
+ file: function (file, context) {
386
386
  var basename = nodePath.basename(file);
387
387
 
388
388
  if (
@@ -394,7 +394,7 @@ if (args.clean) {
394
394
  }
395
395
  }
396
396
  },
397
- function(err) {
397
+ function (err) {
398
398
  if (err) {
399
399
  if (failed.length) {
400
400
  console.error(
@@ -79,10 +79,7 @@ const helpers = {
79
79
  vdom: "marko/runtime/components/legacy/defineComponent-legacy",
80
80
  html: "marko/runtime/helpers/noop"
81
81
  },
82
- "defineWidget-legacy": {
83
- html: "marko/runtime/components/legacy/defineWidget-legacy",
84
- vdom: "marko/runtime/components/legacy/defineWidget-legacy-browser"
85
- },
82
+ "defineWidget-legacy": "marko/runtime/components/legacy/defineWidget-legacy",
86
83
  dynamicTag: "marko/runtime/helpers/dynamic-tag",
87
84
  escapeXml: {
88
85
  html: {
@@ -114,10 +111,8 @@ const helpers = {
114
111
  renderer: "marko/runtime/components/renderer",
115
112
  rendererLegacy: "marko/runtime/components/legacy/renderer-legacy",
116
113
  registerComponent: {
117
- vdom: {
118
- module: "marko/runtime/components/registry-browser",
119
- method: "r"
120
- }
114
+ module: "marko/runtime/components/registry",
115
+ method: "r"
121
116
  },
122
117
  str: "marko/runtime/helpers/to-string",
123
118
  styleValue: "marko/runtime/helpers/style-value",
@@ -1,52 +1 @@
1
- "use strict";
2
-
3
- const INIT_COMPONENTS_KEY = Symbol();
4
-
5
- const addComponentsFromContext = require("../../runtime/components").f_;
6
- const getInitComponentsCode = require("../../runtime/components").g_;
7
-
8
- function addComponentsFromOut(source, target) {
9
- const sourceOut = source.out || source;
10
- const targetOut = target || sourceOut;
11
- const componentsContext = sourceOut.h_;
12
- const componentDefs = targetOut.writer.get("componentDefs");
13
- addComponentsFromContext(componentsContext, componentDefs);
14
- }
15
-
16
- function addInitScript(writer) {
17
- const out = writer.state.root;
18
- const componentDefs = writer.get("componentDefs");
19
- writer.script(getInitComponentsCode(out, componentDefs));
20
- }
21
-
22
- module.exports = function render(input, out) {
23
- const $global = out.global;
24
- if ($global[INIT_COMPONENTS_KEY] === undefined) {
25
- $global[INIT_COMPONENTS_KEY] = true;
26
-
27
- out.on("await:finish", addComponentsFromOut);
28
- out.on("i_", addInitScript);
29
-
30
- if (out.isSync() === true) {
31
- // Generate initialization code for any of the UI components that were
32
- // rendered synchronously
33
- addComponentsFromOut(out);
34
- } else {
35
- // Generate initialization code for any of the UI components that were
36
- // rendered asynchronously, but were outside an `<await>` tag
37
- // (each `<await>` tag will have its own component initialization block)
38
- const asyncOut = out.beginAsync({ last: true, timeout: -1 });
39
- out.onLast(function (next) {
40
- // Ensure we're getting init code starting from the root
41
- let rootOut = out;
42
- while (rootOut._parentOut) {
43
- rootOut = rootOut._parentOut;
44
- }
45
- // Write out all of the component init code from the main out
46
- addComponentsFromOut(rootOut, asyncOut);
47
- asyncOut.end();
48
- next();
49
- });
50
- }
51
- }
52
- };
1
+ module.exports = require("@internal/init-components-tag");
@@ -1,7 +1,5 @@
1
1
  {
2
2
  "browser": {
3
- "./getRequirePath.js": "./getRequirePath-browser.js",
4
- "./init-components-tag.js": "./init-components-tag-browser.js",
5
- "./preserve-tag.js": "./preserve-tag-browser.js"
3
+ "./getRequirePath.js": "./getRequirePath-browser.js"
6
4
  }
7
5
  }
@@ -3,9 +3,9 @@
3
3
  function forceScriptTagAtThisPoint(out) {
4
4
  const writer = out.writer;
5
5
 
6
- out.global.j_ = true;
6
+ out.global.f_ = true;
7
7
  const htmlSoFar = writer.toString();
8
- out.global.j_ = undefined;
8
+ out.global.f_ = undefined;
9
9
 
10
10
  writer.clear();
11
11
  writer.write(htmlSoFar);
@@ -1,27 +1 @@
1
- var ComponentsContext = require("../../runtime/components/ComponentsContext");
2
- var getComponentsContext = ComponentsContext.u_;
3
-
4
- module.exports = function render(input, out) {
5
- var shouldPreserve = Boolean(!("i" in input) || input.i);
6
- var isComponent = !input.n;
7
-
8
- if (isComponent) {
9
- out.bf(out.o_, out.m_.n_, true);
10
- }
11
-
12
- if (input.renderBody) {
13
- if (shouldPreserve) {
14
- var componentsContext = getComponentsContext(out);
15
- var parentPreserved = componentsContext.v_;
16
- componentsContext.v_ = true;
17
- input.renderBody(out);
18
- componentsContext.v_ = parentPreserved;
19
- } else {
20
- input.renderBody(out);
21
- }
22
- }
23
-
24
- if (isComponent) {
25
- out.ef();
26
- }
27
- };
1
+ module.exports = require("@internal/preserve-tag");
@@ -5,30 +5,30 @@ function AsyncValue() {
5
5
  * The data that was provided via call to resolve(data).
6
6
  * This property is assumed to be public and available for inspection.
7
7
  */
8
- this.w_ = undefined;
8
+ this.g_ = undefined;
9
9
 
10
10
  /**
11
11
  * The data that was provided via call to reject(err)
12
12
  * This property is assumed to be public and available for inspection.
13
13
  */
14
- this.x_ = undefined;
14
+ this.h_ = undefined;
15
15
 
16
16
  /**
17
17
  * The queue of callbacks that are waiting for data
18
18
  */
19
- this.y_ = undefined;
19
+ this.i_ = undefined;
20
20
 
21
21
  /**
22
22
  * The state of the data holder (STATE_INITIAL, STATE_RESOLVED, or STATE_REJECTED)
23
23
  */
24
- this.z_ = false;
24
+ this.j_ = false;
25
25
  }
26
26
 
27
27
  function notifyCallbacks(asyncValue, err, value) {
28
- var callbacks = asyncValue.y_;
28
+ var callbacks = asyncValue.i_;
29
29
  if (callbacks) {
30
30
  // clear out the registered callbacks (we still have reference to the original value)
31
- asyncValue.y_ = undefined;
31
+ asyncValue.i_ = undefined;
32
32
 
33
33
  // invoke all of the callbacks and use their scope
34
34
  for (var i = 0; i < callbacks.length; i++) {
@@ -46,14 +46,14 @@ AsyncValue.prototype = {
46
46
  * The given callback will be invoked when there is an error or resolved data
47
47
  * available.
48
48
  */
49
- A_: function (callback) {
49
+ k_: function (callback) {
50
50
  // Do we already have data or error?
51
- if (this.z_) {
51
+ if (this.j_) {
52
52
  // invoke the callback immediately
53
- return callback(this.x_, this.w_);
53
+ return callback(this.h_, this.g_);
54
54
  }
55
55
 
56
- var callbacks = this.y_ || (this.y_ = []);
56
+ var callbacks = this.i_ || (this.i_ = []);
57
57
  callbacks.push(callback);
58
58
  },
59
59
 
@@ -63,19 +63,19 @@ AsyncValue.prototype = {
63
63
  * its initial state so that any future requests to load data will trigger a
64
64
  * new load call.
65
65
  */
66
- B_: function (err) {
67
- if (this.z_) {
66
+ l_: function (err) {
67
+ if (this.j_) {
68
68
  return;
69
69
  }
70
70
 
71
71
  // remember the error
72
- this.x_ = err;
72
+ this.h_ = err;
73
73
 
74
74
  // Go to the rejected state if we don't have a loader.
75
75
  // If we do have a loader then return to the initial state
76
76
  // (we do this so that next call to done() will trigger load
77
77
  // again in case the error was transient).
78
- this.z_ = true;
78
+ this.j_ = true;
79
79
 
80
80
  // always notify callbacks regardless of whether or not we return to the initial state
81
81
  notifyCallbacks(this, err, null);
@@ -84,8 +84,8 @@ AsyncValue.prototype = {
84
84
  /**
85
85
  * This method will trigger any callbacks to be notified of data.
86
86
  */
87
- C_: function (value) {
88
- if (this.z_) {
87
+ m_: function (value) {
88
+ if (this.j_) {
89
89
  return;
90
90
  }
91
91
 
@@ -93,9 +93,9 @@ AsyncValue.prototype = {
93
93
  var asyncValue = this;
94
94
 
95
95
  var finalPromise = value.then(function onFulfilled(value) {
96
- queueMicrotask(asyncValue.C_.bind(asyncValue, value));
96
+ queueMicrotask(asyncValue.m_.bind(asyncValue, value));
97
97
  }, function onRejected(err) {
98
- queueMicrotask(asyncValue.B_.bind(asyncValue, err));
98
+ queueMicrotask(asyncValue.l_.bind(asyncValue, err));
99
99
  });
100
100
 
101
101
  if (finalPromise.done) {
@@ -103,10 +103,10 @@ AsyncValue.prototype = {
103
103
  }
104
104
  } else {
105
105
  // remember the state
106
- this.w_ = value;
106
+ this.g_ = value;
107
107
 
108
108
  // go to the resolved state
109
- this.z_ = true;
109
+ this.j_ = true;
110
110
 
111
111
  // notify callbacks
112
112
  notifyCallbacks(this, null, value);
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
 
3
3
  var complain;
4
- var isClientReorderSupported = require("./client-reorder").isSupported;
5
4
  var AsyncValue = require("./AsyncValue");
6
5
 
7
6
  function safeRenderBody(renderBody, targetOut, data) {
@@ -19,9 +18,9 @@ function requestData(provider, timeout) {
19
18
 
20
19
  var callback = function (err, data) {
21
20
  if (err) {
22
- asyncValue.B_(err);
21
+ asyncValue.l_(err);
23
22
  } else {
24
- asyncValue.C_(data);
23
+ asyncValue.m_(data);
25
24
  }
26
25
  };
27
26
  // eslint-disable-next-line no-constant-condition
@@ -32,11 +31,11 @@ function requestData(provider, timeout) {
32
31
  provider(null, callback);
33
32
 
34
33
  if (value !== undefined) {
35
- asyncValue.C_(value);
34
+ asyncValue.m_(value);
36
35
  }
37
36
  } else {
38
37
  // Assume the provider is a data object...
39
- asyncValue.C_(provider);
38
+ asyncValue.m_(provider);
40
39
  }
41
40
 
42
41
  if (timeout == null) {
@@ -53,10 +52,10 @@ function requestData(provider, timeout) {
53
52
  if (!error) error = new Error(errorMsg);
54
53
  error.code = "ERR_AWAIT_TIMEDOUT";
55
54
  error.name = "TimeoutError";
56
- asyncValue.B_(error);
55
+ asyncValue.l_(error);
57
56
  }, timeout);
58
57
 
59
- asyncValue.A_(function () {
58
+ asyncValue.k_(function () {
60
59
  if (timeoutId != null) {
61
60
  clearTimeout(timeoutId);
62
61
  }
@@ -69,7 +68,7 @@ function requestData(provider, timeout) {
69
68
  const LAST_OPTIONS = { last: true, name: "await:finish" };
70
69
 
71
70
  module.exports = function awaitTag(input, out) {
72
- var clientReorder = isClientReorderSupported && input.clientReorder === true && !out.isVDOM;
71
+ var clientReorder = typeof document === "undefined" && input.clientReorder === true && !out.isVDOM;
73
72
 
74
73
  var name = input.name || input._name;
75
74
  var timeout = input.timeout;
@@ -77,8 +76,8 @@ module.exports = function awaitTag(input, out) {
77
76
  var asyncValue = requestData(provider, timeout);
78
77
  var placeholderRenderer = input.placeholder && input.placeholder.renderBody;
79
78
 
80
- if (asyncValue.z_) {
81
- renderContents(asyncValue.x_, asyncValue.w_, input, out);
79
+ if (asyncValue.j_) {
80
+ renderContents(asyncValue.h_, asyncValue.g_, input, out);
82
81
  return;
83
82
  }
84
83
 
@@ -94,7 +93,7 @@ module.exports = function awaitTag(input, out) {
94
93
  if (clientReorder) {
95
94
  awaitInfo.after = input.showAfter;
96
95
 
97
- clientReorderContext = out.global.D_ || (out.global.D_ = {
96
+ clientReorderContext = out.global.n_ || (out.global.n_ = {
98
97
  instances: [],
99
98
  nextId: 0
100
99
  });
@@ -194,7 +193,7 @@ module.exports = function awaitTag(input, out) {
194
193
  }
195
194
  }
196
195
 
197
- asyncValue.A_(renderBody);
196
+ asyncValue.k_(renderBody);
198
197
  };
199
198
 
200
199
  function renderContents(err, data, input, out) {
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- const clientReorder = require("./client-reorder");
3
+ var escapeDoubleQuotes = require("../../../runtime/html/helpers/escape-quotes").o_;
4
4
 
5
5
  module.exports = function (input, out) {
6
6
  // We cannot call beginSync() when using renderSync(). In this case we will
@@ -19,7 +19,7 @@ module.exports = function (input, out) {
19
19
 
20
20
  global.__awaitReordererInvoked = true;
21
21
 
22
- if (out.global.D_) {
22
+ if (out.global.n_) {
23
23
  out.flush();
24
24
  }
25
25
 
@@ -30,7 +30,7 @@ module.exports = function (input, out) {
30
30
  });
31
31
 
32
32
  out.onLast(function (next) {
33
- var awaitContext = global.D_;
33
+ var awaitContext = global.n_;
34
34
  var remaining;
35
35
 
36
36
  // Validate that we have remaining <await> instances that need handled
@@ -41,13 +41,18 @@ module.exports = function (input, out) {
41
41
  }
42
42
 
43
43
  function handleAwait(awaitInfo) {
44
- awaitInfo.out.on("i_", out.emit.bind(out, "i_")).on("finish", function (result) {
44
+ awaitInfo.out.on("p_", out.emit.bind(out, "p_")).on("finish", function (result) {
45
45
  if (!global._afRuntime) {
46
- asyncOut.script(clientReorder.getCode());
46
+ // Minified version of ./client-reorder-runtime.js
47
+ asyncOut.script(`function $af(d,a,e,l,g,h,k,b,f,c){c=$af;if(a&&!c[a])(c[a+="$"]||(c[a]=[])).push(d);else{e=document;l=e.getElementById("af"+d);g=e.getElementById("afph"+d);h=e.createDocumentFragment();k=l.childNodes;b=0;for(f=k.length;b<f;b++)h.appendChild(k.item(0));g&&g.parentNode.replaceChild(h,g);c[d]=1;if(a=c[d+"$"])for(b=0,f=a.length;b<f;b++)c(a[b])}}`);
47
48
  global._afRuntime = true;
48
49
  }
49
50
 
50
- asyncOut.write('<div id="af' + awaitInfo.id + '" style="display:none">' + result.toString() + "</div>");
51
+ if (global.cspNonce) {
52
+ asyncOut.write('<style nonce="' + escapeDoubleQuotes(global.cspNonce) + '">' + "#af" + awaitInfo.id + "{display:none;}" + "</style>" + '<div id="af' + awaitInfo.id + '">' + result.toString() + "</div>");
53
+ } else {
54
+ asyncOut.write('<div id="af' + awaitInfo.id + '" style="display:none">' + result.toString() + "</div>");
55
+ }
51
56
 
52
57
  asyncOut.script("$af(" + (typeof awaitInfo.id === "number" ? awaitInfo.id : '"' + awaitInfo.id + '"') + (awaitInfo.after ? ',"' + awaitInfo.after + '"' : "") + ")");
53
58
 
package/dist/index.js CHANGED
@@ -1,42 +1,4 @@
1
1
  "use strict";
2
2
 
3
- // the following development and legacy apis should not be included
4
- // when bundling the server with a tool like webpack
5
-
6
- if (!process.env.BUNDLE) {
7
- if (process.env.MARKO_HOT_RELOAD) {
8
- require("./hot-reload").enable();
9
- }
10
-
11
- // If process was launched with browser refresh then automatically
12
- // enable browser-refresh
13
- require("./browser-refresh").enable();
14
-
15
- // Adds the template.getDependencies() method needed by older versions of lasso-marko
16
- require("./runtime/components/legacy/dependencies/html");
17
- }
18
-
19
- function fixFlush() {
20
- try {
21
- var OutgoingMessage = require("http").OutgoingMessage;
22
- if (OutgoingMessage.prototype.flush && OutgoingMessage.prototype.flush.toString().indexOf("deprecated") !== -1) {
23
- // Yes, we are monkey-patching http. This method should never have been added and it was introduced on
24
- // the iojs fork. It was quickly deprecated and I'm 99% sure no one is actually using it.
25
- // See:
26
- // - https://github.com/marko-js/async-writer/issues/3
27
- // - https://github.com/nodejs/node/issues/2920
28
- //
29
- // This method causes problems since marko looks for the flush method and calls it found.
30
- // The `res.flush()` method is introduced by the [compression](https://www.npmjs.com/package/compression)
31
- // middleware, but, otherwise, it should typically not exist.
32
- delete require("http").OutgoingMessage.prototype.flush;
33
- }
34
- } catch (e) {
35
- /* ignore error */
36
- }
37
- }
38
-
39
- fixFlush();
40
-
41
3
  exports.createOut = require("./runtime/createOut");
42
- exports.load = require("./loader");
4
+ exports.load = require("@internal/loader");
@@ -8,6 +8,17 @@ const fs = require("fs");
8
8
  const fsReadOptions = { encoding: "utf8" };
9
9
  const MARKO_EXTENSIONS = Symbol("MARKO_EXTENSIONS");
10
10
 
11
+ if (process.env.MARKO_HOT_RELOAD) {
12
+ require("../hot-reload").enable();
13
+ }
14
+
15
+ // If process was launched with browser refresh then automatically
16
+ // enable browser-refresh
17
+ require("../browser-refresh").enable();
18
+
19
+ // Adds the template.getDependencies() method needed by older versions of lasso-marko
20
+ require("../runtime/components/legacy/dependencies/html");
21
+
11
22
  function normalizeExtension(extension) {
12
23
  if (extension.charAt(0) !== ".") {
13
24
  extension = "." + extension;
@@ -0,0 +1,12 @@
1
+ var ComponentDef = require("../../../runtime/components/ComponentDef");
2
+
3
+ module.exports = function beginComponent(componentsContext, component, key, ownerComponentDef) {
4
+ var componentId = component.id;
5
+ var componentDef = componentsContext.q_ = new ComponentDef(component, componentId, componentsContext);
6
+ componentsContext.r_.s_[componentId] = true;
7
+ componentsContext.t_.push(componentDef);
8
+
9
+ var out = componentsContext.u_;
10
+ out.bc(component, key, ownerComponentDef && ownerComponentDef.v_);
11
+ return componentDef;
12
+ };
@@ -1,10 +1,9 @@
1
1
  "use strict";
2
2
 
3
- const ComponentDef = require("./ComponentDef");
3
+ const ComponentDef = require("../../../runtime/components/ComponentDef");
4
4
 
5
5
  var FLAG_WILL_RERENDER_IN_BROWSER = 1;
6
6
  // var FLAG_HAS_RENDER_BODY = 2;
7
- // var FLAG_IS_LEGACY = 4;
8
7
  var FLAG_OLD_HYDRATE_NO_CREATE = 8;
9
8
 
10
9
  module.exports = function beginComponent(componentsContext, component, key, ownerComponentDef, isSplitComponent, isImplicitComponent, existingComponentDef) {
@@ -12,13 +11,14 @@ module.exports = function beginComponent(componentsContext, component, key, owne
12
11
 
13
12
  // existingComponentDef is only here to allow binding a conditional
14
13
  // widget. It should be removed when the legacy compat layer is removed.
15
- var componentDef = existingComponentDef || (componentsContext.p_ = new ComponentDef(component, componentId, componentsContext));
14
+ var componentDef = existingComponentDef || (componentsContext.q_ = new ComponentDef(component, componentId, componentsContext));
16
15
 
17
- var ownerIsRenderBoundary = ownerComponentDef && ownerComponentDef._M_;
18
- var ownerWillRerender = ownerComponentDef && ownerComponentDef._N_ & FLAG_WILL_RERENDER_IN_BROWSER;
16
+ var ownerIsRenderBoundary = ownerComponentDef && ownerComponentDef.w_;
17
+ var ownerWillRerender = ownerComponentDef && ownerComponentDef.x_ & FLAG_WILL_RERENDER_IN_BROWSER;
19
18
  // On the server
20
- if (!componentsContext.v_ && ownerWillRerender) {
21
- componentDef._N_ |= FLAG_WILL_RERENDER_IN_BROWSER;
19
+ if (!componentsContext.y_ && ownerWillRerender) {
20
+ componentDef.x_ |= FLAG_WILL_RERENDER_IN_BROWSER;
21
+ componentDef._wrr = true;
22
22
  return componentDef;
23
23
  }
24
24
 
@@ -29,21 +29,21 @@ module.exports = function beginComponent(componentsContext, component, key, owne
29
29
  return componentDef;
30
30
  }
31
31
 
32
- componentsContext.h_.push(componentDef);
32
+ componentsContext.t_.push(componentDef);
33
33
 
34
- let out = componentsContext.E_;
34
+ let out = componentsContext.u_;
35
35
  let runtimeId = out.global.runtimeId;
36
36
 
37
- componentDef._M_ = true;
38
- componentDef.ah_ = componentsContext.v_;
37
+ componentDef.w_ = true;
38
+ componentDef.z_ = componentsContext.y_;
39
39
 
40
40
  if (isSplitComponent === false && out.global.noBrowserRerender !== true) {
41
- componentDef._N_ |= FLAG_WILL_RERENDER_IN_BROWSER;
42
- componentsContext.v_ = false;
41
+ componentDef.x_ |= FLAG_WILL_RERENDER_IN_BROWSER;
42
+ componentsContext.y_ = false;
43
43
  }
44
44
 
45
45
  if (out.global.oldHydrateNoCreate === true) {
46
- componentDef._N_ |= FLAG_OLD_HYDRATE_NO_CREATE;
46
+ componentDef.x_ |= FLAG_OLD_HYDRATE_NO_CREATE;
47
47
  }
48
48
 
49
49
  if ((ownerIsRenderBoundary || ownerWillRerender) && key != null) {
@@ -0,0 +1,11 @@
1
+ {
2
+ "main": "./index.js",
3
+ "browser": "./index-browser.js",
4
+ "exports": {
5
+ ".": {
6
+ "worker": "./index.js",
7
+ "browser": "./index-browser.js",
8
+ "default": "./index.js"
9
+ }
10
+ }
11
+ }