|
| 1 | +--- |
| 2 | +'@object-ui/types': minor |
| 3 | +'@object-ui/components': minor |
| 4 | +--- |
| 5 | + |
| 6 | +feat(types): four declared keys nothing honoured are retired on both faces, and two chatbot keys gain their zod mirror (objectui#6152, round 4) |
| 7 | + |
| 8 | +**Retired (breaking).** Each key below was declared on a published TypeScript type in |
| 9 | +`@object-ui/types` and unknown to its zod mirror in `@object-ui/types/zod`. None of them is |
| 10 | +honoured, so each is retired at once, with no alias window: |
| 11 | + |
| 12 | +- `label`: `content`, a third spelling of the label text beside `text` and `label`. The `label` |
| 13 | + renderer in `@object-ui/components` read it last (`text`, then `label`, then `content`) and no |
| 14 | + longer reads it, so a node that carries only `content` renders no text. No document in this |
| 15 | + repository authored it. Write `text` (or `label`). |
| 16 | +- `report`: `chartConfig` and `reportType`. Nothing read either key off a report, so an authored |
| 17 | + value configured nothing. `specReportToPresentation` no longer writes `reportType` onto the |
| 18 | + presentation it returns, and `LegacyReportPresentationLike` no longer declares it. |
| 19 | +- `detail-view`: `autoDiscoverRelated`. Nothing read it: `detail-view` does not discover related |
| 20 | + lists from reference fields. Author a `record:related_list` block for each related list. |
| 21 | + |
| 22 | +For each retired key: |
| 23 | + |
| 24 | +- the TypeScript member is now `?: never`, so writing it is a `tsc` error; |
| 25 | +- the zod mirror refuses it by name at the key, on the tolerant validator (`AnyComponentSchema`, |
| 26 | + `safeValidateSchema`) and on the strict authoring face (`StrictAnyComponentSchema`) alike. The |
| 27 | + tolerant validator used to keep the value without examining it. |
| 28 | + |
| 29 | +Delete the key from any document or literal that carries it. |
| 30 | + |
| 31 | +**Mirrored.** Two chatbot keys the published types declare, and the renderers read, gain their |
| 32 | +zod arm: |
| 33 | + |
| 34 | +- `chatbot`: `requestBody`, the chat API's extra body params. All three chatbot nodes now share |
| 35 | + one `requestBody` arm. The strict authoring face used to refuse `requestBody` on a `chatbot` |
| 36 | + node, although the type invites it and the retirement of `body` points authors at it. |
| 37 | +- `chatbot-floating`: `floatingConfig`, judged member by member (`position`, `defaultOpen`, |
| 38 | + `panelWidth`, `panelHeight`, `title`, `triggerSize`). Its retired `triggerIcon` member is now |
| 39 | + refused at runtime too, on this node. On a `chatbot` node `floatingConfig` stays unvalidated, |
| 40 | + because the `chatbot` renderer never reads it. |
| 41 | + |
| 42 | +A wrong-typed value at either key, for example a string `requestBody` or a `floatingConfig` |
| 43 | +`position` of `'top-left'`, is now refused at its path, where it used to be kept unexamined |
| 44 | +(breaking for invalid documents). |
| 45 | + |
| 46 | +`@object-ui/types` and `@object-ui/components` are in the fixed release group, so this ships as a |
| 47 | +minor bump, per the repository's version policy. |
| 48 | + |
| 49 | +`displayMode` on the two chatbot types is unchanged: its refusal stays TypeScript-only, so stored |
| 50 | +designer documents that carry `displayMode: 'floating'` parse exactly as before. |
0 commit comments