export interface ParsedElement { symbol: string; count: number; } export interface FormulaParseResult { elements: Record; valid: boolean; error?: string; } /** `coefficient` is a full-size multiplier at the start of a hydrate segment (the 5 in CuSO4ยท5H2O). */ export type FormulaPartType = 'element' | 'subscript' | 'superscript' | 'paren' | 'dot' | 'charge' | 'coefficient'; export interface FormulaPart { type: FormulaPartType; text: string; } export declare const ATOMIC_WEIGHTS: Record; /** Parses and renders chemical formulas, computes molecular weight, and generates rich-text formula parts. */ export declare function useChemicalFormula(): { parseFormula: (formula: string) => FormulaParseResult; calculateMW: (elements: Record) => number; renderFormulaParts: (formula: string) => FormulaPart[]; };