@bobfrankston/mailx 1.0.16 → 1.0.17

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/client/app.js CHANGED
@@ -309,6 +309,19 @@ window.addEventListener("message", (e) => {
309
309
  if (e.data?.type === "openLink" && e.data.url) {
310
310
  window.open(e.data.url, "_blank", "noopener,noreferrer");
311
311
  }
312
+ if (e.data?.type === "linkHover") {
313
+ const statusEl = document.getElementById("status-sync");
314
+ if (statusEl) {
315
+ if (e.data.url) {
316
+ statusEl.textContent = e.data.url;
317
+ statusEl.style.color = "var(--color-text-muted)";
318
+ }
319
+ else {
320
+ statusEl.textContent = "";
321
+ statusEl.style.color = "";
322
+ }
323
+ }
324
+ }
312
325
  });
313
326
  // ── Splitter drag ──
314
327
  const splitter = document.getElementById("splitter-h");
@@ -265,7 +265,7 @@ function wrapHtmlBody(html, allowRemote = false) {
265
265
  // CSP blocks remote resource loading (tracking pixels, external CSS) but allows link clicks
266
266
  const csp = allowRemote
267
267
  ? ""
268
- : `<meta http-equiv="Content-Security-Policy" content="default-src 'none'; style-src 'unsafe-inline'; img-src data: cid:; form-action 'none';">`;
268
+ : `<meta http-equiv="Content-Security-Policy" content="default-src 'none'; script-src 'unsafe-inline'; style-src 'unsafe-inline'; img-src data: cid:; form-action 'none';">`;
269
269
  return `<!DOCTYPE html>
270
270
  <html><head>
271
271
  <meta charset="UTF-8">
@@ -293,6 +293,12 @@ ${csp}
293
293
  }
294
294
  </style>
295
295
  <base target="_blank">
296
+ <script>
297
+ document.addEventListener("mouseover", e => {
298
+ const a = e.target.closest("a[href]");
299
+ window.parent.postMessage({ type: "linkHover", url: a ? a.href : "" }, "*");
300
+ });
301
+ </script>
296
302
  </head><body>${html}</body></html>`;
297
303
  }
298
304
  //# sourceMappingURL=message-viewer.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bobfrankston/mailx",
3
- "version": "1.0.16",
3
+ "version": "1.0.17",
4
4
  "description": "Local-first email client with IMAP sync and standalone native app",
5
5
  "type": "module",
6
6
  "main": "bin/mailx.js",