UNPKG

@expofp/floorplan

Version:

Interactive floor plan library for expos and events

87 lines (86 loc) 2.76 kB
(function() { try { var e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {}; e.SENTRY_RELEASE = { id: "3.7.8" }; var t = new e.Error().stack; t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "0db5d5dc-17a6-4a93-a5a1-42f66cada197", e._sentryDebugIdIdentifier = "sentry-dbid-0db5d5dc-17a6-4a93-a5a1-42f66cada197"); } catch {} })(); import { r as e } from "./rolldown-runtime-YBAZwyzS.js"; import { t } from "./react-Di3Pmpio.js"; import { t as n } from "./jsx-runtime-C8yjdFgZ.js"; import { t as r } from "./add-debug-secret-listener-BGwnumxG.js"; //#region ../debug/src/lib/ui/side-button.tsx var i = /* @__PURE__ */ e(t(), 1), a = n(), o = ({ onClick: e }) => /* @__PURE__ */ (0, a.jsx)("button", { type: "button", style: { position: "fixed", right: 0, top: "50%", transform: "translateY(-50%)", padding: 0, border: "none", background: "transparent", cursor: "pointer", zIndex: 9999, boxSizing: "border-box" }, onClick: e, children: /* @__PURE__ */ (0, a.jsx)("div", { style: { width: 20, height: 64, paddingLeft: 4, display: "flex", alignItems: "center", justifyContent: "center", background: "var(--side-tab-bg, rgba(0,0,0,0.5))", color: "white", borderRadius: "14px 0 0 14px", fontSize: 16, lineHeight: 1, userSelect: "none", cursor: "pointer", filter: "grayscale(0.5)", boxSizing: "border-box" }, children: /* @__PURE__ */ (0, a.jsx)(s, { size: 64 * .7 }) }) }); function s({ size: e = 18, strokeWidth: t = 3, ...n }) { return /* @__PURE__ */ (0, a.jsx)("svg", { width: e, height: e, viewBox: "0 0 24 24", fill: "none", ...n, children: /* @__PURE__ */ (0, a.jsx)("path", { fill: "none", d: "M14.5 5.5L8.5 12l6 6.5", stroke: "currentColor", strokeWidth: t, strokeLinecap: "round", strokeLinejoin: "round" }) }); } //#endregion //#region ../debug/src/lib/ui/debug-ui.tsx var c = (0, i.lazy)(async () => ({ default: (await import("./debug-overlay-DGX-T5qv.js")).DebugOverlay })), l = "[data-efp-floorplan-defaults]", u = (e) => { var t; let [n, s] = (0, i.useState)(e.open), [u, d] = e.useDebugButtonState(), f = (t = e.hostSelector) == null ? l : t; return (0, i.useEffect)(() => r(() => { d(!0), s(!0); }), []), (0, i.useEffect)(() => { let e = document.querySelector(f); e && (e.style.visibility = n ? "hidden" : "visible"); }, [n, f]), n ? /* @__PURE__ */ (0, a.jsx)(i.Suspense, { fallback: null, children: /* @__PURE__ */ (0, a.jsx)(c, { onClose: () => { s(!1); } }) }) : u ? /* @__PURE__ */ (0, a.jsx)(o, { onClick: () => s(!0) }) : null; }; u.displayName = "DebugUi"; //#endregion export { u as DebugUi };