@bobfrankston/mailx 1.0.260 → 1.0.264

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.
@@ -21,6 +21,8 @@
21
21
  "@bobfrankston/smtp-direct/": "../node_modules/@bobfrankston/smtp-direct/",
22
22
  "@bobfrankston/tcp-transport": "../node_modules/@bobfrankston/tcp-transport/index.js",
23
23
  "@bobfrankston/tcp-transport/": "../node_modules/@bobfrankston/tcp-transport/",
24
+ "@bobfrankston/mailx-sync": "../node_modules/@bobfrankston/mailx-sync/index.js",
25
+ "@bobfrankston/mailx-sync/": "../node_modules/@bobfrankston/mailx-sync/",
24
26
  "sql.js": "../packages/mailx-store-web/sql-wasm-esm.js"
25
27
  }
26
28
  }
package/client/app.js CHANGED
@@ -568,14 +568,16 @@ function quoteBody(msg) {
568
568
  body = body.replace(/<table[^>]*>/gi, "<div>").replace(/<\/table>/gi, "</div>");
569
569
  body = body.replace(/<t[rdh][^>]*>/gi, "").replace(/<\/t[rdh]>/gi, " ");
570
570
  body = body.replace(/<thead[^>]*>|<\/thead>|<tbody[^>]*>|<\/tbody>/gi, "");
571
- return `<br><div class="reply"><p>On ${date}, ${from} wrote:</p><blockquote>${body}</blockquote></div>`;
571
+ // Two blank lines above the quote so the cursor lands with breathing room
572
+ // between the user's reply and the "On ... wrote:" line.
573
+ return `<br><br><div class="reply"><p>On ${date}, ${from} wrote:</p><blockquote>${body}</blockquote></div>`;
572
574
  }
573
575
  function forwardBody(msg) {
574
576
  const date = new Date(msg.date).toLocaleString();
575
577
  const from = msg.from.name ? `${msg.from.name} &lt;${msg.from.address}&gt;` : msg.from.address;
576
578
  const to = msg.to.map((a) => a.name ? `${a.name} &lt;${a.address}&gt;` : a.address).join(", ");
577
579
  const body = msg.bodyHtml || `<pre>${msg.bodyText || ""}</pre>`;
578
- return `<br><div class="reply"><p>---------- Forwarded message ----------<br>From: ${from}<br>Date: ${date}<br>Subject: ${msg.subject}<br>To: ${to}</p>${body}</div>`;
580
+ return `<br><br><div class="reply"><p>---------- Forwarded message ----------<br>From: ${from}<br>Date: ${date}<br>Subject: ${msg.subject}<br>To: ${to}</p>${body}</div>`;
579
581
  }
580
582
  let lastDeleted = null;
581
583
  let lastMoved = null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bobfrankston/mailx",
3
- "version": "1.0.260",
3
+ "version": "1.0.264",
4
4
  "description": "Local-first email client with IMAP sync and standalone native app",
5
5
  "type": "module",
6
6
  "main": "bin/mailx.js",
@@ -20,11 +20,11 @@
20
20
  "postinstall": "node bin/postinstall.js"
21
21
  },
22
22
  "dependencies": {
23
- "@bobfrankston/iflow-direct": "^0.1.19",
23
+ "@bobfrankston/iflow-direct": "^0.1.20",
24
24
  "@bobfrankston/iflow-node": "^0.1.5",
25
25
  "@bobfrankston/miscinfo": "^1.0.8",
26
26
  "@bobfrankston/oauthsupport": "^1.0.24",
27
- "@bobfrankston/msger": "^0.1.316",
27
+ "@bobfrankston/msger": "^0.1.317",
28
28
  "@capacitor/android": "^8.3.0",
29
29
  "@capacitor/cli": "^8.3.0",
30
30
  "@capacitor/core": "^8.3.0",
@@ -38,7 +38,7 @@
38
38
  "@bobfrankston/tcp-transport": "^0.1.3",
39
39
  "@bobfrankston/node-tcp-transport": "^0.1.1",
40
40
  "@bobfrankston/smtp-direct": "^0.1.2",
41
- "@bobfrankston/mailx-sync": "file:../../../MailApps/mailx-sync"
41
+ "@bobfrankston/mailx-sync": "^0.1.2"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@types/mailparser": "^3.4.6"
@@ -77,15 +77,16 @@
77
77
  "sql.js": "^1.14.1",
78
78
  "@bobfrankston/tcp-transport": "file:../MailApps/tcp-transport",
79
79
  "@bobfrankston/node-tcp-transport": "file:../MailApps/node-tcp-transport",
80
- "@bobfrankston/smtp-direct": "file:../MailApps/smtp-direct"
80
+ "@bobfrankston/smtp-direct": "file:../MailApps/smtp-direct",
81
+ "@bobfrankston/mailx-sync": "file:../MailApps/mailx-sync"
81
82
  },
82
83
  ".transformedSnapshot": {
83
84
  "dependencies": {
84
- "@bobfrankston/iflow-direct": "^0.1.19",
85
+ "@bobfrankston/iflow-direct": "^0.1.20",
85
86
  "@bobfrankston/iflow-node": "^0.1.5",
86
87
  "@bobfrankston/miscinfo": "^1.0.8",
87
88
  "@bobfrankston/oauthsupport": "^1.0.24",
88
- "@bobfrankston/msger": "^0.1.316",
89
+ "@bobfrankston/msger": "^0.1.317",
89
90
  "@capacitor/android": "^8.3.0",
90
91
  "@capacitor/cli": "^8.3.0",
91
92
  "@capacitor/core": "^8.3.0",
@@ -98,7 +99,8 @@
98
99
  "sql.js": "^1.14.1",
99
100
  "@bobfrankston/tcp-transport": "^0.1.3",
100
101
  "@bobfrankston/node-tcp-transport": "^0.1.1",
101
- "@bobfrankston/smtp-direct": "^0.1.2"
102
+ "@bobfrankston/smtp-direct": "^0.1.2",
103
+ "@bobfrankston/mailx-sync": "^0.1.2"
102
104
  }
103
105
  }
104
106
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bobfrankston/mailx-imap",
3
- "version": "0.1.11",
3
+ "version": "0.1.12",
4
4
  "type": "module",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -84,7 +84,7 @@ class AndroidSyncManager {
84
84
  inactivityTimeout: 300000, // 300s for slow Dovecot
85
85
  fetchChunkSize: 10,
86
86
  fetchChunkSizeMax: 100,
87
- });
87
+ }, () => new BridgeTcpTransport());
88
88
  this.providers.set(account.id, provider);
89
89
  vlog(`addAccount ${account.id}: IMAP provider registered (${account.imap.host}:${account.imap.port})`);
90
90
  console.log(`[sync] ${account.id}: IMAP provider registered (${account.imap.host})`);
@@ -694,14 +694,10 @@ async function waitForNativeBridge(timeoutMs = 5000) {
694
694
  });
695
695
  }
696
696
  export async function initAndroid() {
697
- console.log("[android] Initializing mailx (Worker mode)...");
698
- // Use the Worker host all service logic runs off the main thread.
699
- const { createWorkerHost } = await import("./main-thread-host.js");
700
- await createWorkerHost();
701
- console.log("[android] Worker host initialized");
702
- return;
703
- // ── Legacy main-thread path (kept for reference, unreachable) ──
704
- // eslint-disable-next-line no-unreachable
697
+ console.log("[android] Initializing mailx (main-thread mode)...");
698
+ // Main-thread path: async I/O (fetch, TCP bridge) doesn't block the UI,
699
+ // and only sql.js is CPU-bound enough to maybe warrant a Worker later.
700
+ // Worker path was reverted 2026-04-14 (stuck at "Initializing..." on Android).
705
701
  await waitForNativeBridge();
706
702
  if (window._nativeBridge && !window.msgapi) {
707
703
  window.msgapi = window._nativeBridge;
@@ -268,7 +268,8 @@ export async function createWorkerHost() {
268
268
  // Create Worker
269
269
  // Note: Worker URL must point to the bundled worker entry.
270
270
  // For now, use the same-origin asset path.
271
- worker = new Worker("../packages/mailx-store-web/worker-entry.js", { type: "module" });
271
+ // Use bundled worker (esbuild inlines all dependencies — no import map needed)
272
+ worker = new Worker("../packages/mailx-store-web/worker-bundle.js");
272
273
  worker.onmessage = onWorkerMessage;
273
274
  worker.onerror = (e) => console.error("[host] Worker error:", e.message);
274
275
  // Install the mailxapi bridge
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bobfrankston/mailx-store-web",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "type": "module",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",