mol_plot_all 1.2.1142 → 1.2.1144

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
@@ -610,21 +610,28 @@ var $;
610
610
  "use strict";
611
611
  var $;
612
612
  (function ($) {
613
- class $mol_after_timeout extends $mol_object2 {
614
- delay;
613
+ class $mol_after_tick extends $mol_object2 {
615
614
  task;
616
- id;
617
- constructor(delay, task) {
615
+ static promise = null;
616
+ cancelled = false;
617
+ constructor(task) {
618
618
  super();
619
- this.delay = delay;
620
619
  this.task = task;
621
- this.id = setTimeout(task, delay);
620
+ if (!$mol_after_tick.promise)
621
+ $mol_after_tick.promise = Promise.resolve().then(() => {
622
+ $mol_after_tick.promise = null;
623
+ });
624
+ $mol_after_tick.promise.then(() => {
625
+ if (this.cancelled)
626
+ return;
627
+ task();
628
+ });
622
629
  }
623
630
  destructor() {
624
- clearTimeout(this.id);
631
+ this.cancelled = true;
625
632
  }
626
633
  }
627
- $.$mol_after_timeout = $mol_after_timeout;
634
+ $.$mol_after_tick = $mol_after_tick;
628
635
  })($ || ($ = {}));
629
636
 
630
637
  ;
@@ -657,7 +664,7 @@ var $;
657
664
  static plan() {
658
665
  if (this.plan_task)
659
666
  return;
660
- this.plan_task = new $mol_after_timeout(0, () => {
667
+ this.plan_task = new $mol_after_tick(() => {
661
668
  try {
662
669
  this.sync();
663
670
  }
@@ -931,6 +938,27 @@ var $;
931
938
  $.$mol_key = $mol_key;
932
939
  })($ || ($ = {}));
933
940
 
941
+ ;
942
+ "use strict";
943
+ var $;
944
+ (function ($) {
945
+ class $mol_after_timeout extends $mol_object2 {
946
+ delay;
947
+ task;
948
+ id;
949
+ constructor(delay, task) {
950
+ super();
951
+ this.delay = delay;
952
+ this.task = task;
953
+ this.id = setTimeout(task, delay);
954
+ }
955
+ destructor() {
956
+ clearTimeout(this.id);
957
+ }
958
+ }
959
+ $.$mol_after_timeout = $mol_after_timeout;
960
+ })($ || ($ = {}));
961
+
934
962
  ;
935
963
  "use strict";
936
964
  var $;
@@ -2059,30 +2087,6 @@ var $;
2059
2087
  $.$mol_dom_context = new $node.jsdom.JSDOM('', { url: 'https://localhost/' }).window;
2060
2088
  })($ || ($ = {}));
2061
2089
 
2062
- ;
2063
- "use strict";
2064
- var $;
2065
- (function ($) {
2066
- class $mol_after_tick extends $mol_object2 {
2067
- task;
2068
- promise;
2069
- cancelled = false;
2070
- constructor(task) {
2071
- super();
2072
- this.task = task;
2073
- this.promise = Promise.resolve().then(() => {
2074
- if (this.cancelled)
2075
- return;
2076
- task();
2077
- });
2078
- }
2079
- destructor() {
2080
- this.cancelled = true;
2081
- }
2082
- }
2083
- $.$mol_after_tick = $mol_after_tick;
2084
- })($ || ($ = {}));
2085
-
2086
2090
  ;
2087
2091
  "use strict";
2088
2092
  var $;
@@ -3003,9 +3007,7 @@ var $;
3003
3007
  const win = this.$.$mol_dom_context;
3004
3008
  if (win.parent !== win.self && !win.document.hasFocus())
3005
3009
  return;
3006
- new this.$.$mol_after_timeout(500, () => {
3007
- this.focused(true);
3008
- });
3010
+ this.focused(true);
3009
3011
  }
3010
3012
  destructor() {
3011
3013
  const node = $mol_wire_probe(() => this.dom_node());
@@ -3086,7 +3088,7 @@ var $;
3086
3088
  "use strict";
3087
3089
  var $;
3088
3090
  (function ($) {
3089
- $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\tbox-sizing: border-box;\n\tdisplay: flex;\n\tflex-shrink: 0;\n\tcontain: style;\n\tscrollbar-color: var(--mol_theme_line) transparent;\n\tscrollbar-width: thin;\n}\t\n\n[mol_view]::selection {\n\tbackground: var(--mol_theme_line);\n}\t\n\n[mol_view]::-webkit-scrollbar {\n\twidth: .25rem;\n\theight: .25rem;\n}\n\n[mol_view]::-webkit-scrollbar-corner {\n\tbackground-color: var(--mol_theme_line);\n}\n\n[mol_view]::-webkit-scrollbar-track {\n\tbackground-color: transparent;\n}\n\n[mol_view]::-webkit-scrollbar-thumb {\n\tbackground-color: var(--mol_theme_line);\n\tborder-radius: var(--mol_gap_round);\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\ttab-size: 4;\n\toverscroll-behavior: contain; /** Disable navigation gestures **/\n}\n\n@media print {\n\t[mol_view_root] {\n\t\theight: auto;\n\t}\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\tjustify-content: center;\n}\n\n@keyframes mol_view_wait {\n\tfrom {\n\t\topacity: .25;\n\t}\n\t20% {\n\t\topacity: .75;\n\t}\n\tto {\n\t\topacity: .25;\n\t}\n}\n\n:where([mol_view][mol_view_error=\"Promise\"]) {\n\tbackground: var(--mol_theme_hover);\n}\n\n[mol_view][mol_view_error=\"Promise\"] {\n\tanimation: mol_view_wait 1s steps( 20, end ) infinite;\n}\n");
3091
+ $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\tbox-sizing: border-box;\n\tdisplay: flex;\n\tflex-shrink: 0;\n\tcontain: style;\n\tscrollbar-color: var(--mol_theme_line) transparent;\n\tscrollbar-width: thin;\n}\t\n\n[mol_view]::selection {\n\tbackground: var(--mol_theme_line);\n}\t\n\n[mol_view]::-webkit-scrollbar {\n\twidth: .25rem;\n\theight: .25rem;\n}\n\n[mol_view]::-webkit-scrollbar-corner {\n\tbackground-color: var(--mol_theme_line);\n}\n\n[mol_view]::-webkit-scrollbar-track {\n\tbackground-color: transparent;\n}\n\n[mol_view]::-webkit-scrollbar-thumb {\n\tbackground-color: var(--mol_theme_line);\n\tborder-radius: var(--mol_gap_round);\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\ttab-size: 4;\n\toverscroll-behavior: contain; /** Disable navigation gestures **/\n}\n\n@media print {\n\t[mol_view_root] {\n\t\theight: auto;\n\t}\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\tjustify-content: center;\n}\n\n@keyframes mol_view_wait {\n\tfrom {\n\t\topacity: .25;\n\t}\n\t20% {\n\t\topacity: .75;\n\t}\n\tto {\n\t\topacity: .25;\n\t}\n}\n\n:where([mol_view][mol_view_error=\"Promise\"]) {\n\tbackground: var(--mol_theme_hover);\n}\n\n[mol_view][mol_view_error=\"Promise\"] {\n\tanimation: mol_view_wait 1s steps(20,end) infinite;\n}\n");
3090
3092
  })($ || ($ = {}));
3091
3093
 
3092
3094
  ;
package/node.test.js CHANGED
@@ -601,21 +601,28 @@ var $;
601
601
  "use strict";
602
602
  var $;
603
603
  (function ($) {
604
- class $mol_after_timeout extends $mol_object2 {
605
- delay;
604
+ class $mol_after_tick extends $mol_object2 {
606
605
  task;
607
- id;
608
- constructor(delay, task) {
606
+ static promise = null;
607
+ cancelled = false;
608
+ constructor(task) {
609
609
  super();
610
- this.delay = delay;
611
610
  this.task = task;
612
- this.id = setTimeout(task, delay);
611
+ if (!$mol_after_tick.promise)
612
+ $mol_after_tick.promise = Promise.resolve().then(() => {
613
+ $mol_after_tick.promise = null;
614
+ });
615
+ $mol_after_tick.promise.then(() => {
616
+ if (this.cancelled)
617
+ return;
618
+ task();
619
+ });
613
620
  }
614
621
  destructor() {
615
- clearTimeout(this.id);
622
+ this.cancelled = true;
616
623
  }
617
624
  }
618
- $.$mol_after_timeout = $mol_after_timeout;
625
+ $.$mol_after_tick = $mol_after_tick;
619
626
  })($ || ($ = {}));
620
627
 
621
628
  ;
@@ -648,7 +655,7 @@ var $;
648
655
  static plan() {
649
656
  if (this.plan_task)
650
657
  return;
651
- this.plan_task = new $mol_after_timeout(0, () => {
658
+ this.plan_task = new $mol_after_tick(() => {
652
659
  try {
653
660
  this.sync();
654
661
  }
@@ -922,6 +929,27 @@ var $;
922
929
  $.$mol_key = $mol_key;
923
930
  })($ || ($ = {}));
924
931
 
932
+ ;
933
+ "use strict";
934
+ var $;
935
+ (function ($) {
936
+ class $mol_after_timeout extends $mol_object2 {
937
+ delay;
938
+ task;
939
+ id;
940
+ constructor(delay, task) {
941
+ super();
942
+ this.delay = delay;
943
+ this.task = task;
944
+ this.id = setTimeout(task, delay);
945
+ }
946
+ destructor() {
947
+ clearTimeout(this.id);
948
+ }
949
+ }
950
+ $.$mol_after_timeout = $mol_after_timeout;
951
+ })($ || ($ = {}));
952
+
925
953
  ;
926
954
  "use strict";
927
955
  var $;
@@ -2050,30 +2078,6 @@ var $;
2050
2078
  $.$mol_dom_context = new $node.jsdom.JSDOM('', { url: 'https://localhost/' }).window;
2051
2079
  })($ || ($ = {}));
2052
2080
 
2053
- ;
2054
- "use strict";
2055
- var $;
2056
- (function ($) {
2057
- class $mol_after_tick extends $mol_object2 {
2058
- task;
2059
- promise;
2060
- cancelled = false;
2061
- constructor(task) {
2062
- super();
2063
- this.task = task;
2064
- this.promise = Promise.resolve().then(() => {
2065
- if (this.cancelled)
2066
- return;
2067
- task();
2068
- });
2069
- }
2070
- destructor() {
2071
- this.cancelled = true;
2072
- }
2073
- }
2074
- $.$mol_after_tick = $mol_after_tick;
2075
- })($ || ($ = {}));
2076
-
2077
2081
  ;
2078
2082
  "use strict";
2079
2083
  var $;
@@ -2994,9 +2998,7 @@ var $;
2994
2998
  const win = this.$.$mol_dom_context;
2995
2999
  if (win.parent !== win.self && !win.document.hasFocus())
2996
3000
  return;
2997
- new this.$.$mol_after_timeout(500, () => {
2998
- this.focused(true);
2999
- });
3001
+ this.focused(true);
3000
3002
  }
3001
3003
  destructor() {
3002
3004
  const node = $mol_wire_probe(() => this.dom_node());
@@ -3077,7 +3079,7 @@ var $;
3077
3079
  "use strict";
3078
3080
  var $;
3079
3081
  (function ($) {
3080
- $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\tbox-sizing: border-box;\n\tdisplay: flex;\n\tflex-shrink: 0;\n\tcontain: style;\n\tscrollbar-color: var(--mol_theme_line) transparent;\n\tscrollbar-width: thin;\n}\t\n\n[mol_view]::selection {\n\tbackground: var(--mol_theme_line);\n}\t\n\n[mol_view]::-webkit-scrollbar {\n\twidth: .25rem;\n\theight: .25rem;\n}\n\n[mol_view]::-webkit-scrollbar-corner {\n\tbackground-color: var(--mol_theme_line);\n}\n\n[mol_view]::-webkit-scrollbar-track {\n\tbackground-color: transparent;\n}\n\n[mol_view]::-webkit-scrollbar-thumb {\n\tbackground-color: var(--mol_theme_line);\n\tborder-radius: var(--mol_gap_round);\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\ttab-size: 4;\n\toverscroll-behavior: contain; /** Disable navigation gestures **/\n}\n\n@media print {\n\t[mol_view_root] {\n\t\theight: auto;\n\t}\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\tjustify-content: center;\n}\n\n@keyframes mol_view_wait {\n\tfrom {\n\t\topacity: .25;\n\t}\n\t20% {\n\t\topacity: .75;\n\t}\n\tto {\n\t\topacity: .25;\n\t}\n}\n\n:where([mol_view][mol_view_error=\"Promise\"]) {\n\tbackground: var(--mol_theme_hover);\n}\n\n[mol_view][mol_view_error=\"Promise\"] {\n\tanimation: mol_view_wait 1s steps( 20, end ) infinite;\n}\n");
3082
+ $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\tbox-sizing: border-box;\n\tdisplay: flex;\n\tflex-shrink: 0;\n\tcontain: style;\n\tscrollbar-color: var(--mol_theme_line) transparent;\n\tscrollbar-width: thin;\n}\t\n\n[mol_view]::selection {\n\tbackground: var(--mol_theme_line);\n}\t\n\n[mol_view]::-webkit-scrollbar {\n\twidth: .25rem;\n\theight: .25rem;\n}\n\n[mol_view]::-webkit-scrollbar-corner {\n\tbackground-color: var(--mol_theme_line);\n}\n\n[mol_view]::-webkit-scrollbar-track {\n\tbackground-color: transparent;\n}\n\n[mol_view]::-webkit-scrollbar-thumb {\n\tbackground-color: var(--mol_theme_line);\n\tborder-radius: var(--mol_gap_round);\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\ttab-size: 4;\n\toverscroll-behavior: contain; /** Disable navigation gestures **/\n}\n\n@media print {\n\t[mol_view_root] {\n\t\theight: auto;\n\t}\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\tjustify-content: center;\n}\n\n@keyframes mol_view_wait {\n\tfrom {\n\t\topacity: .25;\n\t}\n\t20% {\n\t\topacity: .75;\n\t}\n\tto {\n\t\topacity: .25;\n\t}\n}\n\n:where([mol_view][mol_view_error=\"Promise\"]) {\n\tbackground: var(--mol_theme_hover);\n}\n\n[mol_view][mol_view_error=\"Promise\"] {\n\tanimation: mol_view_wait 1s steps(20,end) infinite;\n}\n");
3081
3083
  })($ || ($ = {}));
3082
3084
 
3083
3085
  ;
@@ -7311,7 +7313,7 @@ var $;
7311
7313
  var $;
7312
7314
  (function ($_1) {
7313
7315
  $mol_test_mocks.push($ => {
7314
- $.$mol_after_timeout = $mol_after_mock_timeout;
7316
+ $.$mol_after_tick = $mol_after_mock_commmon;
7315
7317
  });
7316
7318
  })($ || ($ = {}));
7317
7319
 
@@ -7419,6 +7421,15 @@ var $;
7419
7421
  $.$mol_promise = $mol_promise;
7420
7422
  })($ || ($ = {}));
7421
7423
 
7424
+ ;
7425
+ "use strict";
7426
+ var $;
7427
+ (function ($_1) {
7428
+ $mol_test_mocks.push($ => {
7429
+ $.$mol_after_timeout = $mol_after_mock_timeout;
7430
+ });
7431
+ })($ || ($ = {}));
7432
+
7422
7433
  ;
7423
7434
  "use strict";
7424
7435
  var $;
@@ -8148,15 +8159,6 @@ var $;
8148
8159
  });
8149
8160
  })($ || ($ = {}));
8150
8161
 
8151
- ;
8152
- "use strict";
8153
- var $;
8154
- (function ($_1) {
8155
- $mol_test_mocks.push($ => {
8156
- $.$mol_after_tick = $mol_after_mock_commmon;
8157
- });
8158
- })($ || ($ = {}));
8159
-
8160
8162
  ;
8161
8163
  "use strict";
8162
8164
  var $;