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/node.test.js CHANGED
@@ -1363,82 +1363,6 @@ var $;
1363
1363
  ;
1364
1364
  "use strict";
1365
1365
  var $;
1366
- (function ($_1) {
1367
- let $$;
1368
- (function ($$) {
1369
- let $;
1370
- })($$ = $_1.$$ || ($_1.$$ = {}));
1371
- $_1.$mol_object_field = Symbol('$mol_object_field');
1372
- class $mol_object extends $mol_object2 {
1373
- static make(config) {
1374
- return super.create(obj => {
1375
- for (let key in config)
1376
- obj[key] = config[key];
1377
- });
1378
- }
1379
- }
1380
- $_1.$mol_object = $mol_object;
1381
- })($ || ($ = {}));
1382
- //mol/object/object.ts
1383
- ;
1384
- "use strict";
1385
- var $;
1386
- (function ($) {
1387
- $.$mol_mem = $mol_wire_solo;
1388
- $.$mol_mem_key = $mol_wire_plex;
1389
- })($ || ($ = {}));
1390
- //mol/mem/mem.ts
1391
- ;
1392
- "use strict";
1393
- var $;
1394
- (function ($) {
1395
- class $mol_state_time extends $mol_object {
1396
- static task(precision, reset) {
1397
- if (precision) {
1398
- return new $mol_after_timeout(precision, () => this.task(precision, null));
1399
- }
1400
- else {
1401
- return new $mol_after_frame(() => this.task(precision, null));
1402
- }
1403
- }
1404
- static now(precision) {
1405
- this.task(precision);
1406
- return Date.now();
1407
- }
1408
- }
1409
- __decorate([
1410
- $mol_mem_key
1411
- ], $mol_state_time, "task", null);
1412
- __decorate([
1413
- $mol_mem_key
1414
- ], $mol_state_time, "now", null);
1415
- $.$mol_state_time = $mol_state_time;
1416
- })($ || ($ = {}));
1417
- //mol/state/time/time.ts
1418
- ;
1419
- "use strict";
1420
- var $;
1421
- (function ($) {
1422
- function $mol_wire_trans(next) {
1423
- const atom = $mol_wire_auto();
1424
- if (!(atom instanceof $mol_wire_atom))
1425
- $mol_fail(new Error('Allowed only inside atom'));
1426
- const prev = atom.result() ?? next;
1427
- if (typeof prev !== 'number')
1428
- return next;
1429
- const current = (prev * 2 + next) / 3;
1430
- const diff = Math.abs(current - next);
1431
- if (diff < 1)
1432
- return next;
1433
- $mol_state_time.now(0);
1434
- return current;
1435
- }
1436
- $.$mol_wire_trans = $mol_wire_trans;
1437
- })($ || ($ = {}));
1438
- //mol/wire/trans/trans.ts
1439
- ;
1440
- "use strict";
1441
- var $;
1442
1366
  (function ($) {
1443
1367
  function $mol_wire_patch(obj) {
1444
1368
  for (const field of Reflect.ownKeys(obj)) {
@@ -1644,6 +1568,14 @@ var $;
1644
1568
  ;
1645
1569
  "use strict";
1646
1570
  var $;
1571
+ (function ($) {
1572
+ $.$mol_mem = $mol_wire_solo;
1573
+ $.$mol_mem_key = $mol_wire_plex;
1574
+ })($ || ($ = {}));
1575
+ //mol/mem/mem.ts
1576
+ ;
1577
+ "use strict";
1578
+ var $;
1647
1579
  (function ($) {
1648
1580
  function $mol_log3_area_lazy(event) {
1649
1581
  const self = this;
@@ -3960,25 +3892,6 @@ var $;
3960
3892
  ;
3961
3893
  "use strict";
3962
3894
  var $;
3963
- (function ($) {
3964
- $mol_test({
3965
- 'init with overload'() {
3966
- class X extends $mol_object {
3967
- foo() {
3968
- return 1;
3969
- }
3970
- }
3971
- var x = X.make({
3972
- foo: () => 2,
3973
- });
3974
- $mol_assert_equal(x.foo(), 2);
3975
- },
3976
- });
3977
- })($ || ($ = {}));
3978
- //mol/object/object.test.ts
3979
- ;
3980
- "use strict";
3981
- var $;
3982
3895
  (function ($_1) {
3983
3896
  $mol_test({
3984
3897
  'Watch one value'($) {