export type WidthMeasureMode = 'box' | 'scroll'; export interface WidthRegistry { /** * Returns a stable callback ref for `key`. Attach it to the element whose * width should be tracked. `scroll` mode measures `scrollWidth` (natural * content width, ignoring truncation); `box` measures the border box. */ register: (key: string, mode?: WidthMeasureMode) => (element: HTMLElement | null) => void; /** * Last known width per key. Keys keep their last value after the element * unmounts, so variant widths (e.g. label vs icon-only) stay available * once each variant has been rendered at least once. */ widths: Readonly>; } /** * Tracks real, rendered widths of a dynamic set of keyed elements with a * single shared ResizeObserver. Used by DynamicToolbar to drive layout * planning from measured widths instead of hard-coded estimates. */ export declare function useWidthRegistry(): WidthRegistry;