domma-cms 1.28.4 → 1.29.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 (98) hide show
  1. package/CHANGELOG.md +5 -0
  2. package/admin/js/lib/contacts-arrange.js +1 -1
  3. package/docs/DommaFeatures.md +5 -3
  4. package/package.json +4 -1
  5. package/plugins/_lib/admin/mail/body-menu.js +2 -0
  6. package/plugins/_lib/admin/mail/cms-host.js +22 -0
  7. package/plugins/_lib/admin/mail/compose-window.js +1027 -1021
  8. package/plugins/_lib/admin/mail/contacts.js +10 -8
  9. package/plugins/_lib/admin/mail/diagnostics-section.js +2 -0
  10. package/plugins/_lib/admin/mail/drag-drop.js +46 -0
  11. package/plugins/_lib/admin/mail/folder-tree.js +2 -0
  12. package/plugins/_lib/admin/mail/font-controls.js +6 -4
  13. package/plugins/_lib/admin/mail/fonts.js +1 -1
  14. package/plugins/_lib/admin/mail/host-context.js +87 -0
  15. package/plugins/_lib/admin/mail/identity.js +2 -0
  16. package/plugins/_lib/admin/mail/image-senders-section.js +2 -0
  17. package/plugins/_lib/admin/mail/keyboard.js +2 -0
  18. package/plugins/_lib/admin/mail/mail.css +1 -1
  19. package/plugins/_lib/admin/mail/mail.html +4 -0
  20. package/plugins/_lib/admin/mail/message-actions.js +2 -0
  21. package/plugins/_lib/admin/mail/oauth-panel.js +2 -0
  22. package/plugins/_lib/admin/mail/panes.js +2 -0
  23. package/plugins/_lib/admin/mail/reader-kit.js +2 -0
  24. package/plugins/_lib/admin/mail/reader-runtime.js +6534 -0
  25. package/plugins/_lib/admin/mail/reader-view.js +9 -6380
  26. package/plugins/_lib/admin/mail/resizable.js +2 -0
  27. package/plugins/_lib/admin/mail/restore-spam.js +13 -0
  28. package/plugins/_lib/admin/mail/rules.js +14 -0
  29. package/plugins/_lib/admin/mail/scheduling.js +4 -1
  30. package/plugins/_lib/admin/mail/section-kit.js +4 -1
  31. package/plugins/_lib/admin/mail/security-note.js +2 -0
  32. package/plugins/_lib/admin/mail/settings-section.js +11 -10
  33. package/plugins/_lib/admin/mail/templates.js +5 -2
  34. package/plugins/_lib/admin/mail/threads.js +2 -0
  35. package/plugins/_lib/admin/mail/vacation.js +16 -2
  36. package/plugins/_lib/admin/mail/when-closed.js +24 -2
  37. package/plugins/_lib/admin/ui/dates.js +2 -0
  38. package/plugins/_lib/admin/ui/resizable.js +7 -5
  39. package/plugins/_lib/contacts/mailContact.js +69 -0
  40. package/plugins/_lib/contacts/model.js +199 -0
  41. package/plugins/_lib/domma-mail-contacts.lock.json +10 -0
  42. package/plugins/_lib/domma-mail.lock.json +85 -0
  43. package/plugins/_lib/mail/accountFileStore.js +66 -0
  44. package/plugins/_lib/mail/accountRepository.js +617 -0
  45. package/plugins/_lib/mail/accountRoutes.js +130 -0
  46. package/plugins/_lib/mail/accounts.js +66 -940
  47. package/plugins/_lib/mail/automationLock.js +10 -0
  48. package/plugins/_lib/mail/bodyTokenProvider.js +36 -0
  49. package/plugins/_lib/mail/bodyTokens.js +5 -99
  50. package/plugins/_lib/mail/compose.js +5 -3
  51. package/plugins/_lib/mail/defaults.js +2 -0
  52. package/plugins/_lib/mail/envelope.js +3 -1
  53. package/plugins/_lib/mail/folderActions.js +83 -0
  54. package/plugins/_lib/mail/folderRuntime.js +109 -0
  55. package/plugins/_lib/mail/folders.js +4 -9
  56. package/plugins/_lib/mail/imapPool.js +11 -389
  57. package/plugins/_lib/mail/imapPoolRuntime.js +396 -0
  58. package/plugins/_lib/mail/mbox.js +2 -0
  59. package/plugins/_lib/mail/message-action.js +2 -0
  60. package/plugins/_lib/mail/messageSecurity.js +4 -111
  61. package/plugins/_lib/mail/messageSecurityProvider.js +116 -0
  62. package/plugins/_lib/mail/networkAddresses.js +77 -0
  63. package/plugins/_lib/mail/networkPolicy.js +62 -0
  64. package/plugins/_lib/mail/oauth.js +3 -451
  65. package/plugins/_lib/mail/oauthAccounts.js +178 -0
  66. package/plugins/_lib/mail/oauthRouteRuntime.js +282 -0
  67. package/plugins/_lib/mail/oauthRoutes.js +7 -289
  68. package/plugins/_lib/mail/oauthRuntime.js +456 -0
  69. package/plugins/_lib/mail/pollSchedule.js +2 -0
  70. package/plugins/_lib/mail/poller.js +4 -136
  71. package/plugins/_lib/mail/pollerRuntime.js +150 -0
  72. package/plugins/_lib/mail/priority.js +2 -0
  73. package/plugins/_lib/mail/publicMailbox.js +27 -0
  74. package/plugins/_lib/mail/readRoutes.js +14 -827
  75. package/plugins/_lib/mail/readRuntime.js +701 -0
  76. package/plugins/_lib/mail/render.js +2 -0
  77. package/plugins/_lib/mail/ruleRunner.js +27 -10
  78. package/plugins/_lib/mail/scheduler.js +11 -279
  79. package/plugins/_lib/mail/schedulerRuntime.js +259 -0
  80. package/plugins/_lib/mail/secretProvider.js +112 -0
  81. package/plugins/_lib/mail/secretbox.js +12 -225
  82. package/plugins/_lib/mail/send.js +21 -537
  83. package/plugins/_lib/mail/sieve.js +211 -0
  84. package/plugins/_lib/mail/sieveHost.js +24 -0
  85. package/plugins/_lib/mail/smtpService.js +553 -0
  86. package/plugins/_lib/mail/snoozeRuntime.js +60 -0
  87. package/plugins/_lib/mail/store.js +122 -64
  88. package/plugins/_lib/mail/subscriptions.js +11 -0
  89. package/plugins/_lib/mail/sync.js +64 -290
  90. package/plugins/_lib/mail/syncPlan.js +2 -0
  91. package/plugins/_lib/mail/syncRuntime.js +255 -0
  92. package/plugins/_lib/mail/syncSelection.js +2 -0
  93. package/plugins/_lib/mail/unreadBadge.js +2 -0
  94. package/plugins/_lib/mail/unsubscribe.js +2 -0
  95. package/plugins/_lib/mail/vacationRunner.js +3 -116
  96. package/plugins/_lib/mail/vacationRuntime.js +70 -0
  97. package/plugins/_lib/mail/write.js +44 -13
  98. package/server/routes/api/contacts.js +2 -196
package/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.29.0] - 2026-11-02
4
+
5
+ - 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.
6
+ - Contacts: the shared contact model (`plugins/_lib/contacts`, Domma Mail 0.18.0) behind `/api/contacts`, with additional email addresses and phones.
7
+
3
8
  ## [1.28.4] - 2026-11-01
4
9
 
5
10
  - Games: the goes-per-name limit can no longer be beaten by starting several goes at once under one name. The shared Games library now counts a name's goes in the same turn that saves the new go (`PlayStore.start(play, {maxGoes})`), where before two starts sent together could both pass the check. Quiz 1.6.1, Crossword 1.5.1 and Word Search 1.2.1 use it.
@@ -1 +1 @@
1
- export const SORTS=["name","company","added","updated"],DENSITIES=["comfortable","compact"],COLUMNS=["company","email","phone","groups"],DEFAULT_SETTINGS=Object.freeze({sort:"name",favouritesFirst:!0,density:"comfortable",confirmDelete:!0,showCompany:!0,showEmail:!0,showPhone:!0,showGroups:!0});const f=(r,e,t)=>e.includes(r)?r:t,a=(r,e)=>typeof r=="boolean"?r:e;export function normaliseSettings(r){const e=r&&typeof r=="object"?r:{},t=DEFAULT_SETTINGS;return{sort:f(e.sort,SORTS,t.sort),favouritesFirst:a(e.favouritesFirst,t.favouritesFirst),density:f(e.density,DENSITIES,t.density),confirmDelete:a(e.confirmDelete,t.confirmDelete),showCompany:a(e.showCompany,t.showCompany),showEmail:a(e.showEmail,t.showEmail),showPhone:a(e.showPhone,t.showPhone),showGroups:a(e.showGroups,t.showGroups)}}export function primaryEmail(r){if(r?.email)return String(r.email);const e=(Array.isArray(r?.emails)?r.emails:[]).find(t=>t?.address);return e?String(e.address):""}export function primaryPhone(r){if(r?.phone)return String(r.phone);const e=(Array.isArray(r?.phones)?r.phones:[]).find(t=>t?.number);return e?String(e.number):""}export function initials(r){const e=String(r??"").trim().split(/\s+/).filter(Boolean);return e.length?e.length===1?e[0].slice(0,2).toUpperCase():(e[0][0]+e[e.length-1][0]).toUpperCase():"?"}function h(r){const e=[...Array.isArray(r.emails)?r.emails.map(t=>t?.address):[],...Array.isArray(r.phones)?r.phones.map(t=>t?.number):[]];return[r.name,r.email,r.phone,r.company,r.jobTitle,r.notes,...r.groups||[],...e].filter(Boolean).join(" ").toLowerCase()}const l=(r,e)=>String(r.name??"").localeCompare(String(e.name??""),void 0,{sensitivity:"base"});export function arrangeContacts(r,{query:e="",filter:t={kind:"all"},sort:s="name",favouritesFirst:i=!0}={}){const p=String(e??"").trim().toLowerCase(),m=p?p.split(/\s+/):[],d=(r||[]).filter(o=>{if(t?.kind==="fav"&&o.favourite!==!0||t?.kind==="group"&&!(Array.isArray(o.groups)&&o.groups.includes(t.value)))return!1;if(!m.length)return!0;const n=h(o);return m.every(u=>n.includes(u))}),y={name:l,company:(o,n)=>{const u=String(o.company??""),c=String(n.company??"");return!u!=!c?u?-1:1:u.localeCompare(c,void 0,{sensitivity:"base"})||l(o,n)},added:(o,n)=>String(n.createdAt??"").localeCompare(String(o.createdAt??""))||l(o,n),updated:(o,n)=>String(n.updatedAt??"").localeCompare(String(o.updatedAt??""))||l(o,n)}[f(s,SORTS,"name")];return[...d].sort((o,n)=>i&&o.favourite===!0!=(n.favourite===!0)?o.favourite===!0?-1:1:y(o,n))}export function countContacts(r,e=[]){const t={all:0,fav:0,groups:Object.fromEntries(e.map(s=>[s,0]))};for(const s of r||[]){t.all++,s.favourite===!0&&t.fav++;for(const i of Array.isArray(s.groups)?s.groups:[])t.groups[i]=(t.groups[i]??0)+1}return t}export function withGroup(r,e,t){const s=Array.isArray(r)?r.filter(i=>i!==e):[];return t?[...s,e]:s}export function duplicateBody(r){const{id:e,userId:t,createdAt:s,updatedAt:i,...p}=r||{};return{...JSON.parse(JSON.stringify(p)),name:`${r?.name||"Contact"} (copy)`,favourite:!1}}
1
+ export const SORTS=["name","company","added","updated"],DENSITIES=["comfortable","compact"],COLUMNS=["company","email","phone","groups"],DEFAULT_SETTINGS=Object.freeze({sort:"name",favouritesFirst:!0,density:"comfortable",confirmDelete:!0,showCompany:!0,showEmail:!0,showPhone:!0,showGroups:!0});const f=(e,r,t)=>r.includes(e)?e:t,u=(e,r)=>typeof e=="boolean"?e:r;export function normaliseSettings(e){const r=e&&typeof e=="object"?e:{},t=DEFAULT_SETTINGS;return{sort:f(r.sort,SORTS,t.sort),favouritesFirst:u(r.favouritesFirst,t.favouritesFirst),density:f(r.density,DENSITIES,t.density),confirmDelete:u(r.confirmDelete,t.confirmDelete),showCompany:u(r.showCompany,t.showCompany),showEmail:u(r.showEmail,t.showEmail),showPhone:u(r.showPhone,t.showPhone),showGroups:u(r.showGroups,t.showGroups)}}export function primaryEmail(e){if(e?.email)return String(e.email);const r=(Array.isArray(e?.emails)?e.emails:[]).find(t=>t?.address);return r?String(r.address):""}export function primaryPhone(e){if(e?.phone)return String(e.phone);const r=(Array.isArray(e?.phones)?e.phones:[]).find(t=>t?.number);return r?String(r.number):""}export function initials(e){const r=String(e??"").trim().split(/\s+/).filter(Boolean);return r.length?r.length===1?r[0].slice(0,2).toUpperCase():(r[0][0]+r[r.length-1][0]).toUpperCase():"?"}function h(e){const r=[...Array.isArray(e.emails)?e.emails.map(t=>t?.address):[],...Array.isArray(e.phones)?e.phones.map(t=>t?.number):[]];return[e.name,e.email,e.phone,e.company,e.jobTitle,e.notes,...e.groups||[],...r].filter(Boolean).join(" ").toLowerCase()}const l=(e,r)=>String(e.name??"").localeCompare(String(r.name??""),void 0,{sensitivity:"base"});export function arrangeContacts(e,{query:r="",filter:t={kind:"all"},sort:s="name",favouritesFirst:i=!0}={}){const a=String(r??"").trim().toLowerCase(),c=a?a.split(/\s+/):[],d=(e||[]).filter(o=>{if(t?.kind==="fav"&&o.favourite!==!0||t?.kind==="group"&&!(Array.isArray(o.groups)&&o.groups.includes(t.value)))return!1;if(!c.length)return!0;const n=h(o);return c.every(p=>n.includes(p))}),y={name:l,company:(o,n)=>{const p=String(o.company??""),m=String(n.company??"");return!p!=!m?p?-1:1:p.localeCompare(m,void 0,{sensitivity:"base"})||l(o,n)},added:(o,n)=>String(n.createdAt??"").localeCompare(String(o.createdAt??""))||l(o,n),updated:(o,n)=>String(n.updatedAt??"").localeCompare(String(o.updatedAt??""))||l(o,n)}[f(s,SORTS,"name")];return[...d].sort((o,n)=>i&&o.favourite===!0!=(n.favourite===!0)?o.favourite===!0?-1:1:y(o,n))}export function countContacts(e,r=[]){const t={all:0,fav:0,groups:Object.fromEntries(r.map(s=>[s,0]))};for(const s of e||[]){t.all++,s.favourite===!0&&t.fav++;for(const i of Array.isArray(s.groups)?s.groups:[]){const a=Object.hasOwn(t.groups,i)?t.groups[i]:0;Object.defineProperty(t.groups,i,{value:a+1,writable:!0,enumerable:!0,configurable:!0})}}return t}export function withGroup(e,r,t){const s=Array.isArray(e)?e.filter(i=>i!==r):[];return t?[...s,r]:s}export function duplicateBody(e){const{id:r,userId:t,createdAt:s,updatedAt:i,...a}=e||{};return{...JSON.parse(JSON.stringify(a)),name:`${e?.name||"Contact"} (copy)`,favourite:!1}}
@@ -36,14 +36,14 @@ Code was treated as the truth. Where docs disagree with it, the disagreement is
36
36
  | `booking` | free | 1.6.3 | Let people book appointments with you or your team, and rooms or equipment, from a booking page on your site (`/booking`, or the `[booking /]` shortcode). Opening hours, days off, buffers and notice; confirmation and reminder emails with a link to move or cancel; a Diary in the admin; an online booking's call chat kept on the booking, and Add people during its call. Book straight from a contact or an email; bookings show in the Calendar. |
37
37
  | `booking-pro` | paid | 0.4.1 | More for Booking: online appointments as a video call on your site (optional host recording), Call now - open a booking's call at once or call anyone from a contact or an email (switches on the CMS's instant calls), a person and a room together, classes with places and a waiting list that fills a freed place by itself, repeat bookings, questions on the booking form, a daily limit and one booking per customer every N days. A lapse leaves Booking and every booking as they were. |
38
38
  | `calendar` | paid | 1.15.4 | Events calendar - month, day and list views, online meetings as a video call on your site (with the call's chat kept, and Add people during the call), call anyone now from a contact or an email, all-day and recurring events, sharing with people and roles, RSVPs and an iCal feed. |
39
- | `campaigns-pro` | paid | 1.0.2 | Marketing campaigns, one paid Tool: compose a message, send it to an audience imported from Contacts (shared with Surveys), schedule sends, attach an offer that closes by a date or a claim limit. Opens and clicks (cookieless), links tagged for Analytics, a linked Shop discount code, send a survey as a campaign, follow-up sequences, resend to non-openers, A/B subject tests, and a version-1 stats feed other Tools read. |
40
- | `contacts-pro` | paid | 0.12.0 | Contacts, with more to them: your own custom fields, birthdays and ages with the ones coming up and a reminder in the sidebar, and groups with their own emblem and colours. Share a contact, several, or a whole group with people or roles - to view, or to edit. Call a contact now on a video call on your site. Works over the same contacts as the built-in Tool, so nothing moves and nothing is lost. |
39
+ | `campaigns-pro` | paid | 1.6.0 | Marketing campaigns, one paid Tool: compose a message, send it to Contacts groups (read live when it sends) or an audience of its own (shared with Surveys), from the site's sending or your own Email mailbox (small lists), schedule sends, attach an offer that closes by a date or a claim limit. Opens and clicks (cookieless), links tagged for Analytics, a linked Shop discount code, send a survey as a campaign, follow-up sequences, resend to non-openers, A/B subject tests, and a version-1 stats feed other Tools read. |
40
+ | `contacts-pro` | paid | 0.13.0 | Contacts, with more to them: send a campaign to a group or the selected contacts (with Campaigns Pro), your own custom fields, birthdays and ages with the ones coming up and a reminder in the sidebar, and groups with their own emblem and colours. Share a contact, several, or a whole group with people or roles - to view, or to edit. Call a contact now on a video call on your site. Works over the same contacts as the built-in Tool, so nothing moves and nothing is lost. |
41
41
  | `crossword` | paid (giftable) | 1.5.0 | Crosswords on your site: type the answers and clues and the grid lays itself out (live preview, Another layout). Players type a name and race the server's clock, checks and wrong guesses cost time, fastest solvers on a leaderboard. Hints for a time penalty, personal best and Share, animations, export and import. Test it from the Tool - a test go never reaches the board. Rotation (a new quiz every day or week from a queue, off by default) and fresh quizzes from Domma for review. |
42
42
  | `daily-word` | paid (giftable) | 1.3.0 | One hidden word a day, the same for everyone: six guesses, each letter marked right place, in the word or not; real words only (a bundled dictionary, switchable), an archive of past days, streaks, Share as coloured squares, a calendar of what is coming. Fewest guesses tops the day's board, then the fastest. |
43
43
  | `data-transfer` | paid | 1.3.3 | Move collections between file and MongoDB storage, back them up and restore them (all or some, merged or replaced) - keeping every entry's id - and clone them (cloned entries get new ids, so references stay unambiguous). Every restore and transfer takes a safety snapshot first. |
44
44
  | `docs` | paid | 2.13.1 | Document editor: Home and editor screens, sharing with Viewers/Editors, public links, import/export, send to page/blog/email, edit lock, Trash, version history, templates. PDF documents (2.13): a PDF kept as it is, shown in the browser's viewer, searchable inside, versioned on replace. |
45
45
  | `docs-pro` | paid | 0.11.0 | Domma Spaces (publish a Docs folder at `/spaces` with a Kindle-style reader), Cloud copies (Google Drive, OneDrive, Dropbox, S3), Signatures (emailed signing links, typed or drawn, signed copy with a certificate page; 0.10: boxes placed on a PDF document's pages, the signed PDF stamped with pdf-lib), PDF tools (0.11: fill the PDF's own form, annotate, pages) and protected public links (expiry date, password). Adds to Docs. |
46
- | `email-pro` | paid | 0.9.0 | Full mail: read, write, send and search, over a synchronised store. Search, threads, rules, scheduled sends, snooze and vacation replies need MongoDB; without it, reading, filing and sending still work. |
46
+ | `email-pro` | paid | 0.13.0 | Full mail (and Campaigns Pro's "send from my mailbox"): read, write, send and search, over a synchronised store. Search, threads, rules, scheduled sends, snooze and vacation replies need MongoDB; without it, reading, filing and sending still work. |
47
47
  | `feedback` | free | 1.1.4 | Tell Domma what is broken, missing or good - straight from your admin - and see what became of it: seen, planned, in progress, done, with Domma's reply. |
48
48
  | `garage` | paid | 1.4.3 | UK vehicle management with DVLA API lookup, save vehicles, and search history. |
49
49
  | `invoice` | paid | 1.7.1 | Invoices and quotes. Issuer profiles, receivers importable from Contacts, line items, optional VAT, payments, archiving, CSV/Excel export, and a print-ready invoice you can email or download as a PDF. Quotes with a validity date and an emailed accept link - the client accepts or declines online, and one click turns an accepted quote into a draft invoice. Self-billing too: invoices raised on a supplier's behalf, marked and numbered their own way, with agreement review reminders. |
@@ -2440,6 +2440,8 @@ Measurement and automation: a Performance screen per campaign - reached, opened
2440
2440
 
2441
2441
  **Unsubscribe outlives the licence (engine 1.6.35+, Campaigns Pro 1.0.1).** The engine owns the unsubscribe secret (`config/outreach.json`, adopting the one Campaigns Pro kept before) and answers `/campaign-unsubscribe` itself (`server/routes/outreach-public.js`, signing in `plugins/_lib/outreach/unsubscribe.js`), so a link in an email already sent still opts the reader out after the licence lapses or the Tool is removed (PECR). Campaigns Pro keeps its own route only on older engines; the engine stands aside if a plugin already holds the path.
2442
2442
 
2443
+ **Contacts groups and Send from (1.6.0, 2026-11-01).** A campaign can pick Contacts groups (and people handed over from Contacts) directly; they are read when it sends, so whoever is in the group then gets it - no import step. They are the saver's own contacts (not ones shared with them); each member gets an outreach row by email so the ledger, tracking, A/B and sequences work unchanged. **Send from** picks the site's sending or one of the author's Email (`email-pro` 0.13+) mailboxes: each person still gets their own copy with their own links and unsubscribe, but from the author's address, filed in their Sent folder, replies to them - at most 50 people (`mailboxMaxRecipients`). Only the mailbox owner may send or change a mailbox campaign, and only the Contacts owner (whoever last saved) may send to those contacts. Email switched off or the mailbox gone: the campaign refuses with a reason, never a silent fallback. Contacts Pro 0.13 adds "Send a campaign to this group…" (group chip menu), a bulk-bar "Campaign…" and a row-menu item.
2444
+
2443
2445
  **Where:** Admin sidebar "Campaigns Pro" (`#/plugins/campaigns-pro`); Performance per campaign at `#/plugins/campaigns-pro/performance/:slug`; the audience screen is shared with Surveys.
2444
2446
 
2445
2447
  ### Onboard Pro (`onboard-pro`)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "domma-cms",
3
- "version": "1.28.4",
3
+ "version": "1.29.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",
@@ -111,5 +111,8 @@
111
111
  },
112
112
  "devDependencies": {
113
113
  "esbuild": "^0.27.3"
114
+ },
115
+ "allowScripts": {
116
+ "esbuild@0.27.7": true
114
117
  }
115
118
  }
@@ -1,3 +1,5 @@
1
+ // Source: @domma-mail/core 0.18.0, packages/core/src/admin/mail/body-menu.js.
2
+ // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
1
3
  /**
2
4
  * The reading pane's right-click menu - the pure parts.
3
5
  *
@@ -0,0 +1,22 @@
1
+ // Source: @domma-mail/core 0.18.0, packages/core/src/admin/mail/cms-host.js.
2
+ // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
+ /** The CMS shell boundary. Standalone never imports this adapter. */
4
+ const version = new URL(import.meta.url).searchParams.get('v') ?? '1';
5
+ const {createMailHost} = await import(new URL(`./host-context.js?v=${version}`, import.meta.url).href);
6
+
7
+ const [toolKit, help, loading, chrome, mailCompose, notifications, smoothCaret] = await Promise.all([
8
+ import('/admin/js/lib/tool-kit.js').catch(() => ({})),
9
+ import('/admin/js/lib/help-popover.js').catch(() => ({})),
10
+ import('/admin/js/lib/loading.js').catch(() => null),
11
+ import('/admin/js/lib/plugin-chrome.js').catch(() => ({})),
12
+ import('/admin/js/lib/mail-compose.js').catch(() => null),
13
+ import('/admin/js/lib/sidebar-notify.js').catch(() => null),
14
+ import('/admin/js/lib/smooth-caret.js').catch(() => ({}))
15
+ ]);
16
+
17
+ export function createCmsMailHost({pluginName}) {
18
+ return createMailHost({
19
+ pluginName, framework: globalThis.Domma, storage: globalThis.S,
20
+ helpers: {...toolKit, ...help, loading, chrome, mailCompose, notifications, ...smoothCaret}
21
+ });
22
+ }