diff --git a/packages/types/package.json b/packages/types/package.json index 7fa977b9df..d6077f935b 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -76,9 +76,6 @@ "url": "https://github.com/objectstack-ai/objectui.git", "directory": "packages/types" }, - "dependencies": { - "@objectstack/spec": "^0.1.1" - }, "devDependencies": { "typescript": "^5.9.3" } diff --git a/packages/types/src/base.ts b/packages/types/src/base.ts index 9b14a8de42..d883430710 100644 --- a/packages/types/src/base.ts +++ b/packages/types/src/base.ts @@ -16,16 +16,9 @@ * @packageDocumentation */ -import type { UIComponent } from '@objectstack/spec'; - /** * Base schema interface that all component schemas extend. - * - * This extends UIComponent from @objectstack/spec (the "highest law") - * and adds ObjectUI-specific rendering extensions like visibleOn, hiddenOn, etc. - * - * Inheritance Chain: - * UIComponent (@objectstack/spec) → BaseSchema → Specific Schemas (ChartSchema, etc.) + * This is the fundamental building block of the Object UI protocol. * * @example * ```typescript @@ -37,7 +30,19 @@ import type { UIComponent } from '@objectstack/spec'; * } * ``` */ -export interface BaseSchema extends UIComponent { +export interface BaseSchema { + /** + * Component type identifier. Determines which renderer to use. + * @example 'input', 'button', 'form', 'grid' + */ + type: string; + + /** + * Unique identifier for the component instance. + * Used for state management, event handling, and React keys. + */ + id?: string; + /** * Human-readable name for the component. * Used for form field names, labels, and debugging. @@ -157,9 +162,6 @@ export interface BaseSchema extends UIComponent { * A schema node can be a full schema object or a primitive value. * This union type supports both structured components and simple content. * - * Note: This uses BaseSchema (instead of UIComponent from spec) to provide - * ObjectUI-specific type narrowing and to include ObjectUI extensions in the type system. - * * @example * ```typescript * const nodes: SchemaNode[] = [ diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ea43e10441..8004ce585d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -478,12 +478,6 @@ importers: specifier: ^5.1.2 version: 5.1.2(vite@7.3.1(@types/node@25.0.8)(jiti@1.21.7)) - packages/objectstack-spec: - devDependencies: - typescript: - specifier: ^5.9.3 - version: 5.9.3 - packages/plugin-charts: dependencies: '@object-ui/components': @@ -819,10 +813,6 @@ importers: version: 5.4.21(@types/node@25.0.8) packages/types: - dependencies: - '@objectstack/spec': - specifier: workspace:* - version: link:../objectstack-spec devDependencies: typescript: specifier: ^5.9.3