Skip to main content

moss_core/contract/
components.rs

1//! moss component contract — Source 2 of the federated contract.
2//!
3//! Single source of truth for every `moss-*` class moss currently emits.
4//! Each entry declares: the class name, its kind (container/instance/standalone/chrome),
5//! accepted `data-*` attributes with value spaces, example HTML, example markdown.
6//!
7//! ## Adding a new emitter class
8//!
9//! 1. Emit the class from your renderer module (`build/markdown/*`, `build/components/*`).
10//! 2. Add a `ComponentEntry` to [`COMPONENTS`] here.
11//! 3. Run `cargo test --test components_sync_test` from src-tauri/ — the
12//!    scanner test will fail if you forget.
13//! 4. Run `cargo run --bin generate-contract-docs --features dev-tools` to
14//!    refresh `docs/contract/reference.md`.
15//!
16//! ## Why a const table, not a derive macro?
17//!
18//! Mirrors the BUILTIN_FIELDS precedent in `schema_fields.rs`. The synchronization
19//! is enforced by a sync test (`emitter_classes_match_components_table`) that
20//! scans emitter Rust source for `class="moss-..."` literals. This is a
21//! best-effort scanner (won't catch classes assembled via `format!()`), not a
22//! type-checked guarantee like BUILTIN_FIELDS' compile-time mirror. The
23//! limitation is documented in the spec § Source 2.
24
25/// Status of a component entry.
26#[derive(Debug, Clone, Copy, PartialEq, Eq)]
27pub enum Status {
28    /// In active use; theme authors can rely on it.
29    Confirmed,
30    /// Emerging convention; may evolve.
31    Emerging,
32    /// Scheduled for removal; theme authors should migrate.
33    Retired,
34}
35
36/// A declared `data-*` attribute on a component.
37pub struct DataAttr {
38    /// Attribute name including `data-` prefix (e.g. `"data-layout"`).
39    pub name: &'static str,
40    /// Allowed values (e.g. `&["grid", "list", "minimal"]`). Empty means free-form.
41    pub values: &'static [&'static str],
42    /// Default value (first in `values`, or `""` for free-form).
43    pub default: &'static str,
44    /// Short description shown in reference.md.
45    pub description: &'static str,
46}
47
48/// A single component contract entry.
49pub struct ComponentEntry {
50    /// Class name without leading `.` (e.g. `"moss-cards"`).
51    pub class: &'static str,
52    /// Container / Instance / Standalone / Chrome.
53    pub kind: &'static str,
54    /// For Instance kinds, the parent container's class (or `""`).
55    pub parent: &'static str,
56    /// Declared `data-*` attributes on the element with this class.
57    pub data_attrs: &'static [DataAttr],
58    /// Example HTML snippet showing the class in context. Multi-line allowed.
59    pub example_html: &'static str,
60    /// Example markdown that produces this HTML. Empty for HTML-only chrome.
61    pub example_markdown: &'static str,
62    /// Status: confirmed / emerging / retired.
63    pub status: Status,
64    /// Contract version this entry was introduced in.
65    pub since: &'static str,
66    /// Optional human-readable description.
67    pub description: &'static str,
68}
69
70/// The full contract surface — every `moss-*` class moss currently emits.
71///
72/// Phase 0b seeds this with the CURRENT emitted vocabulary (not the
73/// v1-collapsed shape). Phase 1c rewrites to the collapsed form.
74pub const COMPONENTS: &[ComponentEntry] = &[
75    ComponentEntry {
76        class: "moss-cards",
77        kind: "container",
78        parent: "",
79        data_attrs: &[
80            DataAttr {
81                name: "data-layout",
82                values: &["grid", "list", "minimal"],
83                default: "grid",
84                description: "Card layout density. Grid: 2-3 cols with covers. List: single column with side covers. Minimal: text-only with year groupings.",
85            },
86            DataAttr {
87                name: "data-density",
88                values: &["default", "compact"],
89                default: "default",
90                description: "Vertical spacing density.",
91            },
92            DataAttr {
93                name: "data-list-axis",
94                values: &["date", "weight", "title"],
95                default: "title",
96                description: "Sort axis for the listing (mirrors the folder's `sort:` frontmatter). Drives `--moss-card-min` density tuning and decides whether each `.moss-card-meta` slot is filled (date axis) or omitted (weight/title axes).",
97            },
98            DataAttr {
99                name: "data-list-has-covers",
100                values: &[""],
101                default: "",
102                description: "Boolean presence flag: emitted iff any child card has a cover. Combines with `data-list-axis` to widen `--moss-card-min` for cover-led layouts. Use `[data-list-has-covers]` in CSS to target it.",
103            },
104        ],
105        example_html: r#"<div class="moss-cards-container">
106  <div class="moss-cards" data-layout="grid" data-list-axis="date" data-list-has-covers>
107    <a class="moss-card" href="...">...</a>
108    <a class="moss-card" href="...">...</a>
109  </div>
110</div>"#,
111        example_markdown: "",
112        status: Status::Confirmed,
113        since: "1",
114        description: "Auto-generated listing of child pages. The single canonical container; layout density on `data-layout` (`grid` for cover-led tiles, `list` for cover+excerpt rows, `minimal` for text-only year-grouped indexes). Wrapped in `.moss-cards-container` to scope CSS container queries.",
115    },
116    ComponentEntry {
117        class: "moss-cards-container",
118        kind: "container",
119        parent: "",
120        data_attrs: &[],
121        example_html: r#"<div class="moss-cards-container">
122  <div class="moss-cards" data-layout="grid">...</div>
123</div>"#,
124        example_markdown: "",
125        status: Status::Confirmed,
126        since: "1",
127        description: "Outer wrapper around `.moss-cards` that carries `container-type: inline-size` so the grid can use `@container` queries instead of viewport `@media` queries. Layout-agnostic — wraps any `data-layout` variant.",
128    },
129    ComponentEntry {
130        class: "moss-summary-layout",
131        kind: "container",
132        parent: "moss-cards",
133        data_attrs: &[],
134        example_html: r#"<div class="moss-cards" data-layout="list">...</div>"#,
135        example_markdown: "",
136        status: Status::Retired,
137        since: "1",
138        description: "Retired: the additional co-class on `.moss-cards[data-layout=\"list\"]` had no matching rules in the default CSS once `children_style: summary` collapsed into the list-layout block, and its lingering emission broke themes that hid the class (e.g. SoCiviC's `.moss/theme/style.css` keyed `display: none` on it, erasing folder-embed listings). Theme authors targeting summary listings should use `.moss-cards[data-layout=\"list\"]` directly.",
139    },
140    // -------------------------------------------------------------------
141    // Cards family — current emitted vocabulary (pre-Phase 1c collapsing).
142    // Three parallel layouts: grid, list, minimal. Each has its own
143    // container + instance + sub-classes.
144    // -------------------------------------------------------------------
145    ComponentEntry {
146        class: "moss-cards-grid",
147        kind: "container",
148        parent: "",
149        data_attrs: &[],
150        example_html: r#"<div class="moss-cards-grid">
151  <a class="moss-card-grid" href="...">...</a>
152</div>"#,
153        example_markdown: "",
154        status: Status::Retired,
155        since: "0",
156        description: "Retired in Phase 1c — collapsed into `.moss-cards[data-layout=grid]`.",
157    },
158    ComponentEntry {
159        class: "moss-cards-list",
160        kind: "container",
161        parent: "",
162        data_attrs: &[],
163        example_html: r#"<div class="moss-cards-list">
164  <a class="moss-card-list" href="...">...</a>
165</div>"#,
166        example_markdown: "",
167        status: Status::Retired,
168        since: "0",
169        description: "Retired in Phase 1c — collapsed into `.moss-cards[data-layout=list]`.",
170    },
171    ComponentEntry {
172        class: "moss-cards-minimal-year-group",
173        kind: "container",
174        parent: "",
175        data_attrs: &[],
176        example_html: r#"<section class="moss-cards-minimal-year-group">
177  <h3>2024</h3>
178  <div class="moss-card-minimal">...</div>
179</section>"#,
180        example_markdown: "",
181        status: Status::Confirmed,
182        since: "0",
183        description: "Year-grouped section in minimal card layout (e.g. blog index). Modifier `--summary` collapses past years.",
184    },
185    ComponentEntry {
186        class: "moss-cards-minimal-year-group--summary",
187        kind: "container",
188        parent: "moss-cards-minimal-year-group",
189        data_attrs: &[],
190        example_html: r#"<section class="moss-cards-minimal-year-group moss-cards-minimal-year-group--summary">...</section>"#,
191        example_markdown: "",
192        status: Status::Confirmed,
193        since: "0",
194        description: "BEM modifier on `.moss-cards-minimal-year-group`. Applied to year groups that should render in collapsed summary form (e.g. past years on a blog index).",
195    },
196    ComponentEntry {
197        class: "moss-card",
198        kind: "instance",
199        parent: "moss-cards",
200        data_attrs: &[
201            DataAttr {
202                name: "data-linkblog",
203                values: &[],
204                default: "",
205                description: "Presence flag: emitted IFF the card's source page has an `external_url:` frontmatter (linkblog pattern). When set, the element is a `<div>` rather than `<a>` so the kicker can host a nested `<a>★</a>` archive link; title, cover, and description carry their own inner anchors to the canonical URL. Absent on ordinary cards (single whole-card `<a>`).",
206            },
207        ],
208        example_html: r#"<a class="moss-card" href="...">...</a>"#,
209        example_markdown: "",
210        status: Status::Confirmed,
211        since: "1",
212        description: "v1 collapsed shape — single canonical instance class inside `.moss-cards`. Layout-specific styling targets `.moss-cards[data-layout=X] .moss-card`. Tag is `<a>` for ordinary cards and `<div>` for linkblog cards (`[data-linkblog]`).",
213    },
214    ComponentEntry {
215        class: "moss-card-cover",
216        kind: "instance",
217        parent: "moss-card",
218        data_attrs: &[],
219        example_html: r#"<div class="moss-card-cover"><img src="..." /></div>"#,
220        example_markdown: "",
221        status: Status::Confirmed,
222        since: "1",
223        description: "Cover media slot inside `.moss-card`. Gets `.moss-card-no-cover` modifier when no image is present.",
224    },
225    ComponentEntry {
226        class: "moss-card-no-cover",
227        kind: "instance",
228        parent: "moss-card",
229        data_attrs: &[],
230        example_html: r#"<div class="moss-card-cover moss-card-no-cover"></div>"#,
231        example_markdown: "",
232        status: Status::Confirmed,
233        since: "1",
234        description: "Modifier applied to `.moss-card-cover` when no cover media is available.",
235    },
236    ComponentEntry {
237        class: "moss-card-content",
238        kind: "instance",
239        parent: "moss-card",
240        data_attrs: &[],
241        example_html: r#"<div class="moss-card-content">...</div>"#,
242        example_markdown: "",
243        status: Status::Confirmed,
244        since: "1",
245        description: "Text content slot inside a grid-layout `.moss-card` (kicker + title + meta).",
246    },
247    ComponentEntry {
248        class: "moss-card-row",
249        kind: "instance",
250        parent: "moss-card",
251        data_attrs: &[],
252        example_html: r#"<div class="moss-card-row">...</div>"#,
253        example_markdown: "",
254        status: Status::Confirmed,
255        since: "1",
256        description: "Row wrapper inside a list-layout `.moss-card` holding body + cover side-by-side.",
257    },
258    ComponentEntry {
259        class: "moss-card-body",
260        kind: "instance",
261        parent: "moss-card",
262        data_attrs: &[],
263        example_html: r#"<div class="moss-card-body">...</div>"#,
264        example_markdown: "",
265        status: Status::Confirmed,
266        since: "1",
267        description: "Text body slot of a list-layout `.moss-card`.",
268    },
269    ComponentEntry {
270        class: "moss-card-head",
271        kind: "instance",
272        parent: "moss-card",
273        data_attrs: &[],
274        example_html: r#"<div class="moss-card-head">...</div>"#,
275        example_markdown: "",
276        status: Status::Confirmed,
277        since: "1",
278        description: "Header row of a `.moss-card-body` (title + kicker + meta).",
279    },
280    ComponentEntry {
281        class: "moss-card-title",
282        kind: "instance",
283        parent: "moss-card",
284        data_attrs: &[],
285        example_html: r#"<h3 class="moss-card-title">Page title</h3>"#,
286        example_markdown: "",
287        status: Status::Confirmed,
288        since: "1",
289        description: "Title inside `.moss-card`.",
290    },
291    ComponentEntry {
292        class: "moss-card-meta",
293        kind: "instance",
294        parent: "moss-card",
295        data_attrs: &[],
296        example_html: r#"<div class="moss-card-meta">2024-01-15</div>"#,
297        example_markdown: "",
298        status: Status::Confirmed,
299        since: "1",
300        description: "Type-aware metadata slot (date for articles, count for folders, domain for links). Renders ABOVE the title in horizontal mode — filling the kicker position when the explicit `kicker` slot is unset, per `docs/design-system/preview-cards.md:22-30`. To the right of the title in vertical CJK mode (the horizontal kicker position transposed). Meta IS the visual kicker, with the same uppercase overline treatment.",
301    },
302    ComponentEntry {
303        class: "moss-card-kicker",
304        kind: "instance",
305        parent: "moss-card",
306        data_attrs: &[],
307        example_html: r#"<span class="moss-card-kicker">Category</span>"#,
308        example_markdown: "",
309        status: Status::Confirmed,
310        since: "1",
311        description: "Eyebrow / overline above the title inside `.moss-card`.",
312    },
313    ComponentEntry {
314        class: "moss-card-permalink",
315        kind: "instance",
316        parent: "moss-card-kicker",
317        data_attrs: &[],
318        example_html: r#"<a class="moss-card-permalink" href="/posts/foo/" title="Permalink to 'Title'">★</a>"#,
319        example_markdown: "",
320        status: Status::Emerging,
321        since: "1",
322        description: "Author's-archive link mark (★, U+2605) emitted INSIDE `.moss-card-kicker` for linkblog cards (those whose child page has `external_url:`). The card title links to the external canonical (publisher); the `★` links to the local archival copy at the page's slug. Reads as part of the kicker line — \"Publisher · Year ★\". Semantically distinct from Daring-Fireball's linkblog ★ (which marks discussion permalink alongside commentary) — here the local copy is the same content preserved for resilience and stable bylines, not added commentary. Putting `<a>★</a>` inside the kicker is valid because linkblog cards emit `<div class=\"moss-card\" data-linkblog>` (not `<a>`) as the outer element — see the `data-linkblog` attribute described on `.moss-card`.",
323    },
324    ComponentEntry {
325        class: "moss-card-title-link",
326        kind: "instance",
327        parent: "moss-card-head",
328        data_attrs: &[],
329        example_html: r#"<a class="moss-card-title-link" href="https://outlet.example/article"><h3 class="moss-card-title">Article Title</h3></a>"#,
330        example_markdown: "",
331        status: Status::Emerging,
332        since: "1",
333        description: "Anchor wrapping the `.moss-card-title` `<h3>` on linkblog cards. Ordinary cards have the whole-card `<a class=\"moss-card\">` as the link target — but linkblog cards switch the outer to `<div>` so the kicker can host a nested `★` anchor, which means the title needs its own anchor to stay clickable. Same canonical-URL target as the other inner anchors (`moss-card-cover-link`, `moss-card-description-link`).",
334    },
335    ComponentEntry {
336        class: "moss-card-cover-link",
337        kind: "instance",
338        parent: "moss-card-row",
339        data_attrs: &[],
340        example_html: r#"<a class="moss-card-cover-link" href="https://outlet.example/article"><div class="moss-card-cover">...</div></a>"#,
341        example_markdown: "",
342        status: Status::Emerging,
343        since: "1",
344        description: "Anchor wrapping the `.moss-card-cover` on linkblog cards — same role as `.moss-card-title-link` but for the cover image / media. Targets the canonical (external) URL.",
345    },
346    ComponentEntry {
347        class: "moss-card-description-link",
348        kind: "instance",
349        parent: "moss-card-body",
350        data_attrs: &[],
351        example_html: r#"<a class="moss-card-description-link" href="https://outlet.example/article"><p class="moss-card-description">…</p></a>"#,
352        example_markdown: "",
353        status: Status::Emerging,
354        since: "1",
355        description: "Anchor wrapping the `.moss-card-description` on linkblog cards — same role as `.moss-card-title-link` but for the description excerpt. Targets the canonical (external) URL.",
356    },
357    ComponentEntry {
358        class: "moss-card-description",
359        kind: "instance",
360        parent: "moss-card",
361        data_attrs: &[],
362        example_html: r#"<p class="moss-card-description">Excerpt...</p>"#,
363        example_markdown: "",
364        status: Status::Confirmed,
365        since: "1",
366        description: "Excerpt / description paragraph inside a `.moss-card` — below the title in both grid- and list-layout cards.",
367    },
368    ComponentEntry {
369        class: "moss-card-count",
370        kind: "instance",
371        parent: "moss-card",
372        data_attrs: &[],
373        example_html: r#"<div class="moss-card-count">4 articles</div>"#,
374        example_markdown: "",
375        status: Status::Confirmed,
376        since: "1",
377        description: "Tertiary subtitle line showing `N articles` for a folder card. Renders only on non-date listings when the folder card has no `description` to display.",
378    },
379    ComponentEntry {
380        class: "moss-embed-more",
381        kind: "instance",
382        parent: "moss-cards-container",
383        data_attrs: &[],
384        example_html: r#"<p class="moss-embed-more"><a href="/news/">More →</a></p>"#,
385        example_markdown: "",
386        status: Status::Confirmed,
387        since: "1",
388        description: "Trailing \"More →\" link on a truncated children listing (emitted when `children_limit` caps the embed); links to the folder's full index. Rendered as a sibling immediately after `.moss-cards-container`, so it sits outside the listing's flex `gap` and binds to the list via its own `margin-top` (see docs/architecture/ui-design/spacing.md).",
389    },
390    ComponentEntry {
391        class: "moss-card-grid",
392        kind: "instance",
393        parent: "moss-cards-grid",
394        data_attrs: &[],
395        example_html: r#"<a class="moss-card-grid" href="...">...</a>"#,
396        example_markdown: "",
397        status: Status::Retired,
398        since: "0",
399        description: "Retired in Phase 1c — collapsed into `.moss-card` (with parent `.moss-cards[data-layout=grid]`).",
400    },
401    ComponentEntry {
402        class: "moss-card-grid-cover",
403        kind: "instance",
404        parent: "moss-card-grid",
405        data_attrs: &[],
406        example_html: r#"<div class="moss-card-grid-cover"><img src="..." /></div>"#,
407        example_markdown: "",
408        status: Status::Retired,
409        since: "0",
410        description: "Retired in Phase 1c — collapsed into `.moss-card-cover`.",
411    },
412    ComponentEntry {
413        class: "moss-card-grid-no-cover",
414        kind: "instance",
415        parent: "moss-card-grid",
416        data_attrs: &[],
417        example_html: r#"<div class="moss-card-grid-cover moss-card-grid-no-cover"></div>"#,
418        example_markdown: "",
419        status: Status::Retired,
420        since: "0",
421        description: "Retired in Phase 1c — collapsed into `.moss-card-no-cover`.",
422    },
423    ComponentEntry {
424        class: "moss-card-grid-content",
425        kind: "instance",
426        parent: "moss-card-grid",
427        data_attrs: &[],
428        example_html: r#"<div class="moss-card-grid-content">...</div>"#,
429        example_markdown: "",
430        status: Status::Retired,
431        since: "0",
432        description: "Retired in Phase 1c — collapsed into `.moss-card-content`.",
433    },
434    ComponentEntry {
435        class: "moss-card-grid-kicker",
436        kind: "instance",
437        parent: "moss-card-grid",
438        data_attrs: &[],
439        example_html: r#"<span class="moss-card-grid-kicker">Category</span>"#,
440        example_markdown: "",
441        status: Status::Retired,
442        since: "0",
443        description: "Retired in Phase 1c — collapsed into `.moss-card-kicker`.",
444    },
445    ComponentEntry {
446        class: "moss-card-grid-title",
447        kind: "instance",
448        parent: "moss-card-grid",
449        data_attrs: &[],
450        example_html: r#"<h3 class="moss-card-grid-title">Page title</h3>"#,
451        example_markdown: "",
452        status: Status::Retired,
453        since: "0",
454        description: "Retired in Phase 1c — collapsed into `.moss-card-title`.",
455    },
456    ComponentEntry {
457        class: "moss-card-grid-meta",
458        kind: "instance",
459        parent: "moss-card-grid",
460        data_attrs: &[],
461        example_html: r#"<div class="moss-card-grid-meta">2024-01-15</div>"#,
462        example_markdown: "",
463        status: Status::Retired,
464        since: "0",
465        description: "Retired in Phase 1c — collapsed into `.moss-card-meta`.",
466    },
467    ComponentEntry {
468        class: "moss-card-list",
469        kind: "instance",
470        parent: "moss-cards-list",
471        data_attrs: &[],
472        example_html: r#"<a class="moss-card-list" href="...">...</a>"#,
473        example_markdown: "",
474        status: Status::Retired,
475        since: "0",
476        description: "Retired in Phase 1c — collapsed into `.moss-card` (with parent `.moss-cards[data-layout=list]`).",
477    },
478    ComponentEntry {
479        class: "moss-card-list-row",
480        kind: "instance",
481        parent: "moss-card-list",
482        data_attrs: &[],
483        example_html: r#"<div class="moss-card-list-row">...</div>"#,
484        example_markdown: "",
485        status: Status::Retired,
486        since: "0",
487        description: "Retired in Phase 1c — collapsed into `.moss-card-row`.",
488    },
489    ComponentEntry {
490        class: "moss-card-list-cover",
491        kind: "instance",
492        parent: "moss-card-list",
493        data_attrs: &[],
494        example_html: r#"<div class="moss-card-list-cover"><img src="..." /></div>"#,
495        example_markdown: "",
496        status: Status::Retired,
497        since: "0",
498        description: "Retired in Phase 1c — collapsed into `.moss-card-cover`.",
499    },
500    ComponentEntry {
501        class: "moss-card-list-body",
502        kind: "instance",
503        parent: "moss-card-list",
504        data_attrs: &[],
505        example_html: r#"<div class="moss-card-list-body">...</div>"#,
506        example_markdown: "",
507        status: Status::Retired,
508        since: "0",
509        description: "Retired in Phase 1c — collapsed into `.moss-card-body`.",
510    },
511    ComponentEntry {
512        class: "moss-card-list-head",
513        kind: "instance",
514        parent: "moss-card-list",
515        data_attrs: &[],
516        example_html: r#"<div class="moss-card-list-head">...</div>"#,
517        example_markdown: "",
518        status: Status::Retired,
519        since: "0",
520        description: "Retired in Phase 1c — collapsed into `.moss-card-head`.",
521    },
522    ComponentEntry {
523        class: "moss-card-list-kicker",
524        kind: "instance",
525        parent: "moss-card-list",
526        data_attrs: &[],
527        example_html: r#"<span class="moss-card-list-kicker">Category</span>"#,
528        example_markdown: "",
529        status: Status::Retired,
530        since: "0",
531        description: "Retired in Phase 1c — collapsed into `.moss-card-kicker`.",
532    },
533    ComponentEntry {
534        class: "moss-card-list-title",
535        kind: "instance",
536        parent: "moss-card-list",
537        data_attrs: &[],
538        example_html: r#"<h3 class="moss-card-list-title">Page title</h3>"#,
539        example_markdown: "",
540        status: Status::Retired,
541        since: "0",
542        description: "Retired in Phase 1c — collapsed into `.moss-card-title`.",
543    },
544    ComponentEntry {
545        class: "moss-card-list-meta",
546        kind: "instance",
547        parent: "moss-card-list",
548        data_attrs: &[],
549        example_html: r#"<div class="moss-card-list-meta">2024-01-15</div>"#,
550        example_markdown: "",
551        status: Status::Retired,
552        since: "0",
553        description: "Retired in Phase 1c — collapsed into `.moss-card-meta`.",
554    },
555    ComponentEntry {
556        class: "moss-card-list-description",
557        kind: "instance",
558        parent: "moss-card-list",
559        data_attrs: &[],
560        example_html: r#"<p class="moss-card-list-description">Excerpt...</p>"#,
561        example_markdown: "",
562        status: Status::Retired,
563        since: "0",
564        description: "Retired in Phase 1c — collapsed into `.moss-card-description`.",
565    },
566    ComponentEntry {
567        class: "moss-card-minimal",
568        kind: "instance",
569        parent: "moss-cards-minimal-year-group",
570        data_attrs: &[],
571        example_html: r#"<div class="moss-card-minimal">
572  <a class="moss-prefix-link" href="...">...</a>
573</div>"#,
574        example_markdown: "",
575        status: Status::Retired,
576        since: "0",
577        description: "Retired in Phase 1c — collapsed into `.moss-card` (with parent `.moss-cards[data-layout=minimal]`).",
578    },
579    ComponentEntry {
580        class: "moss-folder-item",
581        kind: "instance",
582        parent: "moss-cards-minimal-year-group",
583        data_attrs: &[],
584        example_html: r#"<div class="moss-card-minimal moss-folder-item">
585  <a class="moss-prefix-link moss-folder-link" href="...">...</a>
586  <p class="moss-folder-description">...</p>
587</div>"#,
588        example_markdown: "",
589        status: Status::Confirmed,
590        since: "0",
591        description: "Modifier on `.moss-card-minimal` for folder-type entries in minimal listings.",
592    },
593    ComponentEntry {
594        class: "moss-folder-title",
595        kind: "instance",
596        parent: "moss-folder-item",
597        data_attrs: &[],
598        example_html: r#"<span class="moss-folder-title">Folder name</span>"#,
599        example_markdown: "",
600        status: Status::Confirmed,
601        since: "0",
602        description: "Title text of a folder entry in minimal listings.",
603    },
604    ComponentEntry {
605        class: "moss-folder-description",
606        kind: "instance",
607        parent: "moss-folder-item",
608        data_attrs: &[],
609        example_html: r#"<p class="moss-folder-description">Description...</p>"#,
610        example_markdown: "",
611        status: Status::Confirmed,
612        since: "0",
613        description: "Description paragraph of a folder entry in minimal listings.",
614    },
615    ComponentEntry {
616        class: "moss-folder-link",
617        kind: "instance",
618        parent: "moss-folder-item",
619        data_attrs: &[],
620        example_html: r#"<a class="moss-prefix-link moss-folder-link" href="...">...</a>"#,
621        example_markdown: "",
622        status: Status::Confirmed,
623        since: "0",
624        description: "Modifier on `.moss-prefix-link` for folder-type links in minimal listings.",
625    },
626    // -------------------------------------------------------------------
627    // Prefix-link primitive — used by minimal cards and other listings.
628    // -------------------------------------------------------------------
629    ComponentEntry {
630        class: "moss-prefix-link",
631        kind: "instance",
632        parent: "moss-card-minimal",
633        data_attrs: &[],
634        example_html: r#"<a class="moss-prefix-link" href="...">
635  <span class="moss-prefix-link-prefix">2024-01-15</span>
636  <span class="moss-prefix-link-title">Page title</span>
637</a>"#,
638        example_markdown: "",
639        status: Status::Emerging,
640        since: "0",
641        description: "Link with a prefix span (date or icon) and a title span. Used inside minimal cards.",
642    },
643    ComponentEntry {
644        class: "moss-prefix-link-prefix",
645        kind: "instance",
646        parent: "moss-prefix-link",
647        data_attrs: &[],
648        example_html: r#"<span class="moss-prefix-link-prefix">2024-01-15</span>"#,
649        example_markdown: "",
650        status: Status::Emerging,
651        since: "0",
652        description: "Prefix slot of a prefix-link (typically a date).",
653    },
654    ComponentEntry {
655        class: "moss-prefix-link-title",
656        kind: "instance",
657        parent: "moss-prefix-link",
658        data_attrs: &[],
659        example_html: r#"<span class="moss-prefix-link-title">Page title</span>"#,
660        example_markdown: "",
661        status: Status::Emerging,
662        since: "0",
663        description: "Title slot of a prefix-link.",
664    },
665    ComponentEntry {
666        class: "moss-prefix-link-suffix",
667        kind: "instance",
668        parent: "moss-prefix-link",
669        data_attrs: &[],
670        example_html: r#"<span class="moss-prefix-link-suffix">→</span>"#,
671        example_markdown: "",
672        status: Status::Emerging,
673        since: "0",
674        description: "Optional trailing slot of a prefix-link.",
675    },
676    // -------------------------------------------------------------------
677    // Callouts — Obsidian-style admonitions. Type variant goes on the
678    // container as `.callout-<type>`. Phase 1c may collapse into
679    // `.moss-callout[data-type]`.
680    // -------------------------------------------------------------------
681    ComponentEntry {
682        class: "moss-callout",
683        kind: "standalone",
684        parent: "",
685        data_attrs: &[],
686        example_html: r#"<div class="moss-callout callout" data-type="note">
687  <div class="callout-title">Note</div>
688  <div class="callout-content">Body...</div>
689</div>"#,
690        example_markdown: "> [!note]\n> Body...",
691        status: Status::Confirmed,
692        since: "0",
693        description: "Obsidian-style callout. The Obsidian-compat `.callout` class is co-emitted; type lives on `data-type` (v1).",
694    },
695    ComponentEntry {
696        class: "callout",
697        kind: "standalone",
698        parent: "",
699        data_attrs: &[
700            DataAttr {
701                name: "data-type",
702                values: &["note", "info", "tip", "warning", "pending"],
703                default: "note",
704                description: "v1 callout type. Theme authors target `.callout[data-type=...]` to style by variant.",
705            },
706        ],
707        example_html: r#"<div class="moss-callout callout" data-type="note">...</div>"#,
708        example_markdown: "",
709        status: Status::Confirmed,
710        since: "0",
711        description: "Obsidian-compat class co-emitted on every callout for theme parity. Type lives on `data-type` (v1).",
712    },
713    ComponentEntry {
714        class: "callout-title",
715        kind: "instance",
716        parent: "moss-callout",
717        data_attrs: &[],
718        example_html: r#"<div class="callout-title">Note</div>"#,
719        example_markdown: "",
720        status: Status::Confirmed,
721        since: "0",
722        description: "Title row of a callout.",
723    },
724    ComponentEntry {
725        class: "callout-content",
726        kind: "instance",
727        parent: "moss-callout",
728        data_attrs: &[],
729        example_html: r#"<div class="callout-content">Body...</div>"#,
730        example_markdown: "",
731        status: Status::Confirmed,
732        since: "0",
733        description: "Body container of a callout.",
734    },
735    ComponentEntry {
736        class: "callout-note",
737        kind: "instance",
738        parent: "moss-callout",
739        data_attrs: &[],
740        example_html: r#"<div class="moss-callout callout callout-note">...</div>"#,
741        example_markdown: "> [!note]\n> Body",
742        status: Status::Retired,
743        since: "0",
744        description: "Retired in Phase 1c — type lives on `.callout[data-type=note]`.",
745    },
746    ComponentEntry {
747        class: "callout-info",
748        kind: "instance",
749        parent: "moss-callout",
750        data_attrs: &[],
751        example_html: r#"<div class="moss-callout callout callout-info">...</div>"#,
752        example_markdown: "> [!info]\n> Body",
753        status: Status::Retired,
754        since: "0",
755        description: "Retired in Phase 1c — type lives on `.callout[data-type=info]`.",
756    },
757    ComponentEntry {
758        class: "callout-tip",
759        kind: "instance",
760        parent: "moss-callout",
761        data_attrs: &[],
762        example_html: r#"<div class="moss-callout callout callout-tip">...</div>"#,
763        example_markdown: "> [!tip]\n> Body",
764        status: Status::Retired,
765        since: "0",
766        description: "Retired in Phase 1c — type lives on `.callout[data-type=tip]`.",
767    },
768    ComponentEntry {
769        class: "callout-warning",
770        kind: "instance",
771        parent: "moss-callout",
772        data_attrs: &[],
773        example_html: r#"<div class="moss-callout callout callout-warning">...</div>"#,
774        example_markdown: "> [!warning]\n> Body",
775        status: Status::Retired,
776        since: "0",
777        description: "Retired in Phase 1c — type lives on `.callout[data-type=warning]`.",
778    },
779    ComponentEntry {
780        class: "callout-pending",
781        kind: "instance",
782        parent: "moss-callout",
783        data_attrs: &[],
784        example_html: r#"<div class="moss-callout callout callout-pending">...</div>"#,
785        example_markdown: "> [!pending]\n> Body",
786        status: Status::Retired,
787        since: "0",
788        description: "Retired in Phase 1c — type lives on `.callout[data-type=pending]`.",
789    },
790    // -------------------------------------------------------------------
791    // Embeds — `![[file.ext]]` shortcode renderers (audio, video, pdf,
792    // notebook, table, 3d, iframe).
793    // -------------------------------------------------------------------
794    ComponentEntry {
795        class: "moss-embed",
796        kind: "standalone",
797        parent: "",
798        data_attrs: &[
799            DataAttr {
800                name: "data-type",
801                values: &["audio", "video", "pdf", "notebook", "table", "iframe", "3d"],
802                default: "",
803                description: "v1 embed kind. Set on the embed element. Theme authors target `.moss-embed[data-type=...]`.",
804            },
805            DataAttr {
806                name: "data-width",
807                values: &["body", "wide", "page", "screen"],
808                default: "body",
809                description: "Display width — text-column (body), wider than text (wide), page-width (page), or viewport-width (screen). See spec § P9.",
810            },
811            DataAttr {
812                name: "data-provider",
813                values: &["youtube", "vimeo", "codepen"],
814                default: "",
815                description: "Identifies the embed provider for external URL embeds. Absent for generic iframes and local HTML embeds.",
816            },
817        ],
818        example_html: r#"<div class="moss-embed moss-embed-pdf"><iframe src="..."></iframe></div>"#,
819        example_markdown: "![[paper.pdf]]",
820        status: Status::Confirmed,
821        since: "0",
822        description: "Base class on every typed embed. Kind on `data-type` (v1). `.moss-embed-audio` / `-video` / `-pdf` / `-notebook` / `-table` / `-iframe` / `-3d` retired in Phase 1c.",
823    },
824    ComponentEntry {
825        class: "moss-embed-audio",
826        kind: "instance",
827        parent: "moss-embed",
828        data_attrs: &[],
829        example_html: r#"<div class="moss-embed moss-embed-audio"><audio controls src="..."></audio></div>"#,
830        example_markdown: "![[track.mp3]]",
831        status: Status::Retired,
832        since: "0",
833        description: "Retired in Phase 1c — collapsed to `.moss-embed[data-type=audio]`.",
834    },
835    ComponentEntry {
836        class: "moss-embed-video",
837        kind: "instance",
838        parent: "moss-embed",
839        data_attrs: &[],
840        example_html: r#"<div class="moss-embed moss-embed-video"><video controls src="..."></video></div>"#,
841        example_markdown: "![[clip.mp4]]",
842        status: Status::Retired,
843        since: "0",
844        description: "Retired in Phase 1c — collapsed to `.moss-embed[data-type=video]`.",
845    },
846    ComponentEntry {
847        class: "moss-embed-pdf",
848        kind: "instance",
849        parent: "moss-embed",
850        data_attrs: &[],
851        example_html: r#"<div class="moss-embed moss-embed-pdf"><iframe src="..."></iframe></div>"#,
852        example_markdown: "![[paper.pdf]]",
853        status: Status::Retired,
854        since: "0",
855        description: "Retired in Phase 1c — collapsed to `.moss-embed[data-type=pdf]`.",
856    },
857    ComponentEntry {
858        class: "moss-embed-iframe",
859        kind: "instance",
860        parent: "moss-embed",
861        data_attrs: &[],
862        example_html: r#"<div class="moss-embed moss-embed-iframe"><iframe src="..."></iframe></div>"#,
863        example_markdown: "![[page.html]]",
864        status: Status::Retired,
865        since: "0",
866        description: "Retired in Phase 1c — collapsed to `.moss-embed[data-type=iframe]`.",
867    },
868    ComponentEntry {
869        class: "moss-embed-notebook",
870        kind: "instance",
871        parent: "moss-embed",
872        data_attrs: &[],
873        example_html: r#"<div class="moss-embed moss-embed-notebook">...</div>"#,
874        example_markdown: "![[analysis.ipynb]]",
875        status: Status::Retired,
876        since: "0",
877        description: "Retired in Phase 1c — collapsed to `.moss-embed[data-type=notebook]`.",
878    },
879    ComponentEntry {
880        class: "moss-embed-ipynb",
881        kind: "instance",
882        parent: "moss-embed",
883        data_attrs: &[],
884        example_html: r#"<div class="moss-embed moss-embed-ipynb">...</div>"#,
885        example_markdown: "",
886        status: Status::Emerging,
887        since: "0",
888        description: "Alias of `.moss-embed-notebook`; consolidation pending.",
889    },
890    ComponentEntry {
891        class: "moss-embed-table",
892        kind: "instance",
893        parent: "moss-embed",
894        data_attrs: &[],
895        example_html: r#"<div class="moss-embed moss-embed-table"><table>...</table></div>"#,
896        example_markdown: "![[data.csv]]",
897        status: Status::Retired,
898        since: "0",
899        description: "Retired in Phase 1c — collapsed to `.moss-embed[data-type=table]`.",
900    },
901    ComponentEntry {
902        class: "moss-embed-3d",
903        kind: "instance",
904        parent: "moss-embed",
905        data_attrs: &[],
906        example_html: r#"<div class="moss-embed moss-embed-3d">...</div>"#,
907        example_markdown: "![[model.glb]]",
908        status: Status::Retired,
909        since: "0",
910        description: "Retired in Phase 1c — collapsed to `.moss-embed[data-type=3d]`.",
911    },
912    ComponentEntry {
913        class: "moss-embed-error",
914        kind: "instance",
915        parent: "moss-embed",
916        data_attrs: &[],
917        example_html: r#"<div class="moss-embed moss-embed-error">File not found: ...</div>"#,
918        example_markdown: "",
919        status: Status::Confirmed,
920        since: "0",
921        description: "Error state for embeds whose target cannot be resolved.",
922    },
923    ComponentEntry {
924        class: "moss-embed-missing",
925        kind: "instance",
926        parent: "moss-embed",
927        data_attrs: &[],
928        example_html: r#"<div class="moss-embed-missing">Folder not found: journal</div>"#,
929        example_markdown: "",
930        status: Status::Confirmed,
931        since: "1",
932        description: "Fallback rendered when a folder-list embed (`![[journal/]]`) targets a folder that does not exist or cannot be resolved. Distinct from `.moss-embed-error` (file/wikilink resolution failure) — this one is specifically the folder-listing path.",
933    },
934    // -------------------------------------------------------------------
935    // Hero, image, visual primitives.
936    // -------------------------------------------------------------------
937    ComponentEntry {
938        class: "moss-hero",
939        kind: "standalone",
940        parent: "",
941        data_attrs: &[
942            DataAttr {
943                name: "data-width",
944                values: &["body", "wide", "page", "screen"],
945                default: "body",
946                description: "Display width — text-column (body), wider than text (wide), page-width (page), or viewport-width (screen). See spec § P9. Phase 1c will emit this from authoring shortcode (e.g. `:::hero {full}` -> `data-width=\"screen\"`).",
947            },
948        ],
949        example_html: r#"<section class="moss-hero" data-width="page">
950  <div class="moss-hero-content">...</div>
951</section>"#,
952        example_markdown: ":::hero {image=cover.jpg}\n:::\n",
953        status: Status::Confirmed,
954        since: "0",
955        description: "Hero banner section at the top of a page (cover image + title). v1 adds `data-width` for author-controlled sizing.",
956    },
957    ComponentEntry {
958        class: "moss-hero-content",
959        kind: "instance",
960        parent: "moss-hero",
961        data_attrs: &[],
962        example_html: r#"<div class="moss-hero-content">...</div>"#,
963        example_markdown: "",
964        status: Status::Confirmed,
965        since: "0",
966        description: "Text content slot inside `.moss-hero`.",
967    },
968    ComponentEntry {
969        class: "moss-image",
970        kind: "standalone",
971        parent: "",
972        data_attrs: &[
973            DataAttr {
974                name: "data-aspect",
975                values: &["portrait", "square", "auto"],
976                default: "auto",
977                description: "v1 image aspect-ratio hint. Theme authors target `.moss-image[data-aspect=...]`. Emitter wiring lands in a follow-up.",
978            },
979            DataAttr {
980                name: "data-width",
981                values: &["body", "wide", "page", "screen"],
982                default: "body",
983                description: "Display width — text-column (body), wider than text (wide), page-width (page), or viewport-width (screen). See spec § P9.",
984            },
985        ],
986        example_html: r#"<figure class="moss-image" style="width:55%"><img src="..." alt="..." /></figure>"#,
987        example_markdown: "![alt](image.jpg)",
988        status: Status::Confirmed,
989        since: "0",
990        description: "Wrapper around an inline `<img>` for sizing and figure semantics. `data-width` carries a named width token (body|wide|page|screen); a content-relative width is instead emitted as inline `style=\"width:NN%\"` (set by the editor drag-resize), which also forces the inner image to fill that percent box. Images narrower than the content column center horizontally.",
991    },
992    ComponentEntry {
993        class: "moss-align-left",
994        kind: "standalone",
995        parent: "",
996        data_attrs: &[],
997        example_html: r#"<img src="..." alt="..." class="moss-align-left" />"#,
998        example_markdown: "![[photo.jpg|align-left]]",
999        status: Status::Confirmed,
1000        since: "0",
1001        description: "Floats an image to the left of body text (editorial runaround). Defaults max-width to 50% on desktop, collapses to full-width below 48rem. CSS `:has()` escalates the float to a wrapping `<figure class=\"moss-image\">` or `<picture>` when present. Mirrors WordPress's `alignleft` convention.",
1002    },
1003    ComponentEntry {
1004        class: "moss-align-right",
1005        kind: "standalone",
1006        parent: "",
1007        data_attrs: &[],
1008        example_html: r#"<img src="..." alt="..." class="moss-align-right" />"#,
1009        example_markdown: "![[photo.jpg|align-right]]",
1010        status: Status::Confirmed,
1011        since: "0",
1012        description: "Floats an image to the right of body text (editorial runaround). Symmetric counterpart to `.moss-align-left`. Mirrors WordPress's `alignright` convention.",
1013    },
1014    ComponentEntry {
1015        class: "moss-article-title",
1016        kind: "instance",
1017        parent: "",
1018        data_attrs: &[],
1019        example_html: r#"<h1 class="moss-article-title">Title</h1>"#,
1020        example_markdown: "",
1021        status: Status::Emerging,
1022        since: "0",
1023        description: "Article-page H1 title emitted from frontmatter.",
1024    },
1025    ComponentEntry {
1026        class: "moss-heading-anchor",
1027        kind: "instance",
1028        parent: "",
1029        data_attrs: &[],
1030        example_html: r##"<h2 id="setup">Setup<a class="moss-heading-anchor" href="#setup" aria-label="Permalink to this section"><span aria-hidden="true">#</span></a></h2>"##,
1031        example_markdown: "## Setup",
1032        status: Status::Emerging,
1033        since: "1",
1034        description: "Clickable permalink appended inside every author-written body heading that carries a slug id; links to the heading's `#`-fragment. The auto-injected `moss-article-title` H1 is emitted separately and gets no anchor.",
1035    },
1036    // -------------------------------------------------------------------
1037    // Grid + gallery + buttons containers (free-form layouts).
1038    // -------------------------------------------------------------------
1039    ComponentEntry {
1040        class: "moss-grid",
1041        kind: "container",
1042        parent: "",
1043        data_attrs: &[
1044            DataAttr {
1045                name: "data-width",
1046                values: &["body", "wide", "page", "screen"],
1047                default: "body",
1048                description: "Display width — text-column (body), wider than text (wide), page-width (page), or viewport-width (screen). See spec § P9.",
1049            },
1050        ],
1051        example_html: r#"<div class="moss-grid" data-width="wide">
1052  <div class="moss-grid-card">...</div>
1053</div>"#,
1054        example_markdown: ":::grid {cols=2}\nLeft cell\n+++\nRight cell\n:::\n",
1055        status: Status::Confirmed,
1056        since: "0",
1057        description: "Generic grid container (used by profiles, link previews, etc.). Modifier classes: `profiles`, `featured`, `no-cards`. v1 adds `data-width` (P9).",
1058    },
1059    ComponentEntry {
1060        class: "moss-grid-card",
1061        kind: "instance",
1062        parent: "moss-grid",
1063        data_attrs: &[
1064            DataAttr {
1065                name: "data-kind",
1066                values: &["link", "friend", "card"],
1067                default: "card",
1068                description: "v1 grid-card variant. Today expressed via co-emitted classes (`.link-card`, `.friend-card`, `.no-cards`); Phase 1c collapses to this `data-kind` attribute.",
1069            },
1070        ],
1071        example_html: r#"<a class="moss-grid-card" data-kind="link" href="...">...</a>"#,
1072        example_markdown: "",
1073        status: Status::Confirmed,
1074        since: "0",
1075        description: "Card instance inside `.moss-grid`. Today emits sibling classes `link-card` / `friend-card` / `no-cards`; v1 collapses to `data-kind`.",
1076    },
1077    ComponentEntry {
1078        class: "moss-gallery",
1079        kind: "container",
1080        parent: "",
1081        data_attrs: &[
1082            DataAttr {
1083                name: "data-width",
1084                values: &["body", "wide", "page", "screen"],
1085                default: "body",
1086                description: "Display width — text-column (body), wider than text (wide), page-width (page), or viewport-width (screen). See spec § P9.",
1087            },
1088        ],
1089        example_html: r#"<div class="moss-gallery" data-width="page">
1090  <figure class="moss-gallery-item">...</figure>
1091</div>"#,
1092        example_markdown: ":::gallery\nphoto.jpg\n:::\n",
1093        status: Status::Confirmed,
1094        since: "0",
1095        description: "Image gallery container. v1 adds `data-width` (P9).",
1096    },
1097    ComponentEntry {
1098        class: "moss-gallery-item",
1099        kind: "instance",
1100        parent: "moss-gallery",
1101        data_attrs: &[],
1102        example_html: r#"<figure class="moss-gallery-item"><img src="..." /></figure>"#,
1103        example_markdown: "",
1104        status: Status::Confirmed,
1105        since: "0",
1106        description: "Single image entry inside `.moss-gallery`.",
1107    },
1108    ComponentEntry {
1109        class: "moss-buttons",
1110        kind: "container",
1111        parent: "",
1112        data_attrs: &[
1113            DataAttr {
1114                name: "data-style",
1115                values: &["default", "inverted"],
1116                default: "default",
1117                description: "v1 button-row style. Theme authors target `.moss-buttons[data-style=...]`.",
1118            },
1119        ],
1120        example_html: r#"<div class="moss-buttons" data-style="inverted">
1121  <a class="moss-btn" href="...">Click</a>
1122</div>"#,
1123        example_markdown: ":::buttons\n[Get started](https://example.com)\n:::\n",
1124        status: Status::Confirmed,
1125        since: "0",
1126        description: "Container for a row of `.moss-btn` buttons. v1: the inverted variant is on `data-style=\"inverted\"`.",
1127    },
1128    // -------------------------------------------------------------------
1129    // Button primitive (used by subscribe + general CTAs).
1130    // -------------------------------------------------------------------
1131    ComponentEntry {
1132        class: "moss-btn",
1133        kind: "standalone",
1134        parent: "",
1135        data_attrs: &[
1136            DataAttr {
1137                name: "data-role",
1138                values: &["default", "primary", "secondary"],
1139                default: "default",
1140                description: "v1 button role. Theme authors target `.moss-btn[data-role=...]`.",
1141            },
1142        ],
1143        example_html: r#"<button class="moss-btn" data-role="primary">
1144  <span class="moss-btn__label">Submit</span>
1145</button>"#,
1146        example_markdown: "",
1147        status: Status::Confirmed,
1148        since: "0",
1149        description: "Generic button primitive. Role on `data-role` (v1).",
1150    },
1151    ComponentEntry {
1152        class: "moss-btn__label",
1153        kind: "instance",
1154        parent: "moss-btn",
1155        data_attrs: &[],
1156        example_html: r#"<span class="moss-btn__label">Submit</span>"#,
1157        example_markdown: "",
1158        status: Status::Confirmed,
1159        since: "0",
1160        description: "Label span inside `.moss-btn`.",
1161    },
1162    ComponentEntry {
1163        class: "moss-btn__check",
1164        kind: "instance",
1165        parent: "moss-btn",
1166        data_attrs: &[],
1167        example_html: r#"<span class="moss-btn__check">✓</span>"#,
1168        example_markdown: "",
1169        status: Status::Confirmed,
1170        since: "0",
1171        description: "Success checkmark slot inside `.moss-btn`.",
1172    },
1173    ComponentEntry {
1174        class: "moss-btn__spinner",
1175        kind: "instance",
1176        parent: "moss-btn",
1177        data_attrs: &[],
1178        example_html: r#"<span class="moss-btn__spinner"></span>"#,
1179        example_markdown: "",
1180        status: Status::Confirmed,
1181        since: "0",
1182        description: "Loading spinner slot inside `.moss-btn`.",
1183    },
1184    // -------------------------------------------------------------------
1185    // Subscribe form (newsletter / Buttondown / seta).
1186    // -------------------------------------------------------------------
1187    ComponentEntry {
1188        class: "moss-subscribe",
1189        kind: "standalone",
1190        parent: "",
1191        data_attrs: &[],
1192        example_html: r#"<div class="moss-subscribe">
1193  <form class="moss-subscribe-form">...</form>
1194</div>"#,
1195        example_markdown: ":::subscribe\n:::\n",
1196        status: Status::Confirmed,
1197        since: "0",
1198        description: "Newsletter subscribe block (auto-injected into footer when email channel configured).",
1199    },
1200    ComponentEntry {
1201        class: "moss-subscribe-form",
1202        kind: "instance",
1203        parent: "moss-subscribe",
1204        data_attrs: &[
1205            DataAttr {
1206                name: "data-position",
1207                values: &["footer", "inline"],
1208                default: "footer",
1209                description: "Placement variant. `footer` for the auto-injected footer form, `inline` for the `:::subscribe` shortcode. Drives the CSS layout in email.css.",
1210            },
1211            DataAttr {
1212                name: "data-moss-hosted",
1213                values: &["true"],
1214                default: "true",
1215                description: "Marks moss-hosted (seta) forms hydrated by subscribe.ts. Absent on 3rd-party provider forms.",
1216            },
1217            DataAttr {
1218                name: "data-state",
1219                values: &["idle", "loading", "success", "error"],
1220                default: "idle",
1221                description: "Runtime submit state machine, driven by subscribe.ts. Emitted as `idle`; theme authors target `.moss-subscribe-form[data-state=...]`.",
1222            },
1223            DataAttr {
1224                name: "data-moss-pending-site",
1225                values: &["true"],
1226                default: "true",
1227                description: "Pre-first-publish pending wiring (`action=\"#\"`, no site_id yet). Hidden on published pages (body without `data-moss-preview`) via the email.css defense rule; detected by deploy's email wiring guard.",
1228            },
1229        ],
1230        example_html: r#"<form class="moss-subscribe-form">...</form>"#,
1231        example_markdown: "",
1232        status: Status::Emerging,
1233        since: "0",
1234        description: "Form element inside `.moss-subscribe`.",
1235    },
1236    ComponentEntry {
1237        class: "moss-btn-slot",
1238        kind: "instance",
1239        parent: "moss-subscribe",
1240        data_attrs: &[],
1241        example_html: r#"<div class="moss-btn-slot"><button class="moss-btn">...</button></div>"#,
1242        example_markdown: "",
1243        status: Status::Emerging,
1244        since: "0",
1245        description: "Fixed-width slot wrapping a form's submit button; used by both the subscribe and comment forms to prevent layout shift across idle/loading/success states.",
1246    },
1247    ComponentEntry {
1248        class: "moss-subscribe-status",
1249        kind: "instance",
1250        parent: "moss-subscribe",
1251        data_attrs: &[],
1252        example_html: r#"<div class="moss-subscribe-status">
1253  <span class="moss-subscribe-status__icon"></span>
1254  Subscribed!
1255</div>"#,
1256        example_markdown: "",
1257        status: Status::Emerging,
1258        since: "0",
1259        description: "Status message shown after submit (success/error).",
1260    },
1261    ComponentEntry {
1262        class: "moss-subscribe-status__icon",
1263        kind: "instance",
1264        parent: "moss-subscribe-status",
1265        data_attrs: &[],
1266        example_html: r#"<span class="moss-subscribe-status__icon"></span>"#,
1267        example_markdown: "",
1268        status: Status::Emerging,
1269        since: "0",
1270        description: "Icon slot inside `.moss-subscribe-status`.",
1271    },
1272    ComponentEntry {
1273        class: "moss-subscribe-landing",
1274        kind: "standalone",
1275        parent: "",
1276        data_attrs: &[],
1277        example_html: r#"<section class="moss-subscribe-landing">...</section>"#,
1278        example_markdown: "",
1279        status: Status::Emerging,
1280        since: "0",
1281        description: "Standalone subscribe landing page surface (larger variant).",
1282    },
1283    // -------------------------------------------------------------------
1284    // Apply form (membership / contributor application).
1285    // -------------------------------------------------------------------
1286    ComponentEntry {
1287        class: "moss-apply",
1288        kind: "standalone",
1289        parent: "",
1290        data_attrs: &[],
1291        example_html: r#"<div class="moss-apply" data-state="idle">
1292  <form class="moss-subscribe-form moss-apply-form">...</form>
1293</div>"#,
1294        example_markdown: ":::apply\n:::\n",
1295        status: Status::Emerging,
1296        since: "0",
1297        description: "Apply / membership-request form block (:::apply shortcode).",
1298    },
1299    ComponentEntry {
1300        class: "moss-apply-form",
1301        kind: "instance",
1302        parent: "moss-apply",
1303        data_attrs: &[
1304            DataAttr {
1305                name: "data-position",
1306                values: &["apply"],
1307                default: "apply",
1308                description: "Position variant; always `apply` for this form. Drives CSS layout in email.css.",
1309            },
1310            DataAttr {
1311                name: "data-revert",
1312                values: &["false"],
1313                default: "false",
1314                description: "When `false`, success is terminal (no auto-revert). subscribe.ts reads this.",
1315            },
1316        ],
1317        example_html: r#"<form class="moss-subscribe-form moss-apply-form" data-position="apply" data-revert="false">...</form>"#,
1318        example_markdown: "",
1319        status: Status::Emerging,
1320        since: "0",
1321        description: "Form element inside `.moss-apply`. Also carries `.moss-subscribe-form` so subscribe.ts hydrates it.",
1322    },
1323    ComponentEntry {
1324        class: "moss-apply-matters",
1325        kind: "instance",
1326        parent: "moss-apply",
1327        data_attrs: &[],
1328        example_html: r#"<input type="text" name="matters" class="moss-input moss-apply-matters">"#,
1329        example_markdown: "",
1330        status: Status::Emerging,
1331        since: "0",
1332        description: "Matters username input inside `.moss-apply-form`.",
1333    },
1334    ComponentEntry {
1335        class: "moss-apply-details",
1336        kind: "instance",
1337        parent: "moss-apply",
1338        data_attrs: &[],
1339        example_html: r#"<details class="moss-apply-details"><summary>...</summary>...</details>"#,
1340        example_markdown: "",
1341        status: Status::Emerging,
1342        since: "0",
1343        description: "`<details>` disclosure element for the optional publish-URL field inside `.moss-apply-form`.",
1344    },
1345    ComponentEntry {
1346        class: "moss-apply-hp",
1347        kind: "instance",
1348        parent: "moss-apply",
1349        data_attrs: &[],
1350        example_html: r#"<input type="text" name="website" class="moss-apply-hp" tabindex="-1" aria-hidden="true">"#,
1351        example_markdown: "",
1352        status: Status::Emerging,
1353        since: "0",
1354        description: "Honeypot field (off-screen) inside `.moss-apply-form`. Bots fill it; humans don't.",
1355    },
1356    ComponentEntry {
1357        class: "moss-apply-status",
1358        kind: "instance",
1359        parent: "moss-apply",
1360        data_attrs: &[],
1361        example_html: r#"<div class="moss-subscribe-status moss-apply-status" aria-live="polite">...</div>"#,
1362        example_markdown: "",
1363        status: Status::Emerging,
1364        since: "0",
1365        description: "Status region inside `.moss-apply-form` (also carries `.moss-subscribe-status`).",
1366    },
1367    // -------------------------------------------------------------------
1368    // Series navigation (prev/next + collection links).
1369    // -------------------------------------------------------------------
1370    ComponentEntry {
1371        class: "moss-series-nav",
1372        kind: "standalone",
1373        parent: "",
1374        data_attrs: &[],
1375        example_html: r#"<nav class="moss-series-nav">
1376  <div class="moss-series-nav-links">...</div>
1377</nav>"#,
1378        example_markdown: "",
1379        status: Status::Confirmed,
1380        since: "0",
1381        description: "Series navigation bar (prev/next/collection) on series pages.",
1382    },
1383    ComponentEntry {
1384        class: "moss-series-nav-links",
1385        kind: "instance",
1386        parent: "moss-series-nav",
1387        data_attrs: &[],
1388        example_html: r#"<div class="moss-series-nav-links">...</div>"#,
1389        example_markdown: "",
1390        status: Status::Confirmed,
1391        since: "0",
1392        description: "Row holding prev/next links in series nav.",
1393    },
1394    ComponentEntry {
1395        class: "moss-series-nav-link",
1396        kind: "instance",
1397        parent: "moss-series-nav",
1398        data_attrs: &[],
1399        example_html: r#"<a class="moss-series-nav-link moss-series-nav-prev" href="...">...</a>"#,
1400        example_markdown: "",
1401        status: Status::Confirmed,
1402        since: "0",
1403        description: "Individual link inside series nav. Modifiers: `moss-series-nav-prev`, `moss-series-nav-next`, `empty` (placeholder).",
1404    },
1405    ComponentEntry {
1406        class: "moss-series-nav-prev",
1407        kind: "instance",
1408        parent: "moss-series-nav",
1409        data_attrs: &[],
1410        example_html: r#"<a class="moss-series-nav-link moss-series-nav-prev" href="...">...</a>"#,
1411        example_markdown: "",
1412        status: Status::Confirmed,
1413        since: "0",
1414        description: "Previous-page modifier on a series nav link.",
1415    },
1416    ComponentEntry {
1417        class: "moss-series-nav-next",
1418        kind: "instance",
1419        parent: "moss-series-nav",
1420        data_attrs: &[],
1421        example_html: r#"<a class="moss-series-nav-link moss-series-nav-next" href="...">...</a>"#,
1422        example_markdown: "",
1423        status: Status::Confirmed,
1424        since: "0",
1425        description: "Next-page modifier on a series nav link.",
1426    },
1427    ComponentEntry {
1428        class: "moss-series-nav-arrow",
1429        kind: "instance",
1430        parent: "moss-series-nav",
1431        data_attrs: &[],
1432        example_html: r#"<span class="moss-series-nav-arrow">→</span>"#,
1433        example_markdown: "",
1434        status: Status::Confirmed,
1435        since: "0",
1436        description: "Arrow glyph inside a series-nav link.",
1437    },
1438    ComponentEntry {
1439        class: "moss-series-nav-title",
1440        kind: "instance",
1441        parent: "moss-series-nav",
1442        data_attrs: &[],
1443        example_html: r#"<span class="moss-series-nav-title">Next page title</span>"#,
1444        example_markdown: "",
1445        status: Status::Confirmed,
1446        since: "0",
1447        description: "Title text of the destination page in a series-nav link.",
1448    },
1449    ComponentEntry {
1450        class: "moss-series-nav-collection",
1451        kind: "instance",
1452        parent: "moss-series-nav",
1453        data_attrs: &[],
1454        example_html: r#"<div class="moss-series-nav-collection">...</div>"#,
1455        example_markdown: "",
1456        status: Status::Confirmed,
1457        since: "0",
1458        description: "Collection-listing slot in series nav (sibling pages).",
1459    },
1460    ComponentEntry {
1461        class: "moss-series-nav-collection-row",
1462        kind: "instance",
1463        parent: "moss-series-nav-collection",
1464        data_attrs: &[],
1465        example_html: r#"<div class="moss-series-nav-collection-row">...</div>"#,
1466        example_markdown: "",
1467        status: Status::Confirmed,
1468        since: "0",
1469        description: "Row inside the collection listing of series nav.",
1470    },
1471    // -------------------------------------------------------------------
1472    // Collection cover (collection landing pages).
1473    // -------------------------------------------------------------------
1474    ComponentEntry {
1475        class: "moss-collection-cover",
1476        kind: "standalone",
1477        parent: "",
1478        data_attrs: &[],
1479        example_html: r#"<section class="moss-collection-cover">
1480  <div class="moss-collection-cover-row">...</div>
1481</section>"#,
1482        example_markdown: "",
1483        status: Status::Emerging,
1484        since: "0",
1485        description: "Header surface on a collection landing page.",
1486    },
1487    ComponentEntry {
1488        class: "moss-collection-cover-row",
1489        kind: "instance",
1490        parent: "moss-collection-cover",
1491        data_attrs: &[],
1492        example_html: r#"<div class="moss-collection-cover-row">...</div>"#,
1493        example_markdown: "",
1494        status: Status::Emerging,
1495        since: "0",
1496        description: "Row inside `.moss-collection-cover`.",
1497    },
1498    ComponentEntry {
1499        class: "moss-collection-cover-body",
1500        kind: "instance",
1501        parent: "moss-collection-cover",
1502        data_attrs: &[],
1503        example_html: r#"<div class="moss-collection-cover-body">...</div>"#,
1504        example_markdown: "",
1505        status: Status::Emerging,
1506        since: "0",
1507        description: "Body content slot inside `.moss-collection-cover`.",
1508    },
1509    // -------------------------------------------------------------------
1510    // Form primitives (input, label, field, link).
1511    // -------------------------------------------------------------------
1512    ComponentEntry {
1513        class: "moss-input",
1514        kind: "standalone",
1515        parent: "",
1516        data_attrs: &[],
1517        example_html: r#"<input class="moss-input" type="email" />"#,
1518        example_markdown: "",
1519        status: Status::Confirmed,
1520        since: "0",
1521        description: "Generic form input primitive.",
1522    },
1523    ComponentEntry {
1524        class: "moss-field",
1525        kind: "container",
1526        parent: "",
1527        data_attrs: &[],
1528        example_html: r#"<div class="moss-field">
1529  <label class="moss-label">Email</label>
1530  <input class="moss-input" />
1531</div>"#,
1532        example_markdown: "",
1533        status: Status::Confirmed,
1534        since: "0",
1535        description: "Form field group (label + input). Modifier `--inline` for horizontal layout.",
1536    },
1537    ComponentEntry {
1538        class: "moss-label",
1539        kind: "instance",
1540        parent: "moss-field",
1541        data_attrs: &[],
1542        example_html: r#"<label class="moss-label">Email</label>"#,
1543        example_markdown: "",
1544        status: Status::Confirmed,
1545        since: "0",
1546        description: "Label primitive for `.moss-field`. Modifier `--small` for compact form.",
1547    },
1548    ComponentEntry {
1549        class: "moss-link",
1550        kind: "standalone",
1551        parent: "",
1552        data_attrs: &[],
1553        example_html: r#"<a class="moss-link" href="...">Click me</a>"#,
1554        example_markdown: "",
1555        status: Status::Confirmed,
1556        since: "0",
1557        description: "Inline-link primitive (resets `<button>` chrome too). Use `--subtle` for muted variant.",
1558    },
1559    ComponentEntry {
1560        class: "moss-field--inline",
1561        kind: "instance",
1562        parent: "moss-field",
1563        data_attrs: &[],
1564        example_html: r#"<div class="moss-field moss-field--inline">
1565  <label class="moss-label">Email</label>
1566  <input class="moss-input" />
1567</div>"#,
1568        example_markdown: "",
1569        status: Status::Confirmed,
1570        since: "0",
1571        description: "BEM modifier on `.moss-field` for horizontal label+input layout (used by settings UI primitives).",
1572    },
1573    ComponentEntry {
1574        class: "moss-label--small",
1575        kind: "instance",
1576        parent: "moss-label",
1577        data_attrs: &[],
1578        example_html: r#"<label class="moss-label moss-label--small">Compact label</label>"#,
1579        example_markdown: "",
1580        status: Status::Confirmed,
1581        since: "0",
1582        description: "BEM modifier on `.moss-label` for compact form (used by services settings rows).",
1583    },
1584    ComponentEntry {
1585        class: "moss-info-grid",
1586        kind: "container",
1587        parent: "",
1588        data_attrs: &[],
1589        example_html: r#"<div class="moss-info-grid">
1590  <div class="moss-field moss-field--inline">...</div>
1591  <div class="moss-field moss-field--inline">...</div>
1592</div>"#,
1593        example_markdown: "",
1594        status: Status::Emerging,
1595        since: "0",
1596        description: "Two-column aligned label+value rows (CSS grid with `display: contents` children). Used by the deployment settings panel; ships in the default theme so authors can reuse the layout.",
1597    },
1598    ComponentEntry {
1599        class: "moss-row",
1600        kind: "container",
1601        parent: "",
1602        data_attrs: &[],
1603        example_html: r#"<div class="moss-row">
1604  <div class="moss-field">...</div>
1605  <div class="moss-field">...</div>
1606</div>"#,
1607        example_markdown: "",
1608        status: Status::Emerging,
1609        since: "0",
1610        description: "Horizontal flex row of equal-flex `.moss-field` children. Form-row layout helper shipped in the default theme.",
1611    },
1612    ComponentEntry {
1613        class: "moss-input-feedback",
1614        kind: "instance",
1615        parent: "moss-field",
1616        data_attrs: &[],
1617        example_html: r#"<span class="moss-input-feedback">Saving…</span>"#,
1618        example_markdown: "",
1619        status: Status::Emerging,
1620        since: "0",
1621        description: "Auto-save status hint slot under `.moss-field`. Three state modifiers: `--success`, `--error`, `--fade-out`.",
1622    },
1623    ComponentEntry {
1624        class: "moss-input-feedback--success",
1625        kind: "instance",
1626        parent: "moss-input-feedback",
1627        data_attrs: &[],
1628        example_html: r#"<span class="moss-input-feedback moss-input-feedback--success">Saved</span>"#,
1629        example_markdown: "",
1630        status: Status::Emerging,
1631        since: "0",
1632        description: "Success state modifier on `.moss-input-feedback`.",
1633    },
1634    ComponentEntry {
1635        class: "moss-input-feedback--error",
1636        kind: "instance",
1637        parent: "moss-input-feedback",
1638        data_attrs: &[],
1639        example_html: r#"<span class="moss-input-feedback moss-input-feedback--error">Failed to save</span>"#,
1640        example_markdown: "",
1641        status: Status::Emerging,
1642        since: "0",
1643        description: "Error state modifier on `.moss-input-feedback`.",
1644    },
1645    ComponentEntry {
1646        class: "moss-input-feedback--fade-out",
1647        kind: "instance",
1648        parent: "moss-input-feedback",
1649        data_attrs: &[],
1650        example_html: r#"<span class="moss-input-feedback moss-input-feedback--success moss-input-feedback--fade-out">Saved</span>"#,
1651        example_markdown: "",
1652        status: Status::Emerging,
1653        since: "0",
1654        description: "Transient fade-out modifier on `.moss-input-feedback` (applied after a success message to dismiss it).",
1655    },
1656    // -------------------------------------------------------------------
1657    // Other emit surfaces (comments, colophon, shell frame, misc).
1658    // -------------------------------------------------------------------
1659    ComponentEntry {
1660        class: "moss-comments",
1661        kind: "standalone",
1662        parent: "",
1663        data_attrs: &[],
1664        example_html: r#"<section class="moss-comments">...</section>"#,
1665        example_markdown: "",
1666        status: Status::Confirmed,
1667        since: "0",
1668        description: "Comments surface (per-site SQLite backend or Artalk legacy).",
1669    },
1670    ComponentEntry {
1671        class: "moss-service-inactive",
1672        kind: "instance",
1673        parent: "",
1674        data_attrs: &[],
1675        example_html: r#"<section class="moss-comments moss-service-inactive">...</section>"#,
1676        example_markdown: "",
1677        status: Status::Confirmed,
1678        since: "0",
1679        description: "Co-class applied to `.moss-comments` and `.moss-subscribe-form` when the backing service is not configured. Hidden by default in published sites and revealed inside the preview chrome so authors can see the inactive surface during editing.",
1680    },
1681    // -------------------------------------------------------------------
1682    // Preview link popover — emitted by `assets/js/preview.js` runtime.
1683    // -------------------------------------------------------------------
1684    ComponentEntry {
1685        class: "moss-preview-popup",
1686        kind: "chrome",
1687        parent: "",
1688        data_attrs: &[],
1689        example_html: r#"<div class="moss-preview-popup" role="tooltip" aria-live="polite">
1690  <strong class="moss-preview-title">...</strong>
1691  <p class="moss-preview-desc">...</p>
1692  <p class="moss-preview-text">...</p>
1693</div>"#,
1694        example_markdown: "",
1695        status: Status::Confirmed,
1696        since: "0",
1697        description: "Floating link-preview popover injected at `document.body` level by the runtime `preview.js`. Fetches `/_moss/previews.json` and renders a hover card with title, description, and excerpt for internal links.",
1698    },
1699    ComponentEntry {
1700        class: "moss-preview-title",
1701        kind: "instance",
1702        parent: "moss-preview-popup",
1703        data_attrs: &[],
1704        example_html: r#"<strong class="moss-preview-title">Article title</strong>"#,
1705        example_markdown: "",
1706        status: Status::Confirmed,
1707        since: "0",
1708        description: "Title slot inside `.moss-preview-popup`.",
1709    },
1710    ComponentEntry {
1711        class: "moss-preview-desc",
1712        kind: "instance",
1713        parent: "moss-preview-popup",
1714        data_attrs: &[],
1715        example_html: r#"<p class="moss-preview-desc">Short description</p>"#,
1716        example_markdown: "",
1717        status: Status::Confirmed,
1718        since: "0",
1719        description: "Description slot inside `.moss-preview-popup` (from frontmatter `description`).",
1720    },
1721    ComponentEntry {
1722        class: "moss-preview-text",
1723        kind: "instance",
1724        parent: "moss-preview-popup",
1725        data_attrs: &[],
1726        example_html: r#"<p class="moss-preview-text">Excerpt of the linked article…</p>"#,
1727        example_markdown: "",
1728        status: Status::Confirmed,
1729        since: "0",
1730        description: "Excerpt slot inside `.moss-preview-popup` (auto-extracted from the linked article body).",
1731    },
1732    ComponentEntry {
1733        class: "moss-colophon",
1734        kind: "chrome",
1735        parent: "",
1736        data_attrs: &[],
1737        example_html: r#"<footer class="moss-colophon">
1738  <span class="moss-colophon-icon"></span>
1739  Built with moss
1740</footer>"#,
1741        example_markdown: "",
1742        status: Status::Confirmed,
1743        since: "0",
1744        description: "Footer colophon credit appended by moss.",
1745    },
1746    ComponentEntry {
1747        class: "moss-colophon-icon",
1748        kind: "instance",
1749        parent: "moss-colophon",
1750        data_attrs: &[],
1751        example_html: r#"<span class="moss-colophon-icon"></span>"#,
1752        example_markdown: "",
1753        status: Status::Confirmed,
1754        since: "0",
1755        description: "Icon slot inside `.moss-colophon`.",
1756    },
1757    ComponentEntry {
1758        class: "moss-shell-frame",
1759        kind: "chrome",
1760        parent: "",
1761        data_attrs: &[],
1762        example_html: r#"<div class="moss-shell-frame">...</div>"#,
1763        example_markdown: "",
1764        status: Status::Emerging,
1765        since: "0",
1766        description: "App-shell frame surface (preview chrome).",
1767    },
1768    ComponentEntry {
1769        class: "moss-mobile-frame",
1770        kind: "chrome",
1771        parent: "moss-shell-frame",
1772        data_attrs: &[],
1773        example_html: r#"<html class="moss-shell-frame moss-mobile-frame">...</html>"#,
1774        example_markdown: "",
1775        status: Status::Emerging,
1776        since: "0",
1777        description: "Runtime marker the preview bridge adds to `<html>` when the shell is in mobile device-preview mode; drops the titlebar-clearance padding (the phone frame sits below the titlebar).",
1778    },
1779    ComponentEntry {
1780        class: "main-nav",
1781        kind: "chrome",
1782        parent: "",
1783        data_attrs: &[],
1784        example_html: r#"<nav class="main-nav container">...</nav>"#,
1785        example_markdown: "",
1786        status: Status::Confirmed,
1787        since: "0",
1788        description: "Top site navigation bar. Legacy non-`moss-` prefix kept for theme parity.",
1789    },
1790    ComponentEntry {
1791        class: "moss-child-section-divider",
1792        kind: "instance",
1793        parent: "",
1794        data_attrs: &[],
1795        example_html: r#"<hr class="moss-child-section-divider" />"#,
1796        example_markdown: "",
1797        status: Status::Emerging,
1798        since: "0",
1799        description: "Divider rule between auto-generated child sections.",
1800    },
1801    ComponentEntry {
1802        class: "moss-unknown-shortcode",
1803        kind: "standalone",
1804        parent: "",
1805        data_attrs: &[],
1806        example_html: r#"<div class="moss-unknown-shortcode">Unknown shortcode: foo</div>"#,
1807        example_markdown: "{{< foo >}}",
1808        status: Status::Confirmed,
1809        since: "0",
1810        description: "Fallback emitted when a shortcode tag is not recognised by any plugin.",
1811    },
1812    // -------------------------------------------------------------------
1813    // Syntax highlight tokens (emitted by syntect inside <code>).
1814    // -------------------------------------------------------------------
1815    ComponentEntry {
1816        class: "moss-hl-keyword",
1817        kind: "instance",
1818        parent: "",
1819        data_attrs: &[],
1820        example_html: r#"<span class="moss-hl-keyword">if</span>"#,
1821        example_markdown: "",
1822        status: Status::Emerging,
1823        since: "0",
1824        description: "Syntax-highlight token: keyword.",
1825    },
1826    ComponentEntry {
1827        class: "moss-hl-string",
1828        kind: "instance",
1829        parent: "",
1830        data_attrs: &[],
1831        example_html: r#"<span class="moss-hl-string">"hi"</span>"#,
1832        example_markdown: "",
1833        status: Status::Emerging,
1834        since: "0",
1835        description: "Syntax-highlight token: string literal.",
1836    },
1837    ComponentEntry {
1838        class: "moss-hl-comment",
1839        kind: "instance",
1840        parent: "",
1841        data_attrs: &[],
1842        example_html: r#"<span class="moss-hl-comment">// note</span>"#,
1843        example_markdown: "",
1844        status: Status::Emerging,
1845        since: "0",
1846        description: "Syntax-highlight token: comment.",
1847    },
1848    ComponentEntry {
1849        class: "moss-hl-function",
1850        kind: "instance",
1851        parent: "",
1852        data_attrs: &[],
1853        example_html: r#"<span class="moss-hl-function">render</span>"#,
1854        example_markdown: "",
1855        status: Status::Emerging,
1856        since: "0",
1857        description: "Syntax-highlight token: function name.",
1858    },
1859    ComponentEntry {
1860        class: "moss-hl-type",
1861        kind: "instance",
1862        parent: "",
1863        data_attrs: &[],
1864        example_html: r#"<span class="moss-hl-type">String</span>"#,
1865        example_markdown: "",
1866        status: Status::Emerging,
1867        since: "0",
1868        description: "Syntax-highlight token: type name.",
1869    },
1870    ComponentEntry {
1871        class: "moss-hl-number",
1872        kind: "instance",
1873        parent: "",
1874        data_attrs: &[],
1875        example_html: r#"<span class="moss-hl-number">42</span>"#,
1876        example_markdown: "",
1877        status: Status::Emerging,
1878        since: "0",
1879        description: "Syntax-highlight token: numeric literal.",
1880    },
1881    ComponentEntry {
1882        class: "moss-hl-operator",
1883        kind: "instance",
1884        parent: "",
1885        data_attrs: &[],
1886        example_html: r#"<span class="moss-hl-operator">+</span>"#,
1887        example_markdown: "",
1888        status: Status::Emerging,
1889        since: "0",
1890        description: "Syntax-highlight token: operator.",
1891    },
1892    ComponentEntry {
1893        class: "moss-hl-builtin",
1894        kind: "instance",
1895        parent: "",
1896        data_attrs: &[],
1897        example_html: r#"<span class="moss-hl-builtin">print</span>"#,
1898        example_markdown: "",
1899        status: Status::Emerging,
1900        since: "0",
1901        description: "Syntax-highlight token: builtin identifier.",
1902    },
1903    ComponentEntry {
1904        class: "moss-hl-tag",
1905        kind: "instance",
1906        parent: "",
1907        data_attrs: &[],
1908        example_html: r#"<span class="moss-hl-tag">div</span>"#,
1909        example_markdown: "",
1910        status: Status::Emerging,
1911        since: "0",
1912        description: "Syntax-highlight token: markup tag name.",
1913    },
1914    ComponentEntry {
1915        class: "moss-hl-attr",
1916        kind: "instance",
1917        parent: "",
1918        data_attrs: &[],
1919        example_html: r#"<span class="moss-hl-attr">class</span>"#,
1920        example_markdown: "",
1921        status: Status::Emerging,
1922        since: "0",
1923        description: "Syntax-highlight token: attribute name.",
1924    },
1925    ComponentEntry {
1926        class: "moss-hl-meta",
1927        kind: "instance",
1928        parent: "",
1929        data_attrs: &[],
1930        example_html: r#"<span class="moss-hl-meta">@derive</span>"#,
1931        example_markdown: "",
1932        status: Status::Emerging,
1933        since: "0",
1934        description: "Syntax-highlight token: meta/annotation.",
1935    },
1936    ComponentEntry {
1937        class: "moss-hl-addition-bg",
1938        kind: "instance",
1939        parent: "",
1940        data_attrs: &[],
1941        example_html: r#"<span class="moss-hl-addition-bg">+ added line</span>"#,
1942        example_markdown: "",
1943        status: Status::Emerging,
1944        since: "0",
1945        description: "Syntax-highlight diff token: added-line background.",
1946    },
1947    ComponentEntry {
1948        class: "moss-hl-deletion",
1949        kind: "instance",
1950        parent: "",
1951        data_attrs: &[],
1952        example_html: r#"<span class="moss-hl-deletion">- removed line</span>"#,
1953        example_markdown: "",
1954        status: Status::Emerging,
1955        since: "0",
1956        description: "Syntax-highlight diff token: removed-line text.",
1957    },
1958    ComponentEntry {
1959        class: "moss-hl-deletion-bg",
1960        kind: "instance",
1961        parent: "",
1962        data_attrs: &[],
1963        example_html: r#"<span class="moss-hl-deletion-bg">- removed line</span>"#,
1964        example_markdown: "",
1965        status: Status::Emerging,
1966        since: "0",
1967        description: "Syntax-highlight diff token: removed-line background.",
1968    },
1969    ComponentEntry {
1970        class: "moss-recent",
1971        kind: "container",
1972        parent: "",
1973        data_attrs: &[],
1974        example_html: r#"<ul class="moss-recent">
1975  <li><a href="/posts/spring-notes/">Spring notes</a><div class="moss-recent__date">2026-04-12</div><div class="moss-recent__desc">A walk through the garden.</div></li>
1976</ul>"#,
1977        example_markdown: ":::recent {count=5 since=\"2026-01-01\"}\n:::\n",
1978        status: Status::Emerging,
1979        since: "0",
1980        description: "Auto-generated list of recent posts emitted by the `:::recent` shortcode. Sorted newest-first; date and description slots are filled per child. No default CSS in the bundled theme — theme authors style it freely.",
1981    },
1982    ComponentEntry {
1983        class: "moss-recent__date",
1984        kind: "instance",
1985        parent: "moss-recent",
1986        data_attrs: &[],
1987        example_html: r#"<div class="moss-recent__date">2026-04-12</div>"#,
1988        example_markdown: "",
1989        status: Status::Emerging,
1990        since: "0",
1991        description: "Per-entry date slot inside `.moss-recent` (BEM child). Format is `YYYY-MM-DD`, derived from frontmatter `date`. Empty string when the post lacks a parseable date.",
1992    },
1993    ComponentEntry {
1994        class: "moss-recent__desc",
1995        kind: "instance",
1996        parent: "moss-recent",
1997        data_attrs: &[],
1998        example_html: r#"<div class="moss-recent__desc">A walk through the garden.</div>"#,
1999        example_markdown: "",
2000        status: Status::Emerging,
2001        since: "0",
2002        description: "Per-entry description slot inside `.moss-recent` (BEM child). Sourced from frontmatter `description`; empty when unset.",
2003    },
2004];
2005
2006impl ComponentEntry {
2007    /// True for entries that belong in the public, agent/theme-facing surface.
2008    /// v1 rule: simply "not retired" — keeps the full theme vocabulary
2009    /// (moss-card, moss-cards, breadcrumbs, etc.) while dropping retired noise.
2010    /// (A finer internal-subclass split is deliberately NOT attempted here —
2011    /// it risks hiding theme-targetable classes. Agents get the precise
2012    /// shortcode set via the `authorable` flag instead.)
2013    pub fn is_public(&self) -> bool {
2014        self.status != Status::Retired
2015    }
2016}
2017
2018/// Iterator over class names with `Status::Retired`. Used by the build
2019/// pipeline's theme lint to warn users about pre-v1 vocabulary.
2020///
2021/// Exposed as an iterator over `&'static str` so callers don't need to
2022/// import the `Status` enum (keeps moss-core's surface narrow).
2023pub fn retired_class_names() -> impl Iterator<Item = &'static str> {
2024    COMPONENTS.iter()
2025        .filter(|e| e.status == Status::Retired)
2026        .map(|e| e.class)
2027}