UNPKG

asciitorium

Version:
17 lines (16 loc) 803 B
import type { TextAlignment } from '../../components/Text.js'; /** * Resolve text alignment keywords to numeric offsets. * Supports 9-position grid alignment for positioning text within a Text component. * * @param textAlign - Text alignment keyword (e.g., 'top-left', 'center', 'bottom-right') * @param parentWidth - Width of the text container * @param parentHeight - Height of the text container * @param contentWidth - Width of the text content * @param contentHeight - Height of the text content (number of lines) * @returns Object with x and y offsets for positioning the text */ export declare function resolveTextAlignment(textAlign: TextAlignment | undefined, parentWidth: number, parentHeight: number, contentWidth: number, contentHeight: number): { x: number; y: number; };