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.test.js CHANGED
@@ -619,29 +619,72 @@ var $;
619
619
  ;
620
620
  "use strict";
621
621
  var $;
622
+ (function ($) {
623
+ class $mol_term_color {
624
+ static reset = this.ansi(0, 0);
625
+ static bold = this.ansi(1, 22);
626
+ static italic = this.ansi(3, 23);
627
+ static underline = this.ansi(4, 24);
628
+ static inverse = this.ansi(7, 27);
629
+ static hidden = this.ansi(8, 28);
630
+ static strike = this.ansi(9, 29);
631
+ static gray = this.ansi(90, 39);
632
+ static red = this.ansi(91, 39);
633
+ static green = this.ansi(92, 39);
634
+ static yellow = this.ansi(93, 39);
635
+ static blue = this.ansi(94, 39);
636
+ static magenta = this.ansi(95, 39);
637
+ static cyan = this.ansi(96, 39);
638
+ static white = this.ansi(97, 39);
639
+ static Red = (str) => this.inverse(this.red(str));
640
+ static Green = (str) => this.inverse(this.green(str));
641
+ static Yellow = (str) => this.inverse(this.yellow(str));
642
+ static Blue = (str) => this.inverse(this.blue(str));
643
+ static Magenta = (str) => this.inverse(this.magenta(str));
644
+ static Cyan = (str) => this.inverse(this.cyan(str));
645
+ static White = (str) => this.inverse(this.white(str));
646
+ static ansi(open, close) {
647
+ if (typeof process === 'undefined')
648
+ return String;
649
+ if (!process.stdout.isTTY)
650
+ return String;
651
+ const prefix = `\x1b[${open}m`;
652
+ const postfix = `\x1b[${close}m`;
653
+ const suffix_regexp = new RegExp(postfix.replace('[', '\\['), 'g');
654
+ return function colorer(str) {
655
+ str = String(str);
656
+ if (str === '')
657
+ return str;
658
+ const suffix = str.replace(suffix_regexp, prefix);
659
+ return prefix + suffix + postfix;
660
+ };
661
+ }
662
+ }
663
+ $.$mol_term_color = $mol_term_color;
664
+ })($ || ($ = {}));
665
+ //mol/term/color/color.ts
666
+ ;
667
+ "use strict";
668
+ var $;
622
669
  (function ($) {
623
670
  function $mol_log3_node_make(level, output, type, color) {
624
671
  return function $mol_log3_logger(event) {
625
672
  if (!event.time)
626
673
  event = { time: new Date().toISOString(), ...event };
627
674
  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
- ;
675
+ let str = color(tree.toString());
633
676
  this.console[level](str);
634
677
  const self = this;
635
678
  return () => self.console.groupEnd();
636
679
  };
637
680
  }
638
681
  $.$mol_log3_node_make = $mol_log3_node_make;
639
- $.$mol_log3_come = $mol_log3_node_make('info', 'stdout', 'come', 'blue');
640
- $.$mol_log3_done = $mol_log3_node_make('info', 'stdout', 'done', 'green');
641
- $.$mol_log3_fail = $mol_log3_node_make('error', 'stderr', 'fail', 'red');
642
- $.$mol_log3_warn = $mol_log3_node_make('warn', 'stderr', 'warn', 'yellow');
643
- $.$mol_log3_rise = $mol_log3_node_make('log', 'stdout', 'rise', 'magenta');
644
- $.$mol_log3_area = $mol_log3_node_make('log', 'stdout', 'area', 'cyan');
682
+ $.$mol_log3_come = $mol_log3_node_make('info', 'stdout', 'come', $mol_term_color.blue);
683
+ $.$mol_log3_done = $mol_log3_node_make('info', 'stdout', 'done', $mol_term_color.green);
684
+ $.$mol_log3_fail = $mol_log3_node_make('error', 'stderr', 'fail', $mol_term_color.red);
685
+ $.$mol_log3_warn = $mol_log3_node_make('warn', 'stderr', 'warn', $mol_term_color.yellow);
686
+ $.$mol_log3_rise = $mol_log3_node_make('log', 'stdout', 'rise', $mol_term_color.magenta);
687
+ $.$mol_log3_area = $mol_log3_node_make('log', 'stdout', 'area', $mol_term_color.cyan);
645
688
  })($ || ($ = {}));
646
689
  //mol/log3/log3.node.ts
647
690
  ;
@@ -831,7 +874,7 @@ var $;
831
874
  "use strict";
832
875
  var $;
833
876
  (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");
877
+ $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
878
  })($ || ($ = {}));
836
879
  //mol/theme/-css/theme.css.ts
837
880
  ;
@@ -945,7 +988,7 @@ var $;
945
988
  promote() {
946
989
  $mol_wire_auto()?.track_next(this);
947
990
  }
948
- refresh() { }
991
+ fresh() { }
949
992
  complete() { }
950
993
  emit(quant = $mol_wire_cursor.stale) {
951
994
  for (let i = this.sub_from; i < this.data.length; i += 2) {
@@ -1148,7 +1191,7 @@ var $;
1148
1191
  }
1149
1192
  for (let cursor = this.pub_from; cursor < this.cursor; cursor += 2) {
1150
1193
  const pub = this.data[cursor];
1151
- pub.refresh();
1194
+ pub.fresh();
1152
1195
  }
1153
1196
  this.cursor = $mol_wire_cursor.fresh;
1154
1197
  }
@@ -1278,10 +1321,13 @@ var $;
1278
1321
  }
1279
1322
  static sync() {
1280
1323
  while (this.planning.size) {
1281
- const fibers = this.planning;
1282
- this.planning = new Set;
1283
- for (const fiber of fibers) {
1284
- fiber.refresh();
1324
+ for (const fiber of this.planning) {
1325
+ this.planning.delete(fiber);
1326
+ if (fiber.cursor >= 0)
1327
+ continue;
1328
+ if (fiber.cursor === $mol_wire_cursor.final)
1329
+ continue;
1330
+ fiber.fresh();
1285
1331
  }
1286
1332
  }
1287
1333
  while (this.reaping.size) {
@@ -1308,12 +1354,13 @@ var $;
1308
1354
  field() {
1309
1355
  return this.task.name + '()';
1310
1356
  }
1311
- constructor(id, task, host, ...args) {
1357
+ constructor(id, task, host, args) {
1312
1358
  super();
1313
1359
  this.task = task;
1314
1360
  this.host = host;
1315
- this.data.push(...args);
1316
- this.pub_from = this.sub_from = args.length;
1361
+ if (args)
1362
+ this.data.push(...args);
1363
+ this.pub_from = this.sub_from = args?.length ?? 0;
1317
1364
  this[Symbol.toStringTag] = id;
1318
1365
  }
1319
1366
  plan() {
@@ -1348,7 +1395,7 @@ var $;
1348
1395
  else
1349
1396
  super.emit(quant);
1350
1397
  }
1351
- refresh() {
1398
+ fresh() {
1352
1399
  if (this.cursor === $mol_wire_cursor.fresh)
1353
1400
  return;
1354
1401
  if (this.cursor === $mol_wire_cursor.final)
@@ -1356,7 +1403,7 @@ var $;
1356
1403
  check: if (this.cursor === $mol_wire_cursor.doubt) {
1357
1404
  for (let i = this.pub_from; i < this.sub_from; i += 2) {
1358
1405
  ;
1359
- this.data[i]?.refresh();
1406
+ this.data[i]?.fresh();
1360
1407
  if (this.cursor !== $mol_wire_cursor.doubt)
1361
1408
  break check;
1362
1409
  }
@@ -1374,7 +1421,7 @@ var $;
1374
1421
  result = this.task.call(this.host, this.data[0]);
1375
1422
  break;
1376
1423
  default:
1377
- result = this.task.call(this.host, ...this.data.slice(0, this.pub_from));
1424
+ result = this.task.call(this.host, ...this.args);
1378
1425
  break;
1379
1426
  }
1380
1427
  if (result instanceof Promise) {
@@ -1412,12 +1459,16 @@ var $;
1412
1459
  this.track_off(bu);
1413
1460
  this.put(result);
1414
1461
  }
1462
+ refresh() {
1463
+ this.cursor = $mol_wire_cursor.stale;
1464
+ this.fresh();
1465
+ }
1415
1466
  sync() {
1416
1467
  if (!$mol_wire_fiber.warm) {
1417
1468
  return this.result();
1418
1469
  }
1419
1470
  this.promote();
1420
- this.refresh();
1471
+ this.fresh();
1421
1472
  if (this.cache instanceof Error) {
1422
1473
  return $mol_fail_hidden(this.cache);
1423
1474
  }
@@ -1428,7 +1479,7 @@ var $;
1428
1479
  }
1429
1480
  async async() {
1430
1481
  while (true) {
1431
- this.refresh();
1482
+ this.fresh();
1432
1483
  if (this.cache instanceof Error) {
1433
1484
  $mol_fail_hidden(this.cache);
1434
1485
  }
@@ -1640,7 +1691,7 @@ var $;
1640
1691
  break reuse;
1641
1692
  return existen;
1642
1693
  }
1643
- return new $mol_wire_task(`${host?.[Symbol.toStringTag] ?? host}.${task.name}(#)`, task, host, ...args);
1694
+ return new $mol_wire_task(`${host?.[Symbol.toStringTag] ?? host}.${task.name}(#)`, task, host, args);
1644
1695
  };
1645
1696
  }
1646
1697
  complete() {
@@ -1713,7 +1764,7 @@ var $;
1713
1764
  else {
1714
1765
  dict = (host ?? task)[field] = new Map();
1715
1766
  }
1716
- fiber = new $mol_wire_atom(key, task, host, ...args);
1767
+ fiber = new $mol_wire_atom(key, task, host, args);
1717
1768
  dict.set(key, fiber);
1718
1769
  return fiber;
1719
1770
  };
@@ -1724,13 +1775,29 @@ var $;
1724
1775
  if (existen)
1725
1776
  return existen;
1726
1777
  const key = `${host?.[Symbol.toStringTag] ?? host}.${field}`;
1727
- const fiber = new $mol_wire_atom(key, task, host, ...args);
1778
+ const fiber = new $mol_wire_atom(key, task, host, args);
1728
1779
  (host ?? task)[field] = fiber;
1729
1780
  return fiber;
1730
1781
  };
1731
1782
  }
1732
1783
  }
1733
- resync(...args) {
1784
+ static watching = new Set();
1785
+ static watch() {
1786
+ new $mol_after_frame($mol_wire_atom.watch);
1787
+ for (const atom of $mol_wire_atom.watching) {
1788
+ if (atom.cursor === $mol_wire_cursor.final) {
1789
+ $mol_wire_atom.watching.delete(atom);
1790
+ }
1791
+ else {
1792
+ atom.cursor = $mol_wire_cursor.stale;
1793
+ atom.fresh();
1794
+ }
1795
+ }
1796
+ }
1797
+ watch() {
1798
+ $mol_wire_atom.watching.add(this);
1799
+ }
1800
+ resync(args) {
1734
1801
  return this.put(this.task.call(this.host, ...args));
1735
1802
  }
1736
1803
  once() {
@@ -1784,6 +1851,7 @@ var $;
1784
1851
  $mol_wire_method
1785
1852
  ], $mol_wire_atom.prototype, "once", null);
1786
1853
  $.$mol_wire_atom = $mol_wire_atom;
1854
+ $mol_wire_atom.watch();
1787
1855
  })($ || ($ = {}));
1788
1856
  //mol/wire/atom/atom.ts
1789
1857
  ;
@@ -1816,7 +1884,7 @@ var $;
1816
1884
  let atom = persist(this, args.slice(0, keys));
1817
1885
  if (args.length <= keys || args[keys] === undefined) {
1818
1886
  if (!$mol_wire_fiber.warm)
1819
- return atom.sync();
1887
+ return atom.result();
1820
1888
  if ($mol_wire_auto() instanceof $mol_wire_task) {
1821
1889
  return atom.once();
1822
1890
  }
@@ -1824,7 +1892,7 @@ var $;
1824
1892
  return atom.sync();
1825
1893
  }
1826
1894
  }
1827
- return atom.resync(...args);
1895
+ return atom.resync(args);
1828
1896
  };
1829
1897
  Object.defineProperty(wrapper, 'name', { value: func.name + ' ' });
1830
1898
  Object.assign(wrapper, { orig: func });
@@ -1973,6 +2041,22 @@ var $;
1973
2041
  ;
1974
2042
  "use strict";
1975
2043
  var $;
2044
+ (function ($) {
2045
+ function $mol_wire_watch() {
2046
+ const atom = $mol_wire_auto();
2047
+ if (atom instanceof $mol_wire_atom) {
2048
+ atom.watch();
2049
+ }
2050
+ else {
2051
+ $mol_fail(new Error('Atom is equired for watching'));
2052
+ }
2053
+ }
2054
+ $.$mol_wire_watch = $mol_wire_watch;
2055
+ })($ || ($ = {}));
2056
+ //mol/wire/watch/watch.ts
2057
+ ;
2058
+ "use strict";
2059
+ var $;
1976
2060
  (function ($) {
1977
2061
  function $mol_const(value) {
1978
2062
  var getter = (() => value);
@@ -2156,7 +2240,7 @@ var $;
2156
2240
  "use strict";
2157
2241
  var $;
2158
2242
  (function ($) {
2159
- $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");
2243
+ $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");
2160
2244
  })($ || ($ = {}));
2161
2245
  //mol/view/view/-css/view.css.ts
2162
2246
  ;
@@ -2262,15 +2346,9 @@ var $;
2262
2346
  }
2263
2347
  static watchers = new Set();
2264
2348
  view_rect() {
2265
- this.view_rect_watcher();
2266
- return this.view_rect_cache();
2267
- }
2268
- view_rect_cache(next = null) {
2269
- return next;
2270
- }
2271
- view_rect_watcher() {
2272
- $mol_view.watchers.add(this);
2273
- return { destructor: () => $mol_view.watchers.delete(this) };
2349
+ $mol_wire_watch();
2350
+ const { width, height, left, right, top, bottom } = this.dom_node().getBoundingClientRect();
2351
+ return { width, height, left, right, top, bottom };
2274
2352
  }
2275
2353
  dom_id() {
2276
2354
  return this.toString();
@@ -2487,12 +2565,6 @@ var $;
2487
2565
  __decorate([
2488
2566
  $mol_mem
2489
2567
  ], $mol_view.prototype, "view_rect", null);
2490
- __decorate([
2491
- $mol_mem
2492
- ], $mol_view.prototype, "view_rect_cache", null);
2493
- __decorate([
2494
- $mol_mem
2495
- ], $mol_view.prototype, "view_rect_watcher", null);
2496
2568
  __decorate([
2497
2569
  $mol_mem
2498
2570
  ], $mol_view.prototype, "dom_node", null);
@@ -4057,14 +4129,12 @@ var $;
4057
4129
  const size_real = this.size_real();
4058
4130
  const max_x = (viewport.x.max - viewport.x.min) / size_real.x;
4059
4131
  const max_y = (viewport.y.max - viewport.y.min) / size_real.y;
4060
- return this.graphs().filter(graph => {
4132
+ return this.graphs_positioned().filter(graph => {
4061
4133
  const dims = graph.dimensions();
4062
4134
  if (dims.x.min > dims.x.max)
4063
4135
  return true;
4064
4136
  if (dims.y.min > dims.y.max)
4065
4137
  return true;
4066
- if (dims.x.max - dims.x.min < max_x && dims.y.max - dims.y.min < max_y)
4067
- return false;
4068
4138
  if (dims.x.min > viewport.x.max)
4069
4139
  return false;
4070
4140
  if (dims.x.max < viewport.x.min)
@@ -4077,7 +4147,7 @@ var $;
4077
4147
  });
4078
4148
  }
4079
4149
  graphs_positioned() {
4080
- const graphs = this.graphs_visible();
4150
+ const graphs = this.graphs();
4081
4151
  for (let graph of graphs) {
4082
4152
  graph.shift = () => this.shift();
4083
4153
  graph.scale = () => this.scale();
@@ -4525,12 +4595,6 @@ var $;
4525
4595
  const size_x = Math.max(0, Math.ceil((1 / aspect - 1) * diameter));
4526
4596
  return points.map(point => `M ${point[0] - shift_x} ${point[1] - shift_y} l ${size_x} ${size_y}`).join(' ');
4527
4597
  }
4528
- dimensions() {
4529
- const scale = this.scale();
4530
- const radius = this.diameter() / Math.min(...scale) / 2;
4531
- const dims = super.dimensions();
4532
- 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));
4533
- }
4534
4598
  }
4535
4599
  __decorate([
4536
4600
  $mol_mem
@@ -4538,9 +4602,6 @@ var $;
4538
4602
  __decorate([
4539
4603
  $mol_mem
4540
4604
  ], $mol_plot_dot.prototype, "indexes", null);
4541
- __decorate([
4542
- $mol_mem
4543
- ], $mol_plot_dot.prototype, "dimensions", null);
4544
4605
  $$.$mol_plot_dot = $mol_plot_dot;
4545
4606
  })($$ = $.$$ || ($.$$ = {}));
4546
4607
  })($ || ($ = {}));
@@ -5927,6 +5988,20 @@ var $;
5927
5988
  //mol/test/test.test.ts
5928
5989
  ;
5929
5990
  "use strict";
5991
+ var $;
5992
+ (function ($_1) {
5993
+ $mol_test_mocks.push($ => {
5994
+ $.$mol_log3_come = () => { };
5995
+ $.$mol_log3_done = () => { };
5996
+ $.$mol_log3_fail = () => { };
5997
+ $.$mol_log3_warn = () => { };
5998
+ $.$mol_log3_rise = () => { };
5999
+ $.$mol_log3_area = () => () => { };
6000
+ });
6001
+ })($ || ($ = {}));
6002
+ //mol/log3/log3.test.ts
6003
+ ;
6004
+ "use strict";
5930
6005
  //mol/type/error/error.ts
5931
6006
  ;
5932
6007
  "use strict";
@@ -6433,20 +6508,6 @@ var $;
6433
6508
  ;
6434
6509
  "use strict";
6435
6510
  var $;
6436
- (function ($_1) {
6437
- $mol_test_mocks.push($ => {
6438
- $.$mol_log3_come = () => { };
6439
- $.$mol_log3_done = () => { };
6440
- $.$mol_log3_fail = () => { };
6441
- $.$mol_log3_warn = () => { };
6442
- $.$mol_log3_rise = () => { };
6443
- $.$mol_log3_area = () => () => { };
6444
- });
6445
- })($ || ($ = {}));
6446
- //mol/log3/log3.test.ts
6447
- ;
6448
- "use strict";
6449
- var $;
6450
6511
  (function ($_1) {
6451
6512
  $mol_test({
6452
6513
  'tree parsing'() {
@@ -7491,36 +7552,6 @@ var $;
7491
7552
  ;
7492
7553
  "use strict";
7493
7554
  var $;
7494
- (function ($) {
7495
- $mol_test({
7496
- 'const returns stored value'() {
7497
- const foo = { bar: $mol_const(Math.random()) };
7498
- $mol_assert_equal(foo.bar(), foo.bar());
7499
- $mol_assert_equal(foo.bar(), foo.bar['()']);
7500
- },
7501
- });
7502
- })($ || ($ = {}));
7503
- //mol/const/const.test.ts
7504
- ;
7505
- "use strict";
7506
- var $;
7507
- (function ($_1) {
7508
- $mol_test({
7509
- 'FQN of anon function'($) {
7510
- const $$ = Object.assign($, { $mol_func_name_test: (() => () => { })() });
7511
- $mol_assert_equal($$.$mol_func_name_test.name, '');
7512
- $mol_assert_equal($$.$mol_func_name($$.$mol_func_name_test), '$mol_func_name_test');
7513
- $mol_assert_equal($$.$mol_func_name_test.name, '$mol_func_name_test');
7514
- },
7515
- });
7516
- })($ || ($ = {}));
7517
- //mol/func/name/name.test.ts
7518
- ;
7519
- "use strict";
7520
- //mol/type/keys/extract/extract.test.ts
7521
- ;
7522
- "use strict";
7523
- var $;
7524
7555
  (function ($) {
7525
7556
  class $mol_wire_log extends $mol_object2 {
7526
7557
  static watch(task) {
@@ -7637,6 +7668,36 @@ var $;
7637
7668
  ;
7638
7669
  "use strict";
7639
7670
  var $;
7671
+ (function ($) {
7672
+ $mol_test({
7673
+ 'const returns stored value'() {
7674
+ const foo = { bar: $mol_const(Math.random()) };
7675
+ $mol_assert_equal(foo.bar(), foo.bar());
7676
+ $mol_assert_equal(foo.bar(), foo.bar['()']);
7677
+ },
7678
+ });
7679
+ })($ || ($ = {}));
7680
+ //mol/const/const.test.ts
7681
+ ;
7682
+ "use strict";
7683
+ var $;
7684
+ (function ($_1) {
7685
+ $mol_test({
7686
+ 'FQN of anon function'($) {
7687
+ const $$ = Object.assign($, { $mol_func_name_test: (() => () => { })() });
7688
+ $mol_assert_equal($$.$mol_func_name_test.name, '');
7689
+ $mol_assert_equal($$.$mol_func_name($$.$mol_func_name_test), '$mol_func_name_test');
7690
+ $mol_assert_equal($$.$mol_func_name_test.name, '$mol_func_name_test');
7691
+ },
7692
+ });
7693
+ })($ || ($ = {}));
7694
+ //mol/func/name/name.test.ts
7695
+ ;
7696
+ "use strict";
7697
+ //mol/type/keys/extract/extract.test.ts
7698
+ ;
7699
+ "use strict";
7700
+ var $;
7640
7701
  (function ($_1) {
7641
7702
  $mol_test({
7642
7703
  'id auto generation'($) {