Wocart

@wocart/theme v4.1.0


@wocart/theme / index / ComponentCapabilities

Interface: ComponentCapabilities

What a component permits.

V1 carries one flag, and it is advisory: insertable is metadata for an editor/CLI's insertion palette. Neither parsePageData nor resolveInstance enforces it — a saved document containing a non-insertable component still renders, and the renderer reports only what the document tells it. The render path never second-guesses a document that was already saved. Enforcement, when it exists, belongs at insertion time in the writer, not at render.

Properties

insertable?

optional insertable?: boolean

Absent or true: an editor may offer it. false: never inserted by an editor.


surfaces?

optional surfaces?: readonly string[]

The surfaces it may be inserted on, by surface key. An entry also covers that surface's alternates (product covers product.compact). Absent: any surface. Like insertable, enforced when inserting, never at render.