@cogenta/theme-magazine 1.1.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 +20 -0
  9. package/dist/src/render/blocks/accordion.js.map +1 -0
  10. package/dist/src/render/blocks/collection-list.d.ts +5 -0
  11. package/dist/src/render/blocks/collection-list.d.ts.map +1 -0
  12. package/dist/src/render/blocks/collection-list.js +134 -0
  13. package/dist/src/render/blocks/collection-list.js.map +1 -0
  14. package/dist/src/render/blocks/cta.d.ts +10 -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 +18 -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 +13 -0
  31. package/dist/src/render/blocks/gallery.d.ts.map +1 -0
  32. package/dist/src/render/blocks/gallery.js +26 -0
  33. package/dist/src/render/blocks/gallery.js.map +1 -0
  34. package/dist/src/render/blocks/hero.d.ts +11 -0
  35. package/dist/src/render/blocks/hero.d.ts.map +1 -0
  36. package/dist/src/render/blocks/hero.js +26 -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 +20 -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 +27 -0
  45. package/dist/src/render/blocks/logos.js.map +1 -0
  46. package/dist/src/render/blocks/media-figure.d.ts +15 -0
  47. package/dist/src/render/blocks/media-figure.d.ts.map +1 -0
  48. package/dist/src/render/blocks/media-figure.js +32 -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 +32 -0
  53. package/dist/src/render/blocks/pricing-table.js.map +1 -0
  54. package/dist/src/render/blocks/prose.d.ts +16 -0
  55. package/dist/src/render/blocks/prose.d.ts.map +1 -0
  56. package/dist/src/render/blocks/prose.js +17 -0
  57. package/dist/src/render/blocks/prose.js.map +1 -0
  58. package/dist/src/render/blocks/quote.d.ts +16 -0
  59. package/dist/src/render/blocks/quote.d.ts.map +1 -0
  60. package/dist/src/render/blocks/quote.js +29 -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 +17 -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 +19 -0
  69. package/dist/src/render/blocks/stats.js.map +1 -0
  70. package/dist/src/render/blocks/testimonial.d.ts +19 -0
  71. package/dist/src/render/blocks/testimonial.d.ts.map +1 -0
  72. package/dist/src/render/blocks/testimonial.js +28 -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 +136 -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 +13 -0
  83. package/dist/src/render/term-archive.d.ts.map +1 -0
  84. package/dist/src/render/term-archive.js +35 -0
  85. package/dist/src/render/term-archive.js.map +1 -0
  86. package/dist/theme.config.d.ts +12 -0
  87. package/dist/theme.config.d.ts.map +1 -0
  88. package/dist/theme.config.js +42 -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 +51 -0
  93. package/src/render/blocks/collection-list.ts +286 -0
  94. package/src/render/blocks/cta.ts +33 -0
  95. package/src/render/blocks/embed.ts +99 -0
  96. package/src/render/blocks/faq.ts +58 -0
  97. package/src/render/blocks/feature-grid.ts +61 -0
  98. package/src/render/blocks/gallery.ts +46 -0
  99. package/src/render/blocks/hero.ts +54 -0
  100. package/src/render/blocks/logo-strip.ts +35 -0
  101. package/src/render/blocks/logos.ts +57 -0
  102. package/src/render/blocks/media-figure.ts +43 -0
  103. package/src/render/blocks/pricing-table.ts +76 -0
  104. package/src/render/blocks/prose.ts +22 -0
  105. package/src/render/blocks/quote.ts +46 -0
  106. package/src/render/blocks/stat-counter.ts +39 -0
  107. package/src/render/blocks/stats.ts +46 -0
  108. package/src/render/blocks/testimonial.ts +44 -0
  109. package/src/render/chrome.ts +162 -0
  110. package/src/render/render-block.ts +137 -0
  111. package/src/render/term-archive.ts +87 -0
  112. package/src/styles/archive.css +40 -0
  113. package/src/styles/base.css +1037 -0
  114. package/src/styles/blocks.css +1335 -0
  115. package/src/styles/theme.css +18 -0
  116. package/src/styles/tokens.css +308 -0
  117. package/tokens.json +36 -0
@@ -0,0 +1,16 @@
1
+ import { actionList, blockHeadingTag, h, heading, } from '@cogenta/theme-kit';
2
+ /**
3
+ * The subscription page a print magazine always carries: a panel framed by
4
+ * a heavy top-and-bottom rule rather than a rounded, shadowed card — the
5
+ * theme's one deliberately "loud" moment, reserved for the block whose whole
6
+ * job is to ask for something.
7
+ */
8
+ export function renderCta(block, ctx) {
9
+ return h('section', { class: 'cg-block cg-subscribe', 'data-block': 'cta' }, heading(blockHeadingTag('cta') ?? 'h2', { class: 'cg-subscribe__title', 'data-field': 'title' }, block.title), block.text === undefined
10
+ ? null
11
+ : h('p', { class: 'cg-subscribe__text', 'data-field': 'text' }, block.text),
12
+ // `actions` is required and non-empty for a `cta`, so this always renders;
13
+ // the null branch stays reachable only through invalid stored data.
14
+ actionList(ctx, block.actions, block.title));
15
+ }
16
+ //# sourceMappingURL=cta.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cta.js","sourceRoot":"","sources":["../../../../src/render/blocks/cta.ts"],"names":[],"mappings":"AACA,OAAO,EACL,UAAU,EACV,eAAe,EAEf,CAAC,EACD,OAAO,GAER,MAAM,oBAAoB,CAAA;AAE3B;;;;;GAKG;AACH,MAAM,UAAU,SAAS,CAAC,KAAe,EAAE,GAAkB;IAC3D,OAAO,CAAC,CACN,SAAS,EACT,EAAE,KAAK,EAAE,uBAAuB,EAAE,YAAY,EAAE,KAAK,EAAE,EACvD,OAAO,CACL,eAAe,CAAC,KAAK,CAAC,IAAI,IAAI,EAC9B,EAAE,KAAK,EAAE,qBAAqB,EAAE,YAAY,EAAE,OAAO,EAAE,EACvD,KAAK,CAAC,KAAK,CACZ,EACD,KAAK,CAAC,IAAI,KAAK,SAAS;QACtB,CAAC,CAAC,IAAI;QACN,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,EAAE,KAAK,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,EAAE,EAAE,KAAK,CAAC,IAAI,CAAC;IAC7E,2EAA2E;IAC3E,oEAAoE;IACpE,UAAU,CAAC,GAAG,EAAE,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,KAAK,CAAC,CAC5C,CAAA;AACH,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { EmbedBlock } from '@cogenta/blocks';
2
+ import { type HtmlElement, type RenderContext } from '@cogenta/theme-kit';
3
+ export declare function renderEmbed(block: EmbedBlock, ctx: RenderContext): HtmlElement;
4
+ //# sourceMappingURL=embed.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"embed.d.ts","sourceRoot":"","sources":["../../../../src/render/blocks/embed.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,EAAe,KAAK,WAAW,EAAK,KAAK,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAkEzF,wBAAgB,WAAW,CAAC,KAAK,EAAE,UAAU,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CA+B9E"}
@@ -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 — the
4
+ * same rule the reference theme enforces, reused verbatim: an iframe (or a
5
+ * thumbnail fetch) already hands the provider an IP address and a cookie,
6
+ * which is exactly the transfer consent is supposed to gate. No consent
7
+ * *button* ships either, because this theme ships no JavaScript to wire one
8
+ * to: granting consent is a site-wide decision for a future consent layer,
9
+ * not a block's.
10
+ */
11
+ function frameSource(provider, rawUrl) {
12
+ const url = URL.parse(rawUrl);
13
+ if (url === null)
14
+ return null;
15
+ const segments = url.pathname.split('/').filter((segment) => segment !== '');
16
+ switch (provider) {
17
+ case 'youtube': {
18
+ const id = url.hostname.endsWith('youtu.be')
19
+ ? segments[0]
20
+ : (url.searchParams.get('v') ?? segments[1]);
21
+ return id === undefined || id === null ? null : `https://www.youtube-nocookie.com/embed/${id}`;
22
+ }
23
+ case 'vimeo': {
24
+ const id = segments.find((segment) => /^\d+$/.test(segment));
25
+ return id === undefined ? null : `https://player.vimeo.com/video/${id}`;
26
+ }
27
+ case 'dailymotion': {
28
+ const id = url.hostname.endsWith('dai.ly') ? segments[0] : segments[segments.length - 1];
29
+ return id === undefined ? null : `https://geo.dailymotion.com/player.html?video=${id}`;
30
+ }
31
+ case 'spotify': {
32
+ const [kind, id] = segments;
33
+ return kind === undefined || id === undefined
34
+ ? null
35
+ : `https://open.spotify.com/embed/${kind}/${id}`;
36
+ }
37
+ case 'soundcloud':
38
+ return `https://w.soundcloud.com/player/?url=${encodeURIComponent(rawUrl)}`;
39
+ default:
40
+ // bluesky, mastodon, other: a post embed is a script tag this theme
41
+ // does not load. The sidebar note card is the rendering.
42
+ return null;
43
+ }
44
+ }
45
+ /** A boxed sidebar note — dashed rule, small caps label — the editorial way of saying "not loaded here". */
46
+ function noteCard(block, ctx, reason) {
47
+ return h('div', { class: 'cg-sidenote__box' }, h('p', { class: 'cg-sidenote__label' }, ctx.t('embed.label')), h('p', { class: 'cg-sidenote__notice' }, reason), h('a', {
48
+ class: 'cg-sidenote__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-sidenote',
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
+ ? noteCard(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-sidenote__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,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,CAAA;IAC7B,MAAM,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,KAAK,EAAE,CAAC,CAAA;IAE5E,QAAQ,QAAQ,EAAE,CAAC;QACjB,KAAK,SAAS,EAAE,CAAC;YACf,MAAM,EAAE,GAAG,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAC,UAAU,CAAC;gBAC1C,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC;gBACb,CAAC,CAAC,CAAC,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAA;YAC9C,OAAO,EAAE,KAAK,SAAS,IAAI,EAAE,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,C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AC,QAAQ,EAAE,CAAC,CAC7D;QACH,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;YACV,KAAK,EAAE,oBAAoB;YAC3B,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;AAgC3B,wBAAgB,SAAS,CAAC,KAAK,EAAE,QAAQ,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CAiB1E"}
@@ -0,0 +1,18 @@
1
+ import { blockHeadingTag, h, heading, renderRichText, } from '@cogenta/theme-kit';
2
+ /**
3
+ * A reader-mailbag column: numbered questions set in the display serif, the
4
+ * answer running underneath once opened. `<details>`/`<summary>` still does
5
+ * all the work — expand/collapse, keyboard operation and the announced
6
+ * expanded state all come from the browser at zero bytes of JavaScript,
7
+ * exactly as in the reference theme; only the typography and the numbering
8
+ * are this theme's own.
9
+ */
10
+ function renderItem(item, ctx, index) {
11
+ return h('li', { class: 'cg-mailbag__item' }, h('details', { class: 'cg-mailbag__details' }, h('summary', { class: 'cg-mailbag__question' }, h('span', { class: 'cg-mailbag__number', 'aria-hidden': 'true' }, String(index + 1).padStart(2, '0')), h('span', { class: 'cg-mailbag__question-text' }, item.question)), h('div', { class: 'cg-mailbag__answer' }, renderRichText(ctx, item.answer))));
12
+ }
13
+ export function renderFaq(block, ctx) {
14
+ return h('section', { class: 'cg-block cg-mailbag', 'data-block': 'faq' }, block.title === undefined
15
+ ? null
16
+ : heading(blockHeadingTag('faq') ?? 'h2', { class: 'cg-mailbag__title', 'data-field': 'title' }, block.title), h('ul', { class: 'cg-mailbag__items' }, block.items.map((item, index) => renderItem(item, ctx, index))));
17
+ }
18
+ //# 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;;;;;;;GAOG;AACH,SAAS,UAAU,CAAC,IAAa,EAAE,GAAkB,EAAE,KAAa;IAClE,OAAO,CAAC,CACN,IAAI,EACJ,EAAE,KAAK,EAAE,kBAAkB,EAAE,EAC7B,CAAC,CACC,SAAS,EACT,EAAE,KAAK,EAAE,qBAAqB,EAAE,EAChC,CAAC,CACC,SAAS,EACT,EAAE,KAAK,EAAE,sBAAsB,EAAE,EACjC,CAAC,CACC,MAAM,EACN,EAAE,KAAK,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,EAAE,EACtD,MAAM,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CACnC,EACD,CAAC,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,2BAA2B,EAAE,EAAE,IAAI,CAAC,QAAQ,CAAC,CACjE,EACD,CAAC,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,oBAAoB,EAAE,EAAE,cAAc,CAAC,GAAG,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,CAC5E,CACF,CAAA;AACH,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,KAAe,EAAE,GAAkB;IAC3D,OAAO,CAAC,CACN,SAAS,EACT,EAAE,KAAK,EAAE,qBAAqB,EAAE,YAAY,EAAE,KAAK,EAAE,EACrD,KAAK,CAAC,KAAK,KAAK,SAAS;QACvB,CAAC,CAAC,IAAI;QACN,CAAC,CAAC,OAAO,CACL,eAAe,CAAC,KAAK,CAAC,IAAI,IAAI,EAC9B,EAAE,KAAK,EAAE,mBAAmB,EAAE,YAAY,EAAE,OAAO,EAAE,EACrD,KAAK,CAAC,KAAK,CACZ,EACL,CAAC,CACC,IAAI,EACJ,EAAE,KAAK,EAAE,mBAAmB,EAAE,EAC9B,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,UAAU,CAAC,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC,CAC/D,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,EACnB,MAAM,oBAAoB,CAAA;AA+B3B,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,gBAAgB,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CAmB1F"}
@@ -0,0 +1,27 @@
1
+ import { blockHeadingTag, h, heading, href, nestedHeadingTag, } from '@cogenta/theme-kit';
2
+ /**
3
+ * A contents index, not a card grid: a bordered panel, a real newspaper
4
+ * `column-rule` between the columns it falls into at width, and each entry
5
+ * numbered by a CSS counter rather than an icon chip — this vocabulary's
6
+ * `icon` names a symbol no icon set this theme ships can resolve into
7
+ * markup, so a numeral the browser generates for free reads as considered
8
+ * rather than as a placeholder.
9
+ *
10
+ * The item's own title carries the link, exactly as in the reference theme:
11
+ * a bare "read more" repeated across a grid fails WCAG 2.4.4, and the block
12
+ * has no separate label field to fix that with.
13
+ */
14
+ function renderItem(item, ctx, tag) {
15
+ const title = item.link === undefined
16
+ ? heading(tag, { class: 'cg-index__title' }, item.title)
17
+ : heading(tag, { class: 'cg-index__title' }, h('a', { class: 'cg-index__link', href: href(ctx, item.link) }, item.title));
18
+ return h('li', { class: 'cg-index__item', 'data-icon': item.icon }, title, item.text === undefined ? null : h('p', { class: 'cg-index__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-index', 'data-block': 'featureGrid' }, hasTitle
24
+ ? heading(blockHeadingTag('featureGrid') ?? 'h2', { class: 'cg-index__heading', 'data-field': 'title' }, block.title ?? '')
25
+ : null, h('ol', { class: 'cg-index__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,GAEjB,MAAM,oBAAoB,CAAA;AAE3B;;;;;;;;;;;GAWG;AACH,SAAS,UAAU,CAAC,IAAiB,EAAE,GAAkB,EAAE,GAAe;IACxE,MAAM,KAAK,GACT,IAAI,CAAC,IAAI,KAAK,SAAS;QACrB,CAAC,CAAC,O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E,EAAE,CAAC,UAAU,CAAC,IAAI,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC,CAC1D,CACF,CAAA;AACH,CAAC"}
@@ -0,0 +1,13 @@
1
+ import type { GalleryBlock } from '@cogenta/blocks';
2
+ import { type HtmlElement, type RenderContext } from '@cogenta/theme-kit';
3
+ /**
4
+ * A contact sheet: numbered frames (a CSS counter, drawn in the negative
5
+ * space of the print corner) in a tight grid with hairline gutters, rather
6
+ * than the reference theme's rounded, shadowed tiles.
7
+ *
8
+ * The carousel layout ships **no JavaScript** — a scroll-snapping, focusable,
9
+ * labelled region gives keyboard, touch and trackpad scrolling for free
10
+ * (WCAG 2.4.3/4.1.2), with none of a scripted carousel's failure modes.
11
+ */
12
+ export declare function renderGallery(block: GalleryBlock, ctx: RenderContext): HtmlElement;
13
+ //# 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;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,YAAY,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CAiClF"}
@@ -0,0 +1,26 @@
1
+ import { h, image } from '@cogenta/theme-kit';
2
+ /**
3
+ * A contact sheet: numbered frames (a CSS counter, drawn in the negative
4
+ * space of the print corner) in a tight grid with hairline gutters, rather
5
+ * than the reference theme's rounded, shadowed tiles.
6
+ *
7
+ * The carousel layout ships **no JavaScript** — a scroll-snapping, focusable,
8
+ * labelled region gives keyboard, touch and trackpad scrolling for free
9
+ * (WCAG 2.4.3/4.1.2), with none of a scripted carousel's failure modes.
10
+ */
11
+ export function renderGallery(block, ctx) {
12
+ const items = h('ul', { class: 'cg-contactsheet__items' }, block.items.map((item) => h('li', { class: 'cg-contactsheet__item' }, image(ctx, item.media, { sizes: '(min-width: 45rem) 18rem, 50vw' }))));
13
+ return h('section', {
14
+ class: 'cg-block cg-contactsheet',
15
+ 'data-block': 'gallery',
16
+ 'data-layout': block.layout,
17
+ }, block.layout === 'carousel'
18
+ ? h('div', {
19
+ class: 'cg-contactsheet__viewport',
20
+ role: 'region',
21
+ 'aria-label': ctx.t('gallery.carousel'),
22
+ tabindex: '0',
23
+ }, items)
24
+ : items);
25
+ }
26
+ //# 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;;;;;;;;GAQG;AACH,MAAM,UAAU,aAAa,CAAC,KAAmB,EAAE,GAAkB;IACnE,MAAM,KAAK,GAAG,CAAC,CACb,IAAI,EACJ,EAAE,KAAK,EAAE,wBAAwB,EAAE,EACnC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CACvB,CAAC,CACC,IAAI,EACJ,EAAE,KAAK,EAAE,uBAAuB,EAAE,EAClC,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,0BAA0B;QACjC,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,2BAA2B;YAClC,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,11 @@
1
+ import type { HeroBlock } from '@cogenta/blocks';
2
+ import { type HtmlElement, type RenderContext } from '@cogenta/theme-kit';
3
+ /**
4
+ * The cover story. `hero` carries the page's own `h1` (contract B's
5
+ * `headingLevel: 'h1'`), so this is the one place the masthead's front page
6
+ * lives: an eyebrow set as a kicker, a big serif headline, a dek, and the
7
+ * lead image on the other side of a hairline column rule — the two-column
8
+ * "story well" a print front page opens on, rather than a centred banner.
9
+ */
10
+ export declare function renderHero(block: HeroBlock, ctx: RenderContext): HtmlElement;
11
+ //# 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;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CAmC5E"}
@@ -0,0 +1,26 @@
1
+ import { actionList, blockHeadingTag, h, heading, image, } from '@cogenta/theme-kit';
2
+ /**
3
+ * The cover story. `hero` carries the page's own `h1` (contract B's
4
+ * `headingLevel: 'h1'`), so this is the one place the masthead's front page
5
+ * lives: an eyebrow set as a kicker, a big serif headline, a dek, and the
6
+ * lead image on the other side of a hairline column rule — the two-column
7
+ * "story well" a print front page opens on, rather than a centred banner.
8
+ */
9
+ export function renderHero(block, ctx) {
10
+ const tag = blockHeadingTag('hero') ?? 'h1';
11
+ return h('section', { class: 'cg-block cg-hero', 'data-block': 'hero' }, h('div', { class: 'cg-hero__grid' }, h('div', { class: 'cg-hero__copy' }, block.eyebrow === undefined
12
+ ? null
13
+ : h('p', { class: 'cg-hero__eyebrow', 'data-field': 'eyebrow' }, block.eyebrow), heading(tag, { class: 'cg-hero__title', 'data-field': 'title' }, block.title), block.subtitle === undefined
14
+ ? null
15
+ : h('p', { class: 'cg-hero__subtitle', 'data-field': 'subtitle' }, block.subtitle), actionList(ctx, block.actions, ctx.t('hero.actions'))), block.media === undefined
16
+ ? null
17
+ : h('div', { class: 'cg-hero__media' },
18
+ // The only image above the fold, so the only one loaded eagerly —
19
+ // lazy-loading it is a measured LCP regression, not a theory.
20
+ image(ctx, block.media, {
21
+ className: 'cg-hero__image',
22
+ loading: 'eager',
23
+ sizes: '(min-width: 64rem) 56vw, 100vw',
24
+ }))));
25
+ }
26
+ //# 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,EACP,KAAK,GAEN,MAAM,oBAAoB,CAAA;AAE3B;;;;;;GAMG;AACH,MAAM,UAAU,UAAU,CAAC,KAAgB,EAAE,GAAkB;IAC7D,MAAM,GAAG,GAAG,eAAe,CAAC,MAAM,CAAC,IAAI,IAAI,CAAA;IAC3C,OAAO,CAAC,CACN,SAAS,EACT,EAAE,KAAK,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,EAAE,EACnD,CAAC,CACC,KAAK,EACL,EAAE,KAAK,EAAE,eAAe,EAAE,EAC1B,CAAC,CACC,KAAK,EACL,EAAE,KAAK,EAAE,eAAe,EAAE,EAC1B,KAAK,CAAC,OAAO,KAAK,SAAS;QACzB,CAAC,CAAC,IAAI;QACN,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,EAAE,KAAK,EAAE,kBAAkB,EAAE,YAAY,EAAE,SAAS,EAAE,EAAE,KAAK,CAAC,OAAO,CAAC,EACjF,OAAO,CAAC,GAAG,EAAE,EAAE,KAAK,EAAE,gBAAgB,EAAE,YAAY,EAAE,OAAO,EAAE,EAAE,KAAK,CAAC,KAAK,CAAC,EAC7E,KAAK,CAAC,QAAQ,KAAK,SAAS;QAC1B,CAAC,CAAC,IAAI;QACN,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,EAAE,KAAK,EAAE,mBAAmB,EAAE,YAAY,EAAE,UAAU,EAAE,EAAE,KAAK,CAAC,QAAQ,CAAC,EACpF,UAAU,CAAC,GAAG,EAAE,KAAK,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CACtD,EACD,KAAK,CAAC,KAAK,KAAK,SAAS;QACvB,CAAC,CAAC,IAAI;QACN,CAAC,CAAC,CAAC,CACC,KAAK,EACL,EAAE,KAAK,EAAE,gBAAgB,EAAE;QAC3B,kEAAkE;QAClE,8DAA8D;QAC9D,KAAK,CAAC,GAAG,EAAE,KAAK,CAAC,KAAK,EAAE;YACtB,SAAS,EAAE,gBAAgB;YAC3B,OAAO,EAAE,OAAO;YAChB,KAAK,EAAE,gCAAgC;SACxC,CAAC,CACH,CACN,CACF,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;AAoBnF,wBAAgB,eAAe,CAAC,KAAK,EAAE,cAAc,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CAatF"}
@@ -0,0 +1,20 @@
1
+ import { h, image } from '@cogenta/theme-kit';
2
+ /**
3
+ * `blocks@2.0` (RFC 0001). The lighter-weight "as used by" strip next to
4
+ * `logos`'s own press row (`cg-press`, which titles itself and links each
5
+ * mark to its organisation): `logoStrip` has no per-logo name or url, so it
6
+ * carries no title and no links — a plain band of marks with an optional
7
+ * caption set underneath, the way a colophon credits its supporters along
8
+ * the bottom of a masthead page. Each image's own alt text (set once, in
9
+ * the media library) is what names it, exactly as `logos` already falls
10
+ * back to when a link is absent.
11
+ */
12
+ function renderItem(item, ctx) {
13
+ return h('li', { class: 'cg-imprint__item' }, image(ctx, item.media, { className: 'cg-imprint__image', variant: { fit: 'contain' } }));
14
+ }
15
+ export function renderLogoStrip(block, ctx) {
16
+ return h('figure', { class: 'cg-block cg-imprint', 'data-block': 'logoStrip' }, h('ul', { class: 'cg-imprint__items' }, block.logos.map((item) => renderItem(item, ctx))), block.caption === undefined
17
+ ? null
18
+ : h('figcaption', { class: 'cg-imprint__caption', 'data-field': 'caption' }, block.caption));
19
+ }
20
+ //# 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;;;;;;;;;GASG;AACH,SAAS,UAAU,CAAC,IAAmB,EAAE,GAAkB;IACzD,OAAO,CAAC,CACN,IAAI,EACJ,EAAE,KAAK,EAAE,kBAAkB,EAAE,EAC7B,KAAK,CAAC,GAAG,EAAE,IAAI,CAAC,KAAK,EAAE,EAAE,SAAS,EAAE,mBAAmB,EAAE,OAAO,EAAE,EAAE,GAAG,EAAE,SAAS,EAAE,EAAE,CAAC,CACxF,CAAA;AACH,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,KAAqB,EAAE,GAAkB;IACvE,OAAO,CAAC,CACN,QAAQ,EACR,EAAE,KAAK,EAAE,qBAAqB,EAAE,YAAY,EAAE,WAAW,EAAE,EAC3D,CAAC,CACC,IAAI,EACJ,EAAE,KAAK,EAAE,mBAAmB,EAAE,EAC9B,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,qBAAqB,EAAE,YAAY,EAAE,SAAS,EAAE,EAAE,KAAK,CAAC,OAAO,CAAC,CAC9F,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;AA+B3B,wBAAgB,WAAW,CAAC,KAAK,EAAE,UAAU,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CAiB9E"}
@@ -0,0 +1,27 @@
1
+ import { blockHeadingTag, h, heading, image, } from '@cogenta/theme-kit';
2
+ /**
3
+ * A press strip — "As seen in" — a single row divided by hairline rules
4
+ * rather than a card grid, the way a masthead credits its syndication
5
+ * partners along one line.
6
+ *
7
+ * The organisation's name is contract B's own accessible name for the link:
8
+ * the logo image carries it as `alt` when the media entity has none, so no
9
+ * visually hidden duplicate text is needed — a link whose only content is an
10
+ * image with `alt` text is already named.
11
+ */
12
+ function renderItem(item, ctx) {
13
+ const logo = image(ctx, item.media, {
14
+ className: 'cg-press__image',
15
+ altFrom: item.name,
16
+ variant: { fit: 'contain' },
17
+ });
18
+ return h('li', { class: 'cg-press__item' }, item.url === undefined
19
+ ? logo
20
+ : h('a', { class: 'cg-press__link', href: ctx.link(item.url), rel: 'noopener noreferrer' }, logo));
21
+ }
22
+ export function renderLogos(block, ctx) {
23
+ return h('section', { class: 'cg-block cg-press', 'data-block': 'logos' }, block.title === undefined
24
+ ? null
25
+ : heading(blockHeadingTag('logos') ?? 'h2', { class: 'cg-press__title', 'data-field': 'title' }, block.title), h('ul', { class: 'cg-press__items' }, block.items.map((item) => renderItem(item, ctx))));
26
+ }
27
+ //# 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;;;;;;;;;GASG;AACH,SAAS,UAAU,CAAC,IAAc,EAAE,GAAkB;IACpD,MAAM,IAAI,GAAG,KAAK,CAAC,GAAG,EAAE,IAAI,CAAC,KAAK,EAAE;QAClC,SAAS,EAAE,iBAAiB;QAC5B,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,gBAAgB,EAAE,EAC3B,IAAI,CAAC,GAAG,KAAK,SAAS;QACpB,CAAC,CAAC,IAAI;QACN,CAAC,CAAC,CAAC,CACC,GAAG,EACH,EAAE,KAAK,EAAE,gBAAgB,EAAE,IAAI,EAAE,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,qBAAqB,EAAE,EACjF,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,15 @@
1
+ import type { MediaFigureBlock } from '@cogenta/blocks';
2
+ import { type HtmlElement, type RenderContext } from '@cogenta/theme-kit';
3
+ /**
4
+ * A plate, in the print sense: the picture runs large, and the caption sits
5
+ * under a hairline rule set in small caps with the credit line trailing it —
6
+ * the way a photo essay is captioned, rather than a card with a paragraph
7
+ * under it.
8
+ *
9
+ * `<figure>`/`<figcaption>` keep the caption announced as belonging to the
10
+ * image; `align` stays a data attribute (contract B's intent, not a class),
11
+ * so the skin — here, this theme — decides what `start`/`end`/`wide`/`full`
12
+ * mean.
13
+ */
14
+ export declare function renderMediaFigure(block: MediaFigureBlock, ctx: RenderContext): HtmlElement;
15
+ //# 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;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,gBAAgB,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CA4B1F"}
@@ -0,0 +1,32 @@
1
+ import { aspectRatio, h, image } from '@cogenta/theme-kit';
2
+ /**
3
+ * A plate, in the print sense: the picture runs large, and the caption sits
4
+ * under a hairline rule set in small caps with the credit line trailing it —
5
+ * the way a photo essay is captioned, rather than a card with a paragraph
6
+ * under it.
7
+ *
8
+ * `<figure>`/`<figcaption>` keep the caption announced as belonging to the
9
+ * image; `align` stays a data attribute (contract B's intent, not a class),
10
+ * so the skin — here, this theme — decides what `start`/`end`/`wide`/`full`
11
+ * mean.
12
+ */
13
+ export function renderMediaFigure(block, ctx) {
14
+ const ratio = aspectRatio(block.ratio);
15
+ const hasCaption = block.caption !== undefined || block.credit !== undefined;
16
+ return h('figure', {
17
+ class: 'cg-block cg-plate',
18
+ 'data-block': 'mediaFigure',
19
+ 'data-align': block.align ?? 'center',
20
+ style: ratio === undefined ? undefined : `--cg-ratio:${ratio}`,
21
+ }, image(ctx, block.media, {
22
+ className: 'cg-plate__media',
23
+ sizes: '(min-width: 60rem) 48rem, 100vw',
24
+ }), hasCaption
25
+ ? h('figcaption', { class: 'cg-plate__caption' }, block.caption === undefined
26
+ ? null
27
+ : h('span', { class: 'cg-plate__text' }, block.caption), block.credit === undefined
28
+ ? null
29
+ : h('span', { class: 'cg-plate__credit', 'data-field': 'credit' }, block.credit))
30
+ : null);
31
+ }
32
+ //# 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;;;;;;;;;;GAUG;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,mBAAmB;QAC1B,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,iBAAiB;QAC5B,KAAK,EAAE,iCAAiC;KACzC,CAAC,EACF,UAAU;QACR,CAAC,CAAC,CAAC,CACC,YAAY,EACZ,EAAE,KAAK,EAAE,mBAAmB,EAAE,EAC9B,KAAK,CAAC,OAAO,KAAK,SAAS;YACzB,CAAC,CAAC,IAAI;YACN,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,gBAAgB,EAAE,EAAE,KAAK,CAAC,OAAO,CAAC,EACzD,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,CACnF;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;AA8C3B,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,iBAAiB,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CAmB5F"}
@@ -0,0 +1,32 @@
1
+ import { actionLink, blockHeadingTag, h, heading, nestedHeadingTag, } from '@cogenta/theme-kit';
2
+ /**
3
+ * `blocks@2.0` (RFC 0001). A classified-ads rate card: tiers set side by
4
+ * side and separated by the theme's one visible column rule (the same
5
+ * device `hero` and `collectionList` use), rather than a set of raised
6
+ * cards — a print page has no elevation to raise a card off of.
7
+ *
8
+ * `highlighted` is an editorial signal, not a colour: it becomes
9
+ * `data-highlighted` for the stylesheet to pick up (an ink-reversed panel,
10
+ * here) and `aria-current` so it is announced, not only shown.
11
+ */
12
+ function renderTier(tier, ctx, tag) {
13
+ return h('li', {
14
+ class: 'cg-ratecard__tier',
15
+ 'data-highlighted': tier.highlighted === true ? 'true' : undefined,
16
+ 'aria-current': tier.highlighted === true ? 'true' : undefined,
17
+ }, heading(tag, { class: 'cg-ratecard__name' }, tier.name), h('p', { class: 'cg-ratecard__price' }, h('span', { class: 'cg-ratecard__amount' }, tier.price), tier.interval === undefined
18
+ ? null
19
+ : h('span', { class: 'cg-ratecard__interval' }, tier.interval)), tier.features.length === 0
20
+ ? null
21
+ : h('ul', { class: 'cg-ratecard__features' }, tier.features.map((feature) => h('li', { class: 'cg-ratecard__feature' }, feature))), tier.action === undefined
22
+ ? null
23
+ : h('div', { class: 'cg-ratecard__action' }, actionLink(ctx, { ...tier.action, emphasis: tier.action.emphasis ?? 'primary' })));
24
+ }
25
+ export function renderPricingTable(block, ctx) {
26
+ const hasTitle = block.title !== undefined;
27
+ const tierTag = nestedHeadingTag('pricingTable', hasTitle);
28
+ return h('section', { class: 'cg-block cg-ratecard', 'data-block': 'pricingTable' }, hasTitle
29
+ ? heading(blockHeadingTag('pricingTable') ?? 'h2', { class: 'cg-ratecard__title', 'data-field': 'title' }, block.title ?? '')
30
+ : null, h('ul', { class: 'cg-ratecard__tiers' }, block.tiers.map((tier) => renderTier(tier, ctx, tierTag))));
31
+ }
32
+ //# 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;;;;;;;;;GASG;AACH,SAAS,UAAU,CAAC,IAAiB,EAAE,GAAkB,EAAE,GAAe;IACxE,OAAO,CAAC,CACN,IAAI,EACJ;QACE,KAAK,EAAE,mBAAmB;QAC1B,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,mBAAmB,EAAE,EAAE,IAAI,CAAC,IAAI,CAAC,EACvD,CAAC,CACC,GAAG,EACH,EAAE,KAAK,EAAE,oBAAoB,EAAE,EAC/B,CAAC,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,qBAAqB,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,EACvD,IAAI,CAAC,QAAQ,KAAK,SAAS;QACzB,CAAC,CAAC,IAAI;QACN,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,uBAAuB,EAAE,EAAE,IAAI,CAAC,QAAQ,CAAC,CACjE,EACD,IAAI,CAAC,QAAQ,CA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C,CAAC,CAC1D,CACF,CAAA;AACH,CAAC"}
@@ -0,0 +1,16 @@
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, and `renderRichText` (shared, `@cogenta/theme-kit`) is what actually
6
+ * turns the document into markup, including its embedded figures
7
+ * (`.cg-prose__figure`, a class name that module already fixes — this file's
8
+ * own container class has to match it).
9
+ *
10
+ * The drop cap and the pull-quote treatment on a nested `<blockquote>` are
11
+ * both pure CSS, keyed off `.cg-prose > :first-child` and `.cg-prose
12
+ * blockquote` in `blocks.css` — nothing here has to know which paragraph
13
+ * came first.
14
+ */
15
+ export declare function renderProse(block: ProseBlock, ctx: RenderContext): HtmlElement;
16
+ //# 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;;;;;;;;;;;GAWG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,UAAU,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CAM9E"}
@@ -0,0 +1,17 @@
1
+ import { h, renderRichText } from '@cogenta/theme-kit';
2
+ /**
3
+ * `prose` declares `headingLevel: 'none'` — it contributes no heading of its
4
+ * own, and `renderRichText` (shared, `@cogenta/theme-kit`) is what actually
5
+ * turns the document into markup, including its embedded figures
6
+ * (`.cg-prose__figure`, a class name that module already fixes — this file's
7
+ * own container class has to match it).
8
+ *
9
+ * The drop cap and the pull-quote treatment on a nested `<blockquote>` are
10
+ * both pure CSS, keyed off `.cg-prose > :first-child` and `.cg-prose
11
+ * blockquote` in `blocks.css` — nothing here has to know which paragraph
12
+ * came first.
13
+ */
14
+ export function renderProse(block, ctx) {
15
+ return h('div', { class: 'cg-block cg-prose', 'data-block': 'prose' }, renderRichText(ctx, block.body));
16
+ }
17
+ //# 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;;;;;;;;;;;GAWG;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,16 @@
1
+ import type { QuoteBlock } from '@cogenta/blocks';
2
+ import { type HtmlElement, type RenderContext } from '@cogenta/theme-kit';
3
+ /**
4
+ * The pull quote — the one typographic gesture a magazine spread always
5
+ * makes. Set large in the display serif, indented from a heavy left rule
6
+ * rather than centred under a giant glyph, with the attribution trailing it
7
+ * on its own line, joined by a typographic em-rule instead of a comma the
8
+ * markup does not carry.
9
+ *
10
+ * `<figure><blockquote>…</blockquote><figcaption>` is the attribution
11
+ * pattern the HTML spec itself prescribes — the author's name sitting
12
+ * outside the `<blockquote>` is what stops it from being claimed as part of
13
+ * what was said.
14
+ */
15
+ export declare function renderQuote(block: QuoteBlock, ctx: RenderContext): HtmlElement;
16
+ //# 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;;;;;;;;;;;GAWG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,UAAU,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CA8B9E"}
@@ -0,0 +1,29 @@
1
+ import { h, image } from '@cogenta/theme-kit';
2
+ /**
3
+ * The pull quote — the one typographic gesture a magazine spread always
4
+ * makes. Set large in the display serif, indented from a heavy left rule
5
+ * rather than centred under a giant glyph, with the attribution trailing it
6
+ * on its own line, joined by a typographic em-rule instead of a comma the
7
+ * markup does not carry.
8
+ *
9
+ * `<figure><blockquote>…</blockquote><figcaption>` is the attribution
10
+ * pattern the HTML spec itself prescribes — the author's name sitting
11
+ * outside the `<blockquote>` is what stops it from being claimed as part of
12
+ * what was said.
13
+ */
14
+ export function renderQuote(block, ctx) {
15
+ const hasAttribution = block.author !== undefined || block.role !== undefined || block.avatar !== undefined;
16
+ return h('figure', { class: 'cg-block cg-pullquote', 'data-block': 'quote' }, h('blockquote', { class: 'cg-pullquote__text' }, h('p', { 'data-field': 'text' }, block.text)), hasAttribution
17
+ ? h('figcaption', { class: 'cg-pullquote__attribution' }, block.avatar === undefined
18
+ ? null
19
+ : image(ctx, block.avatar, {
20
+ className: 'cg-pullquote__avatar',
21
+ variant: { width: 96, height: 96, fit: 'cover' },
22
+ }), h('span', { class: 'cg-pullquote__names' }, block.author === undefined
23
+ ? null
24
+ : h('span', { class: 'cg-pullquote__author', 'data-field': 'author' }, block.author), block.role === undefined
25
+ ? null
26
+ : h('span', { class: 'cg-pullquote__role', 'data-field': 'role' }, block.role)))
27
+ : null);
28
+ }
29
+ //# 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;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,WAAW,CAAC,KA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ACH,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;AAkB3B,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,gBAAgB,EAAE,IAAI,EAAE,aAAa,GAAG,WAAW,CAa3F"}