mol_plot_all 1.2.283 → 1.2.284

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.js CHANGED
@@ -1998,13 +1998,15 @@ var $;
1998
1998
  var $;
1999
1999
  (function ($) {
2000
2000
  class $mol_view_selection extends $mol_object {
2001
- static focused(next) {
2001
+ static focused(next, notify) {
2002
2002
  const parents = [];
2003
2003
  let element = next?.[0] ?? $mol_dom_context.document.activeElement;
2004
2004
  while (element) {
2005
2005
  parents.push(element);
2006
2006
  element = element.parentNode;
2007
2007
  }
2008
+ if (!next || notify)
2009
+ return parents;
2008
2010
  new $mol_after_tick(() => {
2009
2011
  const element = this.focused()[0];
2010
2012
  if (element)
@@ -2306,6 +2308,30 @@ var $;
2306
2308
  //mol/func/name/name.ts
2307
2309
  ;
2308
2310
  "use strict";
2311
+ var $;
2312
+ (function ($) {
2313
+ class $mol_after_work extends $mol_object2 {
2314
+ delay;
2315
+ task;
2316
+ id;
2317
+ constructor(delay, task) {
2318
+ super();
2319
+ this.delay = delay;
2320
+ this.task = task;
2321
+ this.id = requestIdleCallback(task, { timeout: delay });
2322
+ }
2323
+ destructor() {
2324
+ cancelIdleCallback(this.id);
2325
+ }
2326
+ }
2327
+ $.$mol_after_work = $mol_after_work;
2328
+ if (typeof requestIdleCallback !== 'function') {
2329
+ $.$mol_after_work = $mol_after_timeout;
2330
+ }
2331
+ })($ || ($ = {}));
2332
+ //mol/after/work/work.ts
2333
+ ;
2334
+ "use strict";
2309
2335
  //mol/type/keys/extract/extract.ts
2310
2336
  ;
2311
2337
  "use strict";
@@ -2632,6 +2658,12 @@ var $;
2632
2658
  $mol_wire_fiber.sync();
2633
2659
  view.dom_node().scrollIntoView({ block: align });
2634
2660
  }
2661
+ bring() {
2662
+ new $mol_after_work(16, () => {
2663
+ this.dom_node().scrollIntoView({ behavior: 'smooth' });
2664
+ new $mol_after_timeout(400, () => this.focused(true));
2665
+ });
2666
+ }
2635
2667
  }
2636
2668
  __decorate([
2637
2669
  $mol_mem