wiki-formant 0.63.0 → 0.63.1
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/README.md +1 -1
- package/dist/block-views.d.ts +6 -3
- package/dist/block-views.js +3 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -821,7 +821,7 @@ The dispatch stays a `switch` over the wiki's own union, so a new type is a comp
|
|
|
821
821
|
|
|
822
822
|
An editor that draws each block in place, with a list of its own (miow's), hosts the same fields in `<BlockFieldsKit kit={KIT}>`, without `<BlockEditor>`. Only the two container fields need the full editor, since they hold a block list.
|
|
823
823
|
|
|
824
|
-
A `testimonial` is `{ quote, author, role?, avatarUrl? }`, drawn by `TestimonialView` as `figure.testimonial`: the words in a `blockquote`, then a `figcaption` holding the photo and a `span` of `strong` (who) and `small` (their role). radix-wiki and miow each had one under its own field names; a site with sized images passes `
|
|
824
|
+
A `testimonial` is `{ quote, author, role?, avatarUrl? }`, drawn by `TestimonialView` as `figure.testimonial`: the words in a `blockquote`, then a `figcaption` holding the photo and a `span` of `strong` (who) and `small` (their role). radix-wiki and miow each had one under its own field names; a site with sized images passes `photo`, the `<img>` attributes (`src`, `srcSet`, `sizes`) it made from `avatarUrl`. They are data, because a server component renders the view.
|
|
825
825
|
|
|
826
826
|
A banner with no text of its own shows `BANNER_MESSAGES` from `wiki-formant/text`, a sentence per variant that names no wiki; `BannerView` takes it unless `message` overrides it.
|
|
827
827
|
|
package/dist/block-views.d.ts
CHANGED
|
@@ -109,11 +109,14 @@ export interface TestimonialViewProps {
|
|
|
109
109
|
author: string;
|
|
110
110
|
role?: string;
|
|
111
111
|
avatarUrl?: string;
|
|
112
|
-
/**
|
|
113
|
-
|
|
112
|
+
/**
|
|
113
|
+
* The photo's sized `<img>` attributes, for a site with an image pipeline.
|
|
114
|
+
* Data, not a function: a server component renders this client view.
|
|
115
|
+
*/
|
|
116
|
+
photo?: Pick<ImgHTMLAttributes<HTMLImageElement>, 'src' | 'srcSet' | 'sizes'>;
|
|
114
117
|
}
|
|
115
118
|
/** Someone's words over who said them, with their photo when there is one. */
|
|
116
|
-
export declare function TestimonialView({ quote, author, role, avatarUrl,
|
|
119
|
+
export declare function TestimonialView({ quote, author, role, avatarUrl, photo }: TestimonialViewProps): import("react").JSX.Element | null;
|
|
117
120
|
/**
|
|
118
121
|
* A maintenance notice.
|
|
119
122
|
*
|
package/dist/block-views.js
CHANGED
|
@@ -115,11 +115,11 @@ export function StatsView({ items, columns = 4, }) {
|
|
|
115
115
|
return (_jsx("div", { className: cx('stat-grid', `stat-grid-${columns}`), children: rows.map((item, i) => (_jsxs("div", { className: "stat-card", children: [_jsxs("span", { className: "stat-value", children: [item.value, item.suffix && _jsx("span", { className: "stat-suffix", children: item.suffix })] }), _jsx("span", { className: "stat-label", children: item.label })] }, item.id ?? i))) }));
|
|
116
116
|
}
|
|
117
117
|
/** Someone's words over who said them, with their photo when there is one. */
|
|
118
|
-
export function TestimonialView({ quote, author, role, avatarUrl,
|
|
118
|
+
export function TestimonialView({ quote, author, role, avatarUrl, photo }) {
|
|
119
119
|
if (!quote.trim())
|
|
120
120
|
return null;
|
|
121
|
-
const
|
|
122
|
-
return (_jsxs("figure", { className: "testimonial", children: [_jsx("blockquote", { children: quote }), _jsxs("figcaption", { children: [
|
|
121
|
+
const src = avatarUrl && safeLinkHref(avatarUrl);
|
|
122
|
+
return (_jsxs("figure", { className: "testimonial", children: [_jsx("blockquote", { children: quote }), _jsxs("figcaption", { children: [src && _jsx("img", { src: src, ...photo, alt: "", loading: "lazy" }), _jsxs("span", { children: [_jsx("strong", { children: author }), role && _jsx("small", { children: role })] })] })] }));
|
|
123
123
|
}
|
|
124
124
|
// ---- banner -----------------------------------------------------------------
|
|
125
125
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wiki-formant",
|
|
3
|
-
"version": "0.63.
|
|
3
|
+
"version": "0.63.1",
|
|
4
4
|
"description": "The portable half of a wiki: derived taxonomy and facet controls, a version-negotiating MCP transport, markdown twins, block rendering, a rich-text editor engine, conditional-GET plumbing, and the headers and CSP every origin sends.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|