@bobfrankston/rmfmail 1.2.113 → 1.2.115

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 (37) hide show
  1. package/TODO.md +5 -5
  2. package/bin/mailx.js +72 -3
  3. package/bin/mailx.js.map +1 -1
  4. package/bin/mailx.ts +62 -3
  5. package/client/android-bootstrap.bundle.js +60 -3
  6. package/client/android-bootstrap.bundle.js.map +2 -2
  7. package/client/app.bundle.js +46 -0
  8. package/client/app.bundle.js.map +2 -2
  9. package/client/app.js +66 -0
  10. package/client/app.js.map +1 -1
  11. package/client/app.ts +60 -0
  12. package/client/compose/compose.bundle.js +7 -2
  13. package/client/compose/compose.bundle.js.map +2 -2
  14. package/client/compose/compose.js +16 -5
  15. package/client/compose/compose.js.map +1 -1
  16. package/client/compose/compose.ts +13 -5
  17. package/package.json +5 -5
  18. package/packages/mailx-imap/index.d.ts +4 -1
  19. package/packages/mailx-imap/index.d.ts.map +1 -1
  20. package/packages/mailx-imap/index.js +59 -5
  21. package/packages/mailx-imap/index.js.map +1 -1
  22. package/packages/mailx-imap/index.ts +55 -5
  23. package/packages/mailx-imap/package-lock.json +2 -2
  24. package/packages/mailx-imap/package.json +1 -1
  25. package/packages/mailx-store-web/android-bootstrap.js +48 -3
  26. package/packages/mailx-store-web/android-bootstrap.js.map +1 -1
  27. package/packages/mailx-store-web/android-bootstrap.ts +47 -4
  28. package/packages/mailx-store-web/package.json +1 -1
  29. package/packages/mailx-store-web/web-service.d.ts +21 -0
  30. package/packages/mailx-store-web/web-service.d.ts.map +1 -1
  31. package/packages/mailx-store-web/web-service.js +11 -0
  32. package/packages/mailx-store-web/web-service.js.map +1 -1
  33. package/packages/mailx-store-web/web-service.ts +11 -0
  34. package/packages/mailx-types/mailx-api.d.ts +22 -0
  35. package/packages/mailx-types/mailx-api.d.ts.map +1 -1
  36. package/packages/mailx-types/mailx-api.ts +7 -0
  37. package/packages/mailx-types/package.json +1 -1
@@ -8096,6 +8096,49 @@ function scheduleSyncedStamp() {
8096
8096
  }
8097
8097
  }, SYNC_SETTLE_MS);
8098
8098
  }
8099
+ var activeConnects = /* @__PURE__ */ new Map();
8100
+ var CONNECT_SHOW_AFTER_MS = 1500;
8101
+ var connectTickTimer = null;
8102
+ function handleConnectProgress(event) {
8103
+ const key = `${event.accountId}|${event.purpose}`;
8104
+ if (event.phase === "done" || event.phase === "failed") {
8105
+ activeConnects.delete(key);
8106
+ if (activeConnects.size === 0 && connectTickTimer) {
8107
+ clearInterval(connectTickTimer);
8108
+ connectTickTimer = null;
8109
+ scheduleSyncedStamp();
8110
+ }
8111
+ return;
8112
+ }
8113
+ const existing = activeConnects.get(key);
8114
+ if (existing) {
8115
+ existing.phase = event.phase;
8116
+ } else {
8117
+ activeConnects.set(key, {
8118
+ host: event.host || event.accountId,
8119
+ purpose: event.purpose || "",
8120
+ phase: event.phase,
8121
+ startedAt: Date.now() - (event.elapsedMs || 0)
8122
+ });
8123
+ }
8124
+ if (!connectTickTimer) connectTickTimer = setInterval(renderConnectTick, 100);
8125
+ }
8126
+ function renderConnectTick() {
8127
+ const el = document.getElementById("status-sync");
8128
+ if (!el || activeConnects.size === 0) return;
8129
+ const now = Date.now();
8130
+ for (const [k, c] of activeConnects) {
8131
+ if (now - c.startedAt > 6e5) activeConnects.delete(k);
8132
+ }
8133
+ let worst = null;
8134
+ for (const c of activeConnects.values()) {
8135
+ if (!worst || c.startedAt < worst.startedAt) worst = c;
8136
+ }
8137
+ if (!worst) return;
8138
+ const elapsed = Date.now() - worst.startedAt;
8139
+ if (elapsed < CONNECT_SHOW_AFTER_MS) return;
8140
+ el.textContent = `Connecting to ${worst.host} (${worst.phase}${worst.purpose ? " " + worst.purpose : ""}, ${(elapsed / 1e3).toFixed(1)}s)`;
8141
+ }
8099
8142
  var messageList = document.getElementById("message-list");
8100
8143
  if (messageList) {
8101
8144
  const twoLineThreshold = 600;
@@ -9824,6 +9867,9 @@ onWsEvent((event) => {
9824
9867
  if (statusSync) statusSync.textContent = "Connected";
9825
9868
  if (startupStatus) startupStatus.textContent = "Loading accounts...";
9826
9869
  break;
9870
+ case "connectProgress":
9871
+ handleConnectProgress(event);
9872
+ break;
9827
9873
  case "syncProgress": {
9828
9874
  let label = `${event.phase} ${event.progress || 0}%`;
9829
9875
  if (typeof event.phase === "string" && event.phase.startsWith("folders:")) {