@appsurify-testmap/rrweb 3.1.1-alpha.2 → 3.2.0-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.cjs +158 -13
- package/dist/rrweb.cjs.map +1 -1
- package/dist/rrweb.d.cts +1 -0
- package/dist/rrweb.d.ts +1 -0
- package/dist/rrweb.js +158 -13
- package/dist/rrweb.js.map +1 -1
- package/dist/rrweb.umd.cjs +160 -13
- package/dist/rrweb.umd.cjs.map +3 -3
- package/dist/rrweb.umd.min.cjs +32 -32
- package/dist/rrweb.umd.min.cjs.map +3 -3
- package/package.json +6 -6
package/dist/rrweb.umd.cjs
CHANGED
|
@@ -994,7 +994,14 @@ const bt$1 = {
|
|
|
994
994
|
source: "dom-dsl"
|
|
995
995
|
};
|
|
996
996
|
function P$1(r2) {
|
|
997
|
-
|
|
997
|
+
if (/^[a-z]+-\d+$/i.test(r2) || /^[a-z]+(-[a-z]+)+-\d+$/i.test(r2) || /^[a-z]+(_[a-z]+)*_\d+$/i.test(r2) || /^\d+$/.test(r2) || /^:[a-z0-9]+:$/i.test(r2) || /^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/i.test(r2))
|
|
998
|
+
return true;
|
|
999
|
+
if (/^[a-z]{1,3}[A-Za-z0-9]{8,}$/.test(r2)) {
|
|
1000
|
+
const t2 = /\d/.test(r2), e2 = /[A-Z]/.test(r2), s2 = r2.length >= 20;
|
|
1001
|
+
if (t2 && e2 || s2)
|
|
1002
|
+
return true;
|
|
1003
|
+
}
|
|
1004
|
+
return !!(/^radix-/.test(r2) || /^mui-\d+$/.test(r2));
|
|
998
1005
|
}
|
|
999
1006
|
const Q$1 = /* @__PURE__ */ new Set([
|
|
1000
1007
|
"aria-labelledby",
|
|
@@ -1195,6 +1202,11 @@ const xt$1 = [
|
|
|
1195
1202
|
/^(rtl|ltr):/,
|
|
1196
1203
|
// === FIX 4: Group and peer variants ===
|
|
1197
1204
|
/^(group|peer)(-hover|-focus|-active)?:/,
|
|
1205
|
+
// === Arbitrary pseudo-class/modifier variants (catch-all) ===
|
|
1206
|
+
// Matches any lowercase/hyphenated prefix followed by colon
|
|
1207
|
+
// e.g., file:bg-transparent, placeholder:text-gray, invalid:border-red, accept:text-primary
|
|
1208
|
+
// Must come AFTER semantic pattern checks to avoid false positives
|
|
1209
|
+
/^[a-z][a-z-]*:/,
|
|
1198
1210
|
// === FIX 4: Tailwind utilities with fraction values ===
|
|
1199
1211
|
/\/([\d.]+|full|auto|screen)$/,
|
|
1200
1212
|
// /50, /100, /full, /auto, /screen
|
|
@@ -13794,7 +13806,14 @@ const bt = {
|
|
|
13794
13806
|
source: "dom-dsl"
|
|
13795
13807
|
};
|
|
13796
13808
|
function P(r2) {
|
|
13797
|
-
|
|
13809
|
+
if (/^[a-z]+-\d+$/i.test(r2) || /^[a-z]+(-[a-z]+)+-\d+$/i.test(r2) || /^[a-z]+(_[a-z]+)*_\d+$/i.test(r2) || /^\d+$/.test(r2) || /^:[a-z0-9]+:$/i.test(r2) || /^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/i.test(r2))
|
|
13810
|
+
return true;
|
|
13811
|
+
if (/^[a-z]{1,3}[A-Za-z0-9]{8,}$/.test(r2)) {
|
|
13812
|
+
const t2 = /\d/.test(r2), e2 = /[A-Z]/.test(r2), s2 = r2.length >= 20;
|
|
13813
|
+
if (t2 && e2 || s2)
|
|
13814
|
+
return true;
|
|
13815
|
+
}
|
|
13816
|
+
return !!(/^radix-/.test(r2) || /^mui-\d+$/.test(r2));
|
|
13798
13817
|
}
|
|
13799
13818
|
const Q = /* @__PURE__ */ new Set([
|
|
13800
13819
|
"aria-labelledby",
|
|
@@ -13995,6 +14014,11 @@ const xt = [
|
|
|
13995
14014
|
/^(rtl|ltr):/,
|
|
13996
14015
|
// === FIX 4: Group and peer variants ===
|
|
13997
14016
|
/^(group|peer)(-hover|-focus|-active)?:/,
|
|
14017
|
+
// === Arbitrary pseudo-class/modifier variants (catch-all) ===
|
|
14018
|
+
// Matches any lowercase/hyphenated prefix followed by colon
|
|
14019
|
+
// e.g., file:bg-transparent, placeholder:text-gray, invalid:border-red, accept:text-primary
|
|
14020
|
+
// Must come AFTER semantic pattern checks to avoid false positives
|
|
14021
|
+
/^[a-z][a-z-]*:/,
|
|
13998
14022
|
// === FIX 4: Tailwind utilities with fraction values ===
|
|
13999
14023
|
/\/([\d.]+|full|auto|screen)$/,
|
|
14000
14024
|
// /50, /100, /full, /auto, /screen
|
|
@@ -15948,6 +15972,30 @@ class MutationBuffer {
|
|
|
15948
15972
|
this.shadowDomManager.reset();
|
|
15949
15973
|
this.canvasManager.reset();
|
|
15950
15974
|
}
|
|
15975
|
+
/**
|
|
15976
|
+
* Clear all accumulated mutation data without emitting.
|
|
15977
|
+
* Used after freeze+debounce checkout — FullSnapshot already captured the state.
|
|
15978
|
+
*/
|
|
15979
|
+
resetBuffers() {
|
|
15980
|
+
this.addedSet = /* @__PURE__ */ new Set();
|
|
15981
|
+
this.movedSet = /* @__PURE__ */ new Set();
|
|
15982
|
+
this.droppedSet = /* @__PURE__ */ new Set();
|
|
15983
|
+
this.removesSubTreeCache = /* @__PURE__ */ new Set();
|
|
15984
|
+
this.mapRemoves = [];
|
|
15985
|
+
this.movedMap = {};
|
|
15986
|
+
this.attributes = [];
|
|
15987
|
+
this.texts = [];
|
|
15988
|
+
this.attributeMap = /* @__PURE__ */ new WeakMap();
|
|
15989
|
+
this.removes = [];
|
|
15990
|
+
}
|
|
15991
|
+
/**
|
|
15992
|
+
* Clear frozen flag without triggering emit.
|
|
15993
|
+
* Used after freeze+debounce checkout — buffers already cleared by resetBuffers().
|
|
15994
|
+
*/
|
|
15995
|
+
unsetFrozen() {
|
|
15996
|
+
this.frozen = false;
|
|
15997
|
+
this.canvasManager.unfreeze();
|
|
15998
|
+
}
|
|
15951
15999
|
}
|
|
15952
16000
|
function deepDelete(addsSet, n2) {
|
|
15953
16001
|
addsSet.delete(n2);
|
|
@@ -18388,11 +18436,15 @@ class VisibilityManager {
|
|
|
18388
18436
|
}
|
|
18389
18437
|
flushBuffer() {
|
|
18390
18438
|
var _a2;
|
|
18439
|
+
if (this.frozen || this.locked)
|
|
18440
|
+
return;
|
|
18391
18441
|
if (this.buffer.size === 0)
|
|
18392
18442
|
return;
|
|
18393
|
-
|
|
18394
|
-
|
|
18443
|
+
const mutations = Array.from(this.buffer.values());
|
|
18444
|
+
const count = mutations.length;
|
|
18395
18445
|
this.buffer.clear();
|
|
18446
|
+
this.mutationCb({ mutations });
|
|
18447
|
+
(_a2 = this.notifyActivity) == null ? void 0 : _a2.call(this, count);
|
|
18396
18448
|
}
|
|
18397
18449
|
observe(el) {
|
|
18398
18450
|
if (this.disabled)
|
|
@@ -18408,6 +18460,10 @@ class VisibilityManager {
|
|
|
18408
18460
|
}
|
|
18409
18461
|
freeze() {
|
|
18410
18462
|
this.frozen = true;
|
|
18463
|
+
if (this.debounceTimer) {
|
|
18464
|
+
clearTimeout(this.debounceTimer);
|
|
18465
|
+
this.debounceTimer = null;
|
|
18466
|
+
}
|
|
18411
18467
|
}
|
|
18412
18468
|
unfreeze() {
|
|
18413
18469
|
this.frozen = false;
|
|
@@ -18415,9 +18471,33 @@ class VisibilityManager {
|
|
|
18415
18471
|
}
|
|
18416
18472
|
lock() {
|
|
18417
18473
|
this.locked = true;
|
|
18474
|
+
if (this.debounceTimer) {
|
|
18475
|
+
clearTimeout(this.debounceTimer);
|
|
18476
|
+
this.debounceTimer = null;
|
|
18477
|
+
}
|
|
18418
18478
|
}
|
|
18419
18479
|
unlock() {
|
|
18420
18480
|
this.locked = false;
|
|
18481
|
+
this.buffer.clear();
|
|
18482
|
+
if (this.debounceTimer) {
|
|
18483
|
+
clearTimeout(this.debounceTimer);
|
|
18484
|
+
this.debounceTimer = null;
|
|
18485
|
+
}
|
|
18486
|
+
if (!this.disabled && this.elements.size > 0) {
|
|
18487
|
+
this.previousState = computeVisibility(this.elements, /* @__PURE__ */ new Map(), {
|
|
18488
|
+
root: this.root,
|
|
18489
|
+
threshold: this.threshold,
|
|
18490
|
+
sensitivity: this.sensitivity,
|
|
18491
|
+
rootMargin: this.rootMargin
|
|
18492
|
+
});
|
|
18493
|
+
}
|
|
18494
|
+
}
|
|
18495
|
+
/**
|
|
18496
|
+
* Clear frozen flag without triggering flush.
|
|
18497
|
+
* Used after freeze+debounce checkout — buffer already cleared by unlock().
|
|
18498
|
+
*/
|
|
18499
|
+
unsetFrozen() {
|
|
18500
|
+
this.frozen = false;
|
|
18421
18501
|
}
|
|
18422
18502
|
reset() {
|
|
18423
18503
|
this.elements.clear();
|
|
@@ -18520,7 +18600,7 @@ class ProcessedNodeManager {
|
|
|
18520
18600
|
destroy() {
|
|
18521
18601
|
}
|
|
18522
18602
|
}
|
|
18523
|
-
const version$1 = "3.
|
|
18603
|
+
const version$1 = "3.2.0-alpha.1";
|
|
18524
18604
|
let wrappedEmit;
|
|
18525
18605
|
let takeFullSnapshot$1;
|
|
18526
18606
|
let canvasManager;
|
|
@@ -18574,6 +18654,7 @@ function record(options = {}) {
|
|
|
18574
18654
|
checkoutEveryNms,
|
|
18575
18655
|
checkoutEveryNth,
|
|
18576
18656
|
checkoutEveryNvm,
|
|
18657
|
+
checkoutDebounce,
|
|
18577
18658
|
blockClass = "rr-block",
|
|
18578
18659
|
blockSelector = null,
|
|
18579
18660
|
ignoreClass = "rr-ignore",
|
|
@@ -18668,6 +18749,10 @@ function record(options = {}) {
|
|
|
18668
18749
|
let lastFullSnapshotEvent;
|
|
18669
18750
|
let incrementalSnapshotCount = 0;
|
|
18670
18751
|
let visibilityMutationCount = 0;
|
|
18752
|
+
let checkoutId = 0;
|
|
18753
|
+
let checkoutPending = false;
|
|
18754
|
+
let checkoutDebounceTimer = null;
|
|
18755
|
+
let checkoutFreezeTimestamp = null;
|
|
18671
18756
|
const eventProcessor = (e2) => {
|
|
18672
18757
|
for (const plugin3 of plugins || []) {
|
|
18673
18758
|
if (plugin3.eventProcessor) {
|
|
@@ -18680,11 +18765,25 @@ function record(options = {}) {
|
|
|
18680
18765
|
}
|
|
18681
18766
|
return e2;
|
|
18682
18767
|
};
|
|
18768
|
+
const executeCheckout = () => {
|
|
18769
|
+
checkoutDebounceTimer = null;
|
|
18770
|
+
checkoutPending = false;
|
|
18771
|
+
checkoutFreezeTimestamp = null;
|
|
18772
|
+
takeFullSnapshot$1(true);
|
|
18773
|
+
mutationBuffers.forEach((buf) => {
|
|
18774
|
+
buf.resetBuffers();
|
|
18775
|
+
buf.unsetFrozen();
|
|
18776
|
+
});
|
|
18777
|
+
if (visibilityManager) {
|
|
18778
|
+
visibilityManager.unsetFrozen();
|
|
18779
|
+
}
|
|
18780
|
+
};
|
|
18683
18781
|
wrappedEmit = (r2, isCheckout) => {
|
|
18684
18782
|
var _a2;
|
|
18685
18783
|
const e2 = r2;
|
|
18686
18784
|
e2.timestamp = nowTimestamp();
|
|
18687
|
-
|
|
18785
|
+
e2.checkoutId = checkoutId;
|
|
18786
|
+
if (((_a2 = mutationBuffers[0]) == null ? void 0 : _a2.isFrozen()) && !checkoutPending && e2.type !== EventType.FullSnapshot && !(e2.type === EventType.IncrementalSnapshot && e2.data.source === IncrementalSource.Mutation)) {
|
|
18688
18787
|
mutationBuffers.forEach((buf) => buf.unfreeze());
|
|
18689
18788
|
visibilityManager == null ? void 0 : visibilityManager.unfreeze();
|
|
18690
18789
|
}
|
|
@@ -18711,7 +18810,29 @@ function record(options = {}) {
|
|
|
18711
18810
|
const exceedCount = checkoutEveryNth && incrementalSnapshotCount >= checkoutEveryNth;
|
|
18712
18811
|
const exceedTime = checkoutEveryNms && e2.timestamp - lastFullSnapshotEvent.timestamp > checkoutEveryNms;
|
|
18713
18812
|
if (exceedCount || exceedTime) {
|
|
18714
|
-
|
|
18813
|
+
if (checkoutDebounce) {
|
|
18814
|
+
if (!checkoutPending) {
|
|
18815
|
+
checkoutPending = true;
|
|
18816
|
+
checkoutFreezeTimestamp = nowTimestamp();
|
|
18817
|
+
mutationBuffers.forEach((buf) => buf.freeze());
|
|
18818
|
+
visibilityManager == null ? void 0 : visibilityManager.freeze();
|
|
18819
|
+
}
|
|
18820
|
+
if (checkoutDebounceTimer) {
|
|
18821
|
+
clearTimeout(checkoutDebounceTimer);
|
|
18822
|
+
}
|
|
18823
|
+
const frozenDuration = nowTimestamp() - checkoutFreezeTimestamp;
|
|
18824
|
+
const maxFreeze = checkoutDebounce * 3;
|
|
18825
|
+
if (frozenDuration >= maxFreeze) {
|
|
18826
|
+
executeCheckout();
|
|
18827
|
+
} else {
|
|
18828
|
+
checkoutDebounceTimer = setTimeout(
|
|
18829
|
+
() => executeCheckout(),
|
|
18830
|
+
checkoutDebounce
|
|
18831
|
+
);
|
|
18832
|
+
}
|
|
18833
|
+
} else {
|
|
18834
|
+
takeFullSnapshot$1(true);
|
|
18835
|
+
}
|
|
18715
18836
|
}
|
|
18716
18837
|
}
|
|
18717
18838
|
}
|
|
@@ -18821,8 +18942,30 @@ function record(options = {}) {
|
|
|
18821
18942
|
notifyActivity: checkoutEveryNvm != null ? (count) => {
|
|
18822
18943
|
visibilityMutationCount += count;
|
|
18823
18944
|
if (visibilityMutationCount >= checkoutEveryNvm) {
|
|
18824
|
-
takeFullSnapshot$1(true);
|
|
18825
18945
|
visibilityMutationCount = 0;
|
|
18946
|
+
if (checkoutDebounce) {
|
|
18947
|
+
if (!checkoutPending) {
|
|
18948
|
+
checkoutPending = true;
|
|
18949
|
+
checkoutFreezeTimestamp = nowTimestamp();
|
|
18950
|
+
mutationBuffers.forEach((buf) => buf.freeze());
|
|
18951
|
+
visibilityManager == null ? void 0 : visibilityManager.freeze();
|
|
18952
|
+
}
|
|
18953
|
+
if (checkoutDebounceTimer) {
|
|
18954
|
+
clearTimeout(checkoutDebounceTimer);
|
|
18955
|
+
}
|
|
18956
|
+
const frozenDuration = nowTimestamp() - checkoutFreezeTimestamp;
|
|
18957
|
+
const maxFreeze = checkoutDebounce * 3;
|
|
18958
|
+
if (frozenDuration >= maxFreeze) {
|
|
18959
|
+
executeCheckout();
|
|
18960
|
+
} else {
|
|
18961
|
+
checkoutDebounceTimer = setTimeout(
|
|
18962
|
+
() => executeCheckout(),
|
|
18963
|
+
checkoutDebounce
|
|
18964
|
+
);
|
|
18965
|
+
}
|
|
18966
|
+
} else {
|
|
18967
|
+
takeFullSnapshot$1(true);
|
|
18968
|
+
}
|
|
18826
18969
|
}
|
|
18827
18970
|
} : void 0
|
|
18828
18971
|
});
|
|
@@ -18831,6 +18974,7 @@ function record(options = {}) {
|
|
|
18831
18974
|
if (!recordDOM) {
|
|
18832
18975
|
return;
|
|
18833
18976
|
}
|
|
18977
|
+
checkoutId++;
|
|
18834
18978
|
wrappedEmit(
|
|
18835
18979
|
{
|
|
18836
18980
|
type: EventType.Meta,
|
|
@@ -19102,6 +19246,10 @@ function record(options = {}) {
|
|
|
19102
19246
|
);
|
|
19103
19247
|
}
|
|
19104
19248
|
return () => {
|
|
19249
|
+
if (checkoutDebounceTimer) {
|
|
19250
|
+
clearTimeout(checkoutDebounceTimer);
|
|
19251
|
+
checkoutDebounceTimer = null;
|
|
19252
|
+
}
|
|
19105
19253
|
flushCustomEventQueue$1();
|
|
19106
19254
|
handlers.forEach((h) => h());
|
|
19107
19255
|
processedNodeManager.destroy();
|
|
@@ -20861,10 +21009,9 @@ class Replayer {
|
|
|
20861
21009
|
this.wrapper.appendChild(this.mouseTail);
|
|
20862
21010
|
}
|
|
20863
21011
|
this.iframe = document.createElement("iframe");
|
|
20864
|
-
const attributes = ["allow-same-origin"];
|
|
20865
|
-
if (this.config.UNSAFE_replayCanvas)
|
|
20866
|
-
|
|
20867
|
-
}
|
|
21012
|
+
const attributes = ["allow-same-origin", "allow-scripts"];
|
|
21013
|
+
if (this.config.UNSAFE_replayCanvas)
|
|
21014
|
+
;
|
|
20868
21015
|
this.iframe.style.display = "none";
|
|
20869
21016
|
this.iframe.setAttribute("sandbox", attributes.join(" "));
|
|
20870
21017
|
this.disableInteract();
|
|
@@ -22069,7 +22216,7 @@ class Replayer {
|
|
|
22069
22216
|
this.config.logger.log(REPLAY_CONSOLE_PREFIX, ...args);
|
|
22070
22217
|
}
|
|
22071
22218
|
}
|
|
22072
|
-
const version = "3.
|
|
22219
|
+
const version = "3.2.0-alpha.1";
|
|
22073
22220
|
const { getVersion } = record;
|
|
22074
22221
|
const { isRecording } = record;
|
|
22075
22222
|
const { flushCustomEventQueue } = record;
|