@vue-skuilder/standalone-ui 0.2.18 → 0.2.19

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.
@@ -29808,6 +29808,12 @@ ${t.stack}` : JSON.stringify(t);
29808
29808
  hydrationStatus() {
29809
29809
  return { ...this._hydration };
29810
29810
  }
29811
+ async awaitHydration() {
29812
+ try {
29813
+ await this._hydrationPromise;
29814
+ } catch {}
29815
+ return this.hydrationStatus();
29816
+ }
29811
29817
  canMaterializeDefaults() {
29812
29818
  return this._hydration.state !== "failed" && this._hydration.state !== "hydrating";
29813
29819
  }
@@ -30066,7 +30072,7 @@ Currently logged-in as ${this._username}.`);
30066
30072
  }) : (_BaseUser._instance = new _BaseUser(await t.getCurrentUsername(), t), await _BaseUser._instance.init(), _BaseUser._instance);
30067
30073
  }
30068
30074
  constructor(t, c) {
30069
- _defineProperty$2(this, "_username", void 0), _defineProperty$2(this, "syncStrategy", void 0), _defineProperty$2(this, "localDB", void 0), _defineProperty$2(this, "remoteDB", void 0), _defineProperty$2(this, "writeDB", void 0), _defineProperty$2(this, "updateQueue", void 0), _defineProperty$2(this, "_hydration", { state: "not-required" }), _BaseUser._initialized = !1, this._username = t, this.syncStrategy = c, this.setDBandQ();
30075
+ _defineProperty$2(this, "_username", void 0), _defineProperty$2(this, "syncStrategy", void 0), _defineProperty$2(this, "localDB", void 0), _defineProperty$2(this, "remoteDB", void 0), _defineProperty$2(this, "writeDB", void 0), _defineProperty$2(this, "updateQueue", void 0), _defineProperty$2(this, "_hydration", { state: "not-required" }), _defineProperty$2(this, "_hydrationPromise", null), _BaseUser._initialized = !1, this._username = t, this.syncStrategy = c, this.setDBandQ();
30070
30076
  }
30071
30077
  setDBandQ() {
30072
30078
  this.localDB = getLocalUserDB(this._username), this.remoteDB = this.syncStrategy.setupRemoteDB(this._username), this.writeDB = this.syncStrategy.getWriteDB ? this.syncStrategy.getWriteDB(this._username) : this.localDB, this.updateQueue = new UpdateQueue(this.localDB, this.writeDB);
@@ -30076,7 +30082,7 @@ Currently logged-in as ${this._username}.`);
30076
30082
  _BaseUser._initialized = !0;
30077
30083
  return;
30078
30084
  }
30079
- this.syncStrategy.stopSync?.(), this.setDBandQ(), await this.hydrateLocalMirror(), this.syncStrategy.startSync(this.localDB, this.remoteDB), this.applyDesignDocs().catch((t) => {
30085
+ this.syncStrategy.stopSync?.(), this.setDBandQ(), this._hydrationPromise = this.hydrateLocalMirror(), await this._hydrationPromise, this.syncStrategy.startSync(this.localDB, this.remoteDB), this.applyDesignDocs().catch((t) => {
30080
30086
  log4(`Error in applyDesignDocs background task: ${t}`), t && typeof t == "object" && log4(`Full error details in applyDesignDocs: ${JSON.stringify(t)}`);
30081
30087
  }), this.deduplicateReviews().catch((t) => {
30082
30088
  log4(`Error in deduplicateReviews background task: ${t}`), t && typeof t == "object" && log4(`Full error details in background task: ${JSON.stringify(t)}`);