mol_wire_lib 1.0.299 → 1.0.300

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.js CHANGED
@@ -1377,103 +1377,6 @@ var $;
1377
1377
  ;
1378
1378
  "use strict";
1379
1379
  var $;
1380
- (function ($_1) {
1381
- let $$;
1382
- (function ($$) {
1383
- let $;
1384
- })($$ = $_1.$$ || ($_1.$$ = {}));
1385
- $_1.$mol_object_field = Symbol('$mol_object_field');
1386
- class $mol_object extends $mol_object2 {
1387
- static make(config) {
1388
- return super.create(obj => {
1389
- for (let key in config)
1390
- obj[key] = config[key];
1391
- });
1392
- }
1393
- }
1394
- $_1.$mol_object = $mol_object;
1395
- })($ || ($ = {}));
1396
- //mol/object/object.ts
1397
- ;
1398
- "use strict";
1399
- var $;
1400
- (function ($) {
1401
- $.$mol_mem = $mol_wire_solo;
1402
- $.$mol_mem_key = $mol_wire_plex;
1403
- })($ || ($ = {}));
1404
- //mol/mem/mem.ts
1405
- ;
1406
- "use strict";
1407
- var $;
1408
- (function ($) {
1409
- class $mol_after_timeout extends $mol_object2 {
1410
- delay;
1411
- task;
1412
- id;
1413
- constructor(delay, task) {
1414
- super();
1415
- this.delay = delay;
1416
- this.task = task;
1417
- this.id = setTimeout(task, delay);
1418
- }
1419
- destructor() {
1420
- clearTimeout(this.id);
1421
- }
1422
- }
1423
- $.$mol_after_timeout = $mol_after_timeout;
1424
- })($ || ($ = {}));
1425
- //mol/after/timeout/timeout.ts
1426
- ;
1427
- "use strict";
1428
- var $;
1429
- (function ($) {
1430
- class $mol_state_time extends $mol_object {
1431
- static task(precision, reset) {
1432
- if (precision) {
1433
- return new $mol_after_timeout(precision, () => this.task(precision, null));
1434
- }
1435
- else {
1436
- return new $mol_after_frame(() => this.task(precision, null));
1437
- }
1438
- }
1439
- static now(precision) {
1440
- this.task(precision);
1441
- return Date.now();
1442
- }
1443
- }
1444
- __decorate([
1445
- $mol_mem_key
1446
- ], $mol_state_time, "task", null);
1447
- __decorate([
1448
- $mol_mem_key
1449
- ], $mol_state_time, "now", null);
1450
- $.$mol_state_time = $mol_state_time;
1451
- })($ || ($ = {}));
1452
- //mol/state/time/time.ts
1453
- ;
1454
- "use strict";
1455
- var $;
1456
- (function ($) {
1457
- function $mol_wire_trans(next) {
1458
- const atom = $mol_wire_auto();
1459
- if (!(atom instanceof $mol_wire_atom))
1460
- $mol_fail(new Error('Allowed only inside atom'));
1461
- const prev = atom.result() ?? next;
1462
- if (typeof prev !== 'number')
1463
- return next;
1464
- const current = (prev * 2 + next) / 3;
1465
- const diff = Math.abs(current - next);
1466
- if (diff < 1)
1467
- return next;
1468
- $mol_state_time.now(0);
1469
- return current;
1470
- }
1471
- $.$mol_wire_trans = $mol_wire_trans;
1472
- })($ || ($ = {}));
1473
- //mol/wire/trans/trans.ts
1474
- ;
1475
- "use strict";
1476
- var $;
1477
1380
  (function ($) {
1478
1381
  function $mol_wire_patch(obj) {
1479
1382
  for (const field of Reflect.ownKeys(obj)) {
@@ -1661,6 +1564,27 @@ var $;
1661
1564
  ;
1662
1565
  "use strict";
1663
1566
  var $;
1567
+ (function ($) {
1568
+ class $mol_after_timeout extends $mol_object2 {
1569
+ delay;
1570
+ task;
1571
+ id;
1572
+ constructor(delay, task) {
1573
+ super();
1574
+ this.delay = delay;
1575
+ this.task = task;
1576
+ this.id = setTimeout(task, delay);
1577
+ }
1578
+ destructor() {
1579
+ clearTimeout(this.id);
1580
+ }
1581
+ }
1582
+ $.$mol_after_timeout = $mol_after_timeout;
1583
+ })($ || ($ = {}));
1584
+ //mol/after/timeout/timeout.ts
1585
+ ;
1586
+ "use strict";
1587
+ var $;
1664
1588
  (function ($) {
1665
1589
  function $mol_wait_timeout_async(timeout) {
1666
1590
  const promise = $mol_promise();
@@ -1679,6 +1603,14 @@ var $;
1679
1603
  ;
1680
1604
  "use strict";
1681
1605
  var $;
1606
+ (function ($) {
1607
+ $.$mol_mem = $mol_wire_solo;
1608
+ $.$mol_mem_key = $mol_wire_plex;
1609
+ })($ || ($ = {}));
1610
+ //mol/mem/mem.ts
1611
+ ;
1612
+ "use strict";
1613
+ var $;
1682
1614
  (function ($) {
1683
1615
  function $mol_log3_area_lazy(event) {
1684
1616
  const self = this;