/** * Fluent Grow - Predefined Themes * -------------------------------- * Complete theme definitions with expanded tokens */ import type { UnifiedThemeDefinition } from '../core/unified-theme-manager'; import { FLUENT_PALETTES } from '../colors/presets'; // Base tokens shared across themes const BASE_TYPOGRAPHY = { fontFamily: { sans: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif', mono: '"SF Mono", Monaco, "Cascadia Code", "Roboto Mono", Consolas, "Courier New", monospace', display: '"Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif' }, fontSize: { xs: '0.75rem', // 12px sm: '0.875rem', // 14px base: '1rem', // 16px lg: '1.125rem', // 18px xl: '1.25rem', // 20px '2xl': '1.5rem', // 24px '3xl': '1.875rem', // 30px '4xl': '2.25rem', // 36px '5xl': '3rem' // 48px }, fontWeight: { thin: '100', light: '300', normal: '400', medium: '500', semibold: '600', bold: '700', extrabold: '800', black: '900' }, lineHeight: { none: '1', tight: '1.25', snug: '1.375', normal: '1.5', relaxed: '1.625', loose: '2' }, letterSpacing: { tighter: '-0.05em', tight: '-0.025em', normal: '0', wide: '0.025em', wider: '0.05em', widest: '0.1em' } }; const BASE_SPACING = { '0': '0', 'px': '1px', '0.5': '0.125rem', // 2px '1': '0.25rem', // 4px '1.5': '0.375rem', // 6px '2': '0.5rem', // 8px '2.5': '0.625rem', // 10px '3': '0.75rem', // 12px '3.5': '0.875rem', // 14px '4': '1rem', // 16px '5': '1.25rem', // 20px '6': '1.5rem', // 24px '7': '1.75rem', // 28px '8': '2rem', // 32px '9': '2.25rem', // 36px '10': '2.5rem', // 40px '12': '3rem', // 48px '14': '3.5rem', // 56px '16': '4rem', // 64px '20': '5rem', // 80px '24': '6rem', // 96px '32': '8rem', // 128px '40': '10rem', // 160px '48': '12rem', // 192px '56': '14rem', // 224px '64': '16rem' // 256px }; const BASE_BORDERS = { radius: { none: '0', sm: '0.125rem', // 2px base: '0.25rem', // 4px md: '0.375rem', // 6px lg: '0.5rem', // 8px xl: '0.75rem', // 12px '2xl': '1rem', // 16px '3xl': '1.5rem', // 24px full: '9999px' }, width: { none: '0', thin: '1px', base: '2px', thick: '4px' } }; const LIGHT_SHADOWS = { sm: '0 1px 2px 0 rgb(0 0 0 / 0.05)', base: '0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)', md: '0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)', lg: '0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)', xl: '0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)', '2xl': '0 25px 50px -12px rgb(0 0 0 / 0.25)', inner: 'inset 0 2px 4px 0 rgb(0 0 0 / 0.05)', none: 'none' }; const DARK_SHADOWS = { sm: '0 1px 2px 0 rgb(0 0 0 / 0.3)', base: '0 1px 3px 0 rgb(0 0 0 / 0.4), 0 1px 2px -1px rgb(0 0 0 / 0.4)', md: '0 4px 6px -1px rgb(0 0 0 / 0.4), 0 2px 4px -2px rgb(0 0 0 / 0.4)', lg: '0 10px 15px -3px rgb(0 0 0 / 0.4), 0 4px 6px -4px rgb(0 0 0 / 0.4)', xl: '0 20px 25px -5px rgb(0 0 0 / 0.4), 0 8px 10px -6px rgb(0 0 0 / 0.4)', '2xl': '0 25px 50px -12px rgb(0 0 0 / 0.5)', inner: 'inset 0 2px 4px 0 rgb(0 0 0 / 0.3)', none: 'none' }; const BASE_ANIMATIONS = { duration: { instant: '0ms', fast: '150ms', base: '250ms', slow: '350ms', slower: '500ms' }, easing: { linear: 'linear', ease: 'ease', 'ease-in': 'cubic-bezier(0.4, 0, 1, 1)', 'ease-out': 'cubic-bezier(0, 0, 0.2, 1)', 'ease-in-out': 'cubic-bezier(0.4, 0, 0.2, 1)', bounce: 'cubic-bezier(0.68, -0.55, 0.265, 1.55)' } }; // Fluent Light Theme export const FLUENT_LIGHT: UnifiedThemeDefinition = { name: 'fluent-light', tokens: { mode: 'light', typography: BASE_TYPOGRAPHY, spacing: BASE_SPACING, borders: BASE_BORDERS, shadows: LIGHT_SHADOWS, animations: BASE_ANIMATIONS }, colorPalettes: FLUENT_PALETTES }; // Fluent Dark Theme export const FLUENT_DARK: UnifiedThemeDefinition = { name: 'fluent-dark', tokens: { mode: 'dark', typography: BASE_TYPOGRAPHY, spacing: BASE_SPACING, borders: BASE_BORDERS, shadows: DARK_SHADOWS, animations: BASE_ANIMATIONS }, colorPalettes: { // Inverted palettes for dark mode primary: FLUENT_PALETTES.primary, secondary: FLUENT_PALETTES.secondary, neutral: FLUENT_PALETTES.neutral, success: FLUENT_PALETTES.success, info: FLUENT_PALETTES.info, warning: FLUENT_PALETTES.warning, danger: FLUENT_PALETTES.danger } }; // High Contrast Theme export const HIGH_CONTRAST: UnifiedThemeDefinition = { name: 'high-contrast', tokens: { mode: 'light', typography: { ...BASE_TYPOGRAPHY, fontWeight: { ...BASE_TYPOGRAPHY.fontWeight, normal: '500', // Bolder for better contrast medium: '600', semibold: '700', bold: '800' } }, spacing: BASE_SPACING, borders: { ...BASE_BORDERS, width: { none: '0', thin: '2px', // Thicker borders base: '3px', thick: '5px' } }, shadows: { ...LIGHT_SHADOWS, // Stronger shadows for high contrast base: '0 2px 4px 0 rgb(0 0 0 / 0.3)', md: '0 4px 8px 0 rgb(0 0 0 / 0.3)', lg: '0 8px 16px 0 rgb(0 0 0 / 0.3)' }, animations: BASE_ANIMATIONS }, colorPalettes: FLUENT_PALETTES }; // GitHub Theme export const GITHUB_LIGHT: UnifiedThemeDefinition = { name: 'github-light', tokens: { mode: 'light', typography: { ...BASE_TYPOGRAPHY, fontFamily: { sans: '-apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif', mono: 'ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace', display: '-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif' } }, spacing: BASE_SPACING, borders: { radius: { ...BASE_BORDERS.radius, base: '6px', // GitHub style md: '6px', lg: '6px' }, width: BASE_BORDERS.width }, shadows: LIGHT_SHADOWS, animations: BASE_ANIMATIONS }, colorPalettes: FLUENT_PALETTES }; // VS Code Dark Theme export const VSCODE_DARK: UnifiedThemeDefinition = { name: 'vscode-dark', tokens: { mode: 'dark', typography: { ...BASE_TYPOGRAPHY, fontFamily: { sans: '"Segoe UI", Tahoma, sans-serif', mono: 'Consolas, "Courier New", monospace', display: '"Segoe UI", Tahoma, sans-serif' } }, spacing: BASE_SPACING, borders: { radius: { ...BASE_BORDERS.radius, base: '0', // VS Code sharp corners md: '0', lg: '2px' }, width: BASE_BORDERS.width }, shadows: DARK_SHADOWS, animations: BASE_ANIMATIONS }, colorPalettes: FLUENT_PALETTES }; // Export all themes export const PREDEFINED_THEMES = [ FLUENT_LIGHT, FLUENT_DARK, HIGH_CONTRAST, GITHUB_LIGHT, VSCODE_DARK ];