FrameworkAdapterInput
Defined in: packages/core/src/framework.ts:198
Input type for defineFrameworkAdapter().
Framework packages pass this to register their component implementations.
TypeScript enforces that every field type in the AdminField union has both
an input component (fields) and a cell component (cells), and that each
component accepts the correct props for its field type.
What the HKT does:
The F parameter is the framework’s HKT — a type-level function that maps
a props type to the framework’s component type. For React:
interface ReactHKT extends ComponentHKT { component: ComponentType<this['_props']>;}Passing ReactHKT as F means every slot in fields and cells resolves to
ComponentType<CorrectProps>, giving the component full prop autocomplete.
Example
Section titled “Example”// In @vexcms/reactimport { defineFrameworkAdapter, ComponentHKT } from '@vexcms/core';import { ComponentType } from 'react';
interface ReactHKT extends ComponentHKT { component: ComponentType<this['_props']>;}
export const reactAdapter = defineFrameworkAdapter<ReactHKT>({ name: 'react', version: '0.1.0', fields: { text: TextInputComponent, // must accept InputComponentProps<TextField> }, cells: { text: TextCellComponent, // must accept CellComponentProps<TextField> },});- FrameworkAdapter for the resolved type returned by
defineFrameworkAdapter - FieldComponentMap for the field component slot types
- CellComponentProps for the cell component props
Type Parameters
Section titled “Type Parameters”F extends ComponentHKT
TFieldMeta
Section titled “TFieldMeta”TFieldMeta extends BaseFieldMeta = BaseFieldMeta
Properties
Section titled “Properties”fields
Section titled “fields”fields:
FieldComponentMap<F,TFieldMeta>
Defined in: packages/core/src/framework.ts:210
Input components for each field type, rendered in the document edit form.
Every type in the AdminField union must have a corresponding component.
name:
string
Defined in: packages/core/src/framework.ts:203
Framework name used for identification (e.g. "react", "solid").
version
Section titled “version”version:
string
Defined in: packages/core/src/framework.ts:205
Adapter version — should match the framework package version.
views:
ViewComponentMap<F>
Defined in: packages/core/src/framework.ts:215
Admin view components — required for rendering the admin panel. All three must be provided; TypeScript enforces completeness.