@unhingged/vizu-core 0.1.20 → 0.1.22
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 +24 -12
- package/dist/auto.cjs.map +1 -1
- package/dist/auto.js +24 -12
- package/dist/auto.js.map +1 -1
- package/dist/index.cjs +24 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +11 -2
- package/dist/index.d.ts +11 -2
- package/dist/index.js +24 -12
- package/dist/index.js.map +1 -1
- package/dist/internal.cjs +1 -1
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.js +1 -1
- package/dist/internal.js.map +1 -1
- package/dist/vizu.min.js +2 -2
- package/dist/vizu.min.js.map +1 -1
- package/package.json +1 -1
package/dist/auto.cjs
CHANGED
|
@@ -2244,7 +2244,7 @@ var Pill = class {
|
|
|
2244
2244
|
var Sidebar = class {
|
|
2245
2245
|
constructor(root, callbacks) {
|
|
2246
2246
|
this.open = false;
|
|
2247
|
-
this.filter = "
|
|
2247
|
+
this.filter = "all";
|
|
2248
2248
|
this.lastComments = [];
|
|
2249
2249
|
this.lastConfidence = /* @__PURE__ */ new Map();
|
|
2250
2250
|
this.handleClick = (e) => {
|
|
@@ -3671,10 +3671,10 @@ var Vizu = class {
|
|
|
3671
3671
|
* Status filter shared by the sidebar tabs and the on-page markers.
|
|
3672
3672
|
* Picking a tab updates this (via the sidebar's onFilterChange) and
|
|
3673
3673
|
* re-renders markers so the page shows the same subset as the panel.
|
|
3674
|
-
* Defaults to '
|
|
3675
|
-
*
|
|
3674
|
+
* Defaults to 'all' (matching the sidebar's default tab) — every
|
|
3675
|
+
* marker shows until the user narrows to a specific status.
|
|
3676
3676
|
*/
|
|
3677
|
-
this.statusFilter = "
|
|
3677
|
+
this.statusFilter = "all";
|
|
3678
3678
|
/**
|
|
3679
3679
|
* Flipped true once the initial loadComments() at construction has
|
|
3680
3680
|
* settled (success or failure). The cloud onAuthChanged callback uses
|
|
@@ -3714,14 +3714,7 @@ var Vizu = class {
|
|
|
3714
3714
|
e.preventDefault();
|
|
3715
3715
|
const wasEnabled = this.enabled;
|
|
3716
3716
|
this.toggle();
|
|
3717
|
-
if (!wasEnabled && this.enabled
|
|
3718
|
-
void this.storage.preflightAuth().catch((err) => {
|
|
3719
|
-
if (err?.code === "auth_canceled" || err?.code === "popup_blocked") return;
|
|
3720
|
-
if (typeof console !== "undefined") {
|
|
3721
|
-
console.warn("[vizu] preflight auth failed:", err);
|
|
3722
|
-
}
|
|
3723
|
-
});
|
|
3724
|
-
}
|
|
3717
|
+
if (!wasEnabled && this.enabled) this.requestAuth();
|
|
3725
3718
|
}
|
|
3726
3719
|
};
|
|
3727
3720
|
/* ===== Reposition on scroll/resize ===== */
|
|
@@ -3875,6 +3868,25 @@ var Vizu = class {
|
|
|
3875
3868
|
isEnabled() {
|
|
3876
3869
|
return this.enabled;
|
|
3877
3870
|
}
|
|
3871
|
+
/**
|
|
3872
|
+
* Kick the cloud sign-in flow. Call this alongside `enable()` from an
|
|
3873
|
+
* explicit user gesture — a host-rendered launcher button, a menu item —
|
|
3874
|
+
* so cloud-mode users get the sign-in popup immediately instead of only
|
|
3875
|
+
* after clicking an element. The keyboard shortcut goes through this
|
|
3876
|
+
* same path. No-op outside cloud mode, when already signed in, or when
|
|
3877
|
+
* the workspace has already denied access this session.
|
|
3878
|
+
*/
|
|
3879
|
+
requestAuth() {
|
|
3880
|
+
if (!(this.storage instanceof CloudStorageAdapter)) return;
|
|
3881
|
+
if (this.user) return;
|
|
3882
|
+
if (this.storage.isAccessDenied()) return;
|
|
3883
|
+
void this.storage.preflightAuth().catch((err) => {
|
|
3884
|
+
if (err?.code === "auth_canceled" || err?.code === "popup_blocked") return;
|
|
3885
|
+
if (typeof console !== "undefined") {
|
|
3886
|
+
console.warn("[vizu] preflight auth failed:", err);
|
|
3887
|
+
}
|
|
3888
|
+
});
|
|
3889
|
+
}
|
|
3878
3890
|
destroy() {
|
|
3879
3891
|
this.disable();
|
|
3880
3892
|
if (typeof window !== "undefined") window.removeEventListener("keydown", this.onKeyDown);
|