domma-cms 0.14.2 → 0.14.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "domma-cms",
3
- "version": "0.14.2",
3
+ "version": "0.14.4",
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",
@@ -73,7 +73,7 @@
73
73
  "@fastify/rate-limit": "^10.3.0",
74
74
  "@fastify/static": "9.1.1",
75
75
  "bcryptjs": "^3.0.3",
76
- "domma-js": "^0.22.6",
76
+ "domma-js": "^0.22.8",
77
77
  "dotenv": "^17.2.3",
78
78
  "fastify": "5.8.5",
79
79
  "gray-matter": "^4.0.3",
@@ -2332,22 +2332,31 @@ function processTableBlocks(markdown) {
2332
2332
  * [/hero]
2333
2333
  *
2334
2334
  * Supported attributes:
2335
- * title - Hero heading (.hero-title)
2336
- * tagline - Subtitle text (.hero-subtitle)
2337
- * size - "sm", "lg", "full" → .hero-sm / .hero-lg / .hero-full
2338
- * variant - "dark", "primary",
2339
- * upstream 8: "gradient-purple", "gradient-blue", "gradient-green",
2340
- * "gradient-sunset", "gradient-ocean", "gradient-rose",
2341
- * "gradient-forest", "gradient-night"
2342
- * theme-specific (26): "gradient-{theme}-{mode}" where theme is one of
2343
- * ocean, forest, sunset, royal, lemon, silver, charcoal, christmas,
2344
- * unicorn, dreamy, grayve, mint, wedding — and mode is light or dark
2345
- * → .hero-{variant}
2346
- * image - URL for background-image + adds .hero-cover
2347
- * overlay - "light", "dark", "darker", "gradient", "gradient-reverse" → .hero-overlay-{overlay}
2348
- * align - "center" (default) or "left" → .hero-center / .hero-left
2349
- * class - Extra classes appended to .hero
2350
- * id - Element id attribute
2335
+ * title - Hero heading (.hero-title)
2336
+ * tagline - Subtitle text (.hero-subtitle)
2337
+ * size - "sm", "lg", "full" → .hero-sm / .hero-lg / .hero-full
2338
+ * variant - "dark", "primary",
2339
+ * upstream 8: "gradient-purple", "gradient-blue", "gradient-green",
2340
+ * "gradient-sunset", "gradient-ocean", "gradient-rose",
2341
+ * "gradient-forest", "gradient-night"
2342
+ * theme-specific (26): "gradient-{theme}-{mode}" where theme is one of
2343
+ * ocean, forest, sunset, royal, lemon, silver, charcoal, christmas,
2344
+ * unicorn, dreamy, grayve, mint, wedding — and mode is light or dark
2345
+ * → .hero-{variant}
2346
+ * image - URL for background-image + adds .hero-cover
2347
+ * overlay - "light", "dark", "darker", "gradient", "gradient-reverse" → .hero-overlay-{overlay}
2348
+ * align - "center" (default) or "left" → .hero-center / .hero-left
2349
+ * bg / color - Background colour (any safe CSS colour value)
2350
+ * min-height - Minimum height (px, em, rem, vh, vw, %)
2351
+ * fullwidth - "true" breaks out of the page container to span the full viewport width (adds .hero-breakout).
2352
+ * Must be the literal string "true" — the attribute is otherwise ignored.
2353
+ * twinkle - Flag attribute — adds particle overlay (requires Effects plugin)
2354
+ * twinkle-count - Number of twinkle particles
2355
+ * twinkle-colour - Particle colour (CSS value)
2356
+ * blobs - Flag attribute — adds ambient blob background
2357
+ * blobs-type - Blob animation type (default: "float-blobs")
2358
+ * class - Extra classes appended to .hero
2359
+ * id - Element id attribute
2351
2360
  *
2352
2361
  * @param {string} markdown
2353
2362
  * @returns {string}
@@ -2612,7 +2621,12 @@ function processHeroBlocks(markdown) {
2612
2621
  (twinkleColour ? ` data-fx-colour="${escapeAttr(twinkleColour)}"` : '')
2613
2622
  : '';
2614
2623
 
2615
- const processedBody = processTextBlocks(processBadgeBlocks(processCardBlocks(processGridBlocks(restore(body.trim())))));
2624
+ // Button/link/cta must run before marked.parse so their quoted attributes
2625
+ // aren't HTML-escaped to " — that mangles parseShortcodeAttrs and
2626
+ // turns `href="/x"` into a bare flag (attrs.href = true → href="true").
2627
+ const processedBody = processCtaBlocks(processLinkBlocks(processButtonBlocks(
2628
+ processTextBlocks(processBadgeBlocks(processCardBlocks(processGridBlocks(restore(body.trim())))))
2629
+ )));
2616
2630
 
2617
2631
  let inner = '<div class="hero-content">';
2618
2632
  if (title) inner += `<h1 class="hero-title hero-title-responsive">${escapeAttr(title)}</h1>`;