@qwanyx/stack 0.2.68 → 0.2.70

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/dist/index.esm.js CHANGED
@@ -3722,6 +3722,36 @@ class Wd {
3722
3722
  }))
3723
3723
  };
3724
3724
  }
3725
+ /**
3726
+ * Find an email in All Mail by Message-ID or FROM+SUBJECT
3727
+ * Useful for finding archived/moved emails when UID is stale
3728
+ *
3729
+ * @param accountId - The account to search in
3730
+ * @param criteria - Search criteria (message_id takes precedence, then from+subject)
3731
+ * @returns The found email or null
3732
+ */
3733
+ async findEmailInAllMail(e, t) {
3734
+ var s, o;
3735
+ const n = await this.getSettings(), i = ((s = n.accounts) == null ? void 0 : s.find((a) => a.id === e)) || ((o = n.accounts) == null ? void 0 : o[0]);
3736
+ if (!(i != null && i.imap))
3737
+ return console.error("[MailClient] No IMAP configuration found for account"), { found: !1 };
3738
+ try {
3739
+ return await this.callEmail("findEmailInAllMail", {
3740
+ message_id: t.message_id,
3741
+ from: t.from,
3742
+ subject: t.subject,
3743
+ folder: t.folder,
3744
+ imap_config: {
3745
+ host: i.imap.host,
3746
+ port: parseInt(i.imap.port, 10) || 993,
3747
+ username: i.imap.user,
3748
+ password: i.imap.password
3749
+ }
3750
+ });
3751
+ } catch (a) {
3752
+ return console.error("[MailClient] findEmailInAllMail failed:", a), { found: !1 };
3753
+ }
3754
+ }
3725
3755
  /**
3726
3756
  * Convert content (string | ArrayBuffer | Uint8Array) to base64 string
3727
3757
  */
@@ -15420,7 +15450,7 @@ function Ry({
15420
15450
  const w = (y) => {
15421
15451
  i && i(y), g(!1), f("");
15422
15452
  }, C = () => {
15423
- o && o(), g(!1);
15453
+ o && o(d.trim() || void 0), g(!1), f("");
15424
15454
  }, S = () => {
15425
15455
  g(!0);
15426
15456
  }, v = (y) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qwanyx/stack",
3
- "version": "0.2.68",
3
+ "version": "0.2.70",
4
4
  "description": "Modern HyperCard for React - All-in-one data management (REST + Graph API + Auth + Hooks + UI)",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.esm.js",