@unhingged/vizu-core 0.1.11 → 0.1.12
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 +14 -11
- package/dist/auto.cjs.map +1 -1
- package/dist/auto.js +14 -11
- package/dist/auto.js.map +1 -1
- package/dist/index.cjs +14 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -6
- package/dist/index.d.ts +8 -6
- package/dist/index.js +14 -11
- 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/auto.cjs
CHANGED
|
@@ -3320,22 +3320,23 @@ var Vizu = class {
|
|
|
3320
3320
|
this.user = user;
|
|
3321
3321
|
this.popover?.setUser(user);
|
|
3322
3322
|
this.pill?.setUser(user);
|
|
3323
|
-
if (this.pill) {
|
|
3324
|
-
if (this.shouldShowPill()) this.pill.show();
|
|
3325
|
-
else this.pill.hide();
|
|
3326
|
-
}
|
|
3327
3323
|
this.bus.emit("user:changed", { user });
|
|
3324
|
+
if (this.enabled && !this.root && this.shouldMount()) {
|
|
3325
|
+
this.deferred(() => this.mount());
|
|
3326
|
+
}
|
|
3328
3327
|
}
|
|
3329
3328
|
getUser() {
|
|
3330
3329
|
return this.user;
|
|
3331
3330
|
}
|
|
3332
3331
|
/**
|
|
3333
|
-
* Whether the
|
|
3334
|
-
*
|
|
3335
|
-
*
|
|
3336
|
-
*
|
|
3332
|
+
* Whether the full Vizu UI (pill, highlighter, markers, popover) can
|
|
3333
|
+
* be mounted right now. Cloud-mode workspaces hold off until the
|
|
3334
|
+
* user is signed in; non-cloud usage (local / memory storage) has no
|
|
3335
|
+
* auth concept and mounts immediately. Re-checked from `enable()`
|
|
3336
|
+
* and from `setUser()` so that the moment auth resolves, the UI
|
|
3337
|
+
* appears without the user needing to press the shortcut again.
|
|
3337
3338
|
*/
|
|
3338
|
-
|
|
3339
|
+
shouldMount() {
|
|
3339
3340
|
if (!(this.storage instanceof CloudStorageAdapter)) return true;
|
|
3340
3341
|
return this.user !== null;
|
|
3341
3342
|
}
|
|
@@ -3362,7 +3363,9 @@ var Vizu = class {
|
|
|
3362
3363
|
if (this.enabled) return;
|
|
3363
3364
|
this.enabled = true;
|
|
3364
3365
|
this.bus.emit("enabled", {});
|
|
3365
|
-
|
|
3366
|
+
if (this.shouldMount()) {
|
|
3367
|
+
this.deferred(() => this.mount());
|
|
3368
|
+
}
|
|
3366
3369
|
}
|
|
3367
3370
|
disable() {
|
|
3368
3371
|
if (!this.enabled) return;
|
|
@@ -3702,7 +3705,7 @@ var Vizu = class {
|
|
|
3702
3705
|
this.pill.setUser(this.user);
|
|
3703
3706
|
this.pill.setComments(this.comments);
|
|
3704
3707
|
this.pill.setMultiSelectState(this.multiSelectMode, this.pendingFingerprints.length);
|
|
3705
|
-
|
|
3708
|
+
this.pill.show();
|
|
3706
3709
|
this.highlighter = new Highlighter(
|
|
3707
3710
|
this.root,
|
|
3708
3711
|
this.opts.ignoreSelectors ?? [],
|