diff --git a/.gitignore b/.gitignore index adb90ac..a2472f6 100644 --- a/.gitignore +++ b/.gitignore @@ -31,3 +31,4 @@ bun-debug.log* coverage/ playwright-report/ test-results/ +.gstack/ diff --git a/CHANGELOG.md b/CHANGELOG.md index 6652c72..58b355b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,30 @@ All notable changes to **Hình Học Sống** are documented here. Format: [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). Versioning: 4-digit MAJOR.MINOR.PATCH.MICRO per gstack. +## [0.0.2.0] - 2026-04-29 + +### Added + +- **Module 3 (lớp 9): Góc nội tiếp** — the first interactive theorem demo, live at `/lop-9/goc-noi-tiep/`. + - Drag point M around the circle; ∠AMB stays constant when M is on the same arc (the inscribed-angle theorem in motion). + - Live numeric readout of ∠AMB (inscribed) and ∠AOB (central). Color-coded per the locked autoplan palette: M and the inscribed-angle readout in pair1 (#D7263D), A/B and the central-angle readout in pair2 (#1B998B). + - SVG canvas with `viewBox="0 0 400 400"`, `touch-action: none` scoped to the canvas, Pointer Events + `setPointerCapture` for unified mouse/touch/stylus handling, AbortController teardown on `astro:before-swap`. + - Theorem statement panel with the SGK phrasing, plus one worked example walking the user through the 120° → 60° relationship for the canonical A=150°, B=30° configuration. +- `src/geom-engine/circle.ts` — pure circle module: `circle()`, `pointOnCircle()`, `projectToCircle()`, `angleAtVertex()` (clamped against IEEE-754 drift to prevent `acos` NaN). 17 unit tests including the inscribed-angle invariance property test (∀ M on the major arc, ∠AMB stays within 0.5° of the reference) — the killer-demo property is now a CI gate. +- Hub landing page upgrade: lớp 9 card is now a real link with `bg`-style hover affordance and "Khám phá" status badge. Lớp 7 + 8 cards still show "Sắp ra mắt" with `opacity: 0.7` to signal not-yet-clickable. + +### Changed + +- `i18n/vi.ts` extended with `module3.*` strings + per-grade `href` and a new `live` status. Every user-facing string still routed through `t()`. +- Landing-page card rendering now branches on `grade.href` to produce either an `` (live) or a dimmed `
  • ` (coming soon). +- `.gitignore` now ignores `.gstack/` (per-deploy reports written by `/land-and-deploy`). + +### Notes + +- KaTeX still deferred — the theorem text uses Unicode (∠AMB, °) directly, which renders fine in Be Vietnam Pro. KaTeX bundling lands when a future module needs it. +- Tick-mark encoding (Decision D3) not used here since inscribed-angle has no matching sides; ticks land with Module 1 (tam giác bằng nhau). +- Keyboard navigation, first-load coaching, and three theorem-toggle variants all deferred to v0.0.3.0+ per TODOS.md. + ## [0.0.1.0] - 2026-04-29 ### Added diff --git a/TODOS.md b/TODOS.md index 1ffe4ca..429f189 100644 --- a/TODOS.md +++ b/TODOS.md @@ -37,12 +37,9 @@ Tracked work, organized by component then priority (P0 highest → P4 lowest). S ## Module 3 — Lớp 9 Góc nội tiếp (weekend 2, hero module) -- **Drag M around circle, project to circle constraint** - **Priority:** P1 - **What:** `M = center + r·normalize(pointer − center)` every `pointermove`. No free movement. Per Eng failure mode #4. - - **Theorem panel + 3 worked SGK-style examples** **Priority:** P1 + **Status:** PARTIAL — v0.0.2.0 ships theorem panel + 1 worked example. 2 more examples remain. - **First-load coaching state** (per Design F2.2) **Priority:** P2 @@ -52,6 +49,14 @@ Tracked work, organized by component then priority (P0 highest → P4 lowest). S **Priority:** P2 **What:** "Góc AMB bằng 47 độ" announced via `aria-live="polite"`. Per Design F6.4. +- **Multi-toggle theorem variants** + **Priority:** P2 + **What:** Toggle between "góc nội tiếp" / "góc nội tiếp chắn nửa đường tròn = 90°" / "góc tạo bởi tiếp tuyến và dây cung". Each variant uses the same canvas with different fixed-point setup. + +- **KaTeX inline rendering for theorem text** + **Priority:** P3 + **What:** Currently uses Unicode (∠AMB, °) which renders fine in Be Vietnam Pro. Switch to KaTeX when notation gets richer (cung, đường tròn (O), etc.). + ## Module 1 — Lớp 7 Tam giác bằng nhau (weekend 3) - **SSS / SAS / ASA / AAS / cạnh huyền-góc nhọn / cạnh huyền-cạnh góc vuông detectors** @@ -143,3 +148,6 @@ Tracked work, organized by component then priority (P0 highest → P4 lowest). S - Teacher-tool / B2B2C demo mode (build after Module 3 ships) ## Completed + +- **Drag M around circle, project to circle constraint** — `src/components/inscribed-angle.ts` + `src/geom-engine/circle.ts:projectToCircle`. **Completed:** v0.0.2.0 (2026-04-29) +- **TheoremCanvas primitive first cut** — vanilla TS in Astro `