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.

7 lines 459 B
import type { FieldValues, Path, UseFormSetValue } from 'react-hook-form'; import type { RatioLock } from '../ratio-lock.js'; /** * Syncs watched values with ratio lock, propagating changes when locked */ export declare function syncRatioValues<T extends FieldValues>(watchedValues: unknown[], prevValues: number[], names: readonly Path<T>[], ratioLock: RatioLock, setFormValue: UseFormSetValue<T>): number[]; //# sourceMappingURL=sync-ratio-values.d.ts.map