mol_jsx_lib 0.0.924 → 0.0.925

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