/** * Typography helpers & reference mappings for the Antaram design system. * * We rely on React Native Paper's built-in MD3 type scale for most text * rendering, but this module re-exports the variants so that custom * components can reference a single source of truth. */ // ─── Paper text variant → description mapping ─────────────────────────────────── // These correspond to the `variant` prop accepted by `` from // react-native-paper. They are listed here for documentation and // for use in custom components that need programmatic access. export interface PaperTextVariant { variant: string; description: string; } export const paperTextVariants: readonly PaperTextVariant[] = [ { variant: 'displayLarge', description: '57px / –1.25 tracking' }, { variant: 'displayMedium', description: '45px / –1.25 tracking' }, { variant: 'displaySmall', description: '36px / 0 tracking' }, { variant: 'headlineLarge', description: '32px / 0 tracking' }, { variant: 'headlineMedium', description: '28px / 0 tracking' }, { variant: 'headlineSmall', description: '24px / 0 tracking' }, { variant: 'titleLarge', description: '22px / 0 tracking' }, { variant: 'titleMedium', description: '16px / 0.15 tracking, medium weight' }, { variant: 'titleSmall', description: '14px / 0.1 tracking, medium weight' }, { variant: 'bodyLarge', description: '16px / 0.5 tracking' }, { variant: 'bodyMedium', description: '14px / 0.25 tracking' }, { variant: 'bodySmall', description: '12px / 0.4 tracking' }, { variant: 'labelLarge', description: '14px / 0.1 tracking, medium weight' }, { variant: 'labelMedium', description: '12px / 0.5 tracking, medium weight' }, { variant: 'labelSmall', description: '11px / 0.5 tracking, medium weight' }, ] as const; /** Convenience type – union of all supported Paper text variant strings */ export type PaperVariant = (typeof paperTextVariants)[number]['variant']; // ─── App-specific font family ─────────────────────────────────────────────────── // Override at the application level if a custom font is bundled. export const fontFamily = { regular: 'System', medium: 'System', bold: 'System', light: 'System', thin: 'System', } as const; /** * Default font size overrides keyed by Paper variant name. * These values extend / override what Paper provides out-of-the-box. */ export const fontSizes: Record = { displayLarge: 57, displayMedium: 45, displaySmall: 36, headlineLarge: 32, headlineMedium: 28, headlineSmall: 24, titleLarge: 22, titleMedium: 16, titleSmall: 14, bodyLarge: 16, bodyMedium: 14, bodySmall: 12, labelLarge: 14, labelMedium: 12, labelSmall: 11, };