@gravatar-com/quick-editor
Version:
A lightweight library to provide seamless Gravatar profile management for third-party sites
37 lines • 1.3 kB
TypeScript
declare const ScopeList: readonly ["about", "avatars", "verified-accounts", "links", "interests", "contact-info", "wallet", "photos", "design", "privacy"];
export type Scope = (typeof ScopeList)[number][];
export type ProfileUpdatedType = 'avatar_updated' | 'profile_updated';
export type Open = (email?: string) => boolean;
export type Close = () => void;
export type IsOpen = () => boolean;
export type OnProfileUpdated = (type: ProfileUpdatedType) => void;
export type OnOpened = () => void;
export type OnClosed = () => void;
export type QuickEditorCoreOptions = Partial<{
email: string;
scope: Scope;
locale: string;
onProfileUpdated: OnProfileUpdated;
onOpened: OnOpened;
onClosed: OnClosed;
utm?: string;
}>;
export declare class GravatarQuickEditorCore {
_name: string;
_email: string;
_scope: Scope;
_locale: string;
_onProfileUpdated: OnProfileUpdated;
_onOpened: OnOpened;
_onClosed: OnClosed;
_utm: string;
_window: Window | null;
constructor({ email, scope, locale, onProfileUpdated, onOpened, onClosed, utm }: QuickEditorCoreOptions);
open: Open;
close: Close;
isOpen: IsOpen;
_getName(): string;
_onMessage(event: MessageEvent): void;
}
export {};
//# sourceMappingURL=quick-editor-core.d.ts.map