Architecture

Component Structure

src/
├── lms-calendar.ts              # Main calendar component & global types
├── components/
│   ├── Header.ts                # Navigation and view controls
│   ├── Month.ts                 # Monthly calendar grid
│   ├── Week.ts                  # Weekly time-based view
│   ├── Day.ts                   # Daily detailed view
│   ├── Year.ts                  # Year overview with drill targets and density modes
│   ├── Entry.ts                 # Individual event component
│   ├── Context.ts               # Weekday header row (month view)
│   └── Menu.ts                  # Event detail popover with ICS export
├── lib/
│   ├── messages.ts              # Per-instance i18n via direct template lookup
│   ├── localization.ts          # Locale-parameterized date/time formatting
│   ├── ViewStateController.ts   # Per-instance view mode & date state
│   ├── LayoutCalculator.ts      # Overlap detection & box layout
│   ├── SlotManager.ts           # Slot naming & CSS position generation
│   ├── allDayLayout.ts          # All-day event row allocation
│   ├── weekStartHelper.ts       # Week start offset & locale mapping
│   ├── DirectionalCalendarDateCalculator.ts
│   ├── weekDisplayContext.ts    # Condensed week display logic
│   ├── colorParser.ts           # Color parsing & contrast utils
│   └── getColorTextWithContrast.ts
└── generated/
    ├── locale-codes.ts          # Source & target locale definitions
    └── locales/                 # Generated translation templates (hash ID → string)
        ├── ar.ts, bn.ts, cs.ts, da.ts, de-DE.ts, de.ts, el.ts
        ├── es.ts, fi.ts, fr.ts, he.ts, hi.ts, id.ts, it.ts
        ├── ja.ts, ko.ts, nb.ts, nl.ts, pl.ts, pt.ts, ru.ts
        └── sv.ts, th.ts, tr.ts, uk.ts, vi.ts, zh-Hans.ts

Key Technologies

Design Patterns

For deeper internals, see the Developer Guide and Rendering Calculations.