UNPKG

@expofp/floorplan

Version:

Interactive floor plan library for expos and events

2 lines (1 loc) 575 B
import{getConfig as f}from"@expofp/config";import{getResolved as n,isResolved as o}from"@expofp/resolve";export function getFpSvgJs(){const t=f().fpSvgJsRef;if(!t)throw new Error("No drawing in the config (fpSvgJsRef is not set)");return n(t)}function i(t){const e=f().fpSvgLayerJsRefs[t];if(e&&o(e))return n(e);const r=getFpSvgJs();if(t===""||t===r.__fpDefaultLayer)return r}export function getFpSvg(t=""){return i(t)?.__fp}export function getFpPaths(t=""){return i(t)?.__fpPaths}export function getWfData(){const t=f().wfDataJsRef;return!t||!o(t)?null:n(t).__wfData??null}