@expofp/floorplan
Version:
Interactive floor plan library for expos and events
28 lines • 1.34 kB
TypeScript
import { CURRENT_POSITION_POINT_ID } from "../runtime/positionView";
/** Display name for an {@link ArbitraryPoint} derived from the current GPS position. */
export declare const CURRENT_LOCATION_NAME = "Your Location";
export { CURRENT_POSITION_POINT_ID };
/** Stable id for the static kiosk-anchor `ArbitraryPoint`. */
export declare const KIOSK_ANCHOR_POINT_ID = "kiosk-anchor";
/** Discriminator id carried by `ArbitraryPoint` — drives runtime decisions
* (source-icon visibility, off-graph trail) without coupling the engine to UI. */
export type ArbitraryPointId = typeof CURRENT_POSITION_POINT_ID | typeof KIOSK_ANCHOR_POINT_ID;
/** Off-graph endpoint (kiosk anchor, live GPS). `id` discriminates the source for runtime
* policy (icon/trail); `name` is the UI display label. */
export interface ArbitraryPoint {
readonly id: ArbitraryPointId;
readonly x: number;
readonly y: number;
readonly layer: string;
readonly name: string;
}
/**
* Builds an `ArbitraryPoint` from any `{x, y, z?}`-shaped value (CurrentPosition,
* Kiosk descriptor, freeform coords). Normalises `z` to a string `layer`.
*/
export declare function toArbitraryPoint(point: {
x: number;
y: number;
z?: number | string;
}, name: string, id: ArbitraryPointId): ArbitraryPoint;
//# sourceMappingURL=arbitraryPoint.d.ts.map