@cogenta/theme-portfolio 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 (128) hide show
  1. package/dist/src/index.d.ts +9 -0
  2. package/dist/src/index.d.ts.map +1 -1
  3. package/dist/src/index.js +10 -1
  4. package/dist/src/index.js.map +1 -1
  5. package/dist/src/render/blocks/accordion.d.ts.map +1 -1
  6. package/dist/src/render/blocks/accordion.js +10 -18
  7. package/dist/src/render/blocks/accordion.js.map +1 -1
  8. package/dist/src/render/blocks/collection-list.d.ts +0 -20
  9. package/dist/src/render/blocks/collection-list.d.ts.map +1 -1
  10. package/dist/src/render/blocks/collection-list.js +59 -66
  11. package/dist/src/render/blocks/collection-list.js.map +1 -1
  12. package/dist/src/render/blocks/cta.d.ts +4 -4
  13. package/dist/src/render/blocks/cta.d.ts.map +1 -1
  14. package/dist/src/render/blocks/cta.js +15 -10
  15. package/dist/src/render/blocks/cta.js.map +1 -1
  16. package/dist/src/render/blocks/embed.d.ts.map +1 -1
  17. package/dist/src/render/blocks/embed.js +16 -31
  18. package/dist/src/render/blocks/embed.js.map +1 -1
  19. package/dist/src/render/blocks/faq.d.ts.map +1 -1
  20. package/dist/src/render/blocks/faq.js +12 -17
  21. package/dist/src/render/blocks/faq.js.map +1 -1
  22. package/dist/src/render/blocks/feature-grid.d.ts.map +1 -1
  23. package/dist/src/render/blocks/feature-grid.js +26 -23
  24. package/dist/src/render/blocks/feature-grid.js.map +1 -1
  25. package/dist/src/render/blocks/gallery.d.ts +0 -14
  26. package/dist/src/render/blocks/gallery.d.ts.map +1 -1
  27. package/dist/src/render/blocks/gallery.js +29 -21
  28. package/dist/src/render/blocks/gallery.js.map +1 -1
  29. package/dist/src/render/blocks/hero.d.ts +8 -8
  30. package/dist/src/render/blocks/hero.d.ts.map +1 -1
  31. package/dist/src/render/blocks/hero.js +17 -18
  32. package/dist/src/render/blocks/hero.js.map +1 -1
  33. package/dist/src/render/blocks/logo-strip.d.ts.map +1 -1
  34. package/dist/src/render/blocks/logo-strip.js +9 -14
  35. package/dist/src/render/blocks/logo-strip.js.map +1 -1
  36. package/dist/src/render/blocks/logos.d.ts.map +1 -1
  37. package/dist/src/render/blocks/logos.js +14 -19
  38. package/dist/src/render/blocks/logos.js.map +1 -1
  39. package/dist/src/render/blocks/media-figure.d.ts +8 -12
  40. package/dist/src/render/blocks/media-figure.d.ts.map +1 -1
  41. package/dist/src/render/blocks/media-figure.js +20 -20
  42. package/dist/src/render/blocks/media-figure.js.map +1 -1
  43. package/dist/src/render/blocks/pricing-table.d.ts.map +1 -1
  44. package/dist/src/render/blocks/pricing-table.js +17 -20
  45. package/dist/src/render/blocks/pricing-table.js.map +1 -1
  46. package/dist/src/render/blocks/prose.d.ts +10 -9
  47. package/dist/src/render/blocks/prose.d.ts.map +1 -1
  48. package/dist/src/render/blocks/prose.js +29 -10
  49. package/dist/src/render/blocks/prose.js.map +1 -1
  50. package/dist/src/render/blocks/quote.d.ts +5 -12
  51. package/dist/src/render/blocks/quote.d.ts.map +1 -1
  52. package/dist/src/render/blocks/quote.js +9 -15
  53. package/dist/src/render/blocks/quote.js.map +1 -1
  54. package/dist/src/render/blocks/stat-counter.d.ts.map +1 -1
  55. package/dist/src/render/blocks/stat-counter.js +10 -12
  56. package/dist/src/render/blocks/stat-counter.js.map +1 -1
  57. package/dist/src/render/blocks/stats.d.ts.map +1 -1
  58. package/dist/src/render/blocks/stats.js +7 -15
  59. package/dist/src/render/blocks/stats.js.map +1 -1
  60. package/dist/src/render/blocks/testimonial.d.ts +4 -14
  61. package/dist/src/render/blocks/testimonial.d.ts.map +1 -1
  62. package/dist/src/render/blocks/testimonial.js +9 -18
  63. package/dist/src/render/blocks/testimonial.js.map +1 -1
  64. package/dist/src/render/chrome.d.ts.map +1 -1
  65. package/dist/src/render/chrome.js +93 -90
  66. package/dist/src/render/chrome.js.map +1 -1
  67. package/dist/src/render/layout.d.ts +61 -0
  68. package/dist/src/render/layout.d.ts.map +1 -0
  69. package/dist/src/render/layout.js +134 -0
  70. package/dist/src/render/layout.js.map +1 -0
  71. package/dist/src/render/project.d.ts +27 -0
  72. package/dist/src/render/project.d.ts.map +1 -0
  73. package/dist/src/render/project.js +82 -0
  74. package/dist/src/render/project.js.map +1 -0
  75. package/dist/src/render/render-block.d.ts +17 -7
  76. package/dist/src/render/render-block.d.ts.map +1 -1
  77. package/dist/src/render/render-block.js +47 -34
  78. package/dist/src/render/render-block.js.map +1 -1
  79. package/dist/src/render/term-archive.d.ts +0 -11
  80. package/dist/src/render/term-archive.d.ts.map +1 -1
  81. package/dist/src/render/term-archive.js +36 -24
  82. package/dist/src/render/term-archive.js.map +1 -1
  83. package/dist/src/render/widget-areas.d.ts +14 -0
  84. package/dist/src/render/widget-areas.d.ts.map +1 -0
  85. package/dist/src/render/widget-areas.js +21 -0
  86. package/dist/src/render/widget-areas.js.map +1 -0
  87. package/dist/src/render/work.d.ts +37 -0
  88. package/dist/src/render/work.d.ts.map +1 -0
  89. package/dist/src/render/work.js +49 -0
  90. package/dist/src/render/work.js.map +1 -0
  91. package/dist/theme.config.d.ts +4 -7
  92. package/dist/theme.config.d.ts.map +1 -1
  93. package/dist/theme.config.js +6 -9
  94. package/dist/theme.config.js.map +1 -1
  95. package/package.json +4 -4
  96. package/src/index.ts +10 -1
  97. package/src/render/blocks/accordion.ts +22 -42
  98. package/src/render/blocks/collection-list.ts +83 -137
  99. package/src/render/blocks/cta.ts +24 -12
  100. package/src/render/blocks/embed.ts +39 -47
  101. package/src/render/blocks/faq.ts +24 -33
  102. package/src/render/blocks/feature-grid.ts +38 -41
  103. package/src/render/blocks/gallery.ts +34 -28
  104. package/src/render/blocks/hero.ts +31 -28
  105. package/src/render/blocks/logo-strip.ts +18 -20
  106. package/src/render/blocks/logos.ts +22 -43
  107. package/src/render/blocks/media-figure.ts +28 -20
  108. package/src/render/blocks/pricing-table.ts +31 -32
  109. package/src/render/blocks/prose.ts +38 -13
  110. package/src/render/blocks/quote.ts +18 -18
  111. package/src/render/blocks/stat-counter.ts +19 -37
  112. package/src/render/blocks/stats.ts +18 -33
  113. package/src/render/blocks/testimonial.ts +16 -22
  114. package/src/render/chrome.ts +99 -97
  115. package/src/render/layout.ts +177 -0
  116. package/src/render/project.ts +140 -0
  117. package/src/render/render-block.ts +49 -45
  118. package/src/render/term-archive.ts +92 -70
  119. package/src/render/widget-areas.ts +25 -0
  120. package/src/render/work.ts +124 -0
  121. package/src/styles/archive.css +61 -21
  122. package/src/styles/base.css +763 -648
  123. package/src/styles/blocks.css +697 -1093
  124. package/src/styles/theme.css +22 -10
  125. package/src/styles/tokens.css +174 -252
  126. package/src/styles/widgets.css +948 -0
  127. package/src/styles/work.css +405 -0
  128. package/tokens.json +19 -19
@@ -1 +1 @@
1
- {"version":3,"file":"chrome.js","sourceRoot":"","sources":["../../../src/render/chrome.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,eAAe,EACf,UAAU,EACV,eAAe,EACf,iBAAiB,EACjB,iBAAiB,EACjB,SAAS,GACV,MAAM,oBAAoB,CAAA;AAE3B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,SAAS,cAAc,CAAC,KAA+B,EAAE,SAAiB;IACxE,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAA;IACjC,MAAM,KAAK,GAAG,KAAK;SAChB,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,IAAI,IAAI,IAAI,CAAC,IAAI,KAAK,qBAAqB,CAAC;SAC3E,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE;QACnB,MAAM,KAAK,GAAG,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;QACpC,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,eAAe,CAAC,IAAI,C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AAkC;QAClC,sCAAsC,IAAI,KAAK,QAAQ,MAAM;QAC7D,GAAG,aAAa,GAAG,IAAI,EAAE;QACzB,QAAQ;QACR,GACE,WAAW,KAAK,EAAE;YAChB,CAAC,CAAC,EAAE;YACJ,CAAC,CAAC,oFAAoF,WAAW,aACrG,EAAE;QACF,GAAG,MAAM,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,oCAAoC,SAAS,CAAC,MAAM,CAAC,QAAQ,EAAE;QACzF,kCAAkC;QAClC,uCAAuC,IAAI,IAAI,QAAQ,MAAM;QAC7D,sCAAsC,KAAK,CAAC,YAAY,QAAQ;QAChE,QAAQ;QACR,iBAAiB,CAAA;IAEnB,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,CAAA;AAC3B,CAAC"}
@@ -0,0 +1,61 @@
1
+ import { type Attributes, type Child, type ContentEntry, type HtmlElement } from '@cogenta/theme-kit';
2
+ /**
3
+ * The frame every block of this theme renders into, and the small pieces of
4
+ * typography the blocks share.
5
+ *
6
+ * The outer element carries the one section rhythm (`--cg-section`, the same
7
+ * for every block) and paints edge to edge when a variant asks for a band.
8
+ * The inner element is the twelve-column container, so the left edge of a
9
+ * statement, a project image, a caption and a list of services is always the
10
+ * same line.
11
+ *
12
+ * `inner` is `figure` for a block whose semantics are a figure (a quotation
13
+ * and its attribution, an image and its caption): `<figcaption>` must be a
14
+ * direct child of its `<figure>`.
15
+ */
16
+ export declare function section(outer: 'section' | 'div', block: string, className: string, attrs: Attributes, inner: 'div' | 'figure', ...children: readonly Child[]): HtmlElement;
17
+ /**
18
+ * The label of a titled block: a hairline across the whole container and the
19
+ * title under it, small, in the text face. A studio lets the work carry the
20
+ * page, so a section says what it is and gets out of the way. On a wide
21
+ * screen the label sits in the first three columns and the content starts at
22
+ * the fourth (`.cg-split`), or it runs above a full-width grid.
23
+ */
24
+ export declare function sectionHead(blockName: string, title: string | undefined): HtmlElement | null;
25
+ /** A four-digit year, from a `year` field when the collection keeps one, or from the entry's date. */
26
+ export declare function entryYear(entry: ContentEntry): string | undefined;
27
+ /** `2025` from an ISO 8601 date, or `undefined` when the value is not one. */
28
+ export declare function yearOf(iso: string): string | undefined;
29
+ /**
30
+ * The caption line a studio sets under a piece of work: client, discipline,
31
+ * year, in that order, each only when the entry carries it. Read from the
32
+ * plain-text fields a collection declares, never from a taxonomy id and never
33
+ * invented.
34
+ */
35
+ export interface WorkCaption {
36
+ readonly client?: string;
37
+ readonly discipline?: string;
38
+ readonly year?: string;
39
+ }
40
+ export declare function entryCaption(entry: ContentEntry): WorkCaption;
41
+ /**
42
+ * A caption never repeats the title it sits under: a project named after its
43
+ * client ("Fenmore Building Society") keeps the discipline and the year only.
44
+ * The index, where the client has a column of its own, keeps it.
45
+ */
46
+ export declare function captionUnder(caption: WorkCaption, title: string): WorkCaption;
47
+ /** The caption as markup: one paragraph, one span per part, the separators drawn by the stylesheet. */
48
+ export declare function renderCaption(caption: WorkCaption, className: string): HtmlElement | null;
49
+ /**
50
+ * A taxonomy's own name, as a label: `disciplines` becomes `Disciplines`,
51
+ * `project_team` becomes `Project team`. The name is the one the site owner
52
+ * gave the taxonomy; this only sets it in sentence case.
53
+ */
54
+ export declare function taxonomyLabel(name: string, locale: string): string;
55
+ /**
56
+ * The word for "year" in the page's own language, from the platform's own
57
+ * data (`Intl.DisplayNames`), so the fact sheet of a project page labels its
58
+ * date without a translation table this theme would have to carry.
59
+ */
60
+ export declare function yearLabel(locale: string): string;
61
+ //# sourceMappingURL=layout.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../../src/render/layout.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,UAAU,EAEf,KAAK,KAAK,EACV,KAAK,YAAY,EAEjB,KAAK,WAAW,EAGjB,MAAM,oBAAoB,CAAA;AAE3B;;;;;;;;;;;;;GAaG;AACH,wBAAgB,OAAO,CACrB,KAAK,EAAE,SAAS,GAAG,KAAK,EACxB,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,UAAU,EACjB,KAAK,EAAE,KAAK,GAAG,QAAQ,EACvB,GAAG,QAAQ,EAAE,SAAS,KAAK,EAAE,GAC5B,WAAW,CAMb;AAED;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,WAAW,GAAG,IAAI,CAW5F;AAqBD,sGAAsG;AACtG,wBAAgB,SAAS,CAAC,KAAK,EAAE,YAAY,GAAG,MAAM,GAAG,SAAS,CAMjE;AAED,8EAA8E;AAC9E,wBAAgB,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAGtD;AAED;;;;;GAKG;AACH,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAA;IAC5B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CACvB;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,YAAY,GAAG,WAAW,CAS7D;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,GAAG,WAAW,CAK7E;AAED,uGAAuG;AACvG,wBAAgB,aAAa,CAAC,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,GAAG,WAAW,GAAG,IAAI,CAczF;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAQlE;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAUhD"}
@@ -0,0 +1,134 @@
1
+ import { blockHeadingTag, entryDate, h, heading, } from '@cogenta/theme-kit';
2
+ /**
3
+ * The frame every block of this theme renders into, and the small pieces of
4
+ * typography the blocks share.
5
+ *
6
+ * The outer element carries the one section rhythm (`--cg-section`, the same
7
+ * for every block) and paints edge to edge when a variant asks for a band.
8
+ * The inner element is the twelve-column container, so the left edge of a
9
+ * statement, a project image, a caption and a list of services is always the
10
+ * same line.
11
+ *
12
+ * `inner` is `figure` for a block whose semantics are a figure (a quotation
13
+ * and its attribution, an image and its caption): `<figcaption>` must be a
14
+ * direct child of its `<figure>`.
15
+ */
16
+ export function section(outer, block, className, attrs, inner, ...children) {
17
+ return h(outer, { class: `cg-section ${className}`, 'data-block': block, ...attrs }, h(inner, { class: `cg-container ${className}__inner` }, ...children));
18
+ }
19
+ /**
20
+ * The label of a titled block: a hairline across the whole container and the
21
+ * title under it, small, in the text face. A studio lets the work carry the
22
+ * page, so a section says what it is and gets out of the way. On a wide
23
+ * screen the label sits in the first three columns and the content starts at
24
+ * the fourth (`.cg-split`), or it runs above a full-width grid.
25
+ */
26
+ export function sectionHead(blockName, title) {
27
+ if (title === undefined)
28
+ return null;
29
+ return h('div', { class: 'cg-head' }, heading(blockHeadingTag(blockName) ?? 'h2', { class: 'cg-head__title', 'data-field': 'title' }, title));
30
+ }
31
+ /**
32
+ * A taxonomy field stores a term id, never a label: a value shaped like one
33
+ * is not something a visitor can be shown.
34
+ */
35
+ const TERM_ID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
36
+ function plainText(entry, fields) {
37
+ for (const field of fields) {
38
+ const value = entry[field];
39
+ if (typeof value === 'string' && value.trim() !== '' && !TERM_ID.test(value.trim())) {
40
+ return value.trim();
41
+ }
42
+ }
43
+ return undefined;
44
+ }
45
+ const CLIENT_FIELDS = ['client', 'clientName', 'customer', 'organisation', 'organization'];
46
+ const DISCIPLINE_FIELDS = ['discipline', 'role', 'service', 'category', 'kicker'];
47
+ /** A four-digit year, from a `year` field when the collection keeps one, or from the entry's date. */
48
+ export function entryYear(entry) {
49
+ const declared = entry.year;
50
+ if (typeof declared === 'string' && /^\d{4}$/.test(declared.trim()))
51
+ return declared.trim();
52
+ if (typeof declared === 'number' && Number.isInteger(declared))
53
+ return String(declared);
54
+ const iso = entryDate(entry);
55
+ return iso === undefined ? undefined : yearOf(iso);
56
+ }
57
+ /** `2025` from an ISO 8601 date, or `undefined` when the value is not one. */
58
+ export function yearOf(iso) {
59
+ const date = new Date(iso);
60
+ return Number.isNaN(date.getTime()) ? undefined : String(date.getUTCFullYear());
61
+ }
62
+ export function entryCaption(entry) {
63
+ const client = plainText(entry, CLIENT_FIELDS);
64
+ const discipline = plainText(entry, DISCIPLINE_FIELDS);
65
+ const year = entryYear(entry);
66
+ return {
67
+ ...(client === undefined ? {} : { client }),
68
+ ...(discipline === undefined ? {} : { discipline }),
69
+ ...(year === undefined ? {} : { year }),
70
+ };
71
+ }
72
+ /**
73
+ * A caption never repeats the title it sits under: a project named after its
74
+ * client ("Fenmore Building Society") keeps the discipline and the year only.
75
+ * The index, where the client has a column of its own, keeps it.
76
+ */
77
+ export function captionUnder(caption, title) {
78
+ if (caption.client === undefined)
79
+ return caption;
80
+ if (!title.toLocaleLowerCase().includes(caption.client.toLocaleLowerCase()))
81
+ return caption;
82
+ const { client: _repeated, ...rest } = caption;
83
+ return rest;
84
+ }
85
+ /** The caption as markup: one paragraph, one span per part, the separators drawn by the stylesheet. */
86
+ export function renderCaption(caption, className) {
87
+ const parts = [
88
+ caption.client === undefined
89
+ ? null
90
+ : h('span', { class: `${className}-part`, 'data-part': 'client' }, caption.client),
91
+ caption.discipline === undefined
92
+ ? null
93
+ : h('span', { class: `${className}-part`, 'data-part': 'discipline' }, caption.discipline),
94
+ caption.year === undefined
95
+ ? null
96
+ : h('span', { class: `${className}-part`, 'data-part': 'year' }, caption.year),
97
+ ].filter((part) => part !== null);
98
+ if (parts.length === 0)
99
+ return null;
100
+ return h('p', { class: className }, parts);
101
+ }
102
+ /**
103
+ * A taxonomy's own name, as a label: `disciplines` becomes `Disciplines`,
104
+ * `project_team` becomes `Project team`. The name is the one the site owner
105
+ * gave the taxonomy; this only sets it in sentence case.
106
+ */
107
+ export function taxonomyLabel(name, locale) {
108
+ const words = name
109
+ .replace(/([a-z0-9])([A-Z])/g, '$1 $2')
110
+ .replace(/[_-]+/g, ' ')
111
+ .trim()
112
+ .toLowerCase();
113
+ if (words === '')
114
+ return name;
115
+ return words.charAt(0).toLocaleUpperCase(locale) + words.slice(1);
116
+ }
117
+ /**
118
+ * The word for "year" in the page's own language, from the platform's own
119
+ * data (`Intl.DisplayNames`), so the fact sheet of a project page labels its
120
+ * date without a translation table this theme would have to carry.
121
+ */
122
+ export function yearLabel(locale) {
123
+ try {
124
+ const name = new Intl.DisplayNames([locale], { type: 'dateTimeField' }).of('year');
125
+ if (name !== undefined && name !== '') {
126
+ return name.charAt(0).toLocaleUpperCase(locale) + name.slice(1);
127
+ }
128
+ }
129
+ catch {
130
+ // An invalid locale tag: fall through to the English field name.
131
+ }
132
+ return 'Year';
133
+ }
134
+ //# sourceMappingURL=layout.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"layout.js","sourceRoot":"","sources":["../../../src/render/layout.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,eAAe,EAGf,SAAS,EAET,CAAC,EACD,OAAO,GACR,MAAM,oBAAoB,CAAA;AAE3B;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,OAAO,CACrB,KAAwB,EACxB,KAAa,EACb,SAAiB,EACjB,KAAiB,EACjB,KAAuB,EACvB,GAAG,QAA0B;IAE7B,OAAO,CAAC,CACN,KAAK,EACL,EAAE,KAAK,EAAE,cAAc,SAAS,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,EACnE,CAAC,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,gBAAgB,SAAS,SAAS,EAAE,EAAE,GAAG,QAAQ,CAAC,CACrE,CAAA;AACH,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,WAAW,CAAC,SAAiB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C,IAAY,EAAE,MAAc;IACxD,MAAM,KAAK,GAAG,IAAI;SACf,OAAO,CAAC,oBAAoB,EAAE,OAAO,CAAC;SACtC,OAAO,CAAC,QAAQ,EAAE,GAAG,CAAC;SACtB,IAAI,EAAE;SACN,WAAW,EAAE,CAAA;IAChB,IAAI,KAAK,KAAK,EAAE;QAAE,OAAO,IAAI,CAAA;IAC7B,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,iBAAiB,CAAC,MAAM,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;AACnE,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,SAAS,CAAC,MAAc;IACtC,IAAI,CAAC;QACH,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,YAAY,CAAC,CAAC,MAAM,CAAC,EAAE,EAAE,IAAI,EAAE,eAAe,EAAE,CAAC,CAAC,EAAE,CAAC,MAAM,CAAC,CAAA;QAClF,IAAI,IAAI,KAAK,SAAS,IAAI,IAAI,KAAK,EAAE,EAAE,CAAC;YACtC,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,iBAAiB,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;QACjE,CAAC;IACH,CAAC;IAAC,MAAM,CAAC;QACP,iEAAiE;IACnE,CAAC;IACD,OAAO,MAAM,CAAA;AACf,CAAC"}
@@ -0,0 +1,27 @@
1
+ import { type HtmlElement, type PageContent, type PageEntryMeta } from '@cogenta/theme-kit';
2
+ /**
3
+ * The page of one project, and the plain page title everything else gets.
4
+ *
5
+ * A project page opens the way a studio presents a case study:
6
+ *
7
+ * 1. the title, very large, across the grid;
8
+ * 2. the statement (the entry's excerpt) in the lead size, across eight
9
+ * columns;
10
+ * 3. the lead visual, the project's own cover, full width at its own shape;
11
+ * 4. the fact sheet: one column per fact, a hairline over the row. The year
12
+ * comes from the entry's publication date, labelled with the platform's
13
+ * own word for "year" in the page's language; every other column is one
14
+ * taxonomy the collection declares (a client, the disciplines, the team),
15
+ * labelled with the taxonomy's own name and listing its terms, each linked
16
+ * to its archive.
17
+ *
18
+ * The body that follows is the editor's own blocks. On a project page a
19
+ * `prose` block sets its text in two columns on a wide screen (`work.css`,
20
+ * keyed on the `cg-project` class of `<main>`).
21
+ */
22
+ /** What makes a page a project: it has an entry with a cover image and is not a plain page. */
23
+ export declare function isProject(entry: PageEntryMeta | undefined): entry is PageEntryMeta;
24
+ export declare function renderProjectHeader(page: PageContent, entry: PageEntryMeta, locale: string): HtmlElement;
25
+ /** The title of any other page: set large on the grid, with nothing around it. */
26
+ export declare function renderPageHeader(page: PageContent): HtmlElement;
27
+ //# sourceMappingURL=project.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"project.d.ts","sourceRoot":"","sources":["../../../src/render/project.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,WAAW,EAEhB,KAAK,WAAW,EAChB,KAAK,aAAa,EAGnB,MAAM,oBAAoB,CAAA;AAG3B;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,+FAA+F;AAC/F,wBAAgB,SAAS,CAAC,KAAK,EAAE,aAAa,GAAG,SAAS,GAAG,KAAK,IAAI,aAAa,CAElF;AA8DD,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,WAAW,EACjB,KAAK,EAAE,aAAa,EACpB,MAAM,EAAE,MAAM,GACb,WAAW,CA0Bb;AAED,kFAAkF;AAClF,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,WAAW,GAAG,WAAW,CAU/D"}
@@ -0,0 +1,82 @@
1
+ import { h, renderImageSource, } from '@cogenta/theme-kit';
2
+ import { taxonomyLabel, yearLabel, yearOf } from './layout.js';
3
+ /**
4
+ * The page of one project, and the plain page title everything else gets.
5
+ *
6
+ * A project page opens the way a studio presents a case study:
7
+ *
8
+ * 1. the title, very large, across the grid;
9
+ * 2. the statement (the entry's excerpt) in the lead size, across eight
10
+ * columns;
11
+ * 3. the lead visual, the project's own cover, full width at its own shape;
12
+ * 4. the fact sheet: one column per fact, a hairline over the row. The year
13
+ * comes from the entry's publication date, labelled with the platform's
14
+ * own word for "year" in the page's language; every other column is one
15
+ * taxonomy the collection declares (a client, the disciplines, the team),
16
+ * labelled with the taxonomy's own name and listing its terms, each linked
17
+ * to its archive.
18
+ *
19
+ * The body that follows is the editor's own blocks. On a project page a
20
+ * `prose` block sets its text in two columns on a wide screen (`work.css`,
21
+ * keyed on the `cg-project` class of `<main>`).
22
+ */
23
+ /** What makes a page a project: it has an entry with a cover image and is not a plain page. */
24
+ export function isProject(entry) {
25
+ return entry !== undefined && entry.image !== undefined && entry.collection !== 'page';
26
+ }
27
+ function termValue(term) {
28
+ return h('li', { class: 'cg-facts__value' }, term.href === null
29
+ ? term.label
30
+ : h('a', { class: 'cg-facts__link', href: term.href }, term.label));
31
+ }
32
+ function facts(entry, locale) {
33
+ const out = [];
34
+ const iso = entry.publishedAt;
35
+ const year = iso === undefined ? undefined : yearOf(iso);
36
+ if (iso !== undefined && year !== undefined) {
37
+ out.push({
38
+ key: 'year',
39
+ label: yearLabel(locale),
40
+ values: [h('li', { class: 'cg-facts__value' }, h('time', { datetime: iso }, year))],
41
+ });
42
+ }
43
+ const groups = new Map();
44
+ for (const term of entry.terms ?? []) {
45
+ const group = groups.get(term.taxonomy);
46
+ if (group === undefined)
47
+ groups.set(term.taxonomy, [term]);
48
+ else
49
+ group.push(term);
50
+ }
51
+ for (const [taxonomy, terms] of groups) {
52
+ out.push({
53
+ key: taxonomy,
54
+ label: taxonomyLabel(taxonomy, locale),
55
+ values: terms.map(termValue),
56
+ });
57
+ }
58
+ return out;
59
+ }
60
+ function renderFacts(entry, locale) {
61
+ const list = facts(entry, locale);
62
+ if (list.length === 0)
63
+ return null;
64
+ return h('dl', { class: 'cg-facts', 'data-count': String(Math.min(list.length, 4)) }, list.map((fact) => h('div', { class: 'cg-facts__item', 'data-fact': fact.key }, h('dt', { class: 'cg-facts__label' }, fact.label), h('dd', { class: 'cg-facts__values' }, h('ul', { class: 'cg-facts__list' }, fact.values)))));
65
+ }
66
+ export function renderProjectHeader(page, entry, locale) {
67
+ const image = entry.image;
68
+ return h('header', { class: 'cg-project-head' }, h('div', { class: 'cg-container cg-project-head__inner' }, h('h1', { class: 'cg-project-head__title' }, page.title), entry.excerpt === undefined
69
+ ? null
70
+ : h('p', { class: 'cg-project-head__statement' }, entry.excerpt), image === undefined
71
+ ? null
72
+ : h('figure', { class: 'cg-project-head__lead' }, renderImageSource(image, {
73
+ className: 'cg-project-head__image',
74
+ loading: 'eager',
75
+ sizes: '(min-width: 96rem) 92rem, 100vw',
76
+ })), renderFacts(entry, locale)));
77
+ }
78
+ /** The title of any other page: set large on the grid, with nothing around it. */
79
+ export function renderPageHeader(page) {
80
+ return h('header', { class: 'cg-page-head' }, h('div', { class: 'cg-container cg-page-head__inner' }, h('h1', { class: 'cg-page-head__title' }, page.title)));
81
+ }
82
+ //# sourceMappingURL=project.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"project.js","sourceRoot":"","sources":["../../../src/render/project.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,CAAC,EAID,iBAAiB,GAClB,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAE9D;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,+FAA+F;AAC/F,MAAM,UAAU,SAAS,CAAC,KAAgC;IACxD,OAAO,KAAK,KAAK,SAAS,IAAI,KAAK,CAAC,KAAK,KAAK,SAAS,IAAI,KAAK,CAAC,UAAU,KAAK,MAAM,CAAA;AACxF,CAAC;AAQD,SAAS,SAAS,CAAC,IAAmB;IACpC,OAAO,CAAC,CACN,IAAI,EACJ,EAAE,KAAK,EAAE,iBAAiB,EAAE,EAC5B,IAAI,CAAC,IAAI,KAAK,IAAI;QAChB,CAAC,CAAC,IAAI,CAAC,KAAK;QACZ,CAAC,CAAC,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I,EAAE,EAAE,KAAK,EAAE,wBAAwB,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,EACxD,KAAK,CAAC,OAAO,KAAK,SAAS;QACzB,CAAC,CAAC,IAAI;QACN,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,EAAE,KAAK,EAAE,4BAA4B,EAAE,EAAE,KAAK,CAAC,OAAO,CAAC,EAClE,KAAK,KAAK,SAAS;QACjB,CAAC,CAAC,IAAI;QACN,CAAC,CAAC,CAAC,CACC,QAAQ,EACR,EAAE,KAAK,EAAE,uBAAuB,EAAE,EAClC,iBAAiB,CAAC,KAAK,EAAE;YACvB,SAAS,EAAE,wBAAwB;YACnC,OAAO,EAAE,OAAO;YAChB,KAAK,EAAE,iCAAiC;SACzC,CAAC,CACH,EACL,WAAW,CAAC,KAAK,EAAE,MAAM,CAAC,CAC3B,CACF,CAAA;AACH,CAAC;AAED,kFAAkF;AAClF,MAAM,UAAU,gBAAgB,CAAC,IAAiB;IAChD,OAAO,CAAC,CACN,QAAQ,EACR,EAAE,KAAK,EAAE,cAAc,EAAE,EACzB,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,12 +1,22 @@
1
1
  import { type BlockRegistry, type VocabularyBlock } from '@cogenta/blocks';
2
- import { type FetchedEntries, type HtmlElement, type PageContent, pageHasOwnHeading, type RenderContext, renderEntryHeader, withBlockKey } from '@cogenta/theme-kit';
3
- /**
4
- * `PageContent`/`FetchedEntries`/`pageHasOwnHeading`/`withBlockKey` are
5
- * `@cogenta/theme-kit`'s own — re-exported here so this package's public
6
- * surface names them, the same shape every theme package shares them under.
7
- */
2
+ import { type FetchedEntries, type HtmlElement, type PageContent, pageHasOwnHeading, type RenderContext, withBlockKey } from '@cogenta/theme-kit';
8
3
  export type { FetchedEntries, PageContent };
9
- export { pageHasOwnHeading, renderEntryHeader, withBlockKey };
4
+ export { pageHasOwnHeading, withBlockKey };
10
5
  export declare function renderBlock(block: VocabularyBlock, ctx: RenderContext, entries?: FetchedEntries, registry?: BlockRegistry): HtmlElement | null;
6
+ /**
7
+ * `<main id="cg-main">` is mandatory: it is the skip link's target, written
8
+ * by `@cogenta/cli`'s `theme-render.ts` outside any theme's control.
9
+ *
10
+ * Three openings, and exactly one `h1` in each:
11
+ *
12
+ * - a page whose blocks include a `hero` lets the hero carry the title (the
13
+ * studio's statement, on a home page);
14
+ * - a project (`isProject`: an entry with a cover that is not a plain page)
15
+ * gets the project header: title, statement, lead visual, fact sheet;
16
+ * - anything else gets its title set large on the grid.
17
+ *
18
+ * `withBlockKey` stamps every rendered block with its contract-B `_key`, so
19
+ * the visual page builder (L16) can map a clicked element back to its block.
20
+ */
11
21
  export declare function renderPage(page: PageContent, ctx: RenderContext, entries?: FetchedEntries, registry?: BlockRegistry): HtmlElement;
12
22
  //# sourceMappingURL=render-block.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"render-block.d.ts","sourceRoot":"","sources":["../../../src/render/render-block.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAoB,KAAK,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAC5F,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,WAAW,EAEhB,KAAK,WAAW,EAChB,iBAAiB,EACjB,KAAK,aAAa,EAClB,iBAAiB,EAEjB,YAAY,EAEb,MAAM,oBAAoB,CAAA;AAmB3B;;;;GAIG;AACH,YAAY,EAAE,cAAc,EAAE,WAAW,EAAE,CAAA;AAC3C,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,YAAY,EAAE,CAAA;AAE7D,wBAAgB,WAAW,CACzB,KAAK,EAAE,eAAe,EACtB,GAAG,EAAE,aAAa,EAClB,OAAO,GAAE,cAAmB,EAC5B,QAAQ,CAAC,EAAE,aAAa,GACvB,WAAW,GAAG,IAAI,CAapB;AA4ED,wBAAgB,UAAU,CACxB,IAAI,EAAE,WAAW,EACjB,GAAG,EAAE,aAAa,EAClB,OAAO,GAAE,cAAmB,EAC5B,QAAQ,CAAC,EAAE,aAAa,GACvB,WAAW,CAgBb"}
1
+ {"version":3,"file":"render-block.d.ts","sourceRoot":"","sources":["../../../src/render/render-block.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAoB,KAAK,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAC5F,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,WAAW,EAEhB,KAAK,WAAW,EAChB,iBAAiB,EAEjB,KAAK,aAAa,EAElB,YAAY,EAEb,MAAM,oBAAoB,CAAA;AAoB3B,YAAY,EAAE,cAAc,EAAE,WAAW,EAAE,CAAA;AAC3C,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,CAAA;AAE1C,wBAAgB,WAAW,CACzB,KAAK,EAAE,eAAe,EACtB,GAAG,EAAE,aAAa,EAClB,OAAO,GAAE,cAAmB,EAC5B,QAAQ,CAAC,EAAE,aAAa,GACvB,WAAW,GAAG,IAAI,CAepB;AA+DD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,UAAU,CACxB,IAAI,EAAE,WAAW,EACjB,GAAG,EAAE,aAAa,EAClB,OAAO,GAAE,cAAmB,EAC5B,QAAQ,CAAC,EAAE,aAAa,GACvB,WAAW,CAoBb"}
@@ -1,5 +1,5 @@
1
1
  import { VOCABULARY_NAMES } from '@cogenta/blocks';
2
- import { h, pageHasOwnHeading, renderEntryHeader, resolveBlockForRender, withBlockKey, withBlockVariant, } from '@cogenta/theme-kit';
2
+ import { h, pageHasOwnHeading, providedBlockNode, resolveBlockForRender, withBlockKey, withBlockVariant, } from '@cogenta/theme-kit';
3
3
  import { renderAccordion } from './blocks/accordion.js';
4
4
  import { renderCollectionList } from './blocks/collection-list.js';
5
5
  import { renderCta } from './blocks/cta.js';
@@ -17,20 +17,24 @@ import { renderQuote } from './blocks/quote.js';
17
17
  import { renderStatCounter } from './blocks/stat-counter.js';
18
18
  import { renderStats } from './blocks/stats.js';
19
19
  import { renderTestimonial } from './blocks/testimonial.js';
20
- export { pageHasOwnHeading, renderEntryHeader, withBlockKey };
20
+ import { isProject, renderPageHeader, renderProjectHeader } from './project.js';
21
+ export { pageHasOwnHeading, withBlockKey };
21
22
  export function renderBlock(block, ctx, entries = {}, registry) {
22
- // `block`'s type says `VocabularyBlock`, but the value crossing this
23
- // boundary from stored content is not always literally one of the shared
24
- // vocabulary — resolving here is what turns an unimplemented theme-private
25
- // block into its declared fallback instead of a silently blank slot.
23
+ // A block a plugin provides arrives already rendered by the host, in a
24
+ // process of its own (contract D theme@1.7). Nothing else in this theme
25
+ // needs to know such blocks exist.
26
+ const provided = providedBlockNode(block, ctx);
27
+ if (provided !== null)
28
+ return withBlockVariant(provided, block.variant);
29
+ // A stored block is not always literally one of the shared vocabulary:
30
+ // resolving here turns an unimplemented theme-private block into its
31
+ // declared fallback instead of a silently blank slot.
26
32
  const resolved = resolveBlockForRender(block, VOCABULARY_NAMES, registry);
27
33
  if (resolved === null)
28
34
  return null;
29
35
  const known = resolved;
30
- // `withBlockVariant` (blocks@2.0, RFC 0002) is applied once here, after
31
- // dispatch, rather than inside each of the seventeen block renderers —
32
- // `variant` is envelope data every block carries identically, exactly the
33
- // same reasoning `withBlockKey` in `renderPage` already follows for `_key`.
36
+ // `variant` is envelope data every block carries identically, applied once
37
+ // here rather than by each of the seventeen renderers.
34
38
  return withBlockVariant(renderKnownBlock(known, ctx, entries), known.variant);
35
39
  }
36
40
  function renderKnownBlock(known, ctx, entries) {
@@ -70,8 +74,9 @@ function renderKnownBlock(known, ctx, entries) {
70
74
  case 'logoStrip':
71
75
  return renderLogoStrip(known, ctx);
72
76
  default: {
73
- // Exhaustive over contract B's vocabulary: `known` is `never` here, so a
74
- // block this package does not implement stops it compiling until it is.
77
+ // Exhaustive over contract B: `known` is `never` here, so a block this
78
+ // package does not implement stops it compiling until it is. `null`
79
+ // rather than a throw: choosing a fallback is the render layer's job.
75
80
  const unreachable = known;
76
81
  void unreachable;
77
82
  return null;
@@ -79,33 +84,41 @@ function renderKnownBlock(known, ctx, entries) {
79
84
  }
80
85
  }
81
86
  /**
82
- * `renderEntryHeader` (`theme@1.4`) draws the eyebrow/title/excerpt/meta/
83
- * cover furniture for a page backed by a real content entry — a project —
84
- * and already returns `null` for a page with no `entry` meta *and* for one
85
- * whose blocks draw their own heading (a `hero`), so the bare
86
- * `<h1 class="cg-page__title">` fallback below is the right markup in both
87
- * of those cases and only those — never a double heading, and never a page
88
- * with none at all. A page rendered before `theme@1.4` (`page.entry`
89
- * absent) gets exactly the pre-1.4 markup, byte for byte.
87
+ * The block's own `_key` doubles as an in-page anchor: it is unique within a
88
+ * page (contract B), so a menu item such as `/#home-work` lands on the block
89
+ * it names rather than on a fragment nothing answers to.
90
90
  */
91
- /**
92
- * `withBlockKey` stamps `data-block-key` (the L16 builder's own hook); this
93
- * theme additionally stamps a real `id`, the block's own `_key`, on the same
94
- * element — `_key` is already unique within a page (contract B), so it
95
- * doubles as a genuine in-page anchor. The header/footer's own single-page
96
- * links (the `portfolio` blueprint's "Work"/"Services" nav) resolve to a
97
- * real target this way, rather than a `#fragment` nothing on the page
98
- * answers to.
99
- */
100
- function withBlockAnchor(element, key) {
91
+ function withAnchor(element, key) {
101
92
  if (element === null)
102
93
  return null;
103
94
  return { ...element, attrs: { ...element.attrs, id: key } };
104
95
  }
96
+ /**
97
+ * `<main id="cg-main">` is mandatory: it is the skip link's target, written
98
+ * by `@cogenta/cli`'s `theme-render.ts` outside any theme's control.
99
+ *
100
+ * Three openings, and exactly one `h1` in each:
101
+ *
102
+ * - a page whose blocks include a `hero` lets the hero carry the title (the
103
+ * studio's statement, on a home page);
104
+ * - a project (`isProject`: an entry with a cover that is not a plain page)
105
+ * gets the project header: title, statement, lead visual, fact sheet;
106
+ * - anything else gets its title set large on the grid.
107
+ *
108
+ * `withBlockKey` stamps every rendered block with its contract-B `_key`, so
109
+ * the visual page builder (L16) can map a clicked element back to its block.
110
+ */
105
111
  export function renderPage(page, ctx, entries = {}, registry) {
106
- const entryHeader = renderEntryHeader(page, ctx);
107
- return h('main', { class: 'cg-main', id: 'cg-main' }, entryHeader, entryHeader === null && !pageHasOwnHeading(page.blocks)
108
- ? h('h1', { class: 'cg-page__title' }, page.title)
109
- : null, page.blocks.map((block) => withBlockAnchor(withBlockKey(renderBlock(block, ctx, entries, registry), block._key), block._key)));
112
+ const ownHeading = pageHasOwnHeading(page.blocks);
113
+ const project = !ownHeading && isProject(page.entry) ? page.entry : undefined;
114
+ const opening = ownHeading
115
+ ? null
116
+ : project !== undefined
117
+ ? renderProjectHeader(page, project, ctx.locale)
118
+ : renderPageHeader(page);
119
+ return h('main', {
120
+ class: project !== undefined ? 'cg-main cg-project' : 'cg-main',
121
+ id: 'cg-main',
122
+ }, opening, page.blocks.map((block) => withAnchor(withBlockKey(renderBlock(block, ctx, entries, registry), block._key), block._key)));
110
123
  }
111
124
  //# sourceMappingURL=render-block.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"render-block.js","sourceRoot":"","sources":["../../../src/render/render-block.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,gBAAgB,EAAwB,MAAM,iBAAiB,CAAA;AAC5F,OAAO,EAGL,CAAC,EAED,iBAAiB,EAEjB,iBAAiB,EACjB,qBAAqB,EACrB,YAAY,EACZ,gBAAgB,GACjB,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AACvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAA;AAClE,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAC3C,OAAO,EAAE,iBAA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EAAE,EAAE,GAAG,OAAO,CAAC,KAAK,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,CAAA;AAC7D,CAAC;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,UAAU,CACxB,IAAiB,EACjB,GAAkB,EAClB,OAAO,GAAmB,EAAE,EAC5B,QAAwB;IAExB,MAAM,UAAU,GAAG,iBAAiB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;IACjD,MAAM,OAAO,GAAG,CAAC,UAAU,IAAI,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAA;IAC7E,MAAM,OAAO,GAAG,UAAU;QACxB,CAAC,CAAC,IAAI;QACN,CAAC,CAAC,OAAO,KAAK,SAAS;YACrB,CAAC,CAAC,mBAAmB,CAAC,IAAI,EAAE,OAAO,EAAE,GAAG,CAAC,MAAM,CAAC;YAChD,CAAC,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAA;IAE5B,OAAO,CAAC,CACN,MAAM,EACN;QACE,KAAK,EAAE,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,SAAS;QAC/D,EAAE,EAAE,SAAS;KACd,EACD,OAAO,EACP,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CACxB,UAAU,CAAC,YAAY,CAAC,WAAW,CAAC,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,QAAQ,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,CAC7F,CACF,CAAA;AACH,CAAC"}
@@ -1,14 +1,3 @@
1
1
  import { type HtmlElement, type TermArchiveInput } from '@cogenta/theme-kit';
2
- /**
3
- * The taxonomy-term archive (contract D `theme@1.3`), in this theme's own
4
- * brutalist-editorial voice: the term set as a display heading with the
5
- * taxonomy name as a kicker above it, and the entries as the same numbered
6
- * `cg-entry` rows `collectionList` already renders here — an index, not a
7
- * card grid.
8
- *
9
- * Reusing the block's own classes rather than inventing archive-only ones is
10
- * deliberate: it is what makes an archive of work look like this theme's
11
- * lists without a second stylesheet to keep in step.
12
- */
13
2
  export declare function renderTermArchive(input: TermArchiveInput): HtmlElement;
14
3
  //# sourceMappingURL=term-archive.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"term-archive.d.ts","sourceRoot":"","sources":["../../../src/render/term-archive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,WAAW,EAAK,KAAK,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAE/E;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,gBAAgB,GAAG,WAAW,CA4DtE"}
1
+ {"version":3,"file":"term-archive.d.ts","sourceRoot":"","sources":["../../../src/render/term-archive.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,WAAW,EAGhB,KAAK,gBAAgB,EACtB,MAAM,oBAAoB,CAAA;AAqD3B,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,gBAAgB,GAAG,WAAW,CAmDtE"}