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
31 changes: 31 additions & 0 deletions .changeset/11347-components-uncast-reads.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
'@object-ui/components': minor
'@object-ui/types': minor
---

Eight renderers stop riding `BaseSchema`'s index signature for node keys their types did not declare (objectui#11347, the `@object-ui/components` preparation for objectui#8347's removal of that signature). The installed `@objectstack/spec` has no row for any of these eight node types, so each key was decided by who authors it. Only one of them has a producer: the published `skills/objectui` expressions guide authors `title` on a `list` node. No catalog entry, example, docs page, package README or objectstack-shipped document authors any of the others.

**One key is kept and declared.** `ListSchema.title` is now declared on both faces, as an optional string. The `list` renderer keeps drawing it as a heading above the list, and the `list` registration keeps publishing it as an input. The zod mirror now refuses a `title` that is not a string, where `.passthrough()` used to keep it unjudged.

**Two reads move to the spelling the type already declares.** Neither move adds an alias.

- `input-otp` draws `length` slots. It used to read an undeclared `maxLength` and ignore the declared `length`, so the published 4-digit and 8-digit examples drew six slots each. `maxLength` is no longer read. Write `length`, which defaults to 6.
- `loading` draws its message from the declared `label`. It used to read an undeclared `text` and leave `label` inert. `text` is no longer read. Write `label`.

**Seven reads are retired, because no type declares the key and nothing authors it:**

- `sidebar-menu-button`: `active`. The node no longer sets the button's active state.
- `drawer`: `footer`, `showClose` and `shouldScaleBackground`. The drawer draws no footer and no Close button.
- `dropdown-menu`, `popover` and `sheet`: `modal`.

Where a registration published a retired key as an input, the input goes too: `active` on `sidebar-menu-button`, the three `drawer` keys, and `modal` on `popover` and `sheet`. `dropdown-menu` never published `modal`. `sheet`'s `defaultProps` also loses its `modal` seed. `SchemaRenderer` still spreads unread node keys onto the component as props, so an authored `modal` or `shouldScaleBackground` still reaches the Radix or vaul root, as it already did beside the named read. Refusing those keys is the strict authoring face's job, not a renderer read's.

**Types.** In `@object-ui/types`:

- `ListSchema` gains `title?: string` on both faces.
- The "What it renders instead" lists in the `body` / `children` refusal messages of these node types now name what the renderers read.
- The docblocks of `LoadingSchema.label`, `InputOTPSchema.length`, `ListSchema.title` and the four overlay schemas record these changes.

Apart from `ListSchema.title`, no member is added or removed and no accept set changes.

**minor, not patch — the published face gains a member.** `ListSchema.title` is a new member of the shipped `.d.ts` and of the mirror's `.shape`, and the mirror refuses a non-string `title` by name, the class objectui#7722 graded `minor` on this same schema.
2 changes: 2 additions & 0 deletions .changeset/8318-jsdoc-default-tag-corrections.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,5 @@ described nothing that runs.

The pin `packages/types/src/__tests__/layout-default-jsdoc-7361.test.ts` grows
from 15 rows to 24, both sides derived off disk as before.

**Correction, 2026-10-01 (objectui#11347).** The `CRUDDialogSchema` bullet above says `showClose`'s one other occurrence belongs to `DrawerSchema`. That bullet's `renderers/overlay/drawer.tsx:38` is an address into the tree at `33f4a1980`, where that line is the `drawer` registration's `showClose` read. The sentence was true when this change was written, and it no longer is: objectui#11347 retired that read, which `DrawerSchema` never declared and no producer authored, so `showClose` is now read under no node type at all. The `CRUDDialogSchema.showClose` docblock and its pin in `layout-default-jsdoc-7361.test.ts` say so. The verdict this change records is unchanged: `showClose` still publishes no `@default`.
1 change: 1 addition & 0 deletions content/docs/components/data-display/list.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ description: "Display a list of items"
```plaintext
interface ListSchema {
type: 'list';
title?: string; // heading drawn above the list
items: SchemaNode[];
ordered?: boolean;
className?: string;
Expand Down
7 changes: 7 additions & 0 deletions content/docs/components/feedback/loading.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,14 @@ description: "Loading spinner to indicate processing"
```plaintext
interface LoadingSchema {
type: 'loading';
label?: string; // Text drawn under the spinner
size?: 'sm' | 'md' | 'lg';
className?: string;
}
```

<Callout type="warn">
The message under the spinner is `label`, the key `LoadingSchema` declares.
Until objectui#11347 the renderer read an undeclared `text` instead and left
`label` inert. `text` is not a key of this node: write `label`.
</Callout>
9 changes: 8 additions & 1 deletion content/docs/components/form/input-otp.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ The Input OTP component provides a secure way to enter one-time passwords or ver
```plaintext
interface InputOTPSchema {
type: 'input-otp';
length: number; // Number of digits
length?: number; // Number of digits (default 6)
value?: string; // Current value
separator?: boolean; // Show visual separator

Expand All @@ -44,6 +44,13 @@ interface InputOTPSchema {
}
```

<Callout type="warn">
`length` is the slot count, and the renderer now reads it. Until objectui#11347
it read an undeclared `maxLength` instead and ignored `length`, so the 4- and
8-digit examples above drew six slots. `maxLength` is not a key of this node:
write `length`.
</Callout>

## Examples

### In a Form
Expand Down
Loading
Loading