UNPKG

vue-devui

Version:

DevUI components based on Vite and Vue3

45 lines (44 loc) 3.88 kB
import type { OutputFormat, ExpandDirection, LineSide, IncrementCodeInsertDirection, CommentPosition, ILineNumberTdMap } from './code-review-types'; export declare function notEmptyNode(node: HTMLElement): boolean; export declare function insertIncrementLineToPage(referenceDom: HTMLElement, trNodes: HTMLTableRowElement[], direction: IncrementCodeInsertDirection): void; export declare function ifRemoveExpandLineForDoubleColumn(expandDom: HTMLElement, newExpandDom: HTMLTableRowElement, direction: IncrementCodeInsertDirection): boolean; export declare function ifRemoveExpandLine(expandDom: HTMLElement, newExpandDom: HTMLTableRowElement, direction: IncrementCodeInsertDirection): boolean; export declare function updateExpandLineCount(expandDom: HTMLElement, newExpandDom: HTMLElement): void; export declare function parseDiffCode(container: HTMLElement, code: string, outputFormat: OutputFormat, options: Record<string, any>, isAddCode?: boolean): void; export declare function setLineNumberInDataset(trNode: HTMLElement, prevL: number, prevR: number, nextL: number, nextR: number): void; export declare function updateExpandUpDownButton(trNode: HTMLElement): void; export declare function updateLineNumberInDatasetForDoubleColumn(trNode: HTMLElement, expandThreshold: number, position: 'top' | 'bottom' | 'middle', updateExpandButton?: boolean): boolean; export declare function updateLineNumberInDataset(trNode: HTMLElement, expandThreshold: number, position: 'top' | 'bottom' | 'middle', updateExpandButton?: boolean): boolean; export declare function getLineNumberFromDataset(expandDom: HTMLElement, expandThreshold: number): (number | undefined)[]; export declare function insertNode(parent: HTMLElement, child: HTMLElement): void; export declare function addExpandButton(parentNode: HTMLElement, className: string, icon: string): void; export declare function attachToggleButton(dom: HTMLElement, outputFormat: OutputFormat): void; export declare function attachExpandUpDownButton(parentNode: HTMLElement, direction: ExpandDirection): void; export declare function addCommentToPageForSingleColumn(lineHost: HTMLElement, commentDom: HTMLElement, lineSide: LineSide): void; export declare function addCommentToPageForDoubleColumn(lineHost: HTMLElement, commentDom: HTMLElement, lineSide: LineSide): void; export declare function findReferenceDomForSingleColumn(parentNode: HTMLElement, lineNumber: number, lineSide: LineSide): HTMLTableRowElement | undefined; export declare function findReferenceDomForDoubleColumn(parentNode: HTMLElement, lineNumber: number, lineSide: LineSide): HTMLTableRowElement | undefined; export declare function findParentTrNode(node: HTMLElement | null): any; export declare function clearCommentChecked(checkedTdNodes: HTMLElement[]): void; export declare function parseCodeToSingle(container: HTMLElement, code: string, options: Record<string, any>): void; export declare function getLineNumberTdMap(trNodes: HTMLElement[]): { left: ILineNumberTdMap; right: ILineNumberTdMap; }; export declare function getLineNumberMap(trNodes: HTMLElement[]): CommentPosition[]; export declare function getDoubleCheckedNumberAndCodes(checkedTdNodes: HTMLElement[]): { lefts: number[]; rights: number[]; codes: { leftCode: string[]; rightCode: string[]; }; }; export declare function getSingleCheckedNumberAndCode(checkedTdNodes: HTMLElement[]): { lefts: number[]; rights: number[]; codes: string[]; }; export declare function addCommentCheckedForDouble(trNode: HTMLElement, leftMinNum: number, leftMaxNum: number, rightMinNum: number, rightMaxNum: number): HTMLElement[]; export declare function addCommentCheckedForSingle(trNode: HTMLElement, leftMinNum: number, leftMaxNum: number, rightMinNum: number, rightMaxNum: number): HTMLElement[]; export declare function getSelectionParent(el: HTMLElement): any;