@bobfrankston/rmfmail 1.0.688 → 1.0.691

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 (42) hide show
  1. package/client/app.bundle.js +57 -19
  2. package/client/app.bundle.js.map +2 -2
  3. package/client/app.js +36 -2
  4. package/client/app.js.map +1 -1
  5. package/client/app.ts +36 -2
  6. package/client/components/alarms.js +24 -12
  7. package/client/components/alarms.js.map +1 -1
  8. package/client/components/alarms.ts +23 -11
  9. package/client/components/message-list.js +9 -4
  10. package/client/components/message-list.js.map +1 -1
  11. package/client/components/message-list.ts +9 -4
  12. package/client/components/message-viewer.js +33 -3
  13. package/client/components/message-viewer.js.map +1 -1
  14. package/client/components/message-viewer.ts +33 -3
  15. package/client/compose/compose.bundle.js +7 -0
  16. package/client/compose/compose.bundle.js.map +2 -2
  17. package/client/compose/spellcheck.js +19 -0
  18. package/client/compose/spellcheck.js.map +1 -1
  19. package/client/compose/spellcheck.ts +17 -0
  20. package/package.json +3 -3
  21. package/packages/mailx-imap/index.d.ts.map +1 -1
  22. package/packages/mailx-imap/index.js +46 -9
  23. package/packages/mailx-imap/index.js.map +1 -1
  24. package/packages/mailx-imap/index.ts +44 -9
  25. package/packages/mailx-imap/package-lock.json +2 -2
  26. package/packages/mailx-imap/package.json +1 -1
  27. package/packages/mailx-service/google-sync.d.ts +46 -1
  28. package/packages/mailx-service/google-sync.d.ts.map +1 -1
  29. package/packages/mailx-service/google-sync.js +50 -1
  30. package/packages/mailx-service/google-sync.js.map +1 -1
  31. package/packages/mailx-service/google-sync.ts +91 -1
  32. package/packages/mailx-service/index.d.ts.map +1 -1
  33. package/packages/mailx-service/index.js +79 -6
  34. package/packages/mailx-service/index.js.map +1 -1
  35. package/packages/mailx-service/index.ts +76 -6
  36. package/packages/mailx-store/db.d.ts +1 -0
  37. package/packages/mailx-store/db.d.ts.map +1 -1
  38. package/packages/mailx-store/db.js +23 -4
  39. package/packages/mailx-store/db.js.map +1 -1
  40. package/packages/mailx-store/db.ts +22 -4
  41. package/packages/mailx-store/package.json +1 -1
  42. /package/packages/mailx-imap/{node_modules.npmglobalize-stash-78076 → node_modules.npmglobalize-stash-18280}/.package-lock.json +0 -0
@@ -395,6 +395,15 @@ export class MailxDB {
395
395
  // calendar_events table; the flag distinguishes them so the UI can
396
396
  // style them differently and the alarm scheduler can skip them.
397
397
  this.addColumnIfMissing("calendar_events", "is_holiday", "INTEGER NOT NULL DEFAULT 0");
398
+ // Per-event reminder offsets (Bob 2026-05-12: "use the reminder
399
+ // times in the event (there can be multiple)"). Google's API
400
+ // returns `reminders.overrides` as an array of {method, minutes}
401
+ // — we store the minute offsets as JSON so alarms.ts can fire ONE
402
+ // popup per offset (10-min, 30-min, 1-day, …) instead of the
403
+ // hard-coded 10-min default. `useDefault: true` events get the
404
+ // calendar's defaultReminders pre-resolved server-side and pulled
405
+ // through here too.
406
+ this.addColumnIfMissing("calendar_events", "reminder_minutes_json", "TEXT DEFAULT '[]'");
398
407
  // Backfill UUIDs for any pre-existing rows that were inserted before
399
408
  // this column landed. One UPDATE + an id roundtrip per row — cheap
400
409
  // at our row counts, runs once per DB upgrade.
@@ -722,14 +731,16 @@ export class MailxDB {
722
731
  title: string; startMs: number; endMs: number; allDay?: boolean;
723
732
  location?: string; notes?: string; etag?: string; dirty?: boolean;
724
733
  recurringEventId?: string; htmlLink?: string; isHoliday?: boolean;
734
+ reminderMinutes?: number[];
725
735
  }): string {
726
736
  const uuid = ev.uuid || randomUUID().replace(/-/g, "");
737
+ const remindersJson = JSON.stringify(Array.isArray(ev.reminderMinutes) ? ev.reminderMinutes : []);
727
738
  this.db.prepare(`
728
739
  INSERT INTO calendar_events
729
740
  (uuid, account_id, provider_id, calendar_id, title, start_ms, end_ms,
730
741
  all_day, location, notes, etag, last_synced, dirty, deleted, updated_at,
731
- recurring_event_id, html_link, is_holiday)
732
- VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, 0, ?, ?, ?, ?)
742
+ recurring_event_id, html_link, is_holiday, reminder_minutes_json)
743
+ VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, 0, ?, ?, ?, ?, ?)
733
744
  ON CONFLICT(uuid) DO UPDATE SET
734
745
  account_id=excluded.account_id, provider_id=excluded.provider_id,
735
746
  calendar_id=excluded.calendar_id, title=excluded.title,
@@ -740,14 +751,15 @@ export class MailxDB {
740
751
  updated_at=excluded.updated_at,
741
752
  recurring_event_id=excluded.recurring_event_id,
742
753
  html_link=excluded.html_link,
743
- is_holiday=excluded.is_holiday
754
+ is_holiday=excluded.is_holiday,
755
+ reminder_minutes_json=excluded.reminder_minutes_json
744
756
  `).run(
745
757
  uuid, ev.accountId, ev.providerId || null, ev.calendarId || "primary",
746
758
  ev.title, ev.startMs, ev.endMs, ev.allDay ? 1 : 0,
747
759
  ev.location || "", ev.notes || "", ev.etag || null,
748
760
  ev.dirty ? 0 : Date.now(), ev.dirty ? 1 : 0, Date.now(),
749
761
  ev.recurringEventId || null, ev.htmlLink || null,
750
- ev.isHoliday ? 1 : 0,
762
+ ev.isHoliday ? 1 : 0, remindersJson,
751
763
  );
752
764
  return uuid;
753
765
  }
@@ -781,7 +793,13 @@ export class MailxDB {
781
793
  }
782
794
 
783
795
  private calendarRowToObject(r: any): any {
796
+ let reminderMinutes: number[] = [];
797
+ try {
798
+ const parsed = JSON.parse(r.reminder_minutes_json || "[]");
799
+ if (Array.isArray(parsed)) reminderMinutes = parsed.filter((n: any) => Number.isFinite(n)).map((n: any) => Number(n));
800
+ } catch { /* invalid JSON → empty */ }
784
801
  return {
802
+ reminderMinutes,
785
803
  uuid: r.uuid, accountId: r.account_id, providerId: r.provider_id,
786
804
  calendarId: r.calendar_id, title: r.title, startMs: r.start_ms,
787
805
  endMs: r.end_ms, allDay: !!r.all_day, location: r.location, notes: r.notes,
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bobfrankston/mailx-store",
3
- "version": "0.1.20",
3
+ "version": "0.1.21",
4
4
  "type": "module",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",