@merittdev/horus-lens 0.1.1 → 0.2.1
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/browser.cjs +1262 -195
- package/dist/browser.cjs.map +1 -1
- package/dist/browser.d.cts +2 -2
- package/dist/browser.d.ts +2 -2
- package/dist/browser.js +2 -2
- package/dist/{chunk-CRV65EEY.js → chunk-SDMTZ5Y6.js} +1016 -167
- package/dist/chunk-SDMTZ5Y6.js.map +1 -0
- package/dist/{chunk-UB7YYHI4.js → chunk-U6GBOUCE.js} +246 -28
- package/dist/chunk-U6GBOUCE.js.map +1 -0
- package/dist/index.cjs +245 -27
- package/dist/index.cjs.map +1 -1
- package/dist/{index.d-DeLYS02n.d.ts → index.d-BtnbCqUx.d.ts} +26 -1
- package/dist/index.d-Cyvb07sp.d.cts +301 -0
- package/dist/index.d-Cyvb07sp.d.ts +301 -0
- package/dist/{index.d-sNoEEgRg.d.cts → index.d-QzZn4EMM.d.cts} +26 -1
- package/dist/index.d.cts +343 -38
- package/dist/index.d.ts +343 -38
- package/dist/index.js +1 -1
- package/dist/lens.min.js +163 -43
- package/dist/lens.min.js.map +1 -1
- package/dist/react.cjs +1262 -195
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.cts +2 -2
- package/dist/react.d.ts +2 -2
- package/dist/react.js +2 -2
- package/package.json +4 -3
- package/dist/chunk-CRV65EEY.js.map +0 -1
- package/dist/chunk-UB7YYHI4.js.map +0 -1
- package/dist/index.d-Bzgtl7-B.d.cts +0 -161
- package/dist/index.d-Bzgtl7-B.d.ts +0 -161
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as AppContext, R as ReportMetadata, T as TargetElement, a as Annotation } from './index.d-
|
|
1
|
+
import { A as AppContext, R as ReportMetadata, T as TargetElement, a as Annotation } from './index.d-Cyvb07sp.js';
|
|
2
2
|
|
|
3
3
|
/** A sub-region to crop to, in DOCUMENT CSS pixels (same units as the DOM). */
|
|
4
4
|
interface ScreenshotCrop {
|
|
@@ -7,6 +7,25 @@ interface ScreenshotCrop {
|
|
|
7
7
|
width: number;
|
|
8
8
|
height: number;
|
|
9
9
|
}
|
|
10
|
+
/**
|
|
11
|
+
* A baked-in annotation composite produced by the overlay's `AnnotationEditor`.
|
|
12
|
+
* `svgMarkup` is a complete standalone SVG of every NON-blur mark (viewBox
|
|
13
|
+
* `0 0 docWidth docHeight`, document CSS px); `blurRegions` are the redaction
|
|
14
|
+
* rectangles to blur/fill on the underlying raster (kept OUT of the SVG so they
|
|
15
|
+
* describe pixels to destroy, not vectors to draw). All coords are DOCUMENT CSS
|
|
16
|
+
* pixels and are scaled by the SAME factor used to rasterize the page.
|
|
17
|
+
*/
|
|
18
|
+
interface AnnotationComposite {
|
|
19
|
+
svgMarkup: string;
|
|
20
|
+
docWidth: number;
|
|
21
|
+
docHeight: number;
|
|
22
|
+
blurRegions: Array<{
|
|
23
|
+
x: number;
|
|
24
|
+
y: number;
|
|
25
|
+
width: number;
|
|
26
|
+
height: number;
|
|
27
|
+
}>;
|
|
28
|
+
}
|
|
10
29
|
|
|
11
30
|
interface LensConfig {
|
|
12
31
|
accessId: string;
|
|
@@ -51,6 +70,12 @@ interface SubmitReportInput {
|
|
|
51
70
|
* bounding box of marked areas). Omit for a full-page capture.
|
|
52
71
|
*/
|
|
53
72
|
screenshotCrop?: ScreenshotCrop;
|
|
73
|
+
/**
|
|
74
|
+
* Annotations baked into the screenshot raster before crop: a blur pre-pass
|
|
75
|
+
* redacts `blurRegions`, then the mark SVG is rasterized on top. Omit for an
|
|
76
|
+
* un-annotated capture. Produced by the overlay's annotation editor.
|
|
77
|
+
*/
|
|
78
|
+
annotationComposite?: AnnotationComposite;
|
|
54
79
|
/** Selective data opt-outs; each flag defaults to `true`. */
|
|
55
80
|
include?: SubmitReportIncludes;
|
|
56
81
|
}
|
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
declare const AppContextSchema: z.ZodObject<{
|
|
4
|
+
release: z.ZodOptional<z.ZodString>;
|
|
5
|
+
gitSha: z.ZodOptional<z.ZodString>;
|
|
6
|
+
environment: z.ZodOptional<z.ZodString>;
|
|
7
|
+
featureFlags: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodBoolean, z.ZodNumber]>>>;
|
|
8
|
+
user: z.ZodOptional<z.ZodObject<{
|
|
9
|
+
id: z.ZodOptional<z.ZodString>;
|
|
10
|
+
email: z.ZodOptional<z.ZodString>;
|
|
11
|
+
name: z.ZodOptional<z.ZodString>;
|
|
12
|
+
organization: z.ZodOptional<z.ZodString>;
|
|
13
|
+
}, z.core.$strip>>;
|
|
14
|
+
extra: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
15
|
+
}, z.core.$strip>;
|
|
16
|
+
type AppContext = z.infer<typeof AppContextSchema>;
|
|
17
|
+
/** DOM path + React fiber path of the element the reporter targeted. */
|
|
18
|
+
declare const TargetElementSchema: z.ZodObject<{
|
|
19
|
+
domPath: z.ZodOptional<z.ZodString>;
|
|
20
|
+
tagName: z.ZodOptional<z.ZodString>;
|
|
21
|
+
text: z.ZodOptional<z.ZodString>;
|
|
22
|
+
boundingRect: z.ZodOptional<z.ZodObject<{
|
|
23
|
+
x: z.ZodNumber;
|
|
24
|
+
y: z.ZodNumber;
|
|
25
|
+
width: z.ZodNumber;
|
|
26
|
+
height: z.ZodNumber;
|
|
27
|
+
}, z.core.$strip>>;
|
|
28
|
+
reactComponents: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
29
|
+
}, z.core.$strip>;
|
|
30
|
+
type TargetElement = z.infer<typeof TargetElementSchema>;
|
|
31
|
+
declare const AnnotationSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
32
|
+
kind: z.ZodLiteral<"rect">;
|
|
33
|
+
x: z.ZodNumber;
|
|
34
|
+
y: z.ZodNumber;
|
|
35
|
+
width: z.ZodNumber;
|
|
36
|
+
height: z.ZodNumber;
|
|
37
|
+
viewport: z.ZodOptional<z.ZodObject<{
|
|
38
|
+
width: z.ZodNumber;
|
|
39
|
+
height: z.ZodNumber;
|
|
40
|
+
}, z.core.$strip>>;
|
|
41
|
+
id: z.ZodOptional<z.ZodString>;
|
|
42
|
+
color: z.ZodOptional<z.ZodString>;
|
|
43
|
+
strokeWidth: z.ZodOptional<z.ZodNumber>;
|
|
44
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
45
|
+
kind: z.ZodLiteral<"ellipse">;
|
|
46
|
+
x: z.ZodNumber;
|
|
47
|
+
y: z.ZodNumber;
|
|
48
|
+
width: z.ZodNumber;
|
|
49
|
+
height: z.ZodNumber;
|
|
50
|
+
id: z.ZodOptional<z.ZodString>;
|
|
51
|
+
color: z.ZodOptional<z.ZodString>;
|
|
52
|
+
strokeWidth: z.ZodOptional<z.ZodNumber>;
|
|
53
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
54
|
+
kind: z.ZodLiteral<"blur">;
|
|
55
|
+
x: z.ZodNumber;
|
|
56
|
+
y: z.ZodNumber;
|
|
57
|
+
width: z.ZodNumber;
|
|
58
|
+
height: z.ZodNumber;
|
|
59
|
+
id: z.ZodOptional<z.ZodString>;
|
|
60
|
+
color: z.ZodOptional<z.ZodString>;
|
|
61
|
+
strokeWidth: z.ZodOptional<z.ZodNumber>;
|
|
62
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
63
|
+
kind: z.ZodLiteral<"arrow">;
|
|
64
|
+
x1: z.ZodNumber;
|
|
65
|
+
y1: z.ZodNumber;
|
|
66
|
+
x2: z.ZodNumber;
|
|
67
|
+
y2: z.ZodNumber;
|
|
68
|
+
id: z.ZodOptional<z.ZodString>;
|
|
69
|
+
color: z.ZodOptional<z.ZodString>;
|
|
70
|
+
strokeWidth: z.ZodOptional<z.ZodNumber>;
|
|
71
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
72
|
+
kind: z.ZodLiteral<"line">;
|
|
73
|
+
x1: z.ZodNumber;
|
|
74
|
+
y1: z.ZodNumber;
|
|
75
|
+
x2: z.ZodNumber;
|
|
76
|
+
y2: z.ZodNumber;
|
|
77
|
+
id: z.ZodOptional<z.ZodString>;
|
|
78
|
+
color: z.ZodOptional<z.ZodString>;
|
|
79
|
+
strokeWidth: z.ZodOptional<z.ZodNumber>;
|
|
80
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
81
|
+
kind: z.ZodLiteral<"pencil">;
|
|
82
|
+
points: z.ZodArray<z.ZodObject<{
|
|
83
|
+
x: z.ZodNumber;
|
|
84
|
+
y: z.ZodNumber;
|
|
85
|
+
}, z.core.$strip>>;
|
|
86
|
+
id: z.ZodOptional<z.ZodString>;
|
|
87
|
+
color: z.ZodOptional<z.ZodString>;
|
|
88
|
+
strokeWidth: z.ZodOptional<z.ZodNumber>;
|
|
89
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
90
|
+
kind: z.ZodLiteral<"highlighter">;
|
|
91
|
+
points: z.ZodArray<z.ZodObject<{
|
|
92
|
+
x: z.ZodNumber;
|
|
93
|
+
y: z.ZodNumber;
|
|
94
|
+
}, z.core.$strip>>;
|
|
95
|
+
id: z.ZodOptional<z.ZodString>;
|
|
96
|
+
color: z.ZodOptional<z.ZodString>;
|
|
97
|
+
strokeWidth: z.ZodOptional<z.ZodNumber>;
|
|
98
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
99
|
+
kind: z.ZodLiteral<"text">;
|
|
100
|
+
x: z.ZodNumber;
|
|
101
|
+
y: z.ZodNumber;
|
|
102
|
+
text: z.ZodString;
|
|
103
|
+
fontSize: z.ZodOptional<z.ZodNumber>;
|
|
104
|
+
id: z.ZodOptional<z.ZodString>;
|
|
105
|
+
color: z.ZodOptional<z.ZodString>;
|
|
106
|
+
strokeWidth: z.ZodOptional<z.ZodNumber>;
|
|
107
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
108
|
+
kind: z.ZodLiteral<"step">;
|
|
109
|
+
x: z.ZodNumber;
|
|
110
|
+
y: z.ZodNumber;
|
|
111
|
+
n: z.ZodNumber;
|
|
112
|
+
id: z.ZodOptional<z.ZodString>;
|
|
113
|
+
color: z.ZodOptional<z.ZodString>;
|
|
114
|
+
strokeWidth: z.ZodOptional<z.ZodNumber>;
|
|
115
|
+
}, z.core.$strip>], "kind">;
|
|
116
|
+
type Annotation = z.infer<typeof AnnotationSchema>;
|
|
117
|
+
declare const ReportMetadataSchema: z.ZodObject<{
|
|
118
|
+
comment: z.ZodOptional<z.ZodString>;
|
|
119
|
+
annotations: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
120
|
+
kind: z.ZodLiteral<"rect">;
|
|
121
|
+
x: z.ZodNumber;
|
|
122
|
+
y: z.ZodNumber;
|
|
123
|
+
width: z.ZodNumber;
|
|
124
|
+
height: z.ZodNumber;
|
|
125
|
+
viewport: z.ZodOptional<z.ZodObject<{
|
|
126
|
+
width: z.ZodNumber;
|
|
127
|
+
height: z.ZodNumber;
|
|
128
|
+
}, z.core.$strip>>;
|
|
129
|
+
id: z.ZodOptional<z.ZodString>;
|
|
130
|
+
color: z.ZodOptional<z.ZodString>;
|
|
131
|
+
strokeWidth: z.ZodOptional<z.ZodNumber>;
|
|
132
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
133
|
+
kind: z.ZodLiteral<"ellipse">;
|
|
134
|
+
x: z.ZodNumber;
|
|
135
|
+
y: z.ZodNumber;
|
|
136
|
+
width: z.ZodNumber;
|
|
137
|
+
height: z.ZodNumber;
|
|
138
|
+
id: z.ZodOptional<z.ZodString>;
|
|
139
|
+
color: z.ZodOptional<z.ZodString>;
|
|
140
|
+
strokeWidth: z.ZodOptional<z.ZodNumber>;
|
|
141
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
142
|
+
kind: z.ZodLiteral<"blur">;
|
|
143
|
+
x: z.ZodNumber;
|
|
144
|
+
y: z.ZodNumber;
|
|
145
|
+
width: z.ZodNumber;
|
|
146
|
+
height: z.ZodNumber;
|
|
147
|
+
id: z.ZodOptional<z.ZodString>;
|
|
148
|
+
color: z.ZodOptional<z.ZodString>;
|
|
149
|
+
strokeWidth: z.ZodOptional<z.ZodNumber>;
|
|
150
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
151
|
+
kind: z.ZodLiteral<"arrow">;
|
|
152
|
+
x1: z.ZodNumber;
|
|
153
|
+
y1: z.ZodNumber;
|
|
154
|
+
x2: z.ZodNumber;
|
|
155
|
+
y2: z.ZodNumber;
|
|
156
|
+
id: z.ZodOptional<z.ZodString>;
|
|
157
|
+
color: z.ZodOptional<z.ZodString>;
|
|
158
|
+
strokeWidth: z.ZodOptional<z.ZodNumber>;
|
|
159
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
160
|
+
kind: z.ZodLiteral<"line">;
|
|
161
|
+
x1: z.ZodNumber;
|
|
162
|
+
y1: z.ZodNumber;
|
|
163
|
+
x2: z.ZodNumber;
|
|
164
|
+
y2: z.ZodNumber;
|
|
165
|
+
id: z.ZodOptional<z.ZodString>;
|
|
166
|
+
color: z.ZodOptional<z.ZodString>;
|
|
167
|
+
strokeWidth: z.ZodOptional<z.ZodNumber>;
|
|
168
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
169
|
+
kind: z.ZodLiteral<"pencil">;
|
|
170
|
+
points: z.ZodArray<z.ZodObject<{
|
|
171
|
+
x: z.ZodNumber;
|
|
172
|
+
y: z.ZodNumber;
|
|
173
|
+
}, z.core.$strip>>;
|
|
174
|
+
id: z.ZodOptional<z.ZodString>;
|
|
175
|
+
color: z.ZodOptional<z.ZodString>;
|
|
176
|
+
strokeWidth: z.ZodOptional<z.ZodNumber>;
|
|
177
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
178
|
+
kind: z.ZodLiteral<"highlighter">;
|
|
179
|
+
points: z.ZodArray<z.ZodObject<{
|
|
180
|
+
x: z.ZodNumber;
|
|
181
|
+
y: z.ZodNumber;
|
|
182
|
+
}, z.core.$strip>>;
|
|
183
|
+
id: z.ZodOptional<z.ZodString>;
|
|
184
|
+
color: z.ZodOptional<z.ZodString>;
|
|
185
|
+
strokeWidth: z.ZodOptional<z.ZodNumber>;
|
|
186
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
187
|
+
kind: z.ZodLiteral<"text">;
|
|
188
|
+
x: z.ZodNumber;
|
|
189
|
+
y: z.ZodNumber;
|
|
190
|
+
text: z.ZodString;
|
|
191
|
+
fontSize: z.ZodOptional<z.ZodNumber>;
|
|
192
|
+
id: z.ZodOptional<z.ZodString>;
|
|
193
|
+
color: z.ZodOptional<z.ZodString>;
|
|
194
|
+
strokeWidth: z.ZodOptional<z.ZodNumber>;
|
|
195
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
196
|
+
kind: z.ZodLiteral<"step">;
|
|
197
|
+
x: z.ZodNumber;
|
|
198
|
+
y: z.ZodNumber;
|
|
199
|
+
n: z.ZodNumber;
|
|
200
|
+
id: z.ZodOptional<z.ZodString>;
|
|
201
|
+
color: z.ZodOptional<z.ZodString>;
|
|
202
|
+
strokeWidth: z.ZodOptional<z.ZodNumber>;
|
|
203
|
+
}, z.core.$strip>], "kind">>>;
|
|
204
|
+
target: z.ZodOptional<z.ZodObject<{
|
|
205
|
+
domPath: z.ZodOptional<z.ZodString>;
|
|
206
|
+
tagName: z.ZodOptional<z.ZodString>;
|
|
207
|
+
text: z.ZodOptional<z.ZodString>;
|
|
208
|
+
boundingRect: z.ZodOptional<z.ZodObject<{
|
|
209
|
+
x: z.ZodNumber;
|
|
210
|
+
y: z.ZodNumber;
|
|
211
|
+
width: z.ZodNumber;
|
|
212
|
+
height: z.ZodNumber;
|
|
213
|
+
}, z.core.$strip>>;
|
|
214
|
+
reactComponents: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
215
|
+
}, z.core.$strip>>;
|
|
216
|
+
env: z.ZodObject<{
|
|
217
|
+
url: z.ZodString;
|
|
218
|
+
route: z.ZodOptional<z.ZodString>;
|
|
219
|
+
referrer: z.ZodOptional<z.ZodString>;
|
|
220
|
+
userAgent: z.ZodString;
|
|
221
|
+
browser: z.ZodOptional<z.ZodString>;
|
|
222
|
+
os: z.ZodOptional<z.ZodString>;
|
|
223
|
+
device: z.ZodOptional<z.ZodEnum<{
|
|
224
|
+
desktop: "desktop";
|
|
225
|
+
tablet: "tablet";
|
|
226
|
+
mobile: "mobile";
|
|
227
|
+
}>>;
|
|
228
|
+
viewport: z.ZodObject<{
|
|
229
|
+
width: z.ZodNumber;
|
|
230
|
+
height: z.ZodNumber;
|
|
231
|
+
}, z.core.$strip>;
|
|
232
|
+
screen: z.ZodObject<{
|
|
233
|
+
width: z.ZodNumber;
|
|
234
|
+
height: z.ZodNumber;
|
|
235
|
+
}, z.core.$strip>;
|
|
236
|
+
devicePixelRatio: z.ZodNumber;
|
|
237
|
+
language: z.ZodString;
|
|
238
|
+
timezone: z.ZodString;
|
|
239
|
+
theme: z.ZodOptional<z.ZodEnum<{
|
|
240
|
+
light: "light";
|
|
241
|
+
dark: "dark";
|
|
242
|
+
}>>;
|
|
243
|
+
online: z.ZodOptional<z.ZodBoolean>;
|
|
244
|
+
capturedAt: z.ZodNumber;
|
|
245
|
+
}, z.core.$strip>;
|
|
246
|
+
app: z.ZodOptional<z.ZodObject<{
|
|
247
|
+
release: z.ZodOptional<z.ZodString>;
|
|
248
|
+
gitSha: z.ZodOptional<z.ZodString>;
|
|
249
|
+
environment: z.ZodOptional<z.ZodString>;
|
|
250
|
+
featureFlags: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodBoolean, z.ZodNumber]>>>;
|
|
251
|
+
user: z.ZodOptional<z.ZodObject<{
|
|
252
|
+
id: z.ZodOptional<z.ZodString>;
|
|
253
|
+
email: z.ZodOptional<z.ZodString>;
|
|
254
|
+
name: z.ZodOptional<z.ZodString>;
|
|
255
|
+
organization: z.ZodOptional<z.ZodString>;
|
|
256
|
+
}, z.core.$strip>>;
|
|
257
|
+
extra: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
258
|
+
}, z.core.$strip>>;
|
|
259
|
+
errors: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
260
|
+
message: z.ZodString;
|
|
261
|
+
stack: z.ZodOptional<z.ZodString>;
|
|
262
|
+
source: z.ZodEnum<{
|
|
263
|
+
"window.onerror": "window.onerror";
|
|
264
|
+
unhandledrejection: "unhandledrejection";
|
|
265
|
+
"console.error": "console.error";
|
|
266
|
+
"react-boundary": "react-boundary";
|
|
267
|
+
}>;
|
|
268
|
+
timestamp: z.ZodNumber;
|
|
269
|
+
}, z.core.$strip>>>;
|
|
270
|
+
consoleTail: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
271
|
+
level: z.ZodEnum<{
|
|
272
|
+
log: "log";
|
|
273
|
+
info: "info";
|
|
274
|
+
warn: "warn";
|
|
275
|
+
error: "error";
|
|
276
|
+
debug: "debug";
|
|
277
|
+
}>;
|
|
278
|
+
args: z.ZodArray<z.ZodString>;
|
|
279
|
+
timestamp: z.ZodNumber;
|
|
280
|
+
}, z.core.$strip>>>;
|
|
281
|
+
networkTail: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
282
|
+
method: z.ZodString;
|
|
283
|
+
url: z.ZodString;
|
|
284
|
+
status: z.ZodNullable<z.ZodNumber>;
|
|
285
|
+
ok: z.ZodNullable<z.ZodBoolean>;
|
|
286
|
+
durationMs: z.ZodNullable<z.ZodNumber>;
|
|
287
|
+
requestType: z.ZodEnum<{
|
|
288
|
+
fetch: "fetch";
|
|
289
|
+
xhr: "xhr";
|
|
290
|
+
}>;
|
|
291
|
+
startedAt: z.ZodNumber;
|
|
292
|
+
error: z.ZodOptional<z.ZodString>;
|
|
293
|
+
}, z.core.$strip>>>;
|
|
294
|
+
sdk: z.ZodObject<{
|
|
295
|
+
name: z.ZodString;
|
|
296
|
+
version: z.ZodString;
|
|
297
|
+
}, z.core.$strip>;
|
|
298
|
+
}, z.core.$strip>;
|
|
299
|
+
type ReportMetadata = z.infer<typeof ReportMetadataSchema>;
|
|
300
|
+
|
|
301
|
+
export type { AppContext as A, ReportMetadata as R, TargetElement as T, Annotation as a };
|
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
declare const AppContextSchema: z.ZodObject<{
|
|
4
|
+
release: z.ZodOptional<z.ZodString>;
|
|
5
|
+
gitSha: z.ZodOptional<z.ZodString>;
|
|
6
|
+
environment: z.ZodOptional<z.ZodString>;
|
|
7
|
+
featureFlags: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodBoolean, z.ZodNumber]>>>;
|
|
8
|
+
user: z.ZodOptional<z.ZodObject<{
|
|
9
|
+
id: z.ZodOptional<z.ZodString>;
|
|
10
|
+
email: z.ZodOptional<z.ZodString>;
|
|
11
|
+
name: z.ZodOptional<z.ZodString>;
|
|
12
|
+
organization: z.ZodOptional<z.ZodString>;
|
|
13
|
+
}, z.core.$strip>>;
|
|
14
|
+
extra: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
15
|
+
}, z.core.$strip>;
|
|
16
|
+
type AppContext = z.infer<typeof AppContextSchema>;
|
|
17
|
+
/** DOM path + React fiber path of the element the reporter targeted. */
|
|
18
|
+
declare const TargetElementSchema: z.ZodObject<{
|
|
19
|
+
domPath: z.ZodOptional<z.ZodString>;
|
|
20
|
+
tagName: z.ZodOptional<z.ZodString>;
|
|
21
|
+
text: z.ZodOptional<z.ZodString>;
|
|
22
|
+
boundingRect: z.ZodOptional<z.ZodObject<{
|
|
23
|
+
x: z.ZodNumber;
|
|
24
|
+
y: z.ZodNumber;
|
|
25
|
+
width: z.ZodNumber;
|
|
26
|
+
height: z.ZodNumber;
|
|
27
|
+
}, z.core.$strip>>;
|
|
28
|
+
reactComponents: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
29
|
+
}, z.core.$strip>;
|
|
30
|
+
type TargetElement = z.infer<typeof TargetElementSchema>;
|
|
31
|
+
declare const AnnotationSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
32
|
+
kind: z.ZodLiteral<"rect">;
|
|
33
|
+
x: z.ZodNumber;
|
|
34
|
+
y: z.ZodNumber;
|
|
35
|
+
width: z.ZodNumber;
|
|
36
|
+
height: z.ZodNumber;
|
|
37
|
+
viewport: z.ZodOptional<z.ZodObject<{
|
|
38
|
+
width: z.ZodNumber;
|
|
39
|
+
height: z.ZodNumber;
|
|
40
|
+
}, z.core.$strip>>;
|
|
41
|
+
id: z.ZodOptional<z.ZodString>;
|
|
42
|
+
color: z.ZodOptional<z.ZodString>;
|
|
43
|
+
strokeWidth: z.ZodOptional<z.ZodNumber>;
|
|
44
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
45
|
+
kind: z.ZodLiteral<"ellipse">;
|
|
46
|
+
x: z.ZodNumber;
|
|
47
|
+
y: z.ZodNumber;
|
|
48
|
+
width: z.ZodNumber;
|
|
49
|
+
height: z.ZodNumber;
|
|
50
|
+
id: z.ZodOptional<z.ZodString>;
|
|
51
|
+
color: z.ZodOptional<z.ZodString>;
|
|
52
|
+
strokeWidth: z.ZodOptional<z.ZodNumber>;
|
|
53
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
54
|
+
kind: z.ZodLiteral<"blur">;
|
|
55
|
+
x: z.ZodNumber;
|
|
56
|
+
y: z.ZodNumber;
|
|
57
|
+
width: z.ZodNumber;
|
|
58
|
+
height: z.ZodNumber;
|
|
59
|
+
id: z.ZodOptional<z.ZodString>;
|
|
60
|
+
color: z.ZodOptional<z.ZodString>;
|
|
61
|
+
strokeWidth: z.ZodOptional<z.ZodNumber>;
|
|
62
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
63
|
+
kind: z.ZodLiteral<"arrow">;
|
|
64
|
+
x1: z.ZodNumber;
|
|
65
|
+
y1: z.ZodNumber;
|
|
66
|
+
x2: z.ZodNumber;
|
|
67
|
+
y2: z.ZodNumber;
|
|
68
|
+
id: z.ZodOptional<z.ZodString>;
|
|
69
|
+
color: z.ZodOptional<z.ZodString>;
|
|
70
|
+
strokeWidth: z.ZodOptional<z.ZodNumber>;
|
|
71
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
72
|
+
kind: z.ZodLiteral<"line">;
|
|
73
|
+
x1: z.ZodNumber;
|
|
74
|
+
y1: z.ZodNumber;
|
|
75
|
+
x2: z.ZodNumber;
|
|
76
|
+
y2: z.ZodNumber;
|
|
77
|
+
id: z.ZodOptional<z.ZodString>;
|
|
78
|
+
color: z.ZodOptional<z.ZodString>;
|
|
79
|
+
strokeWidth: z.ZodOptional<z.ZodNumber>;
|
|
80
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
81
|
+
kind: z.ZodLiteral<"pencil">;
|
|
82
|
+
points: z.ZodArray<z.ZodObject<{
|
|
83
|
+
x: z.ZodNumber;
|
|
84
|
+
y: z.ZodNumber;
|
|
85
|
+
}, z.core.$strip>>;
|
|
86
|
+
id: z.ZodOptional<z.ZodString>;
|
|
87
|
+
color: z.ZodOptional<z.ZodString>;
|
|
88
|
+
strokeWidth: z.ZodOptional<z.ZodNumber>;
|
|
89
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
90
|
+
kind: z.ZodLiteral<"highlighter">;
|
|
91
|
+
points: z.ZodArray<z.ZodObject<{
|
|
92
|
+
x: z.ZodNumber;
|
|
93
|
+
y: z.ZodNumber;
|
|
94
|
+
}, z.core.$strip>>;
|
|
95
|
+
id: z.ZodOptional<z.ZodString>;
|
|
96
|
+
color: z.ZodOptional<z.ZodString>;
|
|
97
|
+
strokeWidth: z.ZodOptional<z.ZodNumber>;
|
|
98
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
99
|
+
kind: z.ZodLiteral<"text">;
|
|
100
|
+
x: z.ZodNumber;
|
|
101
|
+
y: z.ZodNumber;
|
|
102
|
+
text: z.ZodString;
|
|
103
|
+
fontSize: z.ZodOptional<z.ZodNumber>;
|
|
104
|
+
id: z.ZodOptional<z.ZodString>;
|
|
105
|
+
color: z.ZodOptional<z.ZodString>;
|
|
106
|
+
strokeWidth: z.ZodOptional<z.ZodNumber>;
|
|
107
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
108
|
+
kind: z.ZodLiteral<"step">;
|
|
109
|
+
x: z.ZodNumber;
|
|
110
|
+
y: z.ZodNumber;
|
|
111
|
+
n: z.ZodNumber;
|
|
112
|
+
id: z.ZodOptional<z.ZodString>;
|
|
113
|
+
color: z.ZodOptional<z.ZodString>;
|
|
114
|
+
strokeWidth: z.ZodOptional<z.ZodNumber>;
|
|
115
|
+
}, z.core.$strip>], "kind">;
|
|
116
|
+
type Annotation = z.infer<typeof AnnotationSchema>;
|
|
117
|
+
declare const ReportMetadataSchema: z.ZodObject<{
|
|
118
|
+
comment: z.ZodOptional<z.ZodString>;
|
|
119
|
+
annotations: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
120
|
+
kind: z.ZodLiteral<"rect">;
|
|
121
|
+
x: z.ZodNumber;
|
|
122
|
+
y: z.ZodNumber;
|
|
123
|
+
width: z.ZodNumber;
|
|
124
|
+
height: z.ZodNumber;
|
|
125
|
+
viewport: z.ZodOptional<z.ZodObject<{
|
|
126
|
+
width: z.ZodNumber;
|
|
127
|
+
height: z.ZodNumber;
|
|
128
|
+
}, z.core.$strip>>;
|
|
129
|
+
id: z.ZodOptional<z.ZodString>;
|
|
130
|
+
color: z.ZodOptional<z.ZodString>;
|
|
131
|
+
strokeWidth: z.ZodOptional<z.ZodNumber>;
|
|
132
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
133
|
+
kind: z.ZodLiteral<"ellipse">;
|
|
134
|
+
x: z.ZodNumber;
|
|
135
|
+
y: z.ZodNumber;
|
|
136
|
+
width: z.ZodNumber;
|
|
137
|
+
height: z.ZodNumber;
|
|
138
|
+
id: z.ZodOptional<z.ZodString>;
|
|
139
|
+
color: z.ZodOptional<z.ZodString>;
|
|
140
|
+
strokeWidth: z.ZodOptional<z.ZodNumber>;
|
|
141
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
142
|
+
kind: z.ZodLiteral<"blur">;
|
|
143
|
+
x: z.ZodNumber;
|
|
144
|
+
y: z.ZodNumber;
|
|
145
|
+
width: z.ZodNumber;
|
|
146
|
+
height: z.ZodNumber;
|
|
147
|
+
id: z.ZodOptional<z.ZodString>;
|
|
148
|
+
color: z.ZodOptional<z.ZodString>;
|
|
149
|
+
strokeWidth: z.ZodOptional<z.ZodNumber>;
|
|
150
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
151
|
+
kind: z.ZodLiteral<"arrow">;
|
|
152
|
+
x1: z.ZodNumber;
|
|
153
|
+
y1: z.ZodNumber;
|
|
154
|
+
x2: z.ZodNumber;
|
|
155
|
+
y2: z.ZodNumber;
|
|
156
|
+
id: z.ZodOptional<z.ZodString>;
|
|
157
|
+
color: z.ZodOptional<z.ZodString>;
|
|
158
|
+
strokeWidth: z.ZodOptional<z.ZodNumber>;
|
|
159
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
160
|
+
kind: z.ZodLiteral<"line">;
|
|
161
|
+
x1: z.ZodNumber;
|
|
162
|
+
y1: z.ZodNumber;
|
|
163
|
+
x2: z.ZodNumber;
|
|
164
|
+
y2: z.ZodNumber;
|
|
165
|
+
id: z.ZodOptional<z.ZodString>;
|
|
166
|
+
color: z.ZodOptional<z.ZodString>;
|
|
167
|
+
strokeWidth: z.ZodOptional<z.ZodNumber>;
|
|
168
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
169
|
+
kind: z.ZodLiteral<"pencil">;
|
|
170
|
+
points: z.ZodArray<z.ZodObject<{
|
|
171
|
+
x: z.ZodNumber;
|
|
172
|
+
y: z.ZodNumber;
|
|
173
|
+
}, z.core.$strip>>;
|
|
174
|
+
id: z.ZodOptional<z.ZodString>;
|
|
175
|
+
color: z.ZodOptional<z.ZodString>;
|
|
176
|
+
strokeWidth: z.ZodOptional<z.ZodNumber>;
|
|
177
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
178
|
+
kind: z.ZodLiteral<"highlighter">;
|
|
179
|
+
points: z.ZodArray<z.ZodObject<{
|
|
180
|
+
x: z.ZodNumber;
|
|
181
|
+
y: z.ZodNumber;
|
|
182
|
+
}, z.core.$strip>>;
|
|
183
|
+
id: z.ZodOptional<z.ZodString>;
|
|
184
|
+
color: z.ZodOptional<z.ZodString>;
|
|
185
|
+
strokeWidth: z.ZodOptional<z.ZodNumber>;
|
|
186
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
187
|
+
kind: z.ZodLiteral<"text">;
|
|
188
|
+
x: z.ZodNumber;
|
|
189
|
+
y: z.ZodNumber;
|
|
190
|
+
text: z.ZodString;
|
|
191
|
+
fontSize: z.ZodOptional<z.ZodNumber>;
|
|
192
|
+
id: z.ZodOptional<z.ZodString>;
|
|
193
|
+
color: z.ZodOptional<z.ZodString>;
|
|
194
|
+
strokeWidth: z.ZodOptional<z.ZodNumber>;
|
|
195
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
196
|
+
kind: z.ZodLiteral<"step">;
|
|
197
|
+
x: z.ZodNumber;
|
|
198
|
+
y: z.ZodNumber;
|
|
199
|
+
n: z.ZodNumber;
|
|
200
|
+
id: z.ZodOptional<z.ZodString>;
|
|
201
|
+
color: z.ZodOptional<z.ZodString>;
|
|
202
|
+
strokeWidth: z.ZodOptional<z.ZodNumber>;
|
|
203
|
+
}, z.core.$strip>], "kind">>>;
|
|
204
|
+
target: z.ZodOptional<z.ZodObject<{
|
|
205
|
+
domPath: z.ZodOptional<z.ZodString>;
|
|
206
|
+
tagName: z.ZodOptional<z.ZodString>;
|
|
207
|
+
text: z.ZodOptional<z.ZodString>;
|
|
208
|
+
boundingRect: z.ZodOptional<z.ZodObject<{
|
|
209
|
+
x: z.ZodNumber;
|
|
210
|
+
y: z.ZodNumber;
|
|
211
|
+
width: z.ZodNumber;
|
|
212
|
+
height: z.ZodNumber;
|
|
213
|
+
}, z.core.$strip>>;
|
|
214
|
+
reactComponents: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
215
|
+
}, z.core.$strip>>;
|
|
216
|
+
env: z.ZodObject<{
|
|
217
|
+
url: z.ZodString;
|
|
218
|
+
route: z.ZodOptional<z.ZodString>;
|
|
219
|
+
referrer: z.ZodOptional<z.ZodString>;
|
|
220
|
+
userAgent: z.ZodString;
|
|
221
|
+
browser: z.ZodOptional<z.ZodString>;
|
|
222
|
+
os: z.ZodOptional<z.ZodString>;
|
|
223
|
+
device: z.ZodOptional<z.ZodEnum<{
|
|
224
|
+
desktop: "desktop";
|
|
225
|
+
tablet: "tablet";
|
|
226
|
+
mobile: "mobile";
|
|
227
|
+
}>>;
|
|
228
|
+
viewport: z.ZodObject<{
|
|
229
|
+
width: z.ZodNumber;
|
|
230
|
+
height: z.ZodNumber;
|
|
231
|
+
}, z.core.$strip>;
|
|
232
|
+
screen: z.ZodObject<{
|
|
233
|
+
width: z.ZodNumber;
|
|
234
|
+
height: z.ZodNumber;
|
|
235
|
+
}, z.core.$strip>;
|
|
236
|
+
devicePixelRatio: z.ZodNumber;
|
|
237
|
+
language: z.ZodString;
|
|
238
|
+
timezone: z.ZodString;
|
|
239
|
+
theme: z.ZodOptional<z.ZodEnum<{
|
|
240
|
+
light: "light";
|
|
241
|
+
dark: "dark";
|
|
242
|
+
}>>;
|
|
243
|
+
online: z.ZodOptional<z.ZodBoolean>;
|
|
244
|
+
capturedAt: z.ZodNumber;
|
|
245
|
+
}, z.core.$strip>;
|
|
246
|
+
app: z.ZodOptional<z.ZodObject<{
|
|
247
|
+
release: z.ZodOptional<z.ZodString>;
|
|
248
|
+
gitSha: z.ZodOptional<z.ZodString>;
|
|
249
|
+
environment: z.ZodOptional<z.ZodString>;
|
|
250
|
+
featureFlags: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodBoolean, z.ZodNumber]>>>;
|
|
251
|
+
user: z.ZodOptional<z.ZodObject<{
|
|
252
|
+
id: z.ZodOptional<z.ZodString>;
|
|
253
|
+
email: z.ZodOptional<z.ZodString>;
|
|
254
|
+
name: z.ZodOptional<z.ZodString>;
|
|
255
|
+
organization: z.ZodOptional<z.ZodString>;
|
|
256
|
+
}, z.core.$strip>>;
|
|
257
|
+
extra: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
258
|
+
}, z.core.$strip>>;
|
|
259
|
+
errors: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
260
|
+
message: z.ZodString;
|
|
261
|
+
stack: z.ZodOptional<z.ZodString>;
|
|
262
|
+
source: z.ZodEnum<{
|
|
263
|
+
"window.onerror": "window.onerror";
|
|
264
|
+
unhandledrejection: "unhandledrejection";
|
|
265
|
+
"console.error": "console.error";
|
|
266
|
+
"react-boundary": "react-boundary";
|
|
267
|
+
}>;
|
|
268
|
+
timestamp: z.ZodNumber;
|
|
269
|
+
}, z.core.$strip>>>;
|
|
270
|
+
consoleTail: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
271
|
+
level: z.ZodEnum<{
|
|
272
|
+
log: "log";
|
|
273
|
+
info: "info";
|
|
274
|
+
warn: "warn";
|
|
275
|
+
error: "error";
|
|
276
|
+
debug: "debug";
|
|
277
|
+
}>;
|
|
278
|
+
args: z.ZodArray<z.ZodString>;
|
|
279
|
+
timestamp: z.ZodNumber;
|
|
280
|
+
}, z.core.$strip>>>;
|
|
281
|
+
networkTail: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
282
|
+
method: z.ZodString;
|
|
283
|
+
url: z.ZodString;
|
|
284
|
+
status: z.ZodNullable<z.ZodNumber>;
|
|
285
|
+
ok: z.ZodNullable<z.ZodBoolean>;
|
|
286
|
+
durationMs: z.ZodNullable<z.ZodNumber>;
|
|
287
|
+
requestType: z.ZodEnum<{
|
|
288
|
+
fetch: "fetch";
|
|
289
|
+
xhr: "xhr";
|
|
290
|
+
}>;
|
|
291
|
+
startedAt: z.ZodNumber;
|
|
292
|
+
error: z.ZodOptional<z.ZodString>;
|
|
293
|
+
}, z.core.$strip>>>;
|
|
294
|
+
sdk: z.ZodObject<{
|
|
295
|
+
name: z.ZodString;
|
|
296
|
+
version: z.ZodString;
|
|
297
|
+
}, z.core.$strip>;
|
|
298
|
+
}, z.core.$strip>;
|
|
299
|
+
type ReportMetadata = z.infer<typeof ReportMetadataSchema>;
|
|
300
|
+
|
|
301
|
+
export type { AppContext as A, ReportMetadata as R, TargetElement as T, Annotation as a };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as AppContext, R as ReportMetadata, T as TargetElement, a as Annotation } from './index.d-
|
|
1
|
+
import { A as AppContext, R as ReportMetadata, T as TargetElement, a as Annotation } from './index.d-Cyvb07sp.cjs';
|
|
2
2
|
|
|
3
3
|
/** A sub-region to crop to, in DOCUMENT CSS pixels (same units as the DOM). */
|
|
4
4
|
interface ScreenshotCrop {
|
|
@@ -7,6 +7,25 @@ interface ScreenshotCrop {
|
|
|
7
7
|
width: number;
|
|
8
8
|
height: number;
|
|
9
9
|
}
|
|
10
|
+
/**
|
|
11
|
+
* A baked-in annotation composite produced by the overlay's `AnnotationEditor`.
|
|
12
|
+
* `svgMarkup` is a complete standalone SVG of every NON-blur mark (viewBox
|
|
13
|
+
* `0 0 docWidth docHeight`, document CSS px); `blurRegions` are the redaction
|
|
14
|
+
* rectangles to blur/fill on the underlying raster (kept OUT of the SVG so they
|
|
15
|
+
* describe pixels to destroy, not vectors to draw). All coords are DOCUMENT CSS
|
|
16
|
+
* pixels and are scaled by the SAME factor used to rasterize the page.
|
|
17
|
+
*/
|
|
18
|
+
interface AnnotationComposite {
|
|
19
|
+
svgMarkup: string;
|
|
20
|
+
docWidth: number;
|
|
21
|
+
docHeight: number;
|
|
22
|
+
blurRegions: Array<{
|
|
23
|
+
x: number;
|
|
24
|
+
y: number;
|
|
25
|
+
width: number;
|
|
26
|
+
height: number;
|
|
27
|
+
}>;
|
|
28
|
+
}
|
|
10
29
|
|
|
11
30
|
interface LensConfig {
|
|
12
31
|
accessId: string;
|
|
@@ -51,6 +70,12 @@ interface SubmitReportInput {
|
|
|
51
70
|
* bounding box of marked areas). Omit for a full-page capture.
|
|
52
71
|
*/
|
|
53
72
|
screenshotCrop?: ScreenshotCrop;
|
|
73
|
+
/**
|
|
74
|
+
* Annotations baked into the screenshot raster before crop: a blur pre-pass
|
|
75
|
+
* redacts `blurRegions`, then the mark SVG is rasterized on top. Omit for an
|
|
76
|
+
* un-annotated capture. Produced by the overlay's annotation editor.
|
|
77
|
+
*/
|
|
78
|
+
annotationComposite?: AnnotationComposite;
|
|
54
79
|
/** Selective data opt-outs; each flag defaults to `true`. */
|
|
55
80
|
include?: SubmitReportIncludes;
|
|
56
81
|
}
|