theme.ts

Source

24 documented symbols. Read the signatures first, then expand each item for parameters, return types, and examples.

Reference

fndeepMerge<T extends Record<string, unknown>>(target: T, source: Partial<T>): TDeep merge two objects.

Deep merge two objects.

View source

Parameters

  • target T
  • source Partial

Returns

T
fndefineTheme(config: ThemeConfig): ThemeConfigDefines a theme configuration with type checking.

Defines a theme configuration with type checking.

View source

Parameters

  • config ThemeConfig

Returns

ThemeConfig

Examples

const myTheme = defineTheme({
  extends: defaultTheme,
  colors: {
    primary: '#3498db',
  },
  footer: {
    copyright: '2025 My Company',
  },
});
fnmergeThemes(...themes): ThemeConfigMerges multiple theme configurations. Later themes override earlier ones.

Merges multiple theme configurations. Later themes override earlier ones.

View source

Returns

ThemeConfig

Examples

const merged = mergeThemes(defaultTheme, customTheme, overrides);
interfaceNapiSocialLinksNAPI-compatible social links type.

NAPI-compatible social links type.

View source

interfaceNapiThemeColorsNAPI-compatible theme colors type.

NAPI-compatible theme colors type.

View source

interfaceNapiThemeConfigNAPI-compatible theme configuration type.

NAPI-compatible theme configuration type.

View source

interfaceNapiThemeEmbedNAPI-compatible theme embed type.

NAPI-compatible theme embed type.

View source

interfaceNapiThemeEntryPageNAPI-compatible entry page theme type.

NAPI-compatible entry page theme type.

View source

interfaceNapiThemeFontsNAPI-compatible theme fonts type.

NAPI-compatible theme fonts type.

View source

interfaceNapiThemeFooterNAPI-compatible theme footer type.

NAPI-compatible theme footer type.

View source

interfaceNapiThemeHeaderNAPI-compatible theme header type.

NAPI-compatible theme header type.

View source

interfaceNapiThemeLayoutNAPI-compatible theme layout type.

NAPI-compatible theme layout type.

View source

interfaceResolvedThemeConfigResolved theme configuration (after merging with defaults).

Resolved theme configuration (after merging with defaults).

View source

fnresolveTheme(config?: ThemeConfig): ResolvedThemeConfigResolves a theme configuration by merging with its extends chain and defaults.

Resolves a theme configuration by merging with its extends chain and defaults.

View source

Parameters

  • config ThemeConfig

    optional

Returns

ResolvedThemeConfig
interfaceSocialLinksSocial links configuration.

Social links configuration.

View source

interfaceThemeColorsTheme color configuration.

Theme color configuration.

View source

interfaceThemeConfigComplete theme configuration.

Complete theme configuration.

View source

interfaceThemeEmbedEmbedded HTML content for specific positions in the page layout.

Embedded HTML content for specific positions in the page layout.

View source

interfaceThemeEntryPageEntry page theme configuration.

Entry page theme configuration.

View source

interfaceThemeFontsTheme font configuration.

Theme font configuration.

View source

interfaceThemeFooterTheme footer configuration.

Theme footer configuration.

View source

interfaceThemeHeaderTheme header configuration.

Theme header configuration.

View source

interfaceThemeLayoutTheme layout configuration.

Theme layout configuration.

View source

fnthemeToNapi(theme: ResolvedThemeConfig): NapiThemeConfigConverts resolved theme to the format expected by Rust NAPI.

Converts resolved theme to the format expected by Rust NAPI.

View source

Parameters

  • theme ResolvedThemeConfig

Returns

NapiThemeConfig