import type { BodyLayoutRatio } from '../types'; /** * 布局比例工具函数 * @description 用于解析和计算内容区与信息区的布局比例 */ /** * 解析比例字符串 * @param ratio 比例字符串,如 '7:3' * @returns [内容区比例, 信息区比例] * @example * parseLayoutRatio('7:3') // => [7, 3] * parseLayoutRatio('6:4') // => [6, 4] */ export declare const parseLayoutRatio: (ratio: BodyLayoutRatio) => [number, number]; /** * 计算百分比 * @param ratio 比例字符串,如 '7:3' * @returns { contentPercent, sidebarPercent } * @example * calculateRatioPercent('7:3') // => { contentPercent: 70, sidebarPercent: 30 } */ export declare const calculateRatioPercent: (ratio: BodyLayoutRatio) => { contentPercent: number; sidebarPercent: number; }; /** * 生成 flex 比例样式 * @param ratio 比例字符串,如 '7:3' * @param gap 间距(px) * @returns { contentStyle, sidebarStyle } */ export declare const generateRatioStyles: (ratio: BodyLayoutRatio, gap?: number) => { contentStyle: React.CSSProperties; sidebarStyle: React.CSSProperties; }; /** * 预设比例选项 */ export declare const LAYOUT_RATIO_PRESETS: { label: string; value: BodyLayoutRatio; }[];