@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/index.cjs
CHANGED
|
@@ -2254,7 +2254,7 @@ var Pill = class {
|
|
|
2254
2254
|
var Sidebar = class {
|
|
2255
2255
|
constructor(root, callbacks) {
|
|
2256
2256
|
this.open = false;
|
|
2257
|
-
this.filter = "
|
|
2257
|
+
this.filter = "all";
|
|
2258
2258
|
this.lastComments = [];
|
|
2259
2259
|
this.lastConfidence = /* @__PURE__ */ new Map();
|
|
2260
2260
|
this.handleClick = (e) => {
|
|
@@ -3681,10 +3681,10 @@ var Vizu = class {
|
|
|
3681
3681
|
* Status filter shared by the sidebar tabs and the on-page markers.
|
|
3682
3682
|
* Picking a tab updates this (via the sidebar's onFilterChange) and
|
|
3683
3683
|
* re-renders markers so the page shows the same subset as the panel.
|
|
3684
|
-
* Defaults to '
|
|
3685
|
-
*
|
|
3684
|
+
* Defaults to 'all' (matching the sidebar's default tab) — every
|
|
3685
|
+
* marker shows until the user narrows to a specific status.
|
|
3686
3686
|
*/
|
|
3687
|
-
this.statusFilter = "
|
|
3687
|
+
this.statusFilter = "all";
|
|
3688
3688
|
/**
|
|
3689
3689
|
* Flipped true once the initial loadComments() at construction has
|
|
3690
3690
|
* settled (success or failure). The cloud onAuthChanged callback uses
|
|
@@ -3724,14 +3724,7 @@ var Vizu = class {
|
|
|
3724
3724
|
e.preventDefault();
|
|
3725
3725
|
const wasEnabled = this.enabled;
|
|
3726
3726
|
this.toggle();
|
|
3727
|
-
if (!wasEnabled && this.enabled
|
|
3728
|
-
void this.storage.preflightAuth().catch((err) => {
|
|
3729
|
-
if (err?.code === "auth_canceled" || err?.code === "popup_blocked") return;
|
|
3730
|
-
if (typeof console !== "undefined") {
|
|
3731
|
-
console.warn("[vizu] preflight auth failed:", err);
|
|
3732
|
-
}
|
|
3733
|
-
});
|
|
3734
|
-
}
|
|
3727
|
+
if (!wasEnabled && this.enabled) this.requestAuth();
|
|
3735
3728
|
}
|
|
3736
3729
|
};
|
|
3737
3730
|
/* ===== Reposition on scroll/resize ===== */
|
|
@@ -3885,6 +3878,25 @@ var Vizu = class {
|
|
|
3885
3878
|
isEnabled() {
|
|
3886
3879
|
return this.enabled;
|
|
3887
3880
|
}
|
|
3881
|
+
/**
|
|
3882
|
+
* Kick the cloud sign-in flow. Call this alongside `enable()` from an
|
|
3883
|
+
* explicit user gesture — a host-rendered launcher button, a menu item —
|
|
3884
|
+
* so cloud-mode users get the sign-in popup immediately instead of only
|
|
3885
|
+
* after clicking an element. The keyboard shortcut goes through this
|
|
3886
|
+
* same path. No-op outside cloud mode, when already signed in, or when
|
|
3887
|
+
* the workspace has already denied access this session.
|
|
3888
|
+
*/
|
|
3889
|
+
requestAuth() {
|
|
3890
|
+
if (!(this.storage instanceof CloudStorageAdapter)) return;
|
|
3891
|
+
if (this.user) return;
|
|
3892
|
+
if (this.storage.isAccessDenied()) return;
|
|
3893
|
+
void this.storage.preflightAuth().catch((err) => {
|
|
3894
|
+
if (err?.code === "auth_canceled" || err?.code === "popup_blocked") return;
|
|
3895
|
+
if (typeof console !== "undefined") {
|
|
3896
|
+
console.warn("[vizu] preflight auth failed:", err);
|
|
3897
|
+
}
|
|
3898
|
+
});
|
|
3899
|
+
}
|
|
3888
3900
|
destroy() {
|
|
3889
3901
|
this.disable();
|
|
3890
3902
|
if (typeof window !== "undefined") window.removeEventListener("keydown", this.onKeyDown);
|