/** * Internal dependencies */ import type { WPFormat } from '../register-format-type'; interface VirtualAnchorElement { getBoundingClientRect: () => DOMRect; contextElement: HTMLElement; } /** * This hook, to be used in a format type's Edit component, returns the active * element that is formatted, or a virtual element for the selection range if * no format is active. The returned value is meant to be used for positioning * UI, e.g. by passing it to the `Popover` component via the `anchor` prop. * * @param obj Named parameters. * @param obj.editableContentElement The element containing the editable content. * @param obj.settings The format type's settings. * @return The active element or selection range. */ export declare function useAnchor({ editableContentElement, settings, }: { editableContentElement: HTMLElement | null; settings?: WPFormat; }): Element | VirtualAnchorElement | undefined | null; export {}; //# sourceMappingURL=use-anchor.d.ts.map