MCPcopy Create free account
hub / github.com/anomalyco/opencode / resolveThemeVariantV2

Function resolveThemeVariantV2

packages/ui/src/theme/v2/resolve.ts:135–140  ·  view source on GitHub ↗
(variant: ThemeVariant, isDark: boolean)

Source from the content-addressed store, hash-verified

133}
134
135export function resolveThemeVariantV2(variant: ThemeVariant, isDark: boolean): ResolvedV2Theme {
136 const primitives = generateV2Primitives(variant, isDark)
137 const semantics = mapV2Semantics(isDark)
138 const foreground = mapV2Foreground(readPalette(variant).ink, isDark, primitives, variant.overrides)
139 return mergeV2Tokens(primitives, semantics, foreground, variant.v2Overrides ?? {})
140}
141
142export function resolveThemeV2(theme: DesktopTheme): { light: ResolvedV2Theme; dark: ResolvedV2Theme } {
143 return {

Callers 4

applyThemeFunction · 0.90
applyThemeCssFunction · 0.90
cacheThemeVariantsFunction · 0.90
resolveThemeV2Function · 0.85

Calls 5

mapV2SemanticsFunction · 0.90
mapV2ForegroundFunction · 0.90
mergeV2TokensFunction · 0.90
generateV2PrimitivesFunction · 0.85
readPaletteFunction · 0.85

Tested by

no test coverage detected