Skip to content

Commit d00d85f

Browse files
authored
Merge pull request #11 from objectql/copilot/update-documentation
2 parents 8a2c443 + ea5d58f commit d00d85f

14 files changed

Lines changed: 700 additions & 157 deletions

File tree

CHANGELOG.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1010
### Added
1111

1212
- Comprehensive test suite using Vitest and React Testing Library
13-
- Test coverage for @object-ui/protocol, @object-ui/engine, @object-ui/renderer, @object-ui/ui, and @object-ui/designer packages
13+
- Test coverage for @object-ui/core, @object-ui/react, @object-ui/components, and @object-ui/designer packages
1414
- GitHub Actions CI/CD workflows:
1515
- CI workflow for automated testing, linting, and building
1616
- Release workflow for publishing new versions
1717
- Test coverage reporting with @vitest/coverage-v8
1818
- Contributing guidelines (CONTRIBUTING.md)
1919
- Documentation for testing and development workflow in README
20+
- README files for all core packages
2021

2122
### Changed
2223

@@ -28,14 +29,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2829
### Added
2930

3031
- Core packages:
31-
- @object-ui/protocol - Pure metadata definitions and types
32-
- @object-ui/engine - Headless logic for handling data
33-
- @object-ui/renderer - Schema to UI component renderer
34-
- @object-ui/ui - High-quality UI components built with Tailwind CSS & Shadcn
32+
- @object-ui/core - Core logic, types, and validation (Zero React dependencies)
33+
- @object-ui/react - React bindings and SchemaRenderer component
34+
- @object-ui/components - Standard UI components built with Tailwind CSS & Shadcn
3535
- @object-ui/designer - Drag-and-drop visual editor
36-
- Monorepo structure using pnpm and TurboRepo
36+
- Monorepo structure using pnpm workspaces
3737
- Basic TypeScript configuration
3838
- Example applications in the examples directory
39+
- Complete documentation site with VitePress
3940

4041
[Unreleased]: https://github.com/objectql/objectui/compare/v0.1.0...HEAD
4142
[0.1.0]: https://github.com/objectql/objectui/releases/tag/v0.1.0

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ pnpm test:coverage
3434
pnpm build
3535

3636
# Build specific package
37-
cd packages/protocol && pnpm build
37+
cd packages/core && pnpm build
3838
```
3939

4040
### Linting

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -172,11 +172,10 @@ This project is organized as a Monorepo:
172172

173173
| Package | Description |
174174
| --- | --- |
175-
| **`@object-ui/types`** | The protocol definitions. Pure TypeScript interfaces. |
176-
| **`@object-ui/core`** | The logic engine. Data scoping, validation, evaluation. |
177-
| **`@object-ui/react`** | The React framework adapter. |
175+
| **`@object-ui/core`** | Core logic, types, and validation. Zero React dependencies. |
176+
| **`@object-ui/react`** | The React framework adapter with SchemaRenderer. |
178177
| **`@object-ui/components`** | The standard UI library implementation (Shadcn + Tailwind). |
179-
| **`@object-ui/plugin-*`** | Lazy-loaded complex components (e.g., AG Grid, Monaco). |
178+
| **`@object-ui/designer`** | Visual schema editor for building UIs without code. |
180179

181180
---
182181

docs/api/core.md

Lines changed: 32 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
# Core API
22

3-
The `@object-ui/core` package (also published as `@object-ui/protocol`) provides the foundational type definitions and schemas for Object UI.
3+
The `@object-ui/core` package provides the foundational type definitions, schemas, and core logic for Object UI.
4+
5+
This package is **framework-agnostic** with zero React dependencies, making it suitable for use in Node.js environments, build tools, or other frameworks.
46

57
## Installation
68

79
```bash
8-
npm install @object-ui/protocol
10+
npm install @object-ui/core
911
```
1012

1113
## Type Definitions
@@ -19,7 +21,7 @@ import type {
1921
FormSchema,
2022
ViewSchema,
2123
ComponentSchema
22-
} from '@object-ui/protocol'
24+
} from '@object-ui/core'
2325
```
2426

2527
### BaseSchema
@@ -82,7 +84,7 @@ interface InputSchema extends BaseSchema {
8284
### Using Zod
8385

8486
```typescript
85-
import { PageSchema } from '@object-ui/protocol'
87+
import { PageSchema } from '@object-ui/core'
8688
import { z } from 'zod'
8789

8890
const pageValidator = z.object({
@@ -100,18 +102,38 @@ const result = pageValidator.safeParse(mySchema)
100102
### Type Guards
101103

102104
```typescript
103-
import { isPageSchema, isFormSchema } from '@object-ui/protocol'
105+
import { isPageSchema, isFormSchema } from '@object-ui/core'
104106

105107
if (isPageSchema(schema)) {
106108
// TypeScript knows schema is PageSchema
107109
console.log(schema.title)
108110
}
109111
```
110112

111-
## API Reference
113+
## Component Registry
114+
115+
The core package provides a framework-agnostic component registry:
116+
117+
```typescript
118+
import { ComponentRegistry } from '@object-ui/core'
119+
120+
const registry = new ComponentRegistry()
121+
registry.register('button', buttonMetadata)
122+
```
112123

113-
Full API documentation coming soon.
124+
## Data Scope
125+
126+
Data scope management for expression evaluation:
127+
128+
```typescript
129+
import { DataScope } from '@object-ui/core'
130+
131+
const scope = new DataScope({ user: { name: 'John' } })
132+
const value = scope.get('user.name') // 'John'
133+
```
134+
135+
## API Reference
114136

115-
For now, see:
116-
- [GitHub Repository](https://github.com/objectql/objectui/tree/main/packages/protocol)
117-
- [TypeScript Definitions](https://github.com/objectql/objectui/blob/main/packages/protocol/src/types)
137+
For detailed API documentation, see:
138+
- [GitHub Repository](https://github.com/objectql/objectui/tree/main/packages/core)
139+
- [TypeScript Definitions](https://github.com/objectql/objectui/blob/main/packages/core/src/index.ts)

docs/api/designer.md

Lines changed: 110 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,15 @@
22

33
The `@object-ui/designer` package provides a visual drag-and-drop editor for creating Object UI schemas.
44

5-
::: warning Coming Soon
6-
The Designer is planned for release in Q3 2026. This documentation is a preview.
7-
:::
5+
## Installation
86

9-
## Planned Features
7+
```bash
8+
npm install @object-ui/designer @object-ui/react @object-ui/components
9+
```
10+
11+
## Features
1012

11-
### Visual Editor
13+
### Visual Editor
1214

1315
```tsx
1416
import { Designer } from '@object-ui/designer'
@@ -18,48 +20,130 @@ function App() {
1820

1921
return (
2022
<Designer
21-
schema={schema}
22-
onChange={setSchema}
23+
initialSchema={schema}
24+
onSchemaChange={setSchema}
2325
/>
2426
)
2527
}
2628
```
2729

28-
### Component Palette
30+
### ✅ Component Palette
31+
32+
Drag components from the categorized palette to the canvas. Includes:
33+
- Basic components (text, button, link, image)
34+
- Form inputs (input, textarea, select, checkbox, radio, date picker)
35+
- Layout components (container, grid, flex, tabs, card)
36+
- Data display (table, list, badge)
37+
- Feedback components (alert, toast, dialog)
38+
39+
### ✅ Property Editor
40+
41+
Edit component properties visually with a dynamic form in the sidebar panel.
42+
43+
### ✅ Real-time Preview
2944

30-
Drag components from the palette to the canvas.
45+
See your changes instantly with live preview in the canvas.
3146

32-
### Property Editor
47+
### ✅ Drag and Drop
3348

34-
Edit component properties visually with a sidebar panel.
49+
- Drag components from palette to canvas
50+
- Reorder components within the canvas
51+
- Visual feedback during drag operations
3552

36-
### Real-time Preview
53+
### ✅ JSON Import/Export
3754

38-
See your changes instantly with live preview.
55+
- Export schema as JSON
56+
- Import schema from JSON
57+
- Copy schema to clipboard
3958

40-
### AI Assistant
59+
## Components
4160

42-
Generate schemas using natural language:
61+
### Designer
62+
63+
The main designer component that includes all functionality.
4364

4465
```tsx
4566
<Designer
46-
enableAI={true}
47-
aiPrompt="Create a user registration form"
67+
initialSchema={schema}
68+
onSchemaChange={handleChange}
4869
/>
4970
```
5071

51-
### Collaboration
72+
**Props:**
73+
- `initialSchema?: SchemaNode` - Initial schema to load
74+
- `onSchemaChange?: (schema: SchemaNode) => void` - Callback when schema changes
75+
76+
### Custom Layout
77+
78+
Use individual components for custom layouts:
79+
80+
```tsx
81+
import {
82+
DesignerProvider,
83+
Canvas,
84+
ComponentPalette,
85+
PropertyPanel,
86+
Toolbar
87+
} from '@object-ui/designer'
88+
89+
function CustomDesigner() {
90+
return (
91+
<DesignerProvider>
92+
<div className="flex flex-col h-screen">
93+
<Toolbar />
94+
<div className="flex flex-1">
95+
<ComponentPalette className="w-64" />
96+
<Canvas className="flex-1" />
97+
<PropertyPanel className="w-80" />
98+
</div>
99+
</div>
100+
</DesignerProvider>
101+
)
102+
}
103+
```
104+
105+
## API Reference
52106

53-
Real-time multi-user editing like Google Docs.
107+
### useDesigner Hook
54108

55-
## Stay Updated
109+
Access designer state and methods:
56110

57-
Want to be notified when Designer launches?
111+
```tsx
112+
import { useDesigner } from '@object-ui/designer'
113+
114+
function CustomComponent() {
115+
const {
116+
schema,
117+
setSchema,
118+
selectedNodeId,
119+
setSelectedNodeId,
120+
updateNode,
121+
addNode,
122+
deleteNode,
123+
moveNode
124+
} = useDesigner()
125+
126+
// Use designer state
127+
}
128+
```
58129

59-
-[Star on GitHub](https://github.com/objectql/objectui)
60-
- 📧 [Email us](mailto:hello@objectui.org)
61-
- 📋 [View Roadmap](/roadmap)
130+
### Context API
131+
132+
```typescript
133+
interface DesignerContextValue {
134+
schema: SchemaNode
135+
setSchema: (schema: SchemaNode) => void
136+
selectedNodeId: string | null
137+
setSelectedNodeId: (id: string | null) => void
138+
hoveredNodeId: string | null
139+
setHoveredNodeId: (id: string | null) => void
140+
updateNode: (id: string, updates: Partial<SchemaNode>) => void
141+
addNode: (parentId: string | null, node: SchemaNode, index?: number) => void
142+
deleteNode: (id: string) => void
143+
moveNode: (nodeId: string, targetParentId: string | null, targetIndex: number) => void
144+
}
145+
```
62146

63-
## Roadmap
147+
## Examples
64148

65-
See the [full roadmap](/roadmap#q3-2026-visual-designer-available-september-2026) for Designer features and timeline.
149+
See [examples/designer-demo](https://github.com/objectql/objectui/tree/main/examples/designer-demo) for a complete working example.

docs/guide/installation.md

Lines changed: 10 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ Object UI is distributed as several packages:
1616

1717
| Package | Description | Required |
1818
|---------|-------------|----------|
19-
| `@object-ui/protocol` | Type definitions and schemas | Yes |
20-
| `@object-ui/renderer` | The core compiler that turns JSON into React | Yes |
21-
| `@object-ui/ui` | The visual component library (Shadcn extended) | Yes |
19+
| `@object-ui/core` | Core logic, types, and validation (Zero React dependencies) | Yes |
20+
| `@object-ui/react` | React bindings and SchemaRenderer component | Yes |
21+
| `@object-ui/components` | Standard UI library with Shadcn + Tailwind components | Yes |
2222
| `@object-ui/designer` | Visual schema editor and builder | Optional |
2323

2424
## Basic Installation
@@ -28,29 +28,17 @@ To get started, install the core packages:
2828
::: code-group
2929

3030
```bash [npm]
31-
npm install @object-ui/renderer @object-ui/ui @object-ui/protocol
31+
npm install @object-ui/react @object-ui/components
3232
```
3333

3434
```bash [pnpm]
35-
pnpm add @object-ui/renderer @object-ui/ui @object-ui/protocol
36-
```
37-
38-
```bash [yarn]
39-
yarn add @object-ui/renderer @object-ui/ui @object-ui/protocol
40-
```
41-
42-
:::bash [npm]
43-
npm install @object-ui/react @object-ui/components
35+
pnpm add @object-ui/react @object-ui/components
4436
```
4537

4638
```bash [yarn]
4739
yarn add @object-ui/react @object-ui/components
4840
```
4941

50-
```bash [pnpm]
51-
pnpm add @object-ui/react @object-ui/components
52-
```
53-
5442
:::
5543

5644
## Setup Steps
@@ -158,19 +146,19 @@ Create React App requires no special configuration.
158146
For TypeScript type definitions:
159147

160148
```bash
161-
npm install @object-ui/protocol
149+
npm install @object-ui/core
162150
```
163151

164152
```typescript
165-
import type { PageSchema, FormSchema } from '@object-ui/protocol'
153+
import type { PageSchema, FormSchema } from '@object-ui/core'
166154
```
167155

168-
### Engine
156+
### Designer
169157

170-
For advanced state management and data handling:
158+
For visual schema editing:
171159

172160
```bash
173-
npm install @object-ui/engine
161+
npm install @object-ui/designer
174162
```
175163

176164
## Verification

docs/guide/introduction.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -119,11 +119,10 @@ Object UI automatically:
119119
Object UI is built as a modular ecosystem:
120120

121121
```
122-
@object-ui/protocol → Type definitions and schemas
123-
@object-ui/engine → Core logic and state management
124-
@object-ui/ui → UI components (Tailwind + Shadcn)
125-
@object-ui/renderer → Schema-to-React transformer
126-
@object-ui/designer → Visual editor (coming Q3 2026)
122+
@object-ui/core → Core logic, types, and validation (Zero React)
123+
@object-ui/react → React bindings and SchemaRenderer
124+
@object-ui/components → UI components (Tailwind + Shadcn)
125+
@object-ui/designer → Visual schema editor
127126
```
128127

129128
This modular design means:

0 commit comments

Comments
 (0)