import { describe, expect, it, vi } from "vite-plus/test"; import indexHtml from "../index.html?raw"; import { CUSTOM_THEMES_STORAGE_KEY, getDefaultThemeColors, getThemeColorsForMode, invalidateCustomThemes, isKnownThemePreference, resolveThemeAppearance, T3_CHAT_THEME, EMBER_THEME, GROVE_THEME, IRIS_THEME, OCEAN_THEME, THEME_APPEARANCE_MODE_STORAGE_KEY, THEME_FOLLOW_SYSTEM_STORAGE_KEY, toCanonicalThemeColor, } from "./themePalette"; const THEME_STORAGE_KEY = "t3code:theme"; // A custom theme that omits chrome falls back to the runtime default, so the // boot copy of that default stays derived from the real palette. const DEFAULT_DARK_CHROME = getDefaultThemeColors("dark").chrome; const bootScript = (() => { const match = indexHtml.match(/