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.esm.js
CHANGED
|
@@ -240,6 +240,8 @@ var $node = new Proxy({ require }, {
|
|
|
240
240
|
const mod = target.require('module');
|
|
241
241
|
if (mod.builtinModules.indexOf(name) >= 0)
|
|
242
242
|
return target.require(name);
|
|
243
|
+
if (name[0] === '.')
|
|
244
|
+
return target.require(name);
|
|
243
245
|
const path = target.require('path');
|
|
244
246
|
const fs = target.require('fs');
|
|
245
247
|
let dir = path.resolve('.');
|
|
@@ -627,29 +629,72 @@ var $;
|
|
|
627
629
|
;
|
|
628
630
|
"use strict";
|
|
629
631
|
var $;
|
|
632
|
+
(function ($) {
|
|
633
|
+
class $mol_term_color {
|
|
634
|
+
static reset = this.ansi(0, 0);
|
|
635
|
+
static bold = this.ansi(1, 22);
|
|
636
|
+
static italic = this.ansi(3, 23);
|
|
637
|
+
static underline = this.ansi(4, 24);
|
|
638
|
+
static inverse = this.ansi(7, 27);
|
|
639
|
+
static hidden = this.ansi(8, 28);
|
|
640
|
+
static strike = this.ansi(9, 29);
|
|
641
|
+
static gray = this.ansi(90, 39);
|
|
642
|
+
static red = this.ansi(91, 39);
|
|
643
|
+
static green = this.ansi(92, 39);
|
|
644
|
+
static yellow = this.ansi(93, 39);
|
|
645
|
+
static blue = this.ansi(94, 39);
|
|
646
|
+
static magenta = this.ansi(95, 39);
|
|
647
|
+
static cyan = this.ansi(96, 39);
|
|
648
|
+
static white = this.ansi(97, 39);
|
|
649
|
+
static Red = (str) => this.inverse(this.red(str));
|
|
650
|
+
static Green = (str) => this.inverse(this.green(str));
|
|
651
|
+
static Yellow = (str) => this.inverse(this.yellow(str));
|
|
652
|
+
static Blue = (str) => this.inverse(this.blue(str));
|
|
653
|
+
static Magenta = (str) => this.inverse(this.magenta(str));
|
|
654
|
+
static Cyan = (str) => this.inverse(this.cyan(str));
|
|
655
|
+
static White = (str) => this.inverse(this.white(str));
|
|
656
|
+
static ansi(open, close) {
|
|
657
|
+
if (typeof process === 'undefined')
|
|
658
|
+
return String;
|
|
659
|
+
if (!process.stdout.isTTY)
|
|
660
|
+
return String;
|
|
661
|
+
const prefix = `\x1b[${open}m`;
|
|
662
|
+
const postfix = `\x1b[${close}m`;
|
|
663
|
+
const suffix_regexp = new RegExp(postfix.replace('[', '\\['), 'g');
|
|
664
|
+
return function colorer(str) {
|
|
665
|
+
str = String(str);
|
|
666
|
+
if (str === '')
|
|
667
|
+
return str;
|
|
668
|
+
const suffix = str.replace(suffix_regexp, prefix);
|
|
669
|
+
return prefix + suffix + postfix;
|
|
670
|
+
};
|
|
671
|
+
}
|
|
672
|
+
}
|
|
673
|
+
$.$mol_term_color = $mol_term_color;
|
|
674
|
+
})($ || ($ = {}));
|
|
675
|
+
//mol/term/color/color.ts
|
|
676
|
+
;
|
|
677
|
+
"use strict";
|
|
678
|
+
var $;
|
|
630
679
|
(function ($) {
|
|
631
680
|
function $mol_log3_node_make(level, output, type, color) {
|
|
632
681
|
return function $mol_log3_logger(event) {
|
|
633
682
|
if (!event.time)
|
|
634
683
|
event = { time: new Date().toISOString(), ...event };
|
|
635
684
|
const tree = this.$mol_tree.fromJSON(event).clone({ type });
|
|
636
|
-
let str = tree.toString();
|
|
637
|
-
if (process[output].isTTY) {
|
|
638
|
-
str = $node.colorette[color + 'Bright'](str);
|
|
639
|
-
}
|
|
640
|
-
;
|
|
685
|
+
let str = color(tree.toString());
|
|
641
686
|
this.console[level](str);
|
|
642
687
|
const self = this;
|
|
643
688
|
return () => self.console.groupEnd();
|
|
644
689
|
};
|
|
645
690
|
}
|
|
646
691
|
$.$mol_log3_node_make = $mol_log3_node_make;
|
|
647
|
-
$.$mol_log3_come = $mol_log3_node_make('info', 'stdout', 'come',
|
|
648
|
-
$.$mol_log3_done = $mol_log3_node_make('info', 'stdout', 'done',
|
|
649
|
-
$.$mol_log3_fail = $mol_log3_node_make('error', 'stderr', 'fail',
|
|
650
|
-
$.$mol_log3_warn = $mol_log3_node_make('warn', 'stderr', 'warn',
|
|
651
|
-
$.$mol_log3_rise = $mol_log3_node_make('log', 'stdout', 'rise',
|
|
652
|
-
$.$mol_log3_area = $mol_log3_node_make('log', 'stdout', 'area',
|
|
692
|
+
$.$mol_log3_come = $mol_log3_node_make('info', 'stdout', 'come', $mol_term_color.blue);
|
|
693
|
+
$.$mol_log3_done = $mol_log3_node_make('info', 'stdout', 'done', $mol_term_color.green);
|
|
694
|
+
$.$mol_log3_fail = $mol_log3_node_make('error', 'stderr', 'fail', $mol_term_color.red);
|
|
695
|
+
$.$mol_log3_warn = $mol_log3_node_make('warn', 'stderr', 'warn', $mol_term_color.yellow);
|
|
696
|
+
$.$mol_log3_rise = $mol_log3_node_make('log', 'stdout', 'rise', $mol_term_color.magenta);
|
|
697
|
+
$.$mol_log3_area = $mol_log3_node_make('log', 'stdout', 'area', $mol_term_color.cyan);
|
|
653
698
|
})($ || ($ = {}));
|
|
654
699
|
//mol/log3/log3.node.ts
|
|
655
700
|
;
|
|
@@ -839,7 +884,7 @@ var $;
|
|
|
839
884
|
"use strict";
|
|
840
885
|
var $;
|
|
841
886
|
(function ($) {
|
|
842
|
-
$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");
|
|
887
|
+
$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");
|
|
843
888
|
})($ || ($ = {}));
|
|
844
889
|
//mol/theme/-css/theme.css.ts
|
|
845
890
|
;
|
|
@@ -953,7 +998,7 @@ var $;
|
|
|
953
998
|
promote() {
|
|
954
999
|
$mol_wire_auto()?.track_next(this);
|
|
955
1000
|
}
|
|
956
|
-
|
|
1001
|
+
fresh() { }
|
|
957
1002
|
complete() { }
|
|
958
1003
|
emit(quant = $mol_wire_cursor.stale) {
|
|
959
1004
|
for (let i = this.sub_from; i < this.data.length; i += 2) {
|
|
@@ -1156,7 +1201,7 @@ var $;
|
|
|
1156
1201
|
}
|
|
1157
1202
|
for (let cursor = this.pub_from; cursor < this.cursor; cursor += 2) {
|
|
1158
1203
|
const pub = this.data[cursor];
|
|
1159
|
-
pub.
|
|
1204
|
+
pub.fresh();
|
|
1160
1205
|
}
|
|
1161
1206
|
this.cursor = $mol_wire_cursor.fresh;
|
|
1162
1207
|
}
|
|
@@ -1292,7 +1337,7 @@ var $;
|
|
|
1292
1337
|
continue;
|
|
1293
1338
|
if (fiber.cursor === $mol_wire_cursor.final)
|
|
1294
1339
|
continue;
|
|
1295
|
-
fiber.
|
|
1340
|
+
fiber.fresh();
|
|
1296
1341
|
}
|
|
1297
1342
|
}
|
|
1298
1343
|
while (this.reaping.size) {
|
|
@@ -1360,7 +1405,7 @@ var $;
|
|
|
1360
1405
|
else
|
|
1361
1406
|
super.emit(quant);
|
|
1362
1407
|
}
|
|
1363
|
-
|
|
1408
|
+
fresh() {
|
|
1364
1409
|
if (this.cursor === $mol_wire_cursor.fresh)
|
|
1365
1410
|
return;
|
|
1366
1411
|
if (this.cursor === $mol_wire_cursor.final)
|
|
@@ -1368,7 +1413,7 @@ var $;
|
|
|
1368
1413
|
check: if (this.cursor === $mol_wire_cursor.doubt) {
|
|
1369
1414
|
for (let i = this.pub_from; i < this.sub_from; i += 2) {
|
|
1370
1415
|
;
|
|
1371
|
-
this.data[i]?.
|
|
1416
|
+
this.data[i]?.fresh();
|
|
1372
1417
|
if (this.cursor !== $mol_wire_cursor.doubt)
|
|
1373
1418
|
break check;
|
|
1374
1419
|
}
|
|
@@ -1424,12 +1469,16 @@ var $;
|
|
|
1424
1469
|
this.track_off(bu);
|
|
1425
1470
|
this.put(result);
|
|
1426
1471
|
}
|
|
1472
|
+
refresh() {
|
|
1473
|
+
this.cursor = $mol_wire_cursor.stale;
|
|
1474
|
+
this.fresh();
|
|
1475
|
+
}
|
|
1427
1476
|
sync() {
|
|
1428
1477
|
if (!$mol_wire_fiber.warm) {
|
|
1429
1478
|
return this.result();
|
|
1430
1479
|
}
|
|
1431
1480
|
this.promote();
|
|
1432
|
-
this.
|
|
1481
|
+
this.fresh();
|
|
1433
1482
|
if (this.cache instanceof Error) {
|
|
1434
1483
|
return $mol_fail_hidden(this.cache);
|
|
1435
1484
|
}
|
|
@@ -1440,7 +1489,7 @@ var $;
|
|
|
1440
1489
|
}
|
|
1441
1490
|
async async() {
|
|
1442
1491
|
while (true) {
|
|
1443
|
-
this.
|
|
1492
|
+
this.fresh();
|
|
1444
1493
|
if (this.cache instanceof Error) {
|
|
1445
1494
|
$mol_fail_hidden(this.cache);
|
|
1446
1495
|
}
|
|
@@ -1742,6 +1791,22 @@ var $;
|
|
|
1742
1791
|
};
|
|
1743
1792
|
}
|
|
1744
1793
|
}
|
|
1794
|
+
static watching = new Set();
|
|
1795
|
+
static watch() {
|
|
1796
|
+
new $mol_after_frame($mol_wire_atom.watch);
|
|
1797
|
+
for (const atom of $mol_wire_atom.watching) {
|
|
1798
|
+
if (atom.cursor === $mol_wire_cursor.final) {
|
|
1799
|
+
$mol_wire_atom.watching.delete(atom);
|
|
1800
|
+
}
|
|
1801
|
+
else {
|
|
1802
|
+
atom.cursor = $mol_wire_cursor.stale;
|
|
1803
|
+
atom.fresh();
|
|
1804
|
+
}
|
|
1805
|
+
}
|
|
1806
|
+
}
|
|
1807
|
+
watch() {
|
|
1808
|
+
$mol_wire_atom.watching.add(this);
|
|
1809
|
+
}
|
|
1745
1810
|
resync(args) {
|
|
1746
1811
|
return this.put(this.task.call(this.host, ...args));
|
|
1747
1812
|
}
|
|
@@ -1796,6 +1861,7 @@ var $;
|
|
|
1796
1861
|
$mol_wire_method
|
|
1797
1862
|
], $mol_wire_atom.prototype, "once", null);
|
|
1798
1863
|
$.$mol_wire_atom = $mol_wire_atom;
|
|
1864
|
+
$mol_wire_atom.watch();
|
|
1799
1865
|
})($ || ($ = {}));
|
|
1800
1866
|
//mol/wire/atom/atom.ts
|
|
1801
1867
|
;
|
|
@@ -1985,6 +2051,22 @@ var $;
|
|
|
1985
2051
|
;
|
|
1986
2052
|
"use strict";
|
|
1987
2053
|
var $;
|
|
2054
|
+
(function ($) {
|
|
2055
|
+
function $mol_wire_watch() {
|
|
2056
|
+
const atom = $mol_wire_auto();
|
|
2057
|
+
if (atom instanceof $mol_wire_atom) {
|
|
2058
|
+
atom.watch();
|
|
2059
|
+
}
|
|
2060
|
+
else {
|
|
2061
|
+
$mol_fail(new Error('Atom is equired for watching'));
|
|
2062
|
+
}
|
|
2063
|
+
}
|
|
2064
|
+
$.$mol_wire_watch = $mol_wire_watch;
|
|
2065
|
+
})($ || ($ = {}));
|
|
2066
|
+
//mol/wire/watch/watch.ts
|
|
2067
|
+
;
|
|
2068
|
+
"use strict";
|
|
2069
|
+
var $;
|
|
1988
2070
|
(function ($) {
|
|
1989
2071
|
function $mol_const(value) {
|
|
1990
2072
|
var getter = (() => value);
|
|
@@ -2035,7 +2117,12 @@ var $;
|
|
|
2035
2117
|
fiber = temp(obj, args);
|
|
2036
2118
|
return fiber.async();
|
|
2037
2119
|
};
|
|
2038
|
-
}
|
|
2120
|
+
},
|
|
2121
|
+
apply(obj, self, args) {
|
|
2122
|
+
const temp = $mol_wire_task.getter(obj);
|
|
2123
|
+
const fiber = temp(self, args);
|
|
2124
|
+
return fiber.async();
|
|
2125
|
+
},
|
|
2039
2126
|
});
|
|
2040
2127
|
}
|
|
2041
2128
|
$.$mol_wire_async = $mol_wire_async;
|
|
@@ -2168,7 +2255,7 @@ var $;
|
|
|
2168
2255
|
"use strict";
|
|
2169
2256
|
var $;
|
|
2170
2257
|
(function ($) {
|
|
2171
|
-
$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
|
|
2258
|
+
$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");
|
|
2172
2259
|
})($ || ($ = {}));
|
|
2173
2260
|
//mol/view/view/-css/view.css.ts
|
|
2174
2261
|
;
|
|
@@ -2274,15 +2361,9 @@ var $;
|
|
|
2274
2361
|
}
|
|
2275
2362
|
static watchers = new Set();
|
|
2276
2363
|
view_rect() {
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
view_rect_cache(next = null) {
|
|
2281
|
-
return next;
|
|
2282
|
-
}
|
|
2283
|
-
view_rect_watcher() {
|
|
2284
|
-
$mol_view.watchers.add(this);
|
|
2285
|
-
return { destructor: () => $mol_view.watchers.delete(this) };
|
|
2364
|
+
$mol_wire_watch();
|
|
2365
|
+
const { width, height, left, right, top, bottom } = this.dom_node().getBoundingClientRect();
|
|
2366
|
+
return { width, height, left, right, top, bottom };
|
|
2286
2367
|
}
|
|
2287
2368
|
dom_id() {
|
|
2288
2369
|
return this.toString();
|
|
@@ -2499,12 +2580,6 @@ var $;
|
|
|
2499
2580
|
__decorate([
|
|
2500
2581
|
$mol_mem
|
|
2501
2582
|
], $mol_view.prototype, "view_rect", null);
|
|
2502
|
-
__decorate([
|
|
2503
|
-
$mol_mem
|
|
2504
|
-
], $mol_view.prototype, "view_rect_cache", null);
|
|
2505
|
-
__decorate([
|
|
2506
|
-
$mol_mem
|
|
2507
|
-
], $mol_view.prototype, "view_rect_watcher", null);
|
|
2508
2583
|
__decorate([
|
|
2509
2584
|
$mol_mem
|
|
2510
2585
|
], $mol_view.prototype, "dom_node", null);
|
|
@@ -4069,14 +4144,12 @@ var $;
|
|
|
4069
4144
|
const size_real = this.size_real();
|
|
4070
4145
|
const max_x = (viewport.x.max - viewport.x.min) / size_real.x;
|
|
4071
4146
|
const max_y = (viewport.y.max - viewport.y.min) / size_real.y;
|
|
4072
|
-
return this.
|
|
4147
|
+
return this.graphs_positioned().filter(graph => {
|
|
4073
4148
|
const dims = graph.dimensions();
|
|
4074
4149
|
if (dims.x.min > dims.x.max)
|
|
4075
4150
|
return true;
|
|
4076
4151
|
if (dims.y.min > dims.y.max)
|
|
4077
4152
|
return true;
|
|
4078
|
-
if (dims.x.max - dims.x.min < max_x && dims.y.max - dims.y.min < max_y)
|
|
4079
|
-
return false;
|
|
4080
4153
|
if (dims.x.min > viewport.x.max)
|
|
4081
4154
|
return false;
|
|
4082
4155
|
if (dims.x.max < viewport.x.min)
|
|
@@ -4089,7 +4162,7 @@ var $;
|
|
|
4089
4162
|
});
|
|
4090
4163
|
}
|
|
4091
4164
|
graphs_positioned() {
|
|
4092
|
-
const graphs = this.
|
|
4165
|
+
const graphs = this.graphs();
|
|
4093
4166
|
for (let graph of graphs) {
|
|
4094
4167
|
graph.shift = () => this.shift();
|
|
4095
4168
|
graph.scale = () => this.scale();
|
|
@@ -4537,12 +4610,6 @@ var $;
|
|
|
4537
4610
|
const size_x = Math.max(0, Math.ceil((1 / aspect - 1) * diameter));
|
|
4538
4611
|
return points.map(point => `M ${point[0] - shift_x} ${point[1] - shift_y} l ${size_x} ${size_y}`).join(' ');
|
|
4539
4612
|
}
|
|
4540
|
-
dimensions() {
|
|
4541
|
-
const scale = this.scale();
|
|
4542
|
-
const radius = this.diameter() / Math.min(...scale) / 2;
|
|
4543
|
-
const dims = super.dimensions();
|
|
4544
|
-
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));
|
|
4545
|
-
}
|
|
4546
4613
|
}
|
|
4547
4614
|
__decorate([
|
|
4548
4615
|
$mol_mem
|
|
@@ -4550,9 +4617,6 @@ var $;
|
|
|
4550
4617
|
__decorate([
|
|
4551
4618
|
$mol_mem
|
|
4552
4619
|
], $mol_plot_dot.prototype, "indexes", null);
|
|
4553
|
-
__decorate([
|
|
4554
|
-
$mol_mem
|
|
4555
|
-
], $mol_plot_dot.prototype, "dimensions", null);
|
|
4556
4620
|
$$.$mol_plot_dot = $mol_plot_dot;
|
|
4557
4621
|
})($$ = $.$$ || ($.$$ = {}));
|
|
4558
4622
|
})($ || ($ = {}));
|