mol_plot_all 1.2.831 → 1.2.833

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
@@ -84,7 +84,7 @@ var $;
84
84
  try {
85
85
  if (!having)
86
86
  return false;
87
- if (typeof having !== 'object')
87
+ if (typeof having !== 'object' && typeof having !== 'function')
88
88
  return false;
89
89
  if (having instanceof $mol_delegate)
90
90
  return false;
@@ -220,11 +220,12 @@ var $;
220
220
  return this.name;
221
221
  }
222
222
  destructor() { }
223
+ static destructor() { }
223
224
  toString() {
224
225
  return this[Symbol.toStringTag] || this.constructor.name + '()';
225
226
  }
226
227
  static toJSON() {
227
- return this.$.$mol_func_name(this);
228
+ return this[Symbol.toStringTag] || this.$.$mol_func_name(this);
228
229
  }
229
230
  toJSON() {
230
231
  return this.toString();
package/node.test.js CHANGED
@@ -76,7 +76,7 @@ var $;
76
76
  try {
77
77
  if (!having)
78
78
  return false;
79
- if (typeof having !== 'object')
79
+ if (typeof having !== 'object' && typeof having !== 'function')
80
80
  return false;
81
81
  if (having instanceof $mol_delegate)
82
82
  return false;
@@ -212,11 +212,12 @@ var $;
212
212
  return this.name;
213
213
  }
214
214
  destructor() { }
215
+ static destructor() { }
215
216
  toString() {
216
217
  return this[Symbol.toStringTag] || this.constructor.name + '()';
217
218
  }
218
219
  static toJSON() {
219
- return this.$.$mol_func_name(this);
220
+ return this[Symbol.toStringTag] || this.$.$mol_func_name(this);
220
221
  }
221
222
  toJSON() {
222
223
  return this.toString();
@@ -9421,19 +9422,44 @@ var $;
9421
9422
  ;
9422
9423
  "use strict";
9423
9424
  var $;
9425
+ (function ($) {
9426
+ $.$mol_mem_persist = $mol_wire_solid;
9427
+ })($ || ($ = {}));
9428
+ //mol/mem/persist/persist.ts
9429
+ ;
9430
+ "use strict";
9431
+ var $;
9424
9432
  (function ($) {
9425
9433
  class $mol_storage extends $mol_object2 {
9426
9434
  static native() {
9427
- return null;
9435
+ return this.$.$mol_dom_context.navigator.storage ?? {
9436
+ persisted: async () => false,
9437
+ persist: async () => false,
9438
+ estimate: async () => ({}),
9439
+ getDirectory: async () => null,
9440
+ };
9428
9441
  }
9429
- static persisted(next) {
9430
- return false;
9442
+ static persisted(next, cache) {
9443
+ $mol_mem_persist();
9444
+ if (cache)
9445
+ return Boolean(next);
9446
+ const native = this.native();
9447
+ if (next && !$mol_mem_cached(() => this.persisted())) {
9448
+ native.persist().then(actual => {
9449
+ setTimeout(() => this.persisted(actual, 'cache'), 5000);
9450
+ if (actual)
9451
+ this.$.$mol_log3_rise({ place: `$mol_storage`, message: `Persist: Yes` });
9452
+ else
9453
+ this.$.$mol_log3_fail({ place: `$mol_storage`, message: `Persist: No` });
9454
+ });
9455
+ }
9456
+ return next ?? $mol_wire_sync(native).persisted();
9431
9457
  }
9432
9458
  static estimate() {
9433
- return 0;
9459
+ return $mol_wire_sync(this.native() ?? {}).estimate();
9434
9460
  }
9435
9461
  static dir() {
9436
- return null;
9462
+ return $mol_wire_sync(this.native()).getDirectory();
9437
9463
  }
9438
9464
  }
9439
9465
  __decorate([
@@ -9444,7 +9470,7 @@ var $;
9444
9470
  ], $mol_storage, "persisted", null);
9445
9471
  $.$mol_storage = $mol_storage;
9446
9472
  })($ || ($ = {}));
9447
- //mol/storage/storage.node.ts
9473
+ //mol/storage/storage.ts
9448
9474
  ;
9449
9475
  "use strict";
9450
9476
  var $;