Package Exports
- @object-ui/core
Readme
@object-ui/core
Core logic, types, and validation for Object UI. Zero React dependencies.
Features
- π― Type Definitions - Complete TypeScript schemas for all components
- π Component Registry - Framework-agnostic component registration system
- π Data Scope - Data scope management and expression evaluation
- β Validation - Zod-based schema validation
- π Zero React - Can run in Node.js or any JavaScript environment
Installation
npm install @object-ui/coreUsage
Type Definitions
import type {
PageSchema,
FormSchema,
InputSchema,
BaseSchema
} from '@object-ui/core'
const mySchema: PageSchema = {
type: 'page',
title: 'My Page',
body: []
}Component Registry
import { ComponentRegistry } from '@object-ui/core'
const registry = new ComponentRegistry()
registry.register('button', buttonMetadata)
const metadata = registry.get('button')Data Scope
import { DataScope } from '@object-ui/core'
const scope = new DataScope({
user: { name: 'John', role: 'admin' }
})
const userName = scope.get('user.name') // 'John'
const isAdmin = scope.evaluate('${user.role === "admin"}') // truePhilosophy
This package is designed to be framework-agnostic. It contains:
- β Pure TypeScript types and interfaces
- β Core logic and utilities
- β Validation schemas
- β NO React components
- β NO UI rendering logic
- β NO framework dependencies
This allows the core types and logic to be used in:
- Build tools and CLI utilities
- Backend validation
- Code generators
- Alternative framework adapters (Vue, Svelte, etc.)
API Reference
See full documentation for detailed API reference.
Compatibility
- Node.js: β₯ 18
- TypeScript: β₯ 5.0 (strict mode)
@objectstack/spec: ^3.3.0@objectstack/client: ^3.3.0- Tailwind CSS: β₯ 3.4 (for packages with UI)
Links
- π Documentation
- π¦ npm package
- π Changelog
- π Report an issue
- π€ Contributing Guide
- πΊοΈ Roadmap
License
MIT β see LICENSE.