mam 1.11.772 → 1.11.773

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
@@ -1898,15 +1898,15 @@ var $;
1898
1898
  "use strict";
1899
1899
  var $;
1900
1900
  (function ($) {
1901
- const catched = new WeakMap();
1901
+ const catched = new WeakSet();
1902
1902
  function $mol_fail_catch(error) {
1903
1903
  if (typeof error !== 'object')
1904
1904
  return false;
1905
1905
  if ($mol_promise_like(error))
1906
1906
  $mol_fail_hidden(error);
1907
- if (catched.get(error))
1907
+ if (catched.has(error))
1908
1908
  return false;
1909
- catched.set(error, true);
1909
+ catched.add(error);
1910
1910
  return true;
1911
1911
  }
1912
1912
  $.$mol_fail_catch = $mol_fail_catch;
package/node.test.js CHANGED
@@ -1889,15 +1889,15 @@ var $;
1889
1889
  "use strict";
1890
1890
  var $;
1891
1891
  (function ($) {
1892
- const catched = new WeakMap();
1892
+ const catched = new WeakSet();
1893
1893
  function $mol_fail_catch(error) {
1894
1894
  if (typeof error !== 'object')
1895
1895
  return false;
1896
1896
  if ($mol_promise_like(error))
1897
1897
  $mol_fail_hidden(error);
1898
- if (catched.get(error))
1898
+ if (catched.has(error))
1899
1899
  return false;
1900
- catched.set(error, true);
1900
+ catched.add(error);
1901
1901
  return true;
1902
1902
  }
1903
1903
  $.$mol_fail_catch = $mol_fail_catch;
@@ -12024,6 +12024,16 @@ var $;
12024
12024
  $.$mol_dom_render_events = $mol_dom_render_events;
12025
12025
  })($ || ($ = {}));
12026
12026
 
12027
+ ;
12028
+ "use strict";
12029
+ var $;
12030
+ (function ($) {
12031
+ function $mol_error_message(error) {
12032
+ return String((error instanceof Error ? error.message : null) || error) || 'Unknown';
12033
+ }
12034
+ $.$mol_error_message = $mol_error_message;
12035
+ })($ || ($ = {}));
12036
+
12027
12037
  ;
12028
12038
  "use strict";
12029
12039
  var $;
@@ -12268,8 +12278,8 @@ var $;
12268
12278
  if ($mol_promise_like(error))
12269
12279
  break render;
12270
12280
  try {
12271
- const message = error.message || error;
12272
- node.innerText = message.replace(/^|$/mg, '\xA0\xA0');
12281
+ ;
12282
+ node.innerText = this.$.$mol_error_message(error).replace(/^|$/mg, '\xA0\xA0');
12273
12283
  }
12274
12284
  catch { }
12275
12285
  }
@@ -13383,6 +13393,10 @@ var $;
13383
13393
  if(next !== undefined) return next;
13384
13394
  return null;
13385
13395
  }
13396
+ status(next){
13397
+ if(next !== undefined) return next;
13398
+ return [];
13399
+ }
13386
13400
  event(){
13387
13401
  return {
13388
13402
  ...(super.event()),
@@ -13414,6 +13428,7 @@ var $;
13414
13428
  ($mol_mem(($.$mol_button.prototype), "event_key_press"));
13415
13429
  ($mol_mem(($.$mol_button.prototype), "click"));
13416
13430
  ($mol_mem(($.$mol_button.prototype), "event_click"));
13431
+ ($mol_mem(($.$mol_button.prototype), "status"));
13417
13432
  ($mol_mem(($.$mol_button.prototype), "Speck"));
13418
13433
 
13419
13434
 
@@ -13473,7 +13488,6 @@ var $;
13473
13488
  var $$;
13474
13489
  (function ($$) {
13475
13490
  class $mol_button extends $.$mol_button {
13476
- status(next = [null]) { return next; }
13477
13491
  disabled() {
13478
13492
  return !this.enabled();
13479
13493
  }
@@ -13501,13 +13515,13 @@ var $;
13501
13515
  return this.enabled() ? super.tab_index() : -1;
13502
13516
  }
13503
13517
  error() {
13504
- const [error] = this.status();
13518
+ const error = this.status()?.[0];
13505
13519
  if (!error)
13506
13520
  return '';
13507
- if (error instanceof Promise) {
13521
+ if ($mol_promise_like(error)) {
13508
13522
  return $mol_fail_hidden(error);
13509
13523
  }
13510
- return String(error.message ?? error);
13524
+ return this.$.$mol_error_message(error);
13511
13525
  }
13512
13526
  hint_safe() {
13513
13527
  try {
@@ -13525,9 +13539,6 @@ var $;
13525
13539
  ];
13526
13540
  }
13527
13541
  }
13528
- __decorate([
13529
- $mol_mem
13530
- ], $mol_button.prototype, "status", null);
13531
13542
  $$.$mol_button = $mol_button;
13532
13543
  })($$ = $.$$ || ($.$$ = {}));
13533
13544
  })($ || ($ = {}));