refactor: migrate project data models and transition editor state management to the new project-based API architecture.

This commit is contained in:
taDuc
2026-05-12 05:18:54 +07:00
parent 8f911abe35
commit 8f6d848d55
15 changed files with 162 additions and 169 deletions
@@ -4,9 +4,9 @@ import type { Change } from "@/uhm/lib/editor/draft/editorTypes";
import type { EntitySnapshot } from "@/uhm/types/entities";
import type { EntitySnapshotOperation } from "@/uhm/types/entities";
import type { Feature, FeatureCollection, GeometryEntitySnapshot, GeometrySnapshot } from "@/uhm/types/geo";
import type { EditorSnapshot, Section } from "@/uhm/types/sections";
import type { EditorSnapshot, Project } from "@/uhm/types/projects";
import type { WikiSnapshot } from "@/uhm/types/wiki";
import type { EntityWikiLinkSnapshot } from "@/uhm/types/sections";
import type { EntityWikiLinkSnapshot } from "@/uhm/types/projects";
type UnknownRecord = Record<string, unknown>;
@@ -251,7 +251,7 @@ export function normalizeEditorSnapshot(raw: unknown): EditorSnapshot | null {
}
export function buildEditorSnapshot(options: {
section: Section;
project: Project;
draft: FeatureCollection;
changes: Change[];
snapshotEntities: EntitySnapshot[];