AyolShop

@wocart/theme v4.3.0


@wocart/theme / index / ComponentDefinition

Interface: ComponentDefinition

Code-owned description of one reusable component. component is the real component reference — opaque here so the core stays framework-neutral; the ./astro renderer narrows it.

Properties

capabilities?

optional capabilities?: ComponentCapabilities


component

component: unknown


fields?

optional fields?: readonly FieldDefinition[]


fixed?

optional fixed?: readonly FixedBlockDefinition[]


group?

optional group?: LocalizedText

The editor palette heading this component is listed under.


label

label: LocalizedText


load?

optional load?: LoadFn


placement?

optional placement?: ComponentPlacement


presets?

optional presets?: readonly ComponentPreset[]


role?

optional role?: "order-form"


slots?

optional slots?: readonly SlotDefinition[]


summary?

optional summary?: string | readonly string[]

The text field whose words tell this instance from another of its type in an editor's lists (instanceSummary), or the fields a heading is made of (["title", "accent"]), joined by a space as the page joins them. Absent, or empty on an instance: the first text field, else the title of the first list's first item, else the first rich text.


type

type: string

Stable type identity: lowercase kebab-case, unique in the catalog.