| 1 | import { flattenThemeColor, type MobileThemeVariables } from "./mobileTheme"; |
| 2 | |
| 3 | /** Native chip parsers need opaque hex instead of CSS rgba or platform-specific alpha order. */ |
| 4 | export function createNativeComposerTheme(theme: MobileThemeVariables) { |
| 5 | const surface = flattenThemeColor(theme["--color-composer-surface"], theme["--color-screen"]); |
| 6 | const chipBackground = flattenThemeColor(theme["--color-subtle"], surface); |
| 7 | const skillBackground = flattenThemeColor(theme["--color-inline-skill-background"], surface); |
| 8 | return { |
| 9 | text: flattenThemeColor(theme["--color-foreground"], surface), |
| 10 | placeholder: flattenThemeColor(theme["--color-placeholder"], surface), |
| 11 | chipBackground, |
| 12 | chipBorder: flattenThemeColor(theme["--color-border"], chipBackground), |
| 13 | chipText: flattenThemeColor(theme["--color-foreground"], chipBackground), |
| 14 | skillBackground, |
| 15 | skillBorder: flattenThemeColor(theme["--color-inline-skill-border"], skillBackground), |
| 16 | skillText: flattenThemeColor(theme["--color-inline-skill-foreground"], skillBackground), |
| 17 | fileTint: flattenThemeColor(theme["--color-icon-muted"], chipBackground), |
| 18 | }; |
| 19 | } |