@absolutejs/beacon 0.6.57 → 0.6.58

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 CHANGED
@@ -142,7 +142,8 @@ beacon.captureMessage("checkout started", "info");
142
142
  become warning issues: scroll jail (a leaked modal scroll lock), stuck
143
143
  loading (`aria-busy`/`role="progressbar"` that never resolves), occluded
144
144
  controls (leaked scrims/z-index bugs, skipped while a dialog is open),
145
- invisible text (fg composites to its background — theme-token bugs),
145
+ invisible headings, controls, and semantic prose (fg composites to its
146
+ background — theme-token bugs),
146
147
  stalled `EventSource` streams, WebSocket connect/close flapping, request
147
148
  storms (one endpoint hammered in seconds), reload loops, stale releases (a
148
149
  service worker serving a build older than one this browser already ran),
package/dist/index.d.ts CHANGED
@@ -107,7 +107,7 @@ export declare const BEACON_ATTRIBUTE: {
107
107
  /** Response header used to correlate a browser signal with its server request. */
108
108
  export declare const BEACON_TRACE_HEADER = "x-absolute-trace-id";
109
109
  /** Beacon package version retained with every captured event. */
110
- export declare const BEACON_SDK_VERSION = "0.6.57";
110
+ export declare const BEACON_SDK_VERSION = "0.6.58";
111
111
  /** Arbitrary event tags, with Beacon's reserved `signal` tag type-checked. */
112
112
  export type BeaconTags = Record<string, string> & {
113
113
  signal?: BeaconSignal;
package/dist/index.js CHANGED
@@ -76,7 +76,7 @@ var BEACON_ATTRIBUTE = {
76
76
  THEME: "data-beacon-theme"
77
77
  };
78
78
  var BEACON_TRACE_HEADER = "x-absolute-trace-id";
79
- var BEACON_SDK_VERSION = "0.6.57";
79
+ var BEACON_SDK_VERSION = "0.6.58";
80
80
  var inBrowser = () => typeof window !== "undefined";
81
81
  var newId = () => {
82
82
  if (typeof crypto !== "undefined" && typeof crypto.randomUUID === "function") {
@@ -2463,9 +2463,14 @@ var createBeacon = (options) => {
2463
2463
  const scanForInvisibleText = () => {
2464
2464
  const viewportWidth = document.documentElement.clientWidth;
2465
2465
  const viewportHeight = document.documentElement.clientHeight;
2466
- const candidates = document.querySelectorAll('h1, h2, h3, button, a[href], label, [role="button"]');
2466
+ const priorityCandidates = document.querySelectorAll('h1, h2, h3, button, a[href], label, [role="button"]');
2467
+ const proseCandidates = document.querySelectorAll("p, li, dt, dd, td, th, blockquote, figcaption");
2468
+ const candidates = [
2469
+ ...Array.from(priorityCandidates),
2470
+ ...Array.from(proseCandidates)
2471
+ ];
2467
2472
  let sampled = 0;
2468
- for (const element of Array.from(candidates)) {
2473
+ for (const element of candidates) {
2469
2474
  if (sampled >= INVISIBLE_TEXT_SAMPLE_LIMIT)
2470
2475
  return;
2471
2476
  if (isScanExempt(element))
@@ -4538,5 +4543,5 @@ export {
4538
4543
  BEACON_ATTRIBUTE
4539
4544
  };
4540
4545
 
4541
- //# debugId=B8C645D9177F5D9E64756E2164756E21
4546
+ //# debugId=D975CF731E75A99264756E2164756E21
4542
4547
  //# sourceMappingURL=index.js.map