@cogenta/theme-entreprise 1.1.2 → 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.
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +1 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/render/blocks/accordion.d.ts.map +1 -1
- package/dist/src/render/blocks/accordion.js +12 -15
- package/dist/src/render/blocks/accordion.js.map +1 -1
- package/dist/src/render/blocks/collection-list.d.ts +5 -7
- package/dist/src/render/blocks/collection-list.d.ts.map +1 -1
- package/dist/src/render/blocks/collection-list.js +48 -32
- package/dist/src/render/blocks/collection-list.js.map +1 -1
- package/dist/src/render/blocks/cta.d.ts +6 -6
- package/dist/src/render/blocks/cta.d.ts.map +1 -1
- package/dist/src/render/blocks/cta.js +12 -12
- package/dist/src/render/blocks/cta.js.map +1 -1
- package/dist/src/render/blocks/embed.d.ts.map +1 -1
- package/dist/src/render/blocks/embed.js +22 -27
- package/dist/src/render/blocks/embed.js.map +1 -1
- package/dist/src/render/blocks/faq.d.ts.map +1 -1
- package/dist/src/render/blocks/faq.js +13 -16
- package/dist/src/render/blocks/faq.js.map +1 -1
- package/dist/src/render/blocks/feature-grid.d.ts.map +1 -1
- package/dist/src/render/blocks/feature-grid.js +22 -22
- package/dist/src/render/blocks/feature-grid.js.map +1 -1
- package/dist/src/render/blocks/gallery.d.ts +7 -8
- package/dist/src/render/blocks/gallery.d.ts.map +1 -1
- package/dist/src/render/blocks/gallery.js +16 -14
- package/dist/src/render/blocks/gallery.js.map +1 -1
- package/dist/src/render/blocks/hero.d.ts +13 -8
- package/dist/src/render/blocks/hero.d.ts.map +1 -1
- package/dist/src/render/blocks/hero.js +27 -17
- package/dist/src/render/blocks/hero.js.map +1 -1
- package/dist/src/render/blocks/logo-strip.d.ts.map +1 -1
- package/dist/src/render/blocks/logo-strip.js +14 -11
- package/dist/src/render/blocks/logo-strip.js.map +1 -1
- package/dist/src/render/blocks/logos.d.ts.map +1 -1
- package/dist/src/render/blocks/logos.js +21 -12
- package/dist/src/render/blocks/logos.js.map +1 -1
- package/dist/src/render/blocks/media-figure.d.ts +10 -6
- package/dist/src/render/blocks/media-figure.d.ts.map +1 -1
- package/dist/src/render/blocks/media-figure.js +18 -13
- package/dist/src/render/blocks/media-figure.js.map +1 -1
- package/dist/src/render/blocks/pricing-table.d.ts.map +1 -1
- package/dist/src/render/blocks/pricing-table.js +15 -11
- package/dist/src/render/blocks/pricing-table.js.map +1 -1
- package/dist/src/render/blocks/prose.d.ts +9 -3
- package/dist/src/render/blocks/prose.d.ts.map +1 -1
- package/dist/src/render/blocks/prose.js +11 -4
- package/dist/src/render/blocks/prose.js.map +1 -1
- package/dist/src/render/blocks/quote.d.ts +10 -10
- package/dist/src/render/blocks/quote.d.ts.map +1 -1
- package/dist/src/render/blocks/quote.js +14 -13
- package/dist/src/render/blocks/quote.js.map +1 -1
- package/dist/src/render/blocks/stat-counter.d.ts.map +1 -1
- package/dist/src/render/blocks/stat-counter.js +11 -13
- package/dist/src/render/blocks/stat-counter.js.map +1 -1
- package/dist/src/render/blocks/stats.d.ts.map +1 -1
- package/dist/src/render/blocks/stats.js +12 -13
- package/dist/src/render/blocks/stats.js.map +1 -1
- package/dist/src/render/blocks/testimonial.d.ts +9 -9
- package/dist/src/render/blocks/testimonial.d.ts.map +1 -1
- package/dist/src/render/blocks/testimonial.js +15 -14
- package/dist/src/render/blocks/testimonial.js.map +1 -1
- package/dist/src/render/chrome.d.ts +3 -1
- package/dist/src/render/chrome.d.ts.map +1 -1
- package/dist/src/render/chrome.js +71 -46
- package/dist/src/render/chrome.js.map +1 -1
- package/dist/src/render/layout.d.ts +26 -0
- package/dist/src/render/layout.d.ts.map +1 -0
- package/dist/src/render/layout.js +51 -0
- package/dist/src/render/layout.js.map +1 -0
- package/dist/src/render/render-block.d.ts.map +1 -1
- package/dist/src/render/render-block.js +23 -2
- package/dist/src/render/render-block.js.map +1 -1
- package/dist/src/render/term-archive.d.ts +8 -6
- package/dist/src/render/term-archive.d.ts.map +1 -1
- package/dist/src/render/term-archive.js +22 -16
- package/dist/src/render/term-archive.js.map +1 -1
- package/dist/src/render/widget-areas.d.ts +13 -0
- package/dist/src/render/widget-areas.d.ts.map +1 -0
- package/dist/src/render/widget-areas.js +20 -0
- package/dist/src/render/widget-areas.js.map +1 -0
- package/dist/theme.config.js +2 -2
- package/dist/theme.config.js.map +1 -1
- package/package.json +5 -5
- package/src/index.ts +1 -0
- package/src/render/blocks/accordion.ts +32 -27
- package/src/render/blocks/collection-list.ts +84 -53
- package/src/render/blocks/cta.ts +27 -28
- package/src/render/blocks/embed.ts +46 -43
- package/src/render/blocks/faq.ts +25 -21
- package/src/render/blocks/feature-grid.ts +42 -35
- package/src/render/blocks/gallery.ts +21 -16
- package/src/render/blocks/hero.ts +40 -28
- package/src/render/blocks/logo-strip.ts +26 -16
- package/src/render/blocks/logos.ts +33 -17
- package/src/render/blocks/media-figure.ts +22 -14
- package/src/render/blocks/pricing-table.ts +26 -15
- package/src/render/blocks/prose.ts +18 -4
- package/src/render/blocks/quote.ts +18 -14
- package/src/render/blocks/stat-counter.ts +25 -20
- package/src/render/blocks/stats.ts +31 -21
- package/src/render/blocks/testimonial.ts +22 -18
- package/src/render/chrome.ts +84 -49
- package/src/render/layout.ts +67 -0
- package/src/render/render-block.ts +24 -1
- package/src/render/term-archive.ts +54 -50
- package/src/render/widget-areas.ts +23 -0
- package/src/styles/archive.css +135 -38
- package/src/styles/base.css +557 -430
- package/src/styles/blocks.css +1192 -1000
- package/src/styles/theme.css +18 -24
- package/src/styles/tokens.css +162 -192
- package/src/styles/widgets.css +913 -0
- package/tokens.json +17 -17
|
@@ -1,25 +1,26 @@
|
|
|
1
1
|
import { h, image } from '@cogenta/theme-kit';
|
|
2
|
+
import { section } from '../layout.js';
|
|
2
3
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* thin divider — the shape a case-study or client-testimonial section takes
|
|
6
|
-
* on a serious B2B site.
|
|
4
|
+
* An editorial quotation inside the reading column: the display serif in
|
|
5
|
+
* italic, under a hairline, with the attribution set small beneath it.
|
|
7
6
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
7
|
+
* Quieter than `testimonial`, which is this theme's large pull quote: a
|
|
8
|
+
* `quote` belongs to the flow of a page, aligned with the prose column
|
|
9
|
+
* rather than spread across the grid, and never in a shaded box.
|
|
11
10
|
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
11
|
+
* `<figure><blockquote>…</blockquote><figcaption>` is the attribution pattern
|
|
12
|
+
* the HTML spec prescribes: putting the name inside the `<blockquote>` would
|
|
13
|
+
* claim it was part of what was said. The portrait is decorative (the name
|
|
14
|
+
* is right beside it), so its media entity's alt text is expected to be
|
|
15
|
+
* empty; `image` writes the attribute either way (WCAG 1.1.1).
|
|
15
16
|
*/
|
|
16
17
|
export function renderQuote(block, ctx) {
|
|
17
18
|
const hasAttribution = block.author !== undefined || block.role !== undefined || block.avatar !== undefined;
|
|
18
|
-
return
|
|
19
|
-
? h('figcaption', { class: 'cg-
|
|
19
|
+
return section('div', 'quote', 'cg-quote', {}, 'figure', h('blockquote', { class: 'cg-quote__text' }, h('p', { 'data-field': 'text' }, block.text)), hasAttribution
|
|
20
|
+
? h('figcaption', { class: 'cg-quote__cite' }, block.avatar === undefined
|
|
20
21
|
? null
|
|
21
22
|
: image(ctx, block.avatar, {
|
|
22
|
-
className: 'cg-
|
|
23
|
+
className: 'cg-quote__portrait',
|
|
23
24
|
variant: { width: 96, height: 96, fit: 'cover' },
|
|
24
25
|
}), h('span', { class: 'cg-quote__who' }, block.author === undefined
|
|
25
26
|
? null
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"quote.js","sourceRoot":"","sources":["../../../../src/render/blocks/quote.ts"],"names":[],"mappings":"AACA,OAAO,EAAoB,CAAC,EAAE,KAAK,EAAsB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,KAAK,CAAC,MAAM,CAAC,EAClF,KAAK,CAAC,IAAI,KAAK,SAAS;YACtB,CAAC,CAAC,IAAI;YACN,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,EAAE,EAAE,KAAK,CAAC,IAAI,CAAC,CAC7E,CACF;QACH,CAAC,CAAC,IAAI,CACT,CAAA;AACH,CAAC"}
|
|
@@ -1 +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;
|
|
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;AAsB3B,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,gBAAgB,EAAE,IAAI,EAAE,aAAa,GAAG,WAAW,CAoB3F"}
|
|
@@ -1,23 +1,21 @@
|
|
|
1
1
|
import { blockHeadingTag, h, heading, } from '@cogenta/theme-kit';
|
|
2
|
+
import { section } from '../layout.js';
|
|
2
3
|
/**
|
|
3
|
-
* `blocks@2.0` (RFC 0001). Narrower than `stats` (no `unit`), and
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* for the narrower, single-figure shape this block offers.
|
|
4
|
+
* `blocks@2.0` (RFC 0001). Narrower than `stats` (no `unit`), and laid out as
|
|
5
|
+
* its counterpart: where `stats` is a single row between vertical rules,
|
|
6
|
+
* `statCounter` keeps its title in the left four columns and sets its
|
|
7
|
+
* figures in a two-by-two table on the right eight, each under a horizontal
|
|
8
|
+
* hairline, the way an annual report lists its headline numbers.
|
|
9
9
|
*
|
|
10
|
-
* A `<dl>`,
|
|
11
|
-
*
|
|
12
|
-
* in markup, the same reading-order guarantee `stats` gives (WCAG 1.3.2);
|
|
13
|
-
* the stylesheet is free to paint the big figure first.
|
|
10
|
+
* A `<dl>`, with the label first in the markup for the same reading-order
|
|
11
|
+
* reason as `stats`.
|
|
14
12
|
*/
|
|
15
13
|
function renderItem(item) {
|
|
16
|
-
return h('div', { class: 'cg-
|
|
14
|
+
return h('div', { class: 'cg-counter' }, h('dt', { class: 'cg-counter__label' }, item.label), h('dd', { class: 'cg-counter__value' }, item.value));
|
|
17
15
|
}
|
|
18
16
|
export function renderStatCounter(block, _ctx) {
|
|
19
|
-
return
|
|
17
|
+
return section('section', 'statCounter', 'cg-counters', { 'data-titled': block.title === undefined ? 'false' : 'true' }, 'div', block.title === undefined
|
|
20
18
|
? null
|
|
21
|
-
: heading(blockHeadingTag('statCounter') ?? 'h2', { class: 'cg-
|
|
19
|
+
: h('div', { class: 'cg-head cg-head--aside' }, heading(blockHeadingTag('statCounter') ?? 'h2', { class: 'cg-head__title', 'data-field': 'title' }, block.title)), h('dl', { class: 'cg-counters__items' }, block.stats.map(renderItem)));
|
|
22
20
|
}
|
|
23
21
|
//# sourceMappingURL=stat-counter.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stat-counter.js","sourceRoot":"","sources":["../../../../src/render/blocks/stat-counter.ts"],"names":[],"mappings":"AACA,OAAO,EACL,eAAe,EAEf,CAAC,EACD,OAAO,GAER,MAAM,oBAAoB,CAAA;
|
|
1
|
+
{"version":3,"file":"stat-counter.js","sourceRoot":"","sources":["../../../../src/render/blocks/stat-counter.ts"],"names":[],"mappings":"AACA,OAAO,EACL,eAAe,EAEf,CAAC,EACD,OAAO,GAER,MAAM,oBAAoB,CAAA;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,aAAa,EACnB,MAAM,oBAAoB,CAAA;
|
|
1
|
+
{"version":3,"file":"stats.d.ts","sourceRoot":"","sources":["../../../../src/render/blocks/stats.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAY,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAC3D,OAAO,EAEL,KAAK,WAAW,EAGhB,KAAK,aAAa,EACnB,MAAM,oBAAoB,CAAA;AA4B3B,wBAAgB,WAAW,CAAC,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,aAAa,GAAG,WAAW,CAwB/E"}
|
|
@@ -1,23 +1,22 @@
|
|
|
1
1
|
import { blockHeadingTag, h, heading, } from '@cogenta/theme-kit';
|
|
2
|
+
import { section } from '../layout.js';
|
|
2
3
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* (`border-inline-start` on every item but the first) rather than as
|
|
8
|
-
* separate shadowed tiles: the "real KPI strip" read the aesthetic
|
|
9
|
-
* direction asks for.
|
|
4
|
+
* Key figures as one typographic row between vertical rules: the figure in
|
|
5
|
+
* the display serif with lining, tabular numerals, its unit set smaller in
|
|
6
|
+
* the same face, and the label in small text beneath. No coloured band and
|
|
7
|
+
* no tiles.
|
|
10
8
|
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
9
|
+
* A description list, because each figure is the description of its label.
|
|
10
|
+
* The label comes first in the markup, so a screen reader announces what a
|
|
11
|
+
* number means before the number (WCAG 1.3.2); the stylesheet paints the
|
|
12
|
+
* figure above it.
|
|
14
13
|
*/
|
|
15
14
|
function renderItem(item) {
|
|
16
|
-
return h('div', { class: 'cg-
|
|
15
|
+
return h('div', { class: 'cg-stat' }, h('dt', { class: 'cg-stat__label' }, item.label), h('dd', { class: 'cg-stat__value' }, item.value, item.unit === undefined ? null : h('span', { class: 'cg-stat__unit' }, item.unit)));
|
|
17
16
|
}
|
|
18
17
|
export function renderStats(block, _ctx) {
|
|
19
|
-
return
|
|
18
|
+
return section('section', 'stats', 'cg-stats', {}, 'div', block.title === undefined
|
|
20
19
|
? null
|
|
21
|
-
: heading(blockHeadingTag('stats') ?? 'h2', { class: 'cg-
|
|
20
|
+
: h('div', { class: 'cg-head' }, heading(blockHeadingTag('stats') ?? 'h2', { class: 'cg-head__title', 'data-field': 'title' }, block.title)), h('dl', { class: 'cg-stats__items', 'data-count': String(Math.min(block.items.length, 5)) }, block.items.map(renderItem)));
|
|
22
21
|
}
|
|
23
22
|
//# sourceMappingURL=stats.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stats.js","sourceRoot":"","sources":["../../../../src/render/blocks/stats.ts"],"names":[],"mappings":"AACA,OAAO,EACL,eAAe,EAEf,CAAC,EACD,OAAO,GAER,MAAM,oBAAoB,CAAA;
|
|
1
|
+
{"version":3,"file":"stats.js","sourceRoot":"","sources":["../../../../src/render/blocks/stats.ts"],"names":[],"mappings":"AACA,OAAO,EACL,eAAe,EAEf,CAAC,EACD,OAAO,GAER,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAEtC;;;;;;;;;;GAUG;AACH,SAAS,UAAU,CAAC,IAAc;IAChC,OAAO,CAAC,CACN,KAAK,EACL,EAAE,KAAK,EAAE,SAAS,EAAE,EACpB,CAAC,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,gBAAgB,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,EAChD,CAAC,CACC,IAAI,EACJ,EAAE,KAAK,EAAE,gBAAgB,EAAE,EAC3B,IAAI,CAAC,KAAK,EACV,IAAI,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,eAAe,EAAE,EAAE,IAAI,CAAC,IAAI,CAAC,CAClF,CACF,CAAA;AACH,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,KAAiB,EAAE,IAAmB;IAChE,OAAO,OAAO,CACZ,SAAS,EACT,OAAO,EACP,UAAU,EACV,EAAE,EACF,KAAK,EACL,KAAK,CAAC,KAAK,KAAK,SAAS;QACvB,CAAC,CAAC,IAAI;QACN,CAAC,CAAC,CAAC,CACC,KAAK,EACL,EAAE,KAAK,EAAE,SAAS,EAAE,EACpB,OAAO,CACL,eAAe,CAAC,OAAO,CAAC,IAAI,IAAI,EAChC,EAAE,KAAK,EAAE,gBAAgB,EAAE,YAAY,EAAE,OAAO,EAAE,EAClD,KAAK,CAAC,KAAK,CACZ,CACF,EACL,CAAC,CACC,IAAI,EACJ,EAAE,KAAK,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,EACnF,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,UAAU,CAAC,CAC5B,CACF,CAAA;AACH,CAAC"}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import type { TestimonialBlock } from '@cogenta/blocks';
|
|
2
2
|
import { type HtmlElement, type RenderContext } from '@cogenta/theme-kit';
|
|
3
3
|
/**
|
|
4
|
-
* `blocks@2.0` (RFC 0001).
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* (a testimonial may carry a link or emphasis the shorter, plain-text `quote`
|
|
8
|
-
* block cannot) and the attribution is the block's single grouped
|
|
9
|
-
* `attribution` field rather than three loose ones.
|
|
4
|
+
* `blocks@2.0` (RFC 0001). The large pull quote: one client's words set in
|
|
5
|
+
* the display serif across ten columns, with typographic quotation marks
|
|
6
|
+
* hung in the margin, and a small square portrait beside the name.
|
|
10
7
|
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
8
|
+
* No tinted panel, no border on one side, no italic box: the size of the
|
|
9
|
+
* type and the space around it are the emphasis. The quote is rich text, so
|
|
10
|
+
* a testimonial may carry a link or emphasis the plain-text `quote` cannot.
|
|
11
|
+
*
|
|
12
|
+
* The portrait is decorative (the name is beside it in text), so its alt
|
|
13
|
+
* text is expected to be empty; `image` writes the attribute either way.
|
|
14
14
|
*/
|
|
15
15
|
export declare function renderTestimonial(block: TestimonialBlock, ctx: RenderContext): HtmlElement;
|
|
16
16
|
//# sourceMappingURL=testimonial.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testimonial.d.ts","sourceRoot":"","sources":["../../../../src/render/blocks/testimonial.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AACvD,OAAO,EAAE,KAAK,WAAW,EAAY,KAAK,aAAa,EAAkB,MAAM,oBAAoB,CAAA;
|
|
1
|
+
{"version":3,"file":"testimonial.d.ts","sourceRoot":"","sources":["../../../../src/render/blocks/testimonial.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AACvD,OAAO,EAAE,KAAK,WAAW,EAAY,KAAK,aAAa,EAAkB,MAAM,oBAAoB,CAAA;AAGnG;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,gBAAgB,EAAE,GAAG,EAAE,aAAa,GAAG,WAAW,CA4B1F"}
|
|
@@ -1,25 +1,26 @@
|
|
|
1
1
|
import { h, image, renderRichText } from '@cogenta/theme-kit';
|
|
2
|
+
import { section } from '../layout.js';
|
|
2
3
|
/**
|
|
3
|
-
* `blocks@2.0` (RFC 0001).
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* (a testimonial may carry a link or emphasis the shorter, plain-text `quote`
|
|
7
|
-
* block cannot) and the attribution is the block's single grouped
|
|
8
|
-
* `attribution` field rather than three loose ones.
|
|
4
|
+
* `blocks@2.0` (RFC 0001). The large pull quote: one client's words set in
|
|
5
|
+
* the display serif across ten columns, with typographic quotation marks
|
|
6
|
+
* hung in the margin, and a small square portrait beside the name.
|
|
9
7
|
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
8
|
+
* No tinted panel, no border on one side, no italic box: the size of the
|
|
9
|
+
* type and the space around it are the emphasis. The quote is rich text, so
|
|
10
|
+
* a testimonial may carry a link or emphasis the plain-text `quote` cannot.
|
|
11
|
+
*
|
|
12
|
+
* The portrait is decorative (the name is beside it in text), so its alt
|
|
13
|
+
* text is expected to be empty; `image` writes the attribute either way.
|
|
13
14
|
*/
|
|
14
15
|
export function renderTestimonial(block, ctx) {
|
|
15
16
|
const { attribution } = block;
|
|
16
|
-
return
|
|
17
|
+
return section('div', 'testimonial', 'cg-pullquote', {}, 'figure', h('blockquote', { class: 'cg-pullquote__quote' }, renderRichText(ctx, block.quote)), h('figcaption', { class: 'cg-pullquote__cite' }, attribution.avatar === undefined
|
|
17
18
|
? null
|
|
18
19
|
: image(ctx, attribution.avatar, {
|
|
19
|
-
className: 'cg-
|
|
20
|
-
variant: { width:
|
|
21
|
-
}), h('span', { class: 'cg-
|
|
20
|
+
className: 'cg-pullquote__portrait',
|
|
21
|
+
variant: { width: 144, height: 144, fit: 'cover' },
|
|
22
|
+
}), h('span', { class: 'cg-pullquote__who' }, h('span', { class: 'cg-pullquote__name' }, attribution.name), attribution.role === undefined
|
|
22
23
|
? null
|
|
23
|
-
: h('span', { class: 'cg-
|
|
24
|
+
: h('span', { class: 'cg-pullquote__role' }, attribution.role))));
|
|
24
25
|
}
|
|
25
26
|
//# sourceMappingURL=testimonial.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testimonial.js","sourceRoot":"","sources":["../../../../src/render/blocks/testimonial.ts"],"names":[],"mappings":"AACA,OAAO,EAAoB,CAAC,EAAE,KAAK,EAAsB,cAAc,EAAE,MAAM,oBAAoB,CAAA;
|
|
1
|
+
{"version":3,"file":"testimonial.js","sourceRoot":"","sources":["../../../../src/render/blocks/testimonial.ts"],"names":[],"mappings":"AACA,OAAO,EAAoB,CAAC,EAAE,KAAK,EAAsB,cAAc,EAAE,MAAM,oBAAoB,CAAA;AACnG,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAEtC;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,iBAAiB,CAAC,KAAuB,EAAE,GAAkB;IAC3E,MAAM,EAAE,WAAW,EAAE,GAAG,KAAK,CAAA;IAC7B,OAAO,OAAO,CACZ,KAAK,EACL,aAAa,EACb,cAAc,EACd,EAAE,EACF,QAAQ,EACR,CAAC,CAAC,YAAY,EAAE,EAAE,KAAK,EAAE,qBAAqB,EAAE,EAAE,cAAc,CAAC,GAAG,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,EACnF,CAAC,CACC,YAAY,EACZ,EAAE,KAAK,EAAE,oBAAoB,EAAE,EAC/B,WAAW,CAAC,MAAM,KAAK,SAAS;QAC9B,CAAC,CAAC,IAAI;QACN,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,WAAW,CAAC,MAAM,EAAE;YAC7B,SAAS,EAAE,wBAAwB;YACnC,OAAO,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE;SACnD,CAAC,EACN,CAAC,CACC,MAAM,EACN,EAAE,KAAK,EAAE,mBAAmB,EAAE,EAC9B,CAAC,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,oBAAoB,EAAE,EAAE,WAAW,CAAC,IAAI,CAAC,EAC5D,WAAW,CAAC,IAAI,KAAK,SAAS;QAC5B,CAAC,CAAC,IAAI;QACN,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,oBAAoB,EAAE,EAAE,WAAW,CAAC,IAAI,CAAC,CACjE,CACF,CACF,CAAA;AACH,CAAC"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
import { type ChromeInput, type ChromeResult } from '@cogenta/theme-kit';
|
|
1
|
+
import { type ChromeInput, type ChromeResult, type HtmlElement } from '@cogenta/theme-kit';
|
|
2
|
+
/** `footerNote` as paragraphs: blank lines separate them, and a multi-line paragraph's first line is its label. */
|
|
3
|
+
export declare function renderFooterNote(note: string): HtmlElement | null;
|
|
2
4
|
export declare function renderChrome(input: ChromeInput): ChromeResult;
|
|
3
5
|
//# sourceMappingURL=chrome.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chrome.d.ts","sourceRoot":"","sources":["../../../src/render/chrome.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,WAAW,EAEhB,KAAK,YAAY,
|
|
1
|
+
{"version":3,"file":"chrome.d.ts","sourceRoot":"","sources":["../../../src/render/chrome.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,WAAW,EAEhB,KAAK,YAAY,EAGjB,KAAK,WAAW,EAOjB,MAAM,oBAAoB,CAAA;AAwD3B,mHAAmH;AACnH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,IAAI,CA0BjE;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,WAAW,GAAG,YAAY,CAgE7D"}
|
|
@@ -1,34 +1,28 @@
|
|
|
1
|
-
import { escapeAttribute, escapeText, renderBrandMark, renderSocialLinks, renderThemeToggle, serialize, } from '@cogenta/theme-kit';
|
|
1
|
+
import { escapeAttribute, escapeText, h, renderBrandMark, renderFooterWidgets, renderSocialLinks, renderThemeToggle, serialize, } from '@cogenta/theme-kit';
|
|
2
2
|
/**
|
|
3
|
-
* This theme's own header and footer (`theme@1.4`)
|
|
4
|
-
*
|
|
3
|
+
* This theme's own header and footer (`theme@1.4`), drawn the way a firm's
|
|
4
|
+
* website is: a quiet bar and a proper colophon.
|
|
5
5
|
*
|
|
6
|
-
* Header:
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* the
|
|
14
|
-
*
|
|
15
|
-
* real `headerAction` field, inventing a role for a plain nav link is no
|
|
16
|
-
* longer the honest reading of the data.
|
|
6
|
+
* Header: the firm's name set as a wordmark in the display serif (or its
|
|
7
|
+
* uploaded logo), the primary navigation in small interface text, the
|
|
8
|
+
* `headerAction` as the one filled control, and the light/dark control last.
|
|
9
|
+
* Below the breakpoint the navigation collapses into a panel opened by a
|
|
10
|
+
* CSS-only toggle: a visually hidden checkbox paired with a `<label>`, no
|
|
11
|
+
* `<script>`. The label must precede the `<nav>` for the sibling combinator
|
|
12
|
+
* in `base.css` to reach it; the theme toggle follows the `<nav>`, outside
|
|
13
|
+
* the panel it does not control, so a visitor can switch appearance without
|
|
14
|
+
* opening the menu first.
|
|
17
15
|
*
|
|
18
|
-
* Footer: a
|
|
19
|
-
*
|
|
20
|
-
* `renderSocialLinks`),
|
|
21
|
-
*
|
|
22
|
-
* `brandingHtml
|
|
23
|
-
* received: never altered, never dropped.
|
|
16
|
+
* Footer: a twelve-column colophon. The name and `tagline` on the left, the
|
|
17
|
+
* footer navigation, the `footerNote` and the social profiles (real icons,
|
|
18
|
+
* via `renderSocialLinks`), then a legal line under a hairline with the
|
|
19
|
+
* copyright year and the site's name beside Cogenta's credit
|
|
20
|
+
* (`brandingHtml`, placed exactly once, exactly as received).
|
|
24
21
|
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
* flip appearance without opening that panel first, on desktop or mobile.
|
|
30
|
-
* This module ships no CSS of its own for it (`base.css` owns
|
|
31
|
-
* `.cg-theme-toggle`, in this theme's own visual register, not canonical's).
|
|
22
|
+
* `footerNote` is plain text. When an editor separates it into paragraphs
|
|
23
|
+
* with blank lines, each paragraph becomes its own block, and a paragraph of
|
|
24
|
+
* several lines gets its first line set as a label: an office city above its
|
|
25
|
+
* address, a heading above a legal mention. One line stays one paragraph.
|
|
32
26
|
*/
|
|
33
27
|
function navItems(links) {
|
|
34
28
|
return links
|
|
@@ -48,54 +42,85 @@ function renderNavList(links) {
|
|
|
48
42
|
const items = navItems(links);
|
|
49
43
|
return items === '' ? '' : `<ul class="cg-nav__items">${items}</ul>`;
|
|
50
44
|
}
|
|
51
|
-
/** The header's own call
|
|
45
|
+
/** The header's own call to action (`theme@1.4`): the one filled control in the bar. */
|
|
52
46
|
function renderHeaderAction(action) {
|
|
53
47
|
if (action === undefined)
|
|
54
48
|
return '';
|
|
55
49
|
return (`<a class="cg-action cg-site-header__action" data-emphasis="primary" ` +
|
|
56
50
|
`href="${escapeAttribute(action.href)}">${escapeText(action.label)}</a>`);
|
|
57
51
|
}
|
|
52
|
+
/** `footerNote` as paragraphs: blank lines separate them, and a multi-line paragraph's first line is its label. */
|
|
53
|
+
export function renderFooterNote(note) {
|
|
54
|
+
const paragraphs = note
|
|
55
|
+
.replace(/\r\n?/g, '\n')
|
|
56
|
+
.split(/\n\s*\n/)
|
|
57
|
+
.map((paragraph) => paragraph
|
|
58
|
+
.split('\n')
|
|
59
|
+
.map((line) => line.trim())
|
|
60
|
+
.filter((line) => line !== ''))
|
|
61
|
+
.filter((lines) => lines.length > 0);
|
|
62
|
+
if (paragraphs.length === 0)
|
|
63
|
+
return null;
|
|
64
|
+
return h('div', { class: 'cg-site-footer__note', 'data-paragraphs': String(Math.min(paragraphs.length, 4)) }, paragraphs.map((lines) => {
|
|
65
|
+
const [first, ...rest] = lines;
|
|
66
|
+
if (rest.length === 0)
|
|
67
|
+
return h('p', { class: 'cg-site-footer__note-text' }, first);
|
|
68
|
+
return h('p', { class: 'cg-site-footer__note-text' }, h('span', { class: 'cg-site-footer__note-label' }, first), rest.flatMap((line, index) => (index === 0 ? [line] : [h('br'), line])));
|
|
69
|
+
}));
|
|
70
|
+
}
|
|
58
71
|
export function renderChrome(input) {
|
|
59
72
|
const siteNameText = escapeText(input.site.name);
|
|
60
73
|
const headerNavList = renderNavList(input.headerNav);
|
|
61
74
|
const headerAction = renderHeaderAction(input.headerAction);
|
|
62
75
|
const footerNavList = renderNavList(input.footerNav);
|
|
63
|
-
|
|
64
|
-
|
|
76
|
+
const mark = renderBrandMark(input.brand, { className: 'cg-site-header__logo' }) ??
|
|
77
|
+
`<span class="cg-site-header__name">${siteNameText}</span>`;
|
|
65
78
|
const themeToggle = serialize(renderThemeToggle(input.locale, { className: 'cg-theme-toggle' }));
|
|
66
79
|
const header = `<header class="cg-site-header"><div class="cg-site-header__inner">` +
|
|
67
80
|
`<a class="cg-site-header__home" href="${escapeAttribute(input.homeHref)}">${mark}</a>` +
|
|
68
81
|
`<input type="checkbox" id="cg-nav-toggle" class="cg-nav-toggle-input" aria-label="Menu">` +
|
|
69
82
|
`<label for="cg-nav-toggle" class="cg-nav-toggle-label" aria-hidden="true">` +
|
|
70
|
-
`<span class="cg-nav-toggle-bar"></span><span class="cg-nav-toggle-bar"></span
|
|
83
|
+
`<span class="cg-nav-toggle-bar"></span><span class="cg-nav-toggle-bar"></span>` +
|
|
71
84
|
`</label>` +
|
|
72
|
-
`${themeToggle}` +
|
|
73
85
|
`<nav class="cg-site-header__nav" id="cg-nav" aria-label="Primary">` +
|
|
74
86
|
`${headerNavList}${headerAction}` +
|
|
75
87
|
`</nav>` +
|
|
88
|
+
`${themeToggle}` +
|
|
76
89
|
`</div></header>`;
|
|
77
90
|
const tagline = input.tagline === undefined
|
|
78
91
|
? ''
|
|
79
92
|
: `<p class="cg-site-footer__tagline" data-field="tagline">${escapeText(input.tagline)}</p>`;
|
|
80
|
-
const
|
|
81
|
-
|
|
82
|
-
:
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
93
|
+
const socialList = renderSocialLinks(input.social, {
|
|
94
|
+
className: 'cg-site-footer__social',
|
|
95
|
+
itemClassName: 'cg-site-footer__social-item',
|
|
96
|
+
});
|
|
97
|
+
const note = input.footerNote === undefined ? null : renderFooterNote(input.footerNote);
|
|
98
|
+
// The copyright year is the year the page is rendered, which is what a
|
|
99
|
+
// legal line on a live site means.
|
|
100
|
+
const year = new Date().getFullYear();
|
|
101
|
+
// The footer widget columns (`theme@1.6`) are one row under the colophon's
|
|
102
|
+
// own columns and above the legal line, in the same small type.
|
|
103
|
+
const footerWidgets = renderFooterWidgets(input.widgets, {
|
|
104
|
+
className: 'cg-site-footer__widgets',
|
|
105
|
+
headingLevel: 'h2',
|
|
106
|
+
});
|
|
107
|
+
const footer = `<footer class="cg-site-footer"><div class="cg-site-footer__inner">` +
|
|
108
|
+
`<div class="cg-site-footer__top">` +
|
|
90
109
|
`<div class="cg-site-footer__brand">` +
|
|
91
|
-
`<a href="${escapeAttribute(input.homeHref)}">${siteNameText}</a>${tagline}` +
|
|
110
|
+
`<a class="cg-site-footer__name" href="${escapeAttribute(input.homeHref)}">${siteNameText}</a>${tagline}` +
|
|
92
111
|
`</div>` +
|
|
93
112
|
`${footerNavList === ''
|
|
94
113
|
? ''
|
|
95
114
|
: `<nav class="cg-site-footer__nav" aria-label="Footer">${footerNavList}</nav>`}` +
|
|
96
|
-
`${
|
|
97
|
-
`<div class="cg-site-
|
|
98
|
-
`</div
|
|
115
|
+
`${note === null ? '' : serialize(note)}` +
|
|
116
|
+
`${socialList === null ? '' : `<div class="cg-site-footer__social-col">${serialize(socialList)}</div>`}` +
|
|
117
|
+
`</div>` +
|
|
118
|
+
`${footerWidgets === null ? '' : serialize(footerWidgets)}` +
|
|
119
|
+
`<div class="cg-site-footer__bottom">` +
|
|
120
|
+
`<p class="cg-site-footer__legal">© ${year} ${siteNameText}</p>` +
|
|
121
|
+
`<div class="cg-site-footer__branding">${input.brandingHtml}</div>` +
|
|
122
|
+
`</div>` +
|
|
123
|
+
`</div></footer>`;
|
|
99
124
|
return { header, footer };
|
|
100
125
|
}
|
|
101
126
|
//# sourceMappingURL=chrome.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chrome.js","sourceRoot":"","sources":["../../../src/render/chrome.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,eAAe,EACf,UAAU,
|
|
1
|
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AK,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,aAAa,CAAC,EAAE;QAC3D,sCAAsC;QACtC,sCAAsC,IAAI,IAAI,YAAY,MAAM;QAChE,yCAAyC,KAAK,CAAC,YAAY,QAAQ;QACnE,QAAQ;QACR,iBAAiB,CAAA;IAEnB,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,CAAA;AAC3B,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type Attributes, type Child, type HtmlElement } from '@cogenta/theme-kit';
|
|
2
|
+
/**
|
|
3
|
+
* The frame every block of this theme renders into.
|
|
4
|
+
*
|
|
5
|
+
* The outer element is full width, so a band (the ink call to action, a
|
|
6
|
+
* muted variant) can paint edge to edge and so the section rhythm
|
|
7
|
+
* (`--cg-section`) is applied once, to every block alike. The inner element
|
|
8
|
+
* is the twelve-column container: one maximum width, one gutter, one column
|
|
9
|
+
* gap, for the whole site.
|
|
10
|
+
*
|
|
11
|
+
* `inner` is `figure` for the blocks whose own semantics are a figure (a
|
|
12
|
+
* quotation and its attribution, an image and its caption): `<figcaption>`
|
|
13
|
+
* must be a direct child of its `<figure>`, so the figure has to be the
|
|
14
|
+
* container itself rather than something nested inside it.
|
|
15
|
+
*/
|
|
16
|
+
export declare function section(outer: 'section' | 'div', block: string, className: string, attrs: Attributes, inner: 'div' | 'figure', ...children: readonly Child[]): HtmlElement;
|
|
17
|
+
/** A two-digit, zero-padded ordinal: `01`, `02`… — the index language this theme uses for numbered rows. */
|
|
18
|
+
export declare function ordinal(index: number): string;
|
|
19
|
+
/**
|
|
20
|
+
* A thin right arrow, drawn inline and hidden from assistive technology: it
|
|
21
|
+
* repeats what the link it sits in already says.
|
|
22
|
+
*/
|
|
23
|
+
export declare function arrow(): HtmlElement;
|
|
24
|
+
/** `March 2026` in the page's locale, or `null` when the value is not a date `Intl` can format. */
|
|
25
|
+
export declare function monthYear(iso: string, locale: string): string | null;
|
|
26
|
+
//# 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,EAAE,KAAK,UAAU,EAAE,KAAK,KAAK,EAAE,KAAK,WAAW,EAAK,MAAM,oBAAoB,CAAA;AAErF;;;;;;;;;;;;;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,4GAA4G;AAC5G,wBAAgB,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAE7C;AAED;;;GAGG;AACH,wBAAgB,KAAK,IAAI,WAAW,CAenC;AAED,mGAAmG;AACnG,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAQpE"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { h } from '@cogenta/theme-kit';
|
|
2
|
+
/**
|
|
3
|
+
* The frame every block of this theme renders into.
|
|
4
|
+
*
|
|
5
|
+
* The outer element is full width, so a band (the ink call to action, a
|
|
6
|
+
* muted variant) can paint edge to edge and so the section rhythm
|
|
7
|
+
* (`--cg-section`) is applied once, to every block alike. The inner element
|
|
8
|
+
* is the twelve-column container: one maximum width, one gutter, one column
|
|
9
|
+
* gap, for the whole site.
|
|
10
|
+
*
|
|
11
|
+
* `inner` is `figure` for the blocks whose own semantics are a figure (a
|
|
12
|
+
* quotation and its attribution, an image and its caption): `<figcaption>`
|
|
13
|
+
* must be a direct child of its `<figure>`, so the figure has to be the
|
|
14
|
+
* container itself rather than something nested inside it.
|
|
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
|
+
/** A two-digit, zero-padded ordinal: `01`, `02`… — the index language this theme uses for numbered rows. */
|
|
20
|
+
export function ordinal(index) {
|
|
21
|
+
return String(index + 1).padStart(2, '0');
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* A thin right arrow, drawn inline and hidden from assistive technology: it
|
|
25
|
+
* repeats what the link it sits in already says.
|
|
26
|
+
*/
|
|
27
|
+
export function arrow() {
|
|
28
|
+
return h('svg', {
|
|
29
|
+
class: 'cg-arrow',
|
|
30
|
+
viewBox: '0 0 20 20',
|
|
31
|
+
fill: 'none',
|
|
32
|
+
stroke: 'currentColor',
|
|
33
|
+
'stroke-width': '1.5',
|
|
34
|
+
'stroke-linecap': 'square',
|
|
35
|
+
'aria-hidden': 'true',
|
|
36
|
+
focusable: 'false',
|
|
37
|
+
}, h('path', { d: 'M3 10h13M11.5 5.5 16 10l-4.5 4.5' }));
|
|
38
|
+
}
|
|
39
|
+
/** `March 2026` in the page's locale, or `null` when the value is not a date `Intl` can format. */
|
|
40
|
+
export function monthYear(iso, locale) {
|
|
41
|
+
const date = new Date(iso);
|
|
42
|
+
if (Number.isNaN(date.getTime()))
|
|
43
|
+
return null;
|
|
44
|
+
try {
|
|
45
|
+
return new Intl.DateTimeFormat(locale, { month: 'long', year: 'numeric' }).format(date);
|
|
46
|
+
}
|
|
47
|
+
catch {
|
|
48
|
+
return new Intl.DateTimeFormat('en', { month: 'long', year: 'numeric' }).format(date);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=layout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layout.js","sourceRoot":"","sources":["../../../src/render/layout.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiD,CAAC,EAAE,MAAM,o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EAAE,SAAS,EAAE,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;IACzF,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,IAAI,CAAC,cAAc,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;IACvF,CAAC;AACH,CAAC"}
|
|
@@ -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,
|
|
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,EAClB,iBAAiB,EAEjB,YAAY,EAEb,MAAM,oBAAoB,CAAA;AAmB3B,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,CAkBpB;AAyED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,UAAU,CACxB,IAAI,EAAE,WAAW,EACjB,GAAG,EAAE,aAAa,EAClB,OAAO,GAAE,cAAmB,EAC5B,QAAQ,CAAC,EAAE,aAAa,GACvB,WAAW,CAab"}
|