@loupekit/sdk 0.10.7 → 0.10.8
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/index.global.js +28 -8
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +28 -8
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.global.js
CHANGED
|
@@ -2503,8 +2503,25 @@ var Loupe = (() => {
|
|
|
2503
2503
|
}
|
|
2504
2504
|
};
|
|
2505
2505
|
|
|
2506
|
+
// ../shared/dist/index.js
|
|
2507
|
+
var COMMENT_STAGES = ["queue", "todo", "in_progress", "in_review", "resolved"];
|
|
2508
|
+
var LEGACY_STATUS = {
|
|
2509
|
+
open: "queue",
|
|
2510
|
+
in_progress: "in_progress",
|
|
2511
|
+
done: "resolved"
|
|
2512
|
+
};
|
|
2513
|
+
function normalizeStatus(value) {
|
|
2514
|
+
if (typeof value === "string") {
|
|
2515
|
+
if (COMMENT_STAGES.includes(value))
|
|
2516
|
+
return value;
|
|
2517
|
+
if (value in LEGACY_STATUS)
|
|
2518
|
+
return LEGACY_STATUS[value];
|
|
2519
|
+
}
|
|
2520
|
+
return "queue";
|
|
2521
|
+
}
|
|
2522
|
+
|
|
2506
2523
|
// src/app.ts
|
|
2507
|
-
var SDK_VERSION = true ? "0.10.
|
|
2524
|
+
var SDK_VERSION = true ? "0.10.8" : "dev";
|
|
2508
2525
|
var DOCK_MODES = ["left", "right", "bottom", "float"];
|
|
2509
2526
|
var RECORD_MAX_MS = 2e4;
|
|
2510
2527
|
var MAX_FILES = 10;
|
|
@@ -3447,7 +3464,7 @@ var Loupe = (() => {
|
|
|
3447
3464
|
author: this.cfg.user,
|
|
3448
3465
|
title,
|
|
3449
3466
|
body,
|
|
3450
|
-
status: "
|
|
3467
|
+
status: "queue",
|
|
3451
3468
|
kind: target.kind,
|
|
3452
3469
|
anchor,
|
|
3453
3470
|
context,
|
|
@@ -3509,7 +3526,7 @@ var Loupe = (() => {
|
|
|
3509
3526
|
this.pins.set(c.id, pin);
|
|
3510
3527
|
}
|
|
3511
3528
|
pin.textContent = String(i + 1);
|
|
3512
|
-
pin.classList.toggle("done", c
|
|
3529
|
+
pin.classList.toggle("done", isResolved(c));
|
|
3513
3530
|
pin.classList.toggle("free", c.kind === "free");
|
|
3514
3531
|
});
|
|
3515
3532
|
this.updateCount();
|
|
@@ -3688,11 +3705,11 @@ var Loupe = (() => {
|
|
|
3688
3705
|
this.updateCount();
|
|
3689
3706
|
}
|
|
3690
3707
|
itemView(c, i) {
|
|
3691
|
-
const detached = this.pins.get(c.id)?.classList.contains("detached") && c
|
|
3708
|
+
const detached = this.pins.get(c.id)?.classList.contains("detached") && !isResolved(c);
|
|
3692
3709
|
const open = this.expanded.has(c.id);
|
|
3693
3710
|
const item = el("div", "item" + (open ? "" : " collapsed"));
|
|
3694
3711
|
const top = el("div", "top");
|
|
3695
|
-
const num = el("span", "num" + (c
|
|
3712
|
+
const num = el("span", "num" + (isResolved(c) ? " done" : detached ? " detached" : ""), String(i + 1));
|
|
3696
3713
|
top.append(num);
|
|
3697
3714
|
if (c.recording) top.appendChild(el("span", "rectag", "\u23FA recording"));
|
|
3698
3715
|
const vw = c.viewport?.w;
|
|
@@ -3701,7 +3718,7 @@ var Loupe = (() => {
|
|
|
3701
3718
|
const icon = vw < 768 ? "\u{1F4F1}" : vw < 1024 ? "\u25A6" : "\u{1F5A5}";
|
|
3702
3719
|
top.appendChild(el("span", "device", `${icon} ${kind}`));
|
|
3703
3720
|
}
|
|
3704
|
-
if (c
|
|
3721
|
+
if (isResolved(c)) top.appendChild(el("span", "badge done", "resolved"));
|
|
3705
3722
|
else if (detached) top.appendChild(el("span", "badge detached", "element moved/removed"));
|
|
3706
3723
|
top.appendChild(el("span", "caret", open ? "\u25BE" : "\u25B8"));
|
|
3707
3724
|
item.appendChild(top);
|
|
@@ -3737,10 +3754,10 @@ var Loupe = (() => {
|
|
|
3737
3754
|
}
|
|
3738
3755
|
}
|
|
3739
3756
|
const actions = el("div", "actions");
|
|
3740
|
-
const doneBtn = el("button", "", c
|
|
3757
|
+
const doneBtn = el("button", "", isResolved(c) ? "Reopen" : "Resolve");
|
|
3741
3758
|
doneBtn.onclick = async (e) => {
|
|
3742
3759
|
e.stopPropagation();
|
|
3743
|
-
const status = c
|
|
3760
|
+
const status = isResolved(c) ? "queue" : "resolved";
|
|
3744
3761
|
c.status = status;
|
|
3745
3762
|
await this.store.update(c.id, { status });
|
|
3746
3763
|
this.renderPins();
|
|
@@ -3913,6 +3930,9 @@ var Loupe = (() => {
|
|
|
3913
3930
|
if (c.kind === "free") return "Free note \xB7 page-level";
|
|
3914
3931
|
return c.anchor.testid ? `[data-testid="${c.anchor.testid}"]` : c.anchor.cssPath;
|
|
3915
3932
|
}
|
|
3933
|
+
function isResolved(c) {
|
|
3934
|
+
return normalizeStatus(c.status) === "resolved";
|
|
3935
|
+
}
|
|
3916
3936
|
|
|
3917
3937
|
// src/index.ts
|
|
3918
3938
|
var app = null;
|