@appsurify-testmap/rrweb-player 2.1.0-alpha.7 → 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
|
@@ -9738,6 +9738,42 @@ function patch(source, name, replacement) {
|
|
|
9738
9738
|
};
|
|
9739
9739
|
}
|
|
9740
9740
|
}
|
|
9741
|
+
function describeNode(el) {
|
|
9742
|
+
const tag = el.tagName.toLowerCase();
|
|
9743
|
+
const id = el.id ? `#${el.id}` : "";
|
|
9744
|
+
const classes = el.classList.length ? "." + Array.from(el.classList).join(".") : "";
|
|
9745
|
+
return `${tag}${id}${classes}`;
|
|
9746
|
+
}
|
|
9747
|
+
function getElementVisibility(el) {
|
|
9748
|
+
var _a3;
|
|
9749
|
+
var _a2, _b2;
|
|
9750
|
+
const win = (_a3 = (_a2 = el.ownerDocument) == null ? void 0 : _a2.defaultView) != null ? _a3 : window;
|
|
9751
|
+
const rect = el.getBoundingClientRect();
|
|
9752
|
+
const viewportWidth = win.innerWidth || win.document.documentElement.clientWidth || 0;
|
|
9753
|
+
const viewportHeight = win.innerHeight || win.document.documentElement.clientHeight || 0;
|
|
9754
|
+
const isRectVisible = rect.width > 0 && rect.height > 0 && rect.bottom > 0 && rect.right > 0 && rect.top < viewportHeight && rect.left < viewportWidth;
|
|
9755
|
+
const style = (_b2 = win.getComputedStyle) == null ? void 0 : _b2.call(win, el);
|
|
9756
|
+
const isStyleVisible2 = !!style && style.display !== "none" && style.visibility !== "hidden" && (parseFloat(style.opacity) || 0) > 0;
|
|
9757
|
+
const isVisible = isStyleVisible2 && isRectVisible;
|
|
9758
|
+
let ratio = 0;
|
|
9759
|
+
if (isVisible) {
|
|
9760
|
+
const xOverlap = Math.max(
|
|
9761
|
+
0,
|
|
9762
|
+
Math.min(rect.right, viewportWidth) - Math.max(rect.left, 0)
|
|
9763
|
+
);
|
|
9764
|
+
const yOverlap = Math.max(
|
|
9765
|
+
0,
|
|
9766
|
+
Math.min(rect.bottom, viewportHeight) - Math.max(rect.top, 0)
|
|
9767
|
+
);
|
|
9768
|
+
const intersectionArea = xOverlap * yOverlap;
|
|
9769
|
+
const elementArea = rect.width * rect.height;
|
|
9770
|
+
ratio = elementArea > 0 ? intersectionArea / elementArea : 0;
|
|
9771
|
+
}
|
|
9772
|
+
return {
|
|
9773
|
+
isVisible,
|
|
9774
|
+
ratio
|
|
9775
|
+
};
|
|
9776
|
+
}
|
|
9741
9777
|
const index = {
|
|
9742
9778
|
childNodes,
|
|
9743
9779
|
parentNode,
|
|
@@ -9751,7 +9787,9 @@ const index = {
|
|
|
9751
9787
|
querySelector,
|
|
9752
9788
|
querySelectorAll,
|
|
9753
9789
|
mutationObserver: mutationObserverCtor,
|
|
9754
|
-
patch
|
|
9790
|
+
patch,
|
|
9791
|
+
describeNode,
|
|
9792
|
+
getElementVisibility
|
|
9755
9793
|
};
|
|
9756
9794
|
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.";
|
|
9757
9795
|
let _mirror = {
|
|
@@ -9962,6 +10000,7 @@ var IncrementalSource$1 = /* @__PURE__ */ ((IncrementalSource2) => {
|
|
|
9962
10000
|
IncrementalSource2[IncrementalSource2["Selection"] = 14] = "Selection";
|
|
9963
10001
|
IncrementalSource2[IncrementalSource2["AdoptedStyleSheet"] = 15] = "AdoptedStyleSheet";
|
|
9964
10002
|
IncrementalSource2[IncrementalSource2["CustomElement"] = 16] = "CustomElement";
|
|
10003
|
+
IncrementalSource2[IncrementalSource2["VisibilityMutation"] = 17] = "VisibilityMutation";
|
|
9965
10004
|
return IncrementalSource2;
|
|
9966
10005
|
})(IncrementalSource$1 || {});
|
|
9967
10006
|
var MouseInteractions = /* @__PURE__ */ ((MouseInteractions2) => {
|
|
@@ -13339,6 +13378,7 @@ var IncrementalSource = /* @__PURE__ */ ((IncrementalSource2) => {
|
|
|
13339
13378
|
IncrementalSource2[IncrementalSource2["Selection"] = 14] = "Selection";
|
|
13340
13379
|
IncrementalSource2[IncrementalSource2["AdoptedStyleSheet"] = 15] = "AdoptedStyleSheet";
|
|
13341
13380
|
IncrementalSource2[IncrementalSource2["CustomElement"] = 16] = "CustomElement";
|
|
13381
|
+
IncrementalSource2[IncrementalSource2["VisibilityMutation"] = 17] = "VisibilityMutation";
|
|
13342
13382
|
return IncrementalSource2;
|
|
13343
13383
|
})(IncrementalSource || {});
|
|
13344
13384
|
function inlineCss(cssObj) {
|