@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.cjs +9 -8
- package/dist/auto.cjs.map +1 -1
- package/dist/auto.js +9 -8
- package/dist/auto.js.map +1 -1
- package/dist/index.cjs +9 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +9 -8
- package/dist/index.js.map +1 -1
- package/dist/vizu.min.js +1 -1
- package/dist/vizu.min.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -3216,7 +3216,16 @@ var Vizu = class {
|
|
|
3216
3216
|
}
|
|
3217
3217
|
if (matches(e, this.parsedShortcut)) {
|
|
3218
3218
|
e.preventDefault();
|
|
3219
|
+
const wasEnabled = this.enabled;
|
|
3219
3220
|
this.toggle();
|
|
3221
|
+
if (!wasEnabled && this.enabled && this.storage instanceof CloudStorageAdapter) {
|
|
3222
|
+
void this.storage.preflightAuth().catch((err) => {
|
|
3223
|
+
if (err?.code === "auth_canceled" || err?.code === "popup_blocked") return;
|
|
3224
|
+
if (typeof console !== "undefined") {
|
|
3225
|
+
console.warn("[vizu] preflight auth failed:", err);
|
|
3226
|
+
}
|
|
3227
|
+
});
|
|
3228
|
+
}
|
|
3220
3229
|
}
|
|
3221
3230
|
};
|
|
3222
3231
|
/* ===== Reposition on scroll/resize ===== */
|
|
@@ -3305,14 +3314,6 @@ var Vizu = class {
|
|
|
3305
3314
|
this.enabled = true;
|
|
3306
3315
|
this.bus.emit("enabled", {});
|
|
3307
3316
|
this.deferred(() => this.mount());
|
|
3308
|
-
if (this.storage instanceof CloudStorageAdapter) {
|
|
3309
|
-
void this.storage.preflightAuth().catch((err) => {
|
|
3310
|
-
if (err?.code === "auth_canceled" || err?.code === "popup_blocked") return;
|
|
3311
|
-
if (typeof console !== "undefined") {
|
|
3312
|
-
console.warn("[vizu] preflight auth failed:", err);
|
|
3313
|
-
}
|
|
3314
|
-
});
|
|
3315
|
-
}
|
|
3316
3317
|
}
|
|
3317
3318
|
disable() {
|
|
3318
3319
|
if (!this.enabled) return;
|