import type { SimilarComponent, ComponentAnalysisResult } from './index.js'; /** * Categorized differences between a matched component and Figma design * @property {DifferenceDetail[]} styling - Visual differences (Tailwind classes, inline styles, theme tokens) * @property {DifferenceDetail[]} structural - JSX hierarchy differences (elements, nesting, root element changes) * @property {DifferenceDetail[]} behavioral - Interaction differences (hooks, event handlers, client/server rendering) * @property {DifferenceDetail[]} props - Interface/prop definition differences (new props, type changes) */ export interface ComponentDifferences { styling: DifferenceDetail[]; structural: DifferenceDetail[]; behavioral: DifferenceDetail[]; props: DifferenceDetail[]; } /** * Details about a specific difference between components * @property {string} description - Explanation of the difference * @property {'major'|'minor'|'moderate'} severity - Impact level: 'minor' (1pt), 'moderate' (3pts), 'major' (5pts) * @property {boolean} isBackwardCompatible - Whether existing code using the component would still work after this change */ export interface DifferenceDetail { description: string; severity: 'major' | 'minor' | 'moderate'; isBackwardCompatible: boolean; } /** * Analyzes differences between matched component and Figma design. * * @param matchedComponent - The existing component to compare against * @param figmaCode - The Figma-generated React code * @param _figmaMetadata - Reserved for future use (e.g., component hierarchy analysis). * Currently unused but kept in the signature to avoid a breaking change once metadata * analysis is implemented. */ export declare function analyzeComponentDifferences(matchedComponent: SimilarComponent, figmaCode: string, _figmaMetadata: string): ComponentDifferences; /** * Determines the appropriate action based on differences * Uses type of difference + impact assessment */ export declare function determineAction(matchedComponent: SimilarComponent, differences: ComponentDifferences): ComponentAnalysisResult;