Package Exports
- @object-ui/core
- @object-ui/core/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@object-ui/core) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
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.
License
MIT