Repository navigation
v1.3.0 - First-class AYAHS daily amount unit
Changelog
All notable changes to @zakhm_sa/makeen-core are documented in this file.
[1.3.0] - 2026-11-26
Added
- First-class
AYAHSdaily amount unit forHIFZ:- DTO (
MakeenEngine.generatePlan):TrackConfigDTO.amountUnitnow supports'AYAHS'forHIFZtracks (amountUnit: 'AYAHS', amountValue: N). Rejects'AYAHS'on review tracks (MINOR_REVIEW/MAJOR_REVIEW) with a typedPlanError(INVALID_INPUT). - Builder (
PlanBuilder):addHifz(amount, start, end?, { unit?: 'LINES' | 'AYAHS' })and convenience aliasaddHifzByAyahs(ayahsPerDay, start, end?).planByDailyAmount({ from, to, dailyLines?, dailyAyahs?, unit? })and convenience aliasplanByDailyAyahs({ from, to, dailyAyahs }).planByDuration({ from, to, durationDays, unit?: 'LINES' | 'AYAHS' })derivesdailyAyahs = ceil(totalAyahsInRange / effectiveWorkingDays)accounting for holidays, consolidation days, and catch-up days, and exposes the derived amount viabuilder.getDerivedDailyAmount()/manager.getDerivedDailyAmount().
- Surah completion in
AYAHSmode:SurahCompletionConfig.maxOverflowAyahs?: number(default2). Completes the active surah on the same day if the remaining ayahs are<= maxOverflowAyahsand marksoverflowReason: 'SURAH_COMPLETION'. (maxOverflowLinesis ignored inAYAHSmode). - Optional line guard (
ScheduleConfig.maxLinesPerDay): Hard line cap inAYAHSmode soNlong ayahs cannot produce an oversized lesson; stops at the last whole ayah that fits (minimum 1 ayah — never emits an empty lesson) and records'LINE_GUARD'inappliedRules. - Output fields (
PlanEvent.data&PlanEventDTO):ayahsCount: numberon every memorization and review event (inclusive count of whole ayahs in traversal direction).requestedAyahs?: numberandoverflowAyahs?: numberonHIFZevents inAYAHSmode.
QuranRepository/QuranRepositoryOptimizedhelpers:countAyahs(start, end, direction?)andadvanceByAyahs(location, n, direction?, bound?).
- DTO (
Guaranteed Backwards Compatibility
- Zero behavior or output coordinate changes for existing
LINESandPAGESplans. - Minor review (both lesson-count and
minorReviewPagesCountmodes) and major review operate over canonical index ranges and remain 100% compatible withAYAHSHifz tracks.