-
-
Notifications
You must be signed in to change notification settings - Fork 38
Expand file tree
/
Copy pathattachments.ts
More file actions
28 lines (26 loc) · 933 Bytes
/
Copy pathattachments.ts
File metadata and controls
28 lines (26 loc) · 933 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// ── Attachment types ──
export interface ImageAttachment {
id: string;
data: string;
mediaType: "image/png" | "image/jpeg" | "image/gif" | "image/webp";
fileName?: string;
}
/** Element data captured by the browser inspector (Element Grab feature). */
export interface GrabbedElement {
id: string;
/** Page URL where the element was captured */
url: string;
tag: string;
/** Best-effort unique CSS selector path */
selector: string;
classes: string[];
/** Whitelisted attributes (id, href, src, alt, role, aria-label, data-testid, etc.) */
attributes: Record<string, string>;
/** innerText truncated to 500 chars */
textContent: string;
/** outerHTML truncated to 2000 chars */
outerHTML: string;
/** Key computed styles (display, position, color, font-size, etc.) */
computedStyles: Record<string, string>;
boundingRect: { x: number; y: number; width: number; height: number };
}