@sailfish-ai/recorder 1.11.6 → 1.12.4
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/README.md +19 -1
- package/dist/chunkSerializer.js +70 -23
- package/dist/chunkSerializer.js.br +0 -0
- package/dist/chunkSerializer.js.gz +0 -0
- package/dist/chunks/chunkSerializer-DDukZpgl.js +116 -0
- package/dist/chunks/chunkSerializer-DDukZpgl.js.br +0 -0
- package/dist/chunks/chunkSerializer-DDukZpgl.js.gz +0 -0
- package/dist/chunks/chunkSerializer-FQtY90Av.js +115 -0
- package/dist/chunks/chunkSerializer-FQtY90Av.js.br +0 -0
- package/dist/chunks/chunkSerializer-FQtY90Av.js.gz +0 -0
- package/dist/chunks/{index-CftVmmO9.js → index-C-qbsfKe.js} +703 -542
- package/dist/chunks/index-C-qbsfKe.js.br +0 -0
- package/dist/chunks/index-C-qbsfKe.js.gz +0 -0
- package/dist/chunks/{index-QXHuV98g.js → index-D6axlCRu.js} +751 -586
- package/dist/chunks/index-D6axlCRu.js.br +0 -0
- package/dist/chunks/index-D6axlCRu.js.gz +0 -0
- package/dist/clockSync.js +196 -0
- package/dist/clockSync.js.br +0 -0
- package/dist/clockSync.js.gz +0 -0
- package/dist/graphql.js +5 -0
- package/dist/graphql.js.br +0 -0
- package/dist/graphql.js.gz +0 -0
- package/dist/inAppReportIssueModal/index.js +4 -1
- package/dist/inAppReportIssueModal/index.js.br +0 -0
- package/dist/inAppReportIssueModal/index.js.gz +0 -0
- package/dist/inAppReportIssueModal/integrations.js +36 -0
- package/dist/inAppReportIssueModal/integrations.js.br +0 -0
- package/dist/inAppReportIssueModal/integrations.js.gz +0 -0
- package/dist/inAppReportIssueModal/state.js +8 -0
- package/dist/inAppReportIssueModal/state.js.br +0 -0
- package/dist/inAppReportIssueModal/state.js.gz +0 -0
- package/dist/index.js +67 -5
- package/dist/index.js.br +0 -0
- package/dist/index.js.gz +0 -0
- package/dist/privacyMask.js +93 -0
- package/dist/privacyMask.js.br +0 -0
- package/dist/privacyMask.js.gz +0 -0
- package/dist/recorder.cjs +2 -2
- package/dist/recorder.cjs.br +0 -0
- package/dist/recorder.cjs.gz +0 -0
- package/dist/recorder.js +25 -22
- package/dist/recorder.js.br +0 -0
- package/dist/recorder.js.gz +0 -0
- package/dist/recorder.umd.cjs +1310 -1127
- package/dist/recorder.umd.cjs.br +0 -0
- package/dist/recorder.umd.cjs.gz +0 -0
- package/dist/recording.js +84 -13
- package/dist/recording.js.br +0 -0
- package/dist/recording.js.gz +0 -0
- package/dist/types/chunkSerializer.d.ts +14 -0
- package/dist/types/clockSync.d.ts +70 -0
- package/dist/types/inAppReportIssueModal/integrations.d.ts +1 -0
- package/dist/types/inAppReportIssueModal/state.d.ts +2 -0
- package/dist/types/index.d.ts +16 -2
- package/dist/types/privacyMask.d.ts +46 -0
- package/dist/types/recording.d.ts +1 -0
- package/dist/types/types.d.ts +23 -0
- package/dist/types/websocket.d.ts +1 -0
- package/dist/websocket.js +111 -0
- package/dist/websocket.js.br +0 -0
- package/dist/websocket.js.gz +0 -0
- package/package.json +1 -1
- package/dist/chunks/chunkSerializer-D7_uK-dD.js +0 -94
- package/dist/chunks/chunkSerializer-D7_uK-dD.js.br +0 -0
- package/dist/chunks/chunkSerializer-D7_uK-dD.js.gz +0 -0
- package/dist/chunks/chunkSerializer-DkWXHnW4.js +0 -95
- package/dist/chunks/chunkSerializer-DkWXHnW4.js.br +0 -0
- package/dist/chunks/chunkSerializer-DkWXHnW4.js.gz +0 -0
- package/dist/chunks/index-CftVmmO9.js.br +0 -0
- package/dist/chunks/index-CftVmmO9.js.gz +0 -0
- package/dist/chunks/index-QXHuV98g.js.br +0 -0
- package/dist/chunks/index-QXHuV98g.js.gz +0 -0
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const e = require("./index-CftVmmO9.js");
|
|
4
|
-
exports.chunkedSnapshot = async function chunkedSnapshot(t, n, o = {}) {
|
|
5
|
-
const s = o.chunkSize ?? 500, r = o.maxChunkMs ?? 16, { blockClass: c, blockSelector: a, maskTextClass: i, maskTextSelector: d } = o;
|
|
6
|
-
let u = 100001, l = 0, N = performance.now();
|
|
7
|
-
function genId(e2) {
|
|
8
|
-
if (n.hasNode(e2)) return n.getId(e2);
|
|
9
|
-
const t2 = u++;
|
|
10
|
-
return n.add(e2, { id: t2 }), t2;
|
|
11
|
-
}
|
|
12
|
-
function getAttributes(e2) {
|
|
13
|
-
const t2 = {};
|
|
14
|
-
for (let n3 = 0; n3 < e2.attributes.length; n3++) {
|
|
15
|
-
const o2 = e2.attributes[n3];
|
|
16
|
-
t2[o2.name] = o2.value;
|
|
17
|
-
}
|
|
18
|
-
const n2 = e2.tagName;
|
|
19
|
-
if ("INPUT" === n2 || "TEXTAREA" === n2 || "SELECT" === n2) {
|
|
20
|
-
const n3 = e2;
|
|
21
|
-
void 0 !== n3.value && "" !== n3.value && (t2.value = n3.value);
|
|
22
|
-
}
|
|
23
|
-
if ("INPUT" === n2) {
|
|
24
|
-
const n3 = e2;
|
|
25
|
-
"checkbox" !== n3.type && "radio" !== n3.type || (t2.checked = n3.checked);
|
|
26
|
-
}
|
|
27
|
-
return "OPTION" === n2 && (t2.selected = e2.selected), t2;
|
|
28
|
-
}
|
|
29
|
-
try {
|
|
30
|
-
return await (async function serialize(n2) {
|
|
31
|
-
if (n2 !== t && !n2.parentNode) return null;
|
|
32
|
-
switch (await (async function maybeYield() {
|
|
33
|
-
l++, (l % s === 0 || performance.now() - N > r) && (await e.yieldToMain(), N = performance.now());
|
|
34
|
-
})(), n2.nodeType) {
|
|
35
|
-
case Node.DOCUMENT_NODE: {
|
|
36
|
-
const e2 = genId(n2), t2 = [];
|
|
37
|
-
for (const e3 of Array.from(n2.childNodes)) {
|
|
38
|
-
const n3 = await serialize(e3);
|
|
39
|
-
n3 && t2.push(n3);
|
|
40
|
-
}
|
|
41
|
-
return { type: 0, childNodes: t2, id: e2 };
|
|
42
|
-
}
|
|
43
|
-
case Node.DOCUMENT_TYPE_NODE: {
|
|
44
|
-
const e2 = n2;
|
|
45
|
-
return { type: 1, childNodes: [], id: genId(n2), name: e2.name, publicId: e2.publicId, systemId: e2.systemId };
|
|
46
|
-
}
|
|
47
|
-
case Node.ELEMENT_NODE: {
|
|
48
|
-
const e2 = n2, t2 = genId(n2), o2 = e2.tagName.toLowerCase(), s2 = "http://www.w3.org/2000/svg" === e2.namespaceURI || void 0;
|
|
49
|
-
if ((function isBlocked(e3) {
|
|
50
|
-
var _a;
|
|
51
|
-
if (c && ((_a = e3.classList) == null ? void 0 : _a.contains(c))) return true;
|
|
52
|
-
if (a) try {
|
|
53
|
-
if (e3.matches(a)) return true;
|
|
54
|
-
} catch {
|
|
55
|
-
}
|
|
56
|
-
return false;
|
|
57
|
-
})(e2)) return { type: 2, tagName: o2, attributes: getAttributes(e2), childNodes: [], id: t2, isSVG: s2, needBlock: true };
|
|
58
|
-
const r2 = [];
|
|
59
|
-
for (const t3 of Array.from(e2.childNodes)) {
|
|
60
|
-
if (!t3.parentNode) continue;
|
|
61
|
-
const e3 = await serialize(t3);
|
|
62
|
-
e3 && r2.push(e3);
|
|
63
|
-
}
|
|
64
|
-
const i2 = { type: 2, tagName: o2, attributes: getAttributes(e2), childNodes: r2, id: t2 };
|
|
65
|
-
return s2 && (i2.isSVG = true), i2;
|
|
66
|
-
}
|
|
67
|
-
case Node.TEXT_NODE: {
|
|
68
|
-
let e2 = n2.textContent || "";
|
|
69
|
-
const t2 = n2.parentElement, o2 = "STYLE" === (t2 == null ? void 0 : t2.tagName) || void 0;
|
|
70
|
-
!o2 && (function shouldMaskText(e3) {
|
|
71
|
-
const t3 = e3.parentElement;
|
|
72
|
-
if (!t3) return false;
|
|
73
|
-
if (i && t3.closest(`.${i}`)) return true;
|
|
74
|
-
if (d) try {
|
|
75
|
-
if (t3.closest(d)) return true;
|
|
76
|
-
} catch {
|
|
77
|
-
}
|
|
78
|
-
return false;
|
|
79
|
-
})(n2) && e2 && (e2 = e2.replace(/\S/g, "*"));
|
|
80
|
-
const s2 = { type: 3, textContent: e2, childNodes: [], id: genId(n2) };
|
|
81
|
-
return o2 && (s2.isStyle = true), s2;
|
|
82
|
-
}
|
|
83
|
-
case Node.COMMENT_NODE:
|
|
84
|
-
return { type: 5, textContent: n2.textContent || "", childNodes: [], id: genId(n2) };
|
|
85
|
-
case Node.CDATA_SECTION_NODE:
|
|
86
|
-
return { type: 4, textContent: "", childNodes: [], id: genId(n2) };
|
|
87
|
-
default:
|
|
88
|
-
return null;
|
|
89
|
-
}
|
|
90
|
-
})(t);
|
|
91
|
-
} catch (e2) {
|
|
92
|
-
return console.warn("[Sailfish] chunkSnapshot serialization error:", e2), null;
|
|
93
|
-
}
|
|
94
|
-
};
|
|
Binary file
|
|
Binary file
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
import { V as e } from "./index-QXHuV98g.js";
|
|
2
|
-
async function chunkedSnapshot(t, n, o = {}) {
|
|
3
|
-
const s = o.chunkSize ?? 500, r = o.maxChunkMs ?? 16, { blockClass: c, blockSelector: a, maskTextClass: i, maskTextSelector: d } = o;
|
|
4
|
-
let u = 100001, l = 0, N = performance.now();
|
|
5
|
-
function genId(e2) {
|
|
6
|
-
if (n.hasNode(e2)) return n.getId(e2);
|
|
7
|
-
const t2 = u++;
|
|
8
|
-
return n.add(e2, { id: t2 }), t2;
|
|
9
|
-
}
|
|
10
|
-
function getAttributes(e2) {
|
|
11
|
-
const t2 = {};
|
|
12
|
-
for (let n3 = 0; n3 < e2.attributes.length; n3++) {
|
|
13
|
-
const o2 = e2.attributes[n3];
|
|
14
|
-
t2[o2.name] = o2.value;
|
|
15
|
-
}
|
|
16
|
-
const n2 = e2.tagName;
|
|
17
|
-
if ("INPUT" === n2 || "TEXTAREA" === n2 || "SELECT" === n2) {
|
|
18
|
-
const n3 = e2;
|
|
19
|
-
void 0 !== n3.value && "" !== n3.value && (t2.value = n3.value);
|
|
20
|
-
}
|
|
21
|
-
if ("INPUT" === n2) {
|
|
22
|
-
const n3 = e2;
|
|
23
|
-
"checkbox" !== n3.type && "radio" !== n3.type || (t2.checked = n3.checked);
|
|
24
|
-
}
|
|
25
|
-
return "OPTION" === n2 && (t2.selected = e2.selected), t2;
|
|
26
|
-
}
|
|
27
|
-
try {
|
|
28
|
-
return await (async function serialize(n2) {
|
|
29
|
-
if (n2 !== t && !n2.parentNode) return null;
|
|
30
|
-
switch (await (async function maybeYield() {
|
|
31
|
-
l++, (l % s === 0 || performance.now() - N > r) && (await e(), N = performance.now());
|
|
32
|
-
})(), n2.nodeType) {
|
|
33
|
-
case Node.DOCUMENT_NODE: {
|
|
34
|
-
const e2 = genId(n2), t2 = [];
|
|
35
|
-
for (const e3 of Array.from(n2.childNodes)) {
|
|
36
|
-
const n3 = await serialize(e3);
|
|
37
|
-
n3 && t2.push(n3);
|
|
38
|
-
}
|
|
39
|
-
return { type: 0, childNodes: t2, id: e2 };
|
|
40
|
-
}
|
|
41
|
-
case Node.DOCUMENT_TYPE_NODE: {
|
|
42
|
-
const e2 = n2;
|
|
43
|
-
return { type: 1, childNodes: [], id: genId(n2), name: e2.name, publicId: e2.publicId, systemId: e2.systemId };
|
|
44
|
-
}
|
|
45
|
-
case Node.ELEMENT_NODE: {
|
|
46
|
-
const e2 = n2, t2 = genId(n2), o2 = e2.tagName.toLowerCase(), s2 = "http://www.w3.org/2000/svg" === e2.namespaceURI || void 0;
|
|
47
|
-
if ((function isBlocked(e3) {
|
|
48
|
-
var _a;
|
|
49
|
-
if (c && ((_a = e3.classList) == null ? void 0 : _a.contains(c))) return true;
|
|
50
|
-
if (a) try {
|
|
51
|
-
if (e3.matches(a)) return true;
|
|
52
|
-
} catch {
|
|
53
|
-
}
|
|
54
|
-
return false;
|
|
55
|
-
})(e2)) return { type: 2, tagName: o2, attributes: getAttributes(e2), childNodes: [], id: t2, isSVG: s2, needBlock: true };
|
|
56
|
-
const r2 = [];
|
|
57
|
-
for (const t3 of Array.from(e2.childNodes)) {
|
|
58
|
-
if (!t3.parentNode) continue;
|
|
59
|
-
const e3 = await serialize(t3);
|
|
60
|
-
e3 && r2.push(e3);
|
|
61
|
-
}
|
|
62
|
-
const i2 = { type: 2, tagName: o2, attributes: getAttributes(e2), childNodes: r2, id: t2 };
|
|
63
|
-
return s2 && (i2.isSVG = true), i2;
|
|
64
|
-
}
|
|
65
|
-
case Node.TEXT_NODE: {
|
|
66
|
-
let e2 = n2.textContent || "";
|
|
67
|
-
const t2 = n2.parentElement, o2 = "STYLE" === (t2 == null ? void 0 : t2.tagName) || void 0;
|
|
68
|
-
!o2 && (function shouldMaskText(e3) {
|
|
69
|
-
const t3 = e3.parentElement;
|
|
70
|
-
if (!t3) return false;
|
|
71
|
-
if (i && t3.closest(`.${i}`)) return true;
|
|
72
|
-
if (d) try {
|
|
73
|
-
if (t3.closest(d)) return true;
|
|
74
|
-
} catch {
|
|
75
|
-
}
|
|
76
|
-
return false;
|
|
77
|
-
})(n2) && e2 && (e2 = e2.replace(/\S/g, "*"));
|
|
78
|
-
const s2 = { type: 3, textContent: e2, childNodes: [], id: genId(n2) };
|
|
79
|
-
return o2 && (s2.isStyle = true), s2;
|
|
80
|
-
}
|
|
81
|
-
case Node.COMMENT_NODE:
|
|
82
|
-
return { type: 5, textContent: n2.textContent || "", childNodes: [], id: genId(n2) };
|
|
83
|
-
case Node.CDATA_SECTION_NODE:
|
|
84
|
-
return { type: 4, textContent: "", childNodes: [], id: genId(n2) };
|
|
85
|
-
default:
|
|
86
|
-
return null;
|
|
87
|
-
}
|
|
88
|
-
})(t);
|
|
89
|
-
} catch (e2) {
|
|
90
|
-
return console.warn("[Sailfish] chunkSnapshot serialization error:", e2), null;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
export {
|
|
94
|
-
chunkedSnapshot
|
|
95
|
-
};
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|