@absolutejs/beacon 0.6.46 → 0.6.48

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 CHANGED
@@ -322,7 +322,7 @@ var matchesErrorMessage = (event, expected) => expected.has(event.message) || ex
322
322
  var isInstagramIosBridgeInjection = (event, userAgent) => INSTAGRAM_IOS_IN_APP_BROWSER.test(userAgent) && matchesErrorMessage(event, META_IOS_WEBKIT_BRIDGE_FAILURES) && event.stack?.includes("sendDataToNative") === true && event.stack.includes("sendPageHideMessage");
323
323
  var FACEBOOK_ANDROID_DETACHED_BRIDGE_MESSAGE = "Error invoking postMessage: Java object is gone";
324
324
  var FACEBOOK_ANDROID_PERFORMANCE_LOGGER = "iabjs://navigation_performance_logger_android";
325
- var KNOWN_CRAWLER_USER_AGENT = /(?:AdsBot-Google|Googlebot|bingbot|Baiduspider|YandexBot|DuckDuckBot|Applebot|Bytespider|PetalBot|SemrushBot|AhrefsBot|DotBot|MJ12bot|GPTBot|ClaudeBot|PerplexityBot|Google-NotebookLM|BitSightBot|Dataprovider\.com|meta-external(?:agent|ads))/i;
325
+ var KNOWN_CRAWLER_USER_AGENT = /(?:AdsBot-Google|Googlebot|bingbot|Baiduspider|YandexBot|DuckDuckBot|Applebot|Bytespider|PetalBot|SemrushBot|AhrefsBot|DotBot|MJ12bot|GPTBot|ClaudeBot|PerplexityBot|Google-NotebookLM|BitSightBot|Dataprovider\.com|HubSpot Crawler|meta-external(?:agent|ads))/i;
326
326
  var GOOGLE_WEB_RENDERER_SERVICE_WORKER_WRAPPER = "wrsParams.serviceWorkers.navigator.serviceWorker.register";
327
327
  var EXTENSION_STACK_PROTOCOL = /(?:chrome|moz|safari-web)-extension:\/\//u;
328
328
  var isExtensionOnlyStack = (event) => {
@@ -475,6 +475,7 @@ var UUID_PATH_SEGMENT = /\b[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-
475
475
  var LONG_IDENTIFIER_SEGMENT = /\b(?:[0-9a-f]{16,}|\d{8,})\b/giu;
476
476
  var VOLATILE_SIGNAL_TAGS = new Set([
477
477
  "actionId",
478
+ "attemptCount",
478
479
  "blockingDurationMs",
479
480
  "blockingFrameDurationMs",
480
481
  "blockerLocations",
@@ -491,6 +492,7 @@ var VOLATILE_SIGNAL_TAGS = new Set([
491
492
  "obscuredPx",
492
493
  "presentationDelayMs",
493
494
  "processingDurationMs",
495
+ "reportDelayMs",
494
496
  "responseMs",
495
497
  "shiftValue",
496
498
  "signal",
@@ -1223,17 +1225,19 @@ var createBeacon = (options) => {
1223
1225
  for (const [kind, failures] of groups) {
1224
1226
  const newestFailureAt = Math.max(...failures.map(({ at }) => at));
1225
1227
  const reportDelayMs = Math.max(0, Date.now() - newestFailureAt);
1226
- const endpoints = [...new Set(failures.map(({ endpoint: endpoint2 }) => endpoint2))];
1227
- const methods = [...new Set(failures.map(({ method }) => method))];
1228
+ const endpoints = [
1229
+ ...new Set(failures.map(({ endpoint: endpoint2 }) => endpoint2))
1230
+ ].sort();
1231
+ const methods = [...new Set(failures.map(({ method }) => method))].sort();
1228
1232
  const onlineStates = [
1229
1233
  ...new Set(failures.map(({ online }) => String(online)))
1230
- ];
1234
+ ].sort();
1231
1235
  const transports = [
1232
1236
  ...new Set(failures.map(({ transport: transport2 }) => transport2))
1233
- ];
1237
+ ].sort();
1234
1238
  const visibilityStates = [
1235
1239
  ...new Set(failures.map(({ visibilityState }) => visibilityState))
1236
- ];
1240
+ ].sort();
1237
1241
  const suspendedBackgroundTransport = kind === "transport" && failures.every(({ visibilityState }) => visibilityState === "hidden") && reportDelayMs >= SUSPENDED_BACKGROUND_FAILURE_MS;
1238
1242
  if (suspendedBackgroundTransport) {
1239
1243
  addBreadcrumb({
@@ -1880,6 +1884,9 @@ var createBeacon = (options) => {
1880
1884
  const hasHiddenAncestor = (element, requirePointerEvents = false) => {
1881
1885
  let current = element;
1882
1886
  while (current !== null) {
1887
+ if (current instanceof HTMLDetailsElement && !current.open && current.querySelector(":scope > summary")?.contains(element) !== true) {
1888
+ return true;
1889
+ }
1883
1890
  if (current.hasAttribute("hidden") || current.hasAttribute("inert") || current.getAttribute("aria-hidden") === "true") {
1884
1891
  return true;
1885
1892
  }
@@ -2665,11 +2672,14 @@ var createBeacon = (options) => {
2665
2672
  const hasPhaseTiming = typeof entry.processingStart === "number" && typeof entry.processingEnd === "number";
2666
2673
  const processingDurationMs = hasPhaseTiming ? Math.round(Math.max(0, entry.processingEnd - entry.processingStart)) : undefined;
2667
2674
  const presentationDelayMs = hasPhaseTiming ? Math.round(Math.max(0, interactionEnd - entry.processingEnd)) : undefined;
2675
+ const inputDelayMs = hasPhaseTiming ? Math.round(Math.max(0, entry.processingStart - entry.startTime)) : undefined;
2668
2676
  if (target === "unknown" && overlappingFrame === undefined && processingDurationMs !== undefined && processingDurationMs <= 16 && presentationDelayMs !== undefined && presentationDelayMs >= minimum)
2669
2677
  continue;
2678
+ if (blockingObserver !== undefined && overlappingFrame === undefined && inputDelayMs !== undefined && inputDelayMs >= minimum && processingDurationMs !== undefined && processingDurationMs <= 16 && presentationDelayMs !== undefined && presentationDelayMs < minimum)
2679
+ continue;
2670
2680
  emitSignal(`Slow interaction — ${entry.name} took ${Math.round(entry.duration)}ms — ${shortUrl(location.href)}`, {
2671
2681
  ...hasPhaseTiming ? {
2672
- inputDelayMs: String(Math.round(Math.max(0, entry.processingStart - entry.startTime))),
2682
+ inputDelayMs: String(inputDelayMs),
2673
2683
  presentationDelayMs: String(presentationDelayMs),
2674
2684
  processingDurationMs: String(processingDurationMs)
2675
2685
  } : { phaseAttribution: "unavailable" },
@@ -4300,5 +4310,5 @@ export {
4300
4310
  BEACON_ATTRIBUTE
4301
4311
  };
4302
4312
 
4303
- //# debugId=F6CB1E584C36B1B164756E2164756E21
4313
+ //# debugId=EE7CBD85B0917E7564756E2164756E21
4304
4314
  //# sourceMappingURL=index.js.map