@empiricalrun/test-gen 0.81.0 → 0.81.2

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.
Files changed (75) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/dist/file-info/adapters/github/reader.d.ts +1 -1
  3. package/dist/file-info/adapters/github/reader.d.ts.map +1 -1
  4. package/dist/file-info/adapters/github/reader.js +7 -5
  5. package/dist/tools/create-pull-request/index.d.ts.map +1 -1
  6. package/dist/tools/create-pull-request/index.js +1 -3
  7. package/dist/tools/create-pull-request/utils.d.ts +1 -0
  8. package/dist/tools/create-pull-request/utils.d.ts.map +1 -1
  9. package/dist/tools/create-pull-request/utils.js +4 -0
  10. package/dist/tools/executor/utils/git.d.ts +2 -1
  11. package/dist/tools/executor/utils/git.d.ts.map +1 -1
  12. package/dist/tools/executor/utils/git.js +3 -2
  13. package/dist/tools/executor/utils/index.d.ts.map +1 -1
  14. package/dist/tools/executor/utils/index.js +4 -0
  15. package/package.json +9 -9
  16. package/tsconfig.tsbuildinfo +1 -1
  17. package/dist/agent/browsing/index.d.ts +0 -15
  18. package/dist/agent/browsing/index.d.ts.map +0 -1
  19. package/dist/agent/browsing/index.js +0 -60
  20. package/dist/agent/master/action-tool-calls.d.ts +0 -42
  21. package/dist/agent/master/action-tool-calls.d.ts.map +0 -1
  22. package/dist/agent/master/action-tool-calls.js +0 -87
  23. package/dist/agent/master/element-annotation.d.ts +0 -30
  24. package/dist/agent/master/element-annotation.d.ts.map +0 -1
  25. package/dist/agent/master/element-annotation.js +0 -175
  26. package/dist/agent/master/execute-browser-action.d.ts +0 -24
  27. package/dist/agent/master/execute-browser-action.d.ts.map +0 -1
  28. package/dist/agent/master/execute-browser-action.js +0 -121
  29. package/dist/agent/master/next-action.d.ts +0 -22
  30. package/dist/agent/master/next-action.d.ts.map +0 -1
  31. package/dist/agent/master/next-action.js +0 -97
  32. package/dist/agent/master/planner.d.ts +0 -15
  33. package/dist/agent/master/planner.d.ts.map +0 -1
  34. package/dist/agent/master/planner.js +0 -142
  35. package/dist/agent/master/run.d.ts +0 -17
  36. package/dist/agent/master/run.d.ts.map +0 -1
  37. package/dist/agent/master/run.js +0 -156
  38. package/dist/agent/master/scroller.d.ts +0 -15
  39. package/dist/agent/master/scroller.d.ts.map +0 -1
  40. package/dist/agent/master/scroller.js +0 -369
  41. package/dist/agent/master/with-hints.d.ts +0 -17
  42. package/dist/agent/master/with-hints.d.ts.map +0 -1
  43. package/dist/agent/master/with-hints.js +0 -103
  44. package/dist/agent/planner/run-time-planner.d.ts +0 -15
  45. package/dist/agent/planner/run-time-planner.d.ts.map +0 -1
  46. package/dist/agent/planner/run-time-planner.js +0 -98
  47. package/dist/agent/planner/run.d.ts +0 -7
  48. package/dist/agent/planner/run.d.ts.map +0 -1
  49. package/dist/agent/planner/run.js +0 -128
  50. package/dist/browser-injected-scripts/annotate-elements.js +0 -612
  51. package/dist/browser-injected-scripts/annotate-elements.spec.d.ts +0 -2
  52. package/dist/browser-injected-scripts/annotate-elements.spec.d.ts.map +0 -1
  53. package/dist/browser-injected-scripts/annotate-elements.spec.js +0 -202
  54. package/dist/browser-injected-scripts/annotate-elements.spec.ts +0 -327
  55. package/dist/generate-summary/frame-sampling.d.ts +0 -12
  56. package/dist/generate-summary/frame-sampling.d.ts.map +0 -1
  57. package/dist/generate-summary/frame-sampling.js +0 -72
  58. package/dist/generate-summary/generate-error-stack-summary.d.ts +0 -11
  59. package/dist/generate-summary/generate-error-stack-summary.d.ts.map +0 -1
  60. package/dist/generate-summary/generate-error-stack-summary.js +0 -41
  61. package/dist/generate-summary/generate-failed-step-screenshot-diff-summary.d.ts +0 -58
  62. package/dist/generate-summary/generate-failed-step-screenshot-diff-summary.d.ts.map +0 -1
  63. package/dist/generate-summary/generate-failed-step-screenshot-diff-summary.js +0 -460
  64. package/dist/generate-summary/generate-grouped-summary.d.ts +0 -18
  65. package/dist/generate-summary/generate-grouped-summary.d.ts.map +0 -1
  66. package/dist/generate-summary/generate-grouped-summary.js +0 -88
  67. package/dist/generate-summary/merge-summary.d.ts +0 -16
  68. package/dist/generate-summary/merge-summary.d.ts.map +0 -1
  69. package/dist/generate-summary/merge-summary.js +0 -43
  70. package/dist/generate-summary/pick-videos-for-comparison.d.ts +0 -9
  71. package/dist/generate-summary/pick-videos-for-comparison.d.ts.map +0 -1
  72. package/dist/generate-summary/pick-videos-for-comparison.js +0 -54
  73. package/dist/utils/env.d.ts +0 -2
  74. package/dist/utils/env.d.ts.map +0 -1
  75. package/dist/utils/env.js +0 -7
@@ -1,612 +0,0 @@
1
- /**
2
- * Annotates all clickable elements on the page with unique hint markers.
3
- * Returns an object containing annotations and methods to enable/disable them.
4
- *
5
- * @param {Object} options - Configuration options for hint markers.
6
- * @param {string} options.hintCharacterSet - Characters to use for generating hint identifiers.
7
- * @param {number} options.maxHints - Maximum number of hints to generate.
8
- * @param {string} options.markerClass - CSS class to apply to hint markers.
9
- * @returns {Object} An object containing annotations map and enable/disable methods.
10
- */
11
- // eslint-disable-next-line no-unused-vars, autofix/no-unused-vars
12
- function annotateElementsWithPreference({
13
- options = {},
14
- preference = {},
15
- } = {}) {
16
- const {
17
- hintCharacterSet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ", // Default set of characters for hints
18
- maxHints = 1000, // Maximum number of hints to generate
19
- markerClass = "hint-marker", // CSS class for markers
20
- } = options;
21
-
22
- const MAX_Z_INDEX_FOR_DOM = 10000;
23
- const Z_INDEX_FOR_MARKERS = 99999;
24
- const originalZIndices = new Map(); // Store original z-indices
25
-
26
- const document = window.document;
27
- const annotationsMap = {};
28
- const usedHints = new Set();
29
- let annotationsContainer = null;
30
-
31
- // Check if the element is not blocked and visible for clicking
32
- function isElementClickNotBlocked(element, windowToAnnotate) {
33
- const rect = element.getBoundingClientRect();
34
-
35
- // Calculate the center point of the element
36
- const centerX = rect.left + rect.width / 2;
37
- const centerY = rect.top + rect.height / 2;
38
-
39
- // check if element is within the viewport
40
- if (
41
- centerX < 0 ||
42
- centerY < 0 ||
43
- centerX >
44
- (windowToAnnotate.innerWidth || document.documentElement.clientWidth) ||
45
- centerY >
46
- (windowToAnnotate.innerHeight || document.documentElement.clientHeight)
47
- ) {
48
- return false;
49
- }
50
-
51
- const topElement = windowToAnnotate.document.elementFromPoint(
52
- centerX,
53
- centerY,
54
- );
55
-
56
- // Check if the topmost element is the target element or one of its descendants
57
- return element.contains(topElement);
58
- }
59
-
60
- function generateHintStrings(charset, max) {
61
- const hints = [];
62
- let length = 1;
63
-
64
- while (hints.length < max) {
65
- const combos = cartesianProduct(Array(length).fill(charset.split("")));
66
- for (const combo of combos) {
67
- const hint = combo.join("");
68
- if (!usedHints.has(hint)) {
69
- hints.push(hint);
70
- usedHints.add(hint);
71
- }
72
- if (hints.length >= max) break;
73
- }
74
- length++;
75
- }
76
-
77
- return hints;
78
- }
79
-
80
- function cartesianProduct(arrays) {
81
- return arrays.reduce(
82
- (acc, curr) =>
83
- acc
84
- .map((a) => curr.map((b) => a.concat([b])))
85
- .reduce((a, b) => a.concat(b), []),
86
- [[]],
87
- );
88
- }
89
-
90
- // Check if an element is clickable
91
- function isElementClickable(element, windowToAnnotate) {
92
- if (!(element instanceof windowToAnnotate.Element)) return false;
93
-
94
- const tagName = element.tagName.toLowerCase();
95
- let isClickable = false;
96
-
97
- // Check for aria-disabled
98
- const ariaDisabled = element.getAttribute("aria-disabled");
99
- if (ariaDisabled && ["", "true"].includes(ariaDisabled.toLowerCase())) {
100
- return false; // Element should not be clickable if aria-disabled is true
101
- }
102
-
103
- // Check for visibility
104
- const style = window.getComputedStyle(element);
105
- if (
106
- style.display === "none" ||
107
- style.visibility === "hidden" ||
108
- // This is done for cases where opacity is undefined
109
- // parseFloat(style.opacity) === 0
110
- style.pointerEvents === "none"
111
- ) {
112
- return false;
113
- }
114
-
115
- // Check if element is disabled (for applicable elements)
116
- if (element.disabled) return false;
117
-
118
- // Check for AngularJS click handlers
119
- if (!isElementClickable._checkForAngularJs) {
120
- isElementClickable._checkForAngularJs = (function () {
121
- const angularElements = document.getElementsByClassName("ng-scope");
122
- if (angularElements.length === 0) {
123
- return () => false;
124
- } else {
125
- const ngAttributes = [];
126
- for (const prefix of ["", "data-", "x-"]) {
127
- for (const separator of ["-", ":", "_"]) {
128
- ngAttributes.push(`${prefix}ng${separator}click`);
129
- }
130
- }
131
- return function (el) {
132
- for (const attribute of ngAttributes) {
133
- if (el.hasAttribute(attribute)) return true;
134
- }
135
- return false;
136
- };
137
- }
138
- })();
139
- }
140
-
141
- if (!isClickable && isElementClickable._checkForAngularJs(element)) {
142
- isClickable = true;
143
- }
144
-
145
- // Tag-specific clickability
146
- const focusableTags = [
147
- "a",
148
- "button",
149
- "input",
150
- "select",
151
- "textarea",
152
- "object",
153
- "embed",
154
- "label",
155
- "details",
156
- ];
157
-
158
- // Check for onclick attribute or listener
159
- if (
160
- (element.hasAttribute("onclick") ||
161
- typeof element.onclick === "function") &&
162
- // check for parent element having same on click
163
- element.parentNode.onclick !== element.onclick &&
164
- // parent element should not be a focusable tag like button
165
- focusableTags.indexOf(element.parentNode.tagName.toLowerCase()) === -1
166
- ) {
167
- isClickable = true;
168
- }
169
-
170
- // Check for jsaction attribute (commonly used in frameworks like Google's)
171
- if (!isClickable && element.hasAttribute("jsaction")) {
172
- const jsactionRules = element.getAttribute("jsaction").split(";");
173
- for (const jsactionRule of jsactionRules) {
174
- const ruleSplit = jsactionRule.trim().split(":");
175
- if (ruleSplit.length >= 1 && ruleSplit.length <= 2) {
176
- const [eventType] = ruleSplit[0].trim().split(".");
177
- if (eventType === "click") {
178
- isClickable = true;
179
- break;
180
- }
181
- }
182
- }
183
- }
184
-
185
- // Check for role attributes that imply clickability
186
- if (!isClickable) {
187
- const role = element.getAttribute("role");
188
- const clickableRoles = [
189
- "button",
190
- "tab",
191
- "link",
192
- "checkbox",
193
- "menuitem",
194
- "menuitemcheckbox",
195
- "menuitemradio",
196
- "radio",
197
- "switch",
198
- ];
199
- if (role && clickableRoles.includes(role.toLowerCase())) {
200
- isClickable = true;
201
- }
202
- }
203
-
204
- // Check for contentEditable
205
- if (!isClickable) {
206
- const contentEditable = element.getAttribute("contentEditable");
207
- if (
208
- contentEditable != null &&
209
- ["", "contenteditable", "true"].includes(contentEditable.toLowerCase())
210
- ) {
211
- isClickable = true;
212
- }
213
- }
214
-
215
- if (focusableTags.includes(tagName)) {
216
- switch (tagName) {
217
- case "a":
218
- // Ensure it's not just a named anchor without href
219
- if (element.hasAttribute("href")) {
220
- isClickable = true;
221
- }
222
- break;
223
- case "input": {
224
- const type = (element.getAttribute("type") || "").toLowerCase();
225
- if (
226
- type !== "hidden" &&
227
- !element.disabled &&
228
- !(element.readOnly && isInputSelectable(element))
229
- ) {
230
- isClickable = true;
231
- }
232
- break;
233
- }
234
- case "textarea":
235
- if (!element.disabled && !element.readOnly) {
236
- isClickable = true;
237
- }
238
- break;
239
- case "button":
240
- case "select":
241
- if (!element.disabled) {
242
- isClickable = true;
243
- }
244
- break;
245
- case "object":
246
- case "embed":
247
- isClickable = true;
248
- break;
249
- case "label":
250
- if (element.control && !element.control.disabled) {
251
- isClickable = true;
252
- }
253
- break;
254
- case "details":
255
- isClickable = true;
256
- break;
257
- default:
258
- break;
259
- }
260
- }
261
-
262
- // Some special handling for Tailwind CSS and Vue
263
- if (!isClickable) {
264
- if (element.classList.contains("cursor-pointer")) {
265
- isClickable = true;
266
- } else if (element.classList.contains("v-list-item--link")) {
267
- // vue specific click handling
268
- isClickable = true;
269
- } else if (element.style.cursor === "pointer") {
270
- isClickable = true;
271
- }
272
- }
273
-
274
- // Check for tabindex
275
- if (!isClickable) {
276
- const tabIndexValue = element.getAttribute("tabindex");
277
- const tabIndex = tabIndexValue ? parseInt(tabIndexValue) : -1;
278
- if (tabIndex >= 0 && !isNaN(tabIndex)) {
279
- isClickable = true;
280
- }
281
- }
282
-
283
- return isClickable;
284
- }
285
-
286
- function isInputSelectable(input) {
287
- const selectableTypes = [
288
- "text",
289
- "search",
290
- "password",
291
- "url",
292
- "email",
293
- "number",
294
- "tel",
295
- ];
296
- const type = (input.getAttribute("type") || "").toLowerCase();
297
- return selectableTypes.includes(type);
298
- }
299
-
300
- var parentElements = [];
301
-
302
- // Create a hint marker
303
- function createHintMarker(
304
- el,
305
- hint,
306
- parentElement,
307
- windowToAnnotate,
308
- baseColor,
309
- ) {
310
- const rect = el.getBoundingClientRect();
311
-
312
- // Create the marker element
313
- const marker = document.createElement("div");
314
- marker.textContent = hint;
315
- marker.className = markerClass;
316
- // Style the marker
317
- Object.assign(marker.style, {
318
- position: "absolute",
319
- background: baseColor,
320
- padding: "1px 3px 0px",
321
- borderRadius: "3px",
322
- border: `1px solid ${baseColor}`,
323
- fontSize: "11px",
324
- pointerEvents: "none",
325
- zIndex: `${Z_INDEX_FOR_MARKERS}`,
326
- whiteSpace: "nowrap",
327
- overflow: "hidden",
328
- letterSpacing: 0,
329
- minHeight: 0,
330
- lineHeight: "100%",
331
- color: "white",
332
- fontFamily: "Helvetica, Arial, sans-serif",
333
- fontWeight: "bold",
334
- visibility: "hidden", // Setting the visibility to hidden initially, to get the height and width of marker
335
- });
336
-
337
- parentElement.appendChild(marker);
338
- let markerRect = marker.getBoundingClientRect();
339
- let top = rect.top + windowToAnnotate.scrollY;
340
- let left = rect.left + windowToAnnotate.scrollX;
341
-
342
- // If the target element is smaller, we annotate outside the container
343
- if (markerRect.height > rect.height - markerRect.height) {
344
- top = top - markerRect.height;
345
- }
346
-
347
- if (markerRect.width > rect.width - markerRect.width) {
348
- left = left - markerRect.width / 2;
349
- }
350
-
351
- // Applying the position and setting visibility
352
- marker.style.top = `${top}px`;
353
- marker.style.left = `${left}px`;
354
- marker.style.visibility = "visible";
355
-
356
- // Attach the marker to the specified parent element
357
- parentElements.push(parentElement);
358
- return marker;
359
- }
360
-
361
- // Clear existing annotations
362
- //TODO: Handle clearing annotations
363
- function clearAnnotations() {
364
- parentElements.forEach((parentElement) => {
365
- const markers = parentElement.querySelectorAll(`.${markerClass}`);
366
- markers.forEach((marker) => marker.remove());
367
- });
368
- parentElements = [];
369
- }
370
-
371
- function isInputElement(el) {
372
- // Check if it's an input with a text-like type
373
- if (el instanceof HTMLInputElement) {
374
- const textTypes = [
375
- "text",
376
- "email",
377
- "number",
378
- "password",
379
- "search",
380
- "tel",
381
- "url",
382
- "checkbox",
383
- ];
384
- return textTypes.includes(el.type.toLowerCase());
385
- }
386
-
387
- // Check if it's a textarea
388
- if (el instanceof HTMLTextAreaElement) {
389
- return true;
390
- }
391
-
392
- // Check if it's contentEditable
393
- return el.isContentEditable;
394
- }
395
-
396
- function isRequiredTextPresent(el, assertionText) {
397
- assertionText = assertionText?.trim().toLowerCase();
398
- if (assertionText) {
399
- let elementText = el.innerText?.trim().toLowerCase();
400
- let placeHolderText = el.placeholder?.trim().toLowerCase();
401
- if (elementText === assertionText || placeHolderText === assertionText) {
402
- //Check if the text for parent and child is same or not, if its same don't annotate again
403
- if (el.parentNode.innerText?.toLowerCase() !== elementText) {
404
- return true;
405
- }
406
- }
407
- return false;
408
- }
409
- return true;
410
- }
411
-
412
- // This checks if the element is scrollable or not
413
- function isElementScrollable(elem) {
414
- function getComputedStyle(elem) {
415
- return window.getComputedStyle(elem, null);
416
- }
417
-
418
- function getActualCss(elem, style) {
419
- return getComputedStyle(elem)[style];
420
- }
421
-
422
- function isYScrollable(elem) {
423
- return (
424
- elem.offsetHeight < elem.scrollHeight &&
425
- autoOrScroll(getActualCss(elem, "overflow-y"))
426
- );
427
- }
428
-
429
- function autoOrScroll(text) {
430
- return text == "scroll" || text == "auto";
431
- }
432
-
433
- // This doesn't annotate the elements with horizontal scroll
434
- return isYScrollable(elem);
435
- }
436
-
437
- // Initialize annotations for a given window (including iframes)
438
- function initializeAnnotations(windowToAnnotate, parentHints, depth) {
439
- const container =
440
- parentHints?.nodeName === "IFRAME"
441
- ? parentHints.contentWindow.document.body
442
- : annotationsContainer;
443
-
444
- // Ensure the container exists
445
- if (!container) return;
446
-
447
- // Filter for clickable elements
448
- const elementsToAnnotate = Array.from(
449
- windowToAnnotate.document.querySelectorAll("*"),
450
- ).filter((el) => {
451
- // Here based on the action type we filter the elements
452
- // and annotate only those elements
453
- switch (preference.actionType) {
454
- case "fill":
455
- return isInputElement(el);
456
-
457
- case "assert_text":
458
- return isRequiredTextPresent(el, preference.assertionText);
459
-
460
- case "scroll":
461
- return isElementScrollable(el);
462
-
463
- default:
464
- return (
465
- isElementClickable(el, windowToAnnotate) &&
466
- isElementClickNotBlocked(el, windowToAnnotate)
467
- );
468
- }
469
- });
470
- // Generate hint strings for the clickable elements
471
- const hints = generateHintStrings(
472
- hintCharacterSet,
473
- Math.min(maxHints, elementsToAnnotate.length),
474
- );
475
-
476
- // Create markers for the elements
477
- elementsToAnnotate.slice(0, maxHints).forEach((el, index) => {
478
- const hint = hints[index];
479
- const rect = el.getBoundingClientRect();
480
-
481
- const colors = [
482
- "#FF0000", // Red
483
- "#006400", // Dark Green
484
- "#0000FF", // Blue
485
- "#FFA500", // Orange
486
- "#800080", // Purple
487
- "#008080", // Teal
488
- "#FF69B4", // Hot Pink
489
- "#4B0082", // Indigo
490
- "#FF4500", // Orange Red
491
- "#2E8B57", // Sea Green
492
- "#DC143C", // Crimson
493
- "#4682B4", // Steel Blue
494
- ];
495
- const colorIndex = index % colors.length;
496
- const baseColor = colors[colorIndex];
497
-
498
- // Use createHintMarker with the specified container
499
- createHintMarker(el, hint, container, windowToAnnotate, baseColor);
500
-
501
- el.style.boxShadow = `inset 0 0 0px 1px ${baseColor}`;
502
-
503
- // Add element details to the annotations map
504
- annotationsMap[hint] = {
505
- node: el,
506
- rect: {
507
- top: rect.top + windowToAnnotate.scrollY,
508
- left: rect.left + windowToAnnotate.scrollX,
509
- width: rect.width,
510
- height: rect.height,
511
- },
512
- depth: [...depth],
513
- };
514
- });
515
-
516
- // Process iframes recursively
517
- Array.from(windowToAnnotate.document.querySelectorAll("iframe")).forEach(
518
- (iframe) => {
519
- try {
520
- const frameWindow = iframe.contentWindow;
521
- if (
522
- frameWindow &&
523
- iframe.offsetWidth > 0 &&
524
- iframe.offsetHeight > 0
525
- ) {
526
- initializeAnnotations(frameWindow, iframe, [...depth, iframe]);
527
- }
528
- } catch (e) {
529
- console.warn("Cannot access iframe:", e);
530
- }
531
- },
532
- );
533
- }
534
-
535
- // Initialize and enable annotations
536
- function enable() {
537
- scaleAllZIndices(MAX_Z_INDEX_FOR_DOM);
538
- clearAnnotations();
539
- if (!annotationsContainer) {
540
- annotationsContainer = document.createElement("div");
541
- annotationsContainer.className = "annotations";
542
- Object.assign(annotationsContainer.style, {
543
- position: "absolute",
544
- top: "0",
545
- left: "0",
546
- width: "100%",
547
- height: "100%",
548
- pointerEvents: "none",
549
- zIndex: `${Z_INDEX_FOR_MARKERS}`,
550
- });
551
- document.body.appendChild(annotationsContainer);
552
- initializeAnnotations(window, null, []);
553
- } else {
554
- annotationsContainer.style.display = "block";
555
- }
556
- }
557
-
558
- // Destroy annotations
559
- function destroy() {
560
- if (annotationsContainer) {
561
- clearAnnotations();
562
- Object.values(annotationsMap).forEach((annotation) => {
563
- annotation.node.style.boxShadow = "none";
564
- });
565
-
566
- // Restore original z-indices
567
- originalZIndices.forEach((originalZ, element) => {
568
- element.style.zIndex = originalZ;
569
- });
570
- originalZIndices.clear();
571
-
572
- annotationsContainer.parentNode.removeChild(annotationsContainer);
573
- annotationsContainer = null;
574
- }
575
- }
576
-
577
- function scaleAllZIndices(maxValue) {
578
- const allElements = document.querySelectorAll("*");
579
- let zIndexes = [];
580
- allElements.forEach((el) => {
581
- const z = window.getComputedStyle(el).getPropertyValue("z-index");
582
- if (z !== "auto" && !isNaN(parseInt(z, 10))) {
583
- zIndexes.push(parseInt(z, 10));
584
- // Store original z-index
585
- originalZIndices.set(el, z);
586
- }
587
- });
588
- if (zIndexes.length === 0) {
589
- console.log("No elements with a numeric z-index were found.");
590
- } else {
591
- const currentMax = Math.max(...zIndexes);
592
- const scalingFactor = maxValue / currentMax;
593
- allElements.forEach((el) => {
594
- const computedZ = window
595
- .getComputedStyle(el)
596
- .getPropertyValue("z-index");
597
- if (computedZ !== "auto" && !isNaN(parseInt(computedZ, 10))) {
598
- const originalZ = parseInt(computedZ, 10);
599
- const newZ = Math.floor(originalZ * scalingFactor);
600
- el.style.zIndex = newZ;
601
- }
602
- });
603
- }
604
- }
605
-
606
- enable();
607
-
608
- return {
609
- annotations: annotationsMap,
610
- destroy,
611
- };
612
- }
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=annotate-elements.spec.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"annotate-elements.spec.d.ts","sourceRoot":"","sources":["../../src/browser-injected-scripts/annotate-elements.spec.ts"],"names":[],"mappings":""}