domma-cms 1.9.0 → 1.9.1
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,9 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.9.1] - 2026-10-24
|
|
4
|
+
|
|
5
|
+
- Columns support content alignment with [col left], [col center] / [col centre], [col right] or align="...". The Page editor offers a Content alignment selector for columns.
|
|
6
|
+
|
|
3
7
|
## [1.9.0] - 2026-10-23
|
|
4
8
|
|
|
5
9
|
- **Security:** a plugin's collections are no longer open through the generic Collections API to someone who holds only part of the plugin's permission. Before, `collections` plus any action of any of the plugin's permissions (a game's View, say) was enough to list every row - quiz answers, puzzle solutions, future daily words and players' play tokens. Now the caller needs the action the permission names as its `collectionAction` in `plugin.json` (the games name `manage`), or, when it names none, every action of that permission. The same check now guards the other ways in: a form named after or pointed at a plugin's collection, a View reading or joining one, and an API Builder endpoint exposing one. A switched-off plugin's collections keep the gate its `plugin.json` declares. Super Admin keeps everything, and a plugin with no permissions still needs only `collections`.
|
|
@@ -18,7 +18,7 @@ Right
|
|
|
18
18
|
[/col]
|
|
19
19
|
[/row]`,children:{name:"col",min:2,max:6},attrs:[{name:"gap",type:"number",label:"Gap"},{name:"class",type:"text",label:"CSS class"},{name:"id",type:"text",label:"ID"},{name:"reveal",type:"checkbox",label:"Scroll reveal"},{name:"reveal-mode",type:"select",label:"Reveal mode",options:[["stagger","Stagger"],["sequence","Sequence"]]},{name:"reveal-animation",type:"select",label:"Reveal animation",options:[["slide-up","Slide up"],["slide-down","Slide down"],["slide-left","Slide left"],["slide-right","Slide right"],["fade","Fade"],["zoom","Zoom"],["flip","Flip"]]},{name:"reveal-duration",type:"number",label:"Reveal duration (ms)"},{name:"reveal-stagger",type:"number",label:"Reveal stagger (ms)"},{name:"reveal-delay",type:"number",label:"Reveal delay (ms)"},{name:"reveal-direction",type:"select",label:"Reveal direction",options:[["ltr","Left to right"],["rtl","Right to left"]]}]},{name:"col",label:"Column",icon:"columns",category:"Layout",child:!0,selfClosing:!1,container:!0,wrappable:!0,template:`[col]
|
|
20
20
|
Content
|
|
21
|
-
[/col]`,attrs:[{name:"span",type:"number",label:"Span"},{name:"id",type:"text",label:"ID"}]},{name:"slideover",label:"Slideover",icon:"panel-right",category:"Layout",selfClosing:!1,container:!0,wrappable:!0,template:`[slideover title="More information" trigger="Read more"]
|
|
21
|
+
[/col]`,attrs:[{name:"span",type:"number",label:"Span"},{name:"align",type:"select",label:"Content alignment",options:[["","Inherit"],["left","Left"],["center","Centre"],["centre","Centre (alias)"],["right","Right"]]},{name:"id",type:"text",label:"ID"}]},{name:"slideover",label:"Slideover",icon:"panel-right",category:"Layout",selfClosing:!1,container:!0,wrappable:!0,template:`[slideover title="More information" trigger="Read more"]
|
|
22
22
|
Content
|
|
23
23
|
[/slideover]`,attrs:[{name:"title",type:"text",label:"Title"},{name:"trigger",type:"text",label:"Trigger label"},{name:"size",type:"select",label:"Size",options:[["sm","Small"],["md","Medium"],["lg","Large"]]},{name:"position",type:"select",label:"Position",options:[["right","Right"],["left","Left"]]}]},{name:"center",label:"Centre",icon:"text-center",category:"Layout",selfClosing:!1,container:!0,wrappable:!0,template:`[center]
|
|
24
24
|
Centred content
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
</tr>
|
|
32
32
|
<tr>
|
|
33
33
|
<td><code>[col span="N"]...[/col]</code></td>
|
|
34
|
-
<td>Column inside a grid or row; <code>span</code> sets column span</td>
|
|
34
|
+
<td>Column inside a grid or row; <code>span</code> sets column span. Use <code>align="left|center|centre|right"</code> or a flag such as <code>[col centre]</code> to align content</td>
|
|
35
35
|
</tr>
|
|
36
36
|
</tbody>
|
|
37
37
|
</table>
|
|
@@ -318,8 +318,12 @@ Columns animate into view one by one as the row scrolls into the viewport:
|
|
|
318
318
|
| Attribute | Type | Description |
|
|
319
319
|
|---|---|---|
|
|
320
320
|
| `span` | number | Number of columns to span (`col-span-N`) |
|
|
321
|
+
| `align` | string | Content alignment: `left`, `center` / `centre`, or `right`. Inherits alignment when omitted. |
|
|
322
|
+
| `left`, `center`, `centre`, `right` | flag | Shorthand alignment, e.g. `[col centre]`. An explicit `align` takes precedence. |
|
|
321
323
|
| `id` | string | HTML `id` attribute |
|
|
322
324
|
|
|
325
|
+
`[col align="centre"]Content[/col]` centres the column content. You can also use `[col center]`, `[col centre]`, `[col left]`, or `[col right]`.
|
|
326
|
+
|
|
323
327
|
`[col]` also accepts injected effects (`reveal`, `breathe`, `animate`, `ripple`) - see [Effect injection](#effect-injection).
|
|
324
328
|
|
|
325
329
|
### Rendered output
|
package/package.json
CHANGED
|
@@ -2302,7 +2302,13 @@ function processGridBlocks(markdown) {
|
|
|
2302
2302
|
const COL_INJECTABLE = ['reveal', 'breathe', 'animate', 'ripple'];
|
|
2303
2303
|
const injected = extractInjectedEffects(attrs, COL_INJECTABLE);
|
|
2304
2304
|
const baseCls = attrs.span ? `col-span-${attrs.span}` : 'col';
|
|
2305
|
-
|
|
2305
|
+
// Explicit alignment takes precedence over the shorthand flags.
|
|
2306
|
+
const alignment = typeof attrs.align === 'string'
|
|
2307
|
+
? attrs.align.trim().toLowerCase()
|
|
2308
|
+
: ['center', 'centre', 'left', 'right'].find(value => attrs[value] === true);
|
|
2309
|
+
const align = alignment === 'centre' ? 'center' : alignment;
|
|
2310
|
+
const alignClasses = ['left', 'center', 'right'].includes(align) ? [`text-${align}`] : [];
|
|
2311
|
+
const allClasses = [baseCls, ...alignClasses, ...injected.effectClasses].join(' ');
|
|
2306
2312
|
const cls = ` class="${allClasses}"`;
|
|
2307
2313
|
const id = attrs.id ? ` id="${escapeAttr(attrs.id)}"` : '';
|
|
2308
2314
|
// Restore the col body before passing it downstream - otherwise the
|