UNPKG

sicua

Version:

A tool for analyzing project structure and dependencies

43 lines (42 loc) 1.83 kB
import { JSXStructure } from "../../../types"; import { StructureComplexityInfo } from "../types/deduplication.types"; /** * Finds common JSX structure between two component structures * @param struct1 First JSX structure * @param struct2 Second JSX structure * @returns Array of common JSX structures */ export declare function findCommonStructure(struct1?: JSXStructure, struct2?: JSXStructure): JSXStructure[]; /** * Calculates similarity between two JSX structures * @param common Common JSX structure * @param originals Array of original JSX structures * @returns Similarity score between 0 and 1 */ export declare function calculateStructureSimilarity(common: JSXStructure[], originals: (JSXStructure | undefined)[]): number; /** * Calculates similarity of child components between structures * @param struct1 First JSX structure * @param struct2 Second JSX structure * @returns Similarity score between 0 and 1 */ export declare function calculateChildComponentSimilarity(struct1?: JSXStructure, struct2?: JSXStructure): number; /** * Calculates style similarity between two JSX structures based on className attributes * @param struct1 First JSX structure * @param struct2 Second JSX structure * @returns Similarity score between 0 and 1 */ export declare function calculateStyleSimilarity(struct1?: JSXStructure, struct2?: JSXStructure): number; /** * Calculates the complexity of a JSX structure * @param struct JSX structure to analyze * @returns Structure complexity information */ export declare function calculateStructureComplexity(struct?: JSXStructure): StructureComplexityInfo; /** * Counts the total number of nodes in a JSX structure * @param structure Array of JSX structures * @returns Total node count */ export declare function countJSXNodes(structure: JSXStructure[]): number;