/** * Creates an observer that monitors whether an element's content overflows its visible width. Uses * a ResizeObserver for size changes and a MutationObserver for DOM content changes. * * @returns A cleanup function that disconnects all observers. */ export declare function createOverflowObserver({ element, widthElement, onChange, }: Readonly<{ /** The element whose `scrollWidth` is measured for content size. */ element: Element; /** * Optional separate element whose `clientWidth` is used as the available width. Defaults to * `element`. Useful when `element` may be collapsed but the available width should come from a * parent. */ widthElement?: Element | undefined; onChange: (isOverflowing: boolean) => void; }>): () => void;