import { type ReactNode } from "react"; import { type DataViewFacade } from "@gooddata/sdk-ui"; import { type IColorStrategy } from "@gooddata/sdk-ui-vis-commons"; import type { ILayerPreparedData } from "../hooks/layers/useLayersPrepare.js"; import type { IGeoLayerTooltipLookup } from "../layers/common/customTooltipExecution.js"; import type { GeoJSONSourceSpecification } from "../layers/common/mapFacade.js"; import type { ITooltipReferenceMaps } from "../layers/registry/adapterTypes.js"; import { type IAvailableLegends, type IGeoLegendItem } from "../types/common/legends.js"; import { type IAreaGeoData } from "../types/geoData/area.js"; import { type IPushpinGeoData } from "../types/geoData/pushpin.js"; import { type GeoLayerType } from "../types/layers/index.js"; import type { IMapViewport } from "../types/map/provider.js"; import { type ILayerExecutionRecord } from "../types/props/geoChart/internal.js"; /** * Data for a single layer including transformed geo data and color strategy. * * @remarks * This interface represents fully loaded layer data - all async operations * have completed before this data is created. * * @internal */ export interface IGeoLayerData { /** * Layer ID for reference. */ layerId: string; /** * Layer type. */ layerType: GeoLayerType; /** * Complete GeoJSON source specification ready for MapLibre. */ source: GeoJSONSourceSpecification | null; /** * Transformed geographic data. */ geoData: IPushpinGeoData | IAreaGeoData | null; /** * Data view from execution. */ dataView: DataViewFacade; /** * Color strategy for this layer. */ colorStrategy: IColorStrategy | null; /** * Legend items for this layer. */ baseLegendItems: IGeoLegendItem[]; /** * Available legend types. */ availableLegends: IAvailableLegends; /** * Initial viewport hint derived from the layer data. */ initialViewport: Partial | null; /** * Reference id maps for custom-tooltip resolution. */ tooltipReferenceMaps?: ITooltipReferenceMaps; } /** * Context value for multi-layer geo data. * * @remarks * This context is only created after all async data loading is complete. * All data is pre-loaded and ready for synchronous rendering. * * @internal */ export interface IGeoLayersContext { /** * Layer executions for reference. */ layerExecutions: ILayerExecutionRecord[]; /** * Data for all layers (pre-loaded). */ layers: Map; /** * Primary (first) layer data - used for legend/tooltips. */ primaryLayer: IGeoLayerData | null; /** * Per-layer custom-tooltip lookups (empty when nothing external is fetched). */ tooltipLookups: Map; } /** * Provider that exposes pre-loaded layer data through context. * * @remarks * This provider receives already-loaded data from the data loading gate. * No async operations happen here - data is ready for synchronous rendering. * * @internal */ export declare function GeoLayersProvider({ children, layerExecutions, layerOutputs, tooltipLookups, }: { children: ReactNode; layerExecutions: ILayerExecutionRecord[]; layerOutputs: Map; tooltipLookups: Map; }): import("react/jsx-runtime").JSX.Element; /** * Hook to access multi-layer geo data context * * @returns Layer data context * @throws Error if used outside of GeoLayersProvider * * @internal */ export declare function useGeoLayers(): IGeoLayersContext; //# sourceMappingURL=GeoLayersContext.d.ts.map