@expofp/floorplan
Version:
Interactive floor plan library for expos and events
27 lines • 1.72 kB
TypeScript
import { type FpPath, type FpSvgJs, type WfData } from '@expofp/schema';
/**
* Read access to the legacy drawing/wayfinding payloads behind the config's
* refs. The config carries only `$ref`s; `loadConfig` resolved the drawing
* (`fpSvgJsRef`) and the graph (`wfDataJsRef`) before the floorplan booted,
* and lazy layers are resolved on demand (`config-load-layer.ts`) — this
* module reads them all back synchronously from `@expofp/resolve`'s memo.
* Payloads settle with every asset URL already absolute (schema-aware
* resolution), so these are plain reads.
*
* The old `window.__fp<layerName>` alias lookups are gone: a layer name maps
* to its lazily-resolved payload, or to the eager drawing when it names the
* default layer (whose drawing IS `fp.svg.js`). Newer converters emit ONLY
* the layer-suffixed globals in layer files (`window['__fpBooth'] = …`), but
* the loader folds those onto the canonical `__fp`/`__fpPaths` keys when the
* payload resolves (`normalizeFpSvgLayerAliases`, `@expofp/config`) — so
* these reads see one canonical shape from either converter generation.
*/
/** The eagerly-resolved `fp.svg.js` payload (drawing + plan-wide metadata). */
export declare function getFpSvgJs(): FpSvgJs;
/** One layer's SVG document (`''` = the default drawing), asset hrefs resolved. */
export declare function getFpSvg(layerName?: string): string | undefined;
/** One layer's triangulated meshes (`''` = the default drawing). */
export declare function getFpPaths(layerName?: string): FpPath[] | undefined;
/** The wayfinding graph; `null` while unloaded or when the plan has none. */
export declare function getWfData(): WfData | null;
//# sourceMappingURL=fp-payloads.d.ts.map