mol_plot_all 1.2.245 → 1.2.248
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 +3 -3
- package/node.deps.json +1 -1
- package/node.esm.js +27 -9
- package/node.esm.js.map +1 -1
- package/node.js +27 -9
- package/node.js.map +1 -1
- package/node.test.js +108 -77
- package/node.test.js.map +1 -1
- package/node.view.tree +1 -1
- package/package.json +1 -1
- package/web.d.ts +3 -3
- package/web.deps.json +1 -1
- package/web.esm.js +25 -9
- package/web.esm.js.map +1 -1
- package/web.js +25 -9
- package/web.js.map +1 -1
- package/web.test.js +88 -75
- package/web.test.js.map +1 -1
- package/web.view.tree +1 -1
package/node.test.js
CHANGED
|
@@ -232,6 +232,8 @@ var $node = new Proxy({ require }, {
|
|
|
232
232
|
const mod = target.require('module');
|
|
233
233
|
if (mod.builtinModules.indexOf(name) >= 0)
|
|
234
234
|
return target.require(name);
|
|
235
|
+
if (name[0] === '.')
|
|
236
|
+
return target.require(name);
|
|
235
237
|
const path = target.require('path');
|
|
236
238
|
const fs = target.require('fs');
|
|
237
239
|
let dir = path.resolve('.');
|
|
@@ -2107,7 +2109,12 @@ var $;
|
|
|
2107
2109
|
fiber = temp(obj, args);
|
|
2108
2110
|
return fiber.async();
|
|
2109
2111
|
};
|
|
2110
|
-
}
|
|
2112
|
+
},
|
|
2113
|
+
apply(obj, self, args) {
|
|
2114
|
+
const temp = $mol_wire_task.getter(obj);
|
|
2115
|
+
const fiber = temp(self, args);
|
|
2116
|
+
return fiber.async();
|
|
2117
|
+
},
|
|
2111
2118
|
});
|
|
2112
2119
|
}
|
|
2113
2120
|
$.$mol_wire_async = $mol_wire_async;
|
|
@@ -2520,11 +2527,18 @@ var $;
|
|
|
2520
2527
|
*view_find(check, path = []) {
|
|
2521
2528
|
if (check(this))
|
|
2522
2529
|
return yield [...path, this];
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2530
|
+
try {
|
|
2531
|
+
for (const item of this.sub()) {
|
|
2532
|
+
if (item instanceof $mol_view) {
|
|
2533
|
+
yield* item.view_find(check, [...path, this]);
|
|
2534
|
+
}
|
|
2526
2535
|
}
|
|
2527
2536
|
}
|
|
2537
|
+
catch (error) {
|
|
2538
|
+
if (error instanceof Promise)
|
|
2539
|
+
$mol_fail_hidden(error);
|
|
2540
|
+
$mol_fail_log(error);
|
|
2541
|
+
}
|
|
2528
2542
|
}
|
|
2529
2543
|
force_render(path) {
|
|
2530
2544
|
const kids = this.sub();
|
|
@@ -3788,7 +3802,7 @@ var $;
|
|
|
3788
3802
|
return this.graphs_sorted();
|
|
3789
3803
|
}
|
|
3790
3804
|
graphs_colored() {
|
|
3791
|
-
return this.
|
|
3805
|
+
return this.graphs_visible();
|
|
3792
3806
|
}
|
|
3793
3807
|
plugins() {
|
|
3794
3808
|
return [
|
|
@@ -3842,11 +3856,11 @@ var $;
|
|
|
3842
3856
|
graphs() {
|
|
3843
3857
|
return [];
|
|
3844
3858
|
}
|
|
3845
|
-
|
|
3859
|
+
graphs_positioned() {
|
|
3846
3860
|
return this.graphs();
|
|
3847
3861
|
}
|
|
3848
|
-
|
|
3849
|
-
return this.
|
|
3862
|
+
graphs_visible() {
|
|
3863
|
+
return this.graphs_positioned();
|
|
3850
3864
|
}
|
|
3851
3865
|
zoom(val) {
|
|
3852
3866
|
if (val !== undefined)
|
|
@@ -4046,7 +4060,7 @@ var $;
|
|
|
4046
4060
|
return (360 + (this.hue_base() + this.hue_shift() * index) % 360) % 360;
|
|
4047
4061
|
}
|
|
4048
4062
|
graphs_colored() {
|
|
4049
|
-
const graphs = this.
|
|
4063
|
+
const graphs = this.graphs_visible();
|
|
4050
4064
|
for (let index = 0; index < graphs.length; index++) {
|
|
4051
4065
|
graphs[index].hue = () => this.graph_hue(index);
|
|
4052
4066
|
}
|
|
@@ -4135,6 +4149,10 @@ var $;
|
|
|
4135
4149
|
return true;
|
|
4136
4150
|
if (dims.y.min > dims.y.max)
|
|
4137
4151
|
return true;
|
|
4152
|
+
const size_x = dims.x.max - dims.x.min;
|
|
4153
|
+
const size_y = dims.y.max - dims.y.min;
|
|
4154
|
+
if ((size_x || size_y) && size_x < max_x && size_y < max_y)
|
|
4155
|
+
return false;
|
|
4138
4156
|
if (dims.x.min > viewport.x.max)
|
|
4139
4157
|
return false;
|
|
4140
4158
|
if (dims.x.max < viewport.x.min)
|
|
@@ -6577,6 +6595,78 @@ var $;
|
|
|
6577
6595
|
;
|
|
6578
6596
|
"use strict";
|
|
6579
6597
|
var $;
|
|
6598
|
+
(function ($) {
|
|
6599
|
+
function $mol_promise() {
|
|
6600
|
+
let done;
|
|
6601
|
+
let fail;
|
|
6602
|
+
const promise = new Promise((d, f) => {
|
|
6603
|
+
done = d;
|
|
6604
|
+
fail = f;
|
|
6605
|
+
});
|
|
6606
|
+
return Object.assign(promise, {
|
|
6607
|
+
done,
|
|
6608
|
+
fail,
|
|
6609
|
+
});
|
|
6610
|
+
}
|
|
6611
|
+
$.$mol_promise = $mol_promise;
|
|
6612
|
+
})($ || ($ = {}));
|
|
6613
|
+
//mol/promise/promise.ts
|
|
6614
|
+
;
|
|
6615
|
+
"use strict";
|
|
6616
|
+
var $;
|
|
6617
|
+
(function ($_1) {
|
|
6618
|
+
$mol_test_mocks.push($ => {
|
|
6619
|
+
$.$mol_after_timeout = $mol_after_mock_timeout;
|
|
6620
|
+
});
|
|
6621
|
+
})($ || ($ = {}));
|
|
6622
|
+
//mol/after/timeout/timeout.test.ts
|
|
6623
|
+
;
|
|
6624
|
+
"use strict";
|
|
6625
|
+
var $;
|
|
6626
|
+
(function ($) {
|
|
6627
|
+
function $mol_wire_sync(obj) {
|
|
6628
|
+
return new Proxy(obj, {
|
|
6629
|
+
get(obj, field) {
|
|
6630
|
+
const val = obj[field];
|
|
6631
|
+
if (typeof val !== 'function')
|
|
6632
|
+
return val;
|
|
6633
|
+
const temp = $mol_wire_task.getter(val);
|
|
6634
|
+
return function $mol_wire_sync(...args) {
|
|
6635
|
+
const fiber = temp(obj, args);
|
|
6636
|
+
return fiber.sync();
|
|
6637
|
+
};
|
|
6638
|
+
},
|
|
6639
|
+
apply(obj, self, args) {
|
|
6640
|
+
const temp = $mol_wire_task.getter(obj);
|
|
6641
|
+
const fiber = temp(self, args);
|
|
6642
|
+
return fiber.sync();
|
|
6643
|
+
},
|
|
6644
|
+
});
|
|
6645
|
+
}
|
|
6646
|
+
$.$mol_wire_sync = $mol_wire_sync;
|
|
6647
|
+
})($ || ($ = {}));
|
|
6648
|
+
//mol/wire/sync/sync.ts
|
|
6649
|
+
;
|
|
6650
|
+
"use strict";
|
|
6651
|
+
var $;
|
|
6652
|
+
(function ($) {
|
|
6653
|
+
function $mol_wait_timeout_async(timeout) {
|
|
6654
|
+
const promise = $mol_promise();
|
|
6655
|
+
const task = new this.$mol_after_timeout(timeout, () => promise.done());
|
|
6656
|
+
return Object.assign(promise, {
|
|
6657
|
+
destructor: () => task.destructor()
|
|
6658
|
+
});
|
|
6659
|
+
}
|
|
6660
|
+
$.$mol_wait_timeout_async = $mol_wait_timeout_async;
|
|
6661
|
+
function $mol_wait_timeout(timeout) {
|
|
6662
|
+
return this.$mol_wire_sync(this).$mol_wait_timeout_async(timeout);
|
|
6663
|
+
}
|
|
6664
|
+
$.$mol_wait_timeout = $mol_wait_timeout;
|
|
6665
|
+
})($ || ($ = {}));
|
|
6666
|
+
//mol/wait/timeout/timeout.ts
|
|
6667
|
+
;
|
|
6668
|
+
"use strict";
|
|
6669
|
+
var $;
|
|
6580
6670
|
(function ($_1) {
|
|
6581
6671
|
$mol_test({
|
|
6582
6672
|
async 'Latest Calls Wins on Concurrency'($) {
|
|
@@ -6598,6 +6688,15 @@ var $;
|
|
|
6598
6688
|
$mol_assert_like(NameLogger.first, ['john', 'jin']);
|
|
6599
6689
|
$mol_assert_like(NameLogger.last, ['jin']);
|
|
6600
6690
|
},
|
|
6691
|
+
async 'Wrap function'($) {
|
|
6692
|
+
const name = $mol_wire_async(function (name) {
|
|
6693
|
+
$.$mol_wait_timeout(0);
|
|
6694
|
+
return name;
|
|
6695
|
+
});
|
|
6696
|
+
const promise = name('jin');
|
|
6697
|
+
$.$mol_after_mock_warp();
|
|
6698
|
+
$mol_assert_like(await promise, 'jin');
|
|
6699
|
+
},
|
|
6601
6700
|
});
|
|
6602
6701
|
})($ || ($ = {}));
|
|
6603
6702
|
//mol/wire/async/async.test.ts
|
|
@@ -6662,15 +6761,6 @@ var $;
|
|
|
6662
6761
|
;
|
|
6663
6762
|
"use strict";
|
|
6664
6763
|
var $;
|
|
6665
|
-
(function ($_1) {
|
|
6666
|
-
$mol_test_mocks.push($ => {
|
|
6667
|
-
$.$mol_after_timeout = $mol_after_mock_timeout;
|
|
6668
|
-
});
|
|
6669
|
-
})($ || ($ = {}));
|
|
6670
|
-
//mol/after/timeout/timeout.test.ts
|
|
6671
|
-
;
|
|
6672
|
-
"use strict";
|
|
6673
|
-
var $;
|
|
6674
6764
|
(function ($_1) {
|
|
6675
6765
|
$mol_test_mocks.push($ => {
|
|
6676
6766
|
$.$mol_after_frame = $mol_after_mock_commmon;
|
|
@@ -6762,64 +6852,6 @@ var $;
|
|
|
6762
6852
|
;
|
|
6763
6853
|
"use strict";
|
|
6764
6854
|
var $;
|
|
6765
|
-
(function ($) {
|
|
6766
|
-
function $mol_wire_sync(obj) {
|
|
6767
|
-
return new Proxy(obj, {
|
|
6768
|
-
get(obj, field) {
|
|
6769
|
-
const val = obj[field];
|
|
6770
|
-
if (typeof val !== 'function')
|
|
6771
|
-
return val;
|
|
6772
|
-
const temp = $mol_wire_task.getter(val);
|
|
6773
|
-
return function $mol_wire_sync(...args) {
|
|
6774
|
-
const fiber = temp(obj, args);
|
|
6775
|
-
return fiber.sync();
|
|
6776
|
-
};
|
|
6777
|
-
}
|
|
6778
|
-
});
|
|
6779
|
-
}
|
|
6780
|
-
$.$mol_wire_sync = $mol_wire_sync;
|
|
6781
|
-
})($ || ($ = {}));
|
|
6782
|
-
//mol/wire/sync/sync.ts
|
|
6783
|
-
;
|
|
6784
|
-
"use strict";
|
|
6785
|
-
var $;
|
|
6786
|
-
(function ($) {
|
|
6787
|
-
function $mol_promise() {
|
|
6788
|
-
let done;
|
|
6789
|
-
let fail;
|
|
6790
|
-
const promise = new Promise((d, f) => {
|
|
6791
|
-
done = d;
|
|
6792
|
-
fail = f;
|
|
6793
|
-
});
|
|
6794
|
-
return Object.assign(promise, {
|
|
6795
|
-
done,
|
|
6796
|
-
fail,
|
|
6797
|
-
});
|
|
6798
|
-
}
|
|
6799
|
-
$.$mol_promise = $mol_promise;
|
|
6800
|
-
})($ || ($ = {}));
|
|
6801
|
-
//mol/promise/promise.ts
|
|
6802
|
-
;
|
|
6803
|
-
"use strict";
|
|
6804
|
-
var $;
|
|
6805
|
-
(function ($) {
|
|
6806
|
-
function $mol_wait_timeout_async(timeout) {
|
|
6807
|
-
const promise = $mol_promise();
|
|
6808
|
-
const task = new this.$mol_after_timeout(timeout, () => promise.done());
|
|
6809
|
-
return Object.assign(promise, {
|
|
6810
|
-
destructor: () => task.destructor()
|
|
6811
|
-
});
|
|
6812
|
-
}
|
|
6813
|
-
$.$mol_wait_timeout_async = $mol_wait_timeout_async;
|
|
6814
|
-
function $mol_wait_timeout(timeout) {
|
|
6815
|
-
return this.$mol_wire_sync(this).$mol_wait_timeout_async(timeout);
|
|
6816
|
-
}
|
|
6817
|
-
$.$mol_wait_timeout = $mol_wait_timeout;
|
|
6818
|
-
})($ || ($ = {}));
|
|
6819
|
-
//mol/wait/timeout/timeout.ts
|
|
6820
|
-
;
|
|
6821
|
-
"use strict";
|
|
6822
|
-
var $;
|
|
6823
6855
|
(function ($_1) {
|
|
6824
6856
|
$mol_test({
|
|
6825
6857
|
'Cached channel'($) {
|
|
@@ -8112,7 +8144,6 @@ var $;
|
|
|
8112
8144
|
"use strict";
|
|
8113
8145
|
var $;
|
|
8114
8146
|
(function ($) {
|
|
8115
|
-
const TextDecoder = globalThis.TextDecoder ?? $node.util.TextDecoder;
|
|
8116
8147
|
function $mol_charset_decode(value, code = 'utf8') {
|
|
8117
8148
|
return new TextDecoder(code).decode(value);
|
|
8118
8149
|
}
|