@bobfrankston/rmfmail 1.2.221 → 1.2.223

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/bin/mailx.js CHANGED
@@ -178,6 +178,31 @@ const isDaemon = hasFlag("daemon"); // internal: re-spawned detached process
178
178
  process.exit(0);
179
179
  }
180
180
  }
181
+ /** App entries appended to the NATIVE right-click menu inside compose. msger
182
+ * keeps the WebView2 default menu (that is the only place spellcheck
183
+ * suggestions live) and gates these to editable targets, so they never show
184
+ * on the read-only list or message preview.
185
+ *
186
+ * Deliberately NO Cut/Copy/Paste here: WebView2's own menu already carries
187
+ * them (with the right enabled/disabled state and the Ctrl+X/C/V hints), so
188
+ * app copies would just be duplicates a few rows further down. The menu that
189
+ * genuinely lacks them is mailx's spell menu, which preventDefaults the
190
+ * native one away — that gap is filled in compose/edit-commands.ts, at the
191
+ * menu that actually has the hole (Bob 2026-08-07).
192
+ *
193
+ * Ids are dispatched to compose.ts via window.__msgerContextCommand — one
194
+ * list, both windows (in-window compose overlay + popout compose), because
195
+ * drift between the two is what produced "right mouse isn't showing any
196
+ * formatting options" in the first place (Bob 2026-07-18). */
197
+ const COMPOSE_CONTEXT_MENU_ITEMS = [
198
+ { id: "bold", label: "Bold" },
199
+ { id: "italic", label: "Italic" },
200
+ { id: "underline", label: "Underline" },
201
+ { id: "strike", label: "Strikethrough" },
202
+ { id: "link", label: "Link…" },
203
+ { id: "clear", label: "Clear formatting" },
204
+ { id: "source", label: "View HTML source…" },
205
+ ];
181
206
  /** Windows mailto: registration — registry keys via reg.exe. Shared by the
182
207
  * `-register-mailto` CLI flag and the Settings → "Make default email app"
183
208
  * menu action (injected into MailxService; the registry work stays HERE in
@@ -2509,15 +2534,7 @@ RFC 5322 with CRLF line endings. Bodies are quoted-printable encoded (readable i
2509
2534
  // App entries on the NATIVE right-click menu (native stays
2510
2535
  // so spellcheck suggestions survive). compose.ts maps ids
2511
2536
  // to editor commands via window.__msgerContextCommand.
2512
- contextMenuItems: [
2513
- { id: "bold", label: "Bold" },
2514
- { id: "italic", label: "Italic" },
2515
- { id: "underline", label: "Underline" },
2516
- { id: "strike", label: "Strikethrough" },
2517
- { id: "link", label: "Link…" },
2518
- { id: "clear", label: "Clear formatting" },
2519
- { id: "source", label: "View HTML source…" },
2520
- ],
2537
+ contextMenuItems: COMPOSE_CONTEXT_MENU_ITEMS,
2521
2538
  });
2522
2539
  popoutWindows.set(key, h);
2523
2540
  if (typeof h.pid === "number")
@@ -2653,15 +2670,7 @@ RFC 5322 with CRLF line endings. Bodies are quoted-printable encoded (readable i
2653
2670
  // "right mouse isn't showing any formatting options let alone source").
2654
2671
  // msger gates these to editable targets, so they DON'T appear on
2655
2672
  // right-clicks in the read-only list / message preview.
2656
- contextMenuItems: [
2657
- { id: "bold", label: "Bold" },
2658
- { id: "italic", label: "Italic" },
2659
- { id: "underline", label: "Underline" },
2660
- { id: "strike", label: "Strikethrough" },
2661
- { id: "link", label: "Link…" },
2662
- { id: "clear", label: "Clear formatting" },
2663
- { id: "source", label: "View HTML source…" },
2664
- ],
2673
+ contextMenuItems: COMPOSE_CONTEXT_MENU_ITEMS,
2665
2674
  });
2666
2675
  // Late-bind the popout-action forwarder now that the main window's
2667
2676
  // service channel exists.