@opncanvas/schema
v0.1.0
Published
Pure TypeScript types and interfaces for opncanvas design schema
Maintainers
Readme
@designkit/schema
Pure TypeScript types and interfaces for design schema. No dependencies, no logic - just types.
Installation
npm install @designkit/schemaUsage
import { FormSchema, FormNode, FormButton, FormText } from '@designkit/schema'
const mySchema: FormSchema = {
id: 'form_1',
type: 'form',
children: [
{
id: 'button_1',
type: 'button',
action: 'submit',
label: 'Submit'
}
]
}Exports
FormSchema- Root schema typeFormNode- Union of all node typesFormButton- Button node typeFormText- Text node types (header, subtext, legal)FormInput- Input node typeFormBackground- Background node typeFormImage- Image node typeSchemaDocument- Legacy schema typeBlock- Legacy block type
License
MIT
