@appsurify-testmap/rrweb-player 2.1.0-alpha.6 → 2.1.1-alpha.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/rrweb-player.cjs +40 -1
- package/dist/rrweb-player.cjs.map +1 -1
- package/dist/rrweb-player.js +40 -1
- package/dist/rrweb-player.js.map +1 -1
- package/dist/rrweb-player.umd.cjs +41 -1
- package/dist/rrweb-player.umd.cjs.map +2 -2
- package/dist/rrweb-player.umd.min.cjs +20 -20
- package/dist/rrweb-player.umd.min.cjs.map +3 -3
- package/package.json +4 -4
package/dist/rrweb-player.js
CHANGED
|
@@ -9697,6 +9697,41 @@ function patch(source, name, replacement) {
|
|
|
9697
9697
|
};
|
|
9698
9698
|
}
|
|
9699
9699
|
}
|
|
9700
|
+
function describeNode(el) {
|
|
9701
|
+
const tag = el.tagName.toLowerCase();
|
|
9702
|
+
const id = el.id ? `#${el.id}` : "";
|
|
9703
|
+
const classes = el.classList.length ? "." + Array.from(el.classList).join(".") : "";
|
|
9704
|
+
return `${tag}${id}${classes}`;
|
|
9705
|
+
}
|
|
9706
|
+
function getElementVisibility(el) {
|
|
9707
|
+
var _a2, _b2;
|
|
9708
|
+
const win = ((_a2 = el.ownerDocument) == null ? void 0 : _a2.defaultView) ?? window;
|
|
9709
|
+
const rect = el.getBoundingClientRect();
|
|
9710
|
+
const viewportWidth = win.innerWidth || win.document.documentElement.clientWidth || 0;
|
|
9711
|
+
const viewportHeight = win.innerHeight || win.document.documentElement.clientHeight || 0;
|
|
9712
|
+
const isRectVisible = rect.width > 0 && rect.height > 0 && rect.bottom > 0 && rect.right > 0 && rect.top < viewportHeight && rect.left < viewportWidth;
|
|
9713
|
+
const style = (_b2 = win.getComputedStyle) == null ? void 0 : _b2.call(win, el);
|
|
9714
|
+
const isStyleVisible2 = !!style && style.display !== "none" && style.visibility !== "hidden" && (parseFloat(style.opacity) || 0) > 0;
|
|
9715
|
+
const isVisible = isStyleVisible2 && isRectVisible;
|
|
9716
|
+
let ratio = 0;
|
|
9717
|
+
if (isVisible) {
|
|
9718
|
+
const xOverlap = Math.max(
|
|
9719
|
+
0,
|
|
9720
|
+
Math.min(rect.right, viewportWidth) - Math.max(rect.left, 0)
|
|
9721
|
+
);
|
|
9722
|
+
const yOverlap = Math.max(
|
|
9723
|
+
0,
|
|
9724
|
+
Math.min(rect.bottom, viewportHeight) - Math.max(rect.top, 0)
|
|
9725
|
+
);
|
|
9726
|
+
const intersectionArea = xOverlap * yOverlap;
|
|
9727
|
+
const elementArea = rect.width * rect.height;
|
|
9728
|
+
ratio = elementArea > 0 ? intersectionArea / elementArea : 0;
|
|
9729
|
+
}
|
|
9730
|
+
return {
|
|
9731
|
+
isVisible,
|
|
9732
|
+
ratio
|
|
9733
|
+
};
|
|
9734
|
+
}
|
|
9700
9735
|
const index = {
|
|
9701
9736
|
childNodes,
|
|
9702
9737
|
parentNode,
|
|
@@ -9710,7 +9745,9 @@ const index = {
|
|
|
9710
9745
|
querySelector,
|
|
9711
9746
|
querySelectorAll,
|
|
9712
9747
|
mutationObserver: mutationObserverCtor,
|
|
9713
|
-
patch
|
|
9748
|
+
patch,
|
|
9749
|
+
describeNode,
|
|
9750
|
+
getElementVisibility
|
|
9714
9751
|
};
|
|
9715
9752
|
const DEPARTED_MIRROR_ACCESS_WARNING = "Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.";
|
|
9716
9753
|
let _mirror = {
|
|
@@ -9920,6 +9957,7 @@ var IncrementalSource$1 = /* @__PURE__ */ ((IncrementalSource2) => {
|
|
|
9920
9957
|
IncrementalSource2[IncrementalSource2["Selection"] = 14] = "Selection";
|
|
9921
9958
|
IncrementalSource2[IncrementalSource2["AdoptedStyleSheet"] = 15] = "AdoptedStyleSheet";
|
|
9922
9959
|
IncrementalSource2[IncrementalSource2["CustomElement"] = 16] = "CustomElement";
|
|
9960
|
+
IncrementalSource2[IncrementalSource2["VisibilityMutation"] = 17] = "VisibilityMutation";
|
|
9923
9961
|
return IncrementalSource2;
|
|
9924
9962
|
})(IncrementalSource$1 || {});
|
|
9925
9963
|
var MouseInteractions = /* @__PURE__ */ ((MouseInteractions2) => {
|
|
@@ -13299,6 +13337,7 @@ var IncrementalSource = /* @__PURE__ */ ((IncrementalSource2) => {
|
|
|
13299
13337
|
IncrementalSource2[IncrementalSource2["Selection"] = 14] = "Selection";
|
|
13300
13338
|
IncrementalSource2[IncrementalSource2["AdoptedStyleSheet"] = 15] = "AdoptedStyleSheet";
|
|
13301
13339
|
IncrementalSource2[IncrementalSource2["CustomElement"] = 16] = "CustomElement";
|
|
13340
|
+
IncrementalSource2[IncrementalSource2["VisibilityMutation"] = 17] = "VisibilityMutation";
|
|
13302
13341
|
return IncrementalSource2;
|
|
13303
13342
|
})(IncrementalSource || {});
|
|
13304
13343
|
function inlineCss(cssObj) {
|