Skip to content

Commit 21ca482

Browse files
authored
Merge pull request #121 from objectstack-ai/copilot/fix-254823548-1133319012-04d73c7e-7013-4432-bf2c-db090188fb31
2 parents 8059d81 + e423a5f commit 21ca482

File tree

3 files changed

+14
-25
lines changed

3 files changed

+14
-25
lines changed

packages/types/package.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,6 @@
7676
"url": "https://github.com/objectstack-ai/objectui.git",
7777
"directory": "packages/types"
7878
},
79-
"dependencies": {
80-
"@objectstack/spec": "^0.1.1"
81-
},
8279
"devDependencies": {
8380
"typescript": "^5.9.3"
8481
}

packages/types/src/base.ts

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,9 @@
1616
* @packageDocumentation
1717
*/
1818

19-
import type { UIComponent } from '@objectstack/spec';
20-
2119
/**
2220
* Base schema interface that all component schemas extend.
23-
*
24-
* This extends UIComponent from @objectstack/spec (the "highest law")
25-
* and adds ObjectUI-specific rendering extensions like visibleOn, hiddenOn, etc.
26-
*
27-
* Inheritance Chain:
28-
* UIComponent (@objectstack/spec) → BaseSchema → Specific Schemas (ChartSchema, etc.)
21+
* This is the fundamental building block of the Object UI protocol.
2922
*
3023
* @example
3124
* ```typescript
@@ -37,7 +30,19 @@ import type { UIComponent } from '@objectstack/spec';
3730
* }
3831
* ```
3932
*/
40-
export interface BaseSchema extends UIComponent {
33+
export interface BaseSchema {
34+
/**
35+
* Component type identifier. Determines which renderer to use.
36+
* @example 'input', 'button', 'form', 'grid'
37+
*/
38+
type: string;
39+
40+
/**
41+
* Unique identifier for the component instance.
42+
* Used for state management, event handling, and React keys.
43+
*/
44+
id?: string;
45+
4146
/**
4247
* Human-readable name for the component.
4348
* Used for form field names, labels, and debugging.
@@ -157,9 +162,6 @@ export interface BaseSchema extends UIComponent {
157162
* A schema node can be a full schema object or a primitive value.
158163
* This union type supports both structured components and simple content.
159164
*
160-
* Note: This uses BaseSchema (instead of UIComponent from spec) to provide
161-
* ObjectUI-specific type narrowing and to include ObjectUI extensions in the type system.
162-
*
163165
* @example
164166
* ```typescript
165167
* const nodes: SchemaNode[] = [

pnpm-lock.yaml

Lines changed: 0 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)