Alpha: Ships on npm at 7.0.0-alpha.07.0.0-alpha.0
Refusals
Every refusal PageSchema returns, by path, with its bound and the fix.
A refusal is the parse error naming a field over its bound, and the fix is shorter content. A path's anchor is the block's type, then the path after block with list indexes dropped: sections.1.block.title on a hero is #hero.title. A shell path is #shell.<field>, and a field of the Page is #page.<field>.
From @mdxui/site@7.0.0-alpha.0: 285 anchors. pnpm check trips 262 of the bounds on a built record and checks each message below against the one returned.
| Refusal | Message, as safeParse returns it | Fix |
|---|---|---|
| A string past its bound | Too big: expected string to have <=160 characters | Shorten the content |
| A list past its count | Too big: expected array to have <=6 items | Drop items |
| A list short of its count | Too small: expected array to have >=1 items | Add items |
| A list off its one count | Too big: expected array to have exactly 3 items | Hold the count exactly |
| A number past its range | Too big: expected number to be <=640 | Use a value inside the range |
| An empty string | Too small: expected string to have >=1 characters | Write the value, or leave the field out where it is optional |
page
| Anchor | Rule, as safeParse returns it | Fix |
|---|---|---|
page.theme | Invalid option: expected one of "certificate"|"vaultline"|"quaypoint"|"callboard"|"directory" | Name a bundled Theme, or render under your own with render, as in Write a Theme |
shell
| Anchor | Bound |
|---|---|
shell.id | ^[a-z][a-z0-9-]{0,23}$: a lowercase letter, then at most 23 letters, digits and hyphens |
nav
footer
hero
statement
| Anchor | Rule, as safeParse returns it | Fix |
|---|---|---|
statement.text | a statement is plain words and one `*accent phrase*`: no code, link, strong or mark | Write plain words and at most one *accent phrase* |
page-head
stats
| Anchor | Rule, as safeParse returns it | Fix |
|---|---|---|
stats.head | a head needs a title or a lede | Give the head a title or a lede |
facts
| Anchor | Bound |
|---|---|
facts.title | 48 characters |
facts.items | 1 to 16 items |
facts.items.label | 24 characters |
facts.items.value | 80 characters |
facts.items.href | 160 characters |
feature-grid
feature-split
| Anchor | Rule, as safeParse returns it | Fix |
|---|---|---|
feature-split.head | a head needs a title or a lede | Give the head a title or a lede |
bento
compare
| Anchor | Rule, as safeParse returns it | Fix |
|---|---|---|
compare.head | a head needs a title or a lede | Give the head a title or a lede |
steps
| Anchor | Rule, as safeParse returns it | Fix |
|---|---|---|
steps.head | a head needs a title or a lede | Give the head a title or a lede |
text-stack
| Anchor | Rule, as safeParse returns it | Fix |
|---|---|---|
text-stack.head | a head needs a title or a lede | Give the head a title or a lede |
terminal
command-row
api-call
| Anchor | Rule, as safeParse returns it | Fix |
|---|---|---|
api-call.examples | an example answers with a response or with events, one of them | Answer with a response or with events, one of them |
endpoints
| Anchor | Rule, as safeParse returns it | Fix |
|---|---|---|
endpoints.head | a head needs a title or a lede | Give the head a title or a lede |
agent-prompt
pricing
| Anchor | Rule, as safeParse returns it | Fix |
|---|---|---|
pricing.head | a head needs a title or a lede | Give the head a title or a lede |
plan-table
faq
| Anchor | Rule, as safeParse returns it | Fix |
|---|---|---|
faq.head | a head needs a title or a lede | Give the head a title or a lede |
faq | items or groups, not both | Keep items or groups, never both |
closing
cta-form
| Anchor | Rule, as safeParse returns it | Fix |
|---|---|---|
cta-form.head | a head needs a title or a lede | Give the head a title or a lede |
article
post-list
product-head
product-list
compileTheme
| Anchor | Rule, as safeParse returns it | Fix |
|---|---|---|
compile-theme | theme "harbor" is missing core roles: panel, ink, … | Set every core role in light or invariant |