ai-debug-local-mcp
Version:
🎯 ENHANCED AI GUIDANCE v4.1.2: Dramatically improved tool descriptions help AI users choose the right tools instead of 'close enough' options. Ultra-fast keyboard automation (10x speed), universal recording, multi-ecosystem debugging support, and compreh
63 lines • 1.7 kB
TypeScript
/**
* Flutter UI Pattern Library
* Coordinate-based patterns for common Flutter UI elements
* Used when semantic tree or DOM text search fails (canvas-rendered elements)
*/
import { Page } from 'playwright';
export interface UIPattern {
name: string;
type: 'button' | 'input' | 'dropdown' | 'checkbox' | 'toggle' | 'navigation';
keywords: string[];
findStrategy: (page: Page, target: string) => Promise<{
x: number;
y: number;
} | null>;
confidence: number;
}
export interface PatternMatch {
pattern: UIPattern;
location: {
x: number;
y: number;
};
confidence: number;
}
export declare class FlutterUIPatterns {
private static patterns;
/**
* Find UI element using pattern matching
*/
static findElement(page: Page, target: string): Promise<PatternMatch[]>;
/**
* Add custom pattern for specific app
*/
static addPattern(pattern: UIPattern): void;
/**
* Detect high contrast areas (likely buttons)
*/
static detectHighContrast(imageData: ImageData): boolean;
/**
* Get all available patterns
*/
static getPatterns(): UIPattern[];
/**
* Clear all patterns (useful for testing)
*/
static clearPatterns(): void;
/**
* Generate click coordinates with slight randomization
* (to appear more human-like)
*/
static humanizeCoordinates(x: number, y: number): {
x: number;
y: number;
};
}
declare global {
interface Window {
FlutterUIPatterns: {
detectHighContrast: (imageData: ImageData) => boolean;
};
}
}
//# sourceMappingURL=flutter-ui-patterns.d.ts.map