UNPKG

@expofp/floorplan

Version:

Interactive floor plan library for expos and events

20 lines • 1.25 kB
import { type Map as MaplibreMap } from 'maplibre-gl'; import { type RefObject } from 'react'; /** * Turns the map's own camera movements into the two signals a kiosk depends on: the idle timer's * keep-alive, and the camera-moved event the setkiosk panel records a new home framing from. * * Both come off the plan's camera in floorplan mode (`MapCamera`), which map mode does not drive — * the plan is unmounted there and the map owns the camera. Without these listeners the idle timer * runs out mid-gesture for a visitor who only moves the map, and the panel never learns that the * operator reframed the view, leaving its Save button disabled over changes it cannot see. * * The two are not the same signal: activity is the visitor's own hand, where a reframing counts * however it was made. * * `ready` is the mount signal: `mapRef.current` is assigned in the same `handleMapReady` call that * sets it, so keying the effect on `ready` is what guarantees there is a map to subscribe to — the * early return below is the assertion of that contract, not a tolerated miss. */ export declare function useKioskCameraEvents(ready: boolean, mapRef: RefObject<MaplibreMap | null>): void; //# sourceMappingURL=useKioskCameraEvents.d.ts.map