@bobfrankston/rmfmail 1.0.705 → 1.0.706

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.
Files changed (43) hide show
  1. package/bin/mailx.js +15 -1
  2. package/bin/mailx.js.map +1 -1
  3. package/bin/mailx.ts +17 -1
  4. package/client/app.bundle.js +12 -0
  5. package/client/app.bundle.js.map +2 -2
  6. package/client/compose/compose.bundle.js +32 -4
  7. package/client/compose/compose.bundle.js.map +2 -2
  8. package/client/compose/spellcheck.js +34 -5
  9. package/client/compose/spellcheck.js.map +1 -1
  10. package/client/compose/spellcheck.ts +31 -4
  11. package/client/lib/api-client.js +9 -0
  12. package/client/lib/api-client.js.map +1 -1
  13. package/client/lib/api-client.ts +9 -0
  14. package/package.json +1 -1
  15. package/packages/mailx-service/index.d.ts +3 -0
  16. package/packages/mailx-service/index.d.ts.map +1 -1
  17. package/packages/mailx-service/index.js +21 -1
  18. package/packages/mailx-service/index.js.map +1 -1
  19. package/packages/mailx-service/index.ts +23 -1
  20. package/packages/mailx-service/jsonrpc.js +6 -0
  21. package/packages/mailx-service/jsonrpc.js.map +1 -1
  22. package/packages/mailx-service/jsonrpc.ts +6 -0
  23. package/packages/mailx-settings/index.d.ts +7 -0
  24. package/packages/mailx-settings/index.d.ts.map +1 -1
  25. package/packages/mailx-settings/index.js +24 -0
  26. package/packages/mailx-settings/index.js.map +1 -1
  27. package/packages/mailx-settings/index.ts +25 -0
  28. package/packages/mailx-store/index.d.ts +1 -1
  29. package/packages/mailx-store/index.d.ts.map +1 -1
  30. package/packages/mailx-store/index.js +1 -1
  31. package/packages/mailx-store/index.js.map +1 -1
  32. package/packages/mailx-store/index.ts +1 -1
  33. package/packages/mailx-store/parse-serial.d.ts +40 -24
  34. package/packages/mailx-store/parse-serial.d.ts.map +1 -1
  35. package/packages/mailx-store/parse-serial.js +161 -29
  36. package/packages/mailx-store/parse-serial.js.map +1 -1
  37. package/packages/mailx-store/parse-serial.ts +151 -37
  38. package/packages/mailx-store/parse-worker.d.ts +2 -0
  39. package/packages/mailx-store/parse-worker.d.ts.map +1 -0
  40. package/packages/mailx-store/parse-worker.js +53 -0
  41. package/packages/mailx-store/parse-worker.js.map +1 -0
  42. package/packages/mailx-store/parse-worker.ts +62 -0
  43. /package/packages/mailx-imap/{node_modules.npmglobalize-stash-34984 → node_modules.npmglobalize-stash-44928}/.package-lock.json +0 -0
@@ -38,6 +38,7 @@ __export(api_client_exports, {
38
38
  addContact: () => addContact,
39
39
  addPreferredContact: () => addPreferredContact,
40
40
  addToDenylist: () => addToDenylist,
41
+ addUserDictWord: () => addUserDictWord,
41
42
  aiTransform: () => aiTransform,
42
43
  allowRemoteContent: () => allowRemoteContent,
43
44
  autocomplete: () => autocomplete,
@@ -77,6 +78,7 @@ __export(api_client_exports, {
77
78
  getTasks: () => getTasks,
78
79
  getThreadMessages: () => getThreadMessages,
79
80
  getUnifiedInbox: () => getUnifiedInbox,
81
+ getUserDict: () => getUserDict,
80
82
  getVersion: () => getVersion,
81
83
  hasBccHistoryTo: () => hasBccHistoryTo,
82
84
  hasCcHistoryTo: () => hasCcHistoryTo,
@@ -98,6 +100,7 @@ __export(api_client_exports, {
98
100
  reauthGoogleScopes: () => reauthGoogleScopes,
99
101
  reauthenticate: () => reauthenticate,
100
102
  recordSpamReport: () => recordSpamReport,
103
+ removeUserDictWord: () => removeUserDictWord,
101
104
  renameFolder: () => renameFolder,
102
105
  repairAccounts: () => repairAccounts,
103
106
  restartServer: () => restartServer,
@@ -318,6 +321,15 @@ function openInTextEditor(path) {
318
321
  function allowRemoteContent(type, value) {
319
322
  return ipc().allowRemoteContent(type, value);
320
323
  }
324
+ function getUserDict() {
325
+ return ipc().getUserDict?.() ?? Promise.resolve([]);
326
+ }
327
+ function addUserDictWord(word) {
328
+ return ipc().addUserDictWord?.(word) ?? Promise.resolve([]);
329
+ }
330
+ function removeUserDictWord(word) {
331
+ return ipc().removeUserDictWord?.(word) ?? Promise.resolve([]);
332
+ }
321
333
  function flagSenderOrDomain(type, value) {
322
334
  return ipc().flagSenderOrDomain?.(type, value) ?? Promise.resolve({ flagged: false });
323
335
  }
@@ -1758,6 +1770,20 @@ async function getSpell() {
1758
1770
  sp.add(w);
1759
1771
  } catch {
1760
1772
  }
1773
+ getUserDict().then((cloud) => {
1774
+ if (!Array.isArray(cloud) || cloud.length === 0)
1775
+ return;
1776
+ for (const w of cloud)
1777
+ sp.add(w);
1778
+ try {
1779
+ const raw = localStorage.getItem(USER_DICT_KEY);
1780
+ const local = raw ? JSON.parse(raw) : [];
1781
+ const merged = [.../* @__PURE__ */ new Set([...local, ...cloud])];
1782
+ localStorage.setItem(USER_DICT_KEY, JSON.stringify(merged));
1783
+ } catch {
1784
+ }
1785
+ }).catch(() => {
1786
+ });
1761
1787
  return sp;
1762
1788
  })();
1763
1789
  return spellPromise;
@@ -1766,13 +1792,14 @@ function addToUserDict(word, sp) {
1766
1792
  try {
1767
1793
  const raw = localStorage.getItem(USER_DICT_KEY);
1768
1794
  const arr = raw ? JSON.parse(raw) : [];
1769
- if (arr.includes(word))
1770
- return;
1771
- arr.push(word);
1772
- localStorage.setItem(USER_DICT_KEY, JSON.stringify(arr));
1795
+ if (!arr.includes(word)) {
1796
+ arr.push(word);
1797
+ localStorage.setItem(USER_DICT_KEY, JSON.stringify(arr));
1798
+ }
1773
1799
  } catch {
1774
1800
  }
1775
1801
  sp.add(word);
1802
+ addUserDictWord(word).catch((e) => console.error("[spell] addUserDictWord:", e));
1776
1803
  }
1777
1804
  function decorate(editor2, sp) {
1778
1805
  const body = editor2.getBody?.();
@@ -2176,6 +2203,7 @@ var init_spellcheck = __esm({
2176
2203
  "client/compose/spellcheck.js"() {
2177
2204
  "use strict";
2178
2205
  import_nspell = __toESM(require_lib(), 1);
2206
+ init_api_client();
2179
2207
  USER_DICT_KEY = "mailx-user-dict";
2180
2208
  MARKER_ATTR = "data-mailx-spellerror";
2181
2209
  DECORATE_DEBOUNCE_MS = 1200;