@contentrain/astro-kit 0.23.5 → 0.23.6

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.
@@ -4,8 +4,7 @@
4
4
  // StudioForm): its fields, spam protection and notifications live in Studio,
5
5
  // and submissions arrive there for review — no form plugin, no mail server.
6
6
  // Until the site is bound to a Studio project the form renders nothing and the
7
- // contact details still show — and a section left with its heading alone is not
8
- // drawn (a heading over a form that is not there). When the owner chose another home for forms at
7
+ // contact details still show, and so do the section's heading and introduction (only the form goes). When the owner chose another home for forms at
9
8
  // migration (site.config.ts `features.forms`), the same place holds a form
10
9
  // that posts to their form service, an address to write to, or a link to the
11
10
  // form on WordPress.
@@ -71,7 +70,7 @@ interface Props {
71
70
  const { model, heading, intro, formHeading, details = [], layout, align, tone, id = 'contact' } = Astro.props
72
71
  // Nothing to render (Studio not bound yet): a split would leave an empty column — the details stand alone.
73
72
  const formShown = formHome(model) !== null
74
- const bare = contactSectionBare({ formShown, intro, details })
73
+ const bare = contactSectionBare({ formShown, heading, intro, details })
75
74
  const s = contact({ layout: formShown ? layout : 'stacked', align, tone })
76
75
  const headingId = heading ? `${id}-title` : undefined
77
76
  // A description list needs a term for every detail; an icon list carried from the source has values only.
@@ -1,8 +1,9 @@
1
1
  // When the contact section has nothing to show. Its form is drawn only where a home for it exists (Studio bound, the
2
2
  // WordPress page known, a service address that is https); until then the section stands on its heading, introduction
3
- // and details. A section left with a heading ALONE titles a form that is not there — the page would print "Tell us about
4
- // your project" over empty space — so it is not drawn at all, and appears with its form once the form has a home.
3
+ // and details. The source's words are never dropped with the form: a page whose contact section holds only a heading
4
+ // ("Bize yazın") keeps it, because the text is the site's own and a fidelity gate compares it. Only a section with no
5
+ // heading, introduction or details at all — nothing to print — is left out, and appears with its form once it has a home.
5
6
 
6
- export function contactSectionBare(input: { formShown: boolean, intro?: string | undefined, details?: readonly unknown[] | undefined }): boolean {
7
- return !input.formShown && !input.intro && !(input.details?.length ?? 0)
7
+ export function contactSectionBare(input: { formShown: boolean, heading?: string | undefined, intro?: string | undefined, details?: readonly unknown[] | undefined }): boolean {
8
+ return !input.formShown && !input.heading && !input.intro && !(input.details?.length ?? 0)
8
9
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentrain/astro-kit",
3
- "version": "0.23.5",
3
+ "version": "0.23.6",
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",