import type { iosTokens } from "@jobber/design"; export interface AtlantisThemeContextValue { /** * The selected theme. */ readonly theme: Theme; /** * The resolved theme used to select tokens. */ readonly effectiveTheme: EffectiveTheme; /** * The design tokens for the current theme. */ readonly tokens: typeof iosTokens; /** * Change the current theme globally. */ readonly setTheme: (theme: Theme) => void; } export interface AtlantisThemeContextProviderProps { /** * The children to render. */ readonly children: React.ReactNode; /** * Control the selected theme for this provider. */ readonly theme?: Theme; /** * Called when children request a selected theme change through setTheme. */ readonly onThemeChange?: (theme: Theme) => void; /** * Force the theme for this provider to always be the same as the provided theme. Useful for sections that should remain the same theme regardless of the rest of the application's theme. * This is dangerous because it forces the subtree's rendered tokens while preserving the selected * theme semantics from the nearest non-forced provider. Calls to setTheme inside the forced subtree * still update the selected theme upstream. */ readonly dangerouslyOverrideTheme?: EffectiveTheme; } export type Theme = "system" | EffectiveTheme; export type EffectiveTheme = "light" | "dark";