@merittdev/horus-lens 0.5.1 → 0.5.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.
- package/dist/browser.cjs +25 -6
- package/dist/browser.cjs.map +1 -1
- package/dist/browser.js +2 -2
- package/dist/{chunk-GVULQ2IF.js → chunk-25CZMYQK.js} +26 -7
- package/dist/{chunk-GVULQ2IF.js.map → chunk-25CZMYQK.js.map} +1 -1
- package/dist/{chunk-MN44USB4.js → chunk-4E427AKG.js} +2 -2
- package/dist/index.cjs +25 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/dist/lens.min.js +29 -29
- package/dist/react.cjs +25 -6
- package/dist/react.cjs.map +1 -1
- package/dist/react.js +2 -2
- package/package.json +1 -1
- /package/dist/{chunk-MN44USB4.js.map → chunk-4E427AKG.js.map} +0 -0
package/dist/browser.js
CHANGED
|
@@ -29063,7 +29063,7 @@ async function domToBlob(node2, options) {
|
|
|
29063
29063
|
|
|
29064
29064
|
// ../core/dist/index.js
|
|
29065
29065
|
var SDK_NAME = "@merittdev/horus-lens";
|
|
29066
|
-
var SDK_VERSION = true ? "0.5.
|
|
29066
|
+
var SDK_VERSION = true ? "0.5.2" : "0.0.0-dev";
|
|
29067
29067
|
var DEFAULT_ENDPOINT = "https://api.horus.sh";
|
|
29068
29068
|
var DEFAULT_REPLAY_WINDOW_MS = 15e3;
|
|
29069
29069
|
var DEFAULT_MAX_CONSOLE_ENTRIES = 200;
|
|
@@ -29075,6 +29075,7 @@ var MAX_SERIALIZED_ARG_CHARS = 2e3;
|
|
|
29075
29075
|
var MAX_DOM_BYTES = 2 * 1024 * 1024;
|
|
29076
29076
|
var MAX_TARGET_TEXT_CHARS = 200;
|
|
29077
29077
|
var SCREENSHOT_TIMEOUT_MS = 2e4;
|
|
29078
|
+
var SCREENSHOT_RESOURCE_TIMEOUT_MS = 3500;
|
|
29078
29079
|
var SCREENSHOT_MAX_SCALE = 2;
|
|
29079
29080
|
var SCREENSHOT_MAX_PIXELS = 25e5;
|
|
29080
29081
|
var AUTO_CAPTURE_COOLDOWN_MS = 10 * 60 * 1e3;
|
|
@@ -29629,6 +29630,14 @@ var ReplayRecorder = class {
|
|
|
29629
29630
|
}
|
|
29630
29631
|
};
|
|
29631
29632
|
var SVG_RASTERIZE_TIMEOUT_MS = 3e3;
|
|
29633
|
+
function isOffscreenMedia(node2) {
|
|
29634
|
+
if (!(node2 instanceof HTMLImageElement) && !(node2 instanceof HTMLIFrameElement) && !(typeof HTMLVideoElement !== "undefined" && node2 instanceof HTMLVideoElement)) {
|
|
29635
|
+
return false;
|
|
29636
|
+
}
|
|
29637
|
+
const r = node2.getBoundingClientRect();
|
|
29638
|
+
if (r.width === 0 && r.height === 0) return false;
|
|
29639
|
+
return r.bottom < 0 || r.top > window.innerHeight || r.right < 0 || r.left > window.innerWidth;
|
|
29640
|
+
}
|
|
29632
29641
|
function computeCropRect(crop, scale, rasterWidth, rasterHeight) {
|
|
29633
29642
|
let sx = Math.round(crop.x * scale);
|
|
29634
29643
|
let sy = Math.round(crop.y * scale);
|
|
@@ -29670,12 +29679,22 @@ async function captureScreenshot(excludeHost, crop, composite) {
|
|
|
29670
29679
|
transformOrigin: "top left"
|
|
29671
29680
|
}
|
|
29672
29681
|
} : {},
|
|
29673
|
-
// Exclude the overlay from the capture CLONE
|
|
29674
|
-
|
|
29675
|
-
//
|
|
29676
|
-
|
|
29682
|
+
// Exclude the overlay from the capture CLONE (never hide the live node),
|
|
29683
|
+
// and — for a plain viewport report — drop images/iframes entirely outside
|
|
29684
|
+
// the viewport so we don't fetch dozens of off-screen cross-origin assets.
|
|
29685
|
+
filter: (node2) => {
|
|
29686
|
+
if (node2 === excludeHost) return false;
|
|
29687
|
+
if (viewportOnly && isOffscreenMedia(node2)) return false;
|
|
29688
|
+
return true;
|
|
29689
|
+
},
|
|
29690
|
+
// Skip web-font download/embed. On font-heavy pages (multiple custom
|
|
29691
|
+
// families) this is a dominant, flaky cost; fallback fonts are fine for a
|
|
29692
|
+
// bug-report screenshot and capture becomes far more reliable.
|
|
29693
|
+
font: false,
|
|
29677
29694
|
fetch: { requestInit: { cache: "force-cache" }, bypassingCache: false },
|
|
29678
|
-
|
|
29695
|
+
// PER-RESOURCE cap (NOT the overall budget): a hanging asset fails fast to
|
|
29696
|
+
// a placeholder instead of stalling the whole capture.
|
|
29697
|
+
timeout: SCREENSHOT_RESOURCE_TIMEOUT_MS
|
|
29679
29698
|
});
|
|
29680
29699
|
const started = Date.now();
|
|
29681
29700
|
const timeout = new Promise((resolve) => {
|
|
@@ -30305,4 +30324,4 @@ rrweb/dist/rrweb.js:
|
|
|
30305
30324
|
PERFORMANCE OF THIS SOFTWARE.
|
|
30306
30325
|
***************************************************************************** *)
|
|
30307
30326
|
*/
|
|
30308
|
-
//# sourceMappingURL=chunk-
|
|
30327
|
+
//# sourceMappingURL=chunk-25CZMYQK.js.map
|