@wocart/theme / index / SurfaceSpec
Interface: SurfaceSpec
One surface a theme declares it can render.
key uses the same surface-key pattern as the page-document envelope
(SURFACE_KEY_PATTERN in schemas.ts); label is the editor-facing name.
Properties
document?
optionaldocument?:PageData
The theme's shipped document for this surface: what renders before the merchant saves one.
hideableAreas?
optionalhideableAreas?: readonlystring[]
The theme's areas a page of this surface may leave out (["header", "footer"]): its document lists the ones it hides in hiddenAreas. A
landing page that sends an ad's visitor straight to its order form is
the case. Absent: every page shows every area.
key
key:
string
label
label:
LocalizedText
max?
optionalmax?:number
At most this many top-level sections (1–50). Absent: THEME_LIMITS.sections.
pageType?
optionalpageType?:SurfacePageType
The platform page type this surface renders. A page type with a resource
(product, category, collection, page, landing) makes the surface
a template: one document renders every resource of that type, and its
sections read the resource from ThemeRenderContext.params.
required?
optionalrequired?: readonlyRequiredBlock[]
Top-level sections the surface must hold, as a slot's required. Alternates inherit their base's.