export type UnitCategory = 'weight' | 'length' | 'temperature' | 'glucose'; export interface UnitDef { id: string; category: UnitCategory; /** Multiplier to the category base unit. */ factor: number; /** Additive offset to the base unit (non-zero only for temperature). */ offset: number; } export declare const UNITS: Record; export declare const UNITS_BY_CATEGORY: Record; export declare const CATEGORIES: UnitCategory[]; /** * Convert `value` from one unit to another. Both ids must belong to the same * category; mismatched categories throw (a programming error, not user input). */ export declare function convertUnits(value: number, fromId: string, toId: string): number; //# sourceMappingURL=units.d.ts.map