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.

10 lines 664 B
import type { FieldValues, Path } from 'react-hook-form'; import type { UseRatioLockFieldOptions } from './use-ratio-lock-field-options.js'; import type { UseRatioLockFieldReturn } from './use-ratio-lock-field-return.js'; /** * React Hook Form integration for ratio-locked fields * @param options - Configuration options including control, setValue, and field names * @returns Object with field props and lock controls */ export declare function useRatioLockField<T extends FieldValues, TNames extends readonly Path<T>[]>(options: UseRatioLockFieldOptions<T, TNames>): UseRatioLockFieldReturn<TNames[number]>; //# sourceMappingURL=use-ratio-lock-field.d.ts.map