@bobfrankston/rmfmail 1.2.235 → 1.2.237
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/compose/compose.bundle.js +6 -1
- package/client/compose/compose.bundle.js.map +2 -2
- package/client/compose/compose.js +17 -2
- package/client/compose/compose.js.map +1 -1
- package/client/compose/compose.ts +19 -2
- package/package.json +1 -1
- package/packages/mailx-service/index.d.ts.map +1 -1
- package/packages/mailx-service/index.js +19 -0
- package/packages/mailx-service/index.js.map +1 -1
- package/packages/mailx-service/index.ts +19 -0
- /package/packages/mailx-imap/{node_modules.npmglobalize-stash-53964 → node_modules.npmglobalize-stash-40840}/.package-lock.json +0 -0
|
@@ -1435,6 +1435,7 @@ export class MailxService {
|
|
|
1435
1435
|
if (sig === lastSig)
|
|
1436
1436
|
return;
|
|
1437
1437
|
lastSig = sig;
|
|
1438
|
+
console.log(` [word-edit] file changed: ${name} (${stat.size} bytes) — converting`);
|
|
1438
1439
|
try {
|
|
1439
1440
|
let inner;
|
|
1440
1441
|
if (isDocx) {
|
|
@@ -1461,6 +1462,15 @@ export class MailxService {
|
|
|
1461
1462
|
// vanished: "it acts as if it never happened" (Bob
|
|
1462
1463
|
// 2026-08-06). Focus belongs at the END of the session
|
|
1463
1464
|
// (wordEditClosed), not on every keystroke-triggered save.
|
|
1465
|
+
if (!inner.trim()) {
|
|
1466
|
+
// Never mirror an empty conversion into compose: that
|
|
1467
|
+
// replaces the user's message with nothing, which
|
|
1468
|
+
// reads as "it lost my work" rather than "the convert
|
|
1469
|
+
// failed".
|
|
1470
|
+
console.error(` [word-edit] conversion produced NO content for ${name} — not mirroring (message left as-is)`);
|
|
1471
|
+
return;
|
|
1472
|
+
}
|
|
1473
|
+
console.log(` [word-edit] save mirrored: ${name} → ${inner.length} chars of HTML for ${editId}`);
|
|
1464
1474
|
this.imapManager.emit("wordEditUpdated", { editId, html: inner });
|
|
1465
1475
|
}
|
|
1466
1476
|
catch (e) {
|
|
@@ -1564,6 +1574,15 @@ export class MailxService {
|
|
|
1564
1574
|
const bm = updatedHtml.match(/<body[^>]*>([\s\S]*?)<\/body>/i);
|
|
1565
1575
|
inner = bm ? bm[1] : updatedHtml;
|
|
1566
1576
|
}
|
|
1577
|
+
if (!inner.trim()) {
|
|
1578
|
+
// Never mirror an empty conversion into compose: that
|
|
1579
|
+
// replaces the user's message with nothing, which
|
|
1580
|
+
// reads as "it lost my work" rather than "the convert
|
|
1581
|
+
// failed".
|
|
1582
|
+
console.error(` [word-edit] conversion produced NO content for ${name} — not mirroring (message left as-is)`);
|
|
1583
|
+
return;
|
|
1584
|
+
}
|
|
1585
|
+
console.log(` [word-edit] save mirrored: ${name} → ${inner.length} chars of HTML for ${editId}`);
|
|
1567
1586
|
this.imapManager.emit("wordEditUpdated", { editId, html: inner });
|
|
1568
1587
|
}
|
|
1569
1588
|
catch (e) {
|