feedbacker-react
Version:
A drop-in React feedback system for component-level feedback capture during development and design review
39 lines • 1.17 kB
TypeScript
/**
* Screenshot Capture Utility
* Handles component screenshot capture with CORS handling
*
* Requirements: 8.1, 8.2, 8.3, 8.4, 8.5
*/
interface ScreenshotOptions {
quality?: number;
backgroundColor?: string;
scale?: number;
maxWidth?: number;
maxHeight?: number;
useCORS?: boolean;
allowTaint?: boolean;
}
interface ScreenshotResult {
success: boolean;
dataUrl?: string;
error?: string;
corsIssue?: boolean;
}
/**
* Capture screenshot of a specific element
*/
export declare function captureElementScreenshot(element: HTMLElement, options?: ScreenshotOptions): Promise<ScreenshotResult>;
/**
* Capture screenshot with retry logic and graceful degradation
*/
export declare function captureScreenshotWithFallback(element: HTMLElement, options?: ScreenshotOptions): Promise<ScreenshotResult>;
/**
* Check if screenshot capture is supported in current environment
*/
export declare function isScreenshotSupported(): boolean;
/**
* Get recommended screenshot options based on device capabilities
*/
export declare function getRecommendedOptions(): ScreenshotOptions;
export {};
//# sourceMappingURL=screenshot.d.ts.map