domma-cms 1.29.0 → 1.30.0

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 (87) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/docs/DommaFeatures.md +10 -6
  3. package/docs/plugin-development.md +1 -1
  4. package/package.json +1 -1
  5. package/plugins/_lib/admin/mail/body-menu.js +1 -1
  6. package/plugins/_lib/admin/mail/cms-host.js +1 -1
  7. package/plugins/_lib/admin/mail/compose-window.js +1 -1
  8. package/plugins/_lib/admin/mail/contacts.js +1 -1
  9. package/plugins/_lib/admin/mail/diagnostics-section.js +1 -1
  10. package/plugins/_lib/admin/mail/drag-drop.js +1 -1
  11. package/plugins/_lib/admin/mail/folder-tree.js +22 -1
  12. package/plugins/_lib/admin/mail/font-controls.js +1 -1
  13. package/plugins/_lib/admin/mail/fonts.js +1 -1
  14. package/plugins/_lib/admin/mail/host-context.js +1 -1
  15. package/plugins/_lib/admin/mail/identity.js +1 -1
  16. package/plugins/_lib/admin/mail/image-senders-section.js +68 -1
  17. package/plugins/_lib/admin/mail/keyboard.js +1 -1
  18. package/plugins/_lib/admin/mail/mail.css +1 -1
  19. package/plugins/_lib/admin/mail/mail.html +1 -1
  20. package/plugins/_lib/admin/mail/message-actions.js +1 -1
  21. package/plugins/_lib/admin/mail/oauth-panel.js +1 -1
  22. package/plugins/_lib/admin/mail/panes.js +1 -1
  23. package/plugins/_lib/admin/mail/reader-kit.js +1 -1
  24. package/plugins/_lib/admin/mail/reader-runtime.js +91 -5
  25. package/plugins/_lib/admin/mail/reader-view.js +1 -1
  26. package/plugins/_lib/admin/mail/resizable.js +1 -1
  27. package/plugins/_lib/admin/mail/restore-spam.js +1 -1
  28. package/plugins/_lib/admin/mail/rules.js +6 -2
  29. package/plugins/_lib/admin/mail/scheduling.js +1 -1
  30. package/plugins/_lib/admin/mail/section-kit.js +1 -1
  31. package/plugins/_lib/admin/mail/security-note.js +1 -1
  32. package/plugins/_lib/admin/mail/settings-section.js +1 -1
  33. package/plugins/_lib/admin/mail/templates.js +1 -1
  34. package/plugins/_lib/admin/mail/threads.js +1 -1
  35. package/plugins/_lib/admin/mail/vacation.js +1 -1
  36. package/plugins/_lib/admin/mail/when-closed.js +1 -1
  37. package/plugins/_lib/admin/ui/dates.js +1 -1
  38. package/plugins/_lib/admin/ui/resizable.js +1 -1
  39. package/plugins/_lib/domma-mail.lock.json +80 -79
  40. package/plugins/_lib/mail/accountFileStore.js +1 -1
  41. package/plugins/_lib/mail/accountRepository.js +36 -2
  42. package/plugins/_lib/mail/accountRoutes.js +1 -1
  43. package/plugins/_lib/mail/accounts.js +1 -1
  44. package/plugins/_lib/mail/bodyTokenProvider.js +1 -1
  45. package/plugins/_lib/mail/bodyTokens.js +1 -1
  46. package/plugins/_lib/mail/compose.js +1 -1
  47. package/plugins/_lib/mail/defaults.js +1 -1
  48. package/plugins/_lib/mail/envelope.js +1 -1
  49. package/plugins/_lib/mail/folderActions.js +1 -1
  50. package/plugins/_lib/mail/folderRuntime.js +1 -1
  51. package/plugins/_lib/mail/folders.js +1 -1
  52. package/plugins/_lib/mail/imapPoolRuntime.js +1 -1
  53. package/plugins/_lib/mail/mbox.js +1 -1
  54. package/plugins/_lib/mail/message-action.js +1 -1
  55. package/plugins/_lib/mail/messageSecurity.js +1 -1
  56. package/plugins/_lib/mail/messageSecurityProvider.js +1 -1
  57. package/plugins/_lib/mail/networkAddresses.js +1 -1
  58. package/plugins/_lib/mail/networkPolicy.js +1 -1
  59. package/plugins/_lib/mail/oauthAccounts.js +1 -1
  60. package/plugins/_lib/mail/oauthRouteRuntime.js +1 -1
  61. package/plugins/_lib/mail/oauthRuntime.js +1 -1
  62. package/plugins/_lib/mail/pollSchedule.js +1 -1
  63. package/plugins/_lib/mail/poller.js +1 -1
  64. package/plugins/_lib/mail/pollerRuntime.js +1 -1
  65. package/plugins/_lib/mail/priority.js +1 -1
  66. package/plugins/_lib/mail/publicMailbox.js +1 -1
  67. package/plugins/_lib/mail/readRuntime.js +57 -3
  68. package/plugins/_lib/mail/render.js +1 -1
  69. package/plugins/_lib/mail/ruleRunner.js +1 -1
  70. package/plugins/_lib/mail/schedulerRuntime.js +1 -1
  71. package/plugins/_lib/mail/secretProvider.js +1 -1
  72. package/plugins/_lib/mail/secretbox.js +1 -1
  73. package/plugins/_lib/mail/senderAuth.js +113 -0
  74. package/plugins/_lib/mail/sieve.js +7 -2
  75. package/plugins/_lib/mail/smtpService.js +1 -1
  76. package/plugins/_lib/mail/snoozeRuntime.js +1 -1
  77. package/plugins/_lib/mail/store.js +1 -1
  78. package/plugins/_lib/mail/subscriptions.js +1 -1
  79. package/plugins/_lib/mail/syncPlan.js +1 -1
  80. package/plugins/_lib/mail/syncRuntime.js +1 -1
  81. package/plugins/_lib/mail/syncSelection.js +1 -1
  82. package/plugins/_lib/mail/unreadBadge.js +1 -1
  83. package/plugins/_lib/mail/unsubscribe.js +1 -1
  84. package/plugins/_lib/mail/vacationRuntime.js +1 -1
  85. package/plugins/_lib/mail/write.js +4 -2
  86. package/server/routes/api/forms.js +8 -1
  87. package/server/services/viewerSession.js +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.30.0] - 2026-11-02
4
+
5
+ - Mail: Domma Mail core 0.19.0. Server filtering (Sieve) now lists the server's scripts: after STARTTLS the client reads the capabilities the server re-sends instead of asking again, which had shifted every reply by one. Images load automatically from senders in your contacts (Settings > Images, on by default) when your mail server verified the sender's domain (aligned DKIM or SPF, or DMARC, from the receiving server's own Authentication-Results); any one sender can be blocked. Not spam is offered in any folder named like spam or junk, not only the server's Junk folder. Rule folder errors name the rule and the folder. Settings tabs show a dot while they hold unsaved changes, dragging mail over a closed folder opens it after a moment, and `accounts.js` exports `setContactImages` and `contactImagesAllowed`.
6
+
7
+ ## [1.29.1] - 2026-11-02
8
+
9
+ - Forms: the `form:submitted` hook now also carries the visitor's IP address (`ip`) and their cookies (`cookies`, parsed, without the `dm_session` sign-in cookie), so a Tool acting for the visitor can honour their cookie choice. Social Media Pro 0.4.0 uses it to send LinkedIn conversions only for visitors who accepted marketing cookies.
10
+
3
11
  ## [1.29.0] - 2026-11-02
4
12
 
5
13
  - Mail: the shared mail library (`plugins/_lib/mail`, `plugins/_lib/admin/mail`) is now the Domma Mail core 0.18.0 build, with a hash lock (`plugins/_lib/domma-mail.lock.json`); shared code is authored in domma-mail and copied here by its `sync:cms`. It brings folder actions (create, rename, move and empty folders, drag mail and folders), snoozed mail, server-side filtering (Sieve) alongside rules, rule groups, and a single host policy for mail connections (`networkPolicy.js`; `hostGuard.js` `pinMailHost` still wins where it is defined). The CMS keeps its own host adapters (`accounts.js`, `send.js`, `imapPool.js`, `readRoutes.js`, `sync.js`, `scheduler.js`, `vacationRunner.js`), now thin over the shared runtimes; compose options (receipts, signing, encryption, replies filed beside the message, secure delivery only) are kept. Mail Reader, Email Pro 0.12 and the Email Pro builds from Domma Mail all run on it. Previously these files only reached a site by hand, so an engine update removed them.
@@ -59,7 +59,7 @@ Code was treated as the truth. Where docs disagree with it, the disagreement is
59
59
  | `sheets` | paid | 0.4.1 | A spreadsheet in your admin: workbooks with formulas, sorting and filters; import CSV, JSON or Excel, export CSV or Excel, print. Feed a sheet live from Contacts, collections, forms, Surveys, Campaigns, Analytics or the Shop - rows kept even if the source goes away. |
60
60
  | `shopping-cart` | free | 1.6.1 | Sell from your site: products with options, stock and pictures, a storefront and a cart that follows shoppers from page to page, and checkout with Stripe, PayPal or payment offline. Orders to fulfil in the sidebar, refunds from the order. |
61
61
  | `shopping-cart-pro` | paid | 0.2.2 | More for the Shop: discount codes, shipping zones with rates by weight or order value, tax by country and class, branded order emails from confirmation to dispatch, and Insights - takings by week, best sellers, repeat customers and abandoned checkouts you can nudge. Adds to the free Shopping Cart; a lapsed licence leaves the Cart and every order just as they were. |
62
- | `social-media-pro` | paid | 0.2.5 | How the site looks when it is shared, and posting it: share cards per page for Facebook, X, LinkedIn, WhatsApp and Slack with previews; a share image drawn for every page that has none, in the site's colours; share and follow buttons; posting to Bluesky, Mastodon and LinkedIn (through the site's own LinkedIn app, with a reminder before its 60-day sign-in runs out) - now, scheduled, or drafted automatically for every new blog post or page - with links tagged for Analytics and the posts on the Calendar. Sold with SEO Pro. |
62
+ | `social-media-pro` | paid | 0.4.0 | How the site looks when it is shared, and posting it: share cards per page for Facebook, X, LinkedIn, WhatsApp and Slack with previews; a share image drawn for every page that has none, in the site's colours; share and follow buttons; posting to Bluesky, Mastodon and LinkedIn (through the site's own LinkedIn app, with a reminder before its 60-day sign-in runs out) - now, scheduled, or drafted automatically for every new blog post or page - with links tagged for Analytics and the posts on the Calendar; and LinkedIn conversions - chosen forms reported to LinkedIn's Conversions API when a visitor who accepted marketing cookies sends one. Sold with SEO Pro. |
63
63
  | `surveys` | paid | 1.5.1 | Targeted surveys over the Forms engine: shared audiences, tokenised invites, reminders, and per-survey statistics. |
64
64
  | `theme-roller` | paid | 1.1.3 | Make your own themes: start from any built-in theme, change its colours, fonts, spacing and borders with a live preview, and save it. Saved themes join the built-in ones everywhere a theme is chosen - the site, the admin, day and night, a region of a page. Needs Domma CMS 0.73 or later to use them. |
65
65
  | `waypoint-pro` | paid | 1.3.1 | Plan and track work: projects with their own workflows, issues on a board or in a list, a backlog planned into sprints with a burndown, and comments, mentions and watchers that tell the right people. |
@@ -992,7 +992,7 @@ Where: `server/services/presetCollections.js` (`PRESETS`, `seedAll()`), `server/
992
992
  Where: **Data > API Builder** (`#/api-endpoints`); `/api/api-endpoints`; `server/services/apiEndpoints.js`, `server/routes/api/endpoints-public.js`; permission family `api-endpoints.*`. Since: 0.25.0; 0.33.x (query filters, paging); 0.77.0 (editor Tool).
993
993
  - **In-admin API reference**. **Documentation > API Reference** has pages for Authentication, Pages, Settings, Layouts, Navigation, Media, Users, Plugins, Collections, Views and Actions, and points to API Tokens, API Builder and the Content API for the external surface. The full reference is `docs/api-reference.md`.
994
994
  Where: `#/docs/api/<area>`; `admin/js/templates/docs/api-*.html`.
995
- - **Hooks for developers**. `collection:entryCreated`, `collection:entryUpdated`, `collection:entryDeleted` and `form:submitted` are emitted for plugins to listen to.
995
+ - **Hooks for developers**. `collection:entryCreated`, `collection:entryUpdated`, `collection:entryDeleted` and `form:submitted` are emitted for plugins to listen to. `form:submitted` carries `{slug, entryId, data, formTitle, ended, ip, cookies}` - the visitor's IP and cookies (without the `dm_session` sign-in cookie) since 1.29.1, so a Tool acting for the visitor can honour their cookie choice (Social Media Pro's LinkedIn conversions).
996
996
 
997
997
  ---
998
998
 
@@ -2341,12 +2341,12 @@ An add-on for the free Shopping Cart that adds what a growing shop needs: discou
2341
2341
 
2342
2342
  ### Social Media Pro (`social-media-pro`)
2343
2343
 
2344
- Tier: paid (closed source) · Version: 0.2.3 · Requires: nothing declared (share cards need the core `seo:meta` transform, core 0.89+/0.90+) · Uses: `seo` ("Share cards start from each page's SEO title, description and image"), `calendar` (scheduled and sent posts on the Calendar), `blog` and `blog-pro` (a post drafted for each new blog post) · No MongoDB
2344
+ Tier: paid (closed source) · Version: 0.4.0 · Requires: nothing declared (share cards need the core `seo:meta` transform, core 0.89+/0.90+; LinkedIn conversions need core 1.29.1+, whose `form:submitted` carries the visitor's cookies) · Uses: `seo` ("Share cards start from each page's SEO title, description and image"), `calendar` (scheduled and sent posts on the Calendar), `blog` and `blog-pro` (a post drafted for each new blog post) · No MongoDB
2345
2345
 
2346
2346
  Control how every page looks when it is shared, and post it. Social Media Pro edits share cards for Facebook, X, LinkedIn, WhatsApp and Slack with previews, draws a share image in the site's colours for any page without one, adds share and follow buttons, and posts to Bluesky, Mastodon and LinkedIn - straight away, scheduled, or drafted automatically for each new blog post or page - with links tagged for analytics and posts shown on the calendar. Sold together with SEO Pro.
2347
2347
 
2348
2348
  **Features**
2349
- - Tabs: Cards, Posts, Accounts (`#/plugins/social`, `/posts`, `/accounts`), settings slideover.
2349
+ - Tabs: Cards, Posts, Accounts, Conversions (`#/plugins/social`, `/posts`, `/accounts`, `/conversions`), settings slideover.
2350
2350
  - Cards: every page listed (All / Changed here); per page Open Graph (Facebook, LinkedIn, WhatsApp, Slack) and X card fields, empty falling back to the page's SEO values; live platform previews; links to Facebook and LinkedIn debuggers to refresh their cache. Saving clears that page's cache.
2351
2351
  - Drawn share images: 1200x630 PNG for pages without an image, three designs (bold, minimal, split), colours, font, logo (from SEO organisation settings or site brand) and URL toggles, live preview; served publicly at `/api/plugins/social-media-pro/og.png?p=<path>` only for real pages; cached.
2352
2352
  - Shortcodes:
@@ -2359,10 +2359,13 @@ Control how every page looks when it is shared, and post it. Social Media Pro ed
2359
2359
  - Auto-posting: every 5 minutes new sitemap URLs from chosen sources (blog, blog-pro, pages) become a draft or scheduled post per network after a delay (10 min); template default `{title}\n\n{description}\n\n{url}` (must contain `{url}`).
2360
2360
  - UTM tagging (`utm_source=<network>`, `utm_medium=social`, campaign `social`) so posts show in Analytics.
2361
2361
  - Calendar source `social-posts` ("Social posts") shows scheduled and sent posts on the Calendar.
2362
- - Notifications: `social-media-pro:failed` (warning), `social-media-pro:drafted` (off by default), `social-media-pro:linkedin-expiry` (0.2.0).
2362
+ - LinkedIn conversions (0.4.0): chosen forms reported server-to-server to LinkedIn's **Conversions API** (not the Insight Tag - that is SEO Pro's, for page visits). A Direct API access token from Campaign Manager (Data > Signals Manager > Direct API; no developer app, never expires), the ad account (listed from the token, or typed), and rows of form (or "Every form") -> Conversions API rule, with an optional value and currency; rules can be made from the tab (`autoAssociationType=OBJECTIVE_BASED` attaches suitable campaigns).
2363
+ - Only visitors who accept marketing cookies: while on, the cookie banner is forced on with its Marketing category and `consentVersion` gains `+capi` (everyone re-asked); `public/capture.js` records the answer as the `smp_mkt` cookie and keeps an ad's `li_fat_id` click ID 30 days; withdrawal removes both.
2364
+ - Matched by hashed email (SHA-256), hashed first/last name, the click ID and - only if switched on - the IPv4 address. Events queue and go in batches within seconds; a refused token keeps them waiting (notice `social-media-pro:conversions`) until a new one is pasted; LinkedIn's 90-day limit drops older ones. "Recent" logs sent / skipped (why) / failed (LinkedIn's reason) with no email or hash.
2365
+ - Notifications: `social-media-pro:failed` (warning), `social-media-pro:drafted` (off by default), `social-media-pro:linkedin-expiry` (0.2.0), `social-media-pro:conversions` (0.4.0).
2363
2366
  - Sidebar badge: failed posts and drafts waiting (red when any failed).
2364
2367
  - Permission `social` with `read` (View) and `manage` (Manage), granted to `admin`.
2365
- - Injects `public/share.css` in the head and `public/share.js` at body end on every public page.
2368
+ - Injects `public/share.css` in the head and `public/share.js` at body end on every public page; `public/capture.js` only while LinkedIn conversions are on.
2366
2369
 
2367
2370
  **Where:** Admin sidebar "Social" (`#/plugins/social`).
2368
2371
 
@@ -2802,6 +2805,7 @@ Later changes to these features are in the CHANGELOG (for example 0.92.1: row-le
2802
2805
  - Adding `[share]` and `[follow]` to a blog template.
2803
2806
  - Posting to LinkedIn (0.2.0): creating your own LinkedIn app, the two products to add, pasting the redirect URI, connecting, and posting as yourself or a company page.
2804
2807
  - Keeping LinkedIn connected: the 60-day sign-in, the expiry warning and reconnecting in one click.
2808
+ - Counting enquiries from LinkedIn ads (0.4.0): the Direct API token, a conversion rule, choosing the forms, the marketing-cookie banner, and reading Recent.
2805
2809
 
2806
2810
  ### Campaigns Pro (`campaigns-pro`)
2807
2811
 
@@ -409,7 +409,7 @@ options.hooks.on('content:pageCreated', ({ page, urlPath }) => {
409
409
 
410
410
  | Event | Payload | Fired when |
411
411
  |------------------|--------------------------------------|------------------------------------------------------------------------------------------------------------------|
412
- | `form:submitted` | `{ slug, entryId, data, formTitle }` | A public form submission passes validation and is stored. `entryId` is `null` if collection storage is disabled. |
412
+ | `form:submitted` | `{ slug, entryId, data, formTitle, ended, ip, cookies }` | A public form submission passes validation and is stored. `entryId` is `null` if collection storage is disabled. `ip` and `cookies` (parsed, without the `dm_session` sign-in cookie) are the visitor's, since 1.29.1. |
413
413
 
414
414
  In `data`, a file field is `{url, name, size, mime}`, a list of them when the field is `multiple`, or `''`;
415
415
  `fileRefs(value)` from `public/js/form-files.mjs` reads any of the three as a list.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "domma-cms",
3
- "version": "1.29.0",
3
+ "version": "1.30.0",
4
4
  "description": "File-based CMS powered by Domma and Fastify. Run npx domma-cms my-site to create a new project.",
5
5
  "type": "module",
6
6
  "main": "server/server.js",
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.18.0, packages/core/src/admin/mail/body-menu.js.
1
+ // Source: @domma-mail/core 0.19.0, packages/core/src/admin/mail/body-menu.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  /**
4
4
  * The reading pane's right-click menu - the pure parts.
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.18.0, packages/core/src/admin/mail/cms-host.js.
1
+ // Source: @domma-mail/core 0.19.0, packages/core/src/admin/mail/cms-host.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  /** The CMS shell boundary. Standalone never imports this adapter. */
4
4
  const version = new URL(import.meta.url).searchParams.get('v') ?? '1';
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.18.0, packages/core/src/admin/mail/compose-window.js.
1
+ // Source: @domma-mail/core 0.19.0, packages/core/src/admin/mail/compose-window.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  const MAIL_MODULE_VERSION = new URL(import.meta.url).searchParams.get('v') ?? '1';
4
4
  const {createMailHost} = await import(new URL(`./host-context.js?v=${MAIL_MODULE_VERSION}`, import.meta.url).href);
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.18.0, packages/core/src/admin/mail/contacts.js.
1
+ // Source: @domma-mail/core 0.19.0, packages/core/src/admin/mail/contacts.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  /**
4
4
  * Recipient suggestions from the host address book.
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.18.0, packages/core/src/admin/mail/diagnostics-section.js.
1
+ // Source: @domma-mail/core 0.19.0, packages/core/src/admin/mail/diagnostics-section.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  /**
4
4
  * The settings section that answers "which build is this, and what went wrong".
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.18.0, packages/core/src/admin/mail/drag-drop.js.
1
+ // Source: @domma-mail/core 0.19.0, packages/core/src/admin/mail/drag-drop.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  /** Drag identities include the mailbox and source folder: UIDs alone are not unique. */
4
4
  const PROTECTED_USES = new Set(['\\Inbox', '\\Sent', '\\Drafts', '\\Trash', '\\Junk', '\\Archive', '\\All', '\\Flagged']);
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.18.0, packages/core/src/admin/mail/folder-tree.js.
1
+ // Source: @domma-mail/core 0.19.0, packages/core/src/admin/mail/folder-tree.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  /**
4
4
  * Mail folder presentation, shared by the Mail Reader and Email Pro.
@@ -254,3 +254,24 @@ export function folderMenuItems(roots, {current = null, onPick, label = null}) {
254
254
 
255
255
  return walk(roots);
256
256
  }
257
+
258
+ /** Folder names that hold spam on servers that do not mark one \Junk (Virtualmin's "spam", say). */
259
+ const SPAM_NAMES = /^(spam|junk|junk ?e-?mail|junk mail|bulk ?mail|spam mail)$/i;
260
+
261
+ /**
262
+ * Does this folder hold spam? The server's \Junk folder, or one named like a
263
+ * spam folder - a server filter (SpamAssassin, procmail) often files into a
264
+ * plain folder called "spam" that carries no special-use flag at all.
265
+ * Shared by the reader and the server so "Not spam" is offered exactly where
266
+ * the server will move the message back to the Inbox.
267
+ *
268
+ * @param {string} path
269
+ * @param {string|null} [junkPath] - the \Junk folder, when there is one
270
+ * @returns {boolean}
271
+ */
272
+ export function isSpamFolder(path, junkPath = null) {
273
+ const value = String(path ?? '');
274
+ if (!value) return false;
275
+ if (junkPath && value === junkPath) return true;
276
+ return SPAM_NAMES.test(value.split(/[./]/).pop().trim());
277
+ }
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.18.0, packages/core/src/admin/mail/font-controls.js.
1
+ // Source: @domma-mail/core 0.19.0, packages/core/src/admin/mail/font-controls.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  const MAIL_MODULE_VERSION = new URL(import.meta.url).searchParams.get('v') ?? '1';
4
4
  /**
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.18.0, packages/core/src/admin/mail/fonts.js.
1
+ // Source: @domma-mail/core 0.19.0, packages/core/src/admin/mail/fonts.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  /**
4
4
  * The fonts and sizes the mail editor offers - pure, so both the compose
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.18.0, packages/core/src/admin/mail/host-context.js.
1
+ // Source: @domma-mail/core 0.19.0, packages/core/src/admin/mail/host-context.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  /** Services supplied by the application that hosts the shared mail interface. */
4
4
  export function createMailApi({getToken, fetch: request = globalThis.fetch, onUnauthorized = () => {}}) {
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.18.0, packages/core/src/admin/mail/identity.js.
1
+ // Source: @domma-mail/core 0.19.0, packages/core/src/admin/mail/identity.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  /**
4
4
  * Who a mailbox sends as, and what it signs off with.
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.18.0, packages/core/src/admin/mail/image-senders-section.js.
1
+ // Source: @domma-mail/core 0.19.0, packages/core/src/admin/mail/image-senders-section.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  /**
4
4
  * The settings section for senders whose images always load.
@@ -97,6 +97,8 @@ async function render(container, ctx) {
97
97
  }, root);
98
98
  root.querySelector('.mail-remember').addEventListener('change', (event) => saveRemember(event.target.checked));
99
99
 
100
+ if (typeof data.contactImages === 'boolean') drawContacts(root, ctx, params, data, say);
101
+
100
102
  // One listener for every row's button - the rows are re-rendered by the list.
101
103
  root.addEventListener('click', (event) => {
102
104
  const button = event.target.closest('.mail-untrust');
@@ -105,6 +107,71 @@ async function render(container, ctx) {
105
107
  });
106
108
  }
107
109
 
110
+ /**
111
+ * "Load images from people in my contacts" - only where the host has contacts
112
+ * (the server sends `contactImages` then). On by default; the server also
113
+ * insists the receiving mail server verified the sender, so a forged From
114
+ * line naming a contact loads nothing.
115
+ *
116
+ * @returns {void}
117
+ */
118
+ function drawContacts(root, ctx, params, data, say) {
119
+ const box = document.createElement('div');
120
+ box.className = 'mail-contact-images mt-3';
121
+ const label = document.createElement('label');
122
+ label.className = 'mail-toggle-row text-sm';
123
+ const input = document.createElement('input');
124
+ input.type = 'checkbox';
125
+ input.checked = data.contactImages !== false;
126
+ label.append(input, ' Load images from people in my contacts');
127
+ const hint = document.createElement('p');
128
+ hint.className = 'text-sm text-muted mail-hint';
129
+ hint.textContent = 'Only when your mail server confirms the message really came from them, because anyone can put a contact\'s address on a message.';
130
+ const list = document.createElement('div');
131
+ list.className = 'mail-sender-list mt-2';
132
+ box.append(label, hint, list);
133
+ const status = root.querySelector('.mail-status');
134
+ root.insertBefore(box, status);
135
+
136
+ const drawBlocks = (blocks) => {
137
+ list.replaceChildren();
138
+ if (!blocks.length) return;
139
+ const head = document.createElement('p');
140
+ head.className = 'text-sm text-muted mail-none';
141
+ head.textContent = 'Contacts whose images stay blocked:';
142
+ list.appendChild(head);
143
+ for (const address of blocks) {
144
+ const row = document.createElement('div');
145
+ row.className = 'mail-box-row';
146
+ const name = document.createElement('span');
147
+ name.className = 'flex-1 text-sm mail-ellipsis';
148
+ name.textContent = address;
149
+ const allow = document.createElement('button');
150
+ allow.type = 'button';
151
+ allow.className = 'btn btn-sm btn-ghost';
152
+ allow.textContent = 'Allow again';
153
+ allow.addEventListener('click', () => save({unblock: address}, `Images from ${address} load again when verified.`));
154
+ row.append(name, allow);
155
+ list.appendChild(row);
156
+ }
157
+ };
158
+ async function save(change, done) {
159
+ input.disabled = true;
160
+ try {
161
+ const result = await ctx.api(`${ctx.base}/image-senders/contacts?${params}`, 'PUT', change);
162
+ input.checked = result.contactImages !== false;
163
+ drawBlocks(result.contactImageBlocks ?? []);
164
+ say(done, 'ok');
165
+ } catch (err) {
166
+ if (typeof change.enabled === 'boolean') input.checked = !change.enabled;
167
+ say(err.message, 'bad');
168
+ } finally { input.disabled = false; }
169
+ }
170
+ input.addEventListener('change', () => save({enabled: input.checked},
171
+ input.checked ? 'Images from verified contacts load straight away.' : 'Images from contacts are blocked like anyone else\'s.'));
172
+ drawBlocks(data.contactImageBlocks ?? []);
173
+ }
174
+
108
175
  /** The section both editions show. */
109
176
  export const imageSendersSection = {
110
177
  id: 'images', label: 'Images', render,
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.18.0, packages/core/src/admin/mail/keyboard.js.
1
+ // Source: @domma-mail/core 0.19.0, packages/core/src/admin/mail/keyboard.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  /**
4
4
  * Keyboard navigation for the reader.
@@ -1 +1 @@
1
- #view-container.mail-fullbleed{max-width:none}.mail-layout [hidden],.dm-slideover [hidden]{display:none!important}.mail-reader-summary{display:flex;align-items:baseline;gap:.5rem;flex-wrap:wrap}.mail-header-toggle,.mail-extras-toggle{padding:0!important;font-size:.78rem;opacity:.75;text-decoration:underline}.mail-header-toggle:hover,.mail-extras-toggle:hover{opacity:1}.mail-header-details{display:grid;grid-template-columns:max-content 1fr;gap:.15rem .75rem;margin:.5rem 0 0;font-size:.8rem}.mail-header-details dt{opacity:.65}.mail-header-details dd{margin:0;overflow-wrap:anywhere}.mail-layout{display:grid;grid-template-columns:var(--mail-col-1, 190px) auto var(--mail-col-2, 340px) auto 1fr;height:calc(100vh - 140px);min-height:320px;border:1px solid var(--dm-border);border-radius:var(--dm-radius-md, 8px);overflow:hidden;background:var(--dm-surface)}.mail-folders-pane,.mail-list-pane{display:flex;flex-direction:column;border-right:1px solid var(--dm-border);min-width:0;min-height:0}.mail-reader-pane{display:flex;flex-direction:column;min-width:0;min-height:0}.mail-pane-head{display:flex;align-items:center;justify-content:space-between;gap:.5rem;padding:.5rem .75rem;font-size:.8rem;font-weight:600;text-transform:uppercase;letter-spacing:.04em;color:var(--dm-text-muted);border-bottom:1px solid var(--dm-border);flex-shrink:0}.mail-folders-list,.mail-list{overflow-y:auto;flex:1;min-height:0}.mail-search{display:flex;align-items:center;gap:.4rem;padding:.4rem .6rem;border-bottom:1px solid var(--dm-border);color:var(--dm-text-muted);flex-shrink:0}.mail-search input{flex:1;min-width:0;font-size:.85rem;padding:.25rem .4rem}.mail-search-note{padding:.3rem .6rem;font-size:.74rem;color:var(--dm-text-muted);border-bottom:1px solid var(--dm-border);flex-shrink:0}.mail-slideover-resizer{padding:0;position:absolute;left:0;top:0;bottom:0;width:6px;cursor:col-resize;z-index:2;background:transparent}.mail-slideover-resizer:hover,.is-resizing>.mail-slideover-resizer{background:var(--dm-primary);opacity:.7}.is-resizing{user-select:none;transition:none!important}.mail-selection{display:flex;align-items:center;gap:.35rem;flex-wrap:wrap;padding:.35rem .6rem;font-size:.78rem;background:var(--dm-primary);color:var(--dm-primary-text);flex-shrink:0}.mail-selection span{flex:1;min-width:0}.mail-selection .btn{color:var(--dm-primary-text);border:1px solid currentColor;background:transparent}.mail-selection .btn:hover{background:color-mix(in srgb,var(--dm-primary-text) 15%,transparent)}.mail-item.is-selected{background:var(--dm-active-bg);box-shadow:inset 3px 0 0 var(--dm-primary)}.mail-undo{display:flex;align-items:center;gap:.5rem;padding:.4rem .6rem;font-size:.78rem;background:var(--dm-active-bg);border-bottom:1px solid var(--dm-border);flex-shrink:0}.mail-undo span{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mail-splitter{width:5px;cursor:col-resize;background:var(--dm-border);flex-shrink:0;background-clip:content-box;border-left:2px solid transparent;border-right:2px solid transparent;box-sizing:content-box}.mail-splitter:hover,.mail-layout.is-resizing .mail-splitter{background-color:var(--dm-primary)}.mail-layout.is-resizing{user-select:none}.mail-layout.is-resizing .mail-folders-pane,.mail-layout.is-resizing .mail-list-pane,.mail-layout.is-resizing .mail-reader-pane,.mail-layout.is-resizing iframe{pointer-events:none}.mail-unread-filter{display:flex;align-items:center;gap:.3rem;font-size:.7rem;text-transform:none;letter-spacing:0;cursor:pointer;margin-left:auto;margin-right:.25rem}.mail-unread-pill{flex-shrink:0;min-width:1.15rem;padding:0 .3rem;border-radius:999px;background:var(--dm-primary);color:var(--dm-primary-text);font-size:.66rem;font-weight:700;line-height:1.35;text-align:center}.mail-folder.is-context .mail-folder-name{opacity:.6}.mail-account{display:flex;align-items:center;gap:.4rem;width:100%;padding:.45rem .6rem;border:none;background:var(--dm-surface);cursor:pointer;text-align:left;font-size:.78rem;font-weight:700;text-transform:uppercase;letter-spacing:.03em;color:var(--dm-text-muted)}.mail-account:hover{background:var(--dm-hover-bg)}.mail-account.is-active{color:var(--dm-text);position:sticky;top:0;z-index:1;background:var(--dm-surface)}.mail-account-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mail-folder{display:flex;align-items:center;gap:.5rem;padding:.45rem .75rem;font-size:.875rem;cursor:pointer;border:none;background:none;width:100%;text-align:left;color:var(--dm-text)}.mail-folder:hover{background:var(--dm-hover-bg)}.mail-folder.is-active{background:var(--dm-active-bg);color:var(--dm-primary);font-weight:600}.mail-folder.is-unselectable{opacity:.6;cursor:default}.mail-folder.is-unselectable:hover{background:none}.mail-folder-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mail-item{display:block;width:100%;text-align:left;padding:.55rem .75rem;border:none;border-bottom:1px solid var(--dm-border);background:none;cursor:pointer;color:var(--dm-text)}.mail-item:hover{background:var(--dm-hover-bg)}.mail-item.is-active{background:var(--dm-active-bg)}.mail-item-top{display:flex;justify-content:space-between;gap:.5rem;align-items:baseline}.mail-item-from{font-size:.85rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mail-item.is-unread .mail-item-from,.mail-item.is-unread .mail-item-subject{font-weight:700}.mail-item-date{font-size:.72rem;color:var(--dm-text-muted);flex-shrink:0}.mail-item-subject{font-size:.82rem;margin-top:.1rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mail-item-meta{display:flex;align-items:center;gap:.35rem;margin-top:.15rem;color:var(--dm-text-muted)}.mail-pager{display:flex;align-items:center;justify-content:space-between;gap:.5rem;padding:.4rem .6rem;border-top:1px solid var(--dm-border);font-size:.75rem;color:var(--dm-text-muted);flex-shrink:0}.mail-reader-head{padding:.75rem 1rem;border-bottom:1px solid var(--dm-border);flex-shrink:0}.mail-reader-head:empty{display:none}.mail-reader-subject{font-size:1.05rem;font-weight:600;margin:0 0 .3rem;color:var(--dm-text)}.mail-reader-actions{display:flex;gap:.25rem;margin:.1rem 0 .35rem;flex-wrap:wrap}.mail-reader-meta{font-size:.8rem;color:var(--dm-text-muted)}.mail-reader-body{flex:1;position:relative;overflow:hidden;display:flex;flex-direction:column;min-height:0;background:var(--dm-surface)}.mail-reader-body iframe{width:100%;flex:1;border:none;display:block;background:#fff}.mail-notice{display:flex;align-items:center;gap:.5rem;flex-wrap:wrap;padding:.4rem .75rem;font-size:.78rem;background:var(--dm-warning);color:var(--dm-warning-text);border-bottom:1px solid var(--dm-border)}.mail-notice .btn{color:var(--dm-warning-text);border:1px solid currentColor;background:transparent;opacity:.95}.mail-notice .btn:hover{background:color-mix(in srgb,var(--dm-warning-text) 15%,transparent);opacity:1}.mail-security--ok{background:color-mix(in srgb,var(--dm-success) 14%,var(--dm-surface));color:var(--dm-text)}.mail-security--bad{background:var(--dm-danger);color:var(--dm-danger-text)}.mail-security-detail{flex-basis:100%;opacity:.85;overflow-wrap:anywhere}.mail-attachments{display:flex;flex-wrap:wrap;gap:.4rem;padding:.5rem .75rem;border-bottom:1px solid var(--dm-border);background:var(--dm-background-alt)}.mail-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.5rem;height:100%;color:var(--dm-text-muted);text-align:center;padding:1rem}.mail-empty p{margin:0;font-size:.875rem}@media(max-width:900px){.mail-layout{grid-template-columns:1fr;height:auto!important}.mail-splitter{display:none}.mail-folders-pane,.mail-list-pane{border-right:none;border-bottom:1px solid var(--dm-border)}.mail-folders-list,.mail-list{max-height:240px}.mail-reader-body{min-height:60vh}}.mail-box-row{display:flex;align-items:center;gap:.5rem;padding:.5rem .6rem;border:1px solid var(--dm-border);border-radius:var(--dm-radius-md, 6px)}.mail-default-badge{margin-left:.4rem;font-size:.7rem;font-weight:500;vertical-align:middle}.mail-item.is-dragging{opacity:.45}.mail-item{position:relative}.mail-item-tick{position:absolute;left:.45rem;top:.55rem;display:inline-flex;opacity:0;color:var(--dm-text-muted);transition:opacity .12s ease;padding:2px;margin:-2px;border-radius:var(--dm-radius-sm, 3px)}.mail-item:hover .mail-item-tick,.mail-item:focus-visible .mail-item-tick,.mail-list.is-selecting .mail-item-tick,.mail-item-tick[aria-checked=true]{opacity:1}.mail-item-tick[aria-checked=true]{color:var(--dm-primary)}.mail-item-tick:hover{color:var(--dm-primary);background:var(--dm-hover-bg)}.mail-item-top,.mail-item-subject,.mail-item-meta{padding-left:1.5rem}.mail-select-all{display:inline-flex;align-items:center;margin-right:.1rem;cursor:pointer}.mail-select-all input{cursor:pointer;margin:0}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.mail-item-meta>span{display:inline-flex}.mail-item-meta .is-replied{color:var(--dm-success)}.mail-item-meta .is-forwarded{color:var(--dm-info, var(--dm-primary))}.mail-item-meta .is-high{color:var(--dm-danger)}.mail-item-meta .is-low{color:var(--dm-text-muted);opacity:.7}.mail-folder.is-hidden-folder .mail-folder-name{opacity:.5;font-style:italic}.mail-thread-chip{display:inline-flex;align-items:center;margin-left:.4rem;padding:0 .35rem;border-radius:999px;font-size:.68rem;font-weight:700;line-height:1.5;color:var(--dm-text-muted);background:var(--dm-active-bg);cursor:pointer}.mail-thread-chip:hover{color:var(--dm-primary)}.mail-thread-chip.is-unread{background:var(--dm-primary);color:var(--dm-primary-text)}.mail-item.is-in-thread{padding-left:1.6rem;box-shadow:inset 3px 0 0 var(--dm-border)}.mail-item.is-in-thread .mail-item-from{font-size:.8rem}.mail-pane-head .btn.is-on{color:var(--dm-primary);background:var(--dm-active-bg)}#mail-outbox-btn{font-size:.72rem;font-weight:700}#mail-outbox-btn.is-failed{color:var(--dm-danger)}.mail-attachment{display:inline-flex;align-items:center;border:1px solid var(--dm-border);border-radius:var(--dm-radius-md, 6px);overflow:hidden}.mail-attachment .btn{border:none;border-radius:0}.mail-attachment-save{padding-left:.4rem!important;padding-right:.4rem!important;border-left:1px solid var(--dm-border)!important;opacity:.7}.mail-attachment-save:hover{opacity:1;color:var(--dm-primary)}.mail-section-heading{margin:1rem 0 .1rem;font-size:.8rem;text-transform:uppercase;letter-spacing:.04em;color:var(--dm-text-muted)}.mail-section-heading:first-child{margin-top:.25rem}.mail-section-form .domma-form{margin:0}.mail-section-form .domma-form-field:last-child{margin-bottom:0}.mail-item-card{margin:0}.mail-item-card .card-header{padding:.5rem .6rem}.mail-item-card .card-body{padding:.6rem}.mail-ellipsis{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.mail-status{min-height:1.2em}.mail-empty-line{margin:.25rem 0}.mail-editor-fallback{min-height:8rem;font-family:inherit;resize:vertical}.mail-clause{display:flex;gap:.3rem;align-items:center;flex-wrap:wrap}.mail-clause .form-select,.mail-clause .form-input{width:auto;flex:0 1 auto}.mail-clause .mail-clause-value{flex:1 1 8rem;min-width:8rem}.mail-section-list{display:flex;flex-direction:column;gap:.5rem}.mail-scroll-sm{max-height:20vh;overflow-y:auto}.mail-scroll-md{max-height:46vh;overflow-y:auto}.mail-section-form .domma-form-field:has(select) .form-label .text-danger{display:none}.mail-compose-form{padding:.25rem 0 .5rem;display:flex;flex-direction:column;gap:.6rem;height:100%}.mail-compose-body{display:flex;flex-direction:column;flex:1;min-height:0}.mail-compose-editor{flex:1;min-height:0}.mail-compose-textarea{flex:1;min-height:34vh;font-family:inherit;resize:vertical}.mail-attach-list{display:flex;flex-direction:column;gap:.2rem}.mail-template-row{margin:-.15rem 0 .35rem}.mail-template-picker{max-width:16rem}.mail-suggest-row{display:flex;flex-direction:column;line-height:1.25}.mail-suggest-detail{opacity:.7}.mail-rule-off{opacity:.55}.mail-panel{padding:.25rem 0 .5rem}.mail-panel-stack{padding:.25rem 0 .5rem;display:flex;flex-direction:column;gap:1rem}.mail-form-stack{padding:.25rem 0 .5rem;display:flex;flex-direction:column;gap:.75rem}.mail-dialog-stack{display:flex;flex-direction:column;gap:.5rem;padding:.25rem 0}.mail-hint{margin-top:.2rem}.mail-box-sub{overflow:hidden;text-overflow:ellipsis}.mail-add-btn{align-self:flex-start;margin-top:.5rem}.mail-none{margin:0;padding:.5rem .6rem}.mail-kv{padding:.5rem 0;display:flex;flex-direction:column;gap:.35rem}.mail-kv-row{display:flex;gap:.75rem}.mail-kv-key{min-width:8.5rem;flex-shrink:0}.mail-toggle-row{display:flex;align-items:center;gap:.5rem;margin-bottom:.75rem}.mail-sender-list{display:flex;flex-direction:column;gap:.2rem;max-height:40vh;overflow-y:auto}.mail-folder-pick{display:flex;align-items:center;gap:.5rem;padding:.3rem .4rem;border-radius:var(--dm-radius-md, 6px)}.mail-diag-log{width:100%;height:30vh;margin-top:.5rem;font-family:monospace;font-size:.72rem}.mail-facts{display:flex;flex-direction:column;gap:.2rem;margin-bottom:.75rem}.mail-item-more{position:absolute;right:.4rem;bottom:.35rem;display:inline-flex;align-items:center;justify-content:center;min-width:1.4rem;height:1.4rem;border-radius:var(--dm-radius-sm, 3px);font-size:1rem;line-height:1;color:var(--dm-text-muted);background:inherit;opacity:0;transition:opacity .12s ease}.mail-item:hover .mail-item-more,.mail-item:focus-visible .mail-item-more,.mail-item.is-active .mail-item-more{opacity:1}.mail-item-more:hover{color:var(--dm-primary)}.mail-section-intro{display:flex;align-items:center;gap:.35rem;margin:0 0 .75rem;padding-bottom:.5rem;border-bottom:1px solid var(--dm-border)}.mail-pager-middle{display:flex;align-items:center;gap:.5rem;min-width:0}.mail-page-size{font:inherit;color:inherit;background:transparent;border:1px solid var(--dm-border);border-radius:4px;padding:.1rem .25rem}.mail-auth-choice{display:flex;flex-wrap:wrap;align-items:center;gap:.4rem;padding-bottom:.5rem;border-bottom:1px solid var(--dm-border)}.mail-oauth{display:flex;flex-direction:column;gap:.75rem}.mail-oauth-warn{margin:0;padding:.5rem .7rem;border:1px solid var(--dm-warning);border-radius:var(--dm-radius-md);color:var(--dm-warning-text)}.mail-oauth-state{display:flex;align-items:center;gap:.5rem;flex-wrap:wrap}.mail-oauth-chip{margin-left:.4rem;border:1px solid var(--dm-border);background:var(--dm-surface);color:var(--dm-text-muted)}.mail-oauth-state .mail-oauth-chip{margin-left:0}.mail-oauth-chip--ok{border-color:var(--dm-success);color:var(--dm-success)}.mail-oauth-chip--bad{border-color:var(--dm-danger);color:var(--dm-danger)}.mail-oauth-guide{border:1px solid var(--dm-border);border-radius:var(--dm-radius-md);padding:.5rem .75rem;background:var(--dm-background-alt)}.mail-oauth-guide>summary{cursor:pointer;font-weight:600}.mail-oauth-guide-body ol{padding-left:1.2rem;margin:.5rem 0 0}.mail-oauth-guide-body li{margin-bottom:.45rem}.mail-oauth-code{word-break:break-all;user-select:all}.mail-loading-slot{display:block;min-height:3rem;padding:.5rem .6rem}.mail-row-more{flex-shrink:0;margin-left:auto;display:inline-flex;align-items:center;justify-content:center;min-width:1.3rem;height:1.3rem;border-radius:var(--dm-radius-sm);font-size:.95rem;line-height:1;color:var(--dm-text-muted);opacity:0;transition:opacity .12s ease}.mail-unread-pill+.mail-row-more{margin-left:0}.mail-folder:hover .mail-row-more,.mail-folder:focus-visible .mail-row-more,.mail-folder.is-active .mail-row-more,.mail-account:hover .mail-row-more,.mail-account:focus-visible .mail-row-more,.mail-account.is-active .mail-row-more{opacity:1}.mail-row-more:hover{color:var(--dm-primary)}.mail-box-row .mail-row-more{opacity:1;margin-left:0}.mail-box-row:focus-visible{outline:2px solid var(--dm-primary);outline-offset:-2px}.mail-restored-note{margin:0;padding:.4rem .6rem;border-left:3px solid var(--dm-warning);background:var(--dm-background-alt)}.mail-font-controls .mail-font-btn{width:auto;min-width:3.5rem;max-width:10rem;padding:0 .5rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.8125rem}.domma-dropdown-menu:has(.mail-font-item),.domma-dropdown-menu:has(.mail-size-item){max-height:min(60vh,26rem);overflow-y:auto;z-index:10050}.domma-dropdown-item:has(.mail-font-item){display:flex;align-items:center;justify-content:space-between;gap:.75rem}.mail-font-item{font-size:.9375rem}.mail-font-web{font-size:.6875rem;color:var(--dm-text-muted);text-transform:uppercase;letter-spacing:.04em}.mail-item.is-dragging,.mail-folder.is-dragging{opacity:.45}.mail-folders-pane[data-drop-hint]{position:relative}.mail-folders-pane[data-drop-hint]:after{content:attr(data-drop-hint);position:absolute;bottom:0;left:0;right:0;padding:.65rem;background:var(--dm-primary);color:var(--dm-primary-text);font-size:.75rem;pointer-events:none;z-index:1}.mail-folders-pane.is-root-drop-target{outline:2px solid var(--dm-primary);outline-offset:-2px}.mail-folder.is-drop-target{background:var(--dm-primary);color:var(--dm-primary-text);outline:2px solid var(--dm-primary);outline-offset:-2px}.mail-folder.is-drop-target .mail-folder-name,.mail-folder.is-drop-target .mail-unread-pill{color:inherit}.mail-item.is-dragging *{pointer-events:none}
1
+ #view-container.mail-fullbleed{max-width:none}.mail-layout [hidden],.dm-slideover [hidden]{display:none!important}.mail-reader-summary{display:flex;align-items:baseline;gap:.5rem;flex-wrap:wrap}.mail-header-toggle,.mail-extras-toggle{padding:0!important;font-size:.78rem;opacity:.75;text-decoration:underline}.mail-header-toggle:hover,.mail-extras-toggle:hover{opacity:1}.mail-header-details{display:grid;grid-template-columns:max-content 1fr;gap:.15rem .75rem;margin:.5rem 0 0;font-size:.8rem}.mail-header-details dt{opacity:.65}.mail-header-details dd{margin:0;overflow-wrap:anywhere}.mail-layout{display:grid;grid-template-columns:var(--mail-col-1, 190px) auto var(--mail-col-2, 340px) auto 1fr;height:calc(100vh - 140px);min-height:320px;border:1px solid var(--dm-border);border-radius:var(--dm-radius-md, 8px);overflow:hidden;background:var(--dm-surface)}.mail-folders-pane,.mail-list-pane{display:flex;flex-direction:column;border-right:1px solid var(--dm-border);min-width:0;min-height:0}.mail-reader-pane{display:flex;flex-direction:column;min-width:0;min-height:0}.mail-pane-head{display:flex;align-items:center;justify-content:space-between;gap:.5rem;padding:.5rem .75rem;font-size:.8rem;font-weight:600;text-transform:uppercase;letter-spacing:.04em;color:var(--dm-text-muted);border-bottom:1px solid var(--dm-border);flex-shrink:0}.mail-folders-list,.mail-list{overflow-y:auto;flex:1;min-height:0}.mail-search{display:flex;align-items:center;gap:.4rem;padding:.4rem .6rem;border-bottom:1px solid var(--dm-border);color:var(--dm-text-muted);flex-shrink:0}.mail-search input{flex:1;min-width:0;font-size:.85rem;padding:.25rem .4rem}.mail-search-note{padding:.3rem .6rem;font-size:.74rem;color:var(--dm-text-muted);border-bottom:1px solid var(--dm-border);flex-shrink:0}.mail-slideover-resizer{padding:0;position:absolute;left:0;top:0;bottom:0;width:6px;cursor:col-resize;z-index:2;background:transparent}.mail-slideover-resizer:hover,.is-resizing>.mail-slideover-resizer{background:var(--dm-primary);opacity:.7}.is-resizing{user-select:none;transition:none!important}.mail-selection{display:flex;align-items:center;gap:.35rem;flex-wrap:wrap;padding:.35rem .6rem;font-size:.78rem;background:var(--dm-primary);color:var(--dm-primary-text);flex-shrink:0}.mail-selection span{flex:1;min-width:0}.mail-selection .btn{color:var(--dm-primary-text);border:1px solid currentColor;background:transparent}.mail-selection .btn:hover{background:color-mix(in srgb,var(--dm-primary-text) 15%,transparent)}.mail-item.is-selected{background:var(--dm-active-bg);box-shadow:inset 3px 0 0 var(--dm-primary)}.mail-undo{display:flex;align-items:center;gap:.5rem;padding:.4rem .6rem;font-size:.78rem;background:var(--dm-active-bg);border-bottom:1px solid var(--dm-border);flex-shrink:0}.mail-undo span{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mail-splitter{width:5px;cursor:col-resize;background:var(--dm-border);flex-shrink:0;background-clip:content-box;border-left:2px solid transparent;border-right:2px solid transparent;box-sizing:content-box}.mail-splitter:hover,.mail-layout.is-resizing .mail-splitter{background-color:var(--dm-primary)}.mail-layout.is-resizing{user-select:none}.mail-layout.is-resizing .mail-folders-pane,.mail-layout.is-resizing .mail-list-pane,.mail-layout.is-resizing .mail-reader-pane,.mail-layout.is-resizing iframe{pointer-events:none}.mail-unread-filter{display:flex;align-items:center;gap:.3rem;font-size:.7rem;text-transform:none;letter-spacing:0;cursor:pointer;margin-left:auto;margin-right:.25rem}.mail-unread-pill{flex-shrink:0;min-width:1.15rem;padding:0 .3rem;border-radius:999px;background:var(--dm-primary);color:var(--dm-primary-text);font-size:.66rem;font-weight:700;line-height:1.35;text-align:center}.mail-folder.is-context .mail-folder-name{opacity:.6}.mail-account{display:flex;align-items:center;gap:.4rem;width:100%;padding:.45rem .6rem;border:none;background:var(--dm-surface);cursor:pointer;text-align:left;font-size:.78rem;font-weight:700;text-transform:uppercase;letter-spacing:.03em;color:var(--dm-text-muted)}.mail-account:hover{background:var(--dm-hover-bg)}.mail-account.is-active{color:var(--dm-text);position:sticky;top:0;z-index:1;background:var(--dm-surface)}.mail-account-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mail-folder{display:flex;align-items:center;gap:.5rem;padding:.45rem .75rem;font-size:.875rem;cursor:pointer;border:none;background:none;width:100%;text-align:left;color:var(--dm-text)}.mail-folder:hover{background:var(--dm-hover-bg)}.mail-folder.is-active{background:var(--dm-active-bg);color:var(--dm-primary);font-weight:600}.mail-folder.is-unselectable{opacity:.6;cursor:default}.mail-folder.is-unselectable:hover{background:none}.mail-folder-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mail-item{display:block;width:100%;text-align:left;padding:.55rem .75rem;border:none;border-bottom:1px solid var(--dm-border);background:none;cursor:pointer;color:var(--dm-text)}.mail-item:hover{background:var(--dm-hover-bg)}.mail-item.is-active{background:var(--dm-active-bg)}.mail-item-top{display:flex;justify-content:space-between;gap:.5rem;align-items:baseline}.mail-item-from{font-size:.85rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mail-item.is-unread .mail-item-from,.mail-item.is-unread .mail-item-subject{font-weight:700}.mail-item-date{font-size:.72rem;color:var(--dm-text-muted);flex-shrink:0}.mail-item-subject{font-size:.82rem;margin-top:.1rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mail-item-meta{display:flex;align-items:center;gap:.35rem;margin-top:.15rem;color:var(--dm-text-muted)}.mail-pager{display:flex;align-items:center;justify-content:space-between;gap:.5rem;padding:.4rem .6rem;border-top:1px solid var(--dm-border);font-size:.75rem;color:var(--dm-text-muted);flex-shrink:0}.mail-reader-head{padding:.75rem 1rem;border-bottom:1px solid var(--dm-border);flex-shrink:0}.mail-reader-head:empty{display:none}.mail-reader-subject{font-size:1.05rem;font-weight:600;margin:0 0 .3rem;color:var(--dm-text)}.mail-reader-actions{display:flex;gap:.25rem;margin:.1rem 0 .35rem;flex-wrap:wrap}.mail-reader-meta{font-size:.8rem;color:var(--dm-text-muted)}.mail-reader-body{flex:1;position:relative;overflow:hidden;display:flex;flex-direction:column;min-height:0;background:var(--dm-surface)}.mail-reader-body iframe{width:100%;flex:1;border:none;display:block;background:#fff}.mail-notice{display:flex;align-items:center;gap:.5rem;flex-wrap:wrap;padding:.4rem .75rem;font-size:.78rem;background:var(--dm-warning);color:var(--dm-warning-text);border-bottom:1px solid var(--dm-border)}.mail-notice .btn{color:var(--dm-warning-text);border:1px solid currentColor;background:transparent;opacity:.95}.mail-notice .btn:hover{background:color-mix(in srgb,var(--dm-warning-text) 15%,transparent);opacity:1}.mail-security--ok{background:color-mix(in srgb,var(--dm-success) 14%,var(--dm-surface));color:var(--dm-text)}.mail-security--bad{background:var(--dm-danger);color:var(--dm-danger-text)}.mail-security-detail{flex-basis:100%;opacity:.85;overflow-wrap:anywhere}.mail-attachments{display:flex;flex-wrap:wrap;gap:.4rem;padding:.5rem .75rem;border-bottom:1px solid var(--dm-border);background:var(--dm-background-alt)}.mail-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.5rem;height:100%;color:var(--dm-text-muted);text-align:center;padding:1rem}.mail-empty p{margin:0;font-size:.875rem}@media(max-width:900px){.mail-layout{grid-template-columns:1fr;height:auto!important}.mail-splitter{display:none}.mail-folders-pane,.mail-list-pane{border-right:none;border-bottom:1px solid var(--dm-border)}.mail-folders-list,.mail-list{max-height:240px}.mail-reader-body{min-height:60vh}}.mail-box-row{display:flex;align-items:center;gap:.5rem;padding:.5rem .6rem;border:1px solid var(--dm-border);border-radius:var(--dm-radius-md, 6px)}.mail-default-badge{margin-left:.4rem;font-size:.7rem;font-weight:500;vertical-align:middle}.mail-item.is-dragging{opacity:.45}.mail-item{position:relative}.mail-item-tick{position:absolute;left:.45rem;top:.55rem;display:inline-flex;opacity:0;color:var(--dm-text-muted);transition:opacity .12s ease;padding:2px;margin:-2px;border-radius:var(--dm-radius-sm, 3px)}.mail-item:hover .mail-item-tick,.mail-item:focus-visible .mail-item-tick,.mail-list.is-selecting .mail-item-tick,.mail-item-tick[aria-checked=true]{opacity:1}.mail-item-tick[aria-checked=true]{color:var(--dm-primary)}.mail-item-tick:hover{color:var(--dm-primary);background:var(--dm-hover-bg)}.mail-item-top,.mail-item-subject,.mail-item-meta{padding-left:1.5rem}.mail-select-all{display:inline-flex;align-items:center;margin-right:.1rem;cursor:pointer}.mail-select-all input{cursor:pointer;margin:0}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.mail-item-meta>span{display:inline-flex}.mail-item-meta .is-replied{color:var(--dm-success)}.mail-item-meta .is-forwarded{color:var(--dm-info, var(--dm-primary))}.mail-item-meta .is-high{color:var(--dm-danger)}.mail-item-meta .is-low{color:var(--dm-text-muted);opacity:.7}.mail-folder.is-hidden-folder .mail-folder-name{opacity:.5;font-style:italic}.mail-thread-chip{display:inline-flex;align-items:center;margin-left:.4rem;padding:0 .35rem;border-radius:999px;font-size:.68rem;font-weight:700;line-height:1.5;color:var(--dm-text-muted);background:var(--dm-active-bg);cursor:pointer}.mail-thread-chip:hover{color:var(--dm-primary)}.mail-thread-chip.is-unread{background:var(--dm-primary);color:var(--dm-primary-text)}.mail-item.is-in-thread{padding-left:1.6rem;box-shadow:inset 3px 0 0 var(--dm-border)}.mail-item.is-in-thread .mail-item-from{font-size:.8rem}.mail-pane-head .btn.is-on{color:var(--dm-primary);background:var(--dm-active-bg)}#mail-outbox-btn{font-size:.72rem;font-weight:700}#mail-outbox-btn.is-failed{color:var(--dm-danger)}.mail-attachment{display:inline-flex;align-items:center;border:1px solid var(--dm-border);border-radius:var(--dm-radius-md, 6px);overflow:hidden}.mail-attachment .btn{border:none;border-radius:0}.mail-attachment-save{padding-left:.4rem!important;padding-right:.4rem!important;border-left:1px solid var(--dm-border)!important;opacity:.7}.mail-attachment-save:hover{opacity:1;color:var(--dm-primary)}.mail-section-heading{margin:1rem 0 .1rem;font-size:.8rem;text-transform:uppercase;letter-spacing:.04em;color:var(--dm-text-muted)}.mail-section-heading:first-child{margin-top:.25rem}.mail-section-form .domma-form{margin:0}.mail-section-form .domma-form-field:last-child{margin-bottom:0}.mail-item-card{margin:0}.mail-item-card .card-header{padding:.5rem .6rem}.mail-item-card .card-body{padding:.6rem}.mail-ellipsis{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.mail-status{min-height:1.2em}.mail-empty-line{margin:.25rem 0}.mail-editor-fallback{min-height:8rem;font-family:inherit;resize:vertical}.mail-clause{display:flex;gap:.3rem;align-items:center;flex-wrap:wrap}.mail-clause .form-select,.mail-clause .form-input{width:auto;flex:0 1 auto}.mail-clause .mail-clause-value{flex:1 1 8rem;min-width:8rem}.mail-section-list{display:flex;flex-direction:column;gap:.5rem}.mail-scroll-sm{max-height:20vh;overflow-y:auto}.mail-scroll-md{max-height:46vh;overflow-y:auto}.mail-section-form .domma-form-field:has(select) .form-label .text-danger{display:none}.mail-compose-form{padding:.25rem 0 .5rem;display:flex;flex-direction:column;gap:.6rem;height:100%}.mail-compose-body{display:flex;flex-direction:column;flex:1;min-height:0}.mail-compose-editor{flex:1;min-height:0}.mail-compose-textarea{flex:1;min-height:34vh;font-family:inherit;resize:vertical}.mail-attach-list{display:flex;flex-direction:column;gap:.2rem}.mail-template-row{margin:-.15rem 0 .35rem}.mail-template-picker{max-width:16rem}.mail-suggest-row{display:flex;flex-direction:column;line-height:1.25}.mail-suggest-detail{opacity:.7}.mail-rule-off{opacity:.55}.mail-panel{padding:.25rem 0 .5rem}.mail-panel-stack{padding:.25rem 0 .5rem;display:flex;flex-direction:column;gap:1rem}.mail-form-stack{padding:.25rem 0 .5rem;display:flex;flex-direction:column;gap:.75rem}.mail-dialog-stack{display:flex;flex-direction:column;gap:.5rem;padding:.25rem 0}.mail-hint{margin-top:.2rem}.mail-box-sub{overflow:hidden;text-overflow:ellipsis}.mail-add-btn{align-self:flex-start;margin-top:.5rem}.mail-none{margin:0;padding:.5rem .6rem}.mail-kv{padding:.5rem 0;display:flex;flex-direction:column;gap:.35rem}.mail-kv-row{display:flex;gap:.75rem}.mail-kv-key{min-width:8.5rem;flex-shrink:0}.mail-toggle-row{display:flex;align-items:center;gap:.5rem;margin-bottom:.75rem}.mail-sender-list{display:flex;flex-direction:column;gap:.2rem;max-height:40vh;overflow-y:auto}.mail-folder-pick{display:flex;align-items:center;gap:.5rem;padding:.3rem .4rem;border-radius:var(--dm-radius-md, 6px)}.mail-diag-log{width:100%;height:30vh;margin-top:.5rem;font-family:monospace;font-size:.72rem}.mail-facts{display:flex;flex-direction:column;gap:.2rem;margin-bottom:.75rem}.mail-item-more{position:absolute;right:.4rem;bottom:.35rem;display:inline-flex;align-items:center;justify-content:center;min-width:1.4rem;height:1.4rem;border-radius:var(--dm-radius-sm, 3px);font-size:1rem;line-height:1;color:var(--dm-text-muted);background:inherit;opacity:0;transition:opacity .12s ease}.mail-item:hover .mail-item-more,.mail-item:focus-visible .mail-item-more,.mail-item.is-active .mail-item-more{opacity:1}.mail-item-more:hover{color:var(--dm-primary)}.mail-section-intro{display:flex;align-items:center;gap:.35rem;margin:0 0 .75rem;padding-bottom:.5rem;border-bottom:1px solid var(--dm-border)}.mail-pager-middle{display:flex;align-items:center;gap:.5rem;min-width:0}.mail-page-size{font:inherit;color:inherit;background:transparent;border:1px solid var(--dm-border);border-radius:4px;padding:.1rem .25rem}.mail-auth-choice{display:flex;flex-wrap:wrap;align-items:center;gap:.4rem;padding-bottom:.5rem;border-bottom:1px solid var(--dm-border)}.mail-oauth{display:flex;flex-direction:column;gap:.75rem}.mail-oauth-warn{margin:0;padding:.5rem .7rem;border:1px solid var(--dm-warning);border-radius:var(--dm-radius-md);color:var(--dm-warning-text)}.mail-oauth-state{display:flex;align-items:center;gap:.5rem;flex-wrap:wrap}.mail-oauth-chip{margin-left:.4rem;border:1px solid var(--dm-border);background:var(--dm-surface);color:var(--dm-text-muted)}.mail-oauth-state .mail-oauth-chip{margin-left:0}.mail-oauth-chip--ok{border-color:var(--dm-success);color:var(--dm-success)}.mail-oauth-chip--bad{border-color:var(--dm-danger);color:var(--dm-danger)}.mail-oauth-guide{border:1px solid var(--dm-border);border-radius:var(--dm-radius-md);padding:.5rem .75rem;background:var(--dm-background-alt)}.mail-oauth-guide>summary{cursor:pointer;font-weight:600}.mail-oauth-guide-body ol{padding-left:1.2rem;margin:.5rem 0 0}.mail-oauth-guide-body li{margin-bottom:.45rem}.mail-oauth-code{word-break:break-all;user-select:all}.mail-loading-slot{display:block;min-height:3rem;padding:.5rem .6rem}.mail-row-more{flex-shrink:0;margin-left:auto;display:inline-flex;align-items:center;justify-content:center;min-width:1.3rem;height:1.3rem;border-radius:var(--dm-radius-sm);font-size:.95rem;line-height:1;color:var(--dm-text-muted);opacity:0;transition:opacity .12s ease}.mail-unread-pill+.mail-row-more{margin-left:0}.mail-folder:hover .mail-row-more,.mail-folder:focus-visible .mail-row-more,.mail-folder.is-active .mail-row-more,.mail-account:hover .mail-row-more,.mail-account:focus-visible .mail-row-more,.mail-account.is-active .mail-row-more{opacity:1}.mail-row-more:hover{color:var(--dm-primary)}.mail-box-row .mail-row-more{opacity:1;margin-left:0}.mail-box-row:focus-visible{outline:2px solid var(--dm-primary);outline-offset:-2px}.mail-restored-note{margin:0;padding:.4rem .6rem;border-left:3px solid var(--dm-warning);background:var(--dm-background-alt)}.mail-font-controls .mail-font-btn{width:auto;min-width:3.5rem;max-width:10rem;padding:0 .5rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.8125rem}.domma-dropdown-menu:has(.mail-font-item),.domma-dropdown-menu:has(.mail-size-item){max-height:min(60vh,26rem);overflow-y:auto;z-index:10050}.domma-dropdown-item:has(.mail-font-item){display:flex;align-items:center;justify-content:space-between;gap:.75rem}.mail-font-item{font-size:.9375rem}.mail-font-web{font-size:.6875rem;color:var(--dm-text-muted);text-transform:uppercase;letter-spacing:.04em}.mail-item.is-dragging,.mail-folder.is-dragging{opacity:.45}.mail-folders-pane[data-drop-hint]{position:relative}.mail-folders-pane[data-drop-hint]:after{content:attr(data-drop-hint);position:absolute;bottom:0;left:0;right:0;padding:.65rem;background:var(--dm-primary);color:var(--dm-primary-text);font-size:.75rem;pointer-events:none;z-index:1}.mail-folders-pane.is-root-drop-target{outline:2px solid var(--dm-primary);outline-offset:-2px}.mail-folder.is-drop-target{background:var(--dm-primary);color:var(--dm-primary-text);outline:2px solid var(--dm-primary);outline-offset:-2px}.mail-folder.is-drop-target .mail-folder-name,.mail-folder.is-drop-target .mail-unread-pill{color:inherit}.mail-item.is-dragging *{pointer-events:none}.tab-item .mail-tab-pip{display:inline-block;width:.45rem;height:.45rem;margin-left:.35rem;border-radius:50%;background:var(--dm-warning, var(--dm-primary));vertical-align:middle}.mail-notice.mail-notice--quiet{background:var(--dm-background-alt);color:var(--dm-text-muted)}.mail-notice.mail-notice--quiet .btn{color:var(--dm-text)}
@@ -1,4 +1,4 @@
1
- <!-- Source: @domma-mail/core 0.18.0, packages/core/src/admin/mail/mail.html. -->
1
+ <!-- Source: @domma-mail/core 0.19.0, packages/core/src/admin/mail/mail.html. -->
2
2
  <div class="mail-layout">
3
3
 
4
4
  <!-- Folders -->
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.18.0, packages/core/src/admin/mail/message-actions.js.
1
+ // Source: @domma-mail/core 0.19.0, packages/core/src/admin/mail/message-actions.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  /**
4
4
  * What other Tools add to a message's menu - Booking's "Book Sam...".
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.18.0, packages/core/src/admin/mail/oauth-panel.js.
1
+ // Source: @domma-mail/core 0.19.0, packages/core/src/admin/mail/oauth-panel.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  /**
4
4
  * "Sign in with Microsoft / Google" for a mailbox - the part of the mailbox
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.18.0, packages/core/src/admin/mail/panes.js.
1
+ // Source: @domma-mail/core 0.19.0, packages/core/src/admin/mail/panes.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  /**
4
4
  * Pane sizing for the mail reader, shared by the Mail Reader and Email Pro.
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.18.0, packages/core/src/admin/mail/reader-kit.js.
1
+ // Source: @domma-mail/core 0.19.0, packages/core/src/admin/mail/reader-kit.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  /**
4
4
  * The reader view's decisions that need no DOM - escaping, the mailbox form's
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.18.0, packages/core/src/admin/mail/reader-runtime.js.
1
+ // Source: @domma-mail/core 0.19.0, packages/core/src/admin/mail/reader-runtime.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  const MAIL_MODULE_VERSION = new URL(import.meta.url).searchParams.get('v') ?? '1';
4
4
  const {createMailHost} = await import(new URL(`./host-context.js?v=${MAIL_MODULE_VERSION}`, import.meta.url).href);
@@ -27,6 +27,8 @@ const {createMailHost} = await import(new URL(`./host-context.js?v=${MAIL_MODULE
27
27
  // against import.meta.url means the whole graph moves together.
28
28
  const ASSET_VERSION = new URL(import.meta.url).searchParams.get('v') ?? '1';
29
29
  const versioned = name => new URL(`./${name}?v=${ASSET_VERSION}`, import.meta.url).href;
30
+ /** How long a dragged message is held over a closed folder before it opens. */
31
+ const SPRING_OPEN_MS = 700;
30
32
 
31
33
  const {
32
34
  buildFolderTree,
@@ -34,6 +36,7 @@ const {
34
36
  folderHeading,
35
37
  folderMenuItems,
36
38
  iconForFolder,
39
+ isSpamFolder,
37
40
  pruneToUnread,
38
41
  unreadInSubtree
39
42
  } = await import(versioned('folder-tree.js'));
@@ -903,7 +906,10 @@ return {
903
906
  const helpDisposers = [];
904
907
  // What sections registered through ctx.guard / ctx.onClose.
905
908
  const guards = new Set();
909
+ // Which section registered each guard, for the tab's unsaved pip.
910
+ const guardSection = new WeakMap();
906
911
  const closeFns = new Set();
912
+ let refreshPips = () => {};
907
913
  const dirtyGuards = () => [...guards].filter(g => { try { return Boolean(g.dirty?.()); } catch { return false; } });
908
914
  // Each section saves on its own button; the panel asks only for
909
915
  // sections that said (ctx.guard) they hold unsaved work.
@@ -912,6 +918,7 @@ return {
912
918
  () => settingsDiscardQuestion(dirtyGuards().map(g => g.label)),
913
919
  () => {
914
920
  settingsOnce.release();
921
+ refreshPips = () => {};
915
922
  try { stopSettingsResize(); } catch { /* never made: the build failed first */ }
916
923
  helpDisposers.splice(0).forEach(fn => { try { fn?.(); } catch { /* gone */ } });
917
924
  for (const fn of [...closeFns]) { try { fn(); } catch { /* one failing must not stop the rest */ } }
@@ -1011,7 +1018,9 @@ return {
1011
1018
  guard(guard) {
1012
1019
  if (!guard || typeof guard.dirty !== 'function') return () => {};
1013
1020
  guards.add(guard);
1014
- return () => guards.delete(guard);
1021
+ if (section?.id) guardSection.set(guard, section.id);
1022
+ refreshPips();
1023
+ return () => { guards.delete(guard); refreshPips(); };
1015
1024
  },
1016
1025
  /**
1017
1026
  * Run `fn` once when the settings panel closes, however it
@@ -1089,12 +1098,14 @@ return {
1089
1098
  tabs.appendChild(list);
1090
1099
 
1091
1100
  const panels = [];
1101
+ const triggers = new Map();
1092
1102
  sections.forEach((section, index) => {
1093
1103
  const trigger = document.createElement('button');
1094
1104
  trigger.className = 'tab-item' + (index === 0 ? ' active' : '');
1095
1105
  trigger.type = 'button';
1096
1106
  trigger.textContent = section.label;
1097
1107
  list.appendChild(trigger);
1108
+ if (section.id) triggers.set(section.id, trigger);
1098
1109
 
1099
1110
  const panel = document.createElement('div');
1100
1111
  panel.className = 'tab-panel' + (index === 0 ? ' active' : '');
@@ -1112,6 +1123,34 @@ return {
1112
1123
  });
1113
1124
  });
1114
1125
 
1126
+ // A pip on each tab holding unsaved changes, so work left on a
1127
+ // tab you moved away from is not forgotten. Asked of the same
1128
+ // guards the close question uses, after every edit and once a
1129
+ // second (a save, or a draft restored, changes it without one).
1130
+ refreshPips = () => {
1131
+ const dirty = new Set(dirtyGuards().map(g => guardSection.get(g)).filter(Boolean));
1132
+ for (const [id, trigger] of triggers) {
1133
+ const on = dirty.has(id);
1134
+ let pip = trigger.querySelector('.mail-tab-pip');
1135
+ if (on && !pip) {
1136
+ pip = document.createElement('span');
1137
+ pip.className = 'mail-tab-pip';
1138
+ pip.setAttribute('aria-hidden', 'true');
1139
+ trigger.appendChild(pip);
1140
+ trigger.title = 'Unsaved changes';
1141
+ trigger.setAttribute('aria-description', 'Unsaved changes');
1142
+ } else if (!on && pip) {
1143
+ pip.remove();
1144
+ trigger.removeAttribute('title');
1145
+ trigger.removeAttribute('aria-description');
1146
+ }
1147
+ }
1148
+ };
1149
+ const onEdit = () => setTimeout(() => refreshPips(), 0);
1150
+ for (const type of ['input', 'change', 'keyup', 'click']) host.addEventListener(type, onEdit, true);
1151
+ const pipTimer = setInterval(() => refreshPips(), 1000);
1152
+ closeFns.add(() => clearInterval(pipTimer));
1153
+
1115
1154
  host.appendChild(tabs);
1116
1155
  slideover.element.appendChild(host);
1117
1156
  E.tabs(tabs);
@@ -3229,7 +3268,10 @@ return {
3229
3268
 
3230
3269
  const text = document.createElement('span');
3231
3270
  const count = message.blockedImages;
3232
- text.textContent = `${count} remote image${count === 1 ? '' : 's'} blocked. Loading them tells the sender you opened this message.`;
3271
+ text.textContent = `${count} remote image${count === 1 ? '' : 's'} blocked. Loading them tells the sender you opened this message.`
3272
+ + (message.contact && !message.contact.verified
3273
+ ? ` ${message.contact.address} is in your contacts, but your mail server did not confirm this message came from them.`
3274
+ : '');
3233
3275
  notice.appendChild(text);
3234
3276
 
3235
3277
  const loadBtn = document.createElement('button');
@@ -3269,6 +3311,34 @@ return {
3269
3311
  readerBodyEl.appendChild(notice);
3270
3312
  }
3271
3313
 
3314
+ // Loaded because the sender is a contact the server verified: say
3315
+ // so, with the way to stop it for this sender.
3316
+ if (message.contact?.verified && message.remoteImagesLoaded) {
3317
+ const notice = document.createElement('div');
3318
+ notice.className = 'mail-notice mail-notice--quiet';
3319
+ const text = document.createElement('span');
3320
+ const who = (message.from ?? [])[0];
3321
+ text.textContent = `Images shown: ${who?.name || message.contact.address} is in your contacts.`;
3322
+ notice.appendChild(text);
3323
+ const blockBtn = document.createElement('button');
3324
+ blockBtn.className = 'btn btn-sm btn-ghost';
3325
+ blockBtn.textContent = 'Block for this sender';
3326
+ blockBtn.addEventListener('click', async () => {
3327
+ blockBtn.disabled = true;
3328
+ try {
3329
+ const params = new URLSearchParams({account: currentAccountId ?? ''});
3330
+ await api(`${BASE}/image-senders/contacts?${params}`, 'PUT', {block: message.contact.address});
3331
+ E.toast(`Images from ${message.contact.address} will be blocked again. Settings › Images can undo this.`, {type: 'success'});
3332
+ openMessage(message.uid, message.folder ?? openFolder);
3333
+ } catch (err) {
3334
+ E.toast(err.message, {type: 'error'});
3335
+ blockBtn.disabled = false;
3336
+ }
3337
+ });
3338
+ notice.appendChild(blockBtn);
3339
+ readerBodyEl.appendChild(notice);
3340
+ }
3341
+
3272
3342
  if (message.attachments.length) {
3273
3343
  const wrap = document.createElement('div');
3274
3344
  wrap.className = 'mail-attachments';
@@ -4795,9 +4865,24 @@ return {
4795
4865
 
4796
4866
  function makeDropTarget(btn, folder) {
4797
4867
  const accepts = () => !dropBusy && !folderActionBusy && acceptsMailDrop(dragState, folder, currentAccountId);
4868
+ // Holding a message over a closed folder opens it, so a folder
4869
+ // inside can be reached. Messages only: opening redraws the folder
4870
+ // list, and a dragged FOLDER row taken out of the page would never
4871
+ // see its dragend.
4872
+ let springTimer = null;
4873
+ const stopSpring = () => { clearTimeout(springTimer); springTimer = null; };
4874
+ const startSpring = () => {
4875
+ if (springTimer || dragState?.kind !== 'messages' || !(folder.children ?? []).length
4876
+ || !collapsedSet().has(folder.path)) return;
4877
+ springTimer = setTimeout(() => {
4878
+ springTimer = null;
4879
+ if (here() && dragState?.kind === 'messages' && collapsedSet().has(folder.path)) toggleFolder(folder.path);
4880
+ }, SPRING_OPEN_MS);
4881
+ };
4798
4882
  btn.addEventListener('dragover', event => {
4799
4883
  // Do not let a refused folder row become a top-level drop.
4800
4884
  event.stopPropagation();
4885
+ startSpring();
4801
4886
  if (!accepts()) return;
4802
4887
  event.preventDefault();
4803
4888
  event.dataTransfer.dropEffect = 'move';
@@ -4805,9 +4890,10 @@ return {
4805
4890
  foldersEl.closest('.mail-folders-pane')?.classList.remove('is-root-drop-target');
4806
4891
  });
4807
4892
  btn.addEventListener('dragleave', event => {
4808
- if (!btn.contains(event.relatedTarget)) btn.classList.remove('is-drop-target');
4893
+ if (!btn.contains(event.relatedTarget)) { btn.classList.remove('is-drop-target'); stopSpring(); }
4809
4894
  });
4810
4895
  btn.addEventListener('drop', async event => {
4896
+ stopSpring();
4811
4897
  event.stopPropagation();
4812
4898
  if (!accepts()) return;
4813
4899
  event.preventDefault();
@@ -5709,7 +5795,7 @@ return {
5709
5795
  function messageIsSpam(message) {
5710
5796
  if (!message) return false;
5711
5797
  const folder = message.folder ?? currentFolder;
5712
- if (junkFolder() && folder === junkFolder()) return true;
5798
+ if (isSpamFolder(folder, junkFolder())) return true;
5713
5799
  const flags = message.flags$ ? message.flags$.value : (message.flags ?? []);
5714
5800
  return flags.includes(JUNK_KEYWORD);
5715
5801
  }