@cogenta/theme-association 0.3.2

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 (117) hide show
  1. package/LICENSE +373 -0
  2. package/dist/src/index.d.ts +21 -0
  3. package/dist/src/index.d.ts.map +1 -0
  4. package/dist/src/index.js +21 -0
  5. package/dist/src/index.js.map +1 -0
  6. package/dist/src/render/blocks/accordion.d.ts +4 -0
  7. package/dist/src/render/blocks/accordion.d.ts.map +1 -0
  8. package/dist/src/render/blocks/accordion.js +16 -0
  9. package/dist/src/render/blocks/accordion.js.map +1 -0
  10. package/dist/src/render/blocks/collection-list.d.ts +12 -0
  11. package/dist/src/render/blocks/collection-list.d.ts.map +1 -0
  12. package/dist/src/render/blocks/collection-list.js +64 -0
  13. package/dist/src/render/blocks/collection-list.js.map +1 -0
  14. package/dist/src/render/blocks/cta.d.ts +9 -0
  15. package/dist/src/render/blocks/cta.d.ts.map +1 -0
  16. package/dist/src/render/blocks/cta.js +16 -0
  17. package/dist/src/render/blocks/cta.js.map +1 -0
  18. package/dist/src/render/blocks/embed.d.ts +4 -0
  19. package/dist/src/render/blocks/embed.d.ts.map +1 -0
  20. package/dist/src/render/blocks/embed.js +76 -0
  21. package/dist/src/render/blocks/embed.js.map +1 -0
  22. package/dist/src/render/blocks/faq.d.ts +4 -0
  23. package/dist/src/render/blocks/faq.d.ts.map +1 -0
  24. package/dist/src/render/blocks/faq.js +21 -0
  25. package/dist/src/render/blocks/faq.js.map +1 -0
  26. package/dist/src/render/blocks/feature-grid.d.ts +4 -0
  27. package/dist/src/render/blocks/feature-grid.d.ts.map +1 -0
  28. package/dist/src/render/blocks/feature-grid.js +27 -0
  29. package/dist/src/render/blocks/feature-grid.js.map +1 -0
  30. package/dist/src/render/blocks/gallery.d.ts +14 -0
  31. package/dist/src/render/blocks/gallery.d.ts.map +1 -0
  32. package/dist/src/render/blocks/gallery.js +27 -0
  33. package/dist/src/render/blocks/gallery.js.map +1 -0
  34. package/dist/src/render/blocks/hero.d.ts +15 -0
  35. package/dist/src/render/blocks/hero.d.ts.map +1 -0
  36. package/dist/src/render/blocks/hero.js +31 -0
  37. package/dist/src/render/blocks/hero.js.map +1 -0
  38. package/dist/src/render/blocks/logo-strip.d.ts +4 -0
  39. package/dist/src/render/blocks/logo-strip.d.ts.map +1 -0
  40. package/dist/src/render/blocks/logo-strip.js +16 -0
  41. package/dist/src/render/blocks/logo-strip.js.map +1 -0
  42. package/dist/src/render/blocks/logos.d.ts +4 -0
  43. package/dist/src/render/blocks/logos.d.ts.map +1 -0
  44. package/dist/src/render/blocks/logos.js +22 -0
  45. package/dist/src/render/blocks/logos.js.map +1 -0
  46. package/dist/src/render/blocks/media-figure.d.ts +12 -0
  47. package/dist/src/render/blocks/media-figure.d.ts.map +1 -0
  48. package/dist/src/render/blocks/media-figure.js +27 -0
  49. package/dist/src/render/blocks/media-figure.js.map +1 -0
  50. package/dist/src/render/blocks/pricing-table.d.ts +4 -0
  51. package/dist/src/render/blocks/pricing-table.d.ts.map +1 -0
  52. package/dist/src/render/blocks/pricing-table.js +29 -0
  53. package/dist/src/render/blocks/pricing-table.js.map +1 -0
  54. package/dist/src/render/blocks/prose.d.ts +9 -0
  55. package/dist/src/render/blocks/prose.d.ts.map +1 -0
  56. package/dist/src/render/blocks/prose.js +10 -0
  57. package/dist/src/render/blocks/prose.js.map +1 -0
  58. package/dist/src/render/blocks/quote.d.ts +13 -0
  59. package/dist/src/render/blocks/quote.d.ts.map +1 -0
  60. package/dist/src/render/blocks/quote.js +26 -0
  61. package/dist/src/render/blocks/quote.js.map +1 -0
  62. package/dist/src/render/blocks/stat-counter.d.ts +4 -0
  63. package/dist/src/render/blocks/stat-counter.d.ts.map +1 -0
  64. package/dist/src/render/blocks/stat-counter.js +14 -0
  65. package/dist/src/render/blocks/stat-counter.js.map +1 -0
  66. package/dist/src/render/blocks/stats.d.ts +4 -0
  67. package/dist/src/render/blocks/stats.d.ts.map +1 -0
  68. package/dist/src/render/blocks/stats.js +18 -0
  69. package/dist/src/render/blocks/stats.js.map +1 -0
  70. package/dist/src/render/blocks/testimonial.d.ts +11 -0
  71. package/dist/src/render/blocks/testimonial.d.ts.map +1 -0
  72. package/dist/src/render/blocks/testimonial.js +20 -0
  73. package/dist/src/render/blocks/testimonial.js.map +1 -0
  74. package/dist/src/render/chrome.d.ts +3 -0
  75. package/dist/src/render/chrome.d.ts.map +1 -0
  76. package/dist/src/render/chrome.js +106 -0
  77. package/dist/src/render/chrome.js.map +1 -0
  78. package/dist/src/render/render-block.d.ts +21 -0
  79. package/dist/src/render/render-block.d.ts.map +1 -0
  80. package/dist/src/render/render-block.js +104 -0
  81. package/dist/src/render/render-block.js.map +1 -0
  82. package/dist/src/render/term-archive.d.ts +3 -0
  83. package/dist/src/render/term-archive.d.ts.map +1 -0
  84. package/dist/src/render/term-archive.js +42 -0
  85. package/dist/src/render/term-archive.js.map +1 -0
  86. package/dist/theme.config.d.ts +15 -0
  87. package/dist/theme.config.d.ts.map +1 -0
  88. package/dist/theme.config.js +45 -0
  89. package/dist/theme.config.js.map +1 -0
  90. package/package.json +57 -0
  91. package/src/index.ts +20 -0
  92. package/src/render/blocks/accordion.ts +47 -0
  93. package/src/render/blocks/collection-list.ts +144 -0
  94. package/src/render/blocks/cta.ts +37 -0
  95. package/src/render/blocks/embed.ts +98 -0
  96. package/src/render/blocks/faq.ts +52 -0
  97. package/src/render/blocks/feature-grid.ts +67 -0
  98. package/src/render/blocks/gallery.ts +47 -0
  99. package/src/render/blocks/hero.ts +60 -0
  100. package/src/render/blocks/logo-strip.ts +31 -0
  101. package/src/render/blocks/logos.ts +52 -0
  102. package/src/render/blocks/media-figure.ts +38 -0
  103. package/src/render/blocks/pricing-table.ts +73 -0
  104. package/src/render/blocks/prose.ts +15 -0
  105. package/src/render/blocks/quote.ts +39 -0
  106. package/src/render/blocks/stat-counter.ts +36 -0
  107. package/src/render/blocks/stats.ts +45 -0
  108. package/src/render/blocks/testimonial.ts +36 -0
  109. package/src/render/chrome.ts +134 -0
  110. package/src/render/render-block.ts +140 -0
  111. package/src/render/term-archive.ts +92 -0
  112. package/src/styles/archive.css +129 -0
  113. package/src/styles/base.css +842 -0
  114. package/src/styles/blocks.css +1002 -0
  115. package/src/styles/theme.css +31 -0
  116. package/src/styles/tokens.css +332 -0
  117. package/tokens.json +36 -0
@@ -0,0 +1,76 @@
1
+ import { aspectRatio, h } from '@cogenta/theme-kit';
2
+ /**
3
+ * Nothing here contacts a third party before the visitor has consented.
4
+ *
5
+ * When `consentRequired` is true the block renders a self-contained card and
6
+ * an outbound link — no `<iframe>`, no `<script>`, no preconnect. The theme
7
+ * ships no consent *button*, because it ships no JavaScript at all: granting
8
+ * consent is a site-wide decision that belongs to the consent layer, not to
9
+ * a block.
10
+ */
11
+ /** `null` means "this provider has no embeddable frame we trust". */
12
+ function frameSource(provider, rawUrl) {
13
+ const url = URL.parse(rawUrl);
14
+ if (url === null)
15
+ return null;
16
+ const segments = url.pathname.split('/').filter((segment) => segment !== '');
17
+ switch (provider) {
18
+ case 'youtube': {
19
+ const id = url.hostname.endsWith('youtu.be')
20
+ ? segments[0]
21
+ : (url.searchParams.get('v') ?? segments[1]);
22
+ return id === undefined || id === null ? null : `https://www.youtube-nocookie.com/embed/${id}`;
23
+ }
24
+ case 'vimeo': {
25
+ const id = segments.find((segment) => /^\d+$/.test(segment));
26
+ return id === undefined ? null : `https://player.vimeo.com/video/${id}`;
27
+ }
28
+ case 'dailymotion': {
29
+ const id = url.hostname.endsWith('dai.ly') ? segments[0] : segments[segments.length - 1];
30
+ return id === undefined ? null : `https://geo.dailymotion.com/player.html?video=${id}`;
31
+ }
32
+ case 'spotify': {
33
+ const [kind, id] = segments;
34
+ return kind === undefined || id === undefined
35
+ ? null
36
+ : `https://open.spotify.com/embed/${kind}/${id}`;
37
+ }
38
+ case 'soundcloud':
39
+ return `https://w.soundcloud.com/player/?url=${encodeURIComponent(rawUrl)}`;
40
+ default:
41
+ // bluesky, mastodon, other: a post embed is a script tag, which this
42
+ // theme does not load. The link card is the rendering.
43
+ return null;
44
+ }
45
+ }
46
+ function consentCard(block, ctx, reason) {
47
+ return h('div', { class: 'cg-embed__placeholder' }, h('p', { class: 'cg-embed__notice' }, reason), h('a', {
48
+ class: 'cg-embed__link',
49
+ href: ctx.link(block.url),
50
+ rel: 'noopener noreferrer nofollow',
51
+ }, ctx.t('embed.open', { provider: block.provider })));
52
+ }
53
+ export function renderEmbed(block, ctx) {
54
+ const source = block.consentRequired ? null : frameSource(block.provider, block.url);
55
+ const ratio = aspectRatio(block.ratio) ?? '16 / 9';
56
+ return h('div', {
57
+ class: 'cg-block cg-embed',
58
+ 'data-block': 'embed',
59
+ 'data-provider': block.provider,
60
+ 'data-consent': block.consentRequired ? 'required' : 'not-required',
61
+ style: `--cg-ratio:${ratio}`,
62
+ }, source === null
63
+ ? consentCard(block, ctx, block.consentRequired
64
+ ? ctx.t('embed.consentRequired', { provider: block.provider })
65
+ : ctx.t('embed.unsupported', { provider: block.provider }))
66
+ : h('iframe', {
67
+ class: 'cg-embed__frame',
68
+ src: source,
69
+ title: ctx.t('embed.title', { provider: block.provider }),
70
+ loading: 'lazy',
71
+ referrerpolicy: 'strict-origin-when-cross-origin',
72
+ allow: 'accelerometer; clipboard-write; encrypted-media; picture-in-picture; fullscreen',
73
+ allowfullscreen: true,
74
+ }));
75
+ }
76
+ //# sourceMappingURL=embed.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"embed.js","sourceRoot":"","sources":["../../../../src/render/blocks/embed.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAoB,CAAC,EAAsB,MAAM,oBAAoB,CAAA;AAEzF;;;;;;;;GAQG;AAEH,qEAAqE;AACrE,SAAS,WAAW,CAAC,QAAgC,EAAE,MAAc;IACnE,MAAM,GAAG,GAAG,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA;IAC7B,IAAI,GAAG,KAAK,IAAI;QAAE,OAAO,IAAI,C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;QAC/B,cAAc,EAAE,KAAK,CAAC,eAAe,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,cAAc;QACnE,KAAK,EAAE,cAAc,KAAK,EAAE;KAC7B,EACD,MAAM,KAAK,IAAI;QACb,CAAC,CAAC,WAAW,CACT,KAAK,EACL,GAAG,EACH,KAAK,CAAC,eAAe;YACnB,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,uBAAuB,EAAE,EAAE,QAAQ,EAAE,KAAK,CAAC,QAAQ,EAAE,CAAC;YAC9D,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,mBAAmB,EAAE,EAAE,QAAQ,EAAE,KAAK,CAAC,QAAQ,EAAE,CAAC,CAC7D;QACH,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;YACV,KAAK,EAAE,iBAAiB;YACxB,GAAG,EAAE,MAAM;YACX,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC,aAAa,EAAE,EAAE,QAAQ,EAAE,KAAK,CAAC,QAAQ,EAAE,CAAC;YACzD,OAAO,EAAE,MAAM;YACf,cAAc,EAAE,iCAAiC;YACjD,KAAK,EAAE,iFAAiF;YACxF,eAAe,EAAE,IAAI;SACtB,CAAC,CACP,CAAA;AACH,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { FaqBlock } from '@cogenta/blocks';
2
+ import { type HtmlElement, type RenderContext } from '@cogenta/theme-kit';
3
+ export declare function renderFaq(block: FaqBlock, ctx: RenderContext): HtmlElement;
4
+ //# sourceMappingURL=faq.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"faq.d.ts","sourceRoot":"","sources":["../../../../src/render/blocks/faq.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAW,MAAM,iBAAiB,CAAA;AACxD,OAAO,EAEL,KAAK,WAAW,EAGhB,KAAK,aAAa,EAEnB,MAAM,oBAAoB,CAAA;AA0B3B,wBAAgB,SAAS,CAAC,KAAK,EAAE,QAAQ,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CAiB1E"}
@@ -0,0 +1,21 @@
1
+ import { blockHeadingTag, h, heading, renderRichText, } from '@cogenta/theme-kit';
2
+ /**
3
+ * `<details>`/`<summary>` rather than a scripted accordion: expanding,
4
+ * keyboard operation, the expanded state announced to assistive technology
5
+ * and in-page search all come from the browser, at zero bytes of
6
+ * JavaScript — the same mechanism this theme's own mobile nav toggle uses.
7
+ *
8
+ * The question is plain text inside `<summary>`, not a heading: a heading
9
+ * nested in a summary is rendered inconsistently across screen readers, and
10
+ * the questions are already reachable as a list under the block's own
11
+ * heading.
12
+ */
13
+ function renderItem(item, ctx) {
14
+ return h('li', { class: 'cg-faq__item' }, h('details', { class: 'cg-faq__details' }, h('summary', { class: 'cg-faq__question' }, item.question), h('div', { class: 'cg-faq__answer' }, renderRichText(ctx, item.answer))));
15
+ }
16
+ export function renderFaq(block, ctx) {
17
+ return h('section', { class: 'cg-block cg-faq', 'data-block': 'faq' }, block.title === undefined
18
+ ? null
19
+ : heading(blockHeadingTag('faq') ?? 'h2', { class: 'cg-faq__title', 'data-field': 'title' }, block.title), h('ul', { class: 'cg-faq__items' }, block.items.map((item) => renderItem(item, ctx))));
20
+ }
21
+ //# sourceMappingURL=faq.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"faq.js","sourceRoot":"","sources":["../../../../src/render/blocks/faq.ts"],"names":[],"mappings":"AACA,OAAO,EACL,eAAe,EAEf,CAAC,EACD,OAAO,EAEP,cAAc,GACf,MAAM,oBAAoB,CAAA;AAE3B;;;;;;;;;;GAUG;AACH,SAAS,UAAU,CAAC,IAAa,EAAE,GAAkB;IACnD,OAAO,CAAC,CACN,IAAI,EACJ,EAAE,KAAK,EAAE,cAAc,EAAE,EACzB,CAAC,CACC,SAAS,EACT,EAAE,KAAK,EAAE,iBAAiB,EAAE,EAC5B,CAAC,CAAC,SAAS,EAAE,EAAE,KAAK,EAAE,kBAAkB,EAAE,EAAE,IAAI,CAAC,QAAQ,CAAC,EAC1D,CAAC,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,gBAAgB,EAAE,EAAE,cAAc,CAAC,GAAG,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,CACxE,CACF,CAAA;AACH,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,KAAe,EAAE,GAAkB;IAC3D,OAAO,CAAC,CACN,SAAS,EACT,EAAE,KAAK,EAAE,iBAAiB,EAAE,YAAY,EAAE,KAAK,EAAE,EACjD,KAAK,CAAC,KAAK,KAAK,SAAS;QACvB,CAAC,CAAC,IAAI;QACN,CAAC,CAAC,OAAO,CACL,eAAe,CAAC,KAAK,CAAC,IAAI,IAAI,EAC9B,EAAE,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,OAAO,EAAE,EACjD,KAAK,CAAC,KAAK,CACZ,EACL,CAAC,CACC,IAAI,EACJ,EAAE,KAAK,EAAE,eAAe,EAAE,EAC1B,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,UAAU,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CACjD,CACF,CAAA;AACH,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { FeatureGridBlock } from '@cogenta/blocks';
2
+ import { type HtmlElement, type RenderContext } from '@cogenta/theme-kit';
3
+ export declare function renderFeatureGrid(block: FeatureGridBlock, ctx: RenderContext): HtmlElement;
4
+ //# sourceMappingURL=feature-grid.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"feature-grid.d.ts","sourceRoot":"","sources":["../../../../src/render/blocks/feature-grid.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAe,MAAM,iBAAiB,CAAA;AACpE,OAAO,EAGL,KAAK,WAAW,EAKhB,KAAK,aAAa,EAEnB,MAAM,oBAAoB,CAAA;AAoC3B,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,gBAAgB,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CAmB1F"}
@@ -0,0 +1,27 @@
1
+ import { blockHeadingTag, h, heading, href, nestedHeadingTag, renderIcon, } from '@cogenta/theme-kit';
2
+ /**
3
+ * "What we do" — three (or more) programme cards, each a rounded, softly
4
+ * shadowed tile with its icon in a round chip. The item's title carries the
5
+ * link, so the link's accessible name is the programme's own name (WCAG
6
+ * 2.4.4) — the block has no separate "learn more" field to write.
7
+ *
8
+ * `icon` names a symbol, never markup: it is exposed as a data attribute for
9
+ * the skin and, when the name is one `renderIcon` recognises, a real inline
10
+ * glyph — `aria-hidden`, since the title already names the programme.
11
+ */
12
+ function renderItem(item, ctx, tag) {
13
+ const title = item.link === undefined
14
+ ? heading(tag, { class: 'cg-feature__title' }, item.title)
15
+ : heading(tag, { class: 'cg-feature__title' }, h('a', { class: 'cg-feature__link', href: href(ctx, item.link) }, item.title));
16
+ return h('li', { class: 'cg-feature' }, item.icon === undefined
17
+ ? null
18
+ : h('span', { class: 'cg-feature__icon', 'data-icon': item.icon, 'aria-hidden': 'true' }, renderIcon(item.icon)), title, item.text === undefined ? null : h('p', { class: 'cg-feature__text' }, item.text));
19
+ }
20
+ export function renderFeatureGrid(block, ctx) {
21
+ const hasTitle = block.title !== undefined;
22
+ const itemTag = nestedHeadingTag('featureGrid', hasTitle);
23
+ return h('section', { class: 'cg-block cg-features', 'data-block': 'featureGrid' }, hasTitle
24
+ ? heading(blockHeadingTag('featureGrid') ?? 'h2', { class: 'cg-features__title', 'data-field': 'title' }, block.title ?? '')
25
+ : null, h('ul', { class: 'cg-features__items' }, block.items.map((item) => renderItem(item, ctx, itemTag))));
26
+ }
27
+ //# sourceMappingURL=feature-grid.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"feature-grid.js","sourceRoot":"","sources":["../../../../src/render/blocks/feature-grid.ts"],"names":[],"mappings":"AACA,OAAO,EACL,eAAe,EAGf,CAAC,EACD,OAAO,EACP,IAAI,EACJ,gBAAgB,EAEhB,UAAU,GACX,MAAM,oBAAoB,CAAA;AAE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AAY,EAAE,aAAa,EAAE,EAC9D,QAAQ;QACN,CAAC,CAAC,OAAO,CACL,eAAe,CAAC,aAAa,CAAC,IAAI,IAAI,EACtC,EAAE,KAAK,EAAE,oBAAoB,EAAE,YAAY,EAAE,OAAO,EAAE,EACtD,KAAK,CAAC,KAAK,IAAI,EAAE,CAClB;QACH,CAAC,CAAC,IAAI,EACR,CAAC,CACC,IAAI,EACJ,EAAE,KAAK,EAAE,oBAAoB,EAAE,EAC/B,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,UAAU,CAAC,IAAI,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC,CAC1D,CACF,CAAA;AACH,CAAC"}
@@ -0,0 +1,14 @@
1
+ import type { GalleryBlock } from '@cogenta/blocks';
2
+ import { type HtmlElement, type RenderContext } from '@cogenta/theme-kit';
3
+ /**
4
+ * The carousel ships **no JavaScript**. It is a scroll-snapping list, which
5
+ * gives touch swiping, trackpad scrolling and — because the list is focusable
6
+ * and labelled — arrow-key scrolling, with none of the failure modes of a
7
+ * scripted carousel (WCAG 2.2.2).
8
+ *
9
+ * `grid` (the layout the association home page's photo gallery uses) shows
10
+ * six rounded, evenly sized tiles — a warm contact sheet rather than a rigid
11
+ * masonry wall.
12
+ */
13
+ export declare function renderGallery(block: GalleryBlock, ctx: RenderContext): HtmlElement;
14
+ //# sourceMappingURL=gallery.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gallery.d.ts","sourceRoot":"","sources":["../../../../src/render/blocks/gallery.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AACnD,OAAO,EAAE,KAAK,WAAW,EAAY,KAAK,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAEnF;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,YAAY,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CAiClF"}
@@ -0,0 +1,27 @@
1
+ import { h, image } from '@cogenta/theme-kit';
2
+ /**
3
+ * The carousel ships **no JavaScript**. It is a scroll-snapping list, which
4
+ * gives touch swiping, trackpad scrolling and — because the list is focusable
5
+ * and labelled — arrow-key scrolling, with none of the failure modes of a
6
+ * scripted carousel (WCAG 2.2.2).
7
+ *
8
+ * `grid` (the layout the association home page's photo gallery uses) shows
9
+ * six rounded, evenly sized tiles — a warm contact sheet rather than a rigid
10
+ * masonry wall.
11
+ */
12
+ export function renderGallery(block, ctx) {
13
+ const items = h('ul', { class: 'cg-gallery__items' }, block.items.map((item) => h('li', { class: 'cg-gallery__item' }, image(ctx, item.media, { sizes: '(min-width: 45rem) 20rem, 60vw' }))));
14
+ return h('section', {
15
+ class: 'cg-block cg-gallery',
16
+ 'data-block': 'gallery',
17
+ 'data-layout': block.layout,
18
+ }, block.layout === 'carousel'
19
+ ? h('div', {
20
+ class: 'cg-gallery__viewport',
21
+ role: 'region',
22
+ 'aria-label': ctx.t('gallery.carousel'),
23
+ tabindex: '0',
24
+ }, items)
25
+ : items);
26
+ }
27
+ //# sourceMappingURL=gallery.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gallery.js","sourceRoot":"","sources":["../../../../src/render/blocks/gallery.ts"],"names":[],"mappings":"AACA,OAAO,EAAoB,CAAC,EAAE,KAAK,EAAsB,MAAM,oBAAoB,CAAA;AAEnF;;;;;;;;;GASG;AACH,MAAM,UAAU,aAAa,CAAC,KAAmB,EAAE,GAAkB;IACnE,MAAM,KAAK,GAAG,CAAC,CACb,IAAI,EACJ,EAAE,KAAK,EAAE,mBAAmB,EAAE,EAC9B,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CACvB,CAAC,CACC,IAAI,EACJ,EAAE,KAAK,EAAE,kBAAkB,EAAE,EAC7B,KAAK,CAAC,GAAG,EAAE,IAAI,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,gCAAgC,EAAE,CAAC,CACpE,CACF,CACF,CAAA;IAED,OAAO,CAAC,CACN,SAAS,EACT;QACE,KAAK,EAAE,qBAAqB;QAC5B,YAAY,EAAE,SAAS;QACvB,aAAa,EAAE,KAAK,CAAC,MAAM;KAC5B,EACD,KAAK,CAAC,MAAM,KAAK,UAAU;QACzB,CAAC,CAAC,CAAC,CACC,KAAK,EACL;YACE,KAAK,EAAE,sBAAsB;YAC7B,IAAI,EAAE,QAAQ;YACd,YAAY,EAAE,GAAG,CAAC,CAAC,CAAC,kBAAkB,CAAC;YACvC,QAAQ,EAAE,GAAG;SACd,EACD,KAAK,CACN;QACH,CAAC,CAAC,KAAK,CACV,CAAA;AACH,CAAC"}
@@ -0,0 +1,15 @@
1
+ import type { HeroBlock } from '@cogenta/blocks';
2
+ import { type HtmlElement, type RenderContext } from '@cogenta/theme-kit';
3
+ /**
4
+ * The hero carries the page's `h1` (contract B: `headingLevel: 'h1'`), so
5
+ * `renderPage` relies on it to avoid emitting a second one.
6
+ *
7
+ * The warm, community read this theme opens with: a rounded "eyebrow" pill
8
+ * (the cause, not a generic label), a big friendly title in the display
9
+ * face, and — when there is one — the media sitting in its own big rounded
10
+ * card with a soft halo glow behind it (`cg-hero__halo`, purely decorative,
11
+ * `aria-hidden`), rather than a hard-edged frame. Centred copy on mobile,
12
+ * two columns from `md` up.
13
+ */
14
+ export declare function renderHero(block: HeroBlock, ctx: RenderContext): HtmlElement;
15
+ //# sourceMappingURL=hero.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hero.d.ts","sourceRoot":"","sources":["../../../../src/render/blocks/hero.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAChD,OAAO,EAGL,KAAK,WAAW,EAIhB,KAAK,aAAa,EACnB,MAAM,oBAAoB,CAAA;AAE3B;;;;;;;;;;GAUG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CAqC5E"}
@@ -0,0 +1,31 @@
1
+ import { actionList, blockHeadingTag, h, heading, image, } from '@cogenta/theme-kit';
2
+ /**
3
+ * The hero carries the page's `h1` (contract B: `headingLevel: 'h1'`), so
4
+ * `renderPage` relies on it to avoid emitting a second one.
5
+ *
6
+ * The warm, community read this theme opens with: a rounded "eyebrow" pill
7
+ * (the cause, not a generic label), a big friendly title in the display
8
+ * face, and — when there is one — the media sitting in its own big rounded
9
+ * card with a soft halo glow behind it (`cg-hero__halo`, purely decorative,
10
+ * `aria-hidden`), rather than a hard-edged frame. Centred copy on mobile,
11
+ * two columns from `md` up.
12
+ */
13
+ export function renderHero(block, ctx) {
14
+ const tag = blockHeadingTag('hero') ?? 'h1';
15
+ return h('section', { class: 'cg-block cg-hero', 'data-block': 'hero' }, h('div', { class: 'cg-hero__copy' }, block.eyebrow === undefined
16
+ ? null
17
+ : h('p', { class: 'cg-hero__eyebrow', 'data-field': 'eyebrow' }, h('span', { class: 'cg-pill' }, block.eyebrow)), heading(tag, { class: 'cg-hero__title', 'data-field': 'title' }, block.title), block.subtitle === undefined
18
+ ? null
19
+ : h('p', { class: 'cg-hero__subtitle', 'data-field': 'subtitle' }, block.subtitle), actionList(ctx, block.actions, ctx.t('hero.actions'))), block.media === undefined
20
+ ? null
21
+ : h('div', { class: 'cg-hero__frame' }, h('span', { class: 'cg-hero__halo', 'aria-hidden': 'true' }),
22
+ // The only image above the fold by construction, so the only one
23
+ // that must not be lazy — a lazy-loaded LCP element is a measured
24
+ // Lighthouse regression, not a theoretical one.
25
+ image(ctx, block.media, {
26
+ className: 'cg-hero__media',
27
+ loading: 'eager',
28
+ sizes: '(min-width: 60rem) 44vw, 100vw',
29
+ })));
30
+ }
31
+ //# sourceMappingURL=hero.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hero.js","sourceRoot":"","sources":["../../../../src/render/blocks/hero.ts"],"names":[],"mappings":"AACA,OAAO,EACL,UAAU,EACV,eAAe,EAEf,CAAC,EACD,OAAO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jE,kEAAkE;QAClE,gDAAgD;QAChD,KAAK,CAAC,GAAG,EAAE,KAAK,CAAC,KAAK,EAAE;YACtB,SAAS,EAAE,gBAAgB;YAC3B,OAAO,EAAE,OAAO;YAChB,KAAK,EAAE,gCAAgC;SACxC,CAAC,CACH,CACN,CAAA;AACH,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { LogoStripBlock } from '@cogenta/blocks';
2
+ import { type HtmlElement, type RenderContext } from '@cogenta/theme-kit';
3
+ export declare function renderLogoStrip(block: LogoStripBlock, ctx: RenderContext): HtmlElement;
4
+ //# sourceMappingURL=logo-strip.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logo-strip.d.ts","sourceRoot":"","sources":["../../../../src/render/blocks/logo-strip.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAiB,MAAM,iBAAiB,CAAA;AACpE,OAAO,EAAE,KAAK,WAAW,EAAY,KAAK,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAgBnF,wBAAgB,eAAe,CAAC,KAAK,EAAE,cAAc,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CAatF"}
@@ -0,0 +1,16 @@
1
+ import { h, image } from '@cogenta/theme-kit';
2
+ /**
3
+ * `blocks@2.0` (RFC 0001). "Our partners" — the lighter-weight social-proof
4
+ * row next to `logos`: no per-logo name or link, so no accessible-name field
5
+ * to require — each image's own alt text (set once, in the media library)
6
+ * names it.
7
+ */
8
+ function renderItem(item, ctx) {
9
+ return h('li', { class: 'cg-logo-band__item' }, image(ctx, item.media, { className: 'cg-logo-band__image', variant: { fit: 'contain' } }));
10
+ }
11
+ export function renderLogoStrip(block, ctx) {
12
+ return h('figure', { class: 'cg-block cg-logo-band', 'data-block': 'logoStrip' }, h('ul', { class: 'cg-logo-band__items' }, block.logos.map((item) => renderItem(item, ctx))), block.caption === undefined
13
+ ? null
14
+ : h('figcaption', { class: 'cg-logo-band__caption', 'data-field': 'caption' }, block.caption));
15
+ }
16
+ //# sourceMappingURL=logo-strip.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logo-strip.js","sourceRoot":"","sources":["../../../../src/render/blocks/logo-strip.ts"],"names":[],"mappings":"AACA,OAAO,EAAoB,CAAC,EAAE,KAAK,EAAsB,MAAM,oBAAoB,CAAA;AAEnF;;;;;GAKG;AACH,SAAS,UAAU,CAAC,IAAmB,EAAE,GAAkB;IACzD,OAAO,CAAC,CACN,IAAI,EACJ,EAAE,KAAK,EAAE,oBAAoB,EAAE,EAC/B,KAAK,CAAC,GAAG,EAAE,IAAI,CAAC,KAAK,EAAE,EAAE,SAAS,EAAE,qBAAqB,EAAE,OAAO,EAAE,EAAE,GAAG,EAAE,SAAS,EAAE,EAAE,CAAC,CAC1F,CAAA;AACH,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,KAAqB,EAAE,GAAkB;IACvE,OAAO,CAAC,CACN,QAAQ,EACR,EAAE,KAAK,EAAE,uBAAuB,EAAE,YAAY,EAAE,WAAW,EAAE,EAC7D,CAAC,CACC,IAAI,EACJ,EAAE,KAAK,EAAE,qBAAqB,EAAE,EAChC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,UAAU,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CACjD,EACD,KAAK,CAAC,OAAO,KAAK,SAAS;QACzB,CAAC,CAAC,IAAI;QACN,CAAC,CAAC,CAAC,CAAC,YAAY,EAAE,EAAE,KAAK,EAAE,uBAAuB,EAAE,YAAY,EAAE,SAAS,EAAE,EAAE,KAAK,CAAC,OAAO,CAAC,CAChG,CAAA;AACH,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { LogosBlock } from '@cogenta/blocks';
2
+ import { type HtmlElement, type RenderContext } from '@cogenta/theme-kit';
3
+ export declare function renderLogos(block: LogosBlock, ctx: RenderContext): HtmlElement;
4
+ //# sourceMappingURL=logos.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logos.d.ts","sourceRoot":"","sources":["../../../../src/render/blocks/logos.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAY,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAC3D,OAAO,EAEL,KAAK,WAAW,EAIhB,KAAK,aAAa,EACnB,MAAM,oBAAoB,CAAA;AA0B3B,wBAAgB,WAAW,CAAC,KAAK,EAAE,UAAU,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CAiB9E"}
@@ -0,0 +1,22 @@
1
+ import { blockHeadingTag, h, heading, image, } from '@cogenta/theme-kit';
2
+ /**
3
+ * Contract B says the organisation's name **is** the accessible name of the
4
+ * link. So the logo image carries it as alt text when the media entity has
5
+ * none, and no visually hidden duplicate is added.
6
+ */
7
+ function renderItem(item, ctx) {
8
+ const logo = image(ctx, item.media, {
9
+ className: 'cg-logo__image',
10
+ altFrom: item.name,
11
+ variant: { fit: 'contain' },
12
+ });
13
+ return h('li', { class: 'cg-logo' }, item.url === undefined
14
+ ? logo
15
+ : h('a', { class: 'cg-logo__link', href: ctx.link(item.url), rel: 'noopener noreferrer' }, logo));
16
+ }
17
+ export function renderLogos(block, ctx) {
18
+ return h('section', { class: 'cg-block cg-logos', 'data-block': 'logos' }, block.title === undefined
19
+ ? null
20
+ : heading(blockHeadingTag('logos') ?? 'h2', { class: 'cg-logos__title', 'data-field': 'title' }, block.title), h('ul', { class: 'cg-logos__items' }, block.items.map((item) => renderItem(item, ctx))));
21
+ }
22
+ //# sourceMappingURL=logos.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logos.js","sourceRoot":"","sources":["../../../../src/render/blocks/logos.ts"],"names":[],"mappings":"AACA,OAAO,EACL,eAAe,EAEf,CAAC,EACD,OAAO,EACP,KAAK,GAEN,MAAM,oBAAoB,CAAA;AAE3B;;;;GAIG;AACH,SAAS,UAAU,CAAC,IAAc,EAAE,GAAkB;IACpD,MAAM,IAAI,GAAG,KAAK,CAAC,GAAG,EAAE,IAAI,CAAC,KAAK,EAAE;QAClC,SAAS,EAAE,gBAAgB;QAC3B,OAAO,EAAE,IAAI,CAAC,IAAI;QAClB,OAAO,EAAE,EAAE,GAAG,EAAE,SAAS,EAAE;KAC5B,CAAC,CAAA;IACF,OAAO,CAAC,CACN,IAAI,EACJ,EAAE,KAAK,EAAE,SAAS,EAAE,EACpB,IAAI,CAAC,GAAG,KAAK,SAAS;QACpB,CAAC,CAAC,IAAI;QACN,CAAC,CAAC,CAAC,CACC,GAAG,EACH,EAAE,KAAK,EAAE,eAAe,EAAE,IAAI,EAAE,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,qBAAqB,EAAE,EAChF,IAAI,CACL,CACN,CAAA;AACH,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,KAAiB,EAAE,GAAkB;IAC/D,OAAO,CAAC,CACN,SAAS,EACT,EAAE,KAAK,EAAE,mBAAmB,EAAE,YAAY,EAAE,OAAO,EAAE,EACrD,KAAK,CAAC,KAAK,KAAK,SAAS;QACvB,CAAC,CAAC,IAAI;QACN,CAAC,CAAC,OAAO,CACL,eAAe,CAAC,OAAO,CAAC,IAAI,IAAI,EAChC,EAAE,KAAK,EAAE,iBAAiB,EAAE,YAAY,EAAE,OAAO,EAAE,EACnD,KAAK,CAAC,KAAK,CACZ,EACL,CAAC,CACC,IAAI,EACJ,EAAE,KAAK,EAAE,iBAAiB,EAAE,EAC5B,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,UAAU,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CACjD,CACF,CAAA;AACH,CAAC"}
@@ -0,0 +1,12 @@
1
+ import type { MediaFigureBlock } from '@cogenta/blocks';
2
+ import { type HtmlElement, type RenderContext } from '@cogenta/theme-kit';
3
+ /**
4
+ * `<figure>`/`<figcaption>` rather than a div and a paragraph: the
5
+ * association between the picture and its caption is then in the markup.
6
+ *
7
+ * The media sits in a big rounded card (`cg-figure__media`, `--cg-radius-lg`)
8
+ * with a soft shadow, matching the hero's own frame treatment rather than a
9
+ * hard-edged photo.
10
+ */
11
+ export declare function renderMediaFigure(block: MediaFigureBlock, ctx: RenderContext): HtmlElement;
12
+ //# sourceMappingURL=media-figure.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"media-figure.d.ts","sourceRoot":"","sources":["../../../../src/render/blocks/media-figure.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AACvD,OAAO,EAAe,KAAK,WAAW,EAAY,KAAK,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAEhG;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,gBAAgB,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CA0B1F"}
@@ -0,0 +1,27 @@
1
+ import { aspectRatio, h, image } from '@cogenta/theme-kit';
2
+ /**
3
+ * `<figure>`/`<figcaption>` rather than a div and a paragraph: the
4
+ * association between the picture and its caption is then in the markup.
5
+ *
6
+ * The media sits in a big rounded card (`cg-figure__media`, `--cg-radius-lg`)
7
+ * with a soft shadow, matching the hero's own frame treatment rather than a
8
+ * hard-edged photo.
9
+ */
10
+ export function renderMediaFigure(block, ctx) {
11
+ const ratio = aspectRatio(block.ratio);
12
+ const hasCaption = block.caption !== undefined || block.credit !== undefined;
13
+ return h('figure', {
14
+ class: 'cg-block cg-figure',
15
+ 'data-block': 'mediaFigure',
16
+ 'data-align': block.align ?? 'center',
17
+ style: ratio === undefined ? undefined : `--cg-ratio:${ratio}`,
18
+ }, image(ctx, block.media, {
19
+ className: 'cg-figure__media',
20
+ sizes: '(min-width: 45rem) 40rem, 100vw',
21
+ }), hasCaption
22
+ ? h('figcaption', { class: 'cg-figure__caption' }, block.caption, block.credit === undefined
23
+ ? null
24
+ : h('span', { class: 'cg-figure__credit', 'data-field': 'credit' }, block.credit))
25
+ : null);
26
+ }
27
+ //# sourceMappingURL=media-figure.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"media-figure.js","sourceRoot":"","sources":["../../../../src/render/blocks/media-figure.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAoB,CAAC,EAAE,KAAK,EAAsB,MAAM,oBAAoB,CAAA;AAEhG;;;;;;;GAOG;AACH,MAAM,UAAU,iBAAiB,CAAC,KAAuB,EAAE,GAAkB;IAC3E,MAAM,KAAK,GAAG,WAAW,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;IACtC,MAAM,UAAU,GAAG,KAAK,CAAC,OAAO,KAAK,SAAS,IAAI,KAAK,CAAC,MAAM,KAAK,SAAS,CAAA;IAC5E,OAAO,CAAC,CACN,QAAQ,EACR;QACE,KAAK,EAAE,oBAAoB;QAC3B,YAAY,EAAE,aAAa;QAC3B,YAAY,EAAE,KAAK,CAAC,KAAK,IAAI,QAAQ;QACrC,KAAK,EAAE,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,cAAc,KAAK,EAAE;KAC/D,EACD,KAAK,CAAC,GAAG,EAAE,KAAK,CAAC,KAAK,EAAE;QACtB,SAAS,EAAE,kBAAkB;QAC7B,KAAK,EAAE,iCAAiC;KACzC,CAAC,EACF,UAAU;QACR,CAAC,CAAC,CAAC,CACC,YAAY,EACZ,EAAE,KAAK,EAAE,oBAAoB,EAAE,EAC/B,KAAK,CAAC,OAAO,EACb,KAAK,CAAC,MAAM,KAAK,SAAS;YACxB,CAAC,CAAC,IAAI;YACN,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,mBAAmB,EAAE,YAAY,EAAE,QAAQ,EAAE,EAAE,KAAK,CAAC,MAAM,CAAC,CACpF;QACH,CAAC,CAAC,IAAI,CACT,CAAA;AACH,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { PricingTableBlock } from '@cogenta/blocks';
2
+ import { type HtmlElement, type RenderContext } from '@cogenta/theme-kit';
3
+ export declare function renderPricingTable(block: PricingTableBlock, ctx: RenderContext): HtmlElement;
4
+ //# sourceMappingURL=pricing-table.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pricing-table.d.ts","sourceRoot":"","sources":["../../../../src/render/blocks/pricing-table.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAe,MAAM,iBAAiB,CAAA;AACrE,OAAO,EAIL,KAAK,WAAW,EAIhB,KAAK,aAAa,EACnB,MAAM,oBAAoB,CAAA;AA2C3B,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,iBAAiB,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CAmB5F"}
@@ -0,0 +1,29 @@
1
+ import { actionLink, blockHeadingTag, h, heading, nestedHeadingTag, } from '@cogenta/theme-kit';
2
+ /**
3
+ * `blocks@2.0` (RFC 0001). Rarely a nonprofit's own price list, but not never
4
+ * (a membership fee, a course fee) — kept in the shared, rounded-card
5
+ * register the rest of this theme uses. `highlighted` becomes
6
+ * `data-highlighted` for the skin to style, and `aria-current` so it is
7
+ * announced, not only shown.
8
+ */
9
+ function renderTier(tier, ctx, tag) {
10
+ return h('li', {
11
+ class: 'cg-pricing__tier',
12
+ 'data-highlighted': tier.highlighted === true ? 'true' : undefined,
13
+ 'aria-current': tier.highlighted === true ? 'true' : undefined,
14
+ }, heading(tag, { class: 'cg-pricing__name' }, tier.name), h('p', { class: 'cg-pricing__price' }, h('span', { class: 'cg-pricing__amount' }, tier.price), tier.interval === undefined
15
+ ? null
16
+ : h('span', { class: 'cg-pricing__interval' }, tier.interval)), tier.features.length === 0
17
+ ? null
18
+ : h('ul', { class: 'cg-pricing__features' }, tier.features.map((feature) => h('li', {}, feature))), tier.action === undefined
19
+ ? null
20
+ : h('div', { class: 'cg-pricing__action' }, actionLink(ctx, { ...tier.action, emphasis: tier.action.emphasis ?? 'primary' })));
21
+ }
22
+ export function renderPricingTable(block, ctx) {
23
+ const hasTitle = block.title !== undefined;
24
+ const tierTag = nestedHeadingTag('pricingTable', hasTitle);
25
+ return h('section', { class: 'cg-block cg-pricing', 'data-block': 'pricingTable' }, hasTitle
26
+ ? heading(blockHeadingTag('pricingTable') ?? 'h2', { class: 'cg-pricing__title', 'data-field': 'title' }, block.title ?? '')
27
+ : null, h('ul', { class: 'cg-pricing__tiers' }, block.tiers.map((tier) => renderTier(tier, ctx, tierTag))));
28
+ }
29
+ //# sourceMappingURL=pricing-table.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pricing-table.js","sourceRoot":"","sources":["../../../../src/render/blocks/pricing-table.ts"],"names":[],"mappings":"AACA,OAAO,EACL,UAAU,EACV,eAAe,EAGf,CAAC,EACD,OAAO,EACP,gBAAgB,GAEjB,MAAM,oBAAoB,CAAA;AAE3B;;;;;;GAMG;AACH,SAAS,UAAU,CAAC,IAAiB,EAAE,GAAkB,EAAE,GAAe;IACxE,OAAO,CAAC,CACN,IAAI,EACJ;QACE,KAAK,EAAE,kBAAkB;QACzB,kBAAkB,EAAE,IAAI,CAAC,WAAW,KAAK,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS;QAClE,cAAc,EAAE,IAAI,CAAC,WAAW,KAAK,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS;KAC/D,EACD,OAAO,CAAC,GAAG,EAAE,EAAE,KAAK,EAAE,kBAAkB,EAAE,EAAE,IAAI,CAAC,IAAI,CAAC,EACtD,CAAC,CACC,GAAG,EACH,EAAE,KAAK,EAAE,mBAAmB,EAAE,EAC9B,CAAC,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,oBAAoB,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,EACtD,IAAI,CAAC,QAAQ,KAAK,SAAS;QACzB,CAAC,CAAC,IAAI;QACN,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,sBAAsB,EAAE,EAAE,IAAI,CAAC,QAAQ,CAAC,CAChE,EACD,IAAI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CAC1D,CACF,CAAA;AACH,CAAC"}
@@ -0,0 +1,9 @@
1
+ import type { ProseBlock } from '@cogenta/blocks';
2
+ import { type HtmlElement, type RenderContext } from '@cogenta/theme-kit';
3
+ /**
4
+ * `prose` declares `headingLevel: 'none'`: it contributes no heading of its
5
+ * own. Whatever headings appear come from the rich text document, whose
6
+ * vocabulary starts at `h2`.
7
+ */
8
+ export declare function renderProse(block: ProseBlock, ctx: RenderContext): HtmlElement;
9
+ //# sourceMappingURL=prose.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prose.d.ts","sourceRoot":"","sources":["../../../../src/render/blocks/prose.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,EAAE,KAAK,WAAW,EAAK,KAAK,aAAa,EAAkB,MAAM,oBAAoB,CAAA;AAE5F;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,UAAU,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CAM9E"}
@@ -0,0 +1,10 @@
1
+ import { h, renderRichText } from '@cogenta/theme-kit';
2
+ /**
3
+ * `prose` declares `headingLevel: 'none'`: it contributes no heading of its
4
+ * own. Whatever headings appear come from the rich text document, whose
5
+ * vocabulary starts at `h2`.
6
+ */
7
+ export function renderProse(block, ctx) {
8
+ return h('div', { class: 'cg-block cg-prose', 'data-block': 'prose' }, renderRichText(ctx, block.body));
9
+ }
10
+ //# sourceMappingURL=prose.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prose.js","sourceRoot":"","sources":["../../../../src/render/blocks/prose.ts"],"names":[],"mappings":"AACA,OAAO,EAAoB,CAAC,EAAsB,cAAc,EAAE,MAAM,oBAAoB,CAAA;AAE5F;;;;GAIG;AACH,MAAM,UAAU,WAAW,CAAC,KAAiB,EAAE,GAAkB;IAC/D,OAAO,CAAC,CACN,KAAK,EACL,EAAE,KAAK,EAAE,mBAAmB,EAAE,YAAY,EAAE,OAAO,EAAE,EACrD,cAAc,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,CAAC,CAChC,CAAA;AACH,CAAC"}
@@ -0,0 +1,13 @@
1
+ import type { QuoteBlock } from '@cogenta/blocks';
2
+ import { type HtmlElement, type RenderContext } from '@cogenta/theme-kit';
3
+ /**
4
+ * `<figure><blockquote>…</blockquote><figcaption>` is the attribution
5
+ * pattern the HTML spec prescribes: putting the author inside the
6
+ * `<blockquote>` would claim the author's name is part of what was said.
7
+ *
8
+ * The avatar is decorative here — the name is right beside it in text — so
9
+ * its media entity's alt text is expected to be empty. `image` still writes
10
+ * the attribute either way.
11
+ */
12
+ export declare function renderQuote(block: QuoteBlock, ctx: RenderContext): HtmlElement;
13
+ //# sourceMappingURL=quote.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"quote.d.ts","sourceRoot":"","sources":["../../../../src/render/blocks/quote.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,EAAE,KAAK,WAAW,EAAY,KAAK,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAEnF;;;;;;;;GAQG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,UAAU,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CA0B9E"}
@@ -0,0 +1,26 @@
1
+ import { h, image } from '@cogenta/theme-kit';
2
+ /**
3
+ * `<figure><blockquote>…</blockquote><figcaption>` is the attribution
4
+ * pattern the HTML spec prescribes: putting the author inside the
5
+ * `<blockquote>` would claim the author's name is part of what was said.
6
+ *
7
+ * The avatar is decorative here — the name is right beside it in text — so
8
+ * its media entity's alt text is expected to be empty. `image` still writes
9
+ * the attribute either way.
10
+ */
11
+ export function renderQuote(block, ctx) {
12
+ const hasAttribution = block.author !== undefined || block.role !== undefined || block.avatar !== undefined;
13
+ return h('figure', { class: 'cg-block cg-quote', 'data-block': 'quote' }, h('blockquote', { class: 'cg-quote__text' }, h('p', { 'data-field': 'text' }, block.text)), hasAttribution
14
+ ? h('figcaption', { class: 'cg-quote__attribution' }, block.avatar === undefined
15
+ ? null
16
+ : image(ctx, block.avatar, {
17
+ className: 'cg-quote__avatar',
18
+ variant: { width: 96, height: 96, fit: 'cover' },
19
+ }), block.author === undefined
20
+ ? null
21
+ : h('span', { class: 'cg-quote__author', 'data-field': 'author' }, block.author), block.role === undefined
22
+ ? null
23
+ : h('span', { class: 'cg-quote__role', 'data-field': 'role' }, block.role))
24
+ : null);
25
+ }
26
+ //# sourceMappingURL=quote.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"quote.js","sourceRoot":"","sources":["../../../../src/render/blocks/quote.ts"],"names":[],"mappings":"AACA,OAAO,EAAoB,CAAC,EAAE,KAAK,EAAsB,MAAM,oBAAoB,CAAA;AAEnF;;;;;;;;GAQG;AACH,MAAM,UAAU,WAAW,CAAC,KAAiB,EAAE,GAAkB;IAC/D,MAAM,cAAc,GAClB,KAAK,CAAC,MAAM,KAAK,SAAS,IAAI,KAAK,CAAC,IAAI,KAAK,SAAS,IAAI,KAAK,CAAC,MAAM,KAAK,SAAS,CAAA;IACtF,OAAO,CAAC,CACN,QAAQ,EACR,EAAE,KAAK,EAAE,mBAAmB,EAAE,YAAY,EAAE,OAAO,EAAE,EACrD,CAAC,CAAC,YAAY,EAAE,EAAE,KAAK,EAAE,gBAAgB,EAAE,EAAE,CAAC,CAAC,GAAG,EAAE,EAAE,YAAY,EAAE,MAAM,EAAE,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,EAC1F,cAAc;QACZ,CAAC,CAAC,CAAC,CACC,YAAY,EACZ,EAAE,KAAK,EAAE,uBAAuB,EAAE,EAClC,KAAK,CAAC,MAAM,KAAK,SAAS;YACxB,CAAC,CAAC,IAAI;YACN,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,KAAK,CAAC,MAAM,EAAE;gBACvB,SAAS,EAAE,kBAAkB;gBAC7B,OAAO,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,GAAG,EAAE,OAAO,EAAE;aACjD,CAAC,EACN,KAAK,CAAC,MAAM,KAAK,SAAS;YACxB,CAAC,CAAC,IAAI;YACN,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,kBAAkB,EAAE,YAAY,EAAE,QAAQ,EAAE,EAAE,KAAK,CAAC,MAAM,CAAC,EAClF,KAAK,CAAC,IAAI,KAAK,SAAS;YACtB,CAAC,CAAC,IAAI;YACN,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,EAAE,EAAE,KAAK,CAAC,IAAI,CAAC,CAC7E;QACH,CAAC,CAAC,IAAI,CACT,CAAA;AACH,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { StatCounterBlock } from '@cogenta/blocks';
2
+ import { type HtmlElement, type RenderContext } from '@cogenta/theme-kit';
3
+ export declare function renderStatCounter(block: StatCounterBlock, _ctx: RenderContext): HtmlElement;
4
+ //# sourceMappingURL=stat-counter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stat-counter.d.ts","sourceRoot":"","sources":["../../../../src/render/blocks/stat-counter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAmB,MAAM,iBAAiB,CAAA;AACxE,OAAO,EAEL,KAAK,WAAW,EAGhB,KAAK,aAAa,EACnB,MAAM,oBAAoB,CAAA;AAe3B,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,gBAAgB,EAAE,IAAI,EAAE,aAAa,GAAG,WAAW,CAa3F"}
@@ -0,0 +1,14 @@
1
+ import { blockHeadingTag, h, heading, } from '@cogenta/theme-kit';
2
+ /**
3
+ * `blocks@2.0` (RFC 0001). A `<dl>`, exactly like `stats` — narrower on
4
+ * purpose (no `unit`), for one big figure and its label.
5
+ */
6
+ function renderItem(item) {
7
+ return h('div', { class: 'cg-stat-counter' }, h('dt', { class: 'cg-stat-counter__label' }, item.label), h('dd', { class: 'cg-stat-counter__value' }, item.value));
8
+ }
9
+ export function renderStatCounter(block, _ctx) {
10
+ return h('section', { class: 'cg-block cg-stat-counters', 'data-block': 'statCounter' }, block.title === undefined
11
+ ? null
12
+ : heading(blockHeadingTag('statCounter') ?? 'h2', { class: 'cg-stat-counters__title', 'data-field': 'title' }, block.title), h('dl', { class: 'cg-stat-counters__items' }, block.stats.map(renderItem)));
13
+ }
14
+ //# sourceMappingURL=stat-counter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stat-counter.js","sourceRoot":"","sources":["../../../../src/render/blocks/stat-counter.ts"],"names":[],"mappings":"AACA,OAAO,EACL,eAAe,EAEf,CAAC,EACD,OAAO,GAER,MAAM,oBAAoB,CAAA;AAE3B;;;GAGG;AACH,SAAS,UAAU,CAAC,IAAqB;IACvC,OAAO,CAAC,CACN,KAAK,EACL,EAAE,KAAK,EAAE,iBAAiB,EAAE,EAC5B,CAAC,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,wBAAwB,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,EACxD,CAAC,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,wBAAwB,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,CACzD,CAAA;AACH,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,KAAuB,EAAE,IAAmB;IAC5E,OAAO,CAAC,CACN,SAAS,EACT,EAAE,KAAK,EAAE,2BAA2B,EAAE,YAAY,EAAE,aAAa,EAAE,EACnE,KAAK,CAAC,KAAK,KAAK,SAAS;QACvB,CAAC,CAAC,IAAI;QACN,CAAC,CAAC,OAAO,CACL,eAAe,CAAC,aAAa,CAAC,IAAI,IAAI,EACtC,EAAE,KAAK,EAAE,yBAAyB,EAAE,YAAY,EAAE,OAAO,EAAE,EAC3D,KAAK,CAAC,KAAK,CACZ,EACL,CAAC,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,yBAAyB,EAAE,EAAE,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAC3E,CAAA;AACH,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { StatsBlock } from '@cogenta/blocks';
2
+ import { type HtmlElement, type RenderContext } from '@cogenta/theme-kit';
3
+ export declare function renderStats(block: StatsBlock, _ctx: RenderContext): HtmlElement;
4
+ //# sourceMappingURL=stats.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stats.d.ts","sourceRoot":"","sources":["../../../../src/render/blocks/stats.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAY,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAC3D,OAAO,EAEL,KAAK,WAAW,EAGhB,KAAK,aAAa,EACnB,MAAM,oBAAoB,CAAA;AAwB3B,wBAAgB,WAAW,CAAC,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,aAAa,GAAG,WAAW,CAa/E"}
@@ -0,0 +1,18 @@
1
+ import { blockHeadingTag, h, heading, } from '@cogenta/theme-kit';
2
+ /**
3
+ * The impact band — "12,400 meals served", "380 volunteers" — rendered as a
4
+ * description list so each big figure stays the description of its label
5
+ * (WCAG 1.3.2). Reading order is label then figure, exactly as the markup
6
+ * says; the stylesheet paints the figure first with `column-reverse` (see
7
+ * `blocks.css`'s own comment on `.cg-impact-stat`) — the paint order changes,
8
+ * the DOM order a screen reader follows does not.
9
+ */
10
+ function renderItem(item) {
11
+ return h('div', { class: 'cg-impact-stat' }, h('dt', { class: 'cg-impact-stat__label' }, item.label), h('dd', { class: 'cg-impact-stat__value' }, item.value, item.unit === undefined ? null : h('span', { class: 'cg-impact-stat__unit' }, item.unit)));
12
+ }
13
+ export function renderStats(block, _ctx) {
14
+ return h('section', { class: 'cg-block cg-impact', 'data-block': 'stats' }, block.title === undefined
15
+ ? null
16
+ : heading(blockHeadingTag('stats') ?? 'h2', { class: 'cg-impact__title', 'data-field': 'title' }, block.title), h('dl', { class: 'cg-impact__items' }, block.items.map(renderItem)));
17
+ }
18
+ //# sourceMappingURL=stats.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stats.js","sourceRoot":"","sources":["../../../../src/render/blocks/stats.ts"],"names":[],"mappings":"AACA,OAAO,EACL,eAAe,EAEf,CAAC,EACD,OAAO,GAER,MAAM,oBAAoB,CAAA;AAE3B;;;;;;;GAOG;AACH,SAAS,UAAU,CAAC,IAAc;IAChC,OAAO,CAAC,CACN,KAAK,EACL,EAAE,KAAK,EAAE,gBAAgB,EAAE,EAC3B,CAAC,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,uBAAuB,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,EACvD,CAAC,CACC,IAAI,EACJ,EAAE,KAAK,EAAE,uBAAuB,EAAE,EAClC,IAAI,CAAC,KAAK,EACV,IAAI,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,sBAAsB,EAAE,EAAE,IAAI,CAAC,IAAI,CAAC,CACzF,CACF,CAAA;AACH,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,KAAiB,EAAE,IAAmB;IAChE,OAAO,CAAC,CACN,SAAS,EACT,EAAE,KAAK,EAAE,oBAAoB,EAAE,YAAY,EAAE,OAAO,EAAE,EACtD,KAAK,CAAC,KAAK,KAAK,SAAS;QACvB,CAAC,CAAC,IAAI;QACN,CAAC,CAAC,OAAO,CACL,eAAe,CAAC,OAAO,CAAC,IAAI,IAAI,EAChC,EAAE,KAAK,EAAE,kBAAkB,EAAE,YAAY,EAAE,OAAO,EAAE,EACpD,KAAK,CAAC,KAAK,CACZ,EACL,CAAC,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,kBAAkB,EAAE,EAAE,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CACpE,CAAA;AACH,CAAC"}