@contentrain/astro-kit 0.45.2 → 0.45.3

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/catalog.json CHANGED
@@ -4979,8 +4979,7 @@
4979
4979
  },
4980
4980
  "href": {
4981
4981
  "type": "url",
4982
- "required": true,
4983
- "description": "Post address (from the permalink pattern)."
4982
+ "description": "Post address (from the permalink pattern). Absent for an entry with no page of its own (a list-only custom type's): the title is printed unlinked, never as a dead or `#` link."
4984
4983
  },
4985
4984
  "excerpt": {
4986
4985
  "type": "text",
@@ -38,7 +38,8 @@ const card = tv({
38
38
 
39
39
  interface Props {
40
40
  title: string
41
- href: string
41
+ /** The entry's address. Absent for an entry with no page of its own: the title is printed unlinked, never as a dead link. */
42
+ href?: string | undefined
42
43
  excerpt?: string | undefined
43
44
  /** Publication date: a Date, or ISO 8601 text as Contentrain stores it. */
44
45
  date?: Date | string | undefined
@@ -93,7 +94,7 @@ const Heading = `h${headingLevel}` as 'h2' | 'h3'
93
94
  </p>
94
95
  )}
95
96
  <Heading class={slots.title({ class: linkTitle ? 'text-[color:var(--color-link,var(--color-accent))]' : undefined })}>
96
- <a href={safeHref(href)} class="text-current no-underline after:absolute after:inset-0 after:content-[''] hover:text-accent-text">{title}</a>
97
+ {href ? <a href={safeHref(href)} class="text-current no-underline after:absolute after:inset-0 after:content-[''] hover:text-accent-text">{title}</a> : title}
97
98
  </Heading>
98
99
  {below && (author || date) && (
99
100
  <p class={slots.meta()}>
@@ -73,5 +73,17 @@
73
73
  }
74
74
  },
75
75
  "frame": "narrow"
76
+ },
77
+ {
78
+ "name": "unlinked",
79
+ "props": {
80
+ "title": "Fast support, every time",
81
+ "excerpt": "Moved forty sites without a single ticket left open.",
82
+ "category": {
83
+ "label": "Agencies",
84
+ "href": "/quote-category/agencies/"
85
+ }
86
+ },
87
+ "frame": "narrow"
76
88
  }
77
89
  ]
@@ -12,7 +12,7 @@
12
12
  },
13
13
  "props": {
14
14
  "title": { "type": "string", "required": true, "description": "Post title (posts.title)." },
15
- "href": { "type": "url", "required": true, "description": "Post address (from the permalink pattern)." },
15
+ "href": { "type": "url", "description": "Post address (from the permalink pattern). Absent for an entry with no page of its own (a list-only custom type's): the title is printed unlinked, never as a dead or `#` link." },
16
16
  "excerpt": { "type": "text", "description": "Summary (posts.excerpt)." },
17
17
  "date": { "type": "datetime", "description": "Publication date (posts.published_at)." },
18
18
  "locale": { "type": "string", "description": "Locale the date is written in (site.language)." },
@@ -6,6 +6,6 @@
6
6
  { "name": "inset-27", "frame": "page", "props": { "size": "base", "searchable": false, "html": "<p class=\"has-drop-cap\">Moving a WordPress site to a static stack is mostly about keeping what already works.</p><figure class=\"wp-block-table is-style-stripes\"><table><thead><tr><th>Metric</th><th>Before</th><th>After</th></tr></thead><tbody><tr><td>Requests</td><td>84</td><td>9</td></tr><tr><td>LCP</td><td>3.1 s</td><td>0.8 s</td></tr></tbody></table></figure>", "inset": "27" } },
7
7
  { "name": "inset-34", "frame": "page", "props": { "markdown": "## From a page section\n\nA section's text is **markdown** in the page model, with [a link](/about/) and a list:\n\n- Written once\n- Rendered at build time", "size": "base", "inset": "34" } },
8
8
  { "name": "inset-42", "frame": "page", "props": { "html": "<h2 class=\"wp-block-heading\">Keeping what works</h2><p>A careful migration keeps <strong>addresses</strong>, <a href=\"/about/\">formatting</a> and rankings.</p><ul class=\"wp-block-list\"><li>Permalinks stay put.</li><li>Archives survive.</li></ul><blockquote class=\"wp-block-quote\"><p>The fastest request is the one the server never has to think about.</p><cite>Every performance engineer</cite></blockquote><div class=\"wp-block-buttons is-layout-flex\"><div class=\"wp-block-button\"><a class=\"wp-block-button__link wp-element-button\" href=\"/contact/\">Get in touch</a></div></div>", "inset": "42" } },
9
- { "name": "table-wide", "frame": "page", "props": { "html": "<h2 class=\"wp-block-heading\">Compare plans</h2><p>Every plan side by side.</p><table><thead><tr><th>Plan</th><th>Monthly price</th><th>Yearly price</th><th>Sites included</th><th>Storage per site</th><th>Bandwidth per month</th><th>Staging environments</th><th>Daily backups kept</th><th>Edge caching</th><th>Malware scanning</th><th>Priority support</th><th>Migration help</th></tr></thead><tbody><tr><td>Starter</td><td>$35</td><td>$350</td><td>1</td><td>10 GB</td><td>50 GB</td><td>1</td><td>14 days</td><td>Included</td><td>Included</td><td>Email</td><td>One free</td></tr><tr><td>Business</td><td>$115</td><td>$1,150</td><td>5</td><td>40 GB</td><td>250 GB</td><td>5</td><td>30 days</td><td>Included</td><td>Included</td><td>Chat and email</td><td>Unlimited</td></tr></tbody></table><p>Prices exclude tax.</p>" } },
10
- { "name": "table-narrow", "frame": "page", "props": { "html": "<h2 class=\"wp-block-heading\">Opening hours</h2><table><tbody><tr><td>Weekdays</td><td>9–18</td></tr><tr><td>Saturday</td><td>10–14</td></tr></tbody></table><p>Closed on public holidays.</p>" } }
9
+ { "name": "table-wide", "frame": "page", "props": { "html": "<h2 class=\"wp-block-heading\">Compare plans</h2><p>Every plan side by side.</p><div class=\"table-scroll\" role=\"region\" tabindex=\"0\" aria-label=\"Table\"><table><thead><tr><th>Plan</th><th>Monthly price</th><th>Yearly price</th><th>Sites included</th><th>Storage per site</th><th>Bandwidth per month</th><th>Staging environments</th><th>Daily backups kept</th><th>Edge caching</th><th>Malware scanning</th><th>Priority support</th><th>Migration help</th></tr></thead><tbody><tr><td>Starter</td><td>$35</td><td>$350</td><td>1</td><td>10 GB</td><td>50 GB</td><td>1</td><td>14 days</td><td>Included</td><td>Included</td><td>Email</td><td>One free</td></tr><tr><td>Business</td><td>$115</td><td>$1,150</td><td>5</td><td>40 GB</td><td>250 GB</td><td>5</td><td>30 days</td><td>Included</td><td>Included</td><td>Chat and email</td><td>Unlimited</td></tr></tbody></table></div><p>Prices exclude tax.</p>" } },
10
+ { "name": "table-narrow", "frame": "page", "props": { "html": "<h2 class=\"wp-block-heading\">Opening hours</h2><div class=\"table-scroll\" role=\"region\" tabindex=\"0\" aria-label=\"Table\"><table><tbody><tr><td>Weekdays</td><td>9–18</td></tr><tr><td>Saturday</td><td>10–14</td></tr></tbody></table></div><p>Closed on public holidays.</p>" } }
11
11
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentrain/astro-kit",
3
- "version": "0.45.2",
3
+ "version": "0.45.3",
4
4
  "license": "MIT",
5
5
  "description": "Copy-in Astro components for Contentrain sites (shadcn model): typed props, tailwind-variants, zero JavaScript by default — with a machine-readable catalog",
6
6
  "type": "module",