@bobfrankston/rmfmail 1.2.117 → 1.2.119

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.ts CHANGED
@@ -5616,6 +5616,7 @@ document.addEventListener("mailx-popout-message", (async (e: any) => {
5616
5616
  accountId,
5617
5617
  to: msg.to || [],
5618
5618
  cc: msg.cc || [],
5619
+ bcc: msg.bcc || [],
5619
5620
  subject: msg.subject || subject || "",
5620
5621
  bodyHtml: msg.bodyHtml || "",
5621
5622
  inReplyTo: msg.inReplyTo || "",
@@ -3404,6 +3404,31 @@ function createQuillEditor(container2) {
3404
3404
  }
3405
3405
  }
3406
3406
  }, true);
3407
+ q.on("text-change", (delta, _old, source) => {
3408
+ if (source !== "user")
3409
+ return;
3410
+ const inserted = (delta.ops || []).reduce((s, op) => typeof op.insert === "string" ? s + op.insert : s, "");
3411
+ if (!inserted || !/\s$/.test(inserted))
3412
+ return;
3413
+ const sel = q.getSelection();
3414
+ if (!sel)
3415
+ return;
3416
+ const boundary = sel.index - 1;
3417
+ const lookback = Math.min(boundary, 512);
3418
+ const before = q.getText(boundary - lookback, lookback);
3419
+ const m = before.match(/(?:https?:\/\/|www\.)\S+$/i);
3420
+ if (!m)
3421
+ return;
3422
+ const word = m[0].replace(/[),.;:!?\]]+$/, "");
3423
+ if (!looksLikeUrl(word))
3424
+ return;
3425
+ const start = boundary - m[0].length;
3426
+ if (q.getFormat(start, word.length).link)
3427
+ return;
3428
+ queueMicrotask(() => {
3429
+ q.formatText(start, word.length, "link", normalizeUrl(word), "api");
3430
+ });
3431
+ });
3407
3432
  let hoverTip = null;
3408
3433
  q.root.addEventListener("mouseover", (e) => {
3409
3434
  const a = e.target.closest("a[href]");
@@ -4693,6 +4718,7 @@ async function saveDraft2() {
4693
4718
  bodyText: editor.getText(),
4694
4719
  to: toInput.value,
4695
4720
  cc: ccInput.value,
4721
+ bcc: bccInput.value,
4696
4722
  previousDraftUid: draftUid,
4697
4723
  draftId
4698
4724
  });