@tokenoftrust/storefront-runner 7.2.4 → 7.2.6
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/apps/storefront/src/lib/publication/shared/previewReload.ts +104 -0
- package/apps/storefront/src/middleware/renderChain.ts +24 -1
- package/package.json +1 -1
- package/packages/feedback/src/primitives/launcher.ts +132 -13
- package/packages/feedback/src/primitives/styles.ts +17 -4
- package/packages/feedback/src/tour/player/player.css +2 -2
|
@@ -266,3 +266,107 @@ export async function maybeInjectPreviewReload(
|
|
|
266
266
|
if (opts.renderPath && isPreviewOperatorSurfacePath(opts.renderPath)) return response;
|
|
267
267
|
return injectPreviewReload(response, opts);
|
|
268
268
|
}
|
|
269
|
+
|
|
270
|
+
const SHARE_STATE_TTL_SECONDS = 24 * 3600;
|
|
271
|
+
|
|
272
|
+
export interface PreviewShareLinkState {
|
|
273
|
+
revokedAtSeconds?: number;
|
|
274
|
+
revokedSigs?: string[];
|
|
275
|
+
seenSigs?: string[];
|
|
276
|
+
lastOpenedAt?: string;
|
|
277
|
+
lastOpenedMobile?: boolean;
|
|
278
|
+
openCount?: number;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
export interface PreviewShareKvLike {
|
|
282
|
+
get(key: string): Promise<string | null>;
|
|
283
|
+
put(key: string, value: string, options?: { expirationTtl?: number }): Promise<unknown>;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
export function previewShareStateKey(tenantId: string): string {
|
|
287
|
+
return `preview-share-state:${tenantId}`;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
export function extractPreviewTokenSignature(token: string | null | undefined): string | null {
|
|
291
|
+
const raw = String(token || "").trim();
|
|
292
|
+
const dot = raw.indexOf(".");
|
|
293
|
+
if (dot <= 0 || dot === raw.length - 1) return null;
|
|
294
|
+
return raw.slice(dot + 1);
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
export async function readPreviewShareState(
|
|
298
|
+
kvGet: (key: string) => Promise<string | null>,
|
|
299
|
+
tenantId: string,
|
|
300
|
+
): Promise<PreviewShareLinkState> {
|
|
301
|
+
const raw = await kvGet(previewShareStateKey(tenantId));
|
|
302
|
+
if (!raw) return {};
|
|
303
|
+
try {
|
|
304
|
+
const parsed = JSON.parse(raw);
|
|
305
|
+
return parsed && typeof parsed === "object" ? (parsed as PreviewShareLinkState) : {};
|
|
306
|
+
} catch (err) {
|
|
307
|
+
if (err instanceof SyntaxError) return {};
|
|
308
|
+
throw err;
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
export async function isPreviewShareTokenRevoked(
|
|
313
|
+
kvGet: (key: string) => Promise<string | null>,
|
|
314
|
+
tenantId: string,
|
|
315
|
+
token: string | null | undefined,
|
|
316
|
+
): Promise<boolean> {
|
|
317
|
+
const sig = extractPreviewTokenSignature(token);
|
|
318
|
+
if (!sig) return false;
|
|
319
|
+
const state = await readPreviewShareState(kvGet, tenantId);
|
|
320
|
+
return Array.isArray(state.revokedSigs) && state.revokedSigs.includes(sig);
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
export async function recordPreviewShareOpen(
|
|
324
|
+
kv: PreviewShareKvLike,
|
|
325
|
+
tenantId: string,
|
|
326
|
+
token: string,
|
|
327
|
+
userAgent?: string | null,
|
|
328
|
+
nowIso: string = new Date().toISOString(),
|
|
329
|
+
): Promise<PreviewShareLinkState> {
|
|
330
|
+
const state = await readPreviewShareState((k) => kv.get(k), tenantId);
|
|
331
|
+
const sig = extractPreviewTokenSignature(token);
|
|
332
|
+
const seen = new Set(Array.isArray(state.seenSigs) ? state.seenSigs : []);
|
|
333
|
+
if (sig) seen.add(sig);
|
|
334
|
+
const next: PreviewShareLinkState = {
|
|
335
|
+
...state,
|
|
336
|
+
seenSigs: [...seen].slice(-64),
|
|
337
|
+
lastOpenedAt: nowIso,
|
|
338
|
+
lastOpenedMobile: /Mobile|Android|iPhone|iPad|iPod/i.test(String(userAgent || "")),
|
|
339
|
+
openCount: (state.openCount ?? 0) + 1,
|
|
340
|
+
};
|
|
341
|
+
await kv.put(previewShareStateKey(tenantId), JSON.stringify(next), {
|
|
342
|
+
expirationTtl: SHARE_STATE_TTL_SECONDS,
|
|
343
|
+
});
|
|
344
|
+
return next;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
export async function revokePreviewShareLinks(
|
|
348
|
+
kv: PreviewShareKvLike,
|
|
349
|
+
tenantId: string,
|
|
350
|
+
activeTokens: readonly string[] = [],
|
|
351
|
+
nowSeconds: number = Math.floor(Date.now() / 1000),
|
|
352
|
+
): Promise<PreviewShareLinkState> {
|
|
353
|
+
const state = await readPreviewShareState((k) => kv.get(k), tenantId);
|
|
354
|
+
const revoked = new Set(Array.isArray(state.revokedSigs) ? state.revokedSigs : []);
|
|
355
|
+
for (const sig of state.seenSigs ?? []) {
|
|
356
|
+
if (typeof sig === "string" && sig) revoked.add(sig);
|
|
357
|
+
}
|
|
358
|
+
for (const tok of activeTokens) {
|
|
359
|
+
const sig = extractPreviewTokenSignature(tok);
|
|
360
|
+
if (sig) revoked.add(sig);
|
|
361
|
+
}
|
|
362
|
+
const next: PreviewShareLinkState = {
|
|
363
|
+
revokedAtSeconds: nowSeconds,
|
|
364
|
+
revokedSigs: [...revoked].slice(-128),
|
|
365
|
+
seenSigs: [],
|
|
366
|
+
openCount: 0,
|
|
367
|
+
};
|
|
368
|
+
await kv.put(previewShareStateKey(tenantId), JSON.stringify(next), {
|
|
369
|
+
expirationTtl: SHARE_STATE_TTL_SECONDS,
|
|
370
|
+
});
|
|
371
|
+
return next;
|
|
372
|
+
}
|
|
@@ -29,7 +29,12 @@ import {
|
|
|
29
29
|
} from "@/lib/publication/shared/edgeCache";
|
|
30
30
|
import { STATIC_SCRIPT_HASHES, STATIC_STYLE_HASHES } from "@/lib/access/shared/cspStaticHashes";
|
|
31
31
|
import { applySecurityHeaders } from "@/lib/access/shared/securityHeaders";
|
|
32
|
-
import {
|
|
32
|
+
import {
|
|
33
|
+
isPreviewOperatorSurfacePath,
|
|
34
|
+
isPreviewShareTokenRevoked,
|
|
35
|
+
maybeInjectPreviewReload,
|
|
36
|
+
recordPreviewShareOpen,
|
|
37
|
+
} from "@/lib/publication/shared/previewReload";
|
|
33
38
|
import {
|
|
34
39
|
decoratePreviewAnnotations,
|
|
35
40
|
isPublicationCapture,
|
|
@@ -234,7 +239,25 @@ export async function runRenderChain(input: RenderChainInput): Promise<Response>
|
|
|
234
239
|
return previewContextRefusalResponse(preview.context);
|
|
235
240
|
}
|
|
236
241
|
const verifiedPreview = preview.context.status === "valid" ? preview.context : null;
|
|
242
|
+
if (verifiedPreview && kv) {
|
|
243
|
+
const revoked = await isPreviewShareTokenRevoked(
|
|
244
|
+
(key) => kv.get(key),
|
|
245
|
+
tenantRecord.tenant_id,
|
|
246
|
+
verifiedPreview.token,
|
|
247
|
+
);
|
|
248
|
+
if (revoked) {
|
|
249
|
+
return previewContextRefusalResponse({ httpStatus: 403, reason: "expired" });
|
|
250
|
+
}
|
|
251
|
+
}
|
|
237
252
|
const queryToken = verifiedPreview?.source === "query" ? verifiedPreview.token : null;
|
|
253
|
+
if (queryToken && kv && typeof kv.put === "function" && !isPreviewOperatorSurfacePath(renderPath)) {
|
|
254
|
+
await recordPreviewShareOpen(
|
|
255
|
+
kv,
|
|
256
|
+
tenantRecord.tenant_id,
|
|
257
|
+
queryToken,
|
|
258
|
+
request.headers.get("user-agent"),
|
|
259
|
+
);
|
|
260
|
+
}
|
|
238
261
|
// The cookie itself, when the context verified: the revision cookie below checks
|
|
239
262
|
// its own binding against it.
|
|
240
263
|
const cookieToken = verifiedPreview ? preview.cookieValue : null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tokenoftrust/storefront-runner",
|
|
3
|
-
"version": "7.2.
|
|
3
|
+
"version": "7.2.6",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE",
|
|
5
5
|
"description": "World-shareable storefront runner: multi-tenant renderer on Astro/Cloudflare. No control plane.",
|
|
6
6
|
"packageManager": "pnpm@11.9.0",
|
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The
|
|
3
|
-
*
|
|
2
|
+
* The preview cue. Mounts one quiet edge tab in its own isolated surface. Activating the tab expands
|
|
3
|
+
* it to a strip with "Give feedback" and "Hide"; "Hide" collapses it to a smaller nub for the browser
|
|
4
|
+
* session. `mount` and `unmount` are idempotent and never leave a stray element behind.
|
|
4
5
|
*/
|
|
5
6
|
import { isSurfacePermitted, type HostAdapter } from "./hostAdapter.js";
|
|
6
7
|
import { createSurface, h } from "./surface.js";
|
|
7
8
|
|
|
9
|
+
export const LAUNCHER_HIDDEN_KEY = "tot-preview-launcher-hidden";
|
|
10
|
+
|
|
8
11
|
export interface LauncherOptions {
|
|
9
12
|
win: Window;
|
|
10
13
|
doc: Document;
|
|
11
14
|
adapter?: HostAdapter;
|
|
12
15
|
label?: string;
|
|
13
16
|
ariaLabel?: string;
|
|
14
|
-
/** Called when
|
|
17
|
+
/** Called when "Give feedback" is activated (click, Enter or Space). */
|
|
15
18
|
onActivate(): void;
|
|
16
19
|
}
|
|
17
20
|
|
|
@@ -20,62 +23,178 @@ export interface Launcher {
|
|
|
20
23
|
mount(): boolean;
|
|
21
24
|
unmount(): void;
|
|
22
25
|
readonly isMounted: boolean;
|
|
23
|
-
/** The
|
|
26
|
+
/** The always-present edge tab (or nub); the focus anchor. Activating it toggles the strip. */
|
|
24
27
|
readonly button: HTMLButtonElement;
|
|
28
|
+
/** "Give feedback" inside the expanded strip. */
|
|
29
|
+
readonly actionButton: HTMLButtonElement;
|
|
30
|
+
/** "Hide" inside the expanded strip. */
|
|
31
|
+
readonly hideButton: HTMLButtonElement;
|
|
25
32
|
/** The element placed in the page. */
|
|
26
33
|
readonly host: HTMLElement;
|
|
27
34
|
setLabel(label: string): void;
|
|
28
|
-
/** Reflect whether the dialog it controls is open (`aria-expanded`). */
|
|
35
|
+
/** Reflect whether the dialog it controls is open (`aria-expanded` on the action). */
|
|
29
36
|
setExpanded(expanded: boolean): void;
|
|
30
37
|
/** Show or hide a small attention dot. */
|
|
31
38
|
setBadge(on: boolean): void;
|
|
39
|
+
/** Hide the whole cue (while the page is being picked, say). */
|
|
40
|
+
setSuppressed(suppressed: boolean): void;
|
|
41
|
+
readonly isStripOpen: boolean;
|
|
42
|
+
readonly isNub: boolean;
|
|
43
|
+
openStrip(): void;
|
|
44
|
+
closeStrip(): void;
|
|
32
45
|
focus(): void;
|
|
33
46
|
}
|
|
34
47
|
|
|
48
|
+
function readHidden(win: Window): boolean {
|
|
49
|
+
try {
|
|
50
|
+
return win.sessionStorage.getItem(LAUNCHER_HIDDEN_KEY) === "1";
|
|
51
|
+
} catch {
|
|
52
|
+
return false;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
function writeHidden(win: Window, hidden: boolean): boolean {
|
|
57
|
+
try {
|
|
58
|
+
if (hidden) win.sessionStorage.setItem(LAUNCHER_HIDDEN_KEY, "1");
|
|
59
|
+
else win.sessionStorage.removeItem(LAUNCHER_HIDDEN_KEY);
|
|
60
|
+
return true;
|
|
61
|
+
} catch {
|
|
62
|
+
return false;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
35
66
|
export function createLauncher(options: LauncherOptions): Launcher {
|
|
36
67
|
const { win, doc, adapter } = options;
|
|
37
68
|
const surface = createSurface({ win, doc, adapter, tag: "feedback-launcher" });
|
|
69
|
+
const baseLabel = options.label ?? "ToT preview";
|
|
70
|
+
const detail = options.ariaLabel ?? "Token of Trust preview — feedback options";
|
|
71
|
+
let label = baseLabel;
|
|
72
|
+
let stripOpen = false;
|
|
73
|
+
let nub = readHidden(win);
|
|
74
|
+
let suppressed = false;
|
|
75
|
+
|
|
76
|
+
const wrap = h(doc, "div", { class: "cue" });
|
|
38
77
|
const button = h(doc, "button", {
|
|
39
78
|
class: "fab",
|
|
40
79
|
type: "button",
|
|
41
|
-
"aria-haspopup": "
|
|
80
|
+
"aria-haspopup": "true",
|
|
42
81
|
"aria-expanded": "false",
|
|
43
|
-
...(options.ariaLabel ? { "aria-label": options.ariaLabel } : {}),
|
|
44
82
|
});
|
|
45
|
-
const labelEl = h(doc, "span", {
|
|
83
|
+
const labelEl = h(doc, "span", { class: "tab-label", text: baseLabel });
|
|
46
84
|
const dot = h(doc, "span", { class: "dot", "aria-hidden": "true", hidden: true });
|
|
47
85
|
button.append(labelEl, dot);
|
|
48
|
-
|
|
86
|
+
|
|
87
|
+
const strip = h(doc, "div", { class: "strip", role: "group", "aria-label": "Token of Trust preview", hidden: true });
|
|
88
|
+
const title = h(doc, "span", { class: "strip-title", text: "Token of Trust preview" });
|
|
89
|
+
const actionButton = h(doc, "button", { class: "strip-act", type: "button", "aria-haspopup": "dialog", "aria-expanded": "false", text: "Give feedback" });
|
|
90
|
+
const hideButton = h(doc, "button", { class: "strip-hide", type: "button", text: "Hide" });
|
|
91
|
+
strip.append(title, actionButton, hideButton);
|
|
92
|
+
wrap.append(button, strip);
|
|
93
|
+
surface.root.append(wrap);
|
|
94
|
+
|
|
95
|
+
function render() {
|
|
96
|
+
wrap.hidden = suppressed;
|
|
97
|
+
wrap.dataset.nub = String(nub && !stripOpen);
|
|
98
|
+
strip.hidden = !stripOpen;
|
|
99
|
+
button.hidden = stripOpen;
|
|
100
|
+
button.setAttribute("aria-expanded", String(stripOpen));
|
|
101
|
+
const name = nub && !stripOpen ? `Show ${detail}` : `${label} — ${detail}`;
|
|
102
|
+
button.setAttribute("aria-label", name);
|
|
103
|
+
labelEl.hidden = nub && !stripOpen;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
function openStrip() {
|
|
107
|
+
stripOpen = true;
|
|
108
|
+
render();
|
|
109
|
+
actionButton.focus();
|
|
110
|
+
}
|
|
111
|
+
function closeStrip(restoreFocus = true) {
|
|
112
|
+
if (!stripOpen) return;
|
|
113
|
+
stripOpen = false;
|
|
114
|
+
render();
|
|
115
|
+
if (restoreFocus) button.focus();
|
|
116
|
+
}
|
|
117
|
+
|
|
49
118
|
button.addEventListener("click", (e) => {
|
|
50
119
|
e.preventDefault();
|
|
120
|
+
if (stripOpen) closeStrip();
|
|
121
|
+
else openStrip();
|
|
122
|
+
});
|
|
123
|
+
actionButton.addEventListener("click", (e) => {
|
|
124
|
+
e.preventDefault();
|
|
125
|
+
closeStrip(false);
|
|
51
126
|
options.onActivate();
|
|
52
127
|
});
|
|
128
|
+
hideButton.addEventListener("click", (e) => {
|
|
129
|
+
e.preventDefault();
|
|
130
|
+
nub = writeHidden(win, true);
|
|
131
|
+
closeStrip();
|
|
132
|
+
});
|
|
133
|
+
// A nub restores to the full tab when tapped; the tap on a nub also opens the strip.
|
|
134
|
+
button.addEventListener("click", () => {
|
|
135
|
+
if (nub && stripOpen) {
|
|
136
|
+
nub = false;
|
|
137
|
+
writeHidden(win, false);
|
|
138
|
+
render();
|
|
139
|
+
}
|
|
140
|
+
});
|
|
141
|
+
const onKey = (e: Event) => {
|
|
142
|
+
if ((e as KeyboardEvent).key === "Escape" && stripOpen) {
|
|
143
|
+
e.stopPropagation();
|
|
144
|
+
closeStrip();
|
|
145
|
+
}
|
|
146
|
+
};
|
|
147
|
+
surface.root.addEventListener("keydown", onKey);
|
|
148
|
+
const onOutside = (e: Event) => {
|
|
149
|
+
if (stripOpen && !e.composedPath().includes(surface.host)) closeStrip(false);
|
|
150
|
+
};
|
|
151
|
+
render();
|
|
53
152
|
|
|
54
153
|
return {
|
|
55
154
|
mount() {
|
|
56
155
|
if (!isSurfacePermitted(adapter, "launcher")) return false;
|
|
57
156
|
surface.attach();
|
|
157
|
+
doc.addEventListener("pointerdown", onOutside, true);
|
|
58
158
|
return true;
|
|
59
159
|
},
|
|
60
160
|
unmount() {
|
|
161
|
+
doc.removeEventListener("pointerdown", onOutside, true);
|
|
61
162
|
surface.detach();
|
|
62
163
|
},
|
|
63
164
|
get isMounted() {
|
|
64
165
|
return surface.isAttached;
|
|
65
166
|
},
|
|
66
167
|
button,
|
|
168
|
+
actionButton,
|
|
169
|
+
hideButton,
|
|
67
170
|
host: surface.host,
|
|
68
|
-
setLabel(
|
|
69
|
-
|
|
171
|
+
setLabel(next) {
|
|
172
|
+
label = next;
|
|
173
|
+
labelEl.textContent = next;
|
|
174
|
+
render();
|
|
70
175
|
},
|
|
71
176
|
setExpanded(expanded) {
|
|
72
|
-
|
|
177
|
+
actionButton.setAttribute("aria-expanded", String(expanded));
|
|
73
178
|
},
|
|
74
179
|
setBadge(on) {
|
|
75
180
|
dot.hidden = !on;
|
|
76
181
|
},
|
|
182
|
+
setSuppressed(next) {
|
|
183
|
+
suppressed = next;
|
|
184
|
+
if (next) stripOpen = false;
|
|
185
|
+
render();
|
|
186
|
+
},
|
|
187
|
+
get isStripOpen() {
|
|
188
|
+
return stripOpen;
|
|
189
|
+
},
|
|
190
|
+
get isNub() {
|
|
191
|
+
return nub && !stripOpen;
|
|
192
|
+
},
|
|
193
|
+
openStrip,
|
|
194
|
+
closeStrip: () => closeStrip(),
|
|
77
195
|
focus() {
|
|
78
|
-
|
|
196
|
+
if (stripOpen) actionButton.focus();
|
|
197
|
+
else button.focus();
|
|
79
198
|
},
|
|
80
199
|
};
|
|
81
200
|
}
|
|
@@ -15,14 +15,27 @@ button.primary { background: var(--fb-acc); border-color: var(--fb-acc); color:
|
|
|
15
15
|
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
|
|
16
16
|
outline: 3px solid var(--fb-acc); outline-offset: 2px; }
|
|
17
17
|
button[disabled] { opacity: .55; cursor: not-allowed; }
|
|
18
|
-
.
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
.cue { position: fixed; right: 12px; bottom: 0; z-index: var(--fb-z); pointer-events: auto; display: flex; align-items: flex-end; }
|
|
19
|
+
.fab { background: #f3f4f6; color: #4b5563; border: 1px solid #d1d5db; border-bottom: 0; border-radius: 8px 8px 0 0; padding: 0 10px;
|
|
20
|
+
min-height: 22px; height: 22px; font-size: 11px; line-height: 20px; font-weight: 500; opacity: .6; box-shadow: none; position: relative;
|
|
21
|
+
transition: opacity .15s; }
|
|
22
|
+
.fab:hover, .fab:focus-visible { opacity: 1; color: #111827; }
|
|
23
|
+
.fab .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #d97706; margin-left: 6px; vertical-align: middle; }
|
|
24
|
+
.cue[data-nub="true"] .fab { padding: 0; width: 28px; min-height: 8px; height: 8px; border-radius: 6px 6px 0 0; }
|
|
25
|
+
.cue[data-nub="true"] .fab .dot { position: absolute; top: -3px; right: -3px; margin: 0; }
|
|
26
|
+
.strip { display: flex; align-items: center; gap: 4px 8px; background: #111827; color: #f9fafb; border-radius: 10px 10px 0 0; padding: 4px 10px;
|
|
27
|
+
font-size: 13px; line-height: 20px; max-width: calc(100vw - 24px); }
|
|
28
|
+
.strip button { min-height: 28px; padding: 2px 10px; font-size: 13px; border-radius: 6px; }
|
|
29
|
+
.strip .strip-act { background: #4f46e5; border-color: #4f46e5; color: #fff; font-weight: 600; }
|
|
30
|
+
.strip .strip-hide { background: transparent; border-color: #6b7280; color: #e5e7eb; }
|
|
31
|
+
.strip button:focus-visible { outline: 3px solid #fbbf24; outline-offset: 2px; }
|
|
32
|
+
.fab:focus-visible { outline-offset: 0; }
|
|
22
33
|
.dialog { position: fixed; right: 16px; top: 16px; z-index: calc(var(--fb-z) + 1); pointer-events: auto; width: 360px;
|
|
23
34
|
max-width: calc(100vw - 16px); max-height: calc(100vh - 16px); overflow: auto; background: var(--fb-bg);
|
|
24
35
|
border: 1px solid var(--fb-line); border-radius: 12px; box-shadow: 0 16px 40px rgba(17,24,39,.28); }
|
|
25
36
|
@media (max-width: 600px) {
|
|
37
|
+
.strip { flex-wrap: wrap; }
|
|
38
|
+
.strip-title { flex-basis: 100%; font-size: 12px; line-height: 16px; }
|
|
26
39
|
.dialog { left: 0; right: 0; top: auto; bottom: 0; width: 100%; max-width: 100%; max-height: 85vh; border-radius: 14px 14px 0 0; }
|
|
27
40
|
}
|
|
28
41
|
.titlebar { display: flex; align-items: center; gap: 4px; padding: 8px 10px; border-bottom: 1px solid var(--fb-line); }
|
|
@@ -65,13 +65,13 @@
|
|
|
65
65
|
.tour-launcher {
|
|
66
66
|
position: fixed;
|
|
67
67
|
right: 16px;
|
|
68
|
-
bottom: 16px;
|
|
68
|
+
bottom: calc(16px + var(--tot-preview-edge-clearance, 0px));
|
|
69
69
|
display: flex;
|
|
70
70
|
flex-direction: column;
|
|
71
71
|
align-items: flex-end;
|
|
72
72
|
gap: 8px;
|
|
73
73
|
max-width: calc(100vw - 32px);
|
|
74
|
-
max-height: calc(100vh - 32px);
|
|
74
|
+
max-height: calc(100vh - 32px - var(--tot-preview-edge-clearance, 0px));
|
|
75
75
|
overflow: auto;
|
|
76
76
|
pointer-events: auto;
|
|
77
77
|
}
|