From 49d6983e85f00e138ecf4cd303b6eb62df37ffc4 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 24 Aug 2026 20:42:44 +0000 Subject: [PATCH 1/2] docs(components): name the shipped handler on five action props The five reference pages annotated an event prop as `string | ActionConfig`, a type `@object-ui/types` has never exported. Read individually from the freshly built `packages/types/dist/*.d.ts`, each slot is a plain function callback under a different prop name: - form/command.mdx onSelect -> onChange, (value: string) => void - form/radio-group.mdx onValueChange -> onChange, (value: string | number) => void - form/date-picker.mdx onDateChange -> onChange, (date: Date | undefined) => void - form/combobox.mdx onValueChange -> onChange, (value: string) => void - feedback/toast.mdx onAction -> the nested action?: { label; onClick } The `string |` half goes with the name. #4453 narrowed the runtime to `typeof === 'function'`, so an authored string handler is dropped; a reference page promising `string | Fn` teaches an inert key. Part of #6122 --- content/docs/components/feedback/toast.mdx | 8 +++++--- content/docs/components/form/combobox.mdx | 2 +- content/docs/components/form/command.mdx | 2 +- content/docs/components/form/date-picker.mdx | 2 +- content/docs/components/form/radio-group.mdx | 2 +- 5 files changed, 9 insertions(+), 7 deletions(-) diff --git a/content/docs/components/feedback/toast.mdx b/content/docs/components/feedback/toast.mdx index 5da45f5afe..c00c17e884 100644 --- a/content/docs/components/feedback/toast.mdx +++ b/content/docs/components/feedback/toast.mdx @@ -31,9 +31,11 @@ interface ToastSchema { description?: string; // Toast message variant?: 'default' | 'destructive'; - // Action - actionLabel?: string; // Action button label - onAction?: string | ActionConfig; + // Action button + action?: { + label: string; + onClick: () => void; + }; // Timing duration?: number; // Auto-dismiss time in ms diff --git a/content/docs/components/form/combobox.mdx b/content/docs/components/form/combobox.mdx index ef658d634f..a9bf345361 100644 --- a/content/docs/components/form/combobox.mdx +++ b/content/docs/components/form/combobox.mdx @@ -41,7 +41,7 @@ interface ComboboxSchema { emptyText?: string; // Text when no results // Events - onValueChange?: string | ActionConfig; + onChange?: (value: string) => void; // States disabled?: boolean; diff --git a/content/docs/components/form/command.mdx b/content/docs/components/form/command.mdx index e40f51e278..f475a19e43 100644 --- a/content/docs/components/form/command.mdx +++ b/content/docs/components/form/command.mdx @@ -31,7 +31,7 @@ interface CommandSchema { emptyText?: string; // Text when no results // Events - onSelect?: string | ActionConfig; + onChange?: (value: string) => void; // Styling className?: string; diff --git a/content/docs/components/form/date-picker.mdx b/content/docs/components/form/date-picker.mdx index 8d2a79823f..34d195b50f 100644 --- a/content/docs/components/form/date-picker.mdx +++ b/content/docs/components/form/date-picker.mdx @@ -31,7 +31,7 @@ interface DatePickerSchema { placeholder?: string; // Placeholder text // Events - onDateChange?: string | ActionConfig; + onChange?: (date: Date | undefined) => void; // States disabled?: boolean; diff --git a/content/docs/components/form/radio-group.mdx b/content/docs/components/form/radio-group.mdx index b3817c8174..43acc4cb4f 100644 --- a/content/docs/components/form/radio-group.mdx +++ b/content/docs/components/form/radio-group.mdx @@ -47,7 +47,7 @@ interface RadioGroupSchema { direction?: 'vertical' | 'horizontal'; // Events - onValueChange?: string | ActionConfig; + onChange?: (value: string | number) => void; // States disabled?: boolean; From 6600c7ad70b36abc3d6fe24031f5dfaa166635fe Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 24 Aug 2026 20:49:55 +0000 Subject: [PATCH 2/2] docs(changeset): declare the five action-prop corrections as docs-only Part of #6122 --- .changeset/6122-action-prop-renames.md | 29 ++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .changeset/6122-action-prop-renames.md diff --git a/.changeset/6122-action-prop-renames.md b/.changeset/6122-action-prop-renames.md new file mode 100644 index 0000000000..d99824e289 --- /dev/null +++ b/.changeset/6122-action-prop-renames.md @@ -0,0 +1,29 @@ +--- +--- + +Docs only, publishes nothing: five `content/docs/components` reference pages +annotated an event prop as `string | ActionConfig` — a type `@object-ui/types` +has never exported. Each site was resolved individually against the freshly +built `packages/types/dist/*.d.ts`, and in every case the shipped slot is a +plain function callback that the page had also named wrongly: + +| page | documented | shipped slot | declaration | +| --- | --- | --- | --- | +| `form/command.mdx` | `onSelect` | `onChange?: (value: string) => void` | `form.d.ts:1376` | +| `form/radio-group.mdx` | `onValueChange` | `onChange?: (value: string \| number) => void` | `form.d.ts:394` | +| `form/date-picker.mdx` | `onDateChange` | `onChange?: (date: Date \| undefined) => void` | `form.d.ts:642` | +| `form/combobox.mdx` | `onValueChange` | `onChange?: (value: string) => void` | `form.d.ts:1324` | +| `feedback/toast.mdx` | `actionLabel` + `onAction` | `action?: { label: string; onClick: () => void }` | `feedback.d.ts:137` | + +The `string |` half of each annotation goes with the name, and that is the +substance rather than a tidy-up: objectui#4453 narrowed the runtime to +`typeof === 'function'`, so an authored string handler is **dropped** +(`packages/plugin-calendar/src/calendar-view-renderer.tsx`). A reference page +promising `string | Fn` is exactly what makes an AI author emit a handler that +publishes, validates, and silently does nothing. + +No type was minted to make the prose true. Measured with a throwaway re-fence +probe: `TS2304: Cannot find name 'ActionConfig'` **10 → 5** across the +`components` group, and the 5 that remain are objectui#6132's, untouched here. + +Part of objectui#6122.