@unhingged/vizu-core 0.1.6 → 0.1.7

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/dist/auto.js CHANGED
@@ -3180,7 +3180,16 @@ var Vizu = class {
3180
3180
  }
3181
3181
  if (matches(e, this.parsedShortcut)) {
3182
3182
  e.preventDefault();
3183
+ const wasEnabled = this.enabled;
3183
3184
  this.toggle();
3185
+ if (!wasEnabled && this.enabled && this.storage instanceof CloudStorageAdapter) {
3186
+ void this.storage.preflightAuth().catch((err) => {
3187
+ if (err?.code === "auth_canceled" || err?.code === "popup_blocked") return;
3188
+ if (typeof console !== "undefined") {
3189
+ console.warn("[vizu] preflight auth failed:", err);
3190
+ }
3191
+ });
3192
+ }
3184
3193
  }
3185
3194
  };
3186
3195
  /* ===== Reposition on scroll/resize ===== */
@@ -3269,14 +3278,6 @@ var Vizu = class {
3269
3278
  this.enabled = true;
3270
3279
  this.bus.emit("enabled", {});
3271
3280
  this.deferred(() => this.mount());
3272
- if (this.storage instanceof CloudStorageAdapter) {
3273
- void this.storage.preflightAuth().catch((err) => {
3274
- if (err?.code === "auth_canceled" || err?.code === "popup_blocked") return;
3275
- if (typeof console !== "undefined") {
3276
- console.warn("[vizu] preflight auth failed:", err);
3277
- }
3278
- });
3279
- }
3280
3281
  }
3281
3282
  disable() {
3282
3283
  if (!this.enabled) return;