UNPKG

ratio-lock

Version:

A TypeScript library for managing n numbers with locked ratios. When the ratio is locked, changing one value automatically adjusts all other values to maintain their proportional relationships.

20 lines 599 B
import type { FieldProps } from './field-props.js'; /** * Return type for useRatioLockField hook * @typeParam TNames - Union of field name literals */ export interface UseRatioLockFieldReturn<TNames extends string = string> { /** Field props for each managed field */ fields: { [K in TNames]: FieldProps<K>; }; /** Current lock state */ isLocked: boolean; /** Lock the ratio */ lock: () => void; /** Unlock the ratio */ unlock: () => void; /** Toggle lock state */ toggle: () => void; } //# sourceMappingURL=use-ratio-lock-field-return.d.ts.map