web-remarq 0.4.8 → 0.4.9

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.
@@ -1348,7 +1348,9 @@ var WebRemarq = (() => {
1348
1348
  if (el.id) {
1349
1349
  parts.push(`#${el.id}`);
1350
1350
  }
1351
- 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);
1351
+ const classes = Array.from(el.classList).filter(
1352
+ (c) => !c.match(/^(sc-|css-)/) && !c.match(/^[a-zA-Z0-9]{8,}$/) && !c.match(/__[a-zA-Z0-9]{3,}$/)
1353
+ ).slice(0, 2);
1352
1354
  if (classes.length) {
1353
1355
  parts.push(`.${classes.join(".")}`);
1354
1356
  }
@@ -1434,7 +1436,13 @@ var WebRemarq = (() => {
1434
1436
  const contentTop = border.top + padding.top;
1435
1437
  const contentW = w - border.left - border.right - padding.left - padding.right;
1436
1438
  const contentH = h - border.top - border.bottom - padding.top - padding.bottom;
1437
- this.positionEl(this.contentEl, contentLeft, contentTop, contentW, contentH);
1439
+ this.positionEl(
1440
+ this.contentEl,
1441
+ contentLeft,
1442
+ contentTop,
1443
+ contentW,
1444
+ contentH
1445
+ );
1438
1446
  this.clearLabels();
1439
1447
  this.clearGaps();
1440
1448
  this.addMarginPaddingLabels(
@@ -1491,7 +1499,9 @@ var WebRemarq = (() => {
1491
1499
  return {
1492
1500
  top: parsePx(cs[`${prop}Top`]),
1493
1501
  right: parsePx(cs[`${prop}Right`]),
1494
- bottom: parsePx(cs[`${prop}Bottom`]),
1502
+ bottom: parsePx(
1503
+ cs[`${prop}Bottom`]
1504
+ ),
1495
1505
  left: parsePx(cs[`${prop}Left`])
1496
1506
  };
1497
1507
  }
@@ -2112,6 +2122,7 @@ var WebRemarq = (() => {
2112
2122
  { key: `${modKey2}+I`, description: "Toggle inspect mode" },
2113
2123
  { key: "S", description: "Toggle spacing overlay", context: "inspect" },
2114
2124
  { key: `${modKey2}+C`, description: "Copy all annotations to clipboard" },
2125
+ { key: `${modKey2}+D`, description: "Delete all annotations" },
2115
2126
  { key: "Esc", description: "Exit inspect mode / close popup" },
2116
2127
  { key: "?", description: "Show this help" },
2117
2128
  { key: "Enter", description: "Submit annotation", context: "popup" },
@@ -2405,6 +2416,13 @@ var WebRemarq = (() => {
2405
2416
  e.preventDefault();
2406
2417
  copyToClipboard();
2407
2418
  }
2419
+ if (e.altKey && e.code === "KeyD") {
2420
+ e.preventDefault();
2421
+ elementCache.clear();
2422
+ storage.clearAll();
2423
+ refreshMarkers();
2424
+ showToast(themeManager.container, "All annotations cleared");
2425
+ }
2408
2426
  if (e.key === "?") {
2409
2427
  showShortcutsModal(themeManager.container);
2410
2428
  }