mol_wire_lib 1.0.1231 → 1.0.1233

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.
package/node.mjs CHANGED
@@ -850,6 +850,12 @@ var $;
850
850
  };
851
851
  });
852
852
  }
853
+ destructor() {
854
+ super.destructor();
855
+ if ($mol_owning_check(this, this.cache)) {
856
+ this.cache.destructor();
857
+ }
858
+ }
853
859
  }
854
860
  $.$mol_wire_fiber = $mol_wire_fiber;
855
861
  })($ || ($ = {}));
@@ -1537,7 +1543,8 @@ var $;
1537
1543
  $$.$mol_log3_warn({
1538
1544
  place: '$mol_wire_task',
1539
1545
  message: `Non idempotency`,
1540
- existen,
1546
+ sub,
1547
+ pubs: [...sub?.pub_list ?? [], existen],
1541
1548
  next,
1542
1549
  hint: 'Ignore it',
1543
1550
  });
@@ -1560,6 +1567,14 @@ var $;
1560
1567
  this.cursor = $mol_wire_cursor.fresh;
1561
1568
  if (next !== prev)
1562
1569
  this.emit();
1570
+ if ($mol_owning_catch(this, next)) {
1571
+ try {
1572
+ next[Symbol.toStringTag] = this[Symbol.toStringTag];
1573
+ }
1574
+ catch {
1575
+ Object.defineProperty(next, Symbol.toStringTag, { value: this[Symbol.toStringTag] });
1576
+ }
1577
+ }
1563
1578
  return next;
1564
1579
  }
1565
1580
  this.cursor = $mol_wire_cursor.final;
@@ -1812,10 +1827,6 @@ var $;
1812
1827
  }
1813
1828
  destructor() {
1814
1829
  super.destructor();
1815
- const prev = this.cache;
1816
- if ($mol_owning_check(this, prev)) {
1817
- prev.destructor();
1818
- }
1819
1830
  if (this.pub_from === 0) {
1820
1831
  ;
1821
1832
  (this.host ?? this.task)[this.field()] = null;
package/node.test.js CHANGED
@@ -841,6 +841,12 @@ var $;
841
841
  };
842
842
  });
843
843
  }
844
+ destructor() {
845
+ super.destructor();
846
+ if ($mol_owning_check(this, this.cache)) {
847
+ this.cache.destructor();
848
+ }
849
+ }
844
850
  }
845
851
  $.$mol_wire_fiber = $mol_wire_fiber;
846
852
  })($ || ($ = {}));
@@ -1528,7 +1534,8 @@ var $;
1528
1534
  $$.$mol_log3_warn({
1529
1535
  place: '$mol_wire_task',
1530
1536
  message: `Non idempotency`,
1531
- existen,
1537
+ sub,
1538
+ pubs: [...sub?.pub_list ?? [], existen],
1532
1539
  next,
1533
1540
  hint: 'Ignore it',
1534
1541
  });
@@ -1551,6 +1558,14 @@ var $;
1551
1558
  this.cursor = $mol_wire_cursor.fresh;
1552
1559
  if (next !== prev)
1553
1560
  this.emit();
1561
+ if ($mol_owning_catch(this, next)) {
1562
+ try {
1563
+ next[Symbol.toStringTag] = this[Symbol.toStringTag];
1564
+ }
1565
+ catch {
1566
+ Object.defineProperty(next, Symbol.toStringTag, { value: this[Symbol.toStringTag] });
1567
+ }
1568
+ }
1554
1569
  return next;
1555
1570
  }
1556
1571
  this.cursor = $mol_wire_cursor.final;
@@ -1803,10 +1818,6 @@ var $;
1803
1818
  }
1804
1819
  destructor() {
1805
1820
  super.destructor();
1806
- const prev = this.cache;
1807
- if ($mol_owning_check(this, prev)) {
1808
- prev.destructor();
1809
- }
1810
1821
  if (this.pub_from === 0) {
1811
1822
  ;
1812
1823
  (this.host ?? this.task)[this.field()] = null;
@@ -3032,6 +3043,17 @@ var $;
3032
3043
  ;
3033
3044
  "use strict";
3034
3045
 
3046
+ ;
3047
+ "use strict";
3048
+ var $;
3049
+ (function ($) {
3050
+ function $mol_dom_serialize(node) {
3051
+ const serializer = new $mol_dom_context.XMLSerializer;
3052
+ return serializer.serializeToString(node);
3053
+ }
3054
+ $.$mol_dom_serialize = $mol_dom_serialize;
3055
+ })($ || ($ = {}));
3056
+
3035
3057
  ;
3036
3058
  "use strict";
3037
3059
  var $;
@@ -3189,6 +3211,19 @@ var $;
3189
3211
  "!");
3190
3212
  $mol_assert_equal(dom.outerHTML, '<div>hello<strong>world</strong>!</div>');
3191
3213
  },
3214
+ 'Make fragment'() {
3215
+ const dom = $mol_jsx($mol_jsx_frag, null,
3216
+ $mol_jsx("br", null),
3217
+ $mol_jsx("hr", null));
3218
+ $mol_assert_equal($mol_dom_serialize(dom), '<br xmlns="http://www.w3.org/1999/xhtml" /><hr xmlns="http://www.w3.org/1999/xhtml" />');
3219
+ },
3220
+ 'Spread fragment'() {
3221
+ const dom = $mol_jsx("div", null,
3222
+ $mol_jsx($mol_jsx_frag, null,
3223
+ $mol_jsx("br", null),
3224
+ $mol_jsx("hr", null)));
3225
+ $mol_assert_equal(dom.outerHTML, '<div><br><hr></div>');
3226
+ },
3192
3227
  'Function as component'() {
3193
3228
  const Button = (props, target) => {
3194
3229
  return $mol_jsx("button", { title: props.hint }, target());