@bobfrankston/rmfmail 1.1.80 → 1.1.81

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
@@ -307,6 +307,14 @@ function showAlert(message, key, opts) {
307
307
  }
308
308
  }
309
309
  }
310
+ // Non-blocking alert channel for components that can't import showAlert
311
+ // directly (message-viewer, etc.). They dispatch a `mailx-alert` CustomEvent
312
+ // rather than calling the blocking window.alert().
313
+ window.addEventListener("mailx-alert", (e) => {
314
+ const d = e.detail || {};
315
+ if (d.message)
316
+ showAlert(String(d.message), d.key);
317
+ });
310
318
  function hideAlert() {
311
319
  if (alertBanner) {
312
320
  const key = alertBanner.dataset.key;