mol_jsx_lib 0.0.880 → 0.0.882

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
@@ -1462,35 +1462,24 @@ var $;
1462
1462
  "use strict";
1463
1463
  var $;
1464
1464
  (function ($) {
1465
- class $mol_after_timeout extends $mol_object2 {
1466
- delay;
1465
+ class $mol_after_tick extends $mol_object2 {
1467
1466
  task;
1468
- id;
1469
- constructor(delay, task) {
1467
+ promise;
1468
+ cancelled = false;
1469
+ constructor(task) {
1470
1470
  super();
1471
- this.delay = delay;
1472
1471
  this.task = task;
1473
- this.id = setTimeout(task, delay);
1472
+ this.promise = Promise.resolve().then(() => {
1473
+ if (this.cancelled)
1474
+ return;
1475
+ task();
1476
+ });
1474
1477
  }
1475
1478
  destructor() {
1476
- clearTimeout(this.id);
1477
- }
1478
- }
1479
- $.$mol_after_timeout = $mol_after_timeout;
1480
- })($ || ($ = {}));
1481
-
1482
- ;
1483
- "use strict";
1484
- var $;
1485
- (function ($) {
1486
- class $mol_after_frame extends $mol_after_timeout {
1487
- task;
1488
- constructor(task) {
1489
- super(16, task);
1490
- this.task = task;
1479
+ this.cancelled = true;
1491
1480
  }
1492
1481
  }
1493
- $.$mol_after_frame = $mol_after_frame;
1482
+ $.$mol_after_tick = $mol_after_tick;
1494
1483
  })($ || ($ = {}));
1495
1484
 
1496
1485
  ;
@@ -1508,7 +1497,7 @@ var $;
1508
1497
  static plan() {
1509
1498
  if (this.plan_task)
1510
1499
  return;
1511
- this.plan_task = new $mol_after_frame(() => {
1500
+ this.plan_task = new $mol_after_tick(() => {
1512
1501
  try {
1513
1502
  this.sync();
1514
1503
  }
@@ -1710,7 +1699,7 @@ var $;
1710
1699
  sub.track_off(prev);
1711
1700
  sub.absorb = () => {
1712
1701
  done(null);
1713
- sub.destructor();
1702
+ setTimeout(() => sub.destructor());
1714
1703
  };
1715
1704
  });
1716
1705
  }
@@ -1780,6 +1769,41 @@ var $;
1780
1769
  $.$mol_key = $mol_key;
1781
1770
  })($ || ($ = {}));
1782
1771
 
1772
+ ;
1773
+ "use strict";
1774
+ var $;
1775
+ (function ($) {
1776
+ class $mol_after_timeout extends $mol_object2 {
1777
+ delay;
1778
+ task;
1779
+ id;
1780
+ constructor(delay, task) {
1781
+ super();
1782
+ this.delay = delay;
1783
+ this.task = task;
1784
+ this.id = setTimeout(task, delay);
1785
+ }
1786
+ destructor() {
1787
+ clearTimeout(this.id);
1788
+ }
1789
+ }
1790
+ $.$mol_after_timeout = $mol_after_timeout;
1791
+ })($ || ($ = {}));
1792
+
1793
+ ;
1794
+ "use strict";
1795
+ var $;
1796
+ (function ($) {
1797
+ class $mol_after_frame extends $mol_after_timeout {
1798
+ task;
1799
+ constructor(task) {
1800
+ super(16, task);
1801
+ this.task = task;
1802
+ }
1803
+ }
1804
+ $.$mol_after_frame = $mol_after_frame;
1805
+ })($ || ($ = {}));
1806
+
1783
1807
  ;
1784
1808
  "use strict";
1785
1809
  var $;
package/node.test.js CHANGED
@@ -1453,35 +1453,24 @@ var $;
1453
1453
  "use strict";
1454
1454
  var $;
1455
1455
  (function ($) {
1456
- class $mol_after_timeout extends $mol_object2 {
1457
- delay;
1456
+ class $mol_after_tick extends $mol_object2 {
1458
1457
  task;
1459
- id;
1460
- constructor(delay, task) {
1458
+ promise;
1459
+ cancelled = false;
1460
+ constructor(task) {
1461
1461
  super();
1462
- this.delay = delay;
1463
1462
  this.task = task;
1464
- this.id = setTimeout(task, delay);
1463
+ this.promise = Promise.resolve().then(() => {
1464
+ if (this.cancelled)
1465
+ return;
1466
+ task();
1467
+ });
1465
1468
  }
1466
1469
  destructor() {
1467
- clearTimeout(this.id);
1470
+ this.cancelled = true;
1468
1471
  }
1469
1472
  }
1470
- $.$mol_after_timeout = $mol_after_timeout;
1471
- })($ || ($ = {}));
1472
-
1473
- ;
1474
- "use strict";
1475
- var $;
1476
- (function ($) {
1477
- class $mol_after_frame extends $mol_after_timeout {
1478
- task;
1479
- constructor(task) {
1480
- super(16, task);
1481
- this.task = task;
1482
- }
1483
- }
1484
- $.$mol_after_frame = $mol_after_frame;
1473
+ $.$mol_after_tick = $mol_after_tick;
1485
1474
  })($ || ($ = {}));
1486
1475
 
1487
1476
  ;
@@ -1499,7 +1488,7 @@ var $;
1499
1488
  static plan() {
1500
1489
  if (this.plan_task)
1501
1490
  return;
1502
- this.plan_task = new $mol_after_frame(() => {
1491
+ this.plan_task = new $mol_after_tick(() => {
1503
1492
  try {
1504
1493
  this.sync();
1505
1494
  }
@@ -1701,7 +1690,7 @@ var $;
1701
1690
  sub.track_off(prev);
1702
1691
  sub.absorb = () => {
1703
1692
  done(null);
1704
- sub.destructor();
1693
+ setTimeout(() => sub.destructor());
1705
1694
  };
1706
1695
  });
1707
1696
  }
@@ -1771,6 +1760,41 @@ var $;
1771
1760
  $.$mol_key = $mol_key;
1772
1761
  })($ || ($ = {}));
1773
1762
 
1763
+ ;
1764
+ "use strict";
1765
+ var $;
1766
+ (function ($) {
1767
+ class $mol_after_timeout extends $mol_object2 {
1768
+ delay;
1769
+ task;
1770
+ id;
1771
+ constructor(delay, task) {
1772
+ super();
1773
+ this.delay = delay;
1774
+ this.task = task;
1775
+ this.id = setTimeout(task, delay);
1776
+ }
1777
+ destructor() {
1778
+ clearTimeout(this.id);
1779
+ }
1780
+ }
1781
+ $.$mol_after_timeout = $mol_after_timeout;
1782
+ })($ || ($ = {}));
1783
+
1784
+ ;
1785
+ "use strict";
1786
+ var $;
1787
+ (function ($) {
1788
+ class $mol_after_frame extends $mol_after_timeout {
1789
+ task;
1790
+ constructor(task) {
1791
+ super(16, task);
1792
+ this.task = task;
1793
+ }
1794
+ }
1795
+ $.$mol_after_frame = $mol_after_frame;
1796
+ })($ || ($ = {}));
1797
+
1774
1798
  ;
1775
1799
  "use strict";
1776
1800
  var $;
@@ -3534,16 +3558,7 @@ var $;
3534
3558
  var $;
3535
3559
  (function ($_1) {
3536
3560
  $mol_test_mocks.push($ => {
3537
- $.$mol_after_timeout = $mol_after_mock_timeout;
3538
- });
3539
- })($ || ($ = {}));
3540
-
3541
- ;
3542
- "use strict";
3543
- var $;
3544
- (function ($_1) {
3545
- $mol_test_mocks.push($ => {
3546
- $.$mol_after_frame = $mol_after_mock_commmon;
3561
+ $.$mol_after_tick = $mol_after_mock_commmon;
3547
3562
  });
3548
3563
  })($ || ($ = {}));
3549
3564
 
@@ -3690,6 +3705,24 @@ var $;
3690
3705
  });
3691
3706
  })($ || ($ = {}));
3692
3707
 
3708
+ ;
3709
+ "use strict";
3710
+ var $;
3711
+ (function ($_1) {
3712
+ $mol_test_mocks.push($ => {
3713
+ $.$mol_after_timeout = $mol_after_mock_timeout;
3714
+ });
3715
+ })($ || ($ = {}));
3716
+
3717
+ ;
3718
+ "use strict";
3719
+ var $;
3720
+ (function ($_1) {
3721
+ $mol_test_mocks.push($ => {
3722
+ $.$mol_after_frame = $mol_after_mock_commmon;
3723
+ });
3724
+ })($ || ($ = {}));
3725
+
3693
3726
  ;
3694
3727
  "use strict";
3695
3728
  var $;