mol_plot_all 1.2.1329 → 1.2.1331

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.mjs CHANGED
@@ -700,7 +700,7 @@ var $;
700
700
  return $mol_promise_like(this.cache);
701
701
  }
702
702
  field() {
703
- return this.task.name + '<>';
703
+ return this.task.name + '()';
704
704
  }
705
705
  constructor(id, task, host, args) {
706
706
  super();
@@ -877,9 +877,18 @@ var $;
877
877
  }
878
878
  destructor() {
879
879
  super.destructor();
880
- if ($mol_owning_check(this, this.cache)) {
880
+ if (!$mol_owning_check(this, this.cache))
881
+ return;
882
+ try {
881
883
  this.cache.destructor();
882
884
  }
885
+ catch (result) {
886
+ if ($mol_promise_like(result)) {
887
+ const error = new Error(`Promise in ${this}.destructor()`);
888
+ Object.defineProperty(result, 'stack', { get: () => error.stack });
889
+ }
890
+ $mol_fail_hidden(result);
891
+ }
883
892
  }
884
893
  }
885
894
  $.$mol_wire_fiber = $mol_wire_fiber;
@@ -1782,18 +1791,18 @@ var $;
1782
1791
  (function ($) {
1783
1792
  class $mol_wire_atom extends $mol_wire_fiber {
1784
1793
  static solo(host, task) {
1785
- const field = task.name + '<>';
1794
+ const field = task.name + '()';
1786
1795
  const existen = Object.getOwnPropertyDescriptor(host ?? task, field)?.value;
1787
1796
  if (existen)
1788
1797
  return existen;
1789
1798
  const prefix = host?.[Symbol.toStringTag] ?? (host instanceof Function ? $$.$mol_func_name(host) : host);
1790
- const key = prefix + ('.' + field);
1799
+ const key = prefix + ('.' + task.name + '<>');
1791
1800
  const fiber = new $mol_wire_atom(key, task, host, []);
1792
1801
  (host ?? task)[field] = fiber;
1793
1802
  return fiber;
1794
1803
  }
1795
1804
  static plex(host, task, key) {
1796
- const field = task.name + '<>';
1805
+ const field = task.name + '()';
1797
1806
  let dict = Object.getOwnPropertyDescriptor(host ?? task, field)?.value;
1798
1807
  const prefix = host?.[Symbol.toStringTag] ?? (host instanceof Function ? $$.$mol_func_name(host) : host);
1799
1808
  const key_str = $mol_key(key);
@@ -5323,7 +5332,9 @@ var $;
5323
5332
  if (points.length === 0)
5324
5333
  return '';
5325
5334
  const [, shift_y] = this.shift();
5326
- return points.map(point => `M ${point[0]} ${shift_y} V ${point[1]}`).join(' ');
5335
+ return points.map(point => (Number.isFinite(point[0]) && Number.isFinite(point[1]))
5336
+ ? `M ${point[0]} ${shift_y} V ${point[1]}`
5337
+ : ``).join(' ');
5327
5338
  }
5328
5339
  stroke_width() {
5329
5340
  return (8 / Math.sqrt(this.indexes().length)).toPrecision(2) + '%';
package/node.test.js CHANGED
@@ -691,7 +691,7 @@ var $;
691
691
  return $mol_promise_like(this.cache);
692
692
  }
693
693
  field() {
694
- return this.task.name + '<>';
694
+ return this.task.name + '()';
695
695
  }
696
696
  constructor(id, task, host, args) {
697
697
  super();
@@ -868,9 +868,18 @@ var $;
868
868
  }
869
869
  destructor() {
870
870
  super.destructor();
871
- if ($mol_owning_check(this, this.cache)) {
871
+ if (!$mol_owning_check(this, this.cache))
872
+ return;
873
+ try {
872
874
  this.cache.destructor();
873
875
  }
876
+ catch (result) {
877
+ if ($mol_promise_like(result)) {
878
+ const error = new Error(`Promise in ${this}.destructor()`);
879
+ Object.defineProperty(result, 'stack', { get: () => error.stack });
880
+ }
881
+ $mol_fail_hidden(result);
882
+ }
874
883
  }
875
884
  }
876
885
  $.$mol_wire_fiber = $mol_wire_fiber;
@@ -1773,18 +1782,18 @@ var $;
1773
1782
  (function ($) {
1774
1783
  class $mol_wire_atom extends $mol_wire_fiber {
1775
1784
  static solo(host, task) {
1776
- const field = task.name + '<>';
1785
+ const field = task.name + '()';
1777
1786
  const existen = Object.getOwnPropertyDescriptor(host ?? task, field)?.value;
1778
1787
  if (existen)
1779
1788
  return existen;
1780
1789
  const prefix = host?.[Symbol.toStringTag] ?? (host instanceof Function ? $$.$mol_func_name(host) : host);
1781
- const key = prefix + ('.' + field);
1790
+ const key = prefix + ('.' + task.name + '<>');
1782
1791
  const fiber = new $mol_wire_atom(key, task, host, []);
1783
1792
  (host ?? task)[field] = fiber;
1784
1793
  return fiber;
1785
1794
  }
1786
1795
  static plex(host, task, key) {
1787
- const field = task.name + '<>';
1796
+ const field = task.name + '()';
1788
1797
  let dict = Object.getOwnPropertyDescriptor(host ?? task, field)?.value;
1789
1798
  const prefix = host?.[Symbol.toStringTag] ?? (host instanceof Function ? $$.$mol_func_name(host) : host);
1790
1799
  const key_str = $mol_key(key);
@@ -5314,7 +5323,9 @@ var $;
5314
5323
  if (points.length === 0)
5315
5324
  return '';
5316
5325
  const [, shift_y] = this.shift();
5317
- return points.map(point => `M ${point[0]} ${shift_y} V ${point[1]}`).join(' ');
5326
+ return points.map(point => (Number.isFinite(point[0]) && Number.isFinite(point[1]))
5327
+ ? `M ${point[0]} ${shift_y} V ${point[1]}`
5328
+ : ``).join(' ');
5318
5329
  }
5319
5330
  stroke_width() {
5320
5331
  return (8 / Math.sqrt(this.indexes().length)).toPrecision(2) + '%';