mol_plot_all 1.2.281 → 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.test.js CHANGED
@@ -1990,13 +1990,15 @@ var $;
1990
1990
  var $;
1991
1991
  (function ($) {
1992
1992
  class $mol_view_selection extends $mol_object {
1993
- static focused(next) {
1993
+ static focused(next, notify) {
1994
1994
  const parents = [];
1995
1995
  let element = next?.[0] ?? $mol_dom_context.document.activeElement;
1996
1996
  while (element) {
1997
1997
  parents.push(element);
1998
1998
  element = element.parentNode;
1999
1999
  }
2000
+ if (!next || notify)
2001
+ return parents;
2000
2002
  new $mol_after_tick(() => {
2001
2003
  const element = this.focused()[0];
2002
2004
  if (element)
@@ -2298,6 +2300,30 @@ var $;
2298
2300
  //mol/func/name/name.ts
2299
2301
  ;
2300
2302
  "use strict";
2303
+ var $;
2304
+ (function ($) {
2305
+ class $mol_after_work extends $mol_object2 {
2306
+ delay;
2307
+ task;
2308
+ id;
2309
+ constructor(delay, task) {
2310
+ super();
2311
+ this.delay = delay;
2312
+ this.task = task;
2313
+ this.id = requestIdleCallback(task, { timeout: delay });
2314
+ }
2315
+ destructor() {
2316
+ cancelIdleCallback(this.id);
2317
+ }
2318
+ }
2319
+ $.$mol_after_work = $mol_after_work;
2320
+ if (typeof requestIdleCallback !== 'function') {
2321
+ $.$mol_after_work = $mol_after_timeout;
2322
+ }
2323
+ })($ || ($ = {}));
2324
+ //mol/after/work/work.ts
2325
+ ;
2326
+ "use strict";
2301
2327
  //mol/type/keys/extract/extract.ts
2302
2328
  ;
2303
2329
  "use strict";
@@ -2624,6 +2650,12 @@ var $;
2624
2650
  $mol_wire_fiber.sync();
2625
2651
  view.dom_node().scrollIntoView({ block: align });
2626
2652
  }
2653
+ bring() {
2654
+ new $mol_after_work(16, () => {
2655
+ this.dom_node().scrollIntoView({ behavior: 'smooth' });
2656
+ new $mol_after_timeout(400, () => this.focused(true));
2657
+ });
2658
+ }
2627
2659
  }
2628
2660
  __decorate([
2629
2661
  $mol_mem
@@ -7860,6 +7892,15 @@ var $;
7860
7892
  //mol/const/const.test.ts
7861
7893
  ;
7862
7894
  "use strict";
7895
+ var $;
7896
+ (function ($_1) {
7897
+ $mol_test_mocks.push($ => {
7898
+ $.$mol_after_work = $mol_after_mock_timeout;
7899
+ });
7900
+ })($ || ($ = {}));
7901
+ //mol/after/work/work.test.ts
7902
+ ;
7903
+ "use strict";
7863
7904
  //mol/type/keys/extract/extract.test.ts
7864
7905
  ;
7865
7906
  "use strict";