learning_ai_common_plat/packages/celebrations/src/index.ts
Saravana Achu Mac 1ee97327ee feat(packages): create 9 NomGap-required platform packages
Create source implementations for packages imported by NomGap:
- @bytelyst/accessibility — ARIA helper functions (alertLabel, progressLabel, etc.)
- @bytelyst/celebrations — celebration engine for milestones
- @bytelyst/gentle-notifications — guilt-free notification filtering
- @bytelyst/time-references — human-friendly fasting time references
- @bytelyst/subscription-client — billing/subscription HTTP client
- @bytelyst/quick-actions — progressive disclosure UI helpers
- @bytelyst/referral-client — referral program client
- @bytelyst/marketplace-client — influencer marketplace client
- @bytelyst/org-client — B2B org management client

Made-with: Cursor
2026-03-29 22:24:02 -07:00

26 lines
691 B
TypeScript

export interface Celebration {
emoji: string;
title: string;
}
const DEFAULT_CELEBRATION: Celebration = {
emoji: '👏',
title: 'Great Job!',
};
const BY_TYPE: Record<string, Celebration> = {
session_completed: { emoji: '🎉', title: 'Fast Complete!' },
task_completed: { emoji: '✅', title: 'Well Done!' },
streak_milestone: { emoji: '🔥', title: 'Streak Milestone!' },
achievement_unlocked: { emoji: '🏆', title: 'Achievement Unlocked!' },
level_up: { emoji: '⬆️', title: 'Level Up!' },
};
export function createCelebrationEngine() {
return {
getCelebration(type: string): Celebration {
return BY_TYPE[type] ?? DEFAULT_CELEBRATION;
},
};
}