@expofp/floorplan
Version:
Interactive floor plan library for expos and events
23 lines (20 loc) • 873 B
HTML
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>floorplan dev</title>
<script type="module">
import { load } from './index.js';
// Dev-only venue override: `?expo=<name>` beats VITE_EXPO, so one dev server
// switches venues without a restart. `expo` on purpose — it is the delivery
// platform's own routing param, so url-sync keeps it across selections and
// reloads for free. Inert in the built copy of this file, where
// `import.meta.env` is undefined.
const params = new URLSearchParams(window.location.search);
const viteEnv = import.meta.env;
const expoId = (viteEnv?.DEV && params.get('expo')) || viteEnv?.VITE_EXPO || 'demo';
const floorplan = await load({ $ref: `https://${expoId}.expofp.com/manifest.json` });
</script>
</head>
<body></body>
</html>