@mushi-mushi/web 1.37.3 → 1.38.0
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 +1 -1
- package/dist/headless.cjs +14 -2
- package/dist/headless.cjs.map +1 -1
- package/dist/headless.d.cts +1 -1
- package/dist/headless.d.ts +7 -1
- package/dist/headless.js +14 -2
- package/dist/headless.js.map +1 -1
- package/dist/i18n/index.cjs +5 -0
- package/dist/i18n/index.cjs.map +1 -1
- package/dist/i18n/index.d.cts +2 -0
- package/dist/i18n/index.d.ts +2 -0
- package/dist/i18n/index.js +5 -0
- package/dist/i18n/index.js.map +1 -1
- package/dist/index.cjs +106 -18
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +11 -2
- package/dist/index.d.ts +18 -1
- package/dist/index.js +106 -18
- package/dist/index.js.map +1 -1
- package/dist/mushi.loader.global.js +22 -22
- package/dist/test-utils.cjs.map +1 -1
- package/dist/test-utils.js.map +1 -1
- package/dist/{timeline-BUrJ4n9r.d.cts → timeline-DoBCj4dt.d.cts} +7 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -44,7 +44,7 @@ Building in Lovable or Bolt with no terminal? A script tag works too: [Mushi Mus
|
|
|
44
44
|
| **Privacy** | A built-in PII scrubber, selector masking for screenshots, and opt-in session replay. |
|
|
45
45
|
| **Stays out of the way** | Zero-size host with `pointer-events: none`, keyboard-first, respects reduced motion. |
|
|
46
46
|
| **Runtime config** | Change the widget from the console without a deploy. Values you set in code win. |
|
|
47
|
-
| **Size** | CI caps the core bundle at
|
|
47
|
+
| **Size** | CI caps the core bundle at 89.2 KB gzipped (105 KB uncompressed). Screenshot capture, screenshot markup and the Your reports views load only when used. |
|
|
48
48
|
|
|
49
49
|
## Recipes
|
|
50
50
|
|
package/dist/headless.cjs
CHANGED
|
@@ -1215,7 +1215,7 @@ function createPerformanceCapture() {
|
|
|
1215
1215
|
}
|
|
1216
1216
|
};
|
|
1217
1217
|
}
|
|
1218
|
-
function createElementSelector() {
|
|
1218
|
+
function createElementSelector(privateSelector = () => "", scrubText = (text) => text) {
|
|
1219
1219
|
let active = false;
|
|
1220
1220
|
let overlay = null;
|
|
1221
1221
|
let captureLayer = null;
|
|
@@ -1248,6 +1248,18 @@ function createElementSelector() {
|
|
|
1248
1248
|
}
|
|
1249
1249
|
return "//" + parts.join("/");
|
|
1250
1250
|
}
|
|
1251
|
+
function elementText(el) {
|
|
1252
|
+
const selector = privateSelector();
|
|
1253
|
+
if (selector) {
|
|
1254
|
+
try {
|
|
1255
|
+
if (el.closest(selector) || el.querySelector(selector)) return void 0;
|
|
1256
|
+
} catch {
|
|
1257
|
+
return void 0;
|
|
1258
|
+
}
|
|
1259
|
+
}
|
|
1260
|
+
const text = el.textContent?.trim().slice(0, 200);
|
|
1261
|
+
return text ? scrubText(text) : void 0;
|
|
1262
|
+
}
|
|
1251
1263
|
function captureElement(el) {
|
|
1252
1264
|
const rect = el.getBoundingClientRect();
|
|
1253
1265
|
const className = typeof el.className === "string" ? el.className : el.getAttribute("class") ?? "";
|
|
@@ -1255,7 +1267,7 @@ function createElementSelector() {
|
|
|
1255
1267
|
tagName: el.tagName.toLowerCase(),
|
|
1256
1268
|
id: el.id || void 0,
|
|
1257
1269
|
className: className || void 0,
|
|
1258
|
-
textContent: el
|
|
1270
|
+
textContent: elementText(el),
|
|
1259
1271
|
xpath: getXPath(el),
|
|
1260
1272
|
rect: {
|
|
1261
1273
|
x: Math.round(rect.x),
|