UNPKG

@expofp/floorplan

Version:

Interactive floor plan library for expos and events

26 lines • 1.35 kB
import { type Camera } from '@expofp/schema'; import { type MapSettings } from '../store/types'; /** * Translates the public {@link Camera} shape into the internal * {@link MapSettings} one (the `uiState.mapSettings` observable that the map * reaction applies once the renderer is ready). Only the fields present in * `camera` appear in the result, so a partial camera stays a partial settings * patch. `x`/`y` and `lat`/`lng` are pairs — a half-given pair is dropped, as * the serialized center would be meaningless. */ export declare function cameraToMapSettings(camera: Camera): MapSettings; /** * The reverse of {@link cameraToMapSettings}: reads the internal * {@link MapSettings} back into the public {@link Camera} shape. A serialized * center whose halves don't parse as finite numbers (legacy URLs can carry * arbitrary strings) is skipped rather than surfaced * as `NaN`. */ export declare function mapSettingsToCamera(settings: MapSettings): Camera; /** * Parses a serialized `"a,b"` pair, rejecting anything that is not exactly two * finite numbers — legacy URLs and kiosk records can carry arbitrary strings, * and a half-parsed pair would reach the camera as `NaN`. */ export declare function parseNumberPair(value: string | undefined): [number, number] | undefined; //# sourceMappingURL=camera-map-settings.d.ts.map