@absolutejs/beacon 0.6.18 → 0.6.19

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,6 +142,9 @@ beacon.captureMessage("checkout started", "info");
142
142
  inverted brand/media surfaces use `data-beacon-theme="allow"`. Loading UI
143
143
  participates through native `aria-busy`/`role="progressbar"` semantics or
144
144
  `data-beacon-loading`, without coupling the SDK to framework class names.
145
+ Determinate progressbars with `aria-valuenow` are persistent status meters,
146
+ not loaders, unless also marked with `aria-busy="true"` or
147
+ `data-beacon-loading`.
145
148
  Long-running loaders can set `data-beacon-loading-timeout="60000"` to
146
149
  override the global stuck-loading deadline for that element only.
147
150
  - **Browser capability failures** — rejected clipboard writes are observed even
package/dist/index.js CHANGED
@@ -2181,6 +2181,7 @@ var createBeacon = (options) => {
2181
2181
  };
2182
2182
  const loadingFirstSeen = new WeakMap;
2183
2183
  const reportedStuckLoading = new WeakSet;
2184
+ const isPersistentDeterminateProgress = (indicator) => indicator.getAttribute("role") === "progressbar" && indicator.hasAttribute("aria-valuenow") && indicator.getAttribute("aria-busy") !== "true" && !indicator.hasAttribute(BEACON_ATTRIBUTE.LOADING);
2184
2185
  const loadingDeadlineMs = (indicator) => {
2185
2186
  const configured = indicator.getAttribute(BEACON_ATTRIBUTE.LOADING_TIMEOUT)?.trim();
2186
2187
  if (!configured)
@@ -2194,6 +2195,8 @@ var createBeacon = (options) => {
2194
2195
  const indicators = document.querySelectorAll(`[aria-busy="true"], [role="progressbar"], [${BEACON_ATTRIBUTE.LOADING}]`);
2195
2196
  const now = Date.now();
2196
2197
  for (const indicator of Array.from(indicators)) {
2198
+ if (isPersistentDeterminateProgress(indicator))
2199
+ continue;
2197
2200
  if (isScanExempt(indicator))
2198
2201
  continue;
2199
2202
  const rect = indicator.getBoundingClientRect();
@@ -3800,5 +3803,5 @@ export {
3800
3803
  BEACON_ATTRIBUTE
3801
3804
  };
3802
3805
 
3803
- //# debugId=41713D2C1F9DB43B64756E2164756E21
3806
+ //# debugId=F9CD9BC8D9B8849F64756E2164756E21
3804
3807
  //# sourceMappingURL=index.js.map