import { NodeItem, NodesGroups, WrappedNode } from './type';

/**
 * 获取元素的selector路径
 * @param element - 目标HTML元素
 * @returns 元素的selector路径，如果无法获取则返回null
 */
export declare function getElementnodePath(element: HTMLElement): string | null;
export declare const invalidateNodePathCache: (container: HTMLElement | null) => void;
export declare function getElementById(id: string, container: HTMLElement | null): HTMLElement | null;
/**
 * 通过nodePath获取元素
 * @param nodePath - nodePath路径
 * @param container - 搜索的容器元素
 * @returns 匹配的元素，如果未找到则返回null
 */
export declare function getElementBynodePath(nodePath: string, container: HTMLElement | null): HTMLElement | null;
export declare const getRenderDomId: (element: NodeItem) => string;
export declare const insertNode: (node: WrappedNode, container: any, callback: any) => void;
export declare const insertDomByNode: (node: NodeItem, element: any, container: any) => void;
export declare const setElementAttrByNode: (el: HTMLElement, node: NodeItem) => void;
/**
 * 清除由 setElementAttrByNode 设置的属性
 * @param el - 目标HTML元素
 */
export declare const removeElementAttrsByNode: (el: HTMLElement) => void;
export declare const getTextNodeIndex: (node: Node) => number;
export declare const getNodeInfoByElement: (element: HTMLElement) => NodeItem | null;
export declare const onlyHasNode: (element: HTMLElement) => boolean;
export declare const getNodeByElement: (element: HTMLElement) => NodeItem[];
export declare const nodesGroups2Nodes: (nodesGroups: NodesGroups[]) => (NodeItem & {
    color: string;
    dataGroupKey: string;
})[];
/**
 * 颜色转rgba
 * @param color #ff0 或 #ff0000
 * @param opacity 透明度 (0-1)
 */
export declare const color2rgba: (color: string, opacity: number) => string;
interface Point {
    colIndex: number;
    rowIndex: number;
    [key: string]: any;
}
export declare function groupRectanglesAdvanced(points: Point[]): Point[][];
export declare function findMinMaxPoints(points: Point[]): {
    min: Point | null;
    max: Point | null;
};
/**nodes变为text缩写 */
export declare const abbrNodes2TextNode: (nodes: NodeItem[], allNodes: NodeItem[]) => any[];
export declare const tableCellText: (item: any) => string;
/**
 * 获取表格单元格坐标（如 A0、B1）
 * 传入节点为 TD 元素时，返回列字母 + 行索引；否则返回空字符串。
 */
export declare const getTdCoordinate: (node: NodeItem) => string;
/**
 * 计算非 TD 节点的索引（subNodeSort，从 0 开始）。
 * - 若 node 已有有效索引（>=0），直接返回。
 * - 否则在 nodes 中取所有非 TD 节点的索引：
 *   - 若索引从 0 起连续，则返回最大值 + 1；
 *   - 若存在缺口，则返回从 0 开始的第一个缺失的索引。
 */
export declare const getNonTdNodeIndex: (nodes: NodeItem[], node: NodeItem) => number;
export declare const abbrNodes2Text: (nodes: NodeItem[], allNodes: NodeItem[]) => string;
/**
 * 判断是否是uuid
 * @param id
 */
export declare const isUuid: (id: any) => boolean;
/**判断是否是td节点 */
export declare const isTdNode: (node: NodeItem) => boolean;
/**
 * 处理td元素内的p标签，合并样式并删除p标签
 * @param element - td元素
 */
export declare const processTdParagraphStyles: (element: HTMLElement) => void;
export declare const delInputNodesElement: (inputNodes: any) => any;
export declare const addEmptyClass: (element: HTMLElement) => void;
export {};
