ResolvedShopTheme

db · /index·interface

Fully-populated, platform-defaulted theme token map for a single shop. Every field carries a concrete platform default (sourced from apps/storefront/src/app/globals.css) so the storefront serializer (P3-2) never has to know a default — it reads a resolved value for every token. The serializer emits each token onto the CSS custom property components consume today (so a tenant edit takes effect immediately): colors.background → --color-background, colors.surface.base → --color-block (the semantic --surface-1 aliases it), radii.block → --block-border-radius, productCard.ctaBg → --product-card-cta-bg, etc.

The four accent light/dark shades (accentPrimaryLight, …) are intentionally OPTIONAL and absent by default: the storefront derives them from the base accent via colord at request time, so a value here is an explicit override of that derivation rather than a default.

Properties

colors
{ accentPrimaryDark: string; accentPrimaryLight: string; accents: AccentToken[]; accentSecondaryDark: string; accentSecondaryLight: string; background: string; border: { default: string; strong: string }; focusRing: string; foreground: string; sectionDark: string; state: { danger: string; info: string; sale: string; success: string }; surface: { base: string; raised: string; sunken: string }; text: { default: string; muted: string } }
elevation
{ card: string; cardHover: string; panel: string }
→ ``--product-card-shadow`` / ``--product-card-shadow-hover`` / ``--header-panel-shadow``.
radii
{ block: string; blockLarge: string; blockSmall: string; blockTiny: string }
→ ``--block-border-radius*``.

Example

import type { ResolvedShopTheme } from '@nordcom/commerce-db';
function pageBackground(theme: ResolvedShopTheme): string {
    return theme.colors.background;
}

FeatureFlagService ReviewService ShopService FeatureFlagOption FeatureFlagRef ResolvedCartLineTokens ResolvedProductCardTokens ShopBase

Sourcetheme.ts:284Edit the JSDoc directly
Metadata@nordcom/commerce-db@0.1.0Open in GitHub ↗

On this page