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/web.js CHANGED
@@ -595,21 +595,28 @@ var $;
595
595
  "use strict";
596
596
  var $;
597
597
  (function ($) {
598
- class $mol_after_timeout extends $mol_object2 {
599
- delay;
598
+ class $mol_after_tick extends $mol_object2 {
600
599
  task;
601
- id;
602
- constructor(delay, task) {
600
+ static promise = null;
601
+ cancelled = false;
602
+ constructor(task) {
603
603
  super();
604
- this.delay = delay;
605
604
  this.task = task;
606
- this.id = setTimeout(task, delay);
605
+ if (!$mol_after_tick.promise)
606
+ $mol_after_tick.promise = Promise.resolve().then(() => {
607
+ $mol_after_tick.promise = null;
608
+ });
609
+ $mol_after_tick.promise.then(() => {
610
+ if (this.cancelled)
611
+ return;
612
+ task();
613
+ });
607
614
  }
608
615
  destructor() {
609
- clearTimeout(this.id);
616
+ this.cancelled = true;
610
617
  }
611
618
  }
612
- $.$mol_after_timeout = $mol_after_timeout;
619
+ $.$mol_after_tick = $mol_after_tick;
613
620
  })($ || ($ = {}));
614
621
 
615
622
  ;
@@ -642,7 +649,7 @@ var $;
642
649
  static plan() {
643
650
  if (this.plan_task)
644
651
  return;
645
- this.plan_task = new $mol_after_timeout(0, () => {
652
+ this.plan_task = new $mol_after_tick(() => {
646
653
  try {
647
654
  this.sync();
648
655
  }
@@ -1530,30 +1537,6 @@ var $;
1530
1537
  $.$mol_dom_context = self;
1531
1538
  })($ || ($ = {}));
1532
1539
 
1533
- ;
1534
- "use strict";
1535
- var $;
1536
- (function ($) {
1537
- class $mol_after_tick extends $mol_object2 {
1538
- task;
1539
- promise;
1540
- cancelled = false;
1541
- constructor(task) {
1542
- super();
1543
- this.task = task;
1544
- this.promise = Promise.resolve().then(() => {
1545
- if (this.cancelled)
1546
- return;
1547
- task();
1548
- });
1549
- }
1550
- destructor() {
1551
- this.cancelled = true;
1552
- }
1553
- }
1554
- $.$mol_after_tick = $mol_after_tick;
1555
- })($ || ($ = {}));
1556
-
1557
1540
  ;
1558
1541
  "use strict";
1559
1542
  var $;
@@ -2492,9 +2475,7 @@ var $;
2492
2475
  const win = this.$.$mol_dom_context;
2493
2476
  if (win.parent !== win.self && !win.document.hasFocus())
2494
2477
  return;
2495
- new this.$.$mol_after_timeout(500, () => {
2496
- this.focused(true);
2497
- });
2478
+ this.focused(true);
2498
2479
  }
2499
2480
  destructor() {
2500
2481
  const node = $mol_wire_probe(() => this.dom_node());
@@ -2575,7 +2556,7 @@ var $;
2575
2556
  "use strict";
2576
2557
  var $;
2577
2558
  (function ($) {
2578
- $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");
2559
+ $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");
2579
2560
  })($ || ($ = {}));
2580
2561
 
2581
2562
  ;
@@ -2620,6 +2601,27 @@ var $;
2620
2601
  };
2621
2602
 
2622
2603
 
2604
+ ;
2605
+ "use strict";
2606
+ var $;
2607
+ (function ($) {
2608
+ class $mol_after_timeout extends $mol_object2 {
2609
+ delay;
2610
+ task;
2611
+ id;
2612
+ constructor(delay, task) {
2613
+ super();
2614
+ this.delay = delay;
2615
+ this.task = task;
2616
+ this.id = setTimeout(task, delay);
2617
+ }
2618
+ destructor() {
2619
+ clearTimeout(this.id);
2620
+ }
2621
+ }
2622
+ $.$mol_after_timeout = $mol_after_timeout;
2623
+ })($ || ($ = {}));
2624
+
2623
2625
  ;
2624
2626
  "use strict";
2625
2627
  var $;