更新 CLAUDE.md: 修正版本号、补充新增组件和依赖
- compileSdk/targetSdk 36→37, Compose 1.10.3→1.11.0 - 新增 tyme4kt 农历库依赖 - 补充 YearGridView、ShiftPattern、CalendarUtils 说明 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
bad536617d
commit
b877596e72
11
CLAUDE.md
11
CLAUDE.md
@ -47,9 +47,15 @@ CalendarMonthView ← top-level screen (MonthHeader + WeekdayHeader + p
|
||||
│ └── DayCell ← single day circle with selection/today states
|
||||
├── WeekPager ← HorizontalPager for single-week view (collapsed state)
|
||||
│ └── DayCell
|
||||
├── YearGridView ← 4×3 mini-month grid with year navigation (year view)
|
||||
│ └── MiniMonth ← compact month: title + weekday row + day numbers
|
||||
└── BottomCard ← drag handle card, drives collapse/expand gestures
|
||||
```
|
||||
|
||||
`ShiftPattern` (in `plus.rua.project`) defines personal shift cycles (WORK/OFF) independent of public holidays. Uses modular arithmetic: `(date - anchorDate) mod cycle.size`.
|
||||
|
||||
`CalendarUtils` (in `plus.rua.project.ui`) holds pager constants (`START_PAGE = Int.MAX_VALUE/2`, `COLLAPSE_THRESHOLD = 0.25f`) and page↔date arithmetic (`pageToYearMonth`, `yearMonthToPage`, `pageToWeekMonday`).
|
||||
|
||||
**Collapse/expand animation:** `CalendarMonthView` supports month↔week transition via `CalendarViewModel.collapseProgress` (0f=month, 1f=week). `BottomCard` captures vertical drag gestures and calls `viewModel.onDrag()`/`onExpandDrag()`. When progress crosses 50% on release, a spring animation snaps to the nearest state. `CalendarMonthPage` compresses non-selected weeks toward zero height during collapse. When fully collapsed, `WeekPager` replaces `CalendarPager` for efficient single-week paging.
|
||||
|
||||
**Pager page mapping:** Both `CalendarPager` and `WeekPager` use `Int.MAX_VALUE` pages centered at `Int.MAX_VALUE / 2`. Page-to-date conversion is arithmetic — no index-based list. `CalendarPager` maps pages to yearMonth; `WeekPager` maps pages to week-Monday dates. Both skip the initial `snapshotFlow` emission (`.drop(1)`) to preserve the "today" selection on first render.
|
||||
@ -58,9 +64,10 @@ CalendarMonthView ← top-level screen (MonthHeader + WeekdayHeader + p
|
||||
|
||||
## Key Dependencies
|
||||
|
||||
- Kotlin 2.3.21, Compose Multiplatform 1.10.3, Material 3 1.10.0-alpha05
|
||||
- Kotlin 2.3.21, Compose Multiplatform 1.11.0, Material 3 1.10.0-alpha05
|
||||
- `kotlinx-datetime` 0.8.0 for all date logic (no java.util.Calendar)
|
||||
- AGP 9.2.1, compileSdk/targetSdk 36, minSdk 24
|
||||
- `tyme4kt` for Chinese traditional calendar (lunar dates, solar terms, festivals)
|
||||
- AGP 9.2.1, compileSdk/targetSdk 37, minSdk 24
|
||||
- JVM target: 17
|
||||
|
||||
## Conventions
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user