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.esm.js CHANGED
@@ -627,29 +627,72 @@ var $;
627
627
  ;
628
628
  "use strict";
629
629
  var $;
630
+ (function ($) {
631
+ class $mol_term_color {
632
+ static reset = this.ansi(0, 0);
633
+ static bold = this.ansi(1, 22);
634
+ static italic = this.ansi(3, 23);
635
+ static underline = this.ansi(4, 24);
636
+ static inverse = this.ansi(7, 27);
637
+ static hidden = this.ansi(8, 28);
638
+ static strike = this.ansi(9, 29);
639
+ static gray = this.ansi(90, 39);
640
+ static red = this.ansi(91, 39);
641
+ static green = this.ansi(92, 39);
642
+ static yellow = this.ansi(93, 39);
643
+ static blue = this.ansi(94, 39);
644
+ static magenta = this.ansi(95, 39);
645
+ static cyan = this.ansi(96, 39);
646
+ static white = this.ansi(97, 39);
647
+ static Red = (str) => this.inverse(this.red(str));
648
+ static Green = (str) => this.inverse(this.green(str));
649
+ static Yellow = (str) => this.inverse(this.yellow(str));
650
+ static Blue = (str) => this.inverse(this.blue(str));
651
+ static Magenta = (str) => this.inverse(this.magenta(str));
652
+ static Cyan = (str) => this.inverse(this.cyan(str));
653
+ static White = (str) => this.inverse(this.white(str));
654
+ static ansi(open, close) {
655
+ if (typeof process === 'undefined')
656
+ return String;
657
+ if (!process.stdout.isTTY)
658
+ return String;
659
+ const prefix = `\x1b[${open}m`;
660
+ const postfix = `\x1b[${close}m`;
661
+ const suffix_regexp = new RegExp(postfix.replace('[', '\\['), 'g');
662
+ return function colorer(str) {
663
+ str = String(str);
664
+ if (str === '')
665
+ return str;
666
+ const suffix = str.replace(suffix_regexp, prefix);
667
+ return prefix + suffix + postfix;
668
+ };
669
+ }
670
+ }
671
+ $.$mol_term_color = $mol_term_color;
672
+ })($ || ($ = {}));
673
+ //mol/term/color/color.ts
674
+ ;
675
+ "use strict";
676
+ var $;
630
677
  (function ($) {
631
678
  function $mol_log3_node_make(level, output, type, color) {
632
679
  return function $mol_log3_logger(event) {
633
680
  if (!event.time)
634
681
  event = { time: new Date().toISOString(), ...event };
635
682
  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
- ;
683
+ let str = color(tree.toString());
641
684
  this.console[level](str);
642
685
  const self = this;
643
686
  return () => self.console.groupEnd();
644
687
  };
645
688
  }
646
689
  $.$mol_log3_node_make = $mol_log3_node_make;
647
- $.$mol_log3_come = $mol_log3_node_make('info', 'stdout', 'come', 'blue');
648
- $.$mol_log3_done = $mol_log3_node_make('info', 'stdout', 'done', 'green');
649
- $.$mol_log3_fail = $mol_log3_node_make('error', 'stderr', 'fail', 'red');
650
- $.$mol_log3_warn = $mol_log3_node_make('warn', 'stderr', 'warn', 'yellow');
651
- $.$mol_log3_rise = $mol_log3_node_make('log', 'stdout', 'rise', 'magenta');
652
- $.$mol_log3_area = $mol_log3_node_make('log', 'stdout', 'area', 'cyan');
690
+ $.$mol_log3_come = $mol_log3_node_make('info', 'stdout', 'come', $mol_term_color.blue);
691
+ $.$mol_log3_done = $mol_log3_node_make('info', 'stdout', 'done', $mol_term_color.green);
692
+ $.$mol_log3_fail = $mol_log3_node_make('error', 'stderr', 'fail', $mol_term_color.red);
693
+ $.$mol_log3_warn = $mol_log3_node_make('warn', 'stderr', 'warn', $mol_term_color.yellow);
694
+ $.$mol_log3_rise = $mol_log3_node_make('log', 'stdout', 'rise', $mol_term_color.magenta);
695
+ $.$mol_log3_area = $mol_log3_node_make('log', 'stdout', 'area', $mol_term_color.cyan);
653
696
  })($ || ($ = {}));
654
697
  //mol/log3/log3.node.ts
655
698
  ;
@@ -839,7 +882,7 @@ var $;
839
882
  "use strict";
840
883
  var $;
841
884
  (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");
885
+ $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
886
  })($ || ($ = {}));
844
887
  //mol/theme/-css/theme.css.ts
845
888
  ;
@@ -953,7 +996,7 @@ var $;
953
996
  promote() {
954
997
  $mol_wire_auto()?.track_next(this);
955
998
  }
956
- refresh() { }
999
+ fresh() { }
957
1000
  complete() { }
958
1001
  emit(quant = $mol_wire_cursor.stale) {
959
1002
  for (let i = this.sub_from; i < this.data.length; i += 2) {
@@ -1156,7 +1199,7 @@ var $;
1156
1199
  }
1157
1200
  for (let cursor = this.pub_from; cursor < this.cursor; cursor += 2) {
1158
1201
  const pub = this.data[cursor];
1159
- pub.refresh();
1202
+ pub.fresh();
1160
1203
  }
1161
1204
  this.cursor = $mol_wire_cursor.fresh;
1162
1205
  }
@@ -1286,10 +1329,13 @@ var $;
1286
1329
  }
1287
1330
  static sync() {
1288
1331
  while (this.planning.size) {
1289
- const fibers = this.planning;
1290
- this.planning = new Set;
1291
- for (const fiber of fibers) {
1292
- fiber.refresh();
1332
+ for (const fiber of this.planning) {
1333
+ this.planning.delete(fiber);
1334
+ if (fiber.cursor >= 0)
1335
+ continue;
1336
+ if (fiber.cursor === $mol_wire_cursor.final)
1337
+ continue;
1338
+ fiber.fresh();
1293
1339
  }
1294
1340
  }
1295
1341
  while (this.reaping.size) {
@@ -1316,12 +1362,13 @@ var $;
1316
1362
  field() {
1317
1363
  return this.task.name + '()';
1318
1364
  }
1319
- constructor(id, task, host, ...args) {
1365
+ constructor(id, task, host, args) {
1320
1366
  super();
1321
1367
  this.task = task;
1322
1368
  this.host = host;
1323
- this.data.push(...args);
1324
- this.pub_from = this.sub_from = args.length;
1369
+ if (args)
1370
+ this.data.push(...args);
1371
+ this.pub_from = this.sub_from = args?.length ?? 0;
1325
1372
  this[Symbol.toStringTag] = id;
1326
1373
  }
1327
1374
  plan() {
@@ -1356,7 +1403,7 @@ var $;
1356
1403
  else
1357
1404
  super.emit(quant);
1358
1405
  }
1359
- refresh() {
1406
+ fresh() {
1360
1407
  if (this.cursor === $mol_wire_cursor.fresh)
1361
1408
  return;
1362
1409
  if (this.cursor === $mol_wire_cursor.final)
@@ -1364,7 +1411,7 @@ var $;
1364
1411
  check: if (this.cursor === $mol_wire_cursor.doubt) {
1365
1412
  for (let i = this.pub_from; i < this.sub_from; i += 2) {
1366
1413
  ;
1367
- this.data[i]?.refresh();
1414
+ this.data[i]?.fresh();
1368
1415
  if (this.cursor !== $mol_wire_cursor.doubt)
1369
1416
  break check;
1370
1417
  }
@@ -1382,7 +1429,7 @@ var $;
1382
1429
  result = this.task.call(this.host, this.data[0]);
1383
1430
  break;
1384
1431
  default:
1385
- result = this.task.call(this.host, ...this.data.slice(0, this.pub_from));
1432
+ result = this.task.call(this.host, ...this.args);
1386
1433
  break;
1387
1434
  }
1388
1435
  if (result instanceof Promise) {
@@ -1420,12 +1467,16 @@ var $;
1420
1467
  this.track_off(bu);
1421
1468
  this.put(result);
1422
1469
  }
1470
+ refresh() {
1471
+ this.cursor = $mol_wire_cursor.stale;
1472
+ this.fresh();
1473
+ }
1423
1474
  sync() {
1424
1475
  if (!$mol_wire_fiber.warm) {
1425
1476
  return this.result();
1426
1477
  }
1427
1478
  this.promote();
1428
- this.refresh();
1479
+ this.fresh();
1429
1480
  if (this.cache instanceof Error) {
1430
1481
  return $mol_fail_hidden(this.cache);
1431
1482
  }
@@ -1436,7 +1487,7 @@ var $;
1436
1487
  }
1437
1488
  async async() {
1438
1489
  while (true) {
1439
- this.refresh();
1490
+ this.fresh();
1440
1491
  if (this.cache instanceof Error) {
1441
1492
  $mol_fail_hidden(this.cache);
1442
1493
  }
@@ -1648,7 +1699,7 @@ var $;
1648
1699
  break reuse;
1649
1700
  return existen;
1650
1701
  }
1651
- return new $mol_wire_task(`${host?.[Symbol.toStringTag] ?? host}.${task.name}(#)`, task, host, ...args);
1702
+ return new $mol_wire_task(`${host?.[Symbol.toStringTag] ?? host}.${task.name}(#)`, task, host, args);
1652
1703
  };
1653
1704
  }
1654
1705
  complete() {
@@ -1721,7 +1772,7 @@ var $;
1721
1772
  else {
1722
1773
  dict = (host ?? task)[field] = new Map();
1723
1774
  }
1724
- fiber = new $mol_wire_atom(key, task, host, ...args);
1775
+ fiber = new $mol_wire_atom(key, task, host, args);
1725
1776
  dict.set(key, fiber);
1726
1777
  return fiber;
1727
1778
  };
@@ -1732,13 +1783,29 @@ var $;
1732
1783
  if (existen)
1733
1784
  return existen;
1734
1785
  const key = `${host?.[Symbol.toStringTag] ?? host}.${field}`;
1735
- const fiber = new $mol_wire_atom(key, task, host, ...args);
1786
+ const fiber = new $mol_wire_atom(key, task, host, args);
1736
1787
  (host ?? task)[field] = fiber;
1737
1788
  return fiber;
1738
1789
  };
1739
1790
  }
1740
1791
  }
1741
- resync(...args) {
1792
+ static watching = new Set();
1793
+ static watch() {
1794
+ new $mol_after_frame($mol_wire_atom.watch);
1795
+ for (const atom of $mol_wire_atom.watching) {
1796
+ if (atom.cursor === $mol_wire_cursor.final) {
1797
+ $mol_wire_atom.watching.delete(atom);
1798
+ }
1799
+ else {
1800
+ atom.cursor = $mol_wire_cursor.stale;
1801
+ atom.fresh();
1802
+ }
1803
+ }
1804
+ }
1805
+ watch() {
1806
+ $mol_wire_atom.watching.add(this);
1807
+ }
1808
+ resync(args) {
1742
1809
  return this.put(this.task.call(this.host, ...args));
1743
1810
  }
1744
1811
  once() {
@@ -1792,6 +1859,7 @@ var $;
1792
1859
  $mol_wire_method
1793
1860
  ], $mol_wire_atom.prototype, "once", null);
1794
1861
  $.$mol_wire_atom = $mol_wire_atom;
1862
+ $mol_wire_atom.watch();
1795
1863
  })($ || ($ = {}));
1796
1864
  //mol/wire/atom/atom.ts
1797
1865
  ;
@@ -1824,7 +1892,7 @@ var $;
1824
1892
  let atom = persist(this, args.slice(0, keys));
1825
1893
  if (args.length <= keys || args[keys] === undefined) {
1826
1894
  if (!$mol_wire_fiber.warm)
1827
- return atom.sync();
1895
+ return atom.result();
1828
1896
  if ($mol_wire_auto() instanceof $mol_wire_task) {
1829
1897
  return atom.once();
1830
1898
  }
@@ -1832,7 +1900,7 @@ var $;
1832
1900
  return atom.sync();
1833
1901
  }
1834
1902
  }
1835
- return atom.resync(...args);
1903
+ return atom.resync(args);
1836
1904
  };
1837
1905
  Object.defineProperty(wrapper, 'name', { value: func.name + ' ' });
1838
1906
  Object.assign(wrapper, { orig: func });
@@ -1981,6 +2049,22 @@ var $;
1981
2049
  ;
1982
2050
  "use strict";
1983
2051
  var $;
2052
+ (function ($) {
2053
+ function $mol_wire_watch() {
2054
+ const atom = $mol_wire_auto();
2055
+ if (atom instanceof $mol_wire_atom) {
2056
+ atom.watch();
2057
+ }
2058
+ else {
2059
+ $mol_fail(new Error('Atom is equired for watching'));
2060
+ }
2061
+ }
2062
+ $.$mol_wire_watch = $mol_wire_watch;
2063
+ })($ || ($ = {}));
2064
+ //mol/wire/watch/watch.ts
2065
+ ;
2066
+ "use strict";
2067
+ var $;
1984
2068
  (function ($) {
1985
2069
  function $mol_const(value) {
1986
2070
  var getter = (() => value);
@@ -2164,7 +2248,7 @@ var $;
2164
2248
  "use strict";
2165
2249
  var $;
2166
2250
  (function ($) {
2167
- $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}\n\n[mol_view_root]:not([mol_view_root=\"\"]) {\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");
2251
+ $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");
2168
2252
  })($ || ($ = {}));
2169
2253
  //mol/view/view/-css/view.css.ts
2170
2254
  ;
@@ -2270,15 +2354,9 @@ var $;
2270
2354
  }
2271
2355
  static watchers = new Set();
2272
2356
  view_rect() {
2273
- this.view_rect_watcher();
2274
- return this.view_rect_cache();
2275
- }
2276
- view_rect_cache(next = null) {
2277
- return next;
2278
- }
2279
- view_rect_watcher() {
2280
- $mol_view.watchers.add(this);
2281
- return { destructor: () => $mol_view.watchers.delete(this) };
2357
+ $mol_wire_watch();
2358
+ const { width, height, left, right, top, bottom } = this.dom_node().getBoundingClientRect();
2359
+ return { width, height, left, right, top, bottom };
2282
2360
  }
2283
2361
  dom_id() {
2284
2362
  return this.toString();
@@ -2495,12 +2573,6 @@ var $;
2495
2573
  __decorate([
2496
2574
  $mol_mem
2497
2575
  ], $mol_view.prototype, "view_rect", null);
2498
- __decorate([
2499
- $mol_mem
2500
- ], $mol_view.prototype, "view_rect_cache", null);
2501
- __decorate([
2502
- $mol_mem
2503
- ], $mol_view.prototype, "view_rect_watcher", null);
2504
2576
  __decorate([
2505
2577
  $mol_mem
2506
2578
  ], $mol_view.prototype, "dom_node", null);
@@ -4065,14 +4137,12 @@ var $;
4065
4137
  const size_real = this.size_real();
4066
4138
  const max_x = (viewport.x.max - viewport.x.min) / size_real.x;
4067
4139
  const max_y = (viewport.y.max - viewport.y.min) / size_real.y;
4068
- return this.graphs().filter(graph => {
4140
+ return this.graphs_positioned().filter(graph => {
4069
4141
  const dims = graph.dimensions();
4070
4142
  if (dims.x.min > dims.x.max)
4071
4143
  return true;
4072
4144
  if (dims.y.min > dims.y.max)
4073
4145
  return true;
4074
- if (dims.x.max - dims.x.min < max_x && dims.y.max - dims.y.min < max_y)
4075
- return false;
4076
4146
  if (dims.x.min > viewport.x.max)
4077
4147
  return false;
4078
4148
  if (dims.x.max < viewport.x.min)
@@ -4085,7 +4155,7 @@ var $;
4085
4155
  });
4086
4156
  }
4087
4157
  graphs_positioned() {
4088
- const graphs = this.graphs_visible();
4158
+ const graphs = this.graphs();
4089
4159
  for (let graph of graphs) {
4090
4160
  graph.shift = () => this.shift();
4091
4161
  graph.scale = () => this.scale();
@@ -4533,12 +4603,6 @@ var $;
4533
4603
  const size_x = Math.max(0, Math.ceil((1 / aspect - 1) * diameter));
4534
4604
  return points.map(point => `M ${point[0] - shift_x} ${point[1] - shift_y} l ${size_x} ${size_y}`).join(' ');
4535
4605
  }
4536
- dimensions() {
4537
- const scale = this.scale();
4538
- const radius = this.diameter() / Math.min(...scale) / 2;
4539
- const dims = super.dimensions();
4540
- 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));
4541
- }
4542
4606
  }
4543
4607
  __decorate([
4544
4608
  $mol_mem
@@ -4546,9 +4610,6 @@ var $;
4546
4610
  __decorate([
4547
4611
  $mol_mem
4548
4612
  ], $mol_plot_dot.prototype, "indexes", null);
4549
- __decorate([
4550
- $mol_mem
4551
- ], $mol_plot_dot.prototype, "dimensions", null);
4552
4613
  $$.$mol_plot_dot = $mol_plot_dot;
4553
4614
  })($$ = $.$$ || ($.$$ = {}));
4554
4615
  })($ || ($ = {}));