@absolutejs/beacon 0.6.27 → 0.6.29
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/index.js +19 -3
- package/dist/index.js.map +3 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -784,6 +784,7 @@ var createBeacon = (options) => {
|
|
|
784
784
|
let networkRequestCount = 0;
|
|
785
785
|
let externalNavigationCount = 0;
|
|
786
786
|
let externalShareCount = 0;
|
|
787
|
+
let nativeFilePickerCount = 0;
|
|
787
788
|
let clipboardWriteCount = 0;
|
|
788
789
|
let inSignalConsole = false;
|
|
789
790
|
let pageLifecycleEnding = false;
|
|
@@ -1278,6 +1279,7 @@ var createBeacon = (options) => {
|
|
|
1278
1279
|
const networkRequestsBefore = networkRequestCount;
|
|
1279
1280
|
const externalNavigationsBefore = externalNavigationCount;
|
|
1280
1281
|
const externalSharesBefore = externalShareCount;
|
|
1282
|
+
const nativeFilePickersBefore = nativeFilePickerCount;
|
|
1281
1283
|
const clipboardWritesBefore = clipboardWriteCount;
|
|
1282
1284
|
let routerAcceptedNavigation = false;
|
|
1283
1285
|
let mutated = false;
|
|
@@ -1289,7 +1291,7 @@ var createBeacon = (options) => {
|
|
|
1289
1291
|
return;
|
|
1290
1292
|
routerAcceptedNavigation = control instanceof HTMLAnchorElement && handledEvent.defaultPrevented;
|
|
1291
1293
|
};
|
|
1292
|
-
const responded = () => mutated || formStateChanged(formBefore) || location.href !== urlBefore || window.scrollY !== scrollBefore || document.activeElement !== activeBefore || networkRequestCount !== networkRequestsBefore || externalNavigationCount !== externalNavigationsBefore || externalShareCount !== externalSharesBefore || clipboardWriteCount !== clipboardWritesBefore;
|
|
1294
|
+
const responded = () => mutated || formStateChanged(formBefore) || location.href !== urlBefore || window.scrollY !== scrollBefore || document.activeElement !== activeBefore || networkRequestCount !== networkRequestsBefore || externalNavigationCount !== externalNavigationsBefore || externalShareCount !== externalSharesBefore || nativeFilePickerCount !== nativeFilePickersBefore || clipboardWriteCount !== clipboardWritesBefore;
|
|
1293
1295
|
const finish = (didRespond, navigationStalled = false) => {
|
|
1294
1296
|
if (finished)
|
|
1295
1297
|
return;
|
|
@@ -1710,6 +1712,20 @@ var createBeacon = (options) => {
|
|
|
1710
1712
|
});
|
|
1711
1713
|
} catch {}
|
|
1712
1714
|
}
|
|
1715
|
+
const inputPrototype = HTMLInputElement.prototype;
|
|
1716
|
+
const originalInputClick = inputPrototype.click;
|
|
1717
|
+
const wrappedInputClick = function() {
|
|
1718
|
+
originalInputClick.call(this);
|
|
1719
|
+
if (this.type === "file")
|
|
1720
|
+
nativeFilePickerCount += 1;
|
|
1721
|
+
};
|
|
1722
|
+
try {
|
|
1723
|
+
inputPrototype.click = wrappedInputClick;
|
|
1724
|
+
cleanups.push(() => {
|
|
1725
|
+
if (inputPrototype.click === wrappedInputClick)
|
|
1726
|
+
inputPrototype.click = originalInputClick;
|
|
1727
|
+
});
|
|
1728
|
+
} catch {}
|
|
1713
1729
|
}
|
|
1714
1730
|
let unresponsiveClicks = [];
|
|
1715
1731
|
const onClick = (event) => {
|
|
@@ -3605,7 +3621,7 @@ var createBeacon = (options) => {
|
|
|
3605
3621
|
const navigation = performance.getEntriesByType("navigation")[0];
|
|
3606
3622
|
if (navigation?.type !== "back_forward") {
|
|
3607
3623
|
const now = Date.now();
|
|
3608
|
-
const route =
|
|
3624
|
+
const route = shortUrl(location.href);
|
|
3609
3625
|
const raw = sessionStorage.getItem(RELOAD_LOOP_STORAGE_KEY);
|
|
3610
3626
|
const parsed = raw === null ? [] : JSON.parse(raw);
|
|
3611
3627
|
const history2 = (Array.isArray(parsed) ? parsed : []).filter((entry) => entry !== null && typeof entry === "object" && typeof entry.at === "number" && typeof entry.route === "string" && now - entry.at < RELOAD_LOOP_WINDOW_MS);
|
|
@@ -3929,5 +3945,5 @@ export {
|
|
|
3929
3945
|
BEACON_ATTRIBUTE
|
|
3930
3946
|
};
|
|
3931
3947
|
|
|
3932
|
-
//# debugId=
|
|
3948
|
+
//# debugId=246B1E57D884526864756E2164756E21
|
|
3933
3949
|
//# sourceMappingURL=index.js.map
|