Wocart

@wocart/theme v4.1.0


@wocart/theme / index / ComponentSpec

Interface: ComponentSpec

One component as data: a ComponentDefinition minus its runtime-only implementation. component (the live component reference) and load (the server-only data hook) are intentionally absent — neither is JSON-serializable and neither belongs in a tooling contract.

fields / slots are always present (normalized from absent to [] by the generator) so consumers never branch on "missing vs empty".

Properties

capabilities?

optional capabilities?: ComponentCapabilities


fields

fields: readonly FieldDefinition[]


fixed?

optional fixed?: readonly FixedBlockDefinition[]


group?

optional group?: LocalizedText

The editor palette heading this component is listed under.


label

label: LocalizedText

Editor-facing name.


placement?

optional placement?: ComponentPlacement


presets

presets: readonly ComponentPreset[]


role?

optional role?: "order-form"


slots

slots: readonly SlotDefinition[]


type

type: string

Stable type identity: lowercase kebab-case, equal to the catalog key.