Interface: CatalogEntry
Defined in: packages/core/src/catalog.types.ts:82
One block's registration data with no component attached — schema, editing hints and defaults. Serializable data only: what the studio and CI read. Components live in the registry.
Example
import type { CatalogEntry } from "@nubbin/core";
import { z } from "zod";
const hero: CatalogEntry = {
schema: z.object({ title: z.string() }),
defaults: { title: "Headline" },
ui: { fields: { title: {} } },
};
Properties
category?
optionalcategory?:string
Defined in: packages/core/src/catalog.types.ts:113
The palette section the block files under, the serializable twin of Block.category — an
opaque label the consumer chooses; a surface may derive a grouping for a block that omits
it. Compile never reads it.
defaults?
optionaldefaults?:UnknownProps
Defined in: packages/core/src/catalog.types.ts:120
What a freshly dropped block renders with. Checked against schema at registration, because
defaults that fail it produce a block invalid the instant it is placed.
description?
optionaldescription?:string
Defined in: packages/core/src/catalog.types.ts:97
One line saying what the block is for, shown wherever an editing surface lists blocks. The
serializable twin of Block.description, for a studio that fetches the catalog without the
components. Compile never reads it.
docs?
optionaldocs?:Record<string,string>
Defined in: packages/core/src/catalog.types.ts:107
Opaque links keyed by destination, the serializable twin of Block.docs. An editing surface
renders each as "Open in {Key}"; the consumer supplies the URLs. Compile never reads it.
icon?
optionalicon?:string
Defined in: packages/core/src/catalog.types.ts:102
A single glyph shown beside the name wherever an editing surface lists blocks. The
serializable twin of Block.icon — a string, never a component. Compile never reads it.
schema
schema:
unknown
Defined in: packages/core/src/catalog.types.ts:91
The block's schema, the same one its Block carries. It is judged at registration rather
than by the type: props and defaults run through ~standard.validate, and hint paths are
read through ~standard.jsonSchema.
ui?
optionalui?:BlockUi
Defined in: packages/core/src/catalog.types.ts:115
Editing hints, keyed by schema path. Omit it and every field is treated as static.