export interface UseIsTruncatedOptions { /** Measure vertical clipping (`line-clamp-N`) instead of the single-line ellipsis. */ multiline?: boolean; } /** * Tracks whether an element's text is ACTUALLY clipped — the condition for * offering a "full value" tooltip. Text that fits needs no tooltip, and showing * one anyway just repeats what the user is already reading. * * Three things can change the answer, and all three are watched: the box * resizing (`ResizeObserver`), the text itself changing, and the measured * ELEMENT changing. None of them implies the others — new text inside a * width-constrained box leaves the box exactly as it was, so the observer never * fires; and a caller that swaps between render branches (adornment vs plain) * mounts a different node under the same text, which a `useRef` would leave * measured against the old, detached node. Pass the rendered value as `value`. * * `ref` is a CALLBACK ref, not a `RefObject` — that is what makes the element * itself a dependency. Attach it exactly like a normal ref; there is no * `.current` to read. * * ```tsx * const { ref, isTruncated } = useIsTruncated(title) * *

{title}

*
* ``` */ export declare function useIsTruncated(value: unknown, options?: UseIsTruncatedOptions): { ref: (node: T | null) => void; isTruncated: boolean; }; //# sourceMappingURL=use-is-truncated.d.ts.map