(
themeName: string,
colors: Record<string, string> & { toolPendingBg?: string; userMessageBg?: string },
exportColors: PiThemeState['exportColors'],
isLightTheme: (themeName?: string | undefined) => boolean,
)
| 94 | } |
| 95 | |
| 96 | function isResolvedLightTheme( |
| 97 | themeName: string, |
| 98 | colors: Record<string, string> & { toolPendingBg?: string; userMessageBg?: string }, |
| 99 | exportColors: PiThemeState['exportColors'], |
| 100 | isLightTheme: (themeName?: string | undefined) => boolean, |
| 101 | ) { |
| 102 | if (isLightTheme(themeName)) { |
| 103 | return true |
| 104 | } |
| 105 | const background = exportColors.pageBg ?? colors.toolPendingBg ?? colors.userMessageBg |
| 106 | return luminance(background) > 0.5 |
| 107 | } |
| 108 | |
| 109 | function getThemeEntries( |
| 110 | bundledThemeEntries: ReturnType<typeof getBundledThemes>, |
no test coverage detected