@triagly/sdk
Version:
JavaScript SDK for Triagly - Turn user feedback into GitHub issues instantly
58 lines • 1.23 kB
TypeScript
import { TriaglyConfig } from './types';
export declare class FeedbackWidget {
private config;
private container;
private isOpen;
private previouslyFocusedElement;
private focusableElements;
constructor(config: TriaglyConfig);
/**
* Initialize the widget
*/
init(): void;
/**
* Create the feedback button
*/
private createButton;
/**
* Toggle widget visibility
*/
toggle(): void;
/**
* Open the widget
*/
open(): void;
/**
* Close the widget
*/
close(reason?: 'cancel' | 'dismiss' | 'overlay' | 'programmatic'): void;
/**
* Create the widget container
*/
private createContainer;
/**
* Render Cloudflare Turnstile widget
*/
private renderTurnstileWidget;
/**
* Handle form submission
*/
private handleSubmit;
/**
* Inject widget styles
*/
private injectStyles;
/**
* Set up keyboard event handlers
*/
private setupKeyboardEvents;
/**
* Set up focus trap to keep focus within modal
*/
private setupFocusTrap;
/**
* Destroy the widget
*/
destroy(): void;
}
//# sourceMappingURL=ui.d.ts.map