@wocart/theme / index / ThemeRenderContext
Interface: ThemeRenderContext
The request facts available while rendering (formalises Astro.locals.store + URL).
Properties
content
content:
Record<string,string>
The theme's resolved content pack: an opaque, flat string map with store
overrides already merged. The SDK reads it (through a field's contentKey)
and never shapes it — the taxonomy belongs to the theme, and the theme owns
how its components consume the pack.
fallbackLocales?
optionalfallbackLocales?: readonlystring[]
The store's fallback chain after locale, in order (e.g. the store's
primary language, then the platform default). A translatable value with
no entry for locale tries these before the pack and the default.
isRTL
isRTL:
boolean
locale
locale:
string
The language being rendered (BCP 47). Translatable field values resolve
to it first; content is the pack for it.
params?
optionalparams?:Readonly<Record<string,string|undefined>>
The route's dynamic segments (Astro.params), e.g. { slug: "chair" } on
/products/[slug]. A section on a templated surface reads its route
resource through these, with a reads key that includes them, instead of
parsing url.
store
store:
StoreConfig
url
url:
string
Request pathname.