import { type RefObject } from 'react'; /** * Hook to return a middle-truncated string that fits within the available width of the span's container. * Truncation respects grapheme cluster boundaries when possible (via Intl.Segmenter), * and falls back to iterating over code points where Segmenter is not available. * * The available width is computed as parentElement.offsetWidth - subtractWidth. * Measurement is done by creating an offscreen span copying relevant computed font styles * from the referenced span to ensure accurate width measurement. * * @param text - The text to truncate. * * @param ref - The ref to the span element. * * @param subtractWidth - The width to subtract from the available width. * * @param ellipsis - The ellipsis to use when truncating. * * @returns The truncated text. */ export declare const useMiddleTruncatedText: (text: string, ref: RefObject, subtractWidth?: number, ellipsis?: string) => string;