@expofp/floorplan
Version:
Interactive floor plan library for expos and events
25 lines • 1.16 kB
TypeScript
import { type Map as MaplibreMap } from 'maplibre-gl';
import { type RefObject } from 'react';
import { type RendererService } from '../../renderer/RendererService';
import { type DimmingAnimator } from '../../utils/dimming';
export interface DimmingControls {
mapDimAnimatorRef: RefObject<DimmingAnimator | null>;
venueDimAnimatorRef: RefObject<DimmingAnimator | null>;
applyDimmingTarget: (options?: {
immediate?: boolean;
}) => void;
handleMapDimLayerReady: (map: MaplibreMap) => void;
}
/**
* The map-wide dim target: `uiState.dimmed`, except while outdoor PoI markers
* suppress it. Single source of truth — the marker layers dim themselves
* (usePoiMarkers) and must agree with the plan and basemap.
*/
export declare function getMapDimTarget(): boolean;
/**
* Manages scene dimming: creates map and venue dim animators,
* keeps them in sync with uiState.dimmed via a MobX reaction,
* and provides a callback for when the map dim layer is ready.
*/
export declare function useDimming(mapRef: RefObject<MaplibreMap | null>, rendererService: RendererService): DimmingControls;
//# sourceMappingURL=useDimming.d.ts.map