From fc5f332b0ee675c32619e6f9a24066b48aa1cf76 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 6 Sep 2026 16:18:56 +0000 Subject: [PATCH] docs(skills): make the plugin guide's node interface extend BaseSchema MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `MyWidgetSchema` in the "Type definitions" fence hand-rolled five of `BaseSchema`'s members instead of extending it, and declared two of them narrower than the shipped renderer accepts: `hidden` / `disabled` were `string`, while `packages/types/src/base.ts:376` / `:412` declare each as `boolean | ExpressionWire`. A plugin author copying the fence got a type that refuses `hidden: true` and refuses the CEL envelope, and silently lost every member the interface did not re-state. The block now imports `BaseSchema` from `@object-ui/types` the way this file's other fences import, extends it, and keeps only the widget's own two members — `type` and `props`, the latter read by the entry-point example above it via `{...schema.props}`. Line-neutral. Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_019RfFHiRCSs3JXLK4cwcfox --- skills/objectui/guides/plugin-development.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/skills/objectui/guides/plugin-development.md b/skills/objectui/guides/plugin-development.md index b020523860..2bcee1b720 100644 --- a/skills/objectui/guides/plugin-development.md +++ b/skills/objectui/guides/plugin-development.md @@ -218,14 +218,14 @@ export default MyWidget; ```typescript // types.ts -export interface MyWidgetSchema { +import type { BaseSchema } from '@object-ui/types'; + +// Only the widget's OWN members: `id` / `className` / `bind` / `hidden` / +// `disabled` / `children` are INHERITED — and `hidden` / `disabled` are +// `boolean | ExpressionWire` there, not strings (packages/types/src/base.ts). +export interface MyWidgetSchema extends BaseSchema { type: 'my-widget'; - id?: string; - className?: string; - bind?: string; - props?: MyWidgetProps; - hidden?: string; - disabled?: string; + props?: MyWidgetProps; // read by the entry point's `{...schema.props}` } export interface MyWidgetProps {