import { type RefObject } from 'react'; export type Direction = 'ltr' | 'rtl'; /** * Resolves the effective writing direction for `ref`'s element by walking its * ancestor chain and reacting to `dir` attribute mutations along the way. * * Radix primitives default to `dir="ltr"` when no `DirectionProvider` is * present and then stamp `dir="ltr"` onto the rendered element — which * overrides any inherited `dir="rtl"` from a parent. Pass the result of this * hook to the primitive's `dir` prop so the logical layout flips correctly. */ export declare function useDirection(ref: RefObject): Direction; /** * Resolves the document-level writing direction. Use for components whose * Root is a pure context provider (no DOM element to ref) — e.g. Radix * DropdownMenu/ContextMenu/Menubar Roots. */ export declare function useDocumentDirection(): Direction; //# sourceMappingURL=use-direction.d.ts.map