mol_dump_lib 0.0.885 → 0.0.886

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
@@ -1648,15 +1648,15 @@ var $;
1648
1648
  "use strict";
1649
1649
  var $;
1650
1650
  (function ($) {
1651
- const catched = new WeakMap();
1651
+ const catched = new WeakSet();
1652
1652
  function $mol_fail_catch(error) {
1653
1653
  if (typeof error !== 'object')
1654
1654
  return false;
1655
1655
  if ($mol_promise_like(error))
1656
1656
  $mol_fail_hidden(error);
1657
- if (catched.get(error))
1657
+ if (catched.has(error))
1658
1658
  return false;
1659
- catched.set(error, true);
1659
+ catched.add(error);
1660
1660
  return true;
1661
1661
  }
1662
1662
  $.$mol_fail_catch = $mol_fail_catch;
@@ -2971,6 +2971,16 @@ var $;
2971
2971
  $.$mol_dom_render_events = $mol_dom_render_events;
2972
2972
  })($ || ($ = {}));
2973
2973
 
2974
+ ;
2975
+ "use strict";
2976
+ var $;
2977
+ (function ($) {
2978
+ function $mol_error_message(error) {
2979
+ return String((error instanceof Error ? error.message : null) || error) || 'Unknown';
2980
+ }
2981
+ $.$mol_error_message = $mol_error_message;
2982
+ })($ || ($ = {}));
2983
+
2974
2984
  ;
2975
2985
  "use strict";
2976
2986
  var $;
@@ -3260,8 +3270,8 @@ var $;
3260
3270
  if ($mol_promise_like(error))
3261
3271
  break render;
3262
3272
  try {
3263
- const message = error.message || error;
3264
- node.innerText = message.replace(/^|$/mg, '\xA0\xA0');
3273
+ ;
3274
+ node.innerText = this.$.$mol_error_message(error).replace(/^|$/mg, '\xA0\xA0');
3265
3275
  }
3266
3276
  catch { }
3267
3277
  }
@@ -5008,6 +5018,10 @@ var $;
5008
5018
  if(next !== undefined) return next;
5009
5019
  return null;
5010
5020
  }
5021
+ status(next){
5022
+ if(next !== undefined) return next;
5023
+ return [];
5024
+ }
5011
5025
  event(){
5012
5026
  return {
5013
5027
  ...(super.event()),
@@ -5039,6 +5053,7 @@ var $;
5039
5053
  ($mol_mem(($.$mol_button.prototype), "event_key_press"));
5040
5054
  ($mol_mem(($.$mol_button.prototype), "click"));
5041
5055
  ($mol_mem(($.$mol_button.prototype), "event_click"));
5056
+ ($mol_mem(($.$mol_button.prototype), "status"));
5042
5057
  ($mol_mem(($.$mol_button.prototype), "Speck"));
5043
5058
 
5044
5059
 
@@ -5052,7 +5067,6 @@ var $;
5052
5067
  var $$;
5053
5068
  (function ($$) {
5054
5069
  class $mol_button extends $.$mol_button {
5055
- status(next = [null]) { return next; }
5056
5070
  disabled() {
5057
5071
  return !this.enabled();
5058
5072
  }
@@ -5080,13 +5094,13 @@ var $;
5080
5094
  return this.enabled() ? super.tab_index() : -1;
5081
5095
  }
5082
5096
  error() {
5083
- const [error] = this.status();
5097
+ const error = this.status()?.[0];
5084
5098
  if (!error)
5085
5099
  return '';
5086
- if (error instanceof Promise) {
5100
+ if ($mol_promise_like(error)) {
5087
5101
  return $mol_fail_hidden(error);
5088
5102
  }
5089
- return String(error.message ?? error);
5103
+ return this.$.$mol_error_message(error);
5090
5104
  }
5091
5105
  hint_safe() {
5092
5106
  try {
@@ -5104,9 +5118,6 @@ var $;
5104
5118
  ];
5105
5119
  }
5106
5120
  }
5107
- __decorate([
5108
- $mol_mem
5109
- ], $mol_button.prototype, "status", null);
5110
5121
  $$.$mol_button = $mol_button;
5111
5122
  })($$ = $.$$ || ($.$$ = {}));
5112
5123
  })($ || ($ = {}));