MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / resolveShikiThemes

Function resolveShikiThemes

packages/react/src/lib/shiki.ts:123–132  ·  view source on GitHub ↗
(theme?: ShikiThemeProp)

Source from the content-addressed store, hash-verified

121 * page can't paint light-theme tokens and then snap once `useIsDark` syncs.
122 */
123export function resolveShikiThemes(theme?: ShikiThemeProp): {
124 light: SupportedTheme;
125 dark: SupportedTheme;
126} {
127 if (typeof theme === "string") return { light: theme, dark: theme };
128 return {
129 light: theme?.light ?? DEFAULT_LIGHT_THEME,
130 dark: theme?.dark ?? DEFAULT_DARK_THEME,
131 };
132}
133
134/** The shiki options that render dual-theme `light-dark(...)` colors. */
135export const dualThemeOptions = (theme?: ShikiThemeProp) => ({

Callers 1

dualThemeOptionsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected