web-remarq 0.4.8 → 0.5.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/dist/index.js CHANGED
@@ -1325,7 +1325,9 @@ function describeElement(el) {
1325
1325
  if (el.id) {
1326
1326
  parts.push(`#${el.id}`);
1327
1327
  }
1328
- const classes = Array.from(el.classList).filter((c) => !c.match(/^(sc-|css-)/) && !c.match(/^[a-zA-Z0-9]{8,}$/) && !c.match(/__[a-zA-Z0-9]{3,}$/)).slice(0, 2);
1328
+ const classes = Array.from(el.classList).filter(
1329
+ (c) => !c.match(/^(sc-|css-)/) && !c.match(/^[a-zA-Z0-9]{8,}$/) && !c.match(/__[a-zA-Z0-9]{3,}$/)
1330
+ ).slice(0, 2);
1329
1331
  if (classes.length) {
1330
1332
  parts.push(`.${classes.join(".")}`);
1331
1333
  }
@@ -1411,7 +1413,13 @@ var SpacingOverlay = class {
1411
1413
  const contentTop = border.top + padding.top;
1412
1414
  const contentW = w - border.left - border.right - padding.left - padding.right;
1413
1415
  const contentH = h - border.top - border.bottom - padding.top - padding.bottom;
1414
- this.positionEl(this.contentEl, contentLeft, contentTop, contentW, contentH);
1416
+ this.positionEl(
1417
+ this.contentEl,
1418
+ contentLeft,
1419
+ contentTop,
1420
+ contentW,
1421
+ contentH
1422
+ );
1415
1423
  this.clearLabels();
1416
1424
  this.clearGaps();
1417
1425
  this.addMarginPaddingLabels(
@@ -1468,7 +1476,9 @@ var SpacingOverlay = class {
1468
1476
  return {
1469
1477
  top: parsePx(cs[`${prop}Top`]),
1470
1478
  right: parsePx(cs[`${prop}Right`]),
1471
- bottom: parsePx(cs[`${prop}Bottom`]),
1479
+ bottom: parsePx(
1480
+ cs[`${prop}Bottom`]
1481
+ ),
1472
1482
  left: parsePx(cs[`${prop}Left`])
1473
1483
  };
1474
1484
  }
@@ -2089,6 +2099,7 @@ var SHORTCUTS = [
2089
2099
  { key: `${modKey2}+I`, description: "Toggle inspect mode" },
2090
2100
  { key: "S", description: "Toggle spacing overlay", context: "inspect" },
2091
2101
  { key: `${modKey2}+C`, description: "Copy all annotations to clipboard" },
2102
+ { key: `${modKey2}+D`, description: "Delete all annotations" },
2092
2103
  { key: "Esc", description: "Exit inspect mode / close popup" },
2093
2104
  { key: "?", description: "Show this help" },
2094
2105
  { key: "Enter", description: "Submit annotation", context: "popup" },
@@ -2382,6 +2393,13 @@ function handleInspectKeydown(e) {
2382
2393
  e.preventDefault();
2383
2394
  copyToClipboard();
2384
2395
  }
2396
+ if (e.altKey && e.code === "KeyD") {
2397
+ e.preventDefault();
2398
+ elementCache.clear();
2399
+ storage.clearAll();
2400
+ refreshMarkers();
2401
+ showToast(themeManager.container, "All annotations cleared");
2402
+ }
2385
2403
  if (e.key === "?") {
2386
2404
  showShortcutsModal(themeManager.container);
2387
2405
  }