mol_wire_lib 1.0.300 → 1.0.301
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.d.ts +26 -5
- package/node.deps.json +1 -1
- package/node.esm.js +76 -8
- package/node.esm.js.map +1 -1
- package/node.js +76 -8
- package/node.js.map +1 -1
- package/node.test.js +95 -8
- package/node.test.js.map +1 -1
- package/package.json +6 -2
- package/web.d.ts +36 -15
- package/web.deps.json +1 -1
- package/web.esm.js +97 -29
- package/web.esm.js.map +1 -1
- package/web.js +97 -29
- package/web.js.map +1 -1
- package/web.test.js +19 -0
- package/web.test.js.map +1 -1
package/node.js
CHANGED
|
@@ -1371,6 +1371,82 @@ var $;
|
|
|
1371
1371
|
;
|
|
1372
1372
|
"use strict";
|
|
1373
1373
|
var $;
|
|
1374
|
+
(function ($_1) {
|
|
1375
|
+
let $$;
|
|
1376
|
+
(function ($$) {
|
|
1377
|
+
let $;
|
|
1378
|
+
})($$ = $_1.$$ || ($_1.$$ = {}));
|
|
1379
|
+
$_1.$mol_object_field = Symbol('$mol_object_field');
|
|
1380
|
+
class $mol_object extends $mol_object2 {
|
|
1381
|
+
static make(config) {
|
|
1382
|
+
return super.create(obj => {
|
|
1383
|
+
for (let key in config)
|
|
1384
|
+
obj[key] = config[key];
|
|
1385
|
+
});
|
|
1386
|
+
}
|
|
1387
|
+
}
|
|
1388
|
+
$_1.$mol_object = $mol_object;
|
|
1389
|
+
})($ || ($ = {}));
|
|
1390
|
+
//mol/object/object.ts
|
|
1391
|
+
;
|
|
1392
|
+
"use strict";
|
|
1393
|
+
var $;
|
|
1394
|
+
(function ($) {
|
|
1395
|
+
$.$mol_mem = $mol_wire_solo;
|
|
1396
|
+
$.$mol_mem_key = $mol_wire_plex;
|
|
1397
|
+
})($ || ($ = {}));
|
|
1398
|
+
//mol/mem/mem.ts
|
|
1399
|
+
;
|
|
1400
|
+
"use strict";
|
|
1401
|
+
var $;
|
|
1402
|
+
(function ($) {
|
|
1403
|
+
class $mol_state_time extends $mol_object {
|
|
1404
|
+
static task(precision, reset) {
|
|
1405
|
+
if (precision) {
|
|
1406
|
+
return new $mol_after_timeout(precision, () => this.task(precision, null));
|
|
1407
|
+
}
|
|
1408
|
+
else {
|
|
1409
|
+
return new $mol_after_frame(() => this.task(precision, null));
|
|
1410
|
+
}
|
|
1411
|
+
}
|
|
1412
|
+
static now(precision) {
|
|
1413
|
+
this.task(precision);
|
|
1414
|
+
return Date.now();
|
|
1415
|
+
}
|
|
1416
|
+
}
|
|
1417
|
+
__decorate([
|
|
1418
|
+
$mol_mem_key
|
|
1419
|
+
], $mol_state_time, "task", null);
|
|
1420
|
+
__decorate([
|
|
1421
|
+
$mol_mem_key
|
|
1422
|
+
], $mol_state_time, "now", null);
|
|
1423
|
+
$.$mol_state_time = $mol_state_time;
|
|
1424
|
+
})($ || ($ = {}));
|
|
1425
|
+
//mol/state/time/time.ts
|
|
1426
|
+
;
|
|
1427
|
+
"use strict";
|
|
1428
|
+
var $;
|
|
1429
|
+
(function ($) {
|
|
1430
|
+
function $mol_wire_easing(next) {
|
|
1431
|
+
const atom = $mol_wire_auto();
|
|
1432
|
+
if (!(atom instanceof $mol_wire_atom))
|
|
1433
|
+
$mol_fail(new Error('Allowed only inside atom'));
|
|
1434
|
+
const prev = atom.result() ?? next;
|
|
1435
|
+
if (typeof prev !== 'number')
|
|
1436
|
+
return next;
|
|
1437
|
+
const current = (prev * 2 + next) / 3;
|
|
1438
|
+
const diff = Math.abs(current - next);
|
|
1439
|
+
if (diff < 1)
|
|
1440
|
+
return next;
|
|
1441
|
+
$mol_state_time.now(0);
|
|
1442
|
+
return current;
|
|
1443
|
+
}
|
|
1444
|
+
$.$mol_wire_easing = $mol_wire_easing;
|
|
1445
|
+
})($ || ($ = {}));
|
|
1446
|
+
//mol/wire/easing/easing.ts
|
|
1447
|
+
;
|
|
1448
|
+
"use strict";
|
|
1449
|
+
var $;
|
|
1374
1450
|
(function ($) {
|
|
1375
1451
|
function $mol_wire_patch(obj) {
|
|
1376
1452
|
for (const field of Reflect.ownKeys(obj)) {
|
|
@@ -1576,14 +1652,6 @@ var $;
|
|
|
1576
1652
|
;
|
|
1577
1653
|
"use strict";
|
|
1578
1654
|
var $;
|
|
1579
|
-
(function ($) {
|
|
1580
|
-
$.$mol_mem = $mol_wire_solo;
|
|
1581
|
-
$.$mol_mem_key = $mol_wire_plex;
|
|
1582
|
-
})($ || ($ = {}));
|
|
1583
|
-
//mol/mem/mem.ts
|
|
1584
|
-
;
|
|
1585
|
-
"use strict";
|
|
1586
|
-
var $;
|
|
1587
1655
|
(function ($) {
|
|
1588
1656
|
function $mol_log3_area_lazy(event) {
|
|
1589
1657
|
const self = this;
|