Refactor map tools and drop SocialParser runtime dependency.

Add filtered map API, creamy-caprice-style toolbar (dates, layers, search), Yandex ru tiles, and store Telegram session in MapMil/data instead of mounting SocialParser.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-30 20:56:30 +03:00
co-authored by Cursor
parent 2c16bc0b56
commit 1d6d54ab9f
28 changed files with 3182 additions and 616 deletions
+21
View File
@@ -0,0 +1,21 @@
import { request } from "./client";
import type { MapFilters, MapObjectWithEvent, MapQueryParams } from "../types/map";
function buildQuery(params: MapQueryParams): string {
const search = new URLSearchParams();
for (const [key, value] of Object.entries(params)) {
if (value !== undefined && value !== "") {
search.set(key, String(value));
}
}
const qs = search.toString();
return qs ? `?${qs}` : "";
}
export function fetchMapObjects(params: MapQueryParams = {}): Promise<MapObjectWithEvent[]> {
return request<MapObjectWithEvent[]>(`/map/objects${buildQuery(params)}`);
}
export function fetchMapFilters(): Promise<MapFilters> {
return request<MapFilters>("/map/filters");
}