UNPKG

react-trophies

Version:

Comprehensive achievement and trophy system for React apps with sound effects, notifications, theming, and visual components. Uses React, React-DOM, Sonner (toast notifications), Howler (sound effects), Zustand (state management), React-Confetti (celebrat

26 lines (25 loc) 1.11 kB
import { InitialAchievementMetrics, AchievementMetrics, AchievementDetails, SerializedAchievementConfiguration } from '../types'; interface AchievementState { isInitialized: boolean; config: SerializedAchievementConfiguration; metrics: AchievementMetrics; unlockedAchievements: string[]; previouslyAwardedAchievements: string[]; storageKey: string | null; notifications: AchievementDetails[]; initialize: (params: { config: SerializedAchievementConfiguration; initialState?: InitialAchievementMetrics & { previouslyAwardedAchievements?: string[]; }; storageKey: string; }) => void; setMetrics: (metrics: AchievementMetrics) => void; unlockAchievement: (achievementId: string) => void; markAchievementAsAwarded: (achievementId: string) => void; resetAchievements: () => void; addNotification: (notification: AchievementDetails) => void; clearNotifications: () => void; } export declare const useAchievementStore: import("zustand").UseBoundStore<import("zustand").StoreApi<AchievementState>>; export {};