import { BBox, FeatureCategory, FeatureCategoryDescriptor, GisFeature } from 'js/cue-gis'; export type GisBBox = BBox; export type { FeatureCategory }; export type GisCategoryDescriptor = FeatureCategoryDescriptor; export type { GisFeature }; export type GisFeaturesMap = Map; type Listener = (value: T) => void; /** * Reactive GIS service, exposed lazily as `cue.gis`. * * Push-based: consumers set the active bbox and selected categories; results are * delivered via subscription callbacks. All debouncing and request cancellation * are handled internally. * * @example * ```ts * cue.gis.setProjectId('my-project-id'); * cue.gis.onAvailableCategories(cats => console.log(cats)); * * // On every map pan/zoom: * cue.gis.setBbox([west, south, east, north]); * * // When the user toggles a category: * cue.gis.setSelectedCategories(new Set(['cadastre', 'building'])); * * // Cleanup: * cue.gis.destroy(); * ``` */ export declare class CueGis { private readonly _getAuthHeaders; private readonly _gatewayUrl; private _bbox; private _projectId; private _selectedCategories; private _queryToken; private _categoryTokens; private _debounceTimer; private _availableCategories; private _features; private readonly _catListeners; private readonly _featListeners; private readonly _loadListeners; private _gatewayCache; private _gatewayProjectId; /** @internal — construct via `cue.gis`, not directly. */ constructor(_getAuthHeaders: () => Promise>, _gatewayUrl: string); /** * Update the current map viewport. * Triggers a debounced query for available categories and reloads selected ones. */ setBbox(bbox: BBox): void; /** * Set or clear the active project. * Rebuilds the authenticated adapter so subsequent requests carry the new project header. */ setProjectId(projectId: string | null): void; /** * Replace the full set of selected categories. * Newly added categories begin loading immediately; removed categories are cleared. */ setSelectedCategories(categories: Set): void; /** * Subscribe to available-category updates. * Replays the current value immediately, then fires on every bbox change. * @returns An unsubscribe function. */ onAvailableCategories(cb: Listener): () => void; /** * Subscribe to the feature map (category → GisFeature[]). * Replays the current value immediately, then fires whenever features change. * @returns An unsubscribe function. */ onFeaturesChange(cb: Listener): () => void; /** * Subscribe to the global loading state. * Fires `true` while the category list is being queried, `false` when done. * @returns An unsubscribe function. */ onLoadingChange(cb: Listener): () => void; /** Cancel all pending requests and clear all listeners. */ destroy(): void; private _scheduleDebouncedQuery; private _getGateway; private _queryLayers; private _loadCategory; private _emitFeatures; private _emitLoading; }