mol_jsx_lib 0.0.431 → 0.0.433

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/web.mjs CHANGED
@@ -523,9 +523,9 @@ var $;
523
523
  "use strict";
524
524
  var $;
525
525
  (function ($) {
526
- let auto = null;
527
- function $mol_wire_auto(next = auto) {
528
- return auto = next;
526
+ $.$mol_wire_auto_sub = null;
527
+ function $mol_wire_auto(next = $.$mol_wire_auto_sub) {
528
+ return $.$mol_wire_auto_sub = next;
529
529
  }
530
530
  $.$mol_wire_auto = $mol_wire_auto;
531
531
  $.$mol_wire_affected = [];
@@ -651,6 +651,9 @@ var $;
651
651
  class $mol_wire_pub_sub extends $mol_wire_pub {
652
652
  pub_from = 0;
653
653
  cursor = $mol_wire_cursor.stale;
654
+ get temp() {
655
+ return false;
656
+ }
654
657
  get pub_list() {
655
658
  const res = [];
656
659
  const max = this.cursor >= 0 ? this.cursor : this.sub_from;
@@ -1229,7 +1232,7 @@ var $;
1229
1232
  const sub = $mol_wire_auto();
1230
1233
  const existen = sub?.track_next();
1231
1234
  reuse: if (existen) {
1232
- if (existen.constructor.name !== '$mol_wire_task')
1235
+ if (!existen.temp)
1233
1236
  break reuse;
1234
1237
  if (existen.host !== host)
1235
1238
  break reuse;
@@ -1242,6 +1245,9 @@ var $;
1242
1245
  return new $mol_wire_task(`${host?.[Symbol.toStringTag] ?? host}.${task.name}(#)`, task, host, args);
1243
1246
  };
1244
1247
  }
1248
+ get temp() {
1249
+ return true;
1250
+ }
1245
1251
  complete() {
1246
1252
  if ($mol_promise_like(this.cache))
1247
1253
  return;
@@ -1397,7 +1403,7 @@ var $;
1397
1403
  return this.resync([...this.args, next]);
1398
1404
  if (!$mol_wire_fiber.warm)
1399
1405
  return this.result();
1400
- if ($mol_wire_auto()?.constructor.name === '$mol_wire_task') {
1406
+ if ($mol_wire_auto()?.temp) {
1401
1407
  return this.once();
1402
1408
  }
1403
1409
  else {
@@ -1513,7 +1519,7 @@ var $;
1513
1519
  if ((args.length === 0) || (args[0] === undefined)) {
1514
1520
  if (!$mol_wire_fiber.warm)
1515
1521
  return atom.result();
1516
- if ($mol_wire_auto()?.constructor.name === '$mol_wire_task') {
1522
+ if ($mol_wire_auto()?.temp) {
1517
1523
  return atom.once();
1518
1524
  }
1519
1525
  else {
@@ -1550,7 +1556,7 @@ var $;
1550
1556
  if ((args.length === 1) || (args[1] === undefined)) {
1551
1557
  if (!$mol_wire_fiber.warm)
1552
1558
  return atom.result();
1553
- if ($mol_wire_auto()?.constructor.name === '$mol_wire_task') {
1559
+ if ($mol_wire_auto()?.temp) {
1554
1560
  return atom.once();
1555
1561
  }
1556
1562
  else {