export type WritingMode = "horizontal-tb" | "vertical-rl" | "vertical-lr" | "sideways-rl" | "sideways-lr"; export type DocumentDirection = "ltr" | "rtl"; export declare enum ContentFlow { LeftToRight = "ltr", RightToLeft = "rtl", TopToBottom = "ttb", BottomToTop = "btt" } export declare enum TextFlow { LeftToRight = "ltr", RightToLeft = "rtl" } /** * Detects the writing mode and direction of an element. * * @remarks * This hook observes changes to the `dir` attribute (on body/document) and `writing-mode` style (on the element). * It returns the current writing mode, text direction, and derived content/text flow. * * @typeParam E - The element type. * @param ref - The element to observe (defaults to document.body). * @returns An object containing `writingMode`, `direction`, `contentFlow`, and `textFlow`. * * @example * ```tsx * const { writingMode, direction } = useWritingMode(ref.current); * ``` */ export declare function useWritingMode(ref?: E | null): { contentFlow: ContentFlow.LeftToRight; textFlow: TextFlow.LeftToRight; writingMode: WritingMode; direction: DocumentDirection; } | { contentFlow: ContentFlow.TopToBottom; textFlow: TextFlow.LeftToRight; writingMode: WritingMode; direction: DocumentDirection; } | { contentFlow: ContentFlow.TopToBottom; textFlow: TextFlow.LeftToRight; writingMode: WritingMode; direction: DocumentDirection; } | { contentFlow: ContentFlow.TopToBottom; textFlow: TextFlow.LeftToRight; writingMode: WritingMode; direction: DocumentDirection; } | { contentFlow: ContentFlow.BottomToTop; textFlow: TextFlow.LeftToRight; writingMode: WritingMode; direction: DocumentDirection; } | { contentFlow: ContentFlow.RightToLeft; textFlow: TextFlow.RightToLeft; writingMode: WritingMode; direction: DocumentDirection; } | { contentFlow: ContentFlow.BottomToTop; textFlow: TextFlow.RightToLeft; writingMode: WritingMode; direction: DocumentDirection; } | { contentFlow: ContentFlow.BottomToTop; textFlow: TextFlow.RightToLeft; writingMode: WritingMode; direction: DocumentDirection; } | { contentFlow: ContentFlow.BottomToTop; textFlow: TextFlow.RightToLeft; writingMode: WritingMode; direction: DocumentDirection; } | { contentFlow: ContentFlow.TopToBottom; textFlow: TextFlow.LeftToRight; writingMode: WritingMode; direction: DocumentDirection; };