refactor: reorganize project structure by migrating engine and geometry utilities into a structured map directory

This commit is contained in:
taDuc
2026-05-12 04:43:50 +07:00
parent 6076f098fa
commit 16fce9da7a
42 changed files with 65 additions and 65 deletions
+7 -7
View File
@@ -22,22 +22,22 @@ import {
Feature,
Geometry,
useEditorState,
} from "@/uhm/lib/useEditorState";
import { GEO_TYPE_KEYS, geoTypeCodeToTypeKey } from "@/uhm/lib/geoTypeMap";
} from "@/uhm/lib/editor/state/useEditorState";
import { GEO_TYPE_KEYS, geoTypeCodeToTypeKey } from "@/uhm/lib/map/geo/geoTypeMap";
import {
BackgroundLayerId,
BackgroundLayerVisibility,
DEFAULT_BACKGROUND_LAYER_VISIBILITY,
HIDDEN_BACKGROUND_LAYER_VISIBILITY,
} from "@/uhm/lib/backgroundLayers";
} from "@/uhm/lib/map/styles/backgroundLayers";
import {
ENTITY_TYPE_OPTIONS,
} from "@/uhm/lib/entityTypeOptions";
} from "@/uhm/lib/utils/entityTypeOptions";
import {
EntityFormState,
GeometryMetaFormState,
useEditorSessionState,
} from "@/uhm/lib/useEditorSessionState";
} from "@/uhm/lib/editor/state/useEditorSessionState";
import {
getDefaultTypeIdForFeature,
normalizeFeatureBindingIds,
@@ -58,8 +58,8 @@ import {
persistBackgroundLayerVisibility,
} from "@/uhm/lib/editor/background/backgroundVisibilityStorage";
import { useSectionCommands } from "@/uhm/lib/editor/section/useSectionCommands";
import { EMPTY_FEATURE_COLLECTION } from "@/uhm/lib/geo/constants";
import { FIXED_TIMELINE_RANGE, clampYearToFixedRange } from "@/uhm/lib/timeline";
import { EMPTY_FEATURE_COLLECTION } from "@/uhm/lib/map/geo/constants";
import { FIXED_TIMELINE_RANGE, clampYearToFixedRange } from "@/uhm/lib/utils/timeline";
import { useFeatureCommands } from "./featureCommands";
import { deleteSubmission } from "@/uhm/api/sections";
import type { WikiSnapshot } from "@/uhm/types/wiki";
+4 -4
View File
@@ -15,14 +15,14 @@ import {
type BackgroundLayerVisibility,
DEFAULT_BACKGROUND_LAYER_VISIBILITY,
HIDDEN_BACKGROUND_LAYER_VISIBILITY,
} from "@/uhm/lib/backgroundLayers";
} from "@/uhm/lib/map/styles/backgroundLayers";
import {
loadBackgroundLayerVisibilityFromStorage,
persistBackgroundLayerVisibility,
} from "@/uhm/lib/editor/background/backgroundVisibilityStorage";
import { EMPTY_FEATURE_COLLECTION, WORLD_BBOX } from "@/uhm/lib/geo/constants";
import { GEO_TYPE_KEYS } from "@/uhm/lib/geoTypeMap";
import { clampYearToFixedRange, TIMELINE_DEBOUNCE_MS } from "@/uhm/lib/timeline";
import { EMPTY_FEATURE_COLLECTION, WORLD_BBOX } from "@/uhm/lib/map/geo/constants";
import { GEO_TYPE_KEYS } from "@/uhm/lib/map/geo/geoTypeMap";
import { clampYearToFixedRange, TIMELINE_DEBOUNCE_MS } from "@/uhm/lib/utils/timeline";
import type { FeatureCollection } from "@/uhm/types/geo";
const CURRENT_YEAR = new Date().getUTCFullYear();
+1 -1
View File
@@ -16,7 +16,7 @@ import "yet-another-react-lightbox/styles.css";
import "yet-another-react-lightbox/plugins/captions.css";
import { createHistorianCV } from "@/service/historianService";
import { toast } from "sonner";
import { newId } from "@/uhm/lib/id";
import { newId } from "@/uhm/lib/utils/id";
import Swal from "sweetalert2";
import { PresignedUrlResponse } from "@/interface/media";