first commit

This commit is contained in:
douboer@gmail.com
2026-03-03 13:23:14 +08:00
commit 3b7c1d558a
161 changed files with 28120 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
/**
* IMeasureAdapter — 平台测量接口(字符/容器尺寸获取)。
* Web 由 ResizeObserver + Canvas 实现;小程序由 wx.createSelectorQuery 实现。
*/
export interface IMeasureAdapter {
/** 测量单个等宽字符宽/高(像素)*/
measureChar(): { widthPx: number; heightPx: number };
/** 测量终端容器内部可用宽/高(已去除 padding像素*/
measureContainer(): { widthPx: number; heightPx: number };
/** 订阅容器尺寸变化;返回取消订阅函数 */
onResize(cb: () => void): () => void;
}