@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,177 @@
1
+ ---
2
+ /**
3
+ * MediaText — an image beside a block of text: eyebrow, heading, intro, a short checklist and
4
+ * actions. The everyday "about us / welcome / how we help" section.
5
+ *
6
+ * - Stacks (image first, or text first with `stackOrder="text"`) in containers under 48rem; side by
7
+ * side above it. `mediaPosition` picks the side; `mediaAspect` the image shape; `mediaWidth`
8
+ * its share of the row (`s` 40% · `m` 50% · `l` 58%).
9
+ * - `points`: short lines shown as a checklist (`marker="dot"` for plain bullets, the same words as
10
+ * BulletList; `pointStyle="bullet"` is the deprecated spelling). Plain
11
+ * text, so CMS content can't inject markup; use the default slot for rich content.
12
+ * - `verticalAlign`: center (default) or start, for long text beside a short image.
13
+ * - A section heading is h2 by default. If the design puts the page's h1 here (as some client
14
+ * home page did), pass `headingLevel={1}`, but prefer a Hero or PageHeader for the h1.
15
+ * - Images are lazy by default (`imagePriority` when it's the first thing on the page).
16
+ * - Placeholder: no heading and no image → dashed placeholder in dev/CMS preview, nothing in builds.
17
+ *
18
+ * @example
19
+ * <MediaText eyebrow="Welcome" heading="Web design and development, centered on your team"
20
+ * description="Our driving force is the people who will use and edit the site."
21
+ * points={['A collaborative process', 'Accessible, static-first builds']}
22
+ * image={{ src: welcome, alt: 'Two women smiling together outdoors' }} />
23
+ */
24
+ import Heading from '../primitives/Heading.astro';
25
+ import Text from '../primitives/Text.astro';
26
+ import Image from '../primitives/Image.astro';
27
+ import type { HTMLAttributes } from 'astro/types';
28
+ import type { ActionItem, BlockProps, HeadingLevelNumber, ImageSource } from './types';
29
+ import BlockShell from './internal/BlockShell.astro';
30
+ import Actions from './internal/Actions.astro';
31
+ import Placeholder from './internal/Placeholder.astro';
32
+ import { blockIcons } from './icons';
33
+ import { blockIds, PLACEHOLDER_DEFAULT } from './internal/util';
34
+ import { sf, joinField } from './internal/fields';
35
+ import { renameProp, renameValue } from '../primitives/lib/deprecate';
36
+
37
+ type Props = Omit<HTMLAttributes<'section'>, 'title'> &
38
+ BlockProps & {
39
+ eyebrow?: string;
40
+ heading?: string;
41
+ description?: string;
42
+ points?: string[];
43
+ /** Marker for `points`: `check` or `dot`, as on BulletList. */
44
+ marker?: 'check' | 'dot';
45
+ /** @deprecated Use `marker` (`bullet` is now `dot`). */
46
+ pointStyle?: 'check' | 'bullet';
47
+ actions?: ActionItem[];
48
+ image?: ImageSource;
49
+ imagePriority?: boolean;
50
+ headingLevel?: HeadingLevelNumber;
51
+ mediaPosition?: 'start' | 'end';
52
+ mediaAspect?: '1/1' | '4/3' | '3/2' | '16/9' | '4/5' | 'auto';
53
+ mediaWidth?: 's' | 'm' | 'l';
54
+ /** What comes first when stacked on narrow screens. */
55
+ stackOrder?: 'media' | 'text';
56
+ verticalAlign?: 'center' | 'start';
57
+ /** Heading scale. */
58
+ size?: 's' | 'm' | 'l';
59
+ };
60
+
61
+ const {
62
+ eyebrow,
63
+ heading,
64
+ description,
65
+ points = [],
66
+ marker: markerProp,
67
+ pointStyle,
68
+ actions = [],
69
+ image,
70
+ imagePriority = false,
71
+ headingLevel = 2,
72
+ mediaPosition = 'start',
73
+ mediaAspect = '4/3',
74
+ mediaWidth = 'm',
75
+ stackOrder = 'media',
76
+ verticalAlign = 'center',
77
+ size = 'm',
78
+ align = 'start',
79
+ anchor,
80
+ spacing = 'l',
81
+ background = 'none',
82
+ tone = 'accent',
83
+ scheme,
84
+ containerSize = 'default',
85
+ placeholder = PLACEHOLDER_DEFAULT,
86
+ fieldPath,
87
+ id,
88
+ class: className,
89
+ ...rest
90
+ } = Astro.props;
91
+ const marker = renameValue('MediaText', 'pointStyle', renameProp('MediaText', 'marker', markerProp, 'pointStyle', pointStyle), { bullet: 'dot' }) ?? 'check';
92
+
93
+ const slots = Astro.slots;
94
+ const hasHeading = Boolean(heading?.trim()) || slots.has('heading');
95
+ const hasMedia = Boolean(image) || slots.has('media');
96
+ const { sectionId, headingId } = blockIds('media-text', anchor, id);
97
+ const headingSize = ({ s: 'xl', m: '2xl', l: '3xl' } as const)[size];
98
+ const cleanPoints = (points ?? []).map((p) => String(p ?? '').trim()).filter(Boolean);
99
+ const share = { s: 40, m: 50, l: 58 }[mediaWidth];
100
+ ---
101
+
102
+ {
103
+ !hasHeading && !hasMedia ? (
104
+ placeholder && <Placeholder label="Image and text" hint="Add a heading and an image." field={joinField(fieldPath)} />
105
+ ) : (
106
+ <BlockShell
107
+ name="media-text"
108
+ id={sectionId}
109
+ class={className}
110
+ spacing={spacing}
111
+ background={background}
112
+ tone={tone}
113
+ scheme={scheme}
114
+ size={size}
115
+ containerSize={containerSize}
116
+ labelledby={hasHeading ? headingId : undefined}
117
+ align={align}
118
+ data-media-position={mediaPosition === 'end' ? 'end' : undefined}
119
+ data-media-width={mediaWidth === 'm' ? undefined : mediaWidth}
120
+ data-stack={stackOrder === 'text' ? 'text' : undefined}
121
+ data-valign={verticalAlign === 'start' ? 'start' : undefined}
122
+ data-has-media={hasMedia ? '' : undefined}
123
+ {...sf(fieldPath)}
124
+ {...rest}
125
+ >
126
+ <div class="sinn-media-text__layout">
127
+ {hasMedia && (
128
+ <div class="sinn-media-text__media" data-aspect={mediaAspect === 'auto' ? 'auto' : undefined} {...sf(fieldPath, 'image')}>
129
+ {slots.has('media') ? (
130
+ <slot name="media" />
131
+ ) : (
132
+ image && (
133
+ <Image
134
+ src={image.src}
135
+ alt={image.alt}
136
+ width={image.width}
137
+ height={image.height}
138
+ layout="full"
139
+ aspect={mediaAspect === 'auto' ? undefined : mediaAspect}
140
+ priority={imagePriority}
141
+ sizes={`(min-width: 64rem) ${share}vw, 100vw`}
142
+ />
143
+ )
144
+ )}
145
+ </div>
146
+ )}
147
+ <div class="sinn-media-text__content">
148
+ {eyebrow && <p class="sinn-block__eyebrow" {...sf(fieldPath, 'eyebrow')}>{eyebrow}</p>}
149
+ {hasHeading && (
150
+ <Heading level={headingLevel} size={headingSize} weight="bold" id={headingId} class="sinn-media-text__title" {...sf(fieldPath, 'heading')}>
151
+ {slots.has('heading') ? <slot name="heading" /> : heading}
152
+ </Heading>
153
+ )}
154
+ {(description || slots.has('description')) && (
155
+ <Text size="l" tone="muted" class="sinn-media-text__description" {...sf(fieldPath, 'description')}>
156
+ {slots.has('description') ? <slot name="description" /> : description}
157
+ </Text>
158
+ )}
159
+ {cleanPoints.length > 0 && (
160
+ <ul class="sinn-media-text__points" role="list" data-marker={marker} {...sf(fieldPath, 'points')}>
161
+ {cleanPoints.map((point) => (
162
+ <li>
163
+ {marker === 'check' && <span class="sinn-media-text__check" set:html={blockIcons.check} />}
164
+ <span>{point}</span>
165
+ </li>
166
+ ))}
167
+ </ul>
168
+ )}
169
+ <slot />
170
+ <Actions actions={actions} size="m" class="sinn-media-text__actions" fieldPath={fieldPath}>
171
+ {slots.has('actions') && <slot name="actions" />}
172
+ </Actions>
173
+ </div>
174
+ </div>
175
+ </BlockShell>
176
+ )
177
+ }
@@ -0,0 +1,126 @@
1
+ ---
2
+ /**
3
+ * PageHeader — the top band of an inner page: breadcrumbs, the page title (the page's h1) and
4
+ * an optional eyebrow, intro and actions.
5
+ *
6
+ * - Use it instead of a Hero on inner pages (services, programs, contact). It's the page's h1
7
+ * by default; BlockRenderer gives the h1 to the first Hero or PageHeader on the page.
8
+ * - `breadcrumbs`: the trail from Home to this page. The last item is the current page; when it's
9
+ * omitted, the heading is added as the last crumb automatically (`currentInTrail={false}` to skip).
10
+ * Add matching structured data with `breadcrumbList()` from `@sinnstack/ui/seo/jsonld`.
11
+ * - `breadcrumbPosition`: above the title (default) or below it (some client designs put it there).
12
+ * - Background defaults to `subtle`; `strong` makes a colored band (text, links and the focus ring
13
+ * recolor to keep contrast).
14
+ * - Placeholder: with no heading, a dashed placeholder in dev/CMS preview, nothing in builds.
15
+ *
16
+ * @example
17
+ * <PageHeader heading="Astro migration"
18
+ * breadcrumbs={[{ label: 'Home', href: '/' }, { label: 'Programs', href: '/programs' }]} />
19
+ */
20
+ import Heading from '../primitives/Heading.astro';
21
+ import Text from '../primitives/Text.astro';
22
+ import Breadcrumbs from '../primitives/Breadcrumbs.astro';
23
+ import type { BreadcrumbItem } from '../primitives/types';
24
+ import type { HTMLAttributes } from 'astro/types';
25
+ import type { ActionItem, BlockProps } from './types';
26
+ import BlockShell from './internal/BlockShell.astro';
27
+ import Actions from './internal/Actions.astro';
28
+ import Placeholder from './internal/Placeholder.astro';
29
+ import { blockIds, PLACEHOLDER_DEFAULT } from './internal/util';
30
+ import { sf, joinField } from './internal/fields';
31
+
32
+ type Props = Omit<HTMLAttributes<'section'>, 'title'> &
33
+ BlockProps & {
34
+ eyebrow?: string;
35
+ heading?: string;
36
+ description?: string;
37
+ actions?: ActionItem[];
38
+ breadcrumbs?: BreadcrumbItem[];
39
+ /** Add the heading as the last (current) crumb when the trail doesn't end with it. */
40
+ currentInTrail?: boolean;
41
+ breadcrumbPosition?: 'above' | 'below';
42
+ breadcrumbLabel?: string;
43
+ /** 1 unless the page already has an h1. */
44
+ headingLevel?: 1 | 2;
45
+ /** Title scale: s 2xl · m 3xl · l 4xl. */
46
+ size?: 's' | 'm' | 'l';
47
+ };
48
+
49
+ const {
50
+ eyebrow,
51
+ heading,
52
+ description,
53
+ actions = [],
54
+ breadcrumbs = [],
55
+ currentInTrail = true,
56
+ breadcrumbPosition = 'above',
57
+ breadcrumbLabel = 'Breadcrumb',
58
+ headingLevel = 1,
59
+ size = 'm',
60
+ align = 'start',
61
+ anchor,
62
+ spacing = 'm',
63
+ background = 'subtle',
64
+ tone = 'accent',
65
+ scheme,
66
+ containerSize = 'default',
67
+ placeholder = PLACEHOLDER_DEFAULT,
68
+ fieldPath,
69
+ id,
70
+ class: className,
71
+ ...rest
72
+ } = Astro.props;
73
+
74
+ const slots = Astro.slots;
75
+ const title = heading?.trim();
76
+ const hasHeading = Boolean(title) || slots.has('heading');
77
+ const { sectionId, headingId } = blockIds('page-header', anchor, id);
78
+ const headingSize = ({ s: '2xl', m: '3xl', l: '4xl' } as const)[size];
79
+
80
+ const trail = (breadcrumbs ?? []).filter((c) => c && String(c.label ?? '').trim());
81
+ const lastLabel = trail.at(-1)?.label?.trim().toLowerCase();
82
+ const crumbs = currentInTrail && title && trail.length > 0 && lastLabel !== title.toLowerCase() ? [...trail, { label: title }] : trail;
83
+ const crumbsEl = crumbs.length > 1 ? 'nav' : null;
84
+ ---
85
+
86
+ {
87
+ !hasHeading ? (
88
+ placeholder && <Placeholder label="Page header" hint="Add the page title." field={joinField(fieldPath)} />
89
+ ) : (
90
+ <BlockShell
91
+ name="page-header"
92
+ id={sectionId}
93
+ class={className}
94
+ spacing={spacing}
95
+ background={background}
96
+ tone={tone}
97
+ scheme={scheme}
98
+ size={size}
99
+ containerSize={containerSize}
100
+ labelledby={headingId}
101
+ align={align}
102
+ data-crumbs={crumbsEl && breadcrumbPosition === 'below' ? 'below' : undefined}
103
+ {...sf(fieldPath)}
104
+ {...rest}
105
+ >
106
+ <div class="sinn-page-header__inner">
107
+ {crumbsEl && <Breadcrumbs items={crumbs} label={breadcrumbLabel} class="sinn-page-header__crumbs" {...sf(fieldPath, 'breadcrumbs')} />}
108
+ <div class="sinn-page-header__text">
109
+ {eyebrow && <p class="sinn-block__eyebrow" {...sf(fieldPath, 'eyebrow')}>{eyebrow}</p>}
110
+ <Heading level={headingLevel} size={headingSize} weight="bold" id={headingId} class="sinn-page-header__title" {...sf(fieldPath, 'heading')}>
111
+ {slots.has('heading') ? <slot name="heading" /> : title}
112
+ </Heading>
113
+ {(description || slots.has('description')) && (
114
+ <Text size="l" tone="muted" class="sinn-page-header__description" measure {...sf(fieldPath, 'description')}>
115
+ {slots.has('description') ? <slot name="description" /> : description}
116
+ </Text>
117
+ )}
118
+ <slot />
119
+ </div>
120
+ <Actions actions={actions} size="m" class="sinn-page-header__actions" fieldPath={fieldPath}>
121
+ {slots.has('actions') && <slot name="actions" />}
122
+ </Actions>
123
+ </div>
124
+ </BlockShell>
125
+ )
126
+ }
@@ -0,0 +1,98 @@
1
+ ---
2
+ /**
3
+ * ProseSection: a section of long-form text from the CMS (an "about" story, a policy, service
4
+ * details, a short article), with an optional eyebrow, heading and buttons.
5
+ *
6
+ * - The body is CMS rich text (or plain text), rendered by RichText: only safe elements and
7
+ * URLs, headings shifted to sit under the section heading, images without layout shift.
8
+ * - `measure` (default on) keeps lines at a readable ~65 characters; `align="center"` centers
9
+ * the column and the header.
10
+ * - Placeholder: no heading and no body → dashed placeholder in dev/CMS preview.
11
+ *
12
+ * @example
13
+ * <ProseSection heading="How we work" body={page.body} actions={[{ label: 'Start a project', href: '/contact' }]} />
14
+ */
15
+ import type { HTMLAttributes } from 'astro/types';
16
+ import type { ActionItem, BlockProps, HeadingLevel } from './types';
17
+ import type { ImageResolver } from './cms/types';
18
+ import BlockShell from './internal/BlockShell.astro';
19
+ import BlockHeader from './internal/BlockHeader.astro';
20
+ import Actions from './internal/Actions.astro';
21
+ import Placeholder from './internal/Placeholder.astro';
22
+ import RichText from './RichText.astro';
23
+ import { isRichTextEmpty, type RichTextValue } from './lib/rich-text';
24
+ import { blockIds, PLACEHOLDER_DEFAULT } from './internal/util';
25
+ import { sf, joinField } from './internal/fields';
26
+ import './styles/blocks.css';
27
+ import './styles/prose-section.css';
28
+
29
+ type Props = Omit<HTMLAttributes<'section'>, 'title'> &
30
+ BlockProps & {
31
+ eyebrow?: string;
32
+ heading?: string;
33
+ headingLevel?: HeadingLevel;
34
+ /** Rich text (a rich-text tree) or plain text. */
35
+ body?: RichTextValue;
36
+ actions?: ActionItem[];
37
+ /** Readable line length (~65ch). Default on. */
38
+ measure?: boolean;
39
+ size?: 's' | 'm' | 'l';
40
+ resolveImage?: ImageResolver;
41
+ };
42
+
43
+ const {
44
+ eyebrow,
45
+ heading,
46
+ headingLevel = 2,
47
+ body,
48
+ actions = [],
49
+ measure = true,
50
+ size = 'm',
51
+ resolveImage,
52
+ align = 'start',
53
+ anchor,
54
+ spacing = 'l',
55
+ background = 'none',
56
+ tone = 'accent',
57
+ scheme,
58
+ containerSize = 'default',
59
+ placeholder = PLACEHOLDER_DEFAULT,
60
+ fieldPath,
61
+ id,
62
+ class: className,
63
+ ...rest
64
+ } = Astro.props;
65
+
66
+ const hasBody = !isRichTextEmpty(body);
67
+ const hasHeading = Boolean(heading?.trim());
68
+ const { sectionId, headingId } = blockIds('prose', anchor, id);
69
+ const bodyTop = (hasHeading ? Math.min(6, headingLevel + 1) : Math.max(2, headingLevel)) as 2 | 3 | 4 | 5 | 6;
70
+ ---
71
+
72
+ {
73
+ !hasBody && !hasHeading ? (
74
+ placeholder && <Placeholder label="Text section" hint="Add a heading or some text." field={joinField(fieldPath, 'body')} />
75
+ ) : (
76
+ <BlockShell
77
+ name="prose-section"
78
+ id={sectionId}
79
+ class={className}
80
+ spacing={spacing}
81
+ background={background}
82
+ tone={tone}
83
+ scheme={scheme}
84
+ containerSize={containerSize}
85
+ labelledby={hasHeading ? headingId : undefined}
86
+ align={align}
87
+ data-measure={measure ? '' : undefined}
88
+ {...sf(fieldPath)}
89
+ {...rest}
90
+ >
91
+ <BlockHeader eyebrow={eyebrow} heading={heading} headingId={headingId} headingLevel={headingLevel} fieldPath={fieldPath} />
92
+ {hasBody && (
93
+ <RichText value={body} headingLevel={bodyTop} size={size} measure={measure} align={align} resolveImage={resolveImage} class="sinn-prose-section__body" {...sf(fieldPath, 'body')} />
94
+ )}
95
+ <Actions actions={actions} class="sinn-block__footer" fieldPath={fieldPath} />
96
+ </BlockShell>
97
+ )
98
+ }
@@ -0,0 +1,194 @@
1
+ ---
2
+ /**
3
+ * Reviews: published reviews with their star ratings, authors, dates and sources, under an
4
+ * optional overall rating ("4.9 · 128 reviews on Google · Read all reviews").
5
+ *
6
+ * - Show reviews as written, with the platform and date, and don't hide the unflattering ones:
7
+ * edited, invented or cherry-picked reviews mislead visitors and break consumer-protection
8
+ * rules (e.g. the FTC's rule on fake reviews and testimonials). Link the source when you can.
9
+ * - Each rating is a Rating (a named star graphic, "Rated 4 out of 5"); the overall rating also
10
+ * shows the number and count as text, and links to the full list on the platform.
11
+ * - Dates are `<time datetime>` elements, formatted for `locale` when the page is built.
12
+ * - A business's own reviews of itself don't earn review stars in Google results, so this
13
+ * block ships no review structured data on purpose.
14
+ * - Placeholder: no review with text, an author and a rating, and no summary → dashed
15
+ * placeholder in dev/CMS preview.
16
+ *
17
+ * @example
18
+ * <Reviews heading="Reviews" summary={{ rating: 4.9, count: 128, source: 'Google', href: 'https://g.page/r/…' }}
19
+ * items={[{ text: 'Fast, clear and on budget.', author: 'Sam K.', rating: 5, date: '2026-10-02', source: { label: 'Google' } }]} />
20
+ */
21
+ import Rating from '../primitives/Rating.astro';
22
+ import LinkButton from '../primitives/LinkButton.astro';
23
+ import VisuallyHidden from '../primitives/VisuallyHidden.astro';
24
+ import type { HTMLAttributes } from 'astro/types';
25
+ import type { BlockProps, HeadingLevel, ReviewItem, ReviewSummary } from './types';
26
+ import BlockShell from './internal/BlockShell.astro';
27
+ import BlockHeader from './internal/BlockHeader.astro';
28
+ import Placeholder from './internal/Placeholder.astro';
29
+ import { safeHref } from './lib/contact';
30
+ import { formatReviewDate, validReviews } from './internal/reviews';
31
+ import { blockIds, PLACEHOLDER_DEFAULT } from './internal/util';
32
+ import { sf, joinField } from './internal/fields';
33
+ import './styles/blocks.css';
34
+ import './styles/quotes.css';
35
+
36
+ type Props = Omit<HTMLAttributes<'section'>, 'title'> &
37
+ BlockProps & {
38
+ eyebrow?: string;
39
+ heading?: string;
40
+ description?: string;
41
+ headingLevel?: HeadingLevel;
42
+ items?: ReviewItem[];
43
+ summary?: ReviewSummary;
44
+ /** Top of the rating scale. */
45
+ max?: number;
46
+ /** `card` (default) or `plain`. */
47
+ variant?: 'card' | 'plain';
48
+ columns?: 1 | 2 | 3;
49
+ /** Date formatting. */
50
+ locale?: string;
51
+ /** UI text; `{source}`, `{count}` and `{author}` are replaced. Translate per site. */
52
+ labels?: {
53
+ readAll?: string;
54
+ write?: string;
55
+ onSource?: string;
56
+ response?: string;
57
+ readOn?: string;
58
+ };
59
+ };
60
+
61
+ const {
62
+ eyebrow,
63
+ heading,
64
+ description,
65
+ headingLevel = 2,
66
+ items = [],
67
+ summary,
68
+ max = 5,
69
+ variant = 'card',
70
+ columns = 3,
71
+ locale = 'en-US',
72
+ labels = {},
73
+ align = 'start',
74
+ anchor,
75
+ spacing = 'l',
76
+ background = 'none',
77
+ tone = 'accent',
78
+ scheme,
79
+ containerSize = 'default',
80
+ placeholder = PLACEHOLDER_DEFAULT,
81
+ fieldPath,
82
+ id,
83
+ class: className,
84
+ ...rest
85
+ } = Astro.props;
86
+
87
+ const text = {
88
+ readAll: labels.readAll ?? 'Read all reviews',
89
+ write: labels.write ?? 'Leave a review',
90
+ onSource: labels.onSource ?? 'on {source}',
91
+ response: labels.response ?? 'Response from the owner',
92
+ readOn: labels.readOn ?? 'Read on {source}',
93
+ };
94
+ const fill = (s: string, vars: Record<string, string | number>) => s.replace(/\{(\w+)\}/g, (m, k) => (k in vars ? String(vars[k]) : m));
95
+
96
+ const reviews = validReviews(items, max);
97
+ const hasSummary = Boolean(summary && summary.rating > 0 && summary.count > 0);
98
+ const summaryHref = summary?.href ? safeHref(summary.href) : undefined;
99
+ const writeHref = summary?.writeHref ? safeHref(summary.writeHref) : undefined;
100
+ const { sectionId, headingId } = blockIds('reviews', anchor, id);
101
+ const hasHeading = Boolean(heading?.trim());
102
+ const external = (h?: string) => (h && /^https?:/i.test(h) ? 'noopener' : undefined);
103
+ ---
104
+
105
+ {
106
+ reviews.length === 0 && !hasSummary ? (
107
+ placeholder && <Placeholder label="Reviews" hint="Add a review with text, an author and a rating, or an overall rating." field={joinField(fieldPath, 'items')} />
108
+ ) : (
109
+ <BlockShell
110
+ name="reviews"
111
+ id={sectionId}
112
+ class={className}
113
+ spacing={spacing}
114
+ background={background}
115
+ tone={tone}
116
+ scheme={scheme}
117
+ containerSize={containerSize}
118
+ labelledby={hasHeading ? headingId : undefined}
119
+ align={align}
120
+ data-variant={variant}
121
+ {...sf(fieldPath)}
122
+ {...rest}
123
+ >
124
+ <BlockHeader eyebrow={eyebrow} heading={heading} headingId={headingId} headingLevel={headingLevel} description={description} fieldPath={fieldPath} />
125
+ {hasSummary && summary && (
126
+ <div class="sinn-reviews__summary" {...sf(fieldPath, 'summary')}>
127
+ <div class="sinn-reviews__overall">
128
+ <Rating value={summary.rating} max={max} count={summary.count} size="l" class="sinn-reviews__rating" />
129
+ {summary.source && <p class="sinn-reviews__source">{fill(text.onSource, { source: summary.source })}</p>}
130
+ </div>
131
+ {(summaryHref || writeHref) && (
132
+ <div class="sinn-reviews__links">
133
+ {summaryHref && (
134
+ <LinkButton href={summaryHref} variant="outline" size="m" rel={external(summaryHref)}>
135
+ {fill(text.readAll, { count: summary.count, source: summary.source ?? '' })}
136
+ {summary.source && !text.readAll.includes('{source}') && <VisuallyHidden>{` ${fill(text.onSource, { source: summary.source })}`}</VisuallyHidden>}
137
+ </LinkButton>
138
+ )}
139
+ {writeHref && (
140
+ <LinkButton href={writeHref} variant="ghost" size="m" rel={external(writeHref)}>
141
+ {text.write}
142
+ {summary.source && !text.write.includes('{source}') && <VisuallyHidden>{` ${fill(text.onSource, { source: summary.source })}`}</VisuallyHidden>}
143
+ </LinkButton>
144
+ )}
145
+ </div>
146
+ )}
147
+ </div>
148
+ )}
149
+ {reviews.length > 0 && (
150
+ <ul class="sinn-quotes" role="list" data-columns={columns} {...sf(fieldPath, 'items')}>
151
+ {reviews.map((r, i) => {
152
+ const href = r.source?.href ? safeHref(r.source.href) : undefined;
153
+ const date = formatReviewDate(r.date, locale);
154
+ return (
155
+ <li class="sinn-quotes__item" {...sf(fieldPath, r.field)}>
156
+ <article class="sinn-quote sinn-review">
157
+ <Rating value={r.rating} max={max} size="s" showValue={false} class="sinn-quote__rating" />
158
+ <blockquote class="sinn-quote__text" {...sf(fieldPath, r.field, 'text')}>
159
+ {r.text.trim().split(/\n\s*\n/).map((p) => <p>{p.trim()}</p>)}
160
+ </blockquote>
161
+ <p class="sinn-quote__person">
162
+ <span class="sinn-quote__who">
163
+ <span class="sinn-quote__name" {...sf(fieldPath, r.field, 'author')}>{r.author}</span>
164
+ {(date || r.source?.label) && (
165
+ <span class="sinn-quote__role">
166
+ {date && <time datetime={date.iso}>{date.text}</time>}
167
+ {date && r.source?.label && <span aria-hidden="true"> · </span>}
168
+ {r.source?.label && (href ? (
169
+ <a class="sinn-link" href={href} rel={external(href)}>
170
+ {fill(text.readOn, { source: r.source.label })}
171
+ <VisuallyHidden>{` (${r.author})`}</VisuallyHidden>
172
+ </a>
173
+ ) : (
174
+ <span>{r.source.label}</span>
175
+ ))}
176
+ </span>
177
+ )}
178
+ </span>
179
+ </p>
180
+ {r.response?.trim() && (
181
+ <div class="sinn-review__response">
182
+ <p class="sinn-review__response-label">{text.response}</p>
183
+ <p>{r.response.trim()}</p>
184
+ </div>
185
+ )}
186
+ </article>
187
+ </li>
188
+ );
189
+ })}
190
+ </ul>
191
+ )}
192
+ </BlockShell>
193
+ )
194
+ }
@@ -0,0 +1,58 @@
1
+ ---
2
+ /**
3
+ * RichText: renders CMS rich text (Markdown, or a rich-text tree) safely, styled
4
+ * by the Prose primitive.
5
+ *
6
+ * - **Safe by construction.** Only known elements render: paragraphs, headings, lists, links,
7
+ * quotes, code, images, rules, tables, bold/italic/strikethrough/code text. Raw HTML, MDX
8
+ * templates and unknown nodes are dropped (with a dev warning). Text is always escaped, and
9
+ * links keep only http(s), mailto, tel, sms and relative URLs.
10
+ * - **Headings fit the page outline.** The content's top heading renders at `headingLevel`
11
+ * (default 2), whatever level the editor picked, and levels below it keep their spacing, so
12
+ * an editor's "H1" never competes with the page title.
13
+ * - **No layout shift from images.** Pass `resolveImage` (BlockRenderer passes its own) so CMS
14
+ * images become optimized assets with known sizes.
15
+ * - Wide tables and code blocks scroll inside a focusable region, never the page.
16
+ * - Markdown: the subset in lib/markdown.ts. Blank lines separate paragraphs, single newlines
17
+ * become line breaks, and raw HTML shows as text.
18
+ *
19
+ * @example
20
+ * <RichText value={page.body} headingLevel={2} measure />
21
+ */
22
+ import Prose from '../primitives/Prose.astro';
23
+ import RichTextNode from './internal/RichTextNode.astro';
24
+ import { isRichTextEmpty, toRichTextRoot, topHeadingLevel, type RichTextValue } from './lib/rich-text';
25
+ import type { ImageResolver } from './cms/types';
26
+ import './styles/rich-text.css';
27
+
28
+ type Props = {
29
+ value: RichTextValue;
30
+ /** Level the content's top heading renders at (2–6). */
31
+ headingLevel?: 2 | 3 | 4 | 5 | 6;
32
+ size?: 's' | 'm' | 'l';
33
+ /** Cap line length at ~65 characters. */
34
+ measure?: boolean;
35
+ align?: 'start' | 'center';
36
+ /** Resolves CMS image paths to imported assets (see createImageResolver). */
37
+ resolveImage?: ImageResolver;
38
+ /** Accessible name of the scrollable table region. Translate per site. */
39
+ labels?: { table?: string };
40
+ as?: 'div' | 'article' | 'section';
41
+ class?: string;
42
+ [key: `data-${string}`]: string | undefined;
43
+ };
44
+
45
+ const { value, headingLevel = 2, size = 'm', measure = false, align = 'start', resolveImage, labels = {}, as = 'div', class: className, ...rest } = Astro.props;
46
+ const root = toRichTextRoot(value);
47
+ const empty = isRichTextEmpty(root);
48
+ const contentTop = topHeadingLevel(root);
49
+ const names = { table: labels.table ?? 'Table' };
50
+ ---
51
+
52
+ {
53
+ !empty && (
54
+ <Prose as={as} size={size} measure={measure} align={align} class:list={['sinn-rich-text', className]} {...rest}>
55
+ {root.children.map((node) => <RichTextNode node={node} contentTop={contentTop} topLevel={headingLevel} resolveImage={resolveImage} labels={names} />)}
56
+ </Prose>
57
+ )
58
+ }