mol_plot_all 1.2.242 → 1.2.245
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 +49 -11
- package/node.deps.json +1 -1
- package/node.esm.js +122 -61
- package/node.esm.js.map +1 -1
- package/node.js +122 -61
- package/node.js.map +1 -1
- package/node.test.js +166 -105
- package/node.test.js.map +1 -1
- package/package.json +4 -2
- package/web.d.ts +20 -11
- package/web.deps.json +1 -1
- package/web.esm.js +74 -70
- package/web.esm.js.map +1 -1
- package/web.js +74 -70
- package/web.js.map +1 -1
- package/web.test.js +27 -27
- package/web.test.js.map +1 -1
package/web.esm.js
CHANGED
|
@@ -369,7 +369,7 @@ var $;
|
|
|
369
369
|
"use strict";
|
|
370
370
|
var $;
|
|
371
371
|
(function ($) {
|
|
372
|
-
$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");
|
|
372
|
+
$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");
|
|
373
373
|
})($ || ($ = {}));
|
|
374
374
|
//mol/theme/-css/theme.css.ts
|
|
375
375
|
;
|
|
@@ -468,7 +468,7 @@ var $;
|
|
|
468
468
|
promote() {
|
|
469
469
|
$mol_wire_auto()?.track_next(this);
|
|
470
470
|
}
|
|
471
|
-
|
|
471
|
+
fresh() { }
|
|
472
472
|
complete() { }
|
|
473
473
|
emit(quant = $mol_wire_cursor.stale) {
|
|
474
474
|
for (let i = this.sub_from; i < this.data.length; i += 2) {
|
|
@@ -671,7 +671,7 @@ var $;
|
|
|
671
671
|
}
|
|
672
672
|
for (let cursor = this.pub_from; cursor < this.cursor; cursor += 2) {
|
|
673
673
|
const pub = this.data[cursor];
|
|
674
|
-
pub.
|
|
674
|
+
pub.fresh();
|
|
675
675
|
}
|
|
676
676
|
this.cursor = $mol_wire_cursor.fresh;
|
|
677
677
|
}
|
|
@@ -747,18 +747,20 @@ var $;
|
|
|
747
747
|
class $mol_after_frame extends $mol_object2 {
|
|
748
748
|
task;
|
|
749
749
|
static _promise = null;
|
|
750
|
-
static _timeout = null;
|
|
751
750
|
static get promise() {
|
|
752
751
|
if (this._promise)
|
|
753
752
|
return this._promise;
|
|
754
753
|
return this._promise = new Promise(done => {
|
|
755
754
|
const complete = () => {
|
|
756
755
|
this._promise = null;
|
|
757
|
-
clearTimeout(this._timeout);
|
|
758
756
|
done();
|
|
759
757
|
};
|
|
760
|
-
requestAnimationFrame
|
|
761
|
-
|
|
758
|
+
if (typeof requestAnimationFrame === 'function') {
|
|
759
|
+
requestAnimationFrame(complete);
|
|
760
|
+
}
|
|
761
|
+
else {
|
|
762
|
+
setTimeout(complete, 16);
|
|
763
|
+
}
|
|
762
764
|
});
|
|
763
765
|
}
|
|
764
766
|
cancelled = false;
|
|
@@ -805,10 +807,13 @@ var $;
|
|
|
805
807
|
}
|
|
806
808
|
static sync() {
|
|
807
809
|
while (this.planning.size) {
|
|
808
|
-
const
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
810
|
+
for (const fiber of this.planning) {
|
|
811
|
+
this.planning.delete(fiber);
|
|
812
|
+
if (fiber.cursor >= 0)
|
|
813
|
+
continue;
|
|
814
|
+
if (fiber.cursor === $mol_wire_cursor.final)
|
|
815
|
+
continue;
|
|
816
|
+
fiber.fresh();
|
|
812
817
|
}
|
|
813
818
|
}
|
|
814
819
|
while (this.reaping.size) {
|
|
@@ -835,12 +840,13 @@ var $;
|
|
|
835
840
|
field() {
|
|
836
841
|
return this.task.name + '()';
|
|
837
842
|
}
|
|
838
|
-
constructor(id, task, host,
|
|
843
|
+
constructor(id, task, host, args) {
|
|
839
844
|
super();
|
|
840
845
|
this.task = task;
|
|
841
846
|
this.host = host;
|
|
842
|
-
|
|
843
|
-
|
|
847
|
+
if (args)
|
|
848
|
+
this.data.push(...args);
|
|
849
|
+
this.pub_from = this.sub_from = args?.length ?? 0;
|
|
844
850
|
this[Symbol.toStringTag] = id;
|
|
845
851
|
}
|
|
846
852
|
plan() {
|
|
@@ -875,7 +881,7 @@ var $;
|
|
|
875
881
|
else
|
|
876
882
|
super.emit(quant);
|
|
877
883
|
}
|
|
878
|
-
|
|
884
|
+
fresh() {
|
|
879
885
|
if (this.cursor === $mol_wire_cursor.fresh)
|
|
880
886
|
return;
|
|
881
887
|
if (this.cursor === $mol_wire_cursor.final)
|
|
@@ -883,7 +889,7 @@ var $;
|
|
|
883
889
|
check: if (this.cursor === $mol_wire_cursor.doubt) {
|
|
884
890
|
for (let i = this.pub_from; i < this.sub_from; i += 2) {
|
|
885
891
|
;
|
|
886
|
-
this.data[i]?.
|
|
892
|
+
this.data[i]?.fresh();
|
|
887
893
|
if (this.cursor !== $mol_wire_cursor.doubt)
|
|
888
894
|
break check;
|
|
889
895
|
}
|
|
@@ -901,7 +907,7 @@ var $;
|
|
|
901
907
|
result = this.task.call(this.host, this.data[0]);
|
|
902
908
|
break;
|
|
903
909
|
default:
|
|
904
|
-
result = this.task.call(this.host, ...this.
|
|
910
|
+
result = this.task.call(this.host, ...this.args);
|
|
905
911
|
break;
|
|
906
912
|
}
|
|
907
913
|
if (result instanceof Promise) {
|
|
@@ -939,12 +945,16 @@ var $;
|
|
|
939
945
|
this.track_off(bu);
|
|
940
946
|
this.put(result);
|
|
941
947
|
}
|
|
948
|
+
refresh() {
|
|
949
|
+
this.cursor = $mol_wire_cursor.stale;
|
|
950
|
+
this.fresh();
|
|
951
|
+
}
|
|
942
952
|
sync() {
|
|
943
953
|
if (!$mol_wire_fiber.warm) {
|
|
944
954
|
return this.result();
|
|
945
955
|
}
|
|
946
956
|
this.promote();
|
|
947
|
-
this.
|
|
957
|
+
this.fresh();
|
|
948
958
|
if (this.cache instanceof Error) {
|
|
949
959
|
return $mol_fail_hidden(this.cache);
|
|
950
960
|
}
|
|
@@ -955,7 +965,7 @@ var $;
|
|
|
955
965
|
}
|
|
956
966
|
async async() {
|
|
957
967
|
while (true) {
|
|
958
|
-
this.
|
|
968
|
+
this.fresh();
|
|
959
969
|
if (this.cache instanceof Error) {
|
|
960
970
|
$mol_fail_hidden(this.cache);
|
|
961
971
|
}
|
|
@@ -1167,7 +1177,7 @@ var $;
|
|
|
1167
1177
|
break reuse;
|
|
1168
1178
|
return existen;
|
|
1169
1179
|
}
|
|
1170
|
-
return new $mol_wire_task(`${host?.[Symbol.toStringTag] ?? host}.${task.name}(#)`, task, host,
|
|
1180
|
+
return new $mol_wire_task(`${host?.[Symbol.toStringTag] ?? host}.${task.name}(#)`, task, host, args);
|
|
1171
1181
|
};
|
|
1172
1182
|
}
|
|
1173
1183
|
complete() {
|
|
@@ -1240,7 +1250,7 @@ var $;
|
|
|
1240
1250
|
else {
|
|
1241
1251
|
dict = (host ?? task)[field] = new Map();
|
|
1242
1252
|
}
|
|
1243
|
-
fiber = new $mol_wire_atom(key, task, host,
|
|
1253
|
+
fiber = new $mol_wire_atom(key, task, host, args);
|
|
1244
1254
|
dict.set(key, fiber);
|
|
1245
1255
|
return fiber;
|
|
1246
1256
|
};
|
|
@@ -1251,13 +1261,29 @@ var $;
|
|
|
1251
1261
|
if (existen)
|
|
1252
1262
|
return existen;
|
|
1253
1263
|
const key = `${host?.[Symbol.toStringTag] ?? host}.${field}`;
|
|
1254
|
-
const fiber = new $mol_wire_atom(key, task, host,
|
|
1264
|
+
const fiber = new $mol_wire_atom(key, task, host, args);
|
|
1255
1265
|
(host ?? task)[field] = fiber;
|
|
1256
1266
|
return fiber;
|
|
1257
1267
|
};
|
|
1258
1268
|
}
|
|
1259
1269
|
}
|
|
1260
|
-
|
|
1270
|
+
static watching = new Set();
|
|
1271
|
+
static watch() {
|
|
1272
|
+
new $mol_after_frame($mol_wire_atom.watch);
|
|
1273
|
+
for (const atom of $mol_wire_atom.watching) {
|
|
1274
|
+
if (atom.cursor === $mol_wire_cursor.final) {
|
|
1275
|
+
$mol_wire_atom.watching.delete(atom);
|
|
1276
|
+
}
|
|
1277
|
+
else {
|
|
1278
|
+
atom.cursor = $mol_wire_cursor.stale;
|
|
1279
|
+
atom.fresh();
|
|
1280
|
+
}
|
|
1281
|
+
}
|
|
1282
|
+
}
|
|
1283
|
+
watch() {
|
|
1284
|
+
$mol_wire_atom.watching.add(this);
|
|
1285
|
+
}
|
|
1286
|
+
resync(args) {
|
|
1261
1287
|
return this.put(this.task.call(this.host, ...args));
|
|
1262
1288
|
}
|
|
1263
1289
|
once() {
|
|
@@ -1311,6 +1337,7 @@ var $;
|
|
|
1311
1337
|
$mol_wire_method
|
|
1312
1338
|
], $mol_wire_atom.prototype, "once", null);
|
|
1313
1339
|
$.$mol_wire_atom = $mol_wire_atom;
|
|
1340
|
+
$mol_wire_atom.watch();
|
|
1314
1341
|
})($ || ($ = {}));
|
|
1315
1342
|
//mol/wire/atom/atom.ts
|
|
1316
1343
|
;
|
|
@@ -1343,7 +1370,7 @@ var $;
|
|
|
1343
1370
|
let atom = persist(this, args.slice(0, keys));
|
|
1344
1371
|
if (args.length <= keys || args[keys] === undefined) {
|
|
1345
1372
|
if (!$mol_wire_fiber.warm)
|
|
1346
|
-
return atom.
|
|
1373
|
+
return atom.result();
|
|
1347
1374
|
if ($mol_wire_auto() instanceof $mol_wire_task) {
|
|
1348
1375
|
return atom.once();
|
|
1349
1376
|
}
|
|
@@ -1351,7 +1378,7 @@ var $;
|
|
|
1351
1378
|
return atom.sync();
|
|
1352
1379
|
}
|
|
1353
1380
|
}
|
|
1354
|
-
return atom.resync(
|
|
1381
|
+
return atom.resync(args);
|
|
1355
1382
|
};
|
|
1356
1383
|
Object.defineProperty(wrapper, 'name', { value: func.name + ' ' });
|
|
1357
1384
|
Object.assign(wrapper, { orig: func });
|
|
@@ -1545,6 +1572,22 @@ var $;
|
|
|
1545
1572
|
;
|
|
1546
1573
|
"use strict";
|
|
1547
1574
|
var $;
|
|
1575
|
+
(function ($) {
|
|
1576
|
+
function $mol_wire_watch() {
|
|
1577
|
+
const atom = $mol_wire_auto();
|
|
1578
|
+
if (atom instanceof $mol_wire_atom) {
|
|
1579
|
+
atom.watch();
|
|
1580
|
+
}
|
|
1581
|
+
else {
|
|
1582
|
+
$mol_fail(new Error('Atom is equired for watching'));
|
|
1583
|
+
}
|
|
1584
|
+
}
|
|
1585
|
+
$.$mol_wire_watch = $mol_wire_watch;
|
|
1586
|
+
})($ || ($ = {}));
|
|
1587
|
+
//mol/wire/watch/watch.ts
|
|
1588
|
+
;
|
|
1589
|
+
"use strict";
|
|
1590
|
+
var $;
|
|
1548
1591
|
(function ($) {
|
|
1549
1592
|
function $mol_const(value) {
|
|
1550
1593
|
var getter = (() => value);
|
|
@@ -1827,15 +1870,9 @@ var $;
|
|
|
1827
1870
|
}
|
|
1828
1871
|
static watchers = new Set();
|
|
1829
1872
|
view_rect() {
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
view_rect_cache(next = null) {
|
|
1834
|
-
return next;
|
|
1835
|
-
}
|
|
1836
|
-
view_rect_watcher() {
|
|
1837
|
-
$mol_view.watchers.add(this);
|
|
1838
|
-
return { destructor: () => $mol_view.watchers.delete(this) };
|
|
1873
|
+
$mol_wire_watch();
|
|
1874
|
+
const { width, height, left, right, top, bottom } = this.dom_node().getBoundingClientRect();
|
|
1875
|
+
return { width, height, left, right, top, bottom };
|
|
1839
1876
|
}
|
|
1840
1877
|
dom_id() {
|
|
1841
1878
|
return this.toString();
|
|
@@ -2052,12 +2089,6 @@ var $;
|
|
|
2052
2089
|
__decorate([
|
|
2053
2090
|
$mol_mem
|
|
2054
2091
|
], $mol_view.prototype, "view_rect", null);
|
|
2055
|
-
__decorate([
|
|
2056
|
-
$mol_mem
|
|
2057
|
-
], $mol_view.prototype, "view_rect_cache", null);
|
|
2058
|
-
__decorate([
|
|
2059
|
-
$mol_mem
|
|
2060
|
-
], $mol_view.prototype, "view_rect_watcher", null);
|
|
2061
2092
|
__decorate([
|
|
2062
2093
|
$mol_mem
|
|
2063
2094
|
], $mol_view.prototype, "dom_node", null);
|
|
@@ -2095,7 +2126,7 @@ var $;
|
|
|
2095
2126
|
"use strict";
|
|
2096
2127
|
var $;
|
|
2097
2128
|
(function ($) {
|
|
2098
|
-
$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
|
|
2129
|
+
$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");
|
|
2099
2130
|
})($ || ($ = {}));
|
|
2100
2131
|
//mol/view/view/-css/view.css.ts
|
|
2101
2132
|
;
|
|
@@ -2104,22 +2135,6 @@ var $;
|
|
|
2104
2135
|
(function ($) {
|
|
2105
2136
|
if ($mol_dom_context.document) {
|
|
2106
2137
|
setTimeout(() => $mol_view.autobind());
|
|
2107
|
-
function $mol_view_watch() {
|
|
2108
|
-
new $mol_after_frame($mol_view_watch);
|
|
2109
|
-
for (const view of $mol_view.watchers) {
|
|
2110
|
-
const prev = view.view_rect_cache();
|
|
2111
|
-
const next = view.dom_node().getBoundingClientRect();
|
|
2112
|
-
if (next.left === 0 && next.right === 0 && next.width === 0) {
|
|
2113
|
-
if (prev)
|
|
2114
|
-
view.view_rect_cache(null);
|
|
2115
|
-
continue;
|
|
2116
|
-
}
|
|
2117
|
-
if (!prev || prev.x !== next.x || prev.y !== next.y || prev.width !== next.width || prev.height !== next.height) {
|
|
2118
|
-
view.view_rect_cache(next);
|
|
2119
|
-
}
|
|
2120
|
-
}
|
|
2121
|
-
}
|
|
2122
|
-
$mol_view_watch();
|
|
2123
2138
|
}
|
|
2124
2139
|
})($ || ($ = {}));
|
|
2125
2140
|
//mol/view/view/view.web.ts
|
|
@@ -3675,14 +3690,12 @@ var $;
|
|
|
3675
3690
|
const size_real = this.size_real();
|
|
3676
3691
|
const max_x = (viewport.x.max - viewport.x.min) / size_real.x;
|
|
3677
3692
|
const max_y = (viewport.y.max - viewport.y.min) / size_real.y;
|
|
3678
|
-
return this.
|
|
3693
|
+
return this.graphs_positioned().filter(graph => {
|
|
3679
3694
|
const dims = graph.dimensions();
|
|
3680
3695
|
if (dims.x.min > dims.x.max)
|
|
3681
3696
|
return true;
|
|
3682
3697
|
if (dims.y.min > dims.y.max)
|
|
3683
3698
|
return true;
|
|
3684
|
-
if (dims.x.max - dims.x.min < max_x && dims.y.max - dims.y.min < max_y)
|
|
3685
|
-
return false;
|
|
3686
3699
|
if (dims.x.min > viewport.x.max)
|
|
3687
3700
|
return false;
|
|
3688
3701
|
if (dims.x.max < viewport.x.min)
|
|
@@ -3695,7 +3708,7 @@ var $;
|
|
|
3695
3708
|
});
|
|
3696
3709
|
}
|
|
3697
3710
|
graphs_positioned() {
|
|
3698
|
-
const graphs = this.
|
|
3711
|
+
const graphs = this.graphs();
|
|
3699
3712
|
for (let graph of graphs) {
|
|
3700
3713
|
graph.shift = () => this.shift();
|
|
3701
3714
|
graph.scale = () => this.scale();
|
|
@@ -4143,12 +4156,6 @@ var $;
|
|
|
4143
4156
|
const size_x = Math.max(0, Math.ceil((1 / aspect - 1) * diameter));
|
|
4144
4157
|
return points.map(point => `M ${point[0] - shift_x} ${point[1] - shift_y} l ${size_x} ${size_y}`).join(' ');
|
|
4145
4158
|
}
|
|
4146
|
-
dimensions() {
|
|
4147
|
-
const scale = this.scale();
|
|
4148
|
-
const radius = this.diameter() / Math.min(...scale) / 2;
|
|
4149
|
-
const dims = super.dimensions();
|
|
4150
|
-
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));
|
|
4151
|
-
}
|
|
4152
4159
|
}
|
|
4153
4160
|
__decorate([
|
|
4154
4161
|
$mol_mem
|
|
@@ -4156,9 +4163,6 @@ var $;
|
|
|
4156
4163
|
__decorate([
|
|
4157
4164
|
$mol_mem
|
|
4158
4165
|
], $mol_plot_dot.prototype, "indexes", null);
|
|
4159
|
-
__decorate([
|
|
4160
|
-
$mol_mem
|
|
4161
|
-
], $mol_plot_dot.prototype, "dimensions", null);
|
|
4162
4166
|
$$.$mol_plot_dot = $mol_plot_dot;
|
|
4163
4167
|
})($$ = $.$$ || ($.$$ = {}));
|
|
4164
4168
|
})($ || ($ = {}));
|