UNPKG

531 BTypeScriptView Raw
1import type { InternalMarkObj } from '../Marks';
2/** Format value align with step & marks */
3type FormatValue = (value: number) => number;
4type OffsetMode = 'unit' | 'dist';
5export type OffsetValues = (values: number[], offset: number | 'min' | 'max', valueIndex: number, mode?: OffsetMode) => {
6 value: number;
7 values: number[];
8};
9export default function useOffset(min: number, max: number, step: number, markList: InternalMarkObj[], allowCross: boolean, pushable: false | number): [FormatValue, OffsetValues];
10export {};