mol_plot_all 1.2.243 → 1.2.246
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 +48 -10
- package/node.deps.json +1 -1
- package/node.esm.js +113 -49
- package/node.esm.js.map +1 -1
- package/node.js +113 -49
- package/node.js.map +1 -1
- package/node.test.js +238 -161
- package/node.test.js.map +1 -1
- package/package.json +4 -2
- package/web.d.ts +19 -10
- package/web.deps.json +1 -1
- package/web.esm.js +63 -58
- package/web.esm.js.map +1 -1
- package/web.js +63 -58
- package/web.js.map +1 -1
- package/web.test.js +115 -102
- package/web.test.js.map +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('.');
|
|
@@ -619,29 +621,72 @@ var $;
|
|
|
619
621
|
;
|
|
620
622
|
"use strict";
|
|
621
623
|
var $;
|
|
624
|
+
(function ($) {
|
|
625
|
+
class $mol_term_color {
|
|
626
|
+
static reset = this.ansi(0, 0);
|
|
627
|
+
static bold = this.ansi(1, 22);
|
|
628
|
+
static italic = this.ansi(3, 23);
|
|
629
|
+
static underline = this.ansi(4, 24);
|
|
630
|
+
static inverse = this.ansi(7, 27);
|
|
631
|
+
static hidden = this.ansi(8, 28);
|
|
632
|
+
static strike = this.ansi(9, 29);
|
|
633
|
+
static gray = this.ansi(90, 39);
|
|
634
|
+
static red = this.ansi(91, 39);
|
|
635
|
+
static green = this.ansi(92, 39);
|
|
636
|
+
static yellow = this.ansi(93, 39);
|
|
637
|
+
static blue = this.ansi(94, 39);
|
|
638
|
+
static magenta = this.ansi(95, 39);
|
|
639
|
+
static cyan = this.ansi(96, 39);
|
|
640
|
+
static white = this.ansi(97, 39);
|
|
641
|
+
static Red = (str) => this.inverse(this.red(str));
|
|
642
|
+
static Green = (str) => this.inverse(this.green(str));
|
|
643
|
+
static Yellow = (str) => this.inverse(this.yellow(str));
|
|
644
|
+
static Blue = (str) => this.inverse(this.blue(str));
|
|
645
|
+
static Magenta = (str) => this.inverse(this.magenta(str));
|
|
646
|
+
static Cyan = (str) => this.inverse(this.cyan(str));
|
|
647
|
+
static White = (str) => this.inverse(this.white(str));
|
|
648
|
+
static ansi(open, close) {
|
|
649
|
+
if (typeof process === 'undefined')
|
|
650
|
+
return String;
|
|
651
|
+
if (!process.stdout.isTTY)
|
|
652
|
+
return String;
|
|
653
|
+
const prefix = `\x1b[${open}m`;
|
|
654
|
+
const postfix = `\x1b[${close}m`;
|
|
655
|
+
const suffix_regexp = new RegExp(postfix.replace('[', '\\['), 'g');
|
|
656
|
+
return function colorer(str) {
|
|
657
|
+
str = String(str);
|
|
658
|
+
if (str === '')
|
|
659
|
+
return str;
|
|
660
|
+
const suffix = str.replace(suffix_regexp, prefix);
|
|
661
|
+
return prefix + suffix + postfix;
|
|
662
|
+
};
|
|
663
|
+
}
|
|
664
|
+
}
|
|
665
|
+
$.$mol_term_color = $mol_term_color;
|
|
666
|
+
})($ || ($ = {}));
|
|
667
|
+
//mol/term/color/color.ts
|
|
668
|
+
;
|
|
669
|
+
"use strict";
|
|
670
|
+
var $;
|
|
622
671
|
(function ($) {
|
|
623
672
|
function $mol_log3_node_make(level, output, type, color) {
|
|
624
673
|
return function $mol_log3_logger(event) {
|
|
625
674
|
if (!event.time)
|
|
626
675
|
event = { time: new Date().toISOString(), ...event };
|
|
627
676
|
const tree = this.$mol_tree.fromJSON(event).clone({ type });
|
|
628
|
-
let str = tree.toString();
|
|
629
|
-
if (process[output].isTTY) {
|
|
630
|
-
str = $node.colorette[color + 'Bright'](str);
|
|
631
|
-
}
|
|
632
|
-
;
|
|
677
|
+
let str = color(tree.toString());
|
|
633
678
|
this.console[level](str);
|
|
634
679
|
const self = this;
|
|
635
680
|
return () => self.console.groupEnd();
|
|
636
681
|
};
|
|
637
682
|
}
|
|
638
683
|
$.$mol_log3_node_make = $mol_log3_node_make;
|
|
639
|
-
$.$mol_log3_come = $mol_log3_node_make('info', 'stdout', 'come',
|
|
640
|
-
$.$mol_log3_done = $mol_log3_node_make('info', 'stdout', 'done',
|
|
641
|
-
$.$mol_log3_fail = $mol_log3_node_make('error', 'stderr', 'fail',
|
|
642
|
-
$.$mol_log3_warn = $mol_log3_node_make('warn', 'stderr', 'warn',
|
|
643
|
-
$.$mol_log3_rise = $mol_log3_node_make('log', 'stdout', 'rise',
|
|
644
|
-
$.$mol_log3_area = $mol_log3_node_make('log', 'stdout', 'area',
|
|
684
|
+
$.$mol_log3_come = $mol_log3_node_make('info', 'stdout', 'come', $mol_term_color.blue);
|
|
685
|
+
$.$mol_log3_done = $mol_log3_node_make('info', 'stdout', 'done', $mol_term_color.green);
|
|
686
|
+
$.$mol_log3_fail = $mol_log3_node_make('error', 'stderr', 'fail', $mol_term_color.red);
|
|
687
|
+
$.$mol_log3_warn = $mol_log3_node_make('warn', 'stderr', 'warn', $mol_term_color.yellow);
|
|
688
|
+
$.$mol_log3_rise = $mol_log3_node_make('log', 'stdout', 'rise', $mol_term_color.magenta);
|
|
689
|
+
$.$mol_log3_area = $mol_log3_node_make('log', 'stdout', 'area', $mol_term_color.cyan);
|
|
645
690
|
})($ || ($ = {}));
|
|
646
691
|
//mol/log3/log3.node.ts
|
|
647
692
|
;
|
|
@@ -831,7 +876,7 @@ var $;
|
|
|
831
876
|
"use strict";
|
|
832
877
|
var $;
|
|
833
878
|
(function ($) {
|
|
834
|
-
$mol_style_attach("mol/theme/theme.css", ":root {\n\t--mol_theme_hue: 210deg;\n\t--mol_theme_luma: 1;\n\t--mol_theme_image: none;\n}\n\n[mol_theme] {\n\tbackground-color: var(--mol_theme_back);\n\tcolor: var(--mol_theme_text);\n\tfill: var(--mol_theme_text);\n}\n\t\n:root, [mol_theme] {\n\t--mol_theme_back: hsl( var(--mol_theme_hue), 50% , calc( 54% + 44% * var(--mol_theme_luma) ) );\n\t--mol_theme_text: hsl( var(--mol_theme_hue), 0% , calc( 50% - 30% * var(--mol_theme_luma) ) );\n\t--mol_theme_field: hsl( var(--mol_theme_hue), 0%, calc( 50% + 50% * var(--mol_theme_luma) ), .2 );\n\t\n\t--mol_theme_card: hsl( var(--mol_theme_hue), 0%, 50%, .05 );\n\t--mol_theme_hover: hsl( var(--mol_theme_hue), 0%, 50%, .1 );\n\t--mol_theme_line: hsl( var(--mol_theme_hue), 0%, 50%, .25 );\n\t--mol_theme_shade: hsl( var(--mol_theme_hue), 0%, 50%, 1 );\n\t\n\t--mol_theme_control: hsl( var(--mol_theme_hue), 50%, calc( 50% - 5% * var(--mol_theme_luma) ) );\n\t--mol_theme_current: hsl( calc( var(--mol_theme_hue) - 90deg ), 50%, calc( 50% - 10% * var(--mol_theme_luma) ) );\n\t--mol_theme_special: hsl( calc( var(--mol_theme_hue) + 90deg ), 50%, calc( 50% - 10% * var(--mol_theme_luma) ) );\n\t--mol_theme_focus: hsl( calc( var(--mol_theme_hue) + 180deg ), 100%, calc( 50% - 15% * var(--mol_theme_luma) ) );\n\t\n}\n\n[mol_theme=\"$mol_theme_light\"] {\n\t--mol_theme_luma: 1;\n\t--mol_theme_image: none;\n}\n\n[mol_theme=\"$mol_theme_dark\"] {\n\t--mol_theme_luma: -1;\n\t--mol_theme_image: invert(1) hue-rotate( 180deg );\n}\n\n[mol_theme=\"$mol_theme_base\"] {\n\t--mol_theme_luma: -2;\n\t--mol_theme_back: hsl( var(--mol_theme_hue), 50%, 40% );\n\t--mol_theme_hover: hsl( var(--mol_theme_hue), 60%, 30% );\n\t--mol_theme_current: hsl( var(--mol_theme_hue), 100%, 20% );\n}\n\n[mol_theme=\"$mol_theme_current\"] {\n\t--mol_theme_back: hsl( calc( var(--mol_theme_hue) - 90deg ), 50%, calc( 50% + 25% * var(--mol_theme_luma) ) );\n}\n\n[mol_theme=\"$mol_theme_special\"] {\n\t--mol_theme_back: hsl( calc( var(--mol_theme_hue) + 90deg ), 50%, calc( 50% + 25% * var(--mol_theme_luma) ) );\n}\n\n[mol_theme=\"$mol_theme_accent\"] {\n\t--mol_theme_luma: -2;\n\t--mol_theme_back: hsl( calc( var(--mol_theme_hue) + 180deg ), 80%, 40% );\n\t--mol_theme_hover: hsl( calc( var(--mol_theme_hue) + 180deg ), 80%, 35% );\n}\n\n[mol_theme=\"$mol_theme_accent\"] [mol_theme=\"$mol_theme_accent\"] {\n\t--mol_theme_back: black;\n}\n");
|
|
879
|
+
$mol_style_attach("mol/theme/theme.css", ":root {\n\t--mol_theme_hue: 210deg;\n\t--mol_theme_luma: -1;\n\t--mol_theme_image: none;\n}\n\n[mol_theme] {\n\tbackground-color: var(--mol_theme_back);\n\tcolor: var(--mol_theme_text);\n\tfill: var(--mol_theme_text);\n}\n\t\n:root, [mol_theme] {\n\t--mol_theme_back: hsl( var(--mol_theme_hue), 50% , calc( 54% + 44% * var(--mol_theme_luma) ) );\n\t--mol_theme_text: hsl( var(--mol_theme_hue), 0% , calc( 50% - 30% * var(--mol_theme_luma) ) );\n\t--mol_theme_field: hsl( var(--mol_theme_hue), 0%, calc( 50% + 50% * var(--mol_theme_luma) ), .2 );\n\t\n\t--mol_theme_card: hsl( var(--mol_theme_hue), 0%, 50%, .05 );\n\t--mol_theme_hover: hsl( var(--mol_theme_hue), 0%, 50%, .1 );\n\t--mol_theme_line: hsl( var(--mol_theme_hue), 0%, 50%, .25 );\n\t--mol_theme_shade: hsl( var(--mol_theme_hue), 0%, 50%, 1 );\n\t\n\t--mol_theme_control: hsl( var(--mol_theme_hue), 50%, calc( 50% - 5% * var(--mol_theme_luma) ) );\n\t--mol_theme_current: hsl( calc( var(--mol_theme_hue) - 90deg ), 50%, calc( 50% - 10% * var(--mol_theme_luma) ) );\n\t--mol_theme_special: hsl( calc( var(--mol_theme_hue) + 90deg ), 50%, calc( 50% - 10% * var(--mol_theme_luma) ) );\n\t--mol_theme_focus: hsl( calc( var(--mol_theme_hue) + 180deg ), 100%, calc( 50% - 15% * var(--mol_theme_luma) ) );\n\t\n}\n\n[mol_theme=\"$mol_theme_light\"] {\n\t--mol_theme_luma: 1;\n\t--mol_theme_image: none;\n}\n\n[mol_theme=\"$mol_theme_dark\"] {\n\t--mol_theme_luma: -1;\n\t--mol_theme_image: invert(1) hue-rotate( 180deg );\n}\n\n[mol_theme=\"$mol_theme_base\"] {\n\t--mol_theme_luma: -2;\n\t--mol_theme_back: hsl( var(--mol_theme_hue), 50%, 40% );\n\t--mol_theme_hover: hsl( var(--mol_theme_hue), 60%, 30% );\n\t--mol_theme_current: hsl( var(--mol_theme_hue), 100%, 20% );\n}\n\n[mol_theme=\"$mol_theme_current\"] {\n\t--mol_theme_back: hsl( calc( var(--mol_theme_hue) - 90deg ), 50%, calc( 50% + 25% * var(--mol_theme_luma) ) );\n}\n\n[mol_theme=\"$mol_theme_special\"] {\n\t--mol_theme_back: hsl( calc( var(--mol_theme_hue) + 90deg ), 50%, calc( 50% + 25% * var(--mol_theme_luma) ) );\n}\n\n[mol_theme=\"$mol_theme_accent\"] {\n\t--mol_theme_luma: -2;\n\t--mol_theme_back: hsl( calc( var(--mol_theme_hue) + 180deg ), 80%, 40% );\n\t--mol_theme_hover: hsl( calc( var(--mol_theme_hue) + 180deg ), 80%, 35% );\n}\n\n[mol_theme=\"$mol_theme_accent\"] [mol_theme=\"$mol_theme_accent\"] {\n\t--mol_theme_back: black;\n}\n");
|
|
835
880
|
})($ || ($ = {}));
|
|
836
881
|
//mol/theme/-css/theme.css.ts
|
|
837
882
|
;
|
|
@@ -945,7 +990,7 @@ var $;
|
|
|
945
990
|
promote() {
|
|
946
991
|
$mol_wire_auto()?.track_next(this);
|
|
947
992
|
}
|
|
948
|
-
|
|
993
|
+
fresh() { }
|
|
949
994
|
complete() { }
|
|
950
995
|
emit(quant = $mol_wire_cursor.stale) {
|
|
951
996
|
for (let i = this.sub_from; i < this.data.length; i += 2) {
|
|
@@ -1148,7 +1193,7 @@ var $;
|
|
|
1148
1193
|
}
|
|
1149
1194
|
for (let cursor = this.pub_from; cursor < this.cursor; cursor += 2) {
|
|
1150
1195
|
const pub = this.data[cursor];
|
|
1151
|
-
pub.
|
|
1196
|
+
pub.fresh();
|
|
1152
1197
|
}
|
|
1153
1198
|
this.cursor = $mol_wire_cursor.fresh;
|
|
1154
1199
|
}
|
|
@@ -1284,7 +1329,7 @@ var $;
|
|
|
1284
1329
|
continue;
|
|
1285
1330
|
if (fiber.cursor === $mol_wire_cursor.final)
|
|
1286
1331
|
continue;
|
|
1287
|
-
fiber.
|
|
1332
|
+
fiber.fresh();
|
|
1288
1333
|
}
|
|
1289
1334
|
}
|
|
1290
1335
|
while (this.reaping.size) {
|
|
@@ -1352,7 +1397,7 @@ var $;
|
|
|
1352
1397
|
else
|
|
1353
1398
|
super.emit(quant);
|
|
1354
1399
|
}
|
|
1355
|
-
|
|
1400
|
+
fresh() {
|
|
1356
1401
|
if (this.cursor === $mol_wire_cursor.fresh)
|
|
1357
1402
|
return;
|
|
1358
1403
|
if (this.cursor === $mol_wire_cursor.final)
|
|
@@ -1360,7 +1405,7 @@ var $;
|
|
|
1360
1405
|
check: if (this.cursor === $mol_wire_cursor.doubt) {
|
|
1361
1406
|
for (let i = this.pub_from; i < this.sub_from; i += 2) {
|
|
1362
1407
|
;
|
|
1363
|
-
this.data[i]?.
|
|
1408
|
+
this.data[i]?.fresh();
|
|
1364
1409
|
if (this.cursor !== $mol_wire_cursor.doubt)
|
|
1365
1410
|
break check;
|
|
1366
1411
|
}
|
|
@@ -1416,12 +1461,16 @@ var $;
|
|
|
1416
1461
|
this.track_off(bu);
|
|
1417
1462
|
this.put(result);
|
|
1418
1463
|
}
|
|
1464
|
+
refresh() {
|
|
1465
|
+
this.cursor = $mol_wire_cursor.stale;
|
|
1466
|
+
this.fresh();
|
|
1467
|
+
}
|
|
1419
1468
|
sync() {
|
|
1420
1469
|
if (!$mol_wire_fiber.warm) {
|
|
1421
1470
|
return this.result();
|
|
1422
1471
|
}
|
|
1423
1472
|
this.promote();
|
|
1424
|
-
this.
|
|
1473
|
+
this.fresh();
|
|
1425
1474
|
if (this.cache instanceof Error) {
|
|
1426
1475
|
return $mol_fail_hidden(this.cache);
|
|
1427
1476
|
}
|
|
@@ -1432,7 +1481,7 @@ var $;
|
|
|
1432
1481
|
}
|
|
1433
1482
|
async async() {
|
|
1434
1483
|
while (true) {
|
|
1435
|
-
this.
|
|
1484
|
+
this.fresh();
|
|
1436
1485
|
if (this.cache instanceof Error) {
|
|
1437
1486
|
$mol_fail_hidden(this.cache);
|
|
1438
1487
|
}
|
|
@@ -1734,6 +1783,22 @@ var $;
|
|
|
1734
1783
|
};
|
|
1735
1784
|
}
|
|
1736
1785
|
}
|
|
1786
|
+
static watching = new Set();
|
|
1787
|
+
static watch() {
|
|
1788
|
+
new $mol_after_frame($mol_wire_atom.watch);
|
|
1789
|
+
for (const atom of $mol_wire_atom.watching) {
|
|
1790
|
+
if (atom.cursor === $mol_wire_cursor.final) {
|
|
1791
|
+
$mol_wire_atom.watching.delete(atom);
|
|
1792
|
+
}
|
|
1793
|
+
else {
|
|
1794
|
+
atom.cursor = $mol_wire_cursor.stale;
|
|
1795
|
+
atom.fresh();
|
|
1796
|
+
}
|
|
1797
|
+
}
|
|
1798
|
+
}
|
|
1799
|
+
watch() {
|
|
1800
|
+
$mol_wire_atom.watching.add(this);
|
|
1801
|
+
}
|
|
1737
1802
|
resync(args) {
|
|
1738
1803
|
return this.put(this.task.call(this.host, ...args));
|
|
1739
1804
|
}
|
|
@@ -1788,6 +1853,7 @@ var $;
|
|
|
1788
1853
|
$mol_wire_method
|
|
1789
1854
|
], $mol_wire_atom.prototype, "once", null);
|
|
1790
1855
|
$.$mol_wire_atom = $mol_wire_atom;
|
|
1856
|
+
$mol_wire_atom.watch();
|
|
1791
1857
|
})($ || ($ = {}));
|
|
1792
1858
|
//mol/wire/atom/atom.ts
|
|
1793
1859
|
;
|
|
@@ -1977,6 +2043,22 @@ var $;
|
|
|
1977
2043
|
;
|
|
1978
2044
|
"use strict";
|
|
1979
2045
|
var $;
|
|
2046
|
+
(function ($) {
|
|
2047
|
+
function $mol_wire_watch() {
|
|
2048
|
+
const atom = $mol_wire_auto();
|
|
2049
|
+
if (atom instanceof $mol_wire_atom) {
|
|
2050
|
+
atom.watch();
|
|
2051
|
+
}
|
|
2052
|
+
else {
|
|
2053
|
+
$mol_fail(new Error('Atom is equired for watching'));
|
|
2054
|
+
}
|
|
2055
|
+
}
|
|
2056
|
+
$.$mol_wire_watch = $mol_wire_watch;
|
|
2057
|
+
})($ || ($ = {}));
|
|
2058
|
+
//mol/wire/watch/watch.ts
|
|
2059
|
+
;
|
|
2060
|
+
"use strict";
|
|
2061
|
+
var $;
|
|
1980
2062
|
(function ($) {
|
|
1981
2063
|
function $mol_const(value) {
|
|
1982
2064
|
var getter = (() => value);
|
|
@@ -2027,7 +2109,12 @@ var $;
|
|
|
2027
2109
|
fiber = temp(obj, args);
|
|
2028
2110
|
return fiber.async();
|
|
2029
2111
|
};
|
|
2030
|
-
}
|
|
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
|
+
},
|
|
2031
2118
|
});
|
|
2032
2119
|
}
|
|
2033
2120
|
$.$mol_wire_async = $mol_wire_async;
|
|
@@ -2160,7 +2247,7 @@ var $;
|
|
|
2160
2247
|
"use strict";
|
|
2161
2248
|
var $;
|
|
2162
2249
|
(function ($) {
|
|
2163
|
-
$mol_style_attach("mol/view/view/view.css", "[mol_view] {\n\ttransition-property: height, width, min-height, min-width, max-width, max-height, transform;\n\ttransition-duration: .2s;\n\ttransition-timing-function: ease-out;\n\t-webkit-appearance: none;\n\tword-break: break-word;\n\tbox-sizing: border-box;\n\tdisplay: flex;\n\tflex-shrink: 0;\n\tcontain: style;\n\ttab-size: 4;\n}\n\n[mol_view]::selection {\n\tbackground: var(--mol_theme_line);\n}\n\n[mol_view] > * {\n\tword-break: inherit;\n}\n\n[mol_view_root] {\n\tmargin: 0;\n\tpadding: 0;\n\twidth: 100%;\n\theight: 100%;\n
|
|
2250
|
+
$mol_style_attach("mol/view/view/view.css", "[mol_view] {\n\ttransition-property: height, width, min-height, min-width, max-width, max-height, transform;\n\ttransition-duration: .2s;\n\ttransition-timing-function: ease-out;\n\t-webkit-appearance: none;\n\tword-break: break-word;\n\tbox-sizing: border-box;\n\tdisplay: flex;\n\tflex-shrink: 0;\n\tcontain: style;\n\ttab-size: 4;\n}\n\n[mol_view]::selection {\n\tbackground: var(--mol_theme_line);\n}\n\n[mol_view] > * {\n\tword-break: inherit;\n}\n\n[mol_view_root] {\n\tmargin: 0;\n\tpadding: 0;\n\twidth: 100%;\n\theight: 100%;\n\tbox-sizing: border-box;\n\tfont-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;\n\tfont-size: 1rem;\n\tline-height: 1.5rem;\n\tbackground: var(--mol_theme_back);\n\tcolor: var(--mol_theme_text);\n\tcontain: unset; /** Fixes bg ignoring when applied to body on Chrome */\n}\n\n[mol_view][mol_view_error]:not([mol_view_error=\"Promise\"]) {\n\tbackground-image: repeating-linear-gradient(\n\t\t-45deg,\n\t\t#f92323,\n\t\t#f92323 .5rem,\n\t\t#ff3d3d .5rem,\n\t\t#ff3d3d 1.5rem\n\t);\n\tcolor: black;\n\talign-items: center;\n justify-content: center;\n}\n\n@keyframes mol_view_wait_move {\n\tfrom {\n\t\tbackground-position: 0 0;\n\t}\n\tto {\n\t\tbackground-position: 200vmax 0;\n\t}\n}\n\n@keyframes mol_view_wait_show {\n\tto {\n\t\tbackground-image: repeating-linear-gradient(\n\t\t\t45deg,\n\t\t\thsla( 0 , 0% , 50% , .5 ) 0% ,\n\t\t\thsla( 0 , 0% , 50% , 0 ) 5% ,\n\t\t\thsla( 0 , 0% , 50% , 0 ) 45% ,\n\t\t\thsla( 0 , 0% , 50% , .5 ) 50% ,\n\t\t\thsla( 0 , 0% , 50% , 0 ) 55% ,\n\t\t\thsla( 0 , 0% , 50% , 0 ) 95% ,\n\t\t\thsla( 0 , 0% , 50% , .5 ) 100%\n\t\t);\n\t\tbackground-size: 200vmax 200vmax;\n\t}\n}\n\n[mol_view][mol_view_error=\"Promise\"] {\n\tanimation: mol_view_wait_show .5s .5s linear forwards , mol_view_wait_move 1s linear infinite;\n\topacity: .75;\n}\n");
|
|
2164
2251
|
})($ || ($ = {}));
|
|
2165
2252
|
//mol/view/view/-css/view.css.ts
|
|
2166
2253
|
;
|
|
@@ -2266,15 +2353,9 @@ var $;
|
|
|
2266
2353
|
}
|
|
2267
2354
|
static watchers = new Set();
|
|
2268
2355
|
view_rect() {
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
view_rect_cache(next = null) {
|
|
2273
|
-
return next;
|
|
2274
|
-
}
|
|
2275
|
-
view_rect_watcher() {
|
|
2276
|
-
$mol_view.watchers.add(this);
|
|
2277
|
-
return { destructor: () => $mol_view.watchers.delete(this) };
|
|
2356
|
+
$mol_wire_watch();
|
|
2357
|
+
const { width, height, left, right, top, bottom } = this.dom_node().getBoundingClientRect();
|
|
2358
|
+
return { width, height, left, right, top, bottom };
|
|
2278
2359
|
}
|
|
2279
2360
|
dom_id() {
|
|
2280
2361
|
return this.toString();
|
|
@@ -2491,12 +2572,6 @@ var $;
|
|
|
2491
2572
|
__decorate([
|
|
2492
2573
|
$mol_mem
|
|
2493
2574
|
], $mol_view.prototype, "view_rect", null);
|
|
2494
|
-
__decorate([
|
|
2495
|
-
$mol_mem
|
|
2496
|
-
], $mol_view.prototype, "view_rect_cache", null);
|
|
2497
|
-
__decorate([
|
|
2498
|
-
$mol_mem
|
|
2499
|
-
], $mol_view.prototype, "view_rect_watcher", null);
|
|
2500
2575
|
__decorate([
|
|
2501
2576
|
$mol_mem
|
|
2502
2577
|
], $mol_view.prototype, "dom_node", null);
|
|
@@ -4061,14 +4136,12 @@ var $;
|
|
|
4061
4136
|
const size_real = this.size_real();
|
|
4062
4137
|
const max_x = (viewport.x.max - viewport.x.min) / size_real.x;
|
|
4063
4138
|
const max_y = (viewport.y.max - viewport.y.min) / size_real.y;
|
|
4064
|
-
return this.
|
|
4139
|
+
return this.graphs_positioned().filter(graph => {
|
|
4065
4140
|
const dims = graph.dimensions();
|
|
4066
4141
|
if (dims.x.min > dims.x.max)
|
|
4067
4142
|
return true;
|
|
4068
4143
|
if (dims.y.min > dims.y.max)
|
|
4069
4144
|
return true;
|
|
4070
|
-
if (dims.x.max - dims.x.min < max_x && dims.y.max - dims.y.min < max_y)
|
|
4071
|
-
return false;
|
|
4072
4145
|
if (dims.x.min > viewport.x.max)
|
|
4073
4146
|
return false;
|
|
4074
4147
|
if (dims.x.max < viewport.x.min)
|
|
@@ -4081,7 +4154,7 @@ var $;
|
|
|
4081
4154
|
});
|
|
4082
4155
|
}
|
|
4083
4156
|
graphs_positioned() {
|
|
4084
|
-
const graphs = this.
|
|
4157
|
+
const graphs = this.graphs();
|
|
4085
4158
|
for (let graph of graphs) {
|
|
4086
4159
|
graph.shift = () => this.shift();
|
|
4087
4160
|
graph.scale = () => this.scale();
|
|
@@ -4529,12 +4602,6 @@ var $;
|
|
|
4529
4602
|
const size_x = Math.max(0, Math.ceil((1 / aspect - 1) * diameter));
|
|
4530
4603
|
return points.map(point => `M ${point[0] - shift_x} ${point[1] - shift_y} l ${size_x} ${size_y}`).join(' ');
|
|
4531
4604
|
}
|
|
4532
|
-
dimensions() {
|
|
4533
|
-
const scale = this.scale();
|
|
4534
|
-
const radius = this.diameter() / Math.min(...scale) / 2;
|
|
4535
|
-
const dims = super.dimensions();
|
|
4536
|
-
return new this.$.$mol_vector_2d(new $mol_vector_range(dims.x.min - radius, dims.x.max + radius), new $mol_vector_range(dims.y.min - radius, dims.y.max + radius));
|
|
4537
|
-
}
|
|
4538
4605
|
}
|
|
4539
4606
|
__decorate([
|
|
4540
4607
|
$mol_mem
|
|
@@ -4542,9 +4609,6 @@ var $;
|
|
|
4542
4609
|
__decorate([
|
|
4543
4610
|
$mol_mem
|
|
4544
4611
|
], $mol_plot_dot.prototype, "indexes", null);
|
|
4545
|
-
__decorate([
|
|
4546
|
-
$mol_mem
|
|
4547
|
-
], $mol_plot_dot.prototype, "dimensions", null);
|
|
4548
4612
|
$$.$mol_plot_dot = $mol_plot_dot;
|
|
4549
4613
|
})($$ = $.$$ || ($.$$ = {}));
|
|
4550
4614
|
})($ || ($ = {}));
|
|
@@ -5931,6 +5995,20 @@ var $;
|
|
|
5931
5995
|
//mol/test/test.test.ts
|
|
5932
5996
|
;
|
|
5933
5997
|
"use strict";
|
|
5998
|
+
var $;
|
|
5999
|
+
(function ($_1) {
|
|
6000
|
+
$mol_test_mocks.push($ => {
|
|
6001
|
+
$.$mol_log3_come = () => { };
|
|
6002
|
+
$.$mol_log3_done = () => { };
|
|
6003
|
+
$.$mol_log3_fail = () => { };
|
|
6004
|
+
$.$mol_log3_warn = () => { };
|
|
6005
|
+
$.$mol_log3_rise = () => { };
|
|
6006
|
+
$.$mol_log3_area = () => () => { };
|
|
6007
|
+
});
|
|
6008
|
+
})($ || ($ = {}));
|
|
6009
|
+
//mol/log3/log3.test.ts
|
|
6010
|
+
;
|
|
6011
|
+
"use strict";
|
|
5934
6012
|
//mol/type/error/error.ts
|
|
5935
6013
|
;
|
|
5936
6014
|
"use strict";
|
|
@@ -6437,20 +6515,6 @@ var $;
|
|
|
6437
6515
|
;
|
|
6438
6516
|
"use strict";
|
|
6439
6517
|
var $;
|
|
6440
|
-
(function ($_1) {
|
|
6441
|
-
$mol_test_mocks.push($ => {
|
|
6442
|
-
$.$mol_log3_come = () => { };
|
|
6443
|
-
$.$mol_log3_done = () => { };
|
|
6444
|
-
$.$mol_log3_fail = () => { };
|
|
6445
|
-
$.$mol_log3_warn = () => { };
|
|
6446
|
-
$.$mol_log3_rise = () => { };
|
|
6447
|
-
$.$mol_log3_area = () => () => { };
|
|
6448
|
-
});
|
|
6449
|
-
})($ || ($ = {}));
|
|
6450
|
-
//mol/log3/log3.test.ts
|
|
6451
|
-
;
|
|
6452
|
-
"use strict";
|
|
6453
|
-
var $;
|
|
6454
6518
|
(function ($_1) {
|
|
6455
6519
|
$mol_test({
|
|
6456
6520
|
'tree parsing'() {
|
|
@@ -6520,6 +6584,78 @@ var $;
|
|
|
6520
6584
|
;
|
|
6521
6585
|
"use strict";
|
|
6522
6586
|
var $;
|
|
6587
|
+
(function ($) {
|
|
6588
|
+
function $mol_promise() {
|
|
6589
|
+
let done;
|
|
6590
|
+
let fail;
|
|
6591
|
+
const promise = new Promise((d, f) => {
|
|
6592
|
+
done = d;
|
|
6593
|
+
fail = f;
|
|
6594
|
+
});
|
|
6595
|
+
return Object.assign(promise, {
|
|
6596
|
+
done,
|
|
6597
|
+
fail,
|
|
6598
|
+
});
|
|
6599
|
+
}
|
|
6600
|
+
$.$mol_promise = $mol_promise;
|
|
6601
|
+
})($ || ($ = {}));
|
|
6602
|
+
//mol/promise/promise.ts
|
|
6603
|
+
;
|
|
6604
|
+
"use strict";
|
|
6605
|
+
var $;
|
|
6606
|
+
(function ($_1) {
|
|
6607
|
+
$mol_test_mocks.push($ => {
|
|
6608
|
+
$.$mol_after_timeout = $mol_after_mock_timeout;
|
|
6609
|
+
});
|
|
6610
|
+
})($ || ($ = {}));
|
|
6611
|
+
//mol/after/timeout/timeout.test.ts
|
|
6612
|
+
;
|
|
6613
|
+
"use strict";
|
|
6614
|
+
var $;
|
|
6615
|
+
(function ($) {
|
|
6616
|
+
function $mol_wire_sync(obj) {
|
|
6617
|
+
return new Proxy(obj, {
|
|
6618
|
+
get(obj, field) {
|
|
6619
|
+
const val = obj[field];
|
|
6620
|
+
if (typeof val !== 'function')
|
|
6621
|
+
return val;
|
|
6622
|
+
const temp = $mol_wire_task.getter(val);
|
|
6623
|
+
return function $mol_wire_sync(...args) {
|
|
6624
|
+
const fiber = temp(obj, args);
|
|
6625
|
+
return fiber.sync();
|
|
6626
|
+
};
|
|
6627
|
+
},
|
|
6628
|
+
apply(obj, self, args) {
|
|
6629
|
+
const temp = $mol_wire_task.getter(obj);
|
|
6630
|
+
const fiber = temp(self, args);
|
|
6631
|
+
return fiber.sync();
|
|
6632
|
+
},
|
|
6633
|
+
});
|
|
6634
|
+
}
|
|
6635
|
+
$.$mol_wire_sync = $mol_wire_sync;
|
|
6636
|
+
})($ || ($ = {}));
|
|
6637
|
+
//mol/wire/sync/sync.ts
|
|
6638
|
+
;
|
|
6639
|
+
"use strict";
|
|
6640
|
+
var $;
|
|
6641
|
+
(function ($) {
|
|
6642
|
+
function $mol_wait_timeout_async(timeout) {
|
|
6643
|
+
const promise = $mol_promise();
|
|
6644
|
+
const task = new this.$mol_after_timeout(timeout, () => promise.done());
|
|
6645
|
+
return Object.assign(promise, {
|
|
6646
|
+
destructor: () => task.destructor()
|
|
6647
|
+
});
|
|
6648
|
+
}
|
|
6649
|
+
$.$mol_wait_timeout_async = $mol_wait_timeout_async;
|
|
6650
|
+
function $mol_wait_timeout(timeout) {
|
|
6651
|
+
return this.$mol_wire_sync(this).$mol_wait_timeout_async(timeout);
|
|
6652
|
+
}
|
|
6653
|
+
$.$mol_wait_timeout = $mol_wait_timeout;
|
|
6654
|
+
})($ || ($ = {}));
|
|
6655
|
+
//mol/wait/timeout/timeout.ts
|
|
6656
|
+
;
|
|
6657
|
+
"use strict";
|
|
6658
|
+
var $;
|
|
6523
6659
|
(function ($_1) {
|
|
6524
6660
|
$mol_test({
|
|
6525
6661
|
async 'Latest Calls Wins on Concurrency'($) {
|
|
@@ -6541,6 +6677,15 @@ var $;
|
|
|
6541
6677
|
$mol_assert_like(NameLogger.first, ['john', 'jin']);
|
|
6542
6678
|
$mol_assert_like(NameLogger.last, ['jin']);
|
|
6543
6679
|
},
|
|
6680
|
+
async 'Wrap function'($) {
|
|
6681
|
+
const name = $mol_wire_async(function (name) {
|
|
6682
|
+
$.$mol_wait_timeout(0);
|
|
6683
|
+
return name;
|
|
6684
|
+
});
|
|
6685
|
+
const promise = name('jin');
|
|
6686
|
+
$.$mol_after_mock_warp();
|
|
6687
|
+
$mol_assert_like(await promise, 'jin');
|
|
6688
|
+
},
|
|
6544
6689
|
});
|
|
6545
6690
|
})($ || ($ = {}));
|
|
6546
6691
|
//mol/wire/async/async.test.ts
|
|
@@ -6605,15 +6750,6 @@ var $;
|
|
|
6605
6750
|
;
|
|
6606
6751
|
"use strict";
|
|
6607
6752
|
var $;
|
|
6608
|
-
(function ($_1) {
|
|
6609
|
-
$mol_test_mocks.push($ => {
|
|
6610
|
-
$.$mol_after_timeout = $mol_after_mock_timeout;
|
|
6611
|
-
});
|
|
6612
|
-
})($ || ($ = {}));
|
|
6613
|
-
//mol/after/timeout/timeout.test.ts
|
|
6614
|
-
;
|
|
6615
|
-
"use strict";
|
|
6616
|
-
var $;
|
|
6617
6753
|
(function ($_1) {
|
|
6618
6754
|
$mol_test_mocks.push($ => {
|
|
6619
6755
|
$.$mol_after_frame = $mol_after_mock_commmon;
|
|
@@ -6705,64 +6841,6 @@ var $;
|
|
|
6705
6841
|
;
|
|
6706
6842
|
"use strict";
|
|
6707
6843
|
var $;
|
|
6708
|
-
(function ($) {
|
|
6709
|
-
function $mol_wire_sync(obj) {
|
|
6710
|
-
return new Proxy(obj, {
|
|
6711
|
-
get(obj, field) {
|
|
6712
|
-
const val = obj[field];
|
|
6713
|
-
if (typeof val !== 'function')
|
|
6714
|
-
return val;
|
|
6715
|
-
const temp = $mol_wire_task.getter(val);
|
|
6716
|
-
return function $mol_wire_sync(...args) {
|
|
6717
|
-
const fiber = temp(obj, args);
|
|
6718
|
-
return fiber.sync();
|
|
6719
|
-
};
|
|
6720
|
-
}
|
|
6721
|
-
});
|
|
6722
|
-
}
|
|
6723
|
-
$.$mol_wire_sync = $mol_wire_sync;
|
|
6724
|
-
})($ || ($ = {}));
|
|
6725
|
-
//mol/wire/sync/sync.ts
|
|
6726
|
-
;
|
|
6727
|
-
"use strict";
|
|
6728
|
-
var $;
|
|
6729
|
-
(function ($) {
|
|
6730
|
-
function $mol_promise() {
|
|
6731
|
-
let done;
|
|
6732
|
-
let fail;
|
|
6733
|
-
const promise = new Promise((d, f) => {
|
|
6734
|
-
done = d;
|
|
6735
|
-
fail = f;
|
|
6736
|
-
});
|
|
6737
|
-
return Object.assign(promise, {
|
|
6738
|
-
done,
|
|
6739
|
-
fail,
|
|
6740
|
-
});
|
|
6741
|
-
}
|
|
6742
|
-
$.$mol_promise = $mol_promise;
|
|
6743
|
-
})($ || ($ = {}));
|
|
6744
|
-
//mol/promise/promise.ts
|
|
6745
|
-
;
|
|
6746
|
-
"use strict";
|
|
6747
|
-
var $;
|
|
6748
|
-
(function ($) {
|
|
6749
|
-
function $mol_wait_timeout_async(timeout) {
|
|
6750
|
-
const promise = $mol_promise();
|
|
6751
|
-
const task = new this.$mol_after_timeout(timeout, () => promise.done());
|
|
6752
|
-
return Object.assign(promise, {
|
|
6753
|
-
destructor: () => task.destructor()
|
|
6754
|
-
});
|
|
6755
|
-
}
|
|
6756
|
-
$.$mol_wait_timeout_async = $mol_wait_timeout_async;
|
|
6757
|
-
function $mol_wait_timeout(timeout) {
|
|
6758
|
-
return this.$mol_wire_sync(this).$mol_wait_timeout_async(timeout);
|
|
6759
|
-
}
|
|
6760
|
-
$.$mol_wait_timeout = $mol_wait_timeout;
|
|
6761
|
-
})($ || ($ = {}));
|
|
6762
|
-
//mol/wait/timeout/timeout.ts
|
|
6763
|
-
;
|
|
6764
|
-
"use strict";
|
|
6765
|
-
var $;
|
|
6766
6844
|
(function ($_1) {
|
|
6767
6845
|
$mol_test({
|
|
6768
6846
|
'Cached channel'($) {
|
|
@@ -7495,36 +7573,6 @@ var $;
|
|
|
7495
7573
|
;
|
|
7496
7574
|
"use strict";
|
|
7497
7575
|
var $;
|
|
7498
|
-
(function ($) {
|
|
7499
|
-
$mol_test({
|
|
7500
|
-
'const returns stored value'() {
|
|
7501
|
-
const foo = { bar: $mol_const(Math.random()) };
|
|
7502
|
-
$mol_assert_equal(foo.bar(), foo.bar());
|
|
7503
|
-
$mol_assert_equal(foo.bar(), foo.bar['()']);
|
|
7504
|
-
},
|
|
7505
|
-
});
|
|
7506
|
-
})($ || ($ = {}));
|
|
7507
|
-
//mol/const/const.test.ts
|
|
7508
|
-
;
|
|
7509
|
-
"use strict";
|
|
7510
|
-
var $;
|
|
7511
|
-
(function ($_1) {
|
|
7512
|
-
$mol_test({
|
|
7513
|
-
'FQN of anon function'($) {
|
|
7514
|
-
const $$ = Object.assign($, { $mol_func_name_test: (() => () => { })() });
|
|
7515
|
-
$mol_assert_equal($$.$mol_func_name_test.name, '');
|
|
7516
|
-
$mol_assert_equal($$.$mol_func_name($$.$mol_func_name_test), '$mol_func_name_test');
|
|
7517
|
-
$mol_assert_equal($$.$mol_func_name_test.name, '$mol_func_name_test');
|
|
7518
|
-
},
|
|
7519
|
-
});
|
|
7520
|
-
})($ || ($ = {}));
|
|
7521
|
-
//mol/func/name/name.test.ts
|
|
7522
|
-
;
|
|
7523
|
-
"use strict";
|
|
7524
|
-
//mol/type/keys/extract/extract.test.ts
|
|
7525
|
-
;
|
|
7526
|
-
"use strict";
|
|
7527
|
-
var $;
|
|
7528
7576
|
(function ($) {
|
|
7529
7577
|
class $mol_wire_log extends $mol_object2 {
|
|
7530
7578
|
static watch(task) {
|
|
@@ -7641,6 +7689,36 @@ var $;
|
|
|
7641
7689
|
;
|
|
7642
7690
|
"use strict";
|
|
7643
7691
|
var $;
|
|
7692
|
+
(function ($) {
|
|
7693
|
+
$mol_test({
|
|
7694
|
+
'const returns stored value'() {
|
|
7695
|
+
const foo = { bar: $mol_const(Math.random()) };
|
|
7696
|
+
$mol_assert_equal(foo.bar(), foo.bar());
|
|
7697
|
+
$mol_assert_equal(foo.bar(), foo.bar['()']);
|
|
7698
|
+
},
|
|
7699
|
+
});
|
|
7700
|
+
})($ || ($ = {}));
|
|
7701
|
+
//mol/const/const.test.ts
|
|
7702
|
+
;
|
|
7703
|
+
"use strict";
|
|
7704
|
+
var $;
|
|
7705
|
+
(function ($_1) {
|
|
7706
|
+
$mol_test({
|
|
7707
|
+
'FQN of anon function'($) {
|
|
7708
|
+
const $$ = Object.assign($, { $mol_func_name_test: (() => () => { })() });
|
|
7709
|
+
$mol_assert_equal($$.$mol_func_name_test.name, '');
|
|
7710
|
+
$mol_assert_equal($$.$mol_func_name($$.$mol_func_name_test), '$mol_func_name_test');
|
|
7711
|
+
$mol_assert_equal($$.$mol_func_name_test.name, '$mol_func_name_test');
|
|
7712
|
+
},
|
|
7713
|
+
});
|
|
7714
|
+
})($ || ($ = {}));
|
|
7715
|
+
//mol/func/name/name.test.ts
|
|
7716
|
+
;
|
|
7717
|
+
"use strict";
|
|
7718
|
+
//mol/type/keys/extract/extract.test.ts
|
|
7719
|
+
;
|
|
7720
|
+
"use strict";
|
|
7721
|
+
var $;
|
|
7644
7722
|
(function ($_1) {
|
|
7645
7723
|
$mol_test({
|
|
7646
7724
|
'id auto generation'($) {
|
|
@@ -8055,7 +8133,6 @@ var $;
|
|
|
8055
8133
|
"use strict";
|
|
8056
8134
|
var $;
|
|
8057
8135
|
(function ($) {
|
|
8058
|
-
const TextDecoder = globalThis.TextDecoder ?? $node.util.TextDecoder;
|
|
8059
8136
|
function $mol_charset_decode(value, code = 'utf8') {
|
|
8060
8137
|
return new TextDecoder(code).decode(value);
|
|
8061
8138
|
}
|