Repository navigation
Releases
Releases · zakhmsa/MakeenCore
v1.3.1 - Fix AYAHS duration mode working-day calculation
Fixed
- planByDuration with unit: 'AYAHS' working-day calculation: getEffectiveMemorizationDays now converts durationDays (calendar window) into working study days via getStudyDaysWithinDuration(durationDays, daysPerWeek) before subtracting holidays, consolidation days, and catch-up days (and respects endDate), matching the LINES duration path.
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.
v1.1.0 — Horizon, Snapshot/Resume, Hijri
✨ Features (all additive & backward compatible)
- Configurable Major Review Horizon —
HorizonConstraintcompleted as a sliding floor consumed byLoopingStrategy. Bound the major review to the most recently memorized N lines viaaddMajorReview(amount, start?, end?, { horizonLines })or DTOconfig.horizonLines. - Snapshot & Resume — persist/restore live plan state for intermittent students:
TrackManager.exportSnapshot()/importSnapshot(),BaseTrack.exportState()/importState(), and thePlanSnapshottype. Full history is preserved so the minor-review window stays correct. - Opt-in Hijri dates — zero-dependency
HijriDateUtils(Umm al-Qura viaIntl). SetincludeHijri: trueto attachhijriDateto eachPlanDay/PlanDayDTO.
✅ Quality
- 63/63 tests passing (11 new).
- Docs updated (README, README.ar, USER_GUIDE, API contracts).
npm: @zakhm_sa/makeen-core@1.1.0
v1.0.0
First Release
- Multi-track planning engine
- Hifz, Minor Review, Major Review tracks
- Rule-based planning with pedagogical constraints
- Excel/PDF export