Skip to main content

Interface: StyleDiff

Defined in: packages/uimatch-core/src/types/index.ts:87

Style difference detected between design and implementation

Properties

autoFixable?

optional autoFixable: boolean;

Defined in: packages/uimatch-core/src/types/index.ts:109

Whether this diff can be automatically fixed Computed from patchHints availability (true if patchHints.length > 0)


meta?

optional meta: object;

Defined in: packages/uimatch-core/src/types/index.ts:111

DOM element metadata for generating precise selectors

class?

optional class: string;

cssSelector?

optional cssSelector: string;

height?

optional height: number;

id?

optional id: string;

tag

tag: string;

testid?

optional testid: string;

patchHints?

optional patchHints: PatchHint[];

Defined in: packages/uimatch-core/src/types/index.ts:104

Patch hints for fixing the differences


priorityScore?

optional priorityScore: number;

Defined in: packages/uimatch-core/src/types/index.ts:123

Priority score for fix recommendations (0-100, higher = more important) Based on: layout impact, element prominence, token usage, severity


properties

properties: Record<string, {
actual?: string;
delta?: number;
expected?: string;
expectedToken?: string;
unit?: string;
}>;

Defined in: packages/uimatch-core/src/types/index.ts:91

Property-level differences


scope?

optional scope: DiffScope;

Defined in: packages/uimatch-core/src/types/index.ts:128

Scope of this diff in DOM hierarchy Used for staged checking to prioritize parent → self → children validation


selector

selector: string;

Defined in: packages/uimatch-core/src/types/index.ts:89

CSS selector for the element (e.g., "div.w-full", "[data-testid='button']")


severity

severity: "low" | "medium" | "high";

Defined in: packages/uimatch-core/src/types/index.ts:102

Overall severity of differences