@loupekit/sdk 0.3.2-next.7 → 0.3.3-next.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 +22 -1
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +22 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.global.js
CHANGED
|
@@ -105,7 +105,14 @@ var Loupe = (() => {
|
|
|
105
105
|
.toolbar button .ico { flex: none; display: block; }
|
|
106
106
|
.toolbar button.on { background: var(--accent); color: #fff; }
|
|
107
107
|
.toolbar .sep { width: 1px; height: 20px; background: #333846; margin: 0 2px; }
|
|
108
|
-
.toolbar .brand {
|
|
108
|
+
.toolbar .brand {
|
|
109
|
+
font-weight: 700; padding: 8px; border-radius: 8px; letter-spacing: -.01em;
|
|
110
|
+
cursor: pointer; user-select: none;
|
|
111
|
+
}
|
|
112
|
+
.toolbar .brand:hover { background: #2b2f3b; }
|
|
113
|
+
/* collapsed \u2192 show only the brand/logo; click it again to expand */
|
|
114
|
+
.toolbar.collapsed { gap: 0; }
|
|
115
|
+
.toolbar.collapsed > *:not(.brand) { display: none; }
|
|
109
116
|
.toolbar .count {
|
|
110
117
|
background: var(--pin); color: #fff; font-size: 11px; font-weight: 700;
|
|
111
118
|
border-radius: 999px; padding: 1px 7px; margin-left: 2px;
|
|
@@ -2132,6 +2139,7 @@ var Loupe = (() => {
|
|
|
2132
2139
|
/** comment.id → pin element. */
|
|
2133
2140
|
this.pins = /* @__PURE__ */ new Map();
|
|
2134
2141
|
this.mode = "off";
|
|
2142
|
+
this.collapsed = false;
|
|
2135
2143
|
this.targetOffset = { x: 0.5, y: 0.5 };
|
|
2136
2144
|
this.pending = null;
|
|
2137
2145
|
this.dragStart = null;
|
|
@@ -2300,6 +2308,9 @@ var Loupe = (() => {
|
|
|
2300
2308
|
buildToolbar() {
|
|
2301
2309
|
const bar = el("div", "toolbar");
|
|
2302
2310
|
const brand = el("span", "brand", "\u25CE Loupe");
|
|
2311
|
+
brand.title = "Collapse / expand the Loupe bar";
|
|
2312
|
+
brand.setAttribute("role", "button");
|
|
2313
|
+
brand.onclick = () => this.toggleCollapsed();
|
|
2303
2314
|
const inspectBtn = el("button", "", "\u271B Inspect & comment");
|
|
2304
2315
|
inspectBtn.dataset.role = "inspect";
|
|
2305
2316
|
inspectBtn.onclick = () => this.setMode(this.mode === "inspect" ? "off" : "inspect");
|
|
@@ -2545,6 +2556,16 @@ var Loupe = (() => {
|
|
|
2545
2556
|
this.panel.classList.toggle("open");
|
|
2546
2557
|
this.renderPanel();
|
|
2547
2558
|
}
|
|
2559
|
+
/** Collapse the toolbar to just the logo (or expand it back). */
|
|
2560
|
+
toggleCollapsed() {
|
|
2561
|
+
this.collapsed = !this.collapsed;
|
|
2562
|
+
this.toolbar.classList.toggle("collapsed", this.collapsed);
|
|
2563
|
+
if (this.collapsed) {
|
|
2564
|
+
this.setMode("off");
|
|
2565
|
+
this.panel.classList.remove("open");
|
|
2566
|
+
this.closeComposer();
|
|
2567
|
+
}
|
|
2568
|
+
}
|
|
2548
2569
|
renderPanel() {
|
|
2549
2570
|
const p = this.panel;
|
|
2550
2571
|
p.innerHTML = "";
|