@sinnstack/ui 0.0.0-stage → 0.3.0

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.
Files changed (306) hide show
  1. package/CHANGELOG.md +89 -0
  2. package/LICENSE +373 -0
  3. package/README.md +188 -2
  4. package/docs/blocks.md +373 -0
  5. package/docs/data.md +128 -0
  6. package/docs/finishes.md +165 -0
  7. package/docs/motion.md +166 -0
  8. package/docs/primitives.md +510 -0
  9. package/docs/seo.md +191 -0
  10. package/docs/tokens.md +122 -0
  11. package/package.json +132 -3
  12. package/scripts/check-contrast.mjs +180 -0
  13. package/src/blocks/BlockRenderer.astro +60 -0
  14. package/src/blocks/CTABanner.astro +121 -0
  15. package/src/blocks/CTAPair.astro +110 -0
  16. package/src/blocks/CardGrid.astro +167 -0
  17. package/src/blocks/ConsentEmbed.astro +125 -0
  18. package/src/blocks/ConsentManager.astro +147 -0
  19. package/src/blocks/ConsentScript.astro +47 -0
  20. package/src/blocks/ContactCard.astro +164 -0
  21. package/src/blocks/ContactForm.astro +224 -0
  22. package/src/blocks/ErrorPage.astro +242 -0
  23. package/src/blocks/FAQ.astro +135 -0
  24. package/src/blocks/FeatureGrid.astro +148 -0
  25. package/src/blocks/Hero.astro +171 -0
  26. package/src/blocks/HeroCarousel.astro +220 -0
  27. package/src/blocks/HighlightCards.astro +107 -0
  28. package/src/blocks/LocationHours.astro +311 -0
  29. package/src/blocks/LogoCloud.astro +135 -0
  30. package/src/blocks/MaintenancePage.astro +173 -0
  31. package/src/blocks/MediaText.astro +177 -0
  32. package/src/blocks/PageHeader.astro +126 -0
  33. package/src/blocks/ProseSection.astro +98 -0
  34. package/src/blocks/Reviews.astro +194 -0
  35. package/src/blocks/RichText.astro +58 -0
  36. package/src/blocks/StatsBand.astro +117 -0
  37. package/src/blocks/Steps.astro +141 -0
  38. package/src/blocks/Testimonials.astro +144 -0
  39. package/src/blocks/Topbar.astro +158 -0
  40. package/src/blocks/cms/card-grid.ts +48 -0
  41. package/src/blocks/cms/consent.ts +16 -0
  42. package/src/blocks/cms/contact-card.ts +46 -0
  43. package/src/blocks/cms/contact-form.ts +37 -0
  44. package/src/blocks/cms/cta-banner.ts +27 -0
  45. package/src/blocks/cms/cta-pair.ts +30 -0
  46. package/src/blocks/cms/data-base.ts +5 -0
  47. package/src/blocks/cms/data.ts +257 -0
  48. package/src/blocks/cms/faq.ts +38 -0
  49. package/src/blocks/cms/feature-grid.ts +47 -0
  50. package/src/blocks/cms/fixtures.ts +591 -0
  51. package/src/blocks/cms/hero-carousel.ts +36 -0
  52. package/src/blocks/cms/hero.ts +33 -0
  53. package/src/blocks/cms/highlight-cards.ts +41 -0
  54. package/src/blocks/cms/images.ts +37 -0
  55. package/src/blocks/cms/index.ts +59 -0
  56. package/src/blocks/cms/location-hours.ts +67 -0
  57. package/src/blocks/cms/logo-cloud.ts +36 -0
  58. package/src/blocks/cms/media-text.ts +26 -0
  59. package/src/blocks/cms/page-header.ts +27 -0
  60. package/src/blocks/cms/pages.ts +35 -0
  61. package/src/blocks/cms/prose-section.ts +25 -0
  62. package/src/blocks/cms/reviews.ts +50 -0
  63. package/src/blocks/cms/schema-dsl.ts +134 -0
  64. package/src/blocks/cms/schema.ts +794 -0
  65. package/src/blocks/cms/shared.ts +63 -0
  66. package/src/blocks/cms/stats-band.ts +35 -0
  67. package/src/blocks/cms/steps.ts +40 -0
  68. package/src/blocks/cms/testimonials.ts +46 -0
  69. package/src/blocks/cms/topbar.ts +27 -0
  70. package/src/blocks/cms/types.ts +27 -0
  71. package/src/blocks/consent.ts +14 -0
  72. package/src/blocks/icons.ts +47 -0
  73. package/src/blocks/index.ts +42 -0
  74. package/src/blocks/internal/Actions.astro +35 -0
  75. package/src/blocks/internal/BlockHeader.astro +45 -0
  76. package/src/blocks/internal/BlockShell.astro +58 -0
  77. package/src/blocks/internal/CarouselScript.astro +7 -0
  78. package/src/blocks/internal/ConsentEmbedScript.astro +7 -0
  79. package/src/blocks/internal/ConsentManagerScript.astro +7 -0
  80. package/src/blocks/internal/HoursScript.astro +7 -0
  81. package/src/blocks/internal/Placeholder.astro +13 -0
  82. package/src/blocks/internal/RichTextNode.astro +133 -0
  83. package/src/blocks/internal/StandaloneDocument.astro +53 -0
  84. package/src/blocks/internal/consent.ts +96 -0
  85. package/src/blocks/internal/fields.ts +18 -0
  86. package/src/blocks/internal/registry-contract.ts +67 -0
  87. package/src/blocks/internal/reviews.ts +22 -0
  88. package/src/blocks/internal/slug.ts +12 -0
  89. package/src/blocks/internal/util.ts +23 -0
  90. package/src/blocks/lib/contact.ts +92 -0
  91. package/src/blocks/lib/error-pages.ts +119 -0
  92. package/src/blocks/lib/faq.ts +37 -0
  93. package/src/blocks/lib/hours.ts +201 -0
  94. package/src/blocks/lib/maintenance.ts +129 -0
  95. package/src/blocks/lib/markdown.ts +350 -0
  96. package/src/blocks/lib/rich-text.ts +132 -0
  97. package/src/blocks/registry.ts +79 -0
  98. package/src/blocks/scripts/carousel.ts +218 -0
  99. package/src/blocks/scripts/consent-embed.ts +105 -0
  100. package/src/blocks/scripts/consent-manager.ts +112 -0
  101. package/src/blocks/scripts/consent-store.ts +86 -0
  102. package/src/blocks/scripts/error-page.ts +71 -0
  103. package/src/blocks/scripts/hours.ts +107 -0
  104. package/src/blocks/scripts/maintenance.ts +109 -0
  105. package/src/blocks/styles/blocks.css +1320 -0
  106. package/src/blocks/styles/consent.css +102 -0
  107. package/src/blocks/styles/faq.css +28 -0
  108. package/src/blocks/styles/location.css +92 -0
  109. package/src/blocks/styles/prose-section.css +13 -0
  110. package/src/blocks/styles/quotes.css +123 -0
  111. package/src/blocks/styles/rich-text.css +14 -0
  112. package/src/blocks/types.ts +293 -0
  113. package/src/data/ChartAxis.astro +19 -0
  114. package/src/data/ChartContainer.astro +152 -0
  115. package/src/data/ChartLegend.astro +25 -0
  116. package/src/data/ChartSeries.astro +14 -0
  117. package/src/data/ChartTable.astro +17 -0
  118. package/src/data/ChartTooltip.astro +20 -0
  119. package/src/data/Sparkline.astro +55 -0
  120. package/src/data/cms.ts +130 -0
  121. package/src/data/index.ts +10 -0
  122. package/src/data/internal/scale.ts +107 -0
  123. package/src/data/lib/chart.ts +459 -0
  124. package/src/data/lib/render.ts +219 -0
  125. package/src/data/lib/sparkline.ts +117 -0
  126. package/src/data/schema.ts +65 -0
  127. package/src/data/scripts/chart.ts +324 -0
  128. package/src/data/styles/chart.css +392 -0
  129. package/src/finishes/aurora.css +75 -0
  130. package/src/finishes/autumn.css +87 -0
  131. package/src/finishes/blueprint.css +69 -0
  132. package/src/finishes/brutalist.css +55 -0
  133. package/src/finishes/clay.css +48 -0
  134. package/src/finishes/day-cycle.css +46 -0
  135. package/src/finishes/fog.css +71 -0
  136. package/src/finishes/glass.css +149 -0
  137. package/src/finishes/holographic.css +91 -0
  138. package/src/finishes/night.css +77 -0
  139. package/src/finishes/paper.css +58 -0
  140. package/src/finishes/polished-glass.css +159 -0
  141. package/src/finishes/rain.css +84 -0
  142. package/src/finishes/scripts/day-cycle.ts +30 -0
  143. package/src/finishes/scripts/holographic.ts +37 -0
  144. package/src/finishes/scripts/spotlight.ts +30 -0
  145. package/src/finishes/spotlight.css +41 -0
  146. package/src/finishes/spring.css +80 -0
  147. package/src/finishes/terminal.css +49 -0
  148. package/src/motion/Marquee.astro +90 -0
  149. package/src/motion/MotionProvider.astro +50 -0
  150. package/src/motion/PageTransitions.astro +61 -0
  151. package/src/motion/Parallax.astro +44 -0
  152. package/src/motion/ParallaxLayer.astro +31 -0
  153. package/src/motion/RevealOnScroll.astro +59 -0
  154. package/src/motion/SceneRegistry.astro +38 -0
  155. package/src/motion/ScrollScene.astro +81 -0
  156. package/src/motion/index.ts +12 -0
  157. package/src/motion/integration.ts +48 -0
  158. package/src/motion/runtime/page-transitions.ts +68 -0
  159. package/src/motion/runtime/runtime.ts +180 -0
  160. package/src/motion/runtime/scenes.ts +248 -0
  161. package/src/motion/runtime/types.ts +103 -0
  162. package/src/motion/styles/motion.css +332 -0
  163. package/src/motion/transitions.ts +74 -0
  164. package/src/motion/virtual.d.ts +4 -0
  165. package/src/primitives/Accordion.astro +129 -0
  166. package/src/primitives/Breadcrumbs.astro +50 -0
  167. package/src/primitives/BulletList.astro +69 -0
  168. package/src/primitives/Button.astro +73 -0
  169. package/src/primitives/ButtonGroup.astro +54 -0
  170. package/src/primitives/Callout.astro +137 -0
  171. package/src/primitives/Caption.astro +35 -0
  172. package/src/primitives/Card.astro +72 -0
  173. package/src/primitives/CardContent.astro +24 -0
  174. package/src/primitives/CardFooter.astro +36 -0
  175. package/src/primitives/CardHeader.astro +86 -0
  176. package/src/primitives/Checkbox.astro +38 -0
  177. package/src/primitives/ChoiceGroup.astro +23 -0
  178. package/src/primitives/Cluster.astro +49 -0
  179. package/src/primitives/Container.astro +44 -0
  180. package/src/primitives/DescriptionList.astro +83 -0
  181. package/src/primitives/Dialog.astro +38 -0
  182. package/src/primitives/Disclosure.astro +67 -0
  183. package/src/primitives/Divider.astro +93 -0
  184. package/src/primitives/Drawer.astro +33 -0
  185. package/src/primitives/Fieldset.astro +80 -0
  186. package/src/primitives/Flex.astro +64 -0
  187. package/src/primitives/FocusRing.astro +63 -0
  188. package/src/primitives/FocusTrap.astro +64 -0
  189. package/src/primitives/Footer.astro +155 -0
  190. package/src/primitives/Form.astro +68 -0
  191. package/src/primitives/FormDescription.astro +26 -0
  192. package/src/primitives/FormError.astro +106 -0
  193. package/src/primitives/FormField.astro +72 -0
  194. package/src/primitives/Grid.astro +64 -0
  195. package/src/primitives/Heading.astro +45 -0
  196. package/src/primitives/IconButton.astro +48 -0
  197. package/src/primitives/Image.astro +125 -0
  198. package/src/primitives/Input.astro +86 -0
  199. package/src/primitives/Label.astro +50 -0
  200. package/src/primitives/Link.astro +81 -0
  201. package/src/primitives/LinkButton.astro +66 -0
  202. package/src/primitives/List.astro +39 -0
  203. package/src/primitives/ListItem.astro +178 -0
  204. package/src/primitives/MediaObject.astro +66 -0
  205. package/src/primitives/MetricCard.astro +278 -0
  206. package/src/primitives/NavLink.astro +81 -0
  207. package/src/primitives/NavMenu.astro +109 -0
  208. package/src/primitives/Navbar.astro +197 -0
  209. package/src/primitives/Panel.astro +153 -0
  210. package/src/primitives/Picture.astro +167 -0
  211. package/src/primitives/Popover.astro +95 -0
  212. package/src/primitives/Prose.astro +45 -0
  213. package/src/primitives/Radio.astro +21 -0
  214. package/src/primitives/Rating.astro +135 -0
  215. package/src/primitives/ReducedMotion.astro +90 -0
  216. package/src/primitives/SegmentedControl.astro +132 -0
  217. package/src/primitives/Select.astro +109 -0
  218. package/src/primitives/Sheet.astro +45 -0
  219. package/src/primitives/SkipLink.astro +31 -0
  220. package/src/primitives/Slider.astro +186 -0
  221. package/src/primitives/Spacer.astro +35 -0
  222. package/src/primitives/Stack.astro +51 -0
  223. package/src/primitives/Surface.astro +70 -0
  224. package/src/primitives/Switch.astro +22 -0
  225. package/src/primitives/Table.astro +382 -0
  226. package/src/primitives/Tabs.astro +126 -0
  227. package/src/primitives/Text.astro +56 -0
  228. package/src/primitives/Textarea.astro +75 -0
  229. package/src/primitives/Thumbnail.astro +154 -0
  230. package/src/primitives/Toggle.astro +99 -0
  231. package/src/primitives/Tooltip.astro +50 -0
  232. package/src/primitives/VisuallyHidden.astro +29 -0
  233. package/src/primitives/index.ts +103 -0
  234. package/src/primitives/internal/AccordionScript.astro +7 -0
  235. package/src/primitives/internal/ChoiceField.astro +91 -0
  236. package/src/primitives/internal/FocusTrapScript.astro +8 -0
  237. package/src/primitives/internal/FormValidationScript.astro +10 -0
  238. package/src/primitives/internal/IndeterminateScript.astro +13 -0
  239. package/src/primitives/internal/ModalPanel.astro +114 -0
  240. package/src/primitives/internal/OverlayScript.astro +7 -0
  241. package/src/primitives/internal/ReducedMotionScript.astro +7 -0
  242. package/src/primitives/internal/SliderScript.astro +7 -0
  243. package/src/primitives/internal/SparklineScript.astro +7 -0
  244. package/src/primitives/internal/TableSortScript.astro +7 -0
  245. package/src/primitives/internal/TabsScript.astro +7 -0
  246. package/src/primitives/internal/TooltipScript.astro +7 -0
  247. package/src/primitives/internal/image-plan.ts +82 -0
  248. package/src/primitives/internal/image.ts +129 -0
  249. package/src/primitives/internal/slider.ts +170 -0
  250. package/src/primitives/lib/deprecate.ts +47 -0
  251. package/src/primitives/lib/focus-trap.ts +197 -0
  252. package/src/primitives/lib/focus.ts +60 -0
  253. package/src/primitives/lib/motion.ts +68 -0
  254. package/src/primitives/scripts/accordion.ts +123 -0
  255. package/src/primitives/scripts/form-validation.ts +225 -0
  256. package/src/primitives/scripts/overlay.ts +71 -0
  257. package/src/primitives/scripts/reduced-motion.ts +59 -0
  258. package/src/primitives/scripts/slider.ts +150 -0
  259. package/src/primitives/scripts/sparkline.ts +131 -0
  260. package/src/primitives/scripts/table-sort.ts +68 -0
  261. package/src/primitives/scripts/tabs.ts +151 -0
  262. package/src/primitives/scripts/tooltip.ts +28 -0
  263. package/src/primitives/styles/a11y.css +104 -0
  264. package/src/primitives/styles/accordion.css +53 -0
  265. package/src/primitives/styles/breadcrumbs.css +59 -0
  266. package/src/primitives/styles/bullet-list.css +89 -0
  267. package/src/primitives/styles/button.css +237 -0
  268. package/src/primitives/styles/choice.css +164 -0
  269. package/src/primitives/styles/cluster.css +24 -0
  270. package/src/primitives/styles/container.css +19 -0
  271. package/src/primitives/styles/data.css +849 -0
  272. package/src/primitives/styles/disclosure.css +140 -0
  273. package/src/primitives/styles/divider.css +50 -0
  274. package/src/primitives/styles/flex.css +42 -0
  275. package/src/primitives/styles/form.css +241 -0
  276. package/src/primitives/styles/grid.css +36 -0
  277. package/src/primitives/styles/media.css +247 -0
  278. package/src/primitives/styles/nav.css +792 -0
  279. package/src/primitives/styles/overlay.css +362 -0
  280. package/src/primitives/styles/prose.css +146 -0
  281. package/src/primitives/styles/scale.css +175 -0
  282. package/src/primitives/styles/segmented.css +165 -0
  283. package/src/primitives/styles/slider.css +170 -0
  284. package/src/primitives/styles/spacer.css +17 -0
  285. package/src/primitives/styles/stack.css +25 -0
  286. package/src/primitives/styles/surface.css +403 -0
  287. package/src/primitives/styles/tabs.css +223 -0
  288. package/src/primitives/styles/typography.css +144 -0
  289. package/src/primitives/styles/utilities.css +24 -0
  290. package/src/primitives/types.ts +385 -0
  291. package/src/primitives/utils.ts +254 -0
  292. package/src/seo/JSONLD.astro +35 -0
  293. package/src/seo/SEOHead.astro +47 -0
  294. package/src/seo/cms.ts +59 -0
  295. package/src/seo/index.ts +10 -0
  296. package/src/seo/integration.ts +268 -0
  297. package/src/seo/internal/url.ts +68 -0
  298. package/src/seo/lib/jsonld.ts +342 -0
  299. package/src/seo/lib/meta.ts +205 -0
  300. package/src/seo/lib/redirects.ts +293 -0
  301. package/src/seo/lib/robots.ts +33 -0
  302. package/src/seo/lib/rss.ts +98 -0
  303. package/src/seo/lib/sitemap.ts +105 -0
  304. package/src/seo/schema.ts +43 -0
  305. package/src/tokens/base.css +71 -0
  306. package/src/tokens/tokens.css +210 -0
@@ -0,0 +1,591 @@
1
+ /**
2
+ * Example content for every block, in the CMS data shape. Used by the playground, the
3
+ * replica tests and the visual-regression baseline, and handy as starter content.
4
+ * Image paths are project-root paths resolved by `createImageResolver`.
5
+ */
6
+ import type {
7
+ CardGridData,
8
+ ContactCardData,
9
+ CtaBannerData,
10
+ CtaPairData,
11
+ StatsBandData,
12
+ HighlightCardsData,
13
+ ContactFormData,
14
+ FeatureGridData,
15
+ HeroCarouselData,
16
+ HeroData,
17
+ LogoCloudData,
18
+ MediaTextData,
19
+ PageHeaderData,
20
+ StepsData,
21
+ TopbarData,
22
+ ProseSectionData,
23
+ FaqData,
24
+ TestimonialsData,
25
+ ReviewsData,
26
+ LocationHoursData,
27
+ } from './data';
28
+
29
+ // The playground's sample images (abstract landscapes: wide, tall, square and a video poster).
30
+ const IMG = {
31
+ wide: '/src/assets/landscape.jpg',
32
+ tall: '/src/assets/landscape-tall.jpg',
33
+ portrait: '/src/assets/portrait.jpg',
34
+ poster: '/src/assets/video-poster.jpg',
35
+ };
36
+
37
+ export const heroFixtures: Record<string, HeroData> = {
38
+ text: {
39
+ _template: 'hero',
40
+ variant: 'text',
41
+ eyebrow: 'Sinnstack web studio',
42
+ heading: 'Websites that ship fast and stay fast',
43
+ description: 'Design, Astro development and a CMS your team can edit, live within weeks of the kickoff call.',
44
+ actions: [{ label: 'Book a call', href: '/book' }, { label: 'See services', href: '/services' }],
45
+ meta: 'Fixed-price projects · No lock-in',
46
+ },
47
+ split: {
48
+ _template: 'hero',
49
+ variant: 'split',
50
+ eyebrow: 'Sinnstack',
51
+ heading: 'A website your team can actually update',
52
+ description: 'Fast static pages, accessible components and a visual editor, set up and handed over.',
53
+ actions: [{ label: 'Book a call', href: '/book' }, { label: 'Call (817) 555-0100', href: 'tel:+18175550100' }],
54
+ image: IMG.wide,
55
+ imageAlt: 'A developer walking a client through a new site on a laptop',
56
+ },
57
+ media: {
58
+ _template: 'hero',
59
+ variant: 'media',
60
+ heading: 'Built in Fort Worth, shipped everywhere',
61
+ description: 'From a five-page brochure site to a full product launch, one team from design to deploy.',
62
+ actions: [{ label: 'See our work', href: '/work' }, { label: 'Call us', href: 'tel:+18175550100' }],
63
+ image: IMG.tall,
64
+ minHeight: 'l',
65
+ settings: { align: 'center' },
66
+ },
67
+ mediaGradient: {
68
+ _template: 'hero',
69
+ variant: 'media',
70
+ eyebrow: 'Now hiring',
71
+ heading: 'Developers who care about the details',
72
+ description: 'Small projects, real code review and a team that answers questions.',
73
+ actions: [{ label: 'See open roles', href: '/careers' }],
74
+ image: IMG.tall,
75
+ scrim: 'gradient',
76
+ },
77
+ };
78
+
79
+ export const ctaBannerFixtures: Record<string, CtaBannerData> = {
80
+ filled: {
81
+ _template: 'ctaBanner',
82
+ heading: 'Ready to start your project?',
83
+ description: 'Book a call or send a brief. We’ll reply with a plan and a fixed quote.',
84
+ actions: [{ label: 'Book a call', href: '/book' }, { label: 'Call (817) 555-0100', href: 'tel:+18175550100' }],
85
+ note: 'Most projects kick off within two weeks.',
86
+ variant: 'solid',
87
+ },
88
+ subtleCenter: {
89
+ _template: 'ctaBanner',
90
+ heading: 'Questions before you decide?',
91
+ description: 'A developer can walk you through what a rebuild involves.',
92
+ actions: [{ label: 'Talk to a developer', href: '/contact' }],
93
+ variant: 'soft',
94
+ settings: { align: 'center' },
95
+ },
96
+ neutralBleed: {
97
+ _template: 'ctaBanner',
98
+ heading: 'Agency partner?',
99
+ description: 'Send overflow projects by email, phone or the partner portal.',
100
+ actions: [{ label: 'Partner options', href: '/partners' }, { label: 'Partner portal', href: '/portal', style: 'ghost' }],
101
+ variant: 'solid',
102
+ tone: 'neutral',
103
+ bleed: true,
104
+ },
105
+ outline: {
106
+ _template: 'ctaBanner',
107
+ heading: 'Join our newsletter',
108
+ description: 'Web performance tips, once a month.',
109
+ actions: [{ label: 'Subscribe', href: '/newsletter' }],
110
+ variant: 'outline',
111
+ },
112
+ };
113
+
114
+ const services = [
115
+ { title: 'Website design', description: 'Layouts, type and color worked out with you, then built as reusable components.', icon: 'sparkle', href: '/services/design' },
116
+ { title: 'Astro development', description: 'Static-first pages that load fast and score well on Core Web Vitals.', icon: 'code', href: '/services/development' },
117
+ { title: 'CMS setup', description: 'A visual editor so your team can change content without a developer.', icon: 'file', badge: 'New' },
118
+ { title: 'Accessibility audits', description: 'WCAG 2.2 AA checks with a prioritized list of fixes.', icon: 'shield' },
119
+ { title: 'Hosting & deploys', description: 'Preview links for every change and one-click rollbacks.', icon: 'globe' },
120
+ { title: 'Support plans', description: 'Updates, monitoring and a developer who answers, every month.', icon: 'phone' },
121
+ ];
122
+
123
+ export const featureGridFixtures: Record<string, FeatureGridData> = {
124
+ cards: {
125
+ _template: 'featureGrid',
126
+ eyebrow: 'Services',
127
+ heading: 'Everything your site needs',
128
+ description: 'Projects planned around your goals, your content and your team.',
129
+ variant: 'card',
130
+ items: services,
131
+ },
132
+ dividedInline: {
133
+ _template: 'featureGrid',
134
+ heading: 'Why teams choose Sinnstack',
135
+ variant: 'divided',
136
+ layout: 'inline',
137
+ columns: '2',
138
+ items: [
139
+ { title: 'Kickoff within two weeks', description: 'We schedule the first workshop as soon as the brief is signed.', icon: 'clock' },
140
+ { title: 'Accessible by default', description: 'Every component is tested against WCAG 2.2 AA.', icon: 'shield' },
141
+ { title: 'One developer, start to finish', description: 'You talk to the same person from kickoff to launch.', icon: 'heart' },
142
+ { title: 'Plain-language updates', description: 'Weekly notes on what shipped and what’s next.', icon: 'chat' },
143
+ ],
144
+ },
145
+ strongCenter: {
146
+ _template: 'featureGrid',
147
+ eyebrow: 'By the numbers',
148
+ heading: 'Sites that stay fast',
149
+ variant: 'plain',
150
+ size: 'l',
151
+ columns: '3',
152
+ items: [
153
+ { title: '2-week starts', description: 'From signed brief to kickoff.', icon: 'clock' },
154
+ { title: '4.9 / 5 rating', description: 'From 120+ client reviews.', icon: 'star' },
155
+ { title: '100 Lighthouse', description: 'Performance score on launch day.', icon: 'bolt' },
156
+ ],
157
+ settings: { background: 'strong', tone: 'accent', align: 'center' },
158
+ },
159
+ };
160
+
161
+ const posts = [
162
+ { title: 'Preparing content for a rebuild', description: 'A short checklist so your first workshop goes smoothly.', href: '/blog/prepare', image: IMG.wide, eyebrow: 'Guide', meta: '4 min read' },
163
+ { title: 'Static vs. server rendering, explained', description: 'What each costs, what each is good at, and when to mix them.', href: '/blog/rendering', image: IMG.poster, eyebrow: 'Engineering', meta: '6 min read' },
164
+ { title: 'Meet the studio', description: 'Designers and developers working out of Fort Worth.', href: '/blog/team', image: IMG.portrait, eyebrow: 'People', meta: '2 min read' },
165
+ { title: 'When to call for support', description: 'Problems that need a fix today versus a ticket this week.', href: '/blog/support', image: IMG.tall, eyebrow: 'Support', meta: '3 min read' },
166
+ ];
167
+
168
+ export const cardGridFixtures: Record<string, CardGridData> = {
169
+ featured: {
170
+ _template: 'cardGrid',
171
+ heading: 'From the blog',
172
+ description: 'Practical guides for site owners and their teams.',
173
+ variant: 'elevated',
174
+ featured: true,
175
+ mediaAspect: '3/2',
176
+ items: posts,
177
+ settings: { background: 'subtle' },
178
+ },
179
+ list: {
180
+ _template: 'cardGrid',
181
+ heading: 'Studios',
182
+ layout: 'list',
183
+ variant: 'outline',
184
+ items: [
185
+ { title: 'Fort Worth — Near Southside', description: '1200 W Magnolia Ave · Mon–Fri 9–5', href: '/studios/fort-worth', image: IMG.wide, meta: '(817) 555-0100' },
186
+ { title: 'Arlington', description: '400 E Abram St · By appointment', href: '/studios/arlington', image: IMG.tall, meta: '(817) 555-0144' },
187
+ ],
188
+ },
189
+ empty: {
190
+ _template: 'cardGrid',
191
+ heading: 'Upcoming events',
192
+ items: [],
193
+ emptyMessage: 'No events scheduled right now.',
194
+ },
195
+ };
196
+
197
+ const LOGO = (n: string) => `/src/assets/logos/${n}.svg`;
198
+ const partners = [
199
+ { image: LOGO('northwind'), name: 'Northwind Labs' },
200
+ { image: LOGO('lakeside'), name: 'Lakeside Studio', href: '/clients#lakeside' },
201
+ { image: LOGO('summit'), name: 'Summit Cloud' },
202
+ { image: LOGO('trinity'), name: 'Trinity Analytics' },
203
+ { image: LOGO('bluebonnet'), name: 'Bluebonnet Hosting' },
204
+ { image: LOGO('pioneer'), name: 'Pioneer Software' },
205
+ ];
206
+
207
+ export const logoCloudFixtures: Record<string, LogoCloudData> = {
208
+ strip: { _template: 'logoCloud', heading: 'Trusted by', compact: true, variant: 'strip', logos: partners },
209
+ gridMono: { _template: 'logoCloud', heading: 'Our clients', variant: 'grid', columns: '6', size: 's', mono: true, logos: partners },
210
+ tiles: { _template: 'logoCloud', heading: 'Technology partners', compact: true, variant: 'grid', columns: '4', tile: true, logos: partners.slice(0, 4), settings: { background: 'sunken' } },
211
+ };
212
+
213
+ export const heroCarouselFixtures: Record<string, HeroCarouselData> = {
214
+ three: {
215
+ _template: 'heroCarousel',
216
+ label: 'Featured messages',
217
+ slides: [
218
+ {
219
+ eyebrow: 'Design, development and hosting',
220
+ heading: 'Fast, accessible, editable',
221
+ description: 'Sites built from tested components, handed over with a CMS.',
222
+ actions: [{ label: 'Our services', href: '/services' }],
223
+ image: IMG.tall,
224
+ },
225
+ {
226
+ eyebrow: 'Selected work',
227
+ heading: 'Launches we’re proud of',
228
+ actions: [{ label: 'See case studies', href: '/work' }],
229
+ image: IMG.wide,
230
+ },
231
+ {
232
+ eyebrow: 'Support plans',
233
+ heading: 'A developer on call',
234
+ actions: [{ label: 'Contact us', href: '/contact' }],
235
+ image: IMG.poster,
236
+ },
237
+ ],
238
+ },
239
+ autoplayCenter: {
240
+ _template: 'heroCarousel',
241
+ label: 'Announcements',
242
+ autoplay: 7,
243
+ minHeight: 'm',
244
+ settings: { align: 'center' },
245
+ slides: [
246
+ { heading: 'Now booking new projects', description: 'Kickoffs start within two weeks of a signed brief.', actions: [{ label: 'Book a call', href: '/book' }], image: IMG.wide },
247
+ { heading: 'Free accessibility check', description: 'Send us a URL and get a short report.', actions: [{ label: 'Learn more', href: '/audit' }], image: IMG.tall },
248
+ ],
249
+ },
250
+ };
251
+
252
+ export const pageHeaderFixtures: Record<string, PageHeaderData> = {
253
+ program: {
254
+ _template: 'pageHeader',
255
+ heading: 'Astro migration',
256
+ breadcrumbs: [{ label: 'Home', href: '/' }, { label: 'Services', href: '/services' }],
257
+ breadcrumbPosition: 'below',
258
+ },
259
+ intro: {
260
+ _template: 'pageHeader',
261
+ eyebrow: 'Contact',
262
+ heading: 'Let’s talk about your project',
263
+ description: 'Call during studio hours, or send a message and we’ll reply within one business day.',
264
+ breadcrumbs: [{ label: 'Home', href: '/' }],
265
+ actions: [{ label: 'Call (817) 555-0100', href: 'tel:+18175550100' }],
266
+ },
267
+ strong: {
268
+ _template: 'pageHeader',
269
+ eyebrow: 'Services',
270
+ heading: 'What we build',
271
+ description: 'Marketing sites, documentation, web apps and the systems behind them.',
272
+ settings: { background: 'strong', tone: 'accent' },
273
+ },
274
+ };
275
+
276
+ const contactItems: NonNullable<ContactCardData['items']> = [
277
+ { type: 'address', value: '1200 W Magnolia Ave, Suite 140\nFort Worth, TX 76104' },
278
+ { type: 'phone', value: '(817) 555-0100' },
279
+ { type: 'fax', value: '(817) 555-0199' },
280
+ { type: 'email', value: 'hello@example.com' },
281
+ { type: 'hours', label: 'Studio hours', value: 'Mon–Fri 9 am – 5 pm\nSupport line 24/7 on support plans' },
282
+ ];
283
+
284
+ export const contactCardFixtures: Record<string, ContactCardData> = {
285
+ sidebar: {
286
+ _template: 'contactCard',
287
+ heading: 'Sinnstack',
288
+ items: contactItems,
289
+ note: 'Please don’t email passwords or API keys. We’ll send a secure link instead.',
290
+ },
291
+ wide: {
292
+ _template: 'contactCard',
293
+ eyebrow: 'Contact',
294
+ heading: 'Reach the right team',
295
+ description: 'New projects, agency partners and job seekers.',
296
+ variant: 'plain',
297
+ columns: '3',
298
+ items: [
299
+ { type: 'phone', label: 'New projects', value: '(817) 555-0100' },
300
+ { type: 'phone', label: 'Partners (agencies)', value: '(817) 555-0144' },
301
+ { type: 'fax', label: 'Billing fax', value: '(817) 555-0199' },
302
+ { type: 'email', value: 'hello@example.com' },
303
+ { type: 'address', value: '1200 W Magnolia Ave, Suite 140\nFort Worth, TX 76104' },
304
+ { type: 'link', label: 'Careers', value: 'Open roles', href: '/careers' },
305
+ ],
306
+ settings: { background: 'subtle' },
307
+ },
308
+ };
309
+
310
+ export const stepsFixtures: Record<string, StepsData> = {
311
+ admissions: {
312
+ _template: 'steps',
313
+ heading: 'How a project starts',
314
+ description: 'From the first call to the kickoff, usually within two weeks.',
315
+ marker: 'icon',
316
+ items: [
317
+ { title: 'Discovery call', description: 'We talk through your goals, content and deadline.', icon: 'users' },
318
+ { title: 'Sign the brief', description: 'A fixed scope and price, in plain language.', icon: 'file' },
319
+ { title: 'Kickoff workshop', description: 'Your developer plans the site with you and your team.', icon: 'home' },
320
+ ],
321
+ settings: { align: 'center' },
322
+ },
323
+ numberedList: {
324
+ _template: 'steps',
325
+ eyebrow: 'For agencies',
326
+ heading: 'How to send us a project',
327
+ layout: 'list',
328
+ variant: 'card',
329
+ items: [
330
+ { title: 'Send the brief', description: 'Email, phone or the partner portal.' },
331
+ { title: 'We confirm the scope', description: 'Usually the same day.' },
332
+ { title: 'We meet your client', description: 'To schedule the kickoff.' },
333
+ { title: 'You get updates', description: 'Preview links and progress notes, as they happen.' },
334
+ ],
335
+ settings: { background: 'subtle' },
336
+ },
337
+ };
338
+
339
+ export const mediaTextFixtures: Record<string, MediaTextData> = {
340
+ welcome: {
341
+ _template: 'mediaText',
342
+ eyebrow: 'Welcome',
343
+ heading: 'Web design and development, centered on your team',
344
+ description: 'Our driving force is the people who will use and edit the site every day.',
345
+ points: [
346
+ 'A collaborative team: you are part of every decision.',
347
+ 'Static-first builds that stay fast as content grows.',
348
+ 'Accessible components tested against WCAG 2.2 AA.',
349
+ ],
350
+ actions: [{ label: 'About us', href: '/about' }],
351
+ image: IMG.portrait,
352
+ imageAlt: 'A designer smiling during a client workshop',
353
+ },
354
+ endTinted: {
355
+ _template: 'mediaText',
356
+ heading: 'Support that stays with you',
357
+ description: 'The same developer after launch, with updates and monitoring every month.',
358
+ points: ['Fixes within one business day', 'Monthly performance reports'],
359
+ image: IMG.wide,
360
+ imageAlt: 'A developer walking a client through a new site on a laptop',
361
+ mediaPosition: 'end',
362
+ mediaAspect: '3/2',
363
+ settings: { background: 'tinted' },
364
+ },
365
+ };
366
+
367
+ export const ctaPairFixtures: Record<string, CtaPairData> = {
368
+ bleed: {
369
+ _template: 'ctaPair',
370
+ label: 'Get in touch',
371
+ items: [
372
+ { heading: 'Start a new project', actions: [{ label: 'Get in touch', href: '/contact' }] },
373
+ { heading: 'Agency partner?', actions: [{ label: 'Partner program', href: '/partners' }] },
374
+ ],
375
+ },
376
+ panels: {
377
+ _template: 'ctaPair',
378
+ bleed: false,
379
+ settings: { align: 'start' },
380
+ items: [
381
+ { heading: 'Business owners', description: 'Questions about a rebuild? A developer can help.', actions: [{ label: 'Talk to a developer', href: '/contact' }], tone: 'neutral' },
382
+ { heading: 'Agencies', description: 'Overflow work by email, phone or portal.', actions: [{ label: 'Partner options', href: '/partners' }], tone: 'accent' },
383
+ ],
384
+ },
385
+ };
386
+
387
+ export const statsBandFixtures: Record<string, StatsBandData> = {
388
+ photo: {
389
+ _template: 'statsBand',
390
+ label: 'At a glance',
391
+ image: IMG.wide,
392
+ items: [
393
+ { value: '100', label: 'Lighthouse score', icon: 'bolt' },
394
+ { value: '24', label: 'Hour support line', icon: 'clock' },
395
+ { value: '120+', label: 'Sites launched', icon: 'globe' },
396
+ { value: '0 KB', label: 'JavaScript by default', icon: 'code' },
397
+ ],
398
+ },
399
+ plainNeutral: {
400
+ _template: 'statsBand',
401
+ heading: 'Studio by the numbers',
402
+ tone: 'neutral',
403
+ settings: { spacing: 'l' },
404
+ items: [
405
+ { value: '4.9', label: 'Average rating' },
406
+ { value: '120+', label: 'Clients served' },
407
+ { value: '30 min', label: 'Average reply' },
408
+ ],
409
+ },
410
+ };
411
+
412
+ export const highlightCardsFixtures: Record<string, HighlightCardsData> = {
413
+ band: {
414
+ _template: 'highlightCards',
415
+ label: 'How can we help?',
416
+ items: [
417
+ { heading: 'New projects', description: 'Tell us a little about your site and a developer will call you back the same day.', actions: [{ label: 'Start a project', href: '/contact', style: 'outline', arrow: true }] },
418
+ { heading: 'Agency partners', description: 'Send overflow work by phone, email or the partner portal. We respond within 24 hours.', actions: [{ label: 'Send a brief', href: '/partners', style: 'outline', arrow: true }], tone: 'neutral' },
419
+ { heading: 'Support hours', points: ['Studio: Mon–Fri, 9–5', 'Support plans: 24/7', 'Status page always on'], actions: [{ label: 'Contact us', href: '/contact', style: 'outline', arrow: true }] },
420
+ ],
421
+ },
422
+ separate: {
423
+ _template: 'highlightCards',
424
+ label: 'Ways to reach us',
425
+ gap: 'm',
426
+ settings: { align: 'center' },
427
+ items: [
428
+ { heading: 'Call', description: 'A developer answers during studio hours.', actions: [{ label: 'Call (817) 555-0100', href: 'tel:+18175550100' }], tone: 'neutral' },
429
+ { heading: 'Write', description: 'Send a message; we reply within a business day.', actions: [{ label: 'Send a message', href: '/contact' }] },
430
+ ],
431
+ },
432
+ };
433
+
434
+ export const contactFormFixtures: Record<string, ContactFormData> = {
435
+ section: {
436
+ _template: 'contactForm',
437
+ heading: 'Send us a message',
438
+ description: 'A project lead will get back to you within one business day.',
439
+ messageHint: 'Please don’t include passwords or API keys. We’ll send a secure link if we need access.',
440
+ note: 'We reply within one business day.',
441
+ fallbackPhone: '(817) 555-0100',
442
+ fallbackEmail: 'hello@example.com',
443
+ settings: { background: 'subtle' },
444
+ },
445
+ short: {
446
+ _template: 'contactForm',
447
+ heading: 'Questions?',
448
+ nameFields: 'single',
449
+ phone: 'hidden',
450
+ submitLabel: 'Send',
451
+ fallbackEmail: 'hello@example.com',
452
+ },
453
+ };
454
+
455
+ /** Site settings for <Topbar> (not a page block). */
456
+ export const topbarFixture: TopbarData = {
457
+ items: [
458
+ { type: 'address', value: '1200 W Magnolia Ave, Fort Worth, TX 76104' },
459
+ { type: 'phone', value: '(817) 555-0100' },
460
+ { type: 'email', value: 'hello@example.com' },
461
+ ],
462
+ links: [
463
+ { label: 'GitHub', href: 'https://github.com/example', newTab: true },
464
+ { label: 'Careers', href: '/careers' },
465
+ ],
466
+ };
467
+
468
+ /** An inner page built from the newer blocks (a service page with breadcrumbs, steps and contacts). */
469
+ export const programPageFixture = [pageHeaderFixtures.program, mediaTextFixtures.welcome, stepsFixtures.admissions, contactCardFixtures.wide, ctaPairFixtures.bleed];
470
+
471
+ /** One page using every block, in a sensible order. */
472
+ export const pageFixture = [
473
+ heroFixtures.split,
474
+ logoCloudFixtures.strip,
475
+ featureGridFixtures.cards,
476
+ heroFixtures.media,
477
+ featureGridFixtures.dividedInline,
478
+ cardGridFixtures.featured,
479
+ featureGridFixtures.strongCenter,
480
+ cardGridFixtures.list,
481
+ logoCloudFixtures.tiles,
482
+ ctaBannerFixtures.filled,
483
+ ];
484
+
485
+ // ---------- Text, FAQ, Testimonials, Reviews, Location (rich text is Markdown, as SinnStackCMS stores it) ----------
486
+ export const proseSectionFixtures: Record<string, ProseSectionData> = {
487
+ about: {
488
+ _template: 'proseSection',
489
+ eyebrow: 'About',
490
+ heading: 'A small studio for small businesses',
491
+ body: [
492
+ 'Sinnstack builds fast, accessible websites and hands them over with a CMS your team can actually use.',
493
+ '## How a project runs',
494
+ '1. Discovery: two weeks to map pages, content and goals.\n2. Build: design, content entry and testing on real phones.\n3. Launch: training for your team, then a month of fixes included.',
495
+ 'Every site meets WCAG 2.2 AA and loads in under two seconds on a mid-range phone.',
496
+ ].join('\n\n'),
497
+ actions: [{ label: 'Start a project', href: '/contact' }],
498
+ },
499
+ policy: {
500
+ _template: 'proseSection',
501
+ heading: 'Privacy policy',
502
+ body: 'We collect only what the contact form asks for.\n\nEmbedded maps and videos load only after you allow them.',
503
+ settings: { background: 'subtle' },
504
+ },
505
+ };
506
+
507
+ export const faqFixtures: Record<string, FaqData> = {
508
+ stacked: {
509
+ _template: 'faq',
510
+ eyebrow: 'FAQ',
511
+ heading: 'Questions we hear a lot',
512
+ items: [
513
+ { question: 'How long does a website take?', answer: 'Most small-business sites launch four to six weeks after the discovery call.' },
514
+ { question: 'Can my team edit the site?', answer: 'Yes. Every site ships with a CMS, and we train your team before launch.' },
515
+ { question: 'What does a site cost?', answer: 'Fixed prices, quoted after discovery. No hourly surprises.', anchor: 'pricing' },
516
+ { question: 'Do you host the site?', answer: 'We can, or we can deploy to the host you already use.' },
517
+ ],
518
+ actions: [{ label: 'Ask us something else', href: '/contact', style: 'outline' }],
519
+ },
520
+ split: {
521
+ _template: 'faq',
522
+ heading: 'Working with us',
523
+ description: 'The short version of how projects go.',
524
+ layout: 'split',
525
+ variant: 'card',
526
+ mode: 'single',
527
+ openFirst: true,
528
+ items: [
529
+ { question: 'Who writes the content?', answer: 'You know your business best; we edit, structure and fill the gaps.' },
530
+ { question: 'What happens after launch?', answer: 'A month of fixes is included. After that, a monthly plan or pay as you go.' },
531
+ ],
532
+ settings: { background: 'subtle' },
533
+ },
534
+ };
535
+
536
+ export const testimonialsFixtures: Record<string, TestimonialsData> = {
537
+ grid: {
538
+ _template: 'testimonials',
539
+ heading: 'What clients say',
540
+ items: [
541
+ { quote: 'Our bookings doubled the month the new site went live.', name: 'Dana Ortiz', role: 'Owner', organization: 'Riverside Bakery', image: IMG.portrait, rating: 5, sourceLabel: 'Google' },
542
+ { quote: 'We update the menu ourselves now. It takes a minute.', name: 'Sam Lee', role: 'Manager', organization: 'Northside Coffee' },
543
+ { quote: 'Clear plan, fair price, and they answered every email the same day.', name: 'Ari Patel', role: 'Director', organization: 'Patel Landscaping' },
544
+ ],
545
+ },
546
+ single: {
547
+ _template: 'testimonials',
548
+ layout: 'single',
549
+ items: [{ quote: 'The site paid for itself in three months.', name: 'Jordan Reyes', role: 'Founder', organization: 'Reyes Fitness', image: IMG.portrait }],
550
+ settings: { background: 'subtle' },
551
+ },
552
+ };
553
+
554
+ export const reviewsFixtures: Record<string, ReviewsData> = {
555
+ google: {
556
+ _template: 'reviews',
557
+ heading: 'Reviews',
558
+ summary: { rating: 4.9, count: 37, source: 'Google', href: 'https://www.google.com/maps', writeHref: 'https://www.google.com/maps' },
559
+ items: [
560
+ { text: 'Clear plan, fair price, and the site was live ahead of schedule.', author: 'Jordan M.', rating: 5, date: '2026-09-12', sourceLabel: 'Google', response: 'Thanks, Jordan. It was a pleasure.' },
561
+ { text: 'Good work overall; the first draft needed a second round of edits.', author: 'Casey R.', rating: 4, date: '2026-08-01', sourceLabel: 'Google' },
562
+ { text: 'Quick replies and a site that loads fast on phones.', author: 'Morgan T.', rating: 5, date: '2026-07-19', sourceLabel: 'Google' },
563
+ ],
564
+ },
565
+ };
566
+
567
+ export const locationHoursFixtures: Record<string, LocationHoursData> = {
568
+ studio: {
569
+ _template: 'locationHours',
570
+ heading: 'Visit the studio',
571
+ name: 'Sinnstack',
572
+ address: { street: '500 Main St', street2: 'Suite 210', city: 'Fort Worth', region: 'TX', postalCode: '76102' },
573
+ phone: '(817) 555-0100',
574
+ email: 'hello@example.com',
575
+ timeZone: 'America/Chicago',
576
+ hours: [
577
+ { days: ['Mo', 'Tu', 'We', 'Th', 'Fr'], opens: '09:00', closes: '17:00' },
578
+ { days: ['Sa'], opens: '10:00', closes: '14:00' },
579
+ ],
580
+ special: [{ date: '2026-12-25', label: 'Christmas Day', closed: true }],
581
+ hoursNote: 'Meetings by appointment.',
582
+ },
583
+ linksOnly: {
584
+ _template: 'locationHours',
585
+ heading: 'Support hours',
586
+ hours: [{ days: ['Mo', 'Tu', 'We', 'Th', 'Fr'], opens: '08:00', closes: '18:00' }],
587
+ timeZone: 'America/Chicago',
588
+ map: 'link',
589
+ settings: { background: 'subtle' },
590
+ },
591
+ };
@@ -0,0 +1,36 @@
1
+ import type { SlideItem } from '../types';
2
+ import type { HeroCarouselData } from './data';
3
+ import type { MapContext } from './types';
4
+ import { clean, compact, mapActions, mapImage, mapSettings, withFields } from './shared';
5
+
6
+ export const heroCarouselDefaults: HeroCarouselData = {
7
+ _template: 'heroCarousel',
8
+ label: 'Featured',
9
+ slides: [
10
+ { heading: 'Your main message goes on the first slide', description: 'Most visitors only see this one.', actions: [{ label: 'Learn more', href: '/about', style: 'solid' }] },
11
+ { heading: 'A second message', actions: [{ label: 'See services', href: '/services', style: 'solid' }] },
12
+ ],
13
+ };
14
+
15
+ export function heroCarouselToProps(d: HeroCarouselData, ctx: MapContext) {
16
+ const slides = withFields(d.slides, 'slides')
17
+ .filter((s) => clean(s?.heading))
18
+ // Background images are decorative: alt is always empty.
19
+ .map((s) => compact({ eyebrow: clean(s.eyebrow), heading: clean(s.heading)!, description: clean(s.description), actions: mapActions(s.actions), image: mapImage(s.image, '', ctx), field: s._field }) as SlideItem);
20
+ const { anchor, align } = mapSettings(d.settings);
21
+ const autoplay = Number(d.autoplay);
22
+ return compact({
23
+ anchor,
24
+ align,
25
+ label: clean(d.label),
26
+ slides,
27
+ autoplay: Number.isFinite(autoplay) && autoplay > 0 ? Math.max(5, autoplay) : undefined,
28
+ minHeight: d.minHeight,
29
+ motion: d.motion,
30
+ controls: d.controls,
31
+ scrim: d.scrim,
32
+ // A carousel never takes the page's h1 from the renderer (see HeroCarousel docs).
33
+ headingLevel: 2 as const,
34
+ placeholder: ctx.placeholder,
35
+ });
36
+ }
@@ -0,0 +1,33 @@
1
+ import type { HeroData } from './data';
2
+ import type { MapContext } from './types';
3
+ import { clean, compact, mapActions, mapImage, mapSettings } from './shared';
4
+
5
+ export const heroDefaults: HeroData = {
6
+ _template: 'hero',
7
+ variant: 'text',
8
+ heading: 'A clear headline about what you do',
9
+ description: 'One or two sentences on who it’s for and why it matters.',
10
+ actions: [{ label: 'Get started', href: '/contact', style: 'solid' }],
11
+ };
12
+
13
+ export function heroToProps(d: HeroData, ctx: MapContext) {
14
+ // Stored as `variant` (no content migration); the component prop is `layout`.
15
+ const layout = d.variant ?? 'text';
16
+ // Background images are decorative: their alt is always empty.
17
+ const image = mapImage(d.image, layout === 'media' ? '' : d.imageAlt, ctx);
18
+ return compact({
19
+ ...mapSettings(d.settings),
20
+ layout: layout !== 'text' && !image ? 'text' : layout,
21
+ eyebrow: clean(d.eyebrow),
22
+ heading: clean(d.heading),
23
+ description: clean(d.description),
24
+ actions: mapActions(d.actions),
25
+ meta: clean(d.meta),
26
+ image,
27
+ mediaPosition: d.mediaPosition,
28
+ scrim: d.scrim,
29
+ minHeight: d.minHeight,
30
+ headingLevel: ctx.headingLevel,
31
+ placeholder: ctx.placeholder,
32
+ });
33
+ }