asciitorium
Version:
an ASCII CLUI framework
14 lines (13 loc) • 512 B
TypeScript
import type { Alignment } from '../types.js';
/**
* Resolve alignment to numeric offsets.
* Handles 9-value positioning system with shorthand support:
* - Full: 'top-left', 'top-center', 'top-right', etc.
* - Shorthand: 'left', 'right', 'top', 'bottom', 'center'
*
* Works consistently across all layout types.
*/
export declare function resolveAlignment(align: Alignment | undefined, parentWidth: number, parentHeight: number, childWidth: number, childHeight: number): {
x: number;
y: number;
};