feat(i18n): per-entity content, per-group UI, page manifests (spec-v4-data-organization)

- split content.json -> content/{profile,skills,experience,projects}.json and
  ui.json -> 14 feature-group files (vi+en); index.ts merges both trees and
  asserts the merge against the group lists; merged CONTENT verified
  byte-identical against pre-split baseline dumps
- src/data/pages/*.json: 8 per-route manifests + pages.ts loader +
  PageId/PageManifestClaim/PageManifest types; validate.ts rules 1-4 (unknown
  entity, unknown ui group, unresolvable field path, orphan text field,
  missing manifest) - all five rejects verified by a throwaway harness
- draft.ts: data-driven registry of the 12 writable documents (4 structure +
  8 text); describeField() names the per-entity file; smoke-draft fixtures
  follow the new registry (8/8)
- EditBar: 'appears on' page annotations computed from the manifests
- remove JsonPanel.tsx + panel labels (inline-editing task 8); docs: AGENTS.md
  Data Layer / Live Edit Mode / Component Structure, v4 spec progress tables
This commit is contained in:
dong.nguyen committed 2026-10-23 10:55:29 +07:00
1 parent dad5f3edd7
commit 939260e4fb
69 files changed
+1816 -1596

No files matched your search

+35 -5
View File
@@ -9,7 +9,20 @@ import type {
ProjectId,
SkillGroupId,
} from '../types/index';
import uiViJson from './locales/vi/ui.json';
import navJson from './locales/vi/ui/navigation.json';
import footerJson from './locales/vi/ui/footer.json';
import socialJson from './locales/vi/ui/social.json';
import heroJson from './locales/vi/ui/hero.json';
import aboutJson from './locales/vi/ui/about.json';
import expertiseJson from './locales/vi/ui/expertise.json';
import experienceJson from './locales/vi/ui/experience.json';
import projectsJson from './locales/vi/ui/projects.json';
import contactJson from './locales/vi/ui/contact.json';
import projectDetailJson from './locales/vi/ui/project-detail.json';
import philosophyJson from './locales/vi/ui/philosophy.json';
import commonJson from './locales/vi/ui/common.json';
import resumeJson from './locales/vi/ui/resume.json';
import editJson from './locales/vi/ui/edit.json';
// --- structure (src/data/*.json) ---
@@ -121,8 +134,25 @@ type PartialDeep<T> = T extends readonly unknown[]
export type ContentEn = { [K in keyof ContentVi]?: PartialDeep<ContentVi[K]> };
// --- UI (src/i18n/locales/{vi,en}/ui.json) ---
// --- UI (src/i18n/locales/{vi,en}/ui/{group}.json) ---
// Derived from the complete Vietnamese tree; the en import is checked against
// this type in index.ts — both files are complete by construction (§3.3).
export type UIDict = typeof uiViJson;
// Derived from the complete Vietnamese group files (spec-v4-data-organization
// §4); index.ts assembles the merged record in this key order and the en
// groups are checked against the same type — both sides are complete by
// construction (§3.3).
export type UIDict = {
nav: typeof navJson;
social: typeof socialJson;
footer: typeof footerJson;
hero: typeof heroJson;
about: typeof aboutJson;
expertise: typeof expertiseJson;
experience: typeof experienceJson;
projects: typeof projectsJson;
contact: typeof contactJson;
projectDetail: typeof projectDetailJson;
philosophy: typeof philosophyJson;
common: typeof commonJson;
resume: typeof resumeJson;
edit: typeof editJson;
};