@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,102 @@
1
+ /* Same order as tokens.css: whichever stylesheet loads first fixes the layer order. */
2
+ @layer sinn.reset, sinn.tokens, sinn.primitives, sinn.data, sinn.motion, sinn.blocks, sinn.overrides;
3
+
4
+ /* ================= ConsentManager =================
5
+ * A bar fixed to the bottom of the screen. While it's showing, the page reserves room at its end
6
+ * and scroll padding below, so it never covers the last content or a focused element. */
7
+ @layer sinn.blocks {
8
+ :where(.sinn-consent__banner) {
9
+ position: fixed;
10
+ inset-inline: var(--sinn-space-s);
11
+ inset-block-end: var(--sinn-space-s);
12
+ z-index: var(--sinn-z-sticky);
13
+ display: flex;
14
+ flex-wrap: wrap;
15
+ align-items: center;
16
+ gap: var(--sinn-space-s) var(--sinn-space-l);
17
+ max-inline-size: 64rem;
18
+ max-block-size: calc(100dvh - 2 * var(--sinn-space-s));
19
+ margin-inline: auto;
20
+ padding: var(--sinn-space-m) var(--sinn-space-l);
21
+ overflow-y: auto;
22
+ border: var(--sinn-border-width-thin) solid var(--sinn-color-border);
23
+ border-radius: var(--sinn-radius-l);
24
+ background-color: var(--sinn-color-surface-raised);
25
+ box-shadow: var(--sinn-shadow-l);
26
+ color: var(--sinn-color-text);
27
+ }
28
+ :where(.sinn-consent__banner[hidden]) { display: none; }
29
+ :where(:root:has(.sinn-consent__banner:not([hidden]))) {
30
+ scroll-padding-block-end: var(--sinn-consent-reserve, 11rem);
31
+ }
32
+ :where(body:has(.sinn-consent__banner:not([hidden])))::after {
33
+ content: '';
34
+ display: block;
35
+ block-size: var(--sinn-consent-reserve, 11rem);
36
+ }
37
+ :where(.sinn-consent__body) { flex: 1 1 24rem; min-inline-size: 0; }
38
+ :where(.sinn-consent__title) { margin: 0 0 var(--sinn-space-3xs); font-weight: var(--sinn-weight-semibold); }
39
+ :where(.sinn-consent__message) { margin: 0; color: var(--sinn-color-text-muted); font-size: var(--sinn-text-s); line-height: var(--sinn-leading-normal); }
40
+ :where(.sinn-consent__actions) { display: flex; flex-wrap: wrap; gap: var(--sinn-space-xs); }
41
+ /* Accept and Reject share one width, so neither looks like the default. */
42
+ :where(.sinn-consent__actions) > :where([data-consent-accept], [data-consent-reject]) { min-inline-size: 8.5rem; justify-content: center; }
43
+
44
+ :where(.sinn-consent__form) { margin: 0; }
45
+ :where(.sinn-consent__list) { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
46
+ :where(.sinn-consent__item) { padding-block: var(--sinn-space-s); }
47
+ :where(.sinn-consent__item + .sinn-consent__item) { border-block-start: var(--sinn-border-width-thin) solid var(--sinn-color-border-subtle); }
48
+
49
+ @media (forced-colors: active) {
50
+ :where(.sinn-consent__banner) { border-color: CanvasText; }
51
+ }
52
+ @media print {
53
+ :where(.sinn-consent__banner) { display: none; }
54
+ }
55
+ }
56
+
57
+ /* ================= ConsentEmbed =================
58
+ * The box keeps the embed's aspect ratio before and after loading. */
59
+ @layer sinn.blocks {
60
+ :where(.sinn-embed) { --sinn-p-embed-aspect: 16 / 9; inline-size: 100%; }
61
+ :where(.sinn-embed[data-aspect='4-3']) { --sinn-p-embed-aspect: 4 / 3; }
62
+ :where(.sinn-embed[data-aspect='3-2']) { --sinn-p-embed-aspect: 3 / 2; }
63
+ :where(.sinn-embed[data-aspect='1-1']) { --sinn-p-embed-aspect: 1 / 1; }
64
+ :where(.sinn-embed[data-aspect='21-9']) { --sinn-p-embed-aspect: 21 / 9; }
65
+ :where(.sinn-embed__frame) {
66
+ position: relative;
67
+ display: grid;
68
+ aspect-ratio: var(--sinn-p-embed-aspect);
69
+ border: var(--sinn-border-width-thin) solid var(--sinn-color-border);
70
+ border-radius: var(--sinn-radius-l);
71
+ background-color: var(--sinn-color-surface-sunken);
72
+ }
73
+ /* Not clipped while blocked: a narrow box grows to fit its notice (aspect-ratio's automatic
74
+ minimum size only applies to visible overflow). The poster clips itself to the corners. */
75
+ :where(.sinn-embed[data-state='loaded']) :where(.sinn-embed__frame) { overflow: hidden; }
76
+ :where(.sinn-embed__poster) { position: absolute; inset: 0; overflow: hidden; border-radius: inherit; }
77
+ :where(.sinn-embed__poster) :where(img, picture) { display: block; inline-size: 100%; block-size: 100%; object-fit: cover; opacity: 0.35; }
78
+ :where(.sinn-embed__notice) {
79
+ position: relative;
80
+ display: flex;
81
+ flex-direction: column;
82
+ align-items: flex-start;
83
+ justify-content: center;
84
+ gap: var(--sinn-space-xs);
85
+ padding: var(--sinn-space-l);
86
+ max-inline-size: 40rem;
87
+ }
88
+ :where(.sinn-embed__title) { margin: 0; font-weight: var(--sinn-weight-semibold); }
89
+ :where(.sinn-embed__text) { margin: 0; color: var(--sinn-color-text-muted); font-size: var(--sinn-text-s); line-height: var(--sinn-leading-normal); }
90
+ :where(.sinn-embed__actions) { display: flex; flex-wrap: wrap; gap: var(--sinn-space-xs); margin-block-start: var(--sinn-space-2xs); }
91
+ :where(.sinn-embed__actions[hidden]) { display: none; }
92
+ :where(.sinn-embed__link) { font-size: var(--sinn-text-s); }
93
+ :where(.sinn-embed__iframe) { display: block; inline-size: 100%; block-size: 100%; border: 0; }
94
+ :where(.sinn-embed__iframe:focus-visible) { outline: var(--sinn-focus-width) solid var(--sinn-color-focus); outline-offset: calc(-1 * var(--sinn-focus-width)); }
95
+ /* Strong sections: the embed box keeps page colors. */
96
+ :where([data-surface='strong']) :where(.sinn-embed__frame) {
97
+ --sinn-color-text: var(--sinn-base-text);
98
+ --sinn-color-text-muted: var(--sinn-base-text-muted);
99
+ --sinn-color-focus: var(--sinn-base-focus);
100
+ color: var(--sinn-color-text);
101
+ }
102
+ }
@@ -0,0 +1,28 @@
1
+ /* Same order as tokens.css: whichever stylesheet loads first fixes the layer order. */
2
+ @layer sinn.reset, sinn.tokens, sinn.primitives, sinn.data, sinn.motion, sinn.blocks, sinn.overrides;
3
+
4
+ /* ================= FAQ =================
5
+ * Stacked: header, questions (a readable column), buttons. Split: the header and buttons beside
6
+ * the questions once the section is wide enough (container query, no breakpoints). */
7
+ @layer sinn.blocks {
8
+ :where(.sinn-faq__inner) { display: grid; gap: 0; }
9
+ :where(.sinn-faq__list) { max-inline-size: 52rem; }
10
+ :where(.sinn-faq[data-align='center']) :where(.sinn-faq__list) { margin-inline: auto; inline-size: 100%; }
11
+ :where(.sinn-faq__answer) { --sinn-p-prose-flow: 0.9em; }
12
+ :where(.sinn-faq__intro) :where(.sinn-faq__actions) { display: flex; flex-wrap: wrap; gap: var(--sinn-space-s); }
13
+
14
+ @container sinn-block (min-inline-size: 52rem) {
15
+ :where(.sinn-faq[data-layout='split']) :where(.sinn-faq__inner) {
16
+ grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
17
+ gap: var(--sinn-space-2xl);
18
+ align-items: start;
19
+ }
20
+ :where(.sinn-faq[data-layout='split']) :where(.sinn-faq__intro) { position: sticky; inset-block-start: var(--sinn-space-l); }
21
+ :where(.sinn-faq[data-layout='split']) :where(.sinn-faq__list) { max-inline-size: none; }
22
+ }
23
+ :where(.sinn-faq[data-layout='split']) :where(.sinn-faq__intro) :where(.sinn-block__header) { margin-block-end: var(--sinn-space-l); }
24
+ :where(.sinn-faq[data-layout='split']) :where(.sinn-faq__intro) { margin-block-end: var(--sinn-space-l); }
25
+ @container sinn-block (min-inline-size: 52rem) {
26
+ :where(.sinn-faq[data-layout='split']) :where(.sinn-faq__intro) { margin-block-end: 0; }
27
+ }
28
+ }
@@ -0,0 +1,92 @@
1
+ /* Same order as tokens.css: whichever stylesheet loads first fixes the layer order. */
2
+ @layer sinn.reset, sinn.tokens, sinn.primitives, sinn.data, sinn.motion, sinn.blocks, sinn.overrides;
3
+
4
+ /* ================= LocationHours =================
5
+ * Details (address, contact, hours) beside the map once the section is wide enough. */
6
+ @layer sinn.blocks {
7
+ :where(.sinn-location__inner) { display: grid; gap: var(--sinn-space-xl); }
8
+ @container sinn-block (min-inline-size: 48rem) {
9
+ :where(.sinn-location[data-layout='split']) :where(.sinn-location__inner) {
10
+ grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
11
+ gap: var(--sinn-space-2xl);
12
+ align-items: start;
13
+ }
14
+ }
15
+ :where(.sinn-location__details) {
16
+ display: grid;
17
+ grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
18
+ gap: var(--sinn-space-xl);
19
+ align-content: start;
20
+ }
21
+ :where(.sinn-location[data-layout='split']) :where(.sinn-location__details) { grid-template-columns: minmax(0, 1fr); }
22
+ :where(.sinn-location__group) { display: grid; gap: var(--sinn-space-s); align-content: start; min-inline-size: 0; }
23
+ :where(.sinn-location__label) { margin: 0; }
24
+
25
+ :where(.sinn-location__address) { display: grid; font-style: normal; line-height: var(--sinn-leading-normal); }
26
+ :where(.sinn-location__name) { font-weight: var(--sinn-weight-semibold); }
27
+ :where(.sinn-location__contact) { display: grid; gap: var(--sinn-space-2xs); margin: 0; }
28
+ :where(.sinn-location__contact) > :where(div) { display: flex; flex-wrap: wrap; gap: 0 var(--sinn-space-xs); }
29
+ :where(.sinn-location__contact) :where(dt) { color: var(--sinn-color-text-muted); }
30
+ :where(.sinn-location__contact) :where(dt)::after { content: ':'; }
31
+ :where(.sinn-location__contact) :where(dd) { margin: 0; overflow-wrap: anywhere; }
32
+ :where(.sinn-location__links) { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sinn-space-xs) var(--sinn-space-m); }
33
+
34
+ /* Hours: a two-column list, times aligned with tabular figures. */
35
+ :where(.sinn-hours) {
36
+ display: grid;
37
+ grid-template-columns: auto minmax(min-content, 1fr);
38
+ gap: var(--sinn-space-2xs) var(--sinn-space-l);
39
+ margin: 0;
40
+ font-variant-numeric: tabular-nums;
41
+ }
42
+ :where(.sinn-hours__row) { display: contents; }
43
+ :where(.sinn-hours__row) > :where(dt, dd) { margin: 0; padding-block: var(--sinn-space-3xs); }
44
+ :where(.sinn-hours__row) > :where(dt) { display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--sinn-space-xs); }
45
+ :where(.sinn-hours__row) > :where(dd[data-closed]) { color: var(--sinn-color-text-muted); }
46
+ :where(.sinn-hours__row[data-today]) > :where(dt, dd) { font-weight: var(--sinn-weight-semibold); }
47
+ :where(.sinn-hours__row[hidden]) { display: none; }
48
+ :where(.sinn-hours__today) {
49
+ padding: 0 0.5em;
50
+ border-radius: var(--sinn-radius-full);
51
+ background-color: var(--sinn-color-accent-soft);
52
+ color: var(--sinn-color-accent-text);
53
+ font-size: var(--sinn-text-xs);
54
+ font-weight: var(--sinn-weight-semibold);
55
+ line-height: 1.6;
56
+ }
57
+ :where(.sinn-hours__today[hidden]) { display: none; }
58
+ :where(.sinn-hours__label) { color: var(--sinn-color-text-muted); font-weight: var(--sinn-weight-regular); }
59
+ :where(.sinn-hours__note) { margin: 0; }
60
+ :where(.sinn-hours__special) { display: grid; gap: var(--sinn-space-xs); margin-block-start: var(--sinn-space-xs); }
61
+ :where(.sinn-hours__special[hidden]) { display: none; }
62
+
63
+ /* "Open now · Closes 5:00 PM": the dot is decorative; the words carry the status. */
64
+ :where(.sinn-hours__status) {
65
+ display: flex;
66
+ flex-wrap: wrap;
67
+ align-items: center;
68
+ gap: 0 var(--sinn-space-xs);
69
+ margin: 0;
70
+ }
71
+ :where(.sinn-hours__status[hidden]) { display: none; }
72
+ :where(.sinn-hours__dot) {
73
+ inline-size: 0.6rem;
74
+ block-size: 0.6rem;
75
+ border-radius: var(--sinn-radius-full);
76
+ background-color: var(--sinn-color-text-muted);
77
+ }
78
+ :where(.sinn-hours__status[data-open='true']) :where(.sinn-hours__dot) { background-color: var(--sinn-color-success); }
79
+ :where(.sinn-hours__status[data-open='true']) :where(.sinn-hours__state) { color: var(--sinn-color-success-text); }
80
+ :where(.sinn-hours__state) { font-weight: var(--sinn-weight-semibold); }
81
+ :where(.sinn-hours__detail) { color: var(--sinn-color-text-muted); }
82
+
83
+ /* On strong sections the status follows the recolored text. */
84
+ :where([data-surface='strong']) :where(.sinn-hours__status[data-open='true']) :where(.sinn-hours__state) { color: inherit; }
85
+ :where([data-surface='strong']) :where(.sinn-hours__status[data-open='true']) :where(.sinn-hours__dot) { background-color: currentColor; }
86
+ :where([data-surface='strong']) :where(.sinn-hours__today) { background-color: color-mix(in oklch, currentColor 18%, transparent); color: inherit; }
87
+
88
+ @media (forced-colors: active) {
89
+ :where(.sinn-hours__dot) { background-color: CanvasText; }
90
+ :where(.sinn-hours__today) { border: 1px solid CanvasText; }
91
+ }
92
+ }
@@ -0,0 +1,13 @@
1
+ /* Same order as tokens.css: whichever stylesheet loads first fixes the layer order. */
2
+ @layer sinn.reset, sinn.tokens, sinn.primitives, sinn.data, sinn.motion, sinn.blocks, sinn.overrides;
3
+
4
+ /* ================= ProseSection =================
5
+ * The header shares the text column's width, so headings and text line up. */
6
+ @layer sinn.blocks {
7
+ :where(.sinn-prose-section[data-measure]) :where(.sinn-block__header) { max-inline-size: var(--sinn-measure-prose); }
8
+ :where(.sinn-prose-section[data-measure][data-align='center']) :where(.sinn-block__footer) {
9
+ max-inline-size: var(--sinn-measure-prose);
10
+ margin-inline: auto;
11
+ }
12
+ :where(.sinn-prose-section) :where(.sinn-block__header) { margin-block-end: var(--sinn-space-l); }
13
+ }
@@ -0,0 +1,123 @@
1
+ /* Same order as tokens.css: whichever stylesheet loads first fixes the layer order. */
2
+ @layer sinn.reset, sinn.tokens, sinn.primitives, sinn.data, sinn.motion, sinn.blocks, sinn.overrides;
3
+
4
+ /* ================= Testimonials and Reviews =================
5
+ * A grid of quotes. Colors only through tokens, so tone surfaces (tinted/strong sections)
6
+ * recolor everything; boxed quotes return to page colors like cards do. */
7
+ @layer sinn.blocks {
8
+ :where(.sinn-quotes) {
9
+ --sinn-p-cols: 3;
10
+ --sinn-p-quote-min: 17rem;
11
+ --sinn-p-quote-gap: var(--sinn-space-m);
12
+ display: grid;
13
+ /* As many columns as fit at --sinn-p-quote-min, never more than --sinn-p-cols. */
14
+ grid-template-columns: repeat(
15
+ auto-fill,
16
+ minmax(max(min(100%, var(--sinn-p-quote-min)), calc((100% - (var(--sinn-p-cols) - 1) * var(--sinn-p-quote-gap)) / var(--sinn-p-cols))), 1fr)
17
+ );
18
+ gap: var(--sinn-p-quote-gap);
19
+ margin: 0;
20
+ padding: 0;
21
+ list-style: none;
22
+ }
23
+ :where(.sinn-quotes[data-columns='1']) { --sinn-p-cols: 1; }
24
+ :where(.sinn-quotes[data-columns='2']) { --sinn-p-cols: 2; }
25
+ :where(.sinn-quotes__item) { display: flex; min-inline-size: 0; }
26
+
27
+ :where(.sinn-quote) {
28
+ display: flex;
29
+ flex: 1;
30
+ flex-direction: column;
31
+ gap: var(--sinn-space-s);
32
+ margin: 0;
33
+ min-inline-size: 0;
34
+ }
35
+ :where([data-variant='card']) :where(.sinn-quote) {
36
+ padding: var(--sinn-space-l);
37
+ border: var(--sinn-border-width-thin) solid var(--sinn-color-border);
38
+ border-radius: var(--sinn-radius-l);
39
+ background-color: var(--sinn-color-surface-raised);
40
+ }
41
+ :where([data-variant='plain']) :where(.sinn-quotes) { --sinn-p-quote-gap: var(--sinn-space-l); row-gap: var(--sinn-space-xl); }
42
+
43
+ :where(.sinn-quote__mark) {
44
+ inline-size: 2rem;
45
+ block-size: 1.5rem;
46
+ color: var(--sinn-color-accent-text);
47
+ flex: none;
48
+ }
49
+ /* Opening quote mark points the right way in right-to-left text. */
50
+ :where(.sinn-quote__mark:dir(rtl)) { transform: scaleX(-1); }
51
+
52
+ :where(.sinn-quote__text) {
53
+ flex: 1;
54
+ margin: 0;
55
+ font-size: var(--sinn-text-l);
56
+ line-height: var(--sinn-leading-normal);
57
+ text-wrap: pretty;
58
+ }
59
+ :where(.sinn-quote__text) > :where(p) { margin: 0; }
60
+ :where(.sinn-quote__text) > :where(p + p) { margin-block-start: 0.75em; }
61
+ :where(.sinn-review) :where(.sinn-quote__text) { font-size: var(--sinn-text-m); }
62
+
63
+ :where(.sinn-quote__person) {
64
+ display: flex;
65
+ align-items: center;
66
+ gap: var(--sinn-space-s);
67
+ margin: 0;
68
+ }
69
+ :where(.sinn-quote__avatar) { flex: none; }
70
+ :where(.sinn-quote__who) { display: flex; flex-direction: column; gap: 0.15em; min-inline-size: 0; }
71
+ :where(.sinn-quote__name) { font-weight: var(--sinn-weight-semibold); line-height: var(--sinn-leading-snug); }
72
+ :where(.sinn-quote__role, .sinn-quote__source) {
73
+ color: var(--sinn-color-text-muted);
74
+ font-size: var(--sinn-text-s);
75
+ line-height: var(--sinn-leading-snug);
76
+ }
77
+ :where(a.sinn-quote__source, .sinn-quote__role a) { color: var(--sinn-color-text-muted); }
78
+
79
+ /* One large quote, centered. */
80
+ :where(.sinn-testimonials[data-layout='single']) :where(.sinn-quotes) { max-inline-size: 48rem; margin-inline: auto; }
81
+ :where(.sinn-testimonials[data-layout='single']) :where(.sinn-quote) { align-items: center; text-align: center; }
82
+ :where(.sinn-testimonials[data-layout='single']) :where(.sinn-quote__text) {
83
+ font-family: var(--sinn-font-heading);
84
+ font-size: var(--sinn-text-2xl);
85
+ line-height: var(--sinn-leading-snug);
86
+ text-wrap: balance;
87
+ }
88
+ :where(.sinn-testimonials[data-layout='single']) :where(.sinn-quote__mark) { inline-size: 3rem; block-size: 2.25rem; }
89
+ :where(.sinn-testimonials[data-layout='single']) :where(.sinn-quote__who) { align-items: flex-start; text-align: start; }
90
+
91
+ /* Review summary: overall rating, platform, links. */
92
+ :where(.sinn-reviews__summary) {
93
+ display: flex;
94
+ flex-wrap: wrap;
95
+ align-items: center;
96
+ gap: var(--sinn-space-s) var(--sinn-space-l);
97
+ margin-block-end: var(--sinn-space-xl);
98
+ }
99
+ :where(.sinn-reviews[data-align='center']) :where(.sinn-reviews__summary) { justify-content: center; }
100
+ :where(.sinn-reviews__overall) { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sinn-space-2xs) var(--sinn-space-xs); }
101
+ :where(.sinn-reviews__source) { margin: 0; color: var(--sinn-color-text-muted); }
102
+ :where(.sinn-reviews__links) { display: flex; flex-wrap: wrap; gap: var(--sinn-space-xs); }
103
+
104
+ :where(.sinn-review__response) {
105
+ padding-inline-start: var(--sinn-space-s);
106
+ border-inline-start: var(--sinn-border-width-thick) solid var(--sinn-color-border);
107
+ color: var(--sinn-color-text-muted);
108
+ font-size: var(--sinn-text-s);
109
+ line-height: var(--sinn-leading-normal);
110
+ }
111
+ :where(.sinn-review__response) > :where(p) { margin: 0; }
112
+ :where(.sinn-review__response-label) { color: var(--sinn-color-text); font-weight: var(--sinn-weight-semibold); }
113
+
114
+
115
+ /* Boxed quotes inside a strong section go back to page colors, like cards. */
116
+ :where([data-surface='strong'][data-variant='card']) :where(.sinn-quote) {
117
+ --sinn-color-text: var(--sinn-base-text);
118
+ --sinn-color-text-muted: var(--sinn-base-text-muted);
119
+ --sinn-color-focus: var(--sinn-base-focus);
120
+ color: var(--sinn-color-text);
121
+ }
122
+ :where([data-surface='strong'][data-variant='plain']) :where(.sinn-quote__mark) { color: currentColor; }
123
+ }
@@ -0,0 +1,14 @@
1
+ /* Same order as tokens.css: whichever stylesheet loads first fixes the layer order. */
2
+ @layer sinn.reset, sinn.tokens, sinn.primitives, sinn.data, sinn.motion, sinn.blocks, sinn.overrides;
3
+
4
+ /* ================= RichText =================
5
+ * Prose inside a strong (colored) section: links and code follow the recolored text, so they
6
+ * keep the section's contrast instead of the page accent. */
7
+ @layer sinn.blocks {
8
+ :where([data-surface='strong']) :where(.sinn-rich-text) { --sinn-color-accent-text: currentColor; }
9
+ /* Outlined rather than tinted: a tint over the band color would cut text contrast. */
10
+ :where([data-surface='strong']) :where(.sinn-rich-text) :where(code, pre) {
11
+ background-color: transparent;
12
+ box-shadow: inset 0 0 0 1px color-mix(in oklch, currentColor 50%, transparent);
13
+ }
14
+ }
@@ -0,0 +1,293 @@
1
+ /**
2
+ * Shared types for @sinnstack/ui/blocks. Kept out of .astro frontmatter so builds stay simple.
3
+ * Every data shape here is plain JSON-able data, so it maps 1:1 to CMS fields (see ./cms).
4
+ */
5
+ import type { ImageMetadata } from 'astro';
6
+ import type { HeadingLevel } from '../primitives/types';
7
+
8
+ export type { HeadingLevel };
9
+ /** @deprecated The same type as `HeadingLevel` (re-exported from @sinnstack/ui/primitives). */
10
+ export type HeadingLevelNumber = HeadingLevel;
11
+
12
+ /** Vertical padding of the section. */
13
+ export type BlockSpacing = 'none' | 's' | 'm' | 'l' | 'xl';
14
+ /**
15
+ * Section background. `subtle` / `sunken` are neutral surfaces; `tinted` (soft) and `strong`
16
+ * (solid) take their color from `tone`. On `strong`, text, links, buttons and focus rings are
17
+ * recolored automatically so they keep AA contrast.
18
+ */
19
+ export type BlockBackground = 'none' | 'subtle' | 'sunken' | 'tinted' | 'strong';
20
+ export type BlockTone = 'accent' | 'neutral';
21
+ export type BlockAlign = 'start' | 'center';
22
+ export type BlockSize = 's' | 'm' | 'l';
23
+
24
+ /** Props every section block accepts (checklist §5: shared block props). */
25
+ export interface BlockProps {
26
+ /** Anchor id for in-page links (`/page#services`). Slugified; also prefixes internal ids. */
27
+ anchor?: string;
28
+ spacing?: BlockSpacing;
29
+ background?: BlockBackground;
30
+ tone?: BlockTone;
31
+ /** Force a color scheme for this section ("dark band" on a light page, or the reverse). */
32
+ scheme?: 'light' | 'dark';
33
+ align?: BlockAlign;
34
+ /** Width of the inner container. */
35
+ containerSize?: 'narrow' | 'default' | 'wide' | 'full';
36
+ /**
37
+ * Show a dashed placeholder when required content is missing, instead of rendering
38
+ * nothing. Defaults to `import.meta.env.DEV`; BlockRenderer turns it on in CMS previews.
39
+ */
40
+ placeholder?: boolean;
41
+ /**
42
+ * Path of this block in its content entry (`blocks.2`), set by BlockRenderer when it is given
43
+ * `fieldPath`. Adds `data-sinn-field` attributes for SinnStackCMS visual editing. Plain prop
44
+ * usage can ignore it.
45
+ */
46
+ fieldPath?: string;
47
+ }
48
+
49
+ export interface ImageSource {
50
+ /** An imported asset (optimized by astro:assets) or a URL / public path. */
51
+ src: ImageMetadata | string;
52
+ /** Required. Use "" only when the image is purely decorative. */
53
+ alt: string;
54
+ /** Required for string sources (reserves the box: no layout shift). */
55
+ width?: number;
56
+ height?: number;
57
+ }
58
+
59
+ /** A call-to-action link rendered as a LinkButton. */
60
+ export interface ActionItem {
61
+ label: string;
62
+ href: string;
63
+ /** Defaults: the first action is `solid`, the rest `outline`. One solid per block. */
64
+ variant?: 'solid' | 'outline' | 'ghost' | 'soft';
65
+ /** Extra text for screen readers when the label is vague ("Learn more" → "about CMS setup"). */
66
+ srLabel?: string;
67
+ newTab?: boolean;
68
+ /** Add a trailing arrow (→) to the button. Decorative; mirrored in right-to-left pages. */
69
+ arrow?: boolean;
70
+ /** Path relative to the block (`actions.0`), set by the CMS mappers. */
71
+ field?: string;
72
+ }
73
+
74
+ export interface FeatureItem {
75
+ title: string;
76
+ description?: string;
77
+ /** Name of an icon in the block's icon set (built-in set, or your `icons` map). CMS-safe. */
78
+ icon?: string;
79
+ /** Trusted inline SVG markup, for icons outside the set. Never pass CMS/user input here. */
80
+ iconSvg?: string;
81
+ /** Makes the whole item a link; the title is the link text. */
82
+ href?: string;
83
+ /** Short label next to the title ("New", "Beta"). */
84
+ badge?: string;
85
+ /** Path relative to the block (`items.3`), set by the CMS mappers. */
86
+ field?: string;
87
+ }
88
+
89
+ export interface CardItem {
90
+ title: string;
91
+ description?: string;
92
+ href?: string;
93
+ image?: ImageSource;
94
+ /** Small label above the title ("Guide", "Case study"). */
95
+ eyebrow?: string;
96
+ /** Muted line under the description (date, read time, author). */
97
+ meta?: string;
98
+ /** Path relative to the block (`items.3`), set by the CMS mappers. */
99
+ field?: string;
100
+ }
101
+
102
+ export interface LogoItem {
103
+ src: ImageMetadata | string;
104
+ /** The organization's name. Required: the logo is often the only text for that org. */
105
+ alt: string;
106
+ /** Required for string sources. Imported assets provide their own size. */
107
+ width?: number;
108
+ height?: number;
109
+ href?: string;
110
+ /** Path relative to the block (`items.3`), set by the CMS mappers. */
111
+ field?: string;
112
+ }
113
+
114
+ /* ---------- Newer blocks: carousel, page header, contact, steps, media + text, CTA pair ---------- */
115
+
116
+ /** One slide of a HeroCarousel. The image is a decorative background (alt is always empty). */
117
+ export interface SlideItem {
118
+ /** Short line above the heading. */
119
+ eyebrow?: string;
120
+ heading: string;
121
+ description?: string;
122
+ /** Usually one action per slide. */
123
+ actions?: ActionItem[];
124
+ image?: ImageSource;
125
+ /** Path relative to the block (`items.3`), set by the CMS mappers. */
126
+ field?: string;
127
+ }
128
+
129
+ /** One step of a Steps block. */
130
+ export interface StepItem {
131
+ title: string;
132
+ description?: string;
133
+ /** Icon name from the block icon set. Without one, the step shows its number. */
134
+ icon?: string;
135
+ /** Path relative to the block (`items.3`), set by the CMS mappers. */
136
+ field?: string;
137
+ }
138
+
139
+ /**
140
+ * One line of contact information. `type` decides the icon and the link:
141
+ * phone → tel: (click-to-call), email → mailto:, fax → plain text (never a link), address →
142
+ * <address>, hours → plain text, link → its href.
143
+ */
144
+ export interface ContactItem {
145
+ type: 'address' | 'phone' | 'fax' | 'email' | 'hours' | 'link';
146
+ /** Small label above the value ("Phone", "After hours"). Defaults by type; "" hides it. */
147
+ label?: string;
148
+ /** The text shown. Multi-line values (addresses, hours) keep their line breaks. */
149
+ value: string;
150
+ /** Overrides the generated link (links only; ignored for fax, address and hours). */
151
+ href?: string;
152
+ /** Icon name from the block icon set. Defaults by type. */
153
+ icon?: string;
154
+ newTab?: boolean;
155
+ /** Path relative to the block (`items.3`), set by the CMS mappers. */
156
+ field?: string;
157
+ }
158
+
159
+ /** One panel of a CTAPair. */
160
+ export interface CtaPanelItem {
161
+ heading: string;
162
+ description?: string;
163
+ actions?: ActionItem[];
164
+ /** Panel color. Defaults: the first panel `accent`, the second `neutral`. */
165
+ tone?: BlockTone;
166
+ /** Path relative to the block (`items.3`), set by the CMS mappers. */
167
+ field?: string;
168
+ }
169
+
170
+ /** One figure in a StatsBand ("24" / "Hours a day"). */
171
+ export interface StatItem {
172
+ /** The figure as it should read: "100%", "24", "15+". Real text, never animated from 0. */
173
+ value: string;
174
+ label: string;
175
+ /** Optional decorative icon: a key of the block's `icons` (default set: blockIcons). */
176
+ icon?: string;
177
+ /** Path relative to the block (`items.3`), set by the CMS mappers. */
178
+ field?: string;
179
+ }
180
+
181
+ /** One colored card in a HighlightCards row. */
182
+ export interface HighlightCardItem {
183
+ heading: string;
184
+ description?: string;
185
+ /** Short bullet points (e.g. opening hours), shown after the description. */
186
+ points?: string[];
187
+ actions?: ActionItem[];
188
+ /**
189
+ * Card color: `accent` or `neutral`, or a tone your theme defines with
190
+ * `[data-surface][data-tone='name'] { --sinn-p-tone-solid: …; --sinn-p-tone-contrast: …; … }`.
191
+ * Defaults: accent, neutral, accent… in order.
192
+ */
193
+ tone?: BlockTone | (string & {});
194
+ /** Path relative to the block (`items.3`), set by the CMS mappers. */
195
+ field?: string;
196
+ }
197
+
198
+ /** A question and its answer (FAQ). */
199
+ export interface FaqItem {
200
+ question: string;
201
+ /** Rich text (a rich-text tree) or plain text. */
202
+ answer: import('./lib/rich-text').RichTextValue;
203
+ /** Stable anchor (`/faq#pricing`). Default: from the question's text. */
204
+ id?: string;
205
+ /** Path relative to the block (`items.3`), set by the CMS mappers. */
206
+ field?: string;
207
+ }
208
+
209
+ /** Where a quote or review was published, linked when there's a public copy. */
210
+ export interface QuoteSource {
211
+ /** "Google", "Clutch", "LinkedIn"… */
212
+ label: string;
213
+ href?: string;
214
+ }
215
+
216
+ /** A testimonial: someone's words about working with you, used with their permission. */
217
+ export interface TestimonialItem {
218
+ quote: string;
219
+ name: string;
220
+ /** Job title ("Owner"). */
221
+ role?: string;
222
+ /** Company or context ("Riverside Bakery"). */
223
+ organization?: string;
224
+ /** Portrait. Decorative (the name is next to it), so its alt is ignored. */
225
+ image?: ImageSource;
226
+ /** Star rating, when the quote came with one. */
227
+ rating?: number;
228
+ source?: QuoteSource;
229
+ /** Path relative to the block (`items.3`), set by the CMS mappers. */
230
+ field?: string;
231
+ }
232
+
233
+ /** A published review, shown as written. */
234
+ export interface ReviewItem {
235
+ text: string;
236
+ author: string;
237
+ /** 1–5 (or up to the block's `max`). */
238
+ rating: number;
239
+ /** ISO date (`2026-10-14`). */
240
+ date?: string;
241
+ source?: QuoteSource;
242
+ /** The business's public reply, if any. */
243
+ response?: string;
244
+ /** Path relative to the block (`items.3`), set by the CMS mappers. */
245
+ field?: string;
246
+ }
247
+
248
+ /** The overall rating on a review platform. */
249
+ export interface ReviewSummary {
250
+ rating: number;
251
+ count: number;
252
+ /** Platform name ("Google"). */
253
+ source?: string;
254
+ /** Where all reviews can be read. */
255
+ href?: string;
256
+ /** Where to leave one. */
257
+ writeHref?: string;
258
+ }
259
+
260
+ /** Day codes, as schema.org and `@sinnstack/ui/seo` use them. */
261
+ export type DayCode = 'Mo' | 'Tu' | 'We' | 'Th' | 'Fr' | 'Sa' | 'Su';
262
+
263
+ /** One row of regular opening hours: these days, open from `opens` to `closes` (24-hour "HH:MM"). */
264
+ export interface HoursRow {
265
+ days: DayCode[];
266
+ opens?: string;
267
+ closes?: string;
268
+ /** Closed on these days (shown as "Closed"). */
269
+ closed?: boolean;
270
+ /** Path relative to the block (`items.3`), set by the CMS mappers. */
271
+ field?: string;
272
+ }
273
+
274
+ /** A one-off change: a holiday closure or different hours on a date. */
275
+ export interface SpecialHours {
276
+ /** ISO date (`2026-12-25`). */
277
+ date: string;
278
+ label?: string;
279
+ opens?: string;
280
+ closes?: string;
281
+ closed?: boolean;
282
+ }
283
+
284
+ export interface PostalAddress {
285
+ street: string;
286
+ /** Suite, unit… */
287
+ street2?: string;
288
+ city: string;
289
+ region: string;
290
+ postalCode: string;
291
+ /** ISO country code. Default `US`. */
292
+ country?: string;
293
+ }