domma-cms 1.10.8 → 1.10.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.10.10] - 2026-10-24
|
|
4
|
+
|
|
5
|
+
- **Email keeps its text colours in two more cases.** A colour set on the message's `<body>` (a light-on-dark design) was lost when the reader unwrapped it, and an inline style written in capitals (`COLOR: #000000`, common in older templates) was dropped, so a stylesheet colour won instead - grey-on-grey footers and links. Found by rendering a full mailbox (16,000 messages) before and after.
|
|
6
|
+
|
|
7
|
+
## [1.10.9] - 2026-10-24
|
|
8
|
+
|
|
9
|
+
- **Built against domma-js 0.56.0** - see [its release notes](https://github.com/pinpointzero73/domma/releases/tag/v0.56.0). Seven new building blocks are available to pages and plugins: `E.dropzone` (file drop and upload with progress), `E.rangeSlider` (one or two thumbs, also as `type: 'slider'` form fields), `E.commandPalette` (a Cmd/Ctrl+K launcher), `E.focusTrap`, `E.splitPane`, `E.virtualList` (large and infinite lists) and `Domma.i18n` translations. Nothing existing changes.
|
|
10
|
+
|
|
3
11
|
## [1.10.8] - 2026-10-24
|
|
4
12
|
|
|
5
13
|
- **Buttons in email show again.** The mail reader (Email and Mail Reader) stripped the ways most mail colours its buttons - a cell's `bgcolor`, the `background:` style and rules in the message's own `<style>` block - leaving white text on white, so sign-in and confirm buttons (Anthropic's among them) looked missing. Stylesheet rules are now applied to the elements they match before sanitising (not `@media` or `:hover` rules), and table colour and layout attributes, `<center>`, `<font>`, `border-radius` and the like are kept. A background still never loads anything, so blocked remote images stay blocked.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Domma Tools CSS v0.
|
|
2
|
+
* Domma Tools CSS v0.56.0
|
|
3
3
|
* Dynamic Object Manipulation & Modeling API
|
|
4
4
|
* (c) 2026 Darryl Waterhouse & DCBW-IT
|
|
5
|
-
* Built: 2026-10-
|
|
6
|
-
* Commit:
|
|
5
|
+
* Built: 2026-10-24T16:15:31.974Z
|
|
6
|
+
* Commit: f768320
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
/*!
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Domma Tools v0.
|
|
2
|
+
* Domma Tools v0.56.0
|
|
3
3
|
* Developer tools: Theme Roller & Page Roller
|
|
4
4
|
* (c) 2026 Darryl Waterhouse & DCBW-IT
|
|
5
|
-
* Built: 2026-10-
|
|
6
|
-
* Commit:
|
|
5
|
+
* Built: 2026-10-24T16:15:16.245Z
|
|
6
|
+
* Commit: f768320
|
|
7
7
|
*
|
|
8
8
|
* Requires: domma.min.js
|
|
9
9
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "domma-cms",
|
|
3
|
-
"version": "1.10.
|
|
3
|
+
"version": "1.10.10",
|
|
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",
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
"bcryptjs": "^3.0.3",
|
|
87
87
|
"css-select": "^7.0.0",
|
|
88
88
|
"dom-serializer": "^3.1.1",
|
|
89
|
-
"domma-js": "0.
|
|
89
|
+
"domma-js": "0.56.0",
|
|
90
90
|
"dotenv": "^17.2.3",
|
|
91
91
|
"fastify": "5.12.7",
|
|
92
92
|
"gray-matter": "^4.0.3",
|
|
@@ -157,6 +157,36 @@ function inlineStyles(html) {
|
|
|
157
157
|
.filter(Boolean).join(';');
|
|
158
158
|
}
|
|
159
159
|
|
|
160
|
+
// The sanitiser unwraps <body>, and with it whatever the message set
|
|
161
|
+
// there - often the text colour for the whole mail, on a dark design.
|
|
162
|
+
// Keep it on a <div> instead, the legacy bgcolor/text attributes as style.
|
|
163
|
+
const body = DomUtils.findOne((node) => node.name === 'body', dom.children, true);
|
|
164
|
+
const bodyStyle = body && [
|
|
165
|
+
body.attribs.bgcolor ? `background-color:${body.attribs.bgcolor}` : '',
|
|
166
|
+
body.attribs.text ? `color:${body.attribs.text}` : '',
|
|
167
|
+
body.attribs.style ?? ''
|
|
168
|
+
].filter(Boolean).join(';');
|
|
169
|
+
if (bodyStyle) {
|
|
170
|
+
const wrapper = {...body.attribs, style: bodyStyle};
|
|
171
|
+
delete wrapper.bgcolor;
|
|
172
|
+
delete wrapper.text;
|
|
173
|
+
const div = parseDocument('<div></div>').children[0];
|
|
174
|
+
div.attribs = wrapper;
|
|
175
|
+
for (const child of [...body.children]) DomUtils.appendChild(div, child);
|
|
176
|
+
DomUtils.appendChild(body, div);
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
// CSS property names are case-insensitive, the sanitiser's allowlist is
|
|
180
|
+
// not: `COLOR: #000000` (Outlook-era templates) was dropped, and a sheet
|
|
181
|
+
// rule we had just inlined then won instead of it.
|
|
182
|
+
const shouted = DomUtils.findAll((node) => /(^|;)\s*[a-z-]*[A-Z][\w-]*\s*:/.test(node.attribs?.style ?? ''), dom.children);
|
|
183
|
+
for (const element of shouted) {
|
|
184
|
+
element.attribs.style = element.attribs.style.replace(
|
|
185
|
+
/(^|;)(\s*)([\w-]+)(\s*:)/g,
|
|
186
|
+
(match, lead, space, prop, colon) => `${lead}${space}${prop.toLowerCase()}${colon}`
|
|
187
|
+
);
|
|
188
|
+
}
|
|
189
|
+
|
|
160
190
|
// A background shorthand loses only what would load; its colour stays.
|
|
161
191
|
const backgrounds = DomUtils.findAll((node) => /background\s*:/i.test(node.attribs?.style ?? ''), dom.children);
|
|
162
192
|
for (const element of backgrounds) {
|
|
@@ -170,7 +200,7 @@ function inlineStyles(html) {
|
|
|
170
200
|
}
|
|
171
201
|
|
|
172
202
|
// Untouched mail goes to the sanitiser exactly as it arrived.
|
|
173
|
-
if (!pending.size && !backgrounds.length) return html;
|
|
203
|
+
if (!pending.size && !bodyStyle && !shouted.length && !backgrounds.length) return html;
|
|
174
204
|
return renderDom(dom);
|
|
175
205
|
}
|
|
176
206
|
|