# Changelog

All notable changes to Commerce Learning Hub will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.0.0] - 2026-07-12

## [1.1.0] - 2026-07-12

### Added (Phase 2)
- Premium hero section with gradient mesh background and stats
- Mega menu navigation with 4 categorized module columns
- Mobile slide-out sidebar drawer with backdrop overlay
- Dynamic bookmarks section in sidebar (reads from localStorage)
- Dynamic recent history section in sidebar
- Category grid cards with hover animations
- Call-to-action section with mesh gradient
- Back-to-top floating button (appears on scroll)
- PWA manifest (`manifest.webmanifest`) for installability
- Staggered entrance animations for grid items
- Smooth theme transition effect
- Keyboard shortcut: `/` to focus search
- Clear actions for bookmarks and history
- Enhanced footer with brand description and social links
- Dedicated mega menu stylesheet (`mega-menu.css`)

### Changed
- Header search now styled as pill input with icon
- Sidebar sections now collapsible with clear actions
- Footer restructured into 4-column grid with brand column
- Mobile menu toggle now uses dedicated button style

### Added
- Initial project structure
- Design system (CSS variables, typography, color palette)
- Dark/Light theme support with persistence
- Global navigation (header, sidebar, mega menu)
- Core documentation (README, Architecture, Roadmap, etc.)
- Configuration system (`config/config.js`)
- Base HTML templates (index, 404)
- SEO foundations (robots.txt, sitemap.xml, meta tags)
- Cloudflare Pages deployment configuration (`_headers`)
- Accessibility foundations (skip links, ARIA, focus styles)

### Planned
- Phase 2: Homepage, header, footer, sidebar, responsive layout
- Phase 3: Complete CSS system, animations, utilities
- Phase 4: Global JavaScript framework
- Phase 5+: One module per phase (30 modules total)

## [1.2.0] - 2026-07-12

### Added (Phase 3)
- Print stylesheet (`print.css`) with optimized layouts for reports
- Extended form components: input groups, validation states, range sliders, toggle switches, custom checkboxes/radios, file upload
- Interactive components: tabs (horizontal + vertical), accordions, tooltips (4 positions), progress bars (determinate + indeterminate), steppers, info boxes
- Loading states: skeleton screens (text, card, chart, table), spinner variants, progress circles, dot loaders, button loading state
- High-contrast accessibility theme (WCAG AAA contrast ratios)
- Theme switcher UI with 3 options (light/dark/high-contrast)
- Advanced utility classes: text decoration, whitespace, word break, user select, pointer events, aspect ratio, print utilities
- Loading helpers in `CLH.Utils`: `setProgress()`, `showLoading()`, `hideLoading()`

### Changed
- `ThemeManager` now cycles through 3 themes (light → dark → high-contrast)
- All interactive components have full keyboard navigation and ARIA support
- Tooltips now accessible via focus (not just hover)
- Print styles hide navigation and optimize for paper output

## [1.4.0] - 2026-07-12

### Added (Phase 5)
- **Financial Calculator Hub** — first complete module with 8 calculators:
  - EMI Calculator with amortization schedule
  - SIP Calculator with year-by-year growth
  - Lump Sum Investment Calculator
  - Fixed Deposit Calculator (multiple compounding frequencies)
  - Recurring Deposit Calculator
  - GST Calculator (add/remove modes, CGST/SGST split)
  - Percentage Calculator (3 modes)
  - Currency Converter (live rates via frankfurter.app)
- Each calculator includes:
  - Input validation with clear error messages
  - Formula display with variable substitution
  - Step-by-step calculation breakdown
  - Interpretation of results
  - Interactive Chart.js visualizations
  - CSV export of schedules
  - PDF export, print support
  - Copy-to-clipboard actions
- Deep linking via URL hash (e.g., `/modules/financial-calculator/#sip`)
- Sidebar quick navigation synced with tabs
- Bookmark integration per module
- History tracking per module visit
- Responsive 2-column layout (form + results)
- Print-optimized styles

### Changed
- Citation Generator now links to external `citeflow.pages.dev`
- Module registry marks `financial-calculator` as `status: 'live'`
- Added `external: true` flag for off-site modules

## [1.3.0] - 2026-07-12

### Added (Phase 4)
- **Service Worker** (`sw.js`) with cache-first for static assets, network-first for HTML
- **Offline fallback page** (`offline.html`) with themed UI
- **Modular core architecture** — split `app.js` into focused modules under `/assets/js/core/`
- **Event Bus** (`CLH.Events`) — pub/sub for cross-module communication
- **Dynamic Library Loader** (`CLH.Loader`) — loads CDN scripts on demand with deduplication
- **API Manager** (`CLH.Api`) — fetch wrapper with retry, timeout, caching, abort support
- **Form Validator** (`CLH.Validator`) — rule-based validation with real-time feedback
- **Export Manager** (`CLH.Export`) — unified PDF/CSV/JSON/PNG/Excel/print/copy
- **Chart.js Wrapper** (`CLH.Charts`) — theme-aware chart factory (line, bar, doughnut, pie, radar)
- **Fuse.js Search** (`CLH.Search`) — fuzzy search with dropdown UI, keyboard nav, recent searches
- **Module Registry** — all 30 modules registered in `config.js` for search indexing
- **Utilities** — throttle, uid, clone added to `CLH.Utils`

### Changed
- `app.js` is now an orchestrator that loads and initializes core modules
- Theme changes automatically refresh all active charts
- Search now indexes all 30 modules with fuzzy matching
- Storage uses namespaced keys (`clh:`) to avoid collisions
- Toast notifications have hover-pause and max-visible cap
- API requests emit events (`api:request:start`, `:success`, `:error`, `:retry`, `:abort`)

### Fixed
- Service Worker cache versioning prevents stale assets after updates
- Search dropdown closes on Escape and outside click
- Chart.js respects current theme on creation and refresh

