mol_plot_all 1.2.240 → 1.2.243
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 +2 -3
- package/node.deps.json +1 -1
- package/node.esm.js +18 -36
- package/node.esm.js.map +1 -1
- package/node.js +18 -36
- package/node.js.map +1 -1
- package/node.test.js +20 -63
- package/node.test.js.map +1 -1
- package/package.json +1 -1
- package/web.d.ts +2 -3
- package/web.deps.json +1 -1
- package/web.esm.js +18 -36
- package/web.esm.js.map +1 -1
- package/web.js +18 -36
- package/web.js.map +1 -1
- package/web.test.js +2 -27
- package/web.test.js.map +1 -1
package/node.test.js
CHANGED
|
@@ -1278,9 +1278,12 @@ var $;
|
|
|
1278
1278
|
}
|
|
1279
1279
|
static sync() {
|
|
1280
1280
|
while (this.planning.size) {
|
|
1281
|
-
const
|
|
1282
|
-
|
|
1283
|
-
|
|
1281
|
+
for (const fiber of this.planning) {
|
|
1282
|
+
this.planning.delete(fiber);
|
|
1283
|
+
if (fiber.cursor >= 0)
|
|
1284
|
+
continue;
|
|
1285
|
+
if (fiber.cursor === $mol_wire_cursor.final)
|
|
1286
|
+
continue;
|
|
1284
1287
|
fiber.refresh();
|
|
1285
1288
|
}
|
|
1286
1289
|
}
|
|
@@ -1308,12 +1311,13 @@ var $;
|
|
|
1308
1311
|
field() {
|
|
1309
1312
|
return this.task.name + '()';
|
|
1310
1313
|
}
|
|
1311
|
-
constructor(id, task, host,
|
|
1314
|
+
constructor(id, task, host, args) {
|
|
1312
1315
|
super();
|
|
1313
1316
|
this.task = task;
|
|
1314
1317
|
this.host = host;
|
|
1315
|
-
|
|
1316
|
-
|
|
1318
|
+
if (args)
|
|
1319
|
+
this.data.push(...args);
|
|
1320
|
+
this.pub_from = this.sub_from = args?.length ?? 0;
|
|
1317
1321
|
this[Symbol.toStringTag] = id;
|
|
1318
1322
|
}
|
|
1319
1323
|
plan() {
|
|
@@ -1374,7 +1378,7 @@ var $;
|
|
|
1374
1378
|
result = this.task.call(this.host, this.data[0]);
|
|
1375
1379
|
break;
|
|
1376
1380
|
default:
|
|
1377
|
-
result = this.task.call(this.host, ...this.
|
|
1381
|
+
result = this.task.call(this.host, ...this.args);
|
|
1378
1382
|
break;
|
|
1379
1383
|
}
|
|
1380
1384
|
if (result instanceof Promise) {
|
|
@@ -1640,7 +1644,7 @@ var $;
|
|
|
1640
1644
|
break reuse;
|
|
1641
1645
|
return existen;
|
|
1642
1646
|
}
|
|
1643
|
-
return new $mol_wire_task(`${host?.[Symbol.toStringTag] ?? host}.${task.name}(#)`, task, host,
|
|
1647
|
+
return new $mol_wire_task(`${host?.[Symbol.toStringTag] ?? host}.${task.name}(#)`, task, host, args);
|
|
1644
1648
|
};
|
|
1645
1649
|
}
|
|
1646
1650
|
complete() {
|
|
@@ -1713,7 +1717,7 @@ var $;
|
|
|
1713
1717
|
else {
|
|
1714
1718
|
dict = (host ?? task)[field] = new Map();
|
|
1715
1719
|
}
|
|
1716
|
-
fiber = new $mol_wire_atom(key, task, host,
|
|
1720
|
+
fiber = new $mol_wire_atom(key, task, host, args);
|
|
1717
1721
|
dict.set(key, fiber);
|
|
1718
1722
|
return fiber;
|
|
1719
1723
|
};
|
|
@@ -1724,33 +1728,14 @@ var $;
|
|
|
1724
1728
|
if (existen)
|
|
1725
1729
|
return existen;
|
|
1726
1730
|
const key = `${host?.[Symbol.toStringTag] ?? host}.${field}`;
|
|
1727
|
-
const fiber = new $mol_wire_atom(key, task, host,
|
|
1731
|
+
const fiber = new $mol_wire_atom(key, task, host, args);
|
|
1728
1732
|
(host ?? task)[field] = fiber;
|
|
1729
1733
|
return fiber;
|
|
1730
1734
|
};
|
|
1731
1735
|
}
|
|
1732
1736
|
}
|
|
1733
|
-
resync(
|
|
1734
|
-
|
|
1735
|
-
try {
|
|
1736
|
-
res = this.recall(...args);
|
|
1737
|
-
}
|
|
1738
|
-
catch (error) {
|
|
1739
|
-
if (error instanceof Promise)
|
|
1740
|
-
$mol_fail_hidden(error);
|
|
1741
|
-
res = error;
|
|
1742
|
-
}
|
|
1743
|
-
try {
|
|
1744
|
-
this.once();
|
|
1745
|
-
}
|
|
1746
|
-
catch (error) {
|
|
1747
|
-
if (error instanceof Promise)
|
|
1748
|
-
$mol_fail_hidden(error);
|
|
1749
|
-
}
|
|
1750
|
-
return this.put(res);
|
|
1751
|
-
}
|
|
1752
|
-
recall(...args) {
|
|
1753
|
-
return this.task.call(this.host, ...args);
|
|
1737
|
+
resync(args) {
|
|
1738
|
+
return this.put(this.task.call(this.host, ...args));
|
|
1754
1739
|
}
|
|
1755
1740
|
once() {
|
|
1756
1741
|
return this.sync();
|
|
@@ -1799,9 +1784,6 @@ var $;
|
|
|
1799
1784
|
__decorate([
|
|
1800
1785
|
$mol_wire_method
|
|
1801
1786
|
], $mol_wire_atom.prototype, "resync", null);
|
|
1802
|
-
__decorate([
|
|
1803
|
-
$mol_wire_method
|
|
1804
|
-
], $mol_wire_atom.prototype, "recall", null);
|
|
1805
1787
|
__decorate([
|
|
1806
1788
|
$mol_wire_method
|
|
1807
1789
|
], $mol_wire_atom.prototype, "once", null);
|
|
@@ -1838,7 +1820,7 @@ var $;
|
|
|
1838
1820
|
let atom = persist(this, args.slice(0, keys));
|
|
1839
1821
|
if (args.length <= keys || args[keys] === undefined) {
|
|
1840
1822
|
if (!$mol_wire_fiber.warm)
|
|
1841
|
-
return atom.
|
|
1823
|
+
return atom.result();
|
|
1842
1824
|
if ($mol_wire_auto() instanceof $mol_wire_task) {
|
|
1843
1825
|
return atom.once();
|
|
1844
1826
|
}
|
|
@@ -1846,7 +1828,7 @@ var $;
|
|
|
1846
1828
|
return atom.sync();
|
|
1847
1829
|
}
|
|
1848
1830
|
}
|
|
1849
|
-
return atom.resync(
|
|
1831
|
+
return atom.resync(args);
|
|
1850
1832
|
};
|
|
1851
1833
|
Object.defineProperty(wrapper, 'name', { value: func.name + ' ' });
|
|
1852
1834
|
Object.assign(wrapper, { orig: func });
|
|
@@ -6980,33 +6962,6 @@ var $;
|
|
|
6980
6962
|
], App, "test", null);
|
|
6981
6963
|
App.test();
|
|
6982
6964
|
},
|
|
6983
|
-
'Update deps on push'($) {
|
|
6984
|
-
class App extends $mol_object2 {
|
|
6985
|
-
static $ = $;
|
|
6986
|
-
static left(next = false) {
|
|
6987
|
-
return next;
|
|
6988
|
-
}
|
|
6989
|
-
static right(next = false) {
|
|
6990
|
-
return next;
|
|
6991
|
-
}
|
|
6992
|
-
static res(next) {
|
|
6993
|
-
return this.left(next) && this.right();
|
|
6994
|
-
}
|
|
6995
|
-
}
|
|
6996
|
-
__decorate([
|
|
6997
|
-
$mol_wire_mem(0)
|
|
6998
|
-
], App, "left", null);
|
|
6999
|
-
__decorate([
|
|
7000
|
-
$mol_wire_mem(0)
|
|
7001
|
-
], App, "right", null);
|
|
7002
|
-
__decorate([
|
|
7003
|
-
$mol_wire_mem(0)
|
|
7004
|
-
], App, "res", null);
|
|
7005
|
-
$mol_assert_equal(App.res(), false);
|
|
7006
|
-
$mol_assert_equal(App.res(true), false);
|
|
7007
|
-
$mol_assert_equal(App.right(true), true);
|
|
7008
|
-
$mol_assert_equal(App.res(), true);
|
|
7009
|
-
},
|
|
7010
6965
|
'Different order of pull and push'($) {
|
|
7011
6966
|
class App extends $mol_object2 {
|
|
7012
6967
|
static $ = $;
|
|
@@ -7017,6 +6972,8 @@ var $;
|
|
|
7017
6972
|
return this.store(next);
|
|
7018
6973
|
}
|
|
7019
6974
|
static slow(next) {
|
|
6975
|
+
if (next !== undefined)
|
|
6976
|
+
this.slow();
|
|
7020
6977
|
return this.store(next);
|
|
7021
6978
|
}
|
|
7022
6979
|
}
|