Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .changeset/6143-components-schema-corrections.md
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
---
---

Docs only, publishes nothing: four `content/docs/components` reference pages
taught props the shipped types do not have. Each correction was resolved
against a freshly built `packages/types/dist/*.d.ts` **and** against the zod
schemas that are the ruled enforcement boundary, so both layers agree:

| page | documented | shipped | declaration |
| --- | --- | --- | --- |
| `feedback/toast.mdx` | `variant?: 'default' \| 'destructive'` | `variant?: 'default' \| 'success' \| 'warning' \| 'error' \| 'info'` | `feedback.d.ts:123`, `zod/feedback.zod.js:59` |
| `form/radio-group.mdx` | `direction` | `orientation?: 'horizontal' \| 'vertical'` | `form.d.ts:377`, `zod/form.zod.js:263` |
| `form/combobox.mdx` | `searchPlaceholder`, `emptyText` | neither is declared | `form.d.ts:1283`, `zod/form.zod.js:378` |
| `form/command.mdx` | `CommandItem.shortcut` | `CommandItem` declares only `value`, `label`, `icon` | `form.d.ts:1329`, `zod/form.zod.js:76` |

`toast.mdx` is the one that mattered most: `'destructive'` is not a member of
the union, it is the Shadcn vocabulary a reader arrives with, and it is the
value most likely to be copied verbatim into an authored schema.

Each removal was checked against the renderer before it was made, because a
key a renderer genuinely reads is an undeclared capability rather than a doc
error. None of these four is read: `renderers/form/combobox.tsx` contains
neither `searchPlaceholder` nor `emptyText`, `renderers/form/command.tsx`
contains no `shortcut`, and `renderers/feedback/toast.tsx` contains no
`'destructive'`. The same sweep's genuinely-consumed keys went to
objectui#6150 instead of being edited away.

`emptyText` is removed from `ComboboxSchema` only. `CommandSchema` really does
declare it (`form.d.ts:1368`), so `command.mdx` keeps it.

No type, export or union member was minted, nothing was re-fenced, and no
block changed shape — these blocks stay `plaintext` and stay outside the
compile population. `check:doc-snippets` reports the same numbers before and
after: 248 blocks to compile, 111 declared fragments, 178 covered / 44
ungated. The import mechanism this card originally proposed is sequenced
behind objectui#5155 and is deliberately not attempted here.

Part of objectui#6143.
2 changes: 1 addition & 1 deletion content/docs/components/feedback/toast.mdx
Original file line numberDiff line numberDiff line change
Expand Up@@ -29,7 +29,7 @@ interface ToastSchema {
type: 'toast';
title?: string; // Toast title
description?: string; // Toast message
variant?: 'default' | 'destructive';
variant?: 'default' | 'success' | 'warning' | 'error' | 'info';

// Action button
action?: {
Expand Down
2 changes: 0 additions & 2 deletions content/docs/components/form/combobox.mdx
Original file line numberDiff line numberDiff line change
Expand Up@@ -37,8 +37,6 @@ interface ComboboxSchema {

// Text
placeholder?: string; // Button placeholder
searchPlaceholder?: string; // Search input placeholder
emptyText?: string; // Text when no results

// Events
onChange?: (value: string) => void;
Expand Down
1 change: 0 additions & 1 deletion content/docs/components/form/command.mdx
Original file line numberDiff line numberDiff line change
Expand Up@@ -16,7 +16,6 @@ interface CommandItem {
value: string;
label: string;
icon?: string;
shortcut?: string[];
}

interface CommandGroup {
Expand Down
2 changes: 1 addition & 1 deletion content/docs/components/form/radio-group.mdx
Original file line numberDiff line numberDiff line change
Expand Up@@ -44,7 +44,7 @@ interface RadioGroupSchema {
value?: string; // Selected value

// Layout
direction?: 'vertical' | 'horizontal';
orientation?: 'horizontal' | 'vertical';

// Events
onChange?: (value: string | number) => void;
Expand Down