@cogenta/theme-magazine 1.1.3 → 1.3.3

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 (126) hide show
  1. package/dist/src/index.d.ts +3 -0
  2. package/dist/src/index.d.ts.map +1 -1
  3. package/dist/src/index.js +3 -0
  4. package/dist/src/index.js.map +1 -1
  5. package/dist/src/render/article.d.ts +32 -0
  6. package/dist/src/render/article.d.ts.map +1 -0
  7. package/dist/src/render/article.js +137 -0
  8. package/dist/src/render/article.js.map +1 -0
  9. package/dist/src/render/blocks/accordion.d.ts.map +1 -1
  10. package/dist/src/render/blocks/accordion.js +9 -13
  11. package/dist/src/render/blocks/accordion.js.map +1 -1
  12. package/dist/src/render/blocks/collection-list.d.ts.map +1 -1
  13. package/dist/src/render/blocks/collection-list.js +91 -118
  14. package/dist/src/render/blocks/collection-list.js.map +1 -1
  15. package/dist/src/render/blocks/cta.d.ts +4 -4
  16. package/dist/src/render/blocks/cta.d.ts.map +1 -1
  17. package/dist/src/render/blocks/cta.js +7 -9
  18. package/dist/src/render/blocks/cta.js.map +1 -1
  19. package/dist/src/render/blocks/embed.d.ts.map +1 -1
  20. package/dist/src/render/blocks/embed.js +17 -20
  21. package/dist/src/render/blocks/embed.js.map +1 -1
  22. package/dist/src/render/blocks/faq.d.ts.map +1 -1
  23. package/dist/src/render/blocks/faq.js +12 -11
  24. package/dist/src/render/blocks/faq.js.map +1 -1
  25. package/dist/src/render/blocks/feature-grid.d.ts.map +1 -1
  26. package/dist/src/render/blocks/feature-grid.js +13 -20
  27. package/dist/src/render/blocks/feature-grid.js.map +1 -1
  28. package/dist/src/render/blocks/gallery.d.ts +6 -6
  29. package/dist/src/render/blocks/gallery.d.ts.map +1 -1
  30. package/dist/src/render/blocks/gallery.js +15 -13
  31. package/dist/src/render/blocks/gallery.js.map +1 -1
  32. package/dist/src/render/blocks/hero.d.ts +6 -5
  33. package/dist/src/render/blocks/hero.d.ts.map +1 -1
  34. package/dist/src/render/blocks/hero.js +15 -14
  35. package/dist/src/render/blocks/hero.js.map +1 -1
  36. package/dist/src/render/blocks/logo-strip.d.ts.map +1 -1
  37. package/dist/src/render/blocks/logo-strip.js +8 -11
  38. package/dist/src/render/blocks/logo-strip.js.map +1 -1
  39. package/dist/src/render/blocks/logos.d.ts.map +1 -1
  40. package/dist/src/render/blocks/logos.js +16 -16
  41. package/dist/src/render/blocks/logos.js.map +1 -1
  42. package/dist/src/render/blocks/media-figure.d.ts +8 -8
  43. package/dist/src/render/blocks/media-figure.d.ts.map +1 -1
  44. package/dist/src/render/blocks/media-figure.js +23 -19
  45. package/dist/src/render/blocks/media-figure.js.map +1 -1
  46. package/dist/src/render/blocks/pricing-table.d.ts.map +1 -1
  47. package/dist/src/render/blocks/pricing-table.js +19 -22
  48. package/dist/src/render/blocks/pricing-table.js.map +1 -1
  49. package/dist/src/render/blocks/prose.d.ts +6 -10
  50. package/dist/src/render/blocks/prose.d.ts.map +1 -1
  51. package/dist/src/render/blocks/prose.js +8 -11
  52. package/dist/src/render/blocks/prose.js.map +1 -1
  53. package/dist/src/render/blocks/quote.d.ts +6 -9
  54. package/dist/src/render/blocks/quote.d.ts.map +1 -1
  55. package/dist/src/render/blocks/quote.js +11 -13
  56. package/dist/src/render/blocks/quote.js.map +1 -1
  57. package/dist/src/render/blocks/stat-counter.d.ts.map +1 -1
  58. package/dist/src/render/blocks/stat-counter.js +9 -10
  59. package/dist/src/render/blocks/stat-counter.js.map +1 -1
  60. package/dist/src/render/blocks/stats.d.ts.map +1 -1
  61. package/dist/src/render/blocks/stats.js +9 -12
  62. package/dist/src/render/blocks/stats.js.map +1 -1
  63. package/dist/src/render/blocks/testimonial.d.ts +4 -13
  64. package/dist/src/render/blocks/testimonial.d.ts.map +1 -1
  65. package/dist/src/render/blocks/testimonial.js +7 -15
  66. package/dist/src/render/blocks/testimonial.js.map +1 -1
  67. package/dist/src/render/chrome.d.ts.map +1 -1
  68. package/dist/src/render/chrome.js +109 -97
  69. package/dist/src/render/chrome.js.map +1 -1
  70. package/dist/src/render/layout.d.ts +28 -0
  71. package/dist/src/render/layout.d.ts.map +1 -0
  72. package/dist/src/render/layout.js +72 -0
  73. package/dist/src/render/layout.js.map +1 -0
  74. package/dist/src/render/render-block.d.ts +15 -13
  75. package/dist/src/render/render-block.d.ts.map +1 -1
  76. package/dist/src/render/render-block.js +53 -29
  77. package/dist/src/render/render-block.js.map +1 -1
  78. package/dist/src/render/story.d.ts +41 -0
  79. package/dist/src/render/story.d.ts.map +1 -0
  80. package/dist/src/render/story.js +65 -0
  81. package/dist/src/render/story.js.map +1 -0
  82. package/dist/src/render/term-archive.d.ts +0 -10
  83. package/dist/src/render/term-archive.d.ts.map +1 -1
  84. package/dist/src/render/term-archive.js +42 -19
  85. package/dist/src/render/term-archive.js.map +1 -1
  86. package/dist/src/render/widget-areas.d.ts +12 -0
  87. package/dist/src/render/widget-areas.d.ts.map +1 -0
  88. package/dist/src/render/widget-areas.js +19 -0
  89. package/dist/src/render/widget-areas.js.map +1 -0
  90. package/dist/theme.config.js +2 -2
  91. package/dist/theme.config.js.map +1 -1
  92. package/package.json +5 -5
  93. package/src/index.ts +3 -0
  94. package/src/render/article.ts +239 -0
  95. package/src/render/blocks/accordion.ts +23 -30
  96. package/src/render/blocks/collection-list.ts +161 -225
  97. package/src/render/blocks/cta.ts +19 -13
  98. package/src/render/blocks/embed.ts +40 -36
  99. package/src/render/blocks/faq.ts +31 -36
  100. package/src/render/blocks/feature-grid.ts +26 -36
  101. package/src/render/blocks/gallery.ts +24 -18
  102. package/src/render/blocks/hero.ts +32 -32
  103. package/src/render/blocks/logo-strip.ts +17 -17
  104. package/src/render/blocks/logos.ts +23 -31
  105. package/src/render/blocks/media-figure.ts +36 -20
  106. package/src/render/blocks/pricing-table.ts +29 -34
  107. package/src/render/blocks/prose.ts +13 -13
  108. package/src/render/blocks/quote.ts +24 -24
  109. package/src/render/blocks/stat-counter.ts +16 -24
  110. package/src/render/blocks/stats.ts +14 -24
  111. package/src/render/blocks/testimonial.ts +12 -17
  112. package/src/render/chrome.ts +123 -104
  113. package/src/render/layout.ts +105 -0
  114. package/src/render/render-block.ts +61 -33
  115. package/src/render/story.ts +139 -0
  116. package/src/render/term-archive.ts +111 -58
  117. package/src/render/widget-areas.ts +22 -0
  118. package/src/styles/archive.css +114 -17
  119. package/src/styles/article.css +237 -0
  120. package/src/styles/base.css +848 -591
  121. package/src/styles/blocks.css +903 -921
  122. package/src/styles/stories.css +593 -0
  123. package/src/styles/theme.css +28 -9
  124. package/src/styles/tokens.css +200 -185
  125. package/src/styles/widgets.css +614 -0
  126. package/tokens.json +18 -18
@@ -1,3 +1,4 @@
1
+ export * from './render/article.js';
1
2
  export * from './render/blocks/accordion.js';
2
3
  export * from './render/blocks/collection-list.js';
3
4
  export * from './render/blocks/cta.js';
@@ -17,5 +18,7 @@ export * from './render/blocks/stats.js';
17
18
  export * from './render/blocks/testimonial.js';
18
19
  export * from './render/chrome.js';
19
20
  export * from './render/render-block.js';
21
+ export * from './render/story.js';
20
22
  export * from './render/term-archive.js';
23
+ export * from './render/widget-areas.js';
21
24
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAA;AAC5C,cAAc,oCAAoC,CAAA;AAClD,cAAc,wBAAwB,CAAA;AACtC,cAAc,0BAA0B,CAAA;AACxC,cAAc,wBAAwB,CAAA;AACtC,cAAc,iCAAiC,CAAA;AAC/C,cAAc,4BAA4B,CAAA;AAC1C,cAAc,yBAAyB,CAAA;AACvC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,0BAA0B,CAAA;AACxC,cAAc,iCAAiC,CAAA;AAC/C,cAAc,kCAAkC,CAAA;AAChD,cAAc,0BAA0B,CAAA;AACxC,cAAc,0BAA0B,CAAA;AACxC,cAAc,iCAAiC,CAAA;AAC/C,cAAc,0BAA0B,CAAA;AACxC,cAAc,gCAAgC,CAAA;AAC9C,cAAc,oBAAoB,CAAA;AAClC,cAAc,0BAA0B,CAAA;AACxC,cAAc,0BAA0B,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAA;AACnC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,oCAAoC,CAAA;AAClD,cAAc,wBAAwB,CAAA;AACtC,cAAc,0BAA0B,CAAA;AACxC,cAAc,wBAAwB,CAAA;AACtC,cAAc,iCAAiC,CAAA;AAC/C,cAAc,4BAA4B,CAAA;AAC1C,cAAc,yBAAyB,CAAA;AACvC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,0BAA0B,CAAA;AACxC,cAAc,iCAAiC,CAAA;AAC/C,cAAc,kCAAkC,CAAA;AAChD,cAAc,0BAA0B,CAAA;AACxC,cAAc,0BAA0B,CAAA;AACxC,cAAc,iCAAiC,CAAA;AAC/C,cAAc,0BAA0B,CAAA;AACxC,cAAc,gCAAgC,CAAA;AAC9C,cAAc,oBAAoB,CAAA;AAClC,cAAc,0BAA0B,CAAA;AACxC,cAAc,mBAAmB,CAAA;AACjC,cAAc,0BAA0B,CAAA;AACxC,cAAc,0BAA0B,CAAA"}
package/dist/src/index.js CHANGED
@@ -1,3 +1,4 @@
1
+ export * from './render/article.js';
1
2
  export * from './render/blocks/accordion.js';
2
3
  export * from './render/blocks/collection-list.js';
3
4
  export * from './render/blocks/cta.js';
@@ -17,5 +18,7 @@ export * from './render/blocks/stats.js';
17
18
  export * from './render/blocks/testimonial.js';
18
19
  export * from './render/chrome.js';
19
20
  export * from './render/render-block.js';
21
+ export * from './render/story.js';
20
22
  export * from './render/term-archive.js';
23
+ export * from './render/widget-areas.js';
21
24
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,C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ularyBlock } from '@cogenta/blocks';
2
+ import { type HtmlElement, type PageContent, type PageEntryMeta, type PageEntryTerm, type RenderContext } from '@cogenta/theme-kit';
3
+ /**
4
+ * A page is set as an article when its entry carries anything an article has
5
+ * (a date, a standfirst, a picture, a classification). A reading time alone
6
+ * does not count: every page with a few paragraphs has one, and an About page
7
+ * set with a byline rule, "2 min read" and a drop cap reads as a news story.
8
+ */
9
+ export declare function isArticle(entry: PageEntryMeta | undefined): entry is PageEntryMeta;
10
+ export interface ArticleTerms {
11
+ readonly kicker: PageEntryTerm | undefined;
12
+ readonly byline: readonly PageEntryTerm[];
13
+ readonly other: readonly PageEntryTerm[];
14
+ }
15
+ export declare function articleTerms(entry: PageEntryMeta): ArticleTerms;
16
+ /** The article opens its body with a photograph of its own: that figure, captioned, is the lead image. */
17
+ export declare function opensWithFigure(blocks: readonly VocabularyBlock[]): boolean;
18
+ export declare function renderArticleHeader(page: PageContent, entry: PageEntryMeta, ctx: RenderContext): HtmlElement;
19
+ /**
20
+ * The foot of an article: every term that is neither its section nor a name
21
+ * in its byline, each a link to its archive when it has one. `null` when
22
+ * there is none, so an article ends on its last paragraph.
23
+ */
24
+ export declare function renderArticleFooter(entry: PageEntryMeta): HtmlElement | null;
25
+ /**
26
+ * The title of a page that is not an article. A page that opens on running
27
+ * text (About, Standards) takes the title over its reading column, the way an
28
+ * article does, without an article's furniture; any other page (a pricing
29
+ * page, a landing page) sets its title as a section title on a heavy rule.
30
+ */
31
+ export declare function renderPageHeader(page: PageContent): HtmlElement;
32
+ //# sourceMappingURL=article.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"article.d.ts","sourceRoot":"","sources":["../../../src/render/article.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACtD,OAAO,EACL,KAAK,WAAW,EAEhB,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,aAAa,EAEnB,MAAM,oBAAoB,CAAA;AAmD3B;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,aAAa,GAAG,SAAS,GAAG,KAAK,IAAI,aAAa,CAQlF;AAQD,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,MAAM,EAAE,aAAa,GAAG,SAAS,CAAA;IAC1C,QAAQ,CAAC,MAAM,EAAE,SAAS,aAAa,EAAE,CAAA;IACzC,QAAQ,CAAC,KAAK,EAAE,SAAS,aAAa,EAAE,CAAA;CACzC;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,aAAa,GAAG,YAAY,CAM/D;AAED,0GAA0G;AAC1G,wBAAgB,eAAe,CAAC,MAAM,EAAE,SAAS,eAAe,EAAE,GAAG,OAAO,CAE3E;AAmDD,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,WAAW,EACjB,KAAK,EAAE,aAAa,EACpB,GAAG,EAAE,aAAa,GACjB,WAAW,CAoCb;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,aAAa,GAAG,WAAW,GAAG,IAAI,CAsB5E;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,WAAW,GAAG,WAAW,CAW/D"}
@@ -0,0 +1,137 @@
1
+ import { h, renderImageSource, } from '@cogenta/theme-kit';
2
+ import { longDate } from './layout.js';
3
+ /**
4
+ * The article page, built from `PageContent.entry` (contract D `theme@1.4`)
5
+ * rather than from `renderEntryHeader`'s shared default, because a newspaper
6
+ * sets its furniture in a fixed order: the section as a red kicker, a very
7
+ * large headline, the standfirst in italic, then the byline and the date
8
+ * between hairlines, then the lead photograph.
9
+ *
10
+ * Classification is read by taxonomy name, the one convention this theme
11
+ * adds on top of contract D:
12
+ *
13
+ * - a term of a taxonomy named like a section (`section`, `category`,
14
+ * `topic`, `department`, `rubric`) is the kicker;
15
+ * - a term of a taxonomy named like a byline (`author`, `authors`, `byline`,
16
+ * `contributor`, `writer`) is a name in the byline, linked to that
17
+ * writer's archive;
18
+ * - `entry.author` (the account that wrote the entry, when it has a public
19
+ * name) is the byline only when no byline term exists;
20
+ * - every other term is listed at the foot of the article.
21
+ *
22
+ * A byline is a list of names and nothing else: "By" and "and" are words in
23
+ * a language, and a theme has no translation for them, so the separators are
24
+ * drawn by the stylesheet.
25
+ */
26
+ const SECTION_TAXONOMIES = new Set([
27
+ 'section',
28
+ 'sections',
29
+ 'category',
30
+ 'categories',
31
+ 'topic',
32
+ 'topics',
33
+ 'department',
34
+ 'rubric',
35
+ ]);
36
+ const BYLINE_TAXONOMIES = new Set([
37
+ 'author',
38
+ 'authors',
39
+ 'byline',
40
+ 'contributor',
41
+ 'contributors',
42
+ 'writer',
43
+ 'writers',
44
+ ]);
45
+ /** Below this, a reading time tells a reader nothing they can use. */
46
+ const MIN_READING_MINUTES_SHOWN = 2;
47
+ /**
48
+ * A page is set as an article when its entry carries anything an article has
49
+ * (a date, a standfirst, a picture, a classification). A reading time alone
50
+ * does not count: every page with a few paragraphs has one, and an About page
51
+ * set with a byline rule, "2 min read" and a drop cap reads as a news story.
52
+ */
53
+ export function isArticle(entry) {
54
+ if (entry === undefined)
55
+ return false;
56
+ return (entry.publishedAt !== undefined ||
57
+ entry.excerpt !== undefined ||
58
+ entry.image !== undefined ||
59
+ (entry.terms ?? []).length > 0);
60
+ }
61
+ function termNode(term, className) {
62
+ return term.href === null
63
+ ? h('span', { class: className }, term.label)
64
+ : h('a', { class: className, href: term.href }, term.label);
65
+ }
66
+ export function articleTerms(entry) {
67
+ const terms = entry.terms ?? [];
68
+ const kicker = terms.find((term) => SECTION_TAXONOMIES.has(term.taxonomy));
69
+ const byline = terms.filter((term) => BYLINE_TAXONOMIES.has(term.taxonomy));
70
+ const other = terms.filter((term) => term !== kicker && !BYLINE_TAXONOMIES.has(term.taxonomy));
71
+ return { kicker, byline, other };
72
+ }
73
+ /** The article opens its body with a photograph of its own: that figure, captioned, is the lead image. */
74
+ export function opensWithFigure(blocks) {
75
+ return blocks[0]?._type === 'mediaFigure';
76
+ }
77
+ function renderByline(entry, terms) {
78
+ if (terms.byline.length > 0) {
79
+ return h('ul', { class: 'cg-byline' }, terms.byline.map((term) => h('li', { class: 'cg-byline__name' }, termNode(term, 'cg-byline__link'))));
80
+ }
81
+ if (entry.author === undefined)
82
+ return null;
83
+ return h('ul', { class: 'cg-byline' }, h('li', { class: 'cg-byline__name' }, entry.author.name));
84
+ }
85
+ function renderMeta(entry, terms, ctx) {
86
+ const byline = renderByline(entry, terms);
87
+ const date = entry.publishedAt === undefined ? null : longDate(entry.publishedAt, ctx.locale);
88
+ const minutes = entry.readingMinutes !== undefined && entry.readingMinutes >= MIN_READING_MINUTES_SHOWN
89
+ ? entry.readingMinutes
90
+ : undefined;
91
+ if (byline === null && date === null && minutes === undefined)
92
+ return null;
93
+ return h('div', { class: 'cg-article-head__meta' }, byline, date === null && minutes === undefined
94
+ ? null
95
+ : h('p', { class: 'cg-article-head__dateline' }, date === null || entry.publishedAt === undefined
96
+ ? null
97
+ : h('time', { class: 'cg-article-head__date', datetime: entry.publishedAt }, date), minutes === undefined
98
+ ? null
99
+ : h('span', { class: 'cg-article-head__reading-time' }, ctx.t('entry.readingTime', { minutes }))));
100
+ }
101
+ export function renderArticleHeader(page, entry, ctx) {
102
+ const terms = articleTerms(entry);
103
+ const cover = entry.image === undefined || opensWithFigure(page.blocks)
104
+ ? null
105
+ : h('figure', { class: 'cg-article-head__cover' }, renderImageSource(entry.image, {
106
+ className: 'cg-article-head__image',
107
+ loading: 'eager',
108
+ sizes: '(min-width: 64rem) 66rem, 100vw',
109
+ }));
110
+ return h('header', { class: 'cg-article-head', 'data-cover': cover === null ? 'none' : 'image' }, h('div', { class: 'cg-container cg-article-head__inner' }, terms.kicker === undefined
111
+ ? null
112
+ : h('p', { class: 'cg-article-head__kicker' }, termNode(terms.kicker, 'cg-article-head__kicker-link')), h('h1', { class: 'cg-article-head__title' }, page.title), entry.excerpt === undefined
113
+ ? null
114
+ : h('p', { class: 'cg-article-head__standfirst' }, entry.excerpt), renderMeta(entry, terms, ctx), cover));
115
+ }
116
+ /**
117
+ * The foot of an article: every term that is neither its section nor a name
118
+ * in its byline, each a link to its archive when it has one. `null` when
119
+ * there is none, so an article ends on its last paragraph.
120
+ */
121
+ export function renderArticleFooter(entry) {
122
+ const { other } = articleTerms(entry);
123
+ if (other.length === 0)
124
+ return null;
125
+ return h('footer', { class: 'cg-article-foot' }, h('div', { class: 'cg-container cg-article-foot__inner' }, h('ul', { class: 'cg-article-foot__terms' }, other.map((term) => h('li', { class: 'cg-article-foot__term', 'data-taxonomy': term.taxonomy }, termNode(term, 'cg-article-foot__link'))))));
126
+ }
127
+ /**
128
+ * The title of a page that is not an article. A page that opens on running
129
+ * text (About, Standards) takes the title over its reading column, the way an
130
+ * article does, without an article's furniture; any other page (a pricing
131
+ * page, a landing page) sets its title as a section title on a heavy rule.
132
+ */
133
+ export function renderPageHeader(page) {
134
+ const text = page.blocks[0]?._type === 'prose';
135
+ return h('header', { class: 'cg-page-head', 'data-layout': text ? 'text' : 'section' }, h('div', { class: 'cg-container cg-page-head__inner' }, h('h1', { class: 'cg-page-head__title' }, page.title)));
136
+ }
137
+ //# sourceMappingURL=article.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"article.js","sourceRoot":"","sources":["../../../src/render/article.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,CAAC,EAKD,iBAAiB,GAClB,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAEtC;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,MAAM,kBAAkB,GAAwB,IAAI,GAAG,CAAC;IACtD,SAAS;IACT,UAAU;IACV,UAAU;IACV,YAAY;IACZ,OAAO;IACP,QAAQ;IACR,YAAY;IACZ,QAAQ;CACT,CAAC,CAAA;AAEF,MAAM,iBAAiB,GAAwB,IAAI,GAAG,CAAC;IACrD,QAAQ;IACR,SAAS;IACT,QAAQ;IACR,aAA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C,CACC,IAAI,EACJ,EAAE,KAAK,EAAE,wBAAwB,EAAE,EACnC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CACjB,CAAC,CACC,IAAI,EACJ,EAAE,KAAK,EAAE,uBAAuB,EAAE,eAAe,EAAE,IAAI,CAAC,QAAQ,EAAE,EAClE,QAAQ,CAAC,IAAI,EAAE,uBAAuB,CAAC,CACxC,CACF,CACF,CACF,CACF,CAAA;AACH,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,gBAAgB,CAAC,IAAiB;IAChD,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,KAAK,OAAO,CAAA;IAC9C,OAAO,CAAC,CACN,QAAQ,EACR,EAAE,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,EAAE,EACnE,CAAC,CACC,KAAK,EACL,EAAE,KAAK,EAAE,kCAAkC,EAAE,EAC7C,CAAC,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,qBAAqB,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,CACtD,CACF,CAAA;AACH,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"accordion.d.ts","sourceRoot":"","sources":["../../../../src/render/blocks/accordion.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAiB,MAAM,iBAAiB,CAAA;AACpE,OAAO,EAEL,KAAK,WAAW,EAGhB,KAAK,aAAa,EAEnB,MAAM,oBAAoB,CAAA;AAyB3B,wBAAgB,eAAe,CAAC,KAAK,EAAE,cAAc,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CAiBtF"}
1
+ {"version":3,"file":"accordion.d.ts","sourceRoot":"","sources":["../../../../src/render/blocks/accordion.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAiB,MAAM,iBAAiB,CAAA;AACpE,OAAO,EAAE,KAAK,WAAW,EAAK,KAAK,aAAa,EAAkB,MAAM,oBAAoB,CAAA;AA4B5F,wBAAgB,eAAe,CAAC,KAAK,EAAE,cAAc,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CActF"}
@@ -1,20 +1,16 @@
1
- import { blockHeadingTag, h, heading, renderRichText, } from '@cogenta/theme-kit';
1
+ import { h, renderRichText } from '@cogenta/theme-kit';
2
+ import { section, sectionHead } from '../layout.js';
2
3
  /**
3
- * `blocks@2.0` (RFC 0001). A reference dossier, not the reader mailbag:
4
- * shares `faq`'s `<details>`/`<summary>` mechanics — expanding, keyboard
5
- * operation and the announced expanded state all come from the browser, at
6
- * zero bytes of JavaScript — but its own markup and class names (`cg-dossier`
7
- * rather than `cg-mailbag`), a tab-style entry marker in the margin instead
8
- * of a numeral, so the two blocks can diverge visually later without one
9
- * depending on the other. "Accordion" and "frequently asked question" are
10
- * different editorial intents even where the question/answer shape coincides.
4
+ * A set of collapsible notes on a ruled list: each question on its own row
5
+ * in the interface face, a plus drawn from two hairlines that turns into a
6
+ * minus when the row is open, and the answer in the reading face. Opening,
7
+ * keyboard behaviour and the announced state are all native `<details>`. No
8
+ * script.
11
9
  */
12
10
  function renderItem(item, ctx) {
13
- return h('li', { class: 'cg-dossier__entry' }, h('details', { class: 'cg-dossier__details' }, h('summary', { class: 'cg-dossier__term' }, item.question), h('div', { class: 'cg-dossier__definition' }, renderRichText(ctx, item.answer))));
11
+ return h('li', { class: 'cg-notes__item' }, h('details', { class: 'cg-notes__details' }, h('summary', { class: 'cg-notes__question' }, h('span', { class: 'cg-notes__question-text' }, item.question), h('span', { class: 'cg-notes__mark', 'aria-hidden': 'true' })), h('div', { class: 'cg-notes__answer' }, renderRichText(ctx, item.answer))));
14
12
  }
15
13
  export function renderAccordion(block, ctx) {
16
- return h('section', { class: 'cg-block cg-dossier', 'data-block': 'accordion' }, block.title === undefined
17
- ? null
18
- : heading(blockHeadingTag('accordion') ?? 'h2', { class: 'cg-dossier__title', 'data-field': 'title' }, block.title), h('ul', { class: 'cg-dossier__entries' }, block.items.map((item) => renderItem(item, ctx))));
14
+ return section('section', 'accordion', 'cg-notes', {}, 'div', sectionHead('accordion', block.title), h('ul', { class: 'cg-notes__items' }, block.items.map((item) => renderItem(item, ctx))));
19
15
  }
20
16
  //# sourceMappingURL=accordion.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"accordion.js","sourceRoot":"","sources":["../../../../src/render/blocks/accordion.ts"],"names":[],"mappings":"AACA,OAAO,EACL,eAAe,EAEf,CAAC,EACD,OAAO,EAEP,cAAc,GACf,MAAM,oBAAoB,CAAA;AAE3B;;;;;;;;;GASG;AACH,SAAS,UAAU,CAAC,IAAmB,EAAE,GAAkB;IACzD,OAAO,CAAC,CACN,IAAI,EACJ,EAAE,KAAK,EAAE,mBAAmB,EAAE,EAC9B,CAAC,CACC,SAAS,EACT,EAAE,KAAK,EAAE,qBAAqB,EAAE,EAChC,CAAC,CAAC,SAAS,EAAE,EAAE,KAAK,EAAE,kBAAkB,EAAE,EAAE,IAAI,CAAC,QAAQ,CAAC,EAC1D,CAAC,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,wBAAwB,EAAE,EAAE,cAAc,CAAC,GAAG,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,CAChF,CACF,CAAA;AACH,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,KAAqB,EAAE,GAAkB;IACvE,OAAO,CAAC,CACN,SAAS,EACT,EAAE,KAAK,EAAE,qBAAqB,EAAE,YAAY,EAAE,WAAW,EAAE,EAC3D,KAAK,CAAC,KAAK,KAAK,SAAS;QACvB,CAAC,CAAC,IAAI;QACN,CAAC,CAAC,OAAO,CACL,eAAe,CAAC,WAAW,CAAC,IAAI,IAAI,EACpC,EAAE,KAAK,EAAE,mBAAmB,EAAE,YAAY,EAAE,OAAO,EAAE,EACrD,KAAK,CAAC,KAAK,CACZ,EACL,CAAC,CACC,IAAI,EACJ,EAAE,KAAK,EAAE,qB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CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,UAAU,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CACjD,CACF,CAAA;AACH,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"collection-list.d.ts","sourceRoot":"","sources":["../../../../src/render/blocks/collection-list.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAA;AAC1D,OAAO,EAEL,wBAAwB,EACxB,KAAK,YAAY,EAOjB,KAAK,WAAW,EAIhB,KAAK,aAAa,EAEnB,MAAM,oBAAoB,CAAA;AAE3B,OAAO,EAAE,wBAAwB,IAAI,KAAK,EAAE,CAAA;AA4N5C,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,mBAAmB,EAC1B,GAAG,EAAE,aAAa,EAClB,OAAO,EAAE,SAAS,YAAY,EAAE,GAC/B,WAAW,CA0Cb"}
1
+ {"version":3,"file":"collection-list.d.ts","sourceRoot":"","sources":["../../../../src/render/blocks/collection-list.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAA;AAC1D,OAAO,EACL,wBAAwB,EACxB,KAAK,YAAY,EAEjB,KAAK,WAAW,EAGhB,KAAK,aAAa,EACnB,MAAM,oBAAoB,CAAA;AAI3B,OAAO,EAAE,wBAAwB,IAAI,KAAK,EAAE,CAAA;AAqK5C,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,mBAAmB,EAC1B,GAAG,EAAE,aAAa,EAClB,OAAO,EAAE,SAAS,YAAY,EAAE,GAC/B,WAAW,CAuCb"}
@@ -1,134 +1,107 @@
1
- import { blockHeadingTag, buildCollectionListQuery, entryDate, entryExcerpt, entryHref, entryImage, entryTitle, h, heading, nestedHeadingTag, renderImageSource, } from '@cogenta/theme-kit';
1
+ import { buildCollectionListQuery, h, nestedHeadingTag, } from '@cogenta/theme-kit';
2
+ import { section, sectionHead } from '../layout.js';
3
+ import { renderStory, storyFromEntry } from '../story.js';
2
4
  export { buildCollectionListQuery as query };
3
5
  /**
4
- * A rubric label, read from whichever of the usual "section-like" field
5
- * names a collection actually declares — the same "never invented, only the
6
- * usual convention" rule `entryImage`/`entryExcerpt` (`@cogenta/theme-kit`)
7
- * already follow, extended locally: contract D's `PageEntryMeta` only
8
- * resolves *taxonomy* classifications into an eyebrow (`renderEntryHeader`),
9
- * never an arbitrary `select` field, so a magazine whose "section" is a
10
- * plain field (the `magazine` blueprint's own choice — see `blueprints/
11
- * magazine.ts`, kept deliberately non-taxonomic so this exact value is
12
- * readable raw here) can still show it on a card, where the full
13
- * `ContentEntry` — unlike a rendered page's `PageEntryMeta` — is available.
6
+ * A listing, set in one of four newspaper forms chosen from what the editor
7
+ * already decided in contract B (the layout, and whether the list has a
8
+ * title), never from a setting this theme invents:
9
+ *
10
+ * - `grid` without a title is **the front**: the first story across eight
11
+ * columns with its photograph, a column of three briefs beside it behind a
12
+ * vertical rule, and every further story in a row of four below, divided
13
+ * by hairlines. This is the opening of a front page.
14
+ * - `grid` with a title is **a rail**: the section label on a heavy rule,
15
+ * its newest story large with a photograph, and the rest as a column of
16
+ * headlines beside it.
17
+ * - `carousel` is **a strip**: stories side by side between column rules,
18
+ * scrolling on a narrow screen. It is how the opinion columns are set,
19
+ * with the columnist's name in the kicker.
20
+ * - `list` is **a ranked list**: numbered, the numerals in the display face,
21
+ * side by side on a wide screen.
22
+ *
23
+ * An empty list keeps its head and says so in one line.
14
24
  */
15
- const SECTION_FIELDS = ['section', 'category', 'topic', 'department'];
16
- function entrySection(entry) {
17
- for (const field of SECTION_FIELDS) {
18
- const value = entry[field];
19
- if (typeof value === 'string' && value.trim() !== '')
20
- return value;
21
- }
22
- return undefined;
23
- }
24
- function formatDate(iso, ctx, style) {
25
- try {
26
- return new Intl.DateTimeFormat(ctx.locale, { dateStyle: style }).format(new Date(iso));
27
- }
28
- catch {
29
- return iso;
30
- }
31
- }
32
- /**
33
- * The "une": a large 16:9 cover, the section eyebrow (falling back to the
34
- * generic "Featured" kicker when the entry carries none), a big headline and
35
- * the full excerpt — the front-page treatment `layout: 'grid'` gives its
36
- * first entry, per the L25 pro-pass brief.
37
- */
38
- function renderLead(entry, ctx, tag) {
39
- const date = entryDate(entry);
40
- const excerpt = entryExcerpt(entry);
41
- const section = entrySection(entry);
42
- const cover = entryImage(entry, ctx, { width: 1200, height: 675, fit: 'cover' });
43
- return h('article', { class: 'cg-issue__lead' }, cover === undefined
25
+ const FRONT_BRIEFS = 3;
26
+ function frontStories(stories, tag) {
27
+ const [lead, ...others] = stories;
28
+ const briefs = others.slice(0, FRONT_BRIEFS);
29
+ const more = others.slice(FRONT_BRIEFS);
30
+ return h('div', { class: 'cg-front', 'data-briefs': String(briefs.length), 'data-more': String(more.length) }, lead === undefined
44
31
  ? null
45
- : h('a', { class: 'cg-issue__lead-cover-link', href: entryHref(entry, ctx), tabindex: -1 }, renderImageSource(cover, {
46
- className: 'cg-issue__lead-cover',
32
+ : h('div', { class: 'cg-front__lead' }, renderStory(lead, {
33
+ tag,
34
+ variant: 'lead',
35
+ image: true,
36
+ standfirst: true,
37
+ sizes: '(min-width: 64rem) 52rem, 100vw',
47
38
  loading: 'eager',
48
- sizes: '(min-width: 64rem) 76rem, 100vw',
49
- })), h('div', { class: 'cg-issue__lead-body' }, [
50
- h('p', { class: 'cg-issue__kicker' }, section ?? ctx.t('collection.featured')),
51
- heading(tag, { class: 'cg-issue__lead-title' }, h('a', { class: 'cg-issue__link', href: entryHref(entry, ctx) }, entryTitle(entry, ctx))),
52
- excerpt === undefined ? null : h('p', { class: 'cg-issue__lead-excerpt' }, excerpt),
53
- date === undefined
54
- ? null
55
- : h('time', { class: 'cg-issue__lead-date', datetime: date }, formatDate(date, ctx, 'long')),
56
- ]));
57
- }
58
- /** A card in the "rest" 3-column grid: cover, section eyebrow, title, date — no excerpt (the lead alone carries one). */
59
- function renderCard(entry, ctx, tag) {
60
- const date = entryDate(entry);
61
- const section = entrySection(entry);
62
- const cover = entryImage(entry, ctx, { width: 480, height: 320, fit: 'cover' });
63
- return h('li', { class: 'cg-issue__card-item' }, h('article', { class: 'cg-issue__card' }, cover === undefined
39
+ })), briefs.length === 0
64
40
  ? null
65
- : h('a', { class: 'cg-issue__card-cover-link', href: entryHref(entry, ctx), tabindex: -1 }, renderImageSource(cover, {
66
- className: 'cg-issue__card-cover',
67
- sizes: '(min-width: 64rem) 24rem, (min-width: 48rem) 45vw, 100vw',
68
- })), section === undefined ? null : h('p', { class: 'cg-issue__card-eyebrow' }, section), heading(tag, { class: 'cg-issue__card-title' }, h('a', { class: 'cg-issue__link', href: entryHref(entry, ctx) }, entryTitle(entry, ctx))), date === undefined
41
+ : h('ul', { class: 'cg-front__briefs' }, briefs.map((story) => h('li', { class: 'cg-front__brief' }, renderStory(story, { tag, variant: 'brief', standfirst: true })))), more.length === 0
69
42
  ? null
70
- : h('time', { class: 'cg-issue__card-date', datetime: date }, formatDate(date, ctx, 'medium'))));
43
+ : h('ul', { class: 'cg-front__more' }, more.map((story) => h('li', { class: 'cg-front__item' }, renderStory(story, {
44
+ tag,
45
+ variant: 'secondary',
46
+ image: true,
47
+ sizes: '(min-width: 64rem) 18rem, (min-width: 40rem) 45vw, 100vw',
48
+ })))));
71
49
  }
72
- /**
73
- * A rail row for `layout: 'list'` — a small square thumbnail (when the entry
74
- * has one) beside the title and date, the "rubric rail" treatment; a plain
75
- * numbered row (this theme's original front-page-index look) when the entry
76
- * carries no image, so a collection with no cover field still reads as a
77
- * considered contents strip rather than a broken thumbnail.
78
- */
79
- function renderRow(entry, ctx, tag, index) {
80
- const date = entryDate(entry);
81
- const cover = entryImage(entry, ctx, { width: 112, height: 112, fit: 'cover' });
82
- return h('li', { class: 'cg-issue__row' }, cover === undefined
83
- ? h('span', { class: 'cg-issue__row-number', 'aria-hidden': 'true' }, String(index).padStart(2, '0'))
84
- : h('a', { class: 'cg-issue__row-thumb-link', href: entryHref(entry, ctx), tabindex: -1 }, renderImageSource(cover, { className: 'cg-issue__row-thumb' })), h('div', { class: 'cg-issue__row-body' }, heading(tag, { class: 'cg-issue__row-title' }, h('a', { class: 'cg-issue__link', href: entryHref(entry, ctx) }, entryTitle(entry, ctx))), date === undefined
50
+ function railStories(stories, tag) {
51
+ const [lead, ...others] = stories;
52
+ return h('div', { class: 'cg-rail', 'data-count': String(stories.length) }, lead === undefined
85
53
  ? null
86
- : h('time', { class: 'cg-issue__row-date', datetime: date }, formatDate(date, ctx, 'medium'))));
87
- }
88
- /** A uniform frame for the horizontal-scroll `carousel` layout — a cover, the section eyebrow, title, date, excerpt. */
89
- function renderFrame(entry, ctx, tag) {
90
- const date = entryDate(entry);
91
- const excerpt = entryExcerpt(entry);
92
- const section = entrySection(entry);
93
- const cover = entryImage(entry, ctx, { width: 480, height: 320, fit: 'cover' });
94
- return h('li', { class: 'cg-issue__frame' }, cover === undefined
54
+ : h('div', { class: 'cg-rail__lead' }, renderStory(lead, {
55
+ tag,
56
+ variant: 'rail',
57
+ image: true,
58
+ standfirst: true,
59
+ date: true,
60
+ sizes: '(min-width: 64rem) 34rem, 100vw',
61
+ })), others.length === 0
95
62
  ? null
96
- : h('a', { class: 'cg-issue__frame-cover-link', href: entryHref(entry, ctx), tabindex: -1 }, renderImageSource(cover, { className: 'cg-issue__frame-cover' })), section === undefined ? null : h('p', { class: 'cg-issue__card-eyebrow' }, section), heading(tag, { class: 'cg-issue__frame-title' }, h('a', { class: 'cg-issue__link', href: entryHref(entry, ctx) }, entryTitle(entry, ctx))), date === undefined
97
- ? null
98
- : h('time', { class: 'cg-issue__frame-date', datetime: date }, formatDate(date, ctx, 'medium')), excerpt === undefined ? null : h('p', { class: 'cg-issue__frame-excerpt' }, excerpt));
63
+ : h('ul', { class: 'cg-rail__list' }, others.map((story) => h('li', { class: 'cg-rail__item' }, renderStory(story, {
64
+ tag,
65
+ variant: 'column',
66
+ image: true,
67
+ standfirst: true,
68
+ date: true,
69
+ sizes: '(min-width: 64rem) 9rem, 30vw',
70
+ })))));
99
71
  }
100
- function renderGrid(entries, ctx, tag) {
101
- const [first, ...rest] = entries;
102
- if (first === undefined)
103
- return null;
104
- return h('div', { class: 'cg-issue__spread' }, renderLead(first, ctx, tag), rest.length === 0
105
- ? null
106
- : h('ul', { class: 'cg-issue__cards' }, rest.map((entry) => renderCard(entry, ctx, tag))));
72
+ function stripStories(stories, tag, label, count) {
73
+ return h('div', {
74
+ class: 'cg-strip',
75
+ role: 'region',
76
+ 'aria-label': label,
77
+ tabindex: '0',
78
+ 'data-count': String(Math.min(count, 4)),
79
+ }, h('ul', { class: 'cg-strip__items' }, stories.map((story) => h('li', { class: 'cg-strip__item' }, renderStory(story, { tag, variant: 'strip', standfirst: true })))));
107
80
  }
108
- function renderList(entries, ctx, tag) {
109
- return h('ul', { class: 'cg-issue__rows' }, entries.map((entry, index) => renderRow(entry, ctx, tag, index + 1)));
81
+ function rankedStories(stories, tag) {
82
+ return h('ol', { class: 'cg-ranked', 'data-count': String(Math.min(stories.length, 5)) }, stories.map((story, index) => h('li', { class: 'cg-ranked__item' }, renderStory(story, { tag, variant: 'ranked', numeral: String(index + 1) }))));
110
83
  }
111
84
  export function renderCollectionList(block, ctx, entries) {
112
- const hasTitle = block.title !== undefined;
113
- const entryTag = nestedHeadingTag('collectionList', hasTitle);
114
- const body = entries.length === 0
115
- ? h('p', { class: 'cg-issue__empty' }, ctx.t('collection.empty'))
116
- : block.layout === 'grid'
117
- ? renderGrid(entries, ctx, entryTag)
118
- : block.layout === 'carousel'
119
- ? h('div', {
120
- class: 'cg-issue__viewport',
121
- role: 'region',
122
- 'aria-label': block.title ?? ctx.t('collection.carousel'),
123
- tabindex: '0',
124
- }, h('ul', { class: 'cg-issue__frames' }, entries.map((entry) => renderFrame(entry, ctx, entryTag))))
125
- : renderList(entries, ctx, entryTag);
126
- return h('section', {
127
- class: 'cg-block cg-issue',
128
- 'data-block': 'collectionList',
129
- 'data-layout': block.layout,
130
- }, hasTitle
131
- ? heading(blockHeadingTag('collectionList') ?? 'h2', { class: 'cg-issue__title', 'data-field': 'title' }, block.title ?? '')
132
- : null, body);
85
+ const titled = block.title !== undefined;
86
+ const tag = nestedHeadingTag('collectionList', titled);
87
+ const form = block.layout === 'grid'
88
+ ? titled
89
+ ? 'rail'
90
+ : 'front'
91
+ : block.layout === 'carousel'
92
+ ? 'strip'
93
+ : 'ranked';
94
+ const imageWidth = form === 'front' ? 1200 : form === 'rail' ? 800 : 480;
95
+ const stories = entries.map((entry) => storyFromEntry(entry, ctx, imageWidth));
96
+ const body = stories.length === 0
97
+ ? h('p', { class: 'cg-empty' }, ctx.t('collection.empty'))
98
+ : form === 'front'
99
+ ? frontStories(stories, tag)
100
+ : form === 'rail'
101
+ ? railStories(stories, tag)
102
+ : form === 'strip'
103
+ ? stripStories(stories, tag, block.title ?? ctx.t('collection.carousel'), stories.length)
104
+ : rankedStories(stories, tag);
105
+ return section('section', 'collectionList', 'cg-listing', { 'data-layout': block.layout, 'data-form': form }, 'div', sectionHead('collectionList', block.title), body);
133
106
  }
134
107
  //# sourceMappingURL=collection-list.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"collection-list.js","sourceRoot":"","sources":["../../../../src/render/blocks/collection-list.ts"],"names":[],"mappings":"AACA,OAAO,EACL,eAAe,EACf,wBAAwB,EAExB,SAAS,EACT,YAAY,EACZ,SAAS,EACT,UAAU,EACV,UAAU,EAGV,CAAC,EACD,OAAO,EACP,gBAAgB,EAEhB,iBAAiB,GAClB,MAAM,oBAAoB,CAAA;AAE3B,OAAO,EAAE,wBAAwB,IAAI,KAAK,EAAE,CAAA;AAE5C;;;;;;;;;;;GAWG;AACH,MAAM,cAAc,GAAG,CAAC,SAAS,EAAE,UAAU,EAAE,OAAO,EAAE,YAAY,CAAU,CAAA;AAE9E,SAAS,YAAY,CAAC,KAAmB;IACvC,KAAK,MAAM,KAAK,IAAI,cAAc,EAAE,CAAC;QACnC,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,CAAA;QAC1B,IAAI,OAAO,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AAE,GAAG,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC;QACjE,CAAC,CAAC,KAAK,CAAC,MAAM,KAAK,MAAM;YACvB,CAAC,CAAC,UAAU,CAAC,OAAO,EAAE,GAAG,EAAE,QAAQ,CAAC;YACpC,CAAC,CAAC,KAAK,CAAC,MAAM,KAAK,UAAU;gBAC3B,CAAC,CAAC,CAAC,CACC,KAAK,EACL;oBACE,KAAK,EAAE,oBAAoB;oBAC3B,IAAI,EAAE,QAAQ;oBACd,YAAY,EAAE,KAAK,CAAC,KAAK,IAAI,GAAG,CAAC,CAAC,CAAC,qBAAqB,CAAC;oBACzD,QAAQ,EAAE,GAAG;iBACd,EACD,CAAC,CACC,IAAI,EACJ,EAAE,KAAK,EAAE,kBAAkB,EAAE,EAC7B,OAAO,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,WAAW,CAAC,KAAK,EAAE,GAAG,EAAE,QAAQ,CAAC,CAAC,CAC1D,CACF;gBACH,CAAC,CAAC,UAAU,CAAC,OAAO,EAAE,GAAG,EAAE,QAAQ,CAAC,CAAA;IAE5C,OAAO,CAAC,CACN,SAAS,EACT;QACE,KAAK,EAAE,mBAAmB;QAC1B,YAAY,EAAE,gBAAgB;QAC9B,aAAa,EAAE,KAAK,CAAC,MAAM;KAC5B,EACD,QAAQ;QACN,CAAC,CAAC,OAAO,CACL,eAAe,CAAC,gBAAgB,CAAC,IAAI,IAAI,EACzC,EAAE,KAAK,EAAE,iBAAiB,EAAE,YAAY,EAAE,OAAO,EAAE,EACnD,KAAK,CAAC,KAAK,IAAI,EAAE,CAClB;QACH,CAAC,CAAC,IAAI,EACR,IAAI,CACL,CAAA;AACH,CAAC"}
1
+ {"version":3,"file":"collection-list.js","sourceRoot":"","sources":["../../../../src/render/blocks/collection-list.ts"],"names":[],"mappings":"AACA,OAAO,EACL,wBAAwB,EAIxB,CAAC,EACD,gBAAgB,GAEjB,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EAA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O;oBAChB,CAAC,CAAC,YAAY,CACV,OAAO,EACP,GAAG,EACH,KAAK,CAAC,KAAK,IAAI,GAAG,CAAC,CAAC,CAAC,qBAAqB,CAAC,EAC3C,OAAO,CAAC,MAAM,CACf;oBACH,CAAC,CAAC,aAAa,CAAC,OAAO,EAAE,GAAG,CAAC,CAAA;IAEvC,OAAO,OAAO,CACZ,SAAS,EACT,gBAAgB,EAChB,YAAY,EACZ,EAAE,aAAa,EAAE,KAAK,CAAC,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,EAClD,KAAK,EACL,WAAW,CAAC,gBAAgB,EAAE,KAAK,CAAC,KAAK,CAAC,EAC1C,IAAI,CACL,CAAA;AACH,CAAC"}
@@ -1,10 +1,10 @@
1
1
  import type { CtaBlock } from '@cogenta/blocks';
2
2
  import { type HtmlElement, type RenderContext } from '@cogenta/theme-kit';
3
3
  /**
4
- * The subscription page a print magazine always carries: a panel framed by
5
- * a heavy top-and-bottom rule rather than a rounded, shadowed card — the
6
- * theme's one deliberately "loud" moment, reserved for the block whose whole
7
- * job is to ask for something.
4
+ * An appeal, set like the subscription panel a newspaper runs between two
5
+ * sections: a double rule above, the title large in the display face across
6
+ * the left seven columns, the text and the actions in the right five. No
7
+ * coloured box: the rules and the type carry it.
8
8
  */
9
9
  export declare function renderCta(block: CtaBlock, ctx: RenderContext): HtmlElement;
10
10
  //# sourceMappingURL=cta.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"cta.d.ts","sourceRoot":"","sources":["../../../../src/render/blocks/cta.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAGL,KAAK,WAAW,EAGhB,KAAK,aAAa,EACnB,MAAM,oBAAoB,CAAA;AAE3B;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,QAAQ,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CAgB1E"}
1
+ {"version":3,"file":"cta.d.ts","sourceRoot":"","sources":["../../../../src/render/blocks/cta.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAGL,KAAK,WAAW,EAGhB,KAAK,aAAa,EACnB,MAAM,oBAAoB,CAAA;AAG3B;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,QAAQ,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CAqB1E"}