Unify UME World as hex nav with conditional flat world map.

Seed a unique L2 World canvas under the UME World container, show the flat map only when nested regions have NEs, pack blocks without overlap, allow drag overrides on the world map while forbidding direct NE adds, and hide the world-map truncation banner.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
oliver 2026-08-07 00:51:08 +08:00
parent 5d705fa7bb
commit 1ef43fdcd4
30 changed files with 4389 additions and 371 deletions

View file

@ -1106,8 +1106,41 @@ export const populateTopologyView = (
graph: TopologyViewGraph | null;
}>(`/v1/topology/views/${encodeURIComponent(viewId)}/populate`, body || {});
export const fetchTopologyViewGraph = (viewId: string) =>
apiGet<TopologyViewGraph>(`/v1/topology/views/${encodeURIComponent(viewId)}`);
export const fetchTopologyViewGraph = (
viewId: string,
opts?: {
min_x?: number;
max_x?: number;
min_y?: number;
max_y?: number;
sbn_id?: string;
folder_id?: string;
lod?: "auto" | "sbn" | "me";
status?: string;
},
) => {
const q = new URLSearchParams();
if (opts?.min_x != null) q.set("min_x", String(opts.min_x));
if (opts?.max_x != null) q.set("max_x", String(opts.max_x));
if (opts?.min_y != null) q.set("min_y", String(opts.min_y));
if (opts?.max_y != null) q.set("max_y", String(opts.max_y));
if (opts?.sbn_id) q.set("sbn_id", opts.sbn_id);
if (opts?.folder_id) q.set("folder_id", opts.folder_id);
if (opts?.lod) q.set("lod", opts.lod);
if (opts?.status) q.set("status", opts.status);
const qs = q.toString();
return apiGet<TopologyViewGraph>(
`/v1/topology/views/${encodeURIComponent(viewId)}${qs ? `?${qs}` : ""}`,
);
};
export const fetchTopologyWorld = () =>
apiGet<{ view_id: string; folder_id: string; name: string }>("/v1/topology/world");
export const fetchTopologyFolderBBox = (folderId: string) =>
apiGet<{ folder_id: string; min_x: number; max_x: number; min_y: number; max_y: number; n: number }>(
`/v1/topology/folders/${encodeURIComponent(folderId)}/bbox`,
);
export const updateTopologyView = (
viewId: string,