import { ElementAttribute, ElementMeta, ElementPosition } from './types'; /** 截断过长文本,中间省略 */ export declare function truncateHtml(html: string, maxChars?: number): string; /** CSS.escape 兜底,便于 Node 单测环境 */ export declare function escapeIdent(value: string): string; /** 生成单个节点的 path 段(不含兄弟序号):tag#id.class1 class2 */ export declare function pathSegment(el: Element): string; /** * 自元素向上拼 PATH(跳过 inspect UI;不含 html/body)。 * 重复兄弟追加 [n](1-based),对齐 Cursor。 */ export declare function buildDomPath(el: Element): string; /** POSITION:保留小数(如 514.4375px) */ export declare function getElementPosition(el: Element): ElementPosition; /** ELEMENT:开标签摘要(tag + id/class),对齐 Cursor 卡片 */ export declare function serializeOpeningTag(el: Element): string; /** @deprecated 兼容旧名:现为开标签摘要 */ export declare function serializeHtmlElement(el: Element): string; export declare function listAttributes(el: Element): ElementAttribute[]; export declare function getComputedStyleMap(el: Element): Record; export declare function getInnerText(el: Element): string; export declare function buildElementMeta(el: Element): ElementMeta; /** * 粘贴到外部 AI 对话框的元素卡片纯文本: * 摘要 + ELEMENT / PATH / ATTRIBUTES / COMPUTED STYLES / POSITION & SIZE / INNER TEXT * + 修改意见引导;键值对同一行以减少换行。 */ export declare function formatElementMetaText(meta: ElementMeta): string;