Prometheus Entity Management API
    Preparing search index...

    schema.tsx (entity-graph-react)

    React field renderers/editors + schema→field builder, built on the framework-agnostic schema registry in @prometheus-ags/entity-graph-core.

    The registry + JSON-schema primitives live in core and are RE-EXPORTED here so existing consumers keep working. There is exactly ONE registry (core's) — no duplication (a duplicate registry would silently desync schema lookups).

    interface SchemaFieldDescriptor<
        TEntity extends object = Record<string, unknown>,
    > {
        componentHint?: string;
        editControl?: (
            value: unknown,
            onChange: (v: unknown) => void,
            entity: Partial<TEntity>,
        ) => ReactNode;
        field: string;
        hideOnCreate?: boolean;
        hideOnEdit?: boolean;
        hint?: string;
        label: string;
        options?: { label: string; value: string }[];
        placeholder?: string;
        readonlyOnEdit?: boolean;
        render?: (value: unknown, entity: TEntity) => ReactNode;
        required?: boolean;
        schema: JsonSchemaObject;
        schemaPath: string;
        type: FieldType;
    }

    Type Parameters

    • TEntity extends object = Record<string, unknown>

    Hierarchy (View Summary)

    Index
    componentHint?: string
    editControl?: (
        value: unknown,
        onChange: (v: unknown) => void,
        entity: Partial<TEntity>,
    ) => ReactNode
    field: string
    hideOnCreate?: boolean
    hideOnEdit?: boolean
    hint?: string
    label: string
    options?: { label: string; value: string }[]
    placeholder?: string
    readonlyOnEdit?: boolean
    render?: (value: unknown, entity: TEntity) => ReactNode
    required?: boolean
    schemaPath: string
    type: FieldType