marko 5.31.1 → 5.31.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (66) hide show
  1. package/dist/core-tags/components/preserve-tag.js +1 -81
  2. package/dist/core-tags/core/await/AsyncValue.js +20 -20
  3. package/dist/core-tags/core/await/renderer.js +11 -11
  4. package/dist/core-tags/core/await/reorderer-renderer.js +3 -3
  5. package/dist/node_modules/@internal/components-beginComponent/index-browser.js +4 -4
  6. package/dist/node_modules/@internal/components-beginComponent/index.js +11 -11
  7. package/dist/node_modules/@internal/components-define-widget-legacy/index-browser.js +45 -45
  8. package/dist/node_modules/@internal/components-define-widget-legacy/index.js +3 -3
  9. package/dist/node_modules/@internal/components-endComponent/index.js +3 -3
  10. package/dist/node_modules/@internal/components-entry/index-browser.js +2 -2
  11. package/dist/node_modules/@internal/components-entry/index.js +19 -19
  12. package/dist/node_modules/@internal/components-entry-legacy/index-browser.js +6 -6
  13. package/dist/node_modules/@internal/components-registry/index-browser.js +44 -44
  14. package/dist/node_modules/@internal/components-registry/index.js +2 -2
  15. package/dist/node_modules/@internal/components-util/index-browser.js +20 -20
  16. package/dist/node_modules/@internal/components-util/index.js +10 -10
  17. package/dist/node_modules/@internal/create-readable/index-browser.js +1 -1
  18. package/dist/node_modules/@internal/create-readable/index.js +9 -9
  19. package/dist/node_modules/@internal/preserve-tag/index-browser.js +45 -0
  20. package/dist/node_modules/@internal/preserve-tag/index.js +34 -0
  21. package/dist/node_modules/@internal/preserve-tag/package.json +11 -0
  22. package/dist/node_modules/@internal/require/index-browser.js +6 -4
  23. package/dist/runtime/RenderResult.js +7 -7
  24. package/dist/runtime/components/Component.js +88 -88
  25. package/dist/runtime/components/ComponentDef.js +18 -18
  26. package/dist/runtime/components/ComponentsContext.js +14 -14
  27. package/dist/runtime/components/GlobalComponentsContext.js +2 -2
  28. package/dist/runtime/components/ServerComponent.js +12 -12
  29. package/dist/runtime/components/State.js +9 -9
  30. package/dist/runtime/components/attach-detach.js +1 -1
  31. package/dist/runtime/components/defineComponent.js +5 -5
  32. package/dist/runtime/components/dom-data.js +5 -5
  33. package/dist/runtime/components/event-delegation.js +6 -6
  34. package/dist/runtime/components/legacy/defineComponent-legacy.js +1 -1
  35. package/dist/runtime/components/legacy/defineRenderer-legacy.js +10 -10
  36. package/dist/runtime/components/legacy/renderer-legacy.js +32 -32
  37. package/dist/runtime/components/renderer.js +20 -20
  38. package/dist/runtime/dom-insert.js +2 -2
  39. package/dist/runtime/helpers/dynamic-tag.js +9 -9
  40. package/dist/runtime/helpers/render-tag.js +1 -1
  41. package/dist/runtime/html/AsyncStream.js +6 -6
  42. package/dist/runtime/html/StringWriter.js +1 -1
  43. package/dist/runtime/html/helpers/attr.js +1 -1
  44. package/dist/runtime/html/helpers/data-marko.js +4 -4
  45. package/dist/runtime/html/helpers/escape-quotes.js +1 -1
  46. package/dist/runtime/html/helpers/props-script.js +1 -1
  47. package/dist/runtime/html/index.js +1 -1
  48. package/dist/runtime/renderable.js +1 -1
  49. package/dist/runtime/vdom/AsyncVDOMBuilder.js +27 -27
  50. package/dist/runtime/vdom/VComponent.js +2 -2
  51. package/dist/runtime/vdom/VDocumentFragment.js +1 -1
  52. package/dist/runtime/vdom/VElement.js +15 -15
  53. package/dist/runtime/vdom/VFragment.js +4 -4
  54. package/dist/runtime/vdom/VNode.js +2 -2
  55. package/dist/runtime/vdom/hot-reload.js +11 -11
  56. package/dist/runtime/vdom/index.js +1 -1
  57. package/dist/runtime/vdom/morphdom/fragment.js +1 -1
  58. package/dist/runtime/vdom/morphdom/index.js +36 -36
  59. package/dist/runtime/vdom/morphdom/specialElHandlers.js +3 -3
  60. package/package.json +1 -1
  61. package/src/core-tags/components/preserve-tag.js +1 -81
  62. package/src/node_modules/@internal/preserve-tag/index-browser.js +45 -0
  63. package/src/node_modules/@internal/preserve-tag/index.js +34 -0
  64. package/src/node_modules/@internal/preserve-tag/package.json +11 -0
  65. package/src/node_modules/@internal/require/index-browser.js +6 -4
  66. package/src/runtime/components/legacy/defineRenderer-legacy.js +1 -1
@@ -65,16 +65,16 @@ function addComponentsFromContext(componentsContext, componentsToHydrate) {
65
65
  for (var i = 0; i < len; i++) {
66
66
  var componentDef = components[i];
67
67
  var id = componentDef.id;
68
- var component = componentDef.i_;
69
- var flags = componentDef.C_;
70
- var isLegacy = componentDef.F_;
68
+ var component = componentDef.r_;
69
+ var flags = componentDef.t_;
70
+ var isLegacy = componentDef.x_;
71
71
 
72
72
  var state = component.state;
73
73
  var input = component.input || 0;
74
74
  var typeName = component.typeName;
75
- var customEvents = component.___;
76
- var scope = component._a_;
77
- var bubblingDomEvents = component._b_;
75
+ var customEvents = component.U_;
76
+ var scope = component.V_;
77
+ var bubblingDomEvents = component.W_;
78
78
 
79
79
  var needsState;
80
80
  var serializedProps;
@@ -82,7 +82,7 @@ function addComponentsFromContext(componentsContext, componentsToHydrate) {
82
82
 
83
83
  if (isLegacy) {
84
84
  flags |= FLAG_IS_LEGACY;
85
- renderBody = component._c_;
85
+ renderBody = component.X_;
86
86
 
87
87
  if (component.widgetConfig && isNotEmpty(component.widgetConfig)) {
88
88
  serializedProps = component.widgetConfig;
@@ -99,16 +99,16 @@ function addComponentsFromContext(componentsContext, componentsToHydrate) {
99
99
  !(flags & FLAG_WILL_RERENDER_IN_BROWSER) ||
100
100
  flags & FLAG_OLD_HYDRATE_NO_CREATE)
101
101
  {
102
- component.G_ = undefined; // We don't use `delete` to avoid V8 deoptimization
103
- component.U_ = undefined; // We don't use `delete` to avoid V8 deoptimization
102
+ component.y_ = undefined; // We don't use `delete` to avoid V8 deoptimization
103
+ component.N_ = undefined; // We don't use `delete` to avoid V8 deoptimization
104
104
  component.typeName = undefined;
105
105
  component.id = undefined;
106
+ component.U_ = undefined;
107
+ component.V_ = undefined;
108
+ component.W_ = undefined;
109
+ component.Y_ = undefined;
110
+ component.Z_ = undefined;
106
111
  component.___ = undefined;
107
- component._a_ = undefined;
108
- component._b_ = undefined;
109
- component._d_ = undefined;
110
- component._e_ = undefined;
111
- component._f_ = undefined;
112
112
 
113
113
  needsState = true;
114
114
 
@@ -145,7 +145,7 @@ function addComponentsFromContext(componentsContext, componentsToHydrate) {
145
145
 
146
146
  var extra = {
147
147
  b: bubblingDomEvents,
148
- d: componentDef._g_,
148
+ d: componentDef._a_,
149
149
  e: customEvents,
150
150
  f: flags || undefined,
151
151
  p: customEvents && scope, // Only serialize scope if we need to attach custom events
@@ -174,7 +174,7 @@ function addComponentsFromContext(componentsContext, componentsToHydrate) {
174
174
  components.length = 0;
175
175
 
176
176
  // Also add any components from nested contexts
177
- var nestedContexts = componentsContext._h_;
177
+ var nestedContexts = componentsContext._b_;
178
178
  if (nestedContexts !== undefined) {
179
179
  nestedContexts.forEach(function (nestedContext) {
180
180
  addComponentsFromContext(nestedContext, componentsToHydrate);
@@ -186,7 +186,7 @@ function getInitComponentsData(out, componentDefs) {
186
186
  const len = componentDefs.length;
187
187
  const $global = out.global;
188
188
  const isLast = $global.d_;
189
- const didSerializeComponents = $global._i_;
189
+ const didSerializeComponents = $global._c_;
190
190
  const prefix = $global.componentIdPrefix || $global.widgetIdPrefix;
191
191
 
192
192
  if (len === 0) {
@@ -199,7 +199,7 @@ function getInitComponentsData(out, componentDefs) {
199
199
 
200
200
  const TYPE_INDEX = 1;
201
201
  const typesLookup =
202
- $global._j_ || ($global._j_ = new Map());
202
+ $global._d_ || ($global._d_ = new Map());
203
203
  let newTypes;
204
204
 
205
205
  for (let i = 0; i < len; i++) {
@@ -224,7 +224,7 @@ function getInitComponentsData(out, componentDefs) {
224
224
  let serializedGlobals;
225
225
 
226
226
  if (!didSerializeComponents) {
227
- $global._i_ = true;
227
+ $global._c_ = true;
228
228
  serializedGlobals = getSerializedGlobals($global);
229
229
  }
230
230
 
@@ -1,12 +1,12 @@
1
1
  "use strict";var Component = require("../../../runtime/components/Component");
2
2
  var req = require("@internal/require");
3
3
  var getComponentForEl =
4
- require("@internal/components-util").Y_;
4
+ require("@internal/components-util").S_;
5
5
 
6
6
 
7
7
 
8
8
  // expose legacy
9
- require("@internal/components-registry")._k_ = exports;
9
+ require("@internal/components-registry")._e_ = exports;
10
10
  exports.load = function (typeName) {
11
11
  return exports.defineWidget(req(typeName));
12
12
  };
@@ -34,14 +34,14 @@ exports.getWidgetForEl = exports.get = function (elOrId) {
34
34
  return getComponentForEl(el);
35
35
  };
36
36
  exports.initWidgets =
37
- require("@internal/components-registry").Z_;
37
+ require("@internal/components-registry").T_;
38
38
 
39
39
  // monkey patch Widget
40
40
  if (Widget) {
41
41
  var WidgetProto = Widget.prototype;
42
42
  WidgetProto.setProps = function (newInput) {
43
- this._l_ = true;
44
- this._m_(newInput);
43
+ this._f_ = true;
44
+ this._g_(newInput);
45
45
  };
46
46
  WidgetProto.rerender = function (newInput) {
47
47
  if (newInput) {
@@ -70,6 +70,6 @@ RenderResult.prototype.getWidgets = function () {
70
70
  return RenderResult.prototype.getComponents.
71
71
  apply(this, arguments).
72
72
  filter(function (component) {
73
- return component.F_;
73
+ return component.x_;
74
74
  });
75
75
  };
@@ -4,16 +4,16 @@ var queueMicrotask = require("../../../runtime/queueMicrotask");
4
4
  var defineComponent = require("../../../runtime/components/defineComponent");
5
5
  var eventDelegation = require("../../../runtime/components/event-delegation");
6
6
  var createFragmentNode =
7
- require("../../../runtime/vdom/morphdom/fragment")._n_;
7
+ require("../../../runtime/vdom/morphdom/fragment")._h_;
8
8
  var ComponentDef = require("../../../runtime/components/ComponentDef");
9
9
  var domData = require("../../../runtime/components/dom-data");
10
10
  var componentsUtil = require("@internal/components-util");
11
11
  var req = require("@internal/require");
12
- var componentLookup = componentsUtil._o_;
12
+ var componentLookup = componentsUtil._i_;
13
13
  var addComponentRootToKeyedElements =
14
- componentsUtil._p_;
15
- var keyedElementsByComponentId = domData._q_;
16
- var componentsByDOMNode = domData._r_;
14
+ componentsUtil._j_;
15
+ var keyedElementsByComponentId = domData._k_;
16
+ var componentsByDOMNode = domData._l_;
17
17
  var serverComponentRootNodes = {};
18
18
  var serverRenderedMeta = {};
19
19
  var win = window;
@@ -81,7 +81,7 @@ function load(typeName, isLegacy) {
81
81
  if (target) {
82
82
  target = target();
83
83
  } else if (isLegacy) {
84
- target = exports._k_.load(typeName);
84
+ target = exports._e_.load(typeName);
85
85
  } else {
86
86
  target = req(typeName);
87
87
  // eslint-disable-next-line no-constant-condition
@@ -113,12 +113,12 @@ function getComponentClass(typeName, isLegacy) {
113
113
 
114
114
  ComponentClass = ComponentClass.Component || ComponentClass;
115
115
 
116
- if (!ComponentClass.E_) {
116
+ if (!ComponentClass.w_) {
117
117
  ComponentClass = defineComponent(ComponentClass, ComponentClass.renderer);
118
118
  }
119
119
 
120
120
  // Make the component "type" accessible on each component instance
121
- ComponentClass.prototype._s_ = typeName;
121
+ ComponentClass.prototype._m_ = typeName;
122
122
 
123
123
  // eslint-disable-next-line no-constant-condition
124
124
 
@@ -198,7 +198,7 @@ function indexServerComponentBoundaries(node, runtimeId, stack) {
198
198
  ownerId = parts[1];
199
199
  componentId = parts[0];
200
200
  if (ownerComponent = componentLookup[ownerId]) {
201
- keyedElements = ownerComponent.l_;
201
+ keyedElements = ownerComponent.J_;
202
202
  } else {
203
203
  keyedElements =
204
204
  keyedElementsByComponentId[ownerId] || (
@@ -221,13 +221,13 @@ function indexServerComponentBoundaries(node, runtimeId, stack) {
221
221
  } else if (node.nodeType === 1) {
222
222
  // HTML element node
223
223
  var markoKey = node.getAttribute("data-marko-key");
224
- var markoProps = componentsUtil._t_(node);
224
+ var markoProps = componentsUtil._n_(node);
225
225
  if (markoKey) {
226
226
  var separatorIndex = markoKey.indexOf(" ");
227
227
  ownerId = markoKey.substring(separatorIndex + 1);
228
228
  markoKey = markoKey.substring(0, separatorIndex);
229
229
  if (ownerComponent = componentLookup[ownerId]) {
230
- keyedElements = ownerComponent.l_;
230
+ keyedElements = ownerComponent.J_;
231
231
  } else {
232
232
  keyedElements =
233
233
  keyedElementsByComponentId[ownerId] || (
@@ -238,7 +238,7 @@ function indexServerComponentBoundaries(node, runtimeId, stack) {
238
238
  if (markoProps) {
239
239
  Object.keys(markoProps).forEach(function (key) {
240
240
  if (key.slice(0, 2) === "on") {
241
- eventDelegation._u_(key.slice(2));
241
+ eventDelegation._o_(key.slice(2));
242
242
  }
243
243
  });
244
244
  }
@@ -300,22 +300,22 @@ handles)
300
300
  }
301
301
 
302
302
  function initComponent(componentDef, host) {
303
- var component = componentDef.i_;
303
+ var component = componentDef.r_;
304
304
 
305
- if (!component || !component.E_) {
305
+ if (!component || !component.w_) {
306
306
  return; // legacy
307
307
  }
308
308
 
309
- component._v_();
310
- component.I_ = host;
309
+ component._p_();
310
+ component.A_ = host;
311
311
 
312
- var isExisting = componentDef._w_;
312
+ var isExisting = componentDef._q_;
313
313
 
314
314
  if (isExisting) {
315
- component._x_();
315
+ component._r_();
316
316
  }
317
317
 
318
- var domEvents = componentDef._g_;
318
+ var domEvents = componentDef._a_;
319
319
  if (domEvents) {
320
320
  var eventListenerHandles = [];
321
321
 
@@ -324,7 +324,7 @@ function initComponent(componentDef, host) {
324
324
 
325
325
  var eventType = domEventArgs[0];
326
326
  var targetMethodName = domEventArgs[1];
327
- var eventEl = component.l_[domEventArgs[2]];
327
+ var eventEl = component.J_[domEventArgs[2]];
328
328
  var isOnce = domEventArgs[3];
329
329
  var extraArgs = domEventArgs[4];
330
330
 
@@ -340,15 +340,15 @@ function initComponent(componentDef, host) {
340
340
  });
341
341
 
342
342
  if (eventListenerHandles.length) {
343
- component._y_ = eventListenerHandles;
343
+ component._s_ = eventListenerHandles;
344
344
  }
345
345
  }
346
346
 
347
- if (component._z_) {
348
- component._A_();
347
+ if (component._t_) {
348
+ component._u_();
349
349
  } else {
350
- component._z_ = true;
351
- component._B_();
350
+ component._t_ = true;
351
+ component._v_();
352
352
  }
353
353
  }
354
354
 
@@ -364,7 +364,7 @@ function initClientRendered(componentDefs, host) {
364
364
  if (!host) host = document;
365
365
  // Ensure that event handlers to handle delegating events are
366
366
  // always attached before initializing any components
367
- eventDelegation._C_(host);
367
+ eventDelegation._w_(host);
368
368
  var len = componentDefs.length;
369
369
  var componentDef;
370
370
  var i;
@@ -477,15 +477,15 @@ function initServerRendered(renderedComponents, host) {
477
477
  // Ensure that event handlers to handle delegating events are
478
478
  // always attached before initializing any components
479
479
  indexServerComponentBoundaries(host, runtimeId);
480
- eventDelegation._C_(host);
480
+ eventDelegation._w_(host);
481
481
 
482
482
  if (renderedComponents.g) {
483
- meta._D_ = renderedComponents.g;
483
+ meta._x_ = renderedComponents.g;
484
484
  }
485
485
 
486
486
  if (renderedComponents.t) {
487
- meta._E_ = meta._E_ ?
488
- meta._E_.concat(renderedComponents.t) :
487
+ meta._y_ = meta._y_ ?
488
+ meta._y_.concat(renderedComponents.t) :
489
489
  renderedComponents.t;
490
490
  }
491
491
 
@@ -493,7 +493,7 @@ function initServerRendered(renderedComponents, host) {
493
493
  // and return an array of functions to mount these components
494
494
  (renderedComponents.w || []).
495
495
  map(function (componentDef) {
496
- var typeName = meta._E_[componentDef[1]];
496
+ var typeName = meta._y_[componentDef[1]];
497
497
 
498
498
  return registered[typeName] ||
499
499
  document.readyState === "complete" ||
@@ -508,10 +508,10 @@ function initServerRendered(renderedComponents, host) {
508
508
  }
509
509
 
510
510
  function tryHydrateComponent(rawDef, meta, host, runtimeId) {
511
- var componentDef = ComponentDef._F_(
511
+ var componentDef = ComponentDef._z_(
512
512
  rawDef,
513
- meta._E_,
514
- meta._D_,
513
+ meta._y_,
514
+ meta._x_,
515
515
  exports
516
516
  );
517
517
  var mount = hydrateComponentAndGetMount(componentDef, host);
@@ -542,19 +542,19 @@ function tryHydrateComponent(rawDef, meta, host, runtimeId) {
542
542
 
543
543
  function hydrateComponentAndGetMount(componentDef, host) {
544
544
  var componentId = componentDef.id;
545
- var component = componentDef.i_;
545
+ var component = componentDef.r_;
546
546
  var rootNode = serverComponentRootNodes[componentId];
547
547
  var renderResult;
548
548
 
549
549
  if (rootNode) {
550
550
  delete serverComponentRootNodes[componentId];
551
551
 
552
- component._G_ = rootNode;
552
+ component._A_ = rootNode;
553
553
  componentsByDOMNode.set(rootNode, component);
554
554
 
555
- if (componentDef.C_ & FLAG_WILL_RERENDER_IN_BROWSER) {
556
- component.I_ = host;
557
- renderResult = component._H_(component.U_, true);
555
+ if (componentDef.t_ & FLAG_WILL_RERENDER_IN_BROWSER) {
556
+ component.A_ = host;
557
+ renderResult = component._B_(component.N_, true);
558
558
  trackComponent(componentDef);
559
559
  return function mount() {
560
560
  renderResult.afterInsert(host);
@@ -570,7 +570,7 @@ function hydrateComponentAndGetMount(componentDef, host) {
570
570
  }
571
571
 
572
572
  function trackComponent(componentDef) {
573
- var component = componentDef.i_;
573
+ var component = componentDef.r_;
574
574
  if (component) {
575
575
  componentLookup[component.id] = component;
576
576
  }
@@ -581,9 +581,9 @@ function tryInvoke(fn) {
581
581
  }
582
582
 
583
583
  exports.r = register;
584
- exports._I_ = createComponent;
585
- exports._J_ = getComponentClass;
586
- exports.Z_ = win.$initComponents = initServerRendered;
584
+ exports._C_ = createComponent;
585
+ exports._D_ = getComponentClass;
586
+ exports.T_ = win.$initComponents = initServerRendered;
587
587
 
588
- require("../../../runtime/components/ComponentsContext")._K_ =
588
+ require("../../../runtime/components/ComponentsContext")._E_ =
589
589
  initClientRendered;
@@ -40,5 +40,5 @@ scope)
40
40
  return new ServerComponent(id, input, out, typeName, customEvents, scope);
41
41
  }
42
42
 
43
- exports._L_ = true;
44
- exports._I_ = createComponent;
43
+ exports._F_ = true;
44
+ exports._C_ = createComponent;
@@ -1,8 +1,8 @@
1
1
  "use strict";var domData = require("../../../runtime/components/dom-data");
2
- var componentsByDOMNode = domData._r_;
3
- var keysByDOMNode = domData._M_;
4
- var vElementsByDOMNode = domData._N_;
5
- var vPropsByDOMNode = domData._O_;
2
+ var componentsByDOMNode = domData._l_;
3
+ var keysByDOMNode = domData._G_;
4
+ var vElementsByDOMNode = domData._H_;
5
+ var vPropsByDOMNode = domData._I_;
6
6
  var markoUID = window.$MUID || (window.$MUID = { i: 0 });
7
7
  var runtimeId = markoUID.i++;
8
8
 
@@ -27,7 +27,7 @@ function getComponentForEl(el, host) {
27
27
  component = componentsByDOMNode.get(node);
28
28
  }
29
29
  } else if (vElement = vElementsByDOMNode.get(node)) {
30
- component = vElement._P_;
30
+ component = vElement._J_;
31
31
  }
32
32
 
33
33
  if (component) {
@@ -41,7 +41,7 @@ function getComponentForEl(el, host) {
41
41
  function destroyComponentForNode(node) {
42
42
  var componentToDestroy = componentsByDOMNode.get(node.fragment || node);
43
43
  if (componentToDestroy) {
44
- componentToDestroy._Q_();
44
+ componentToDestroy._K_();
45
45
  delete componentLookup[componentToDestroy.id];
46
46
  }
47
47
  }
@@ -51,13 +51,13 @@ function destroyNodeRecursive(node, component) {
51
51
  var key;
52
52
 
53
53
  if (component && (key = keysByDOMNode.get(node))) {
54
- if (node === component.l_[key]) {
54
+ if (node === component.J_[key]) {
55
55
  if (componentsByDOMNode.get(node) && /\[\]$/.test(key)) {
56
- delete component.l_[key][
56
+ delete component.J_[key][
57
57
  componentsByDOMNode.get(node).id];
58
58
 
59
59
  } else {
60
- delete component.l_[key];
60
+ delete component.J_[key];
61
61
  }
62
62
  }
63
63
  }
@@ -103,7 +103,7 @@ function getMarkoPropsFromEl(el) {
103
103
  var virtualProps;
104
104
 
105
105
  if (vElement) {
106
- virtualProps = vElement._R_;
106
+ virtualProps = vElement._L_;
107
107
  } else {
108
108
  virtualProps = vPropsByDOMNode.get(el);
109
109
  if (!virtualProps) {
@@ -167,13 +167,13 @@ componentId)
167
167
 
168
168
 
169
169
 
170
- exports._S_ = runtimeId;
171
- exports._o_ = componentLookup;
172
- exports.Y_ = getComponentForEl;
173
- exports._T_ = destroyComponentForNode;
174
- exports._U_ = destroyNodeRecursive;
175
- exports._V_ = nextComponentIdProvider;
176
- exports._W_ = attachBubblingEvent;
177
- exports._t_ = getMarkoPropsFromEl;
178
- exports._p_ = addComponentRootToKeyedElements;
179
- exports._X_ = normalizeComponentKey;
170
+ exports._M_ = runtimeId;
171
+ exports._i_ = componentLookup;
172
+ exports.S_ = getComponentForEl;
173
+ exports._N_ = destroyComponentForNode;
174
+ exports._O_ = destroyNodeRecursive;
175
+ exports._P_ = nextComponentIdProvider;
176
+ exports._Q_ = attachBubblingEvent;
177
+ exports._n_ = getMarkoPropsFromEl;
178
+ exports._j_ = addComponentRootToKeyedElements;
179
+ exports._R_ = normalizeComponentKey;
@@ -28,8 +28,8 @@ extraArgs)
28
28
  {
29
29
  if (handlerMethodName) {
30
30
  if (extraArgs) {
31
- var component = componentDef.i_;
32
- var eventIndex = component._d_++;
31
+ var component = componentDef.r_;
32
+ var eventIndex = component.Y_++;
33
33
 
34
34
  // If we are not going to be doing a rerender in the browser
35
35
  // then we need to actually store the extra args with the UI component
@@ -39,11 +39,11 @@ extraArgs)
39
39
  // where the extra args will be found when the UI component is
40
40
  // rerendered in the browser
41
41
 
42
- if (!(componentDef.C_ & FLAG_WILL_RERENDER_IN_BROWSER)) {
42
+ if (!(componentDef.t_ & FLAG_WILL_RERENDER_IN_BROWSER)) {
43
43
  if (eventIndex === 0) {
44
- component._b_ = [extraArgs];
44
+ component.W_ = [extraArgs];
45
45
  } else {
46
- component._b_.push(extraArgs);
46
+ component.W_.push(extraArgs);
47
47
  }
48
48
  }
49
49
 
@@ -62,10 +62,10 @@ extraArgs)
62
62
  }
63
63
  }
64
64
 
65
- exports._V_ = nextComponentIdProvider;
66
- exports._L_ = true;
67
- exports._W_ = attachBubblingEvent;
68
- exports._T_ = function noop() {};
69
- exports._U_ = function noop() {};
65
+ exports._P_ = nextComponentIdProvider;
66
+ exports._F_ = true;
67
+ exports._Q_ = attachBubblingEvent;
68
+ exports._N_ = function noop() {};
69
+ exports._O_ = function noop() {};
70
70
 
71
71
  // eslint-disable-next-line no-constant-condition
@@ -17,7 +17,7 @@ module.exports = function (data) {
17
17
  data && data.$global,
18
18
  facade,
19
19
  undefined,
20
- this._Y_
20
+ this._S_
21
21
  );
22
22
  out.once("error", (err) => {
23
23
  facade.write = facade.end = noop;
@@ -17,9 +17,9 @@ if (String(OutgoingMessageProto.flush).indexOf("deprecated") !== -1) {
17
17
  class Readable extends stream.Readable {
18
18
  constructor(template, data) {
19
19
  super();
20
- this._Z_ = template;
21
- this.a__ = data;
22
- this.aa_ = false;
20
+ this._T_ = template;
21
+ this._U_ = data;
22
+ this._V_ = false;
23
23
  }
24
24
 
25
25
  write(data) {
@@ -33,19 +33,19 @@ class Readable extends stream.Readable {
33
33
  }
34
34
 
35
35
  _read() {
36
- if (this.aa_) {
36
+ if (this._V_) {
37
37
  return;
38
38
  }
39
39
 
40
- this.aa_ = true;
41
- var template = this._Z_;
42
- var data = this.a__;
40
+ this._V_ = true;
41
+ var template = this._T_;
42
+ var data = this._U_;
43
43
  var globalData = data && data.$global;
44
- var out = this._Z_.createOut(
44
+ var out = this._T_.createOut(
45
45
  globalData,
46
46
  this,
47
47
  undefined,
48
- template._Y_
48
+ template._S_
49
49
  );
50
50
  template.render(data, out);
51
51
  out.end();
@@ -0,0 +1,45 @@
1
+ "use strict";module.exports = function render(input, out) {
2
+ var isComponent = !input.n;
3
+ var shouldPreserve = !("i" in input) || input.i;
4
+ var componentsContext = out.b_;
5
+ var isHydrate =
6
+ componentsContext && componentsContext.o_._W_;
7
+ var ownerComponent = out._X_.r_;
8
+ var referenceComponent = ownerComponent;
9
+ var key = out._Y_;
10
+ var checkKey = key;
11
+
12
+ if (key[0] !== "@") {
13
+ var parentComponent = componentsContext.n_.r_;
14
+ if (ownerComponent !== parentComponent) {
15
+ referenceComponent = parentComponent;
16
+ checkKey += ":" + ownerComponent.id;
17
+ }
18
+ }
19
+
20
+ var isPreserved =
21
+ shouldPreserve && (
22
+ isHydrate || referenceComponent.J_[checkKey]);
23
+
24
+ if (isComponent) {
25
+ out.bf(key, ownerComponent, shouldPreserve);
26
+
27
+ if (!isPreserved && input.renderBody) {
28
+ input.renderBody(out);
29
+ }
30
+
31
+ out.ef();
32
+ } else {
33
+ if (isPreserved) {
34
+ if (input.b) {
35
+ out._Z_.a__ = true;
36
+ } else {
37
+ out.beginElement("", null, key, ownerComponent);
38
+ out._Z_.aa_ = true;
39
+ out.endElement();
40
+ }
41
+ } else if (input.renderBody) {
42
+ input.renderBody(out);
43
+ }
44
+ }
45
+ };
@@ -0,0 +1,34 @@
1
+ "use strict";var ComponentsContext = require("../../../runtime/components/ComponentsContext");
2
+ var getComponentsContext = ComponentsContext.R_;
3
+
4
+ module.exports = function render(input, out) {
5
+ var isComponent = !input.n;
6
+ var shouldPreserve = !("i" in input) || input.i;
7
+ var componentsContext = out.b_;
8
+
9
+ if (isComponent) {
10
+ out.bf(out._Y_, out._X_.r_, true);
11
+ }
12
+
13
+ if (input.renderBody) {
14
+ if (shouldPreserve) {
15
+ var parentPreserved = false;
16
+
17
+ if (componentsContext) {
18
+ parentPreserved = componentsContext.u_;
19
+ } else {
20
+ componentsContext = getComponentsContext(out);
21
+ }
22
+
23
+ componentsContext.u_ = true;
24
+ input.renderBody(out);
25
+ componentsContext.u_ = parentPreserved;
26
+ } else {
27
+ input.renderBody(out);
28
+ }
29
+ }
30
+
31
+ if (isComponent) {
32
+ out.ef();
33
+ }
34
+ };
@@ -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
+ }
@@ -2,12 +2,14 @@
2
2
  load.e = exists;
3
3
  module.exports = load;
4
4
 
5
- function load() {
6
- throw new Error(
7
- "The require API cannot be used in the browser in the current environment."
8
- );
5
+ function load(id) {
6
+ return interopRequire(require(id));
9
7
  }
10
8
 
11
9
  function exists() {
12
10
  return false;
11
+ }
12
+
13
+ function interopRequire(mod) {
14
+ return mod.default || mod;
13
15
  }