@expofp/floorplan 3.37.1 → 3.39.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/{Button-DeCrQX9Q.js → Button-bdODDPNw.js} +5 -5
- package/dist/browser/{CookieConsent-Vl3v-pFj.js → CookieConsent-DNrAwMNi.js} +7 -7
- package/dist/browser/{Debug-B5yqbERt.js → Debug-BIX5rNWa.js} +7 -7
- package/dist/browser/{DebugTools-DxmLwGuT.js → DebugTools-DWIya7Bp.js} +6 -6
- package/dist/browser/{Demo-wMGqDSlp.js → Demo-BjyJN4Lb.js} +9 -9
- package/dist/browser/{Free-YWqMdrkf.js → Free-GA2gE4iv.js} +9 -9
- package/dist/browser/{GalleryContainer-BSj0IoEg.js → GalleryContainer-BEiygMFs.js} +10 -10
- package/dist/browser/{GpsLoader-JZ2o-6yZ.js → GpsLoader-DamQfmE8.js} +10 -10
- package/dist/browser/{KioskStore-Bu3BopQw.js → KioskStore-unhS5B1M.js} +9 -7
- package/dist/browser/{MaplibreAdapter-Po4JkMfJ.js → MaplibreAdapter-BuFz6p4l.js} +12 -12
- package/dist/browser/{ModalContainer-Ca0L20OV.js → ModalContainer-BSOaylBJ.js} +10 -10
- package/dist/browser/{PermissionNotice-BL_Z0Gvx.js → PermissionNotice-QoBvgTxq.js} +6 -6
- package/dist/browser/{SetKioskMode-BLqj_oCF.js → SetKioskMode-CY8Px_y2.js} +9 -9
- package/dist/browser/{ShowKiosk-C_Uo4HvH.js → ShowKiosk-BdIb4cjA.js} +10 -10
- package/dist/browser/{ViewerMenuPanel-JVKfblYo.js → ViewerMenuPanel-CfEoeUSF.js} +9 -9
- package/dist/browser/{add-debug-secret-listener-DPtDyfek.js → add-debug-secret-listener-DcRkKb16.js} +1 -1
- package/dist/browser/{adopt-global-settings-BtOhXTvg.js → adopt-global-settings-BQr2uaJi.js} +9 -9
- package/dist/browser/{boolean-editor-DnFqREVk.js → boolean-editor-CO1l1mG2.js} +9 -9
- package/dist/browser/{bootIntercom-Bcj28u2s.js → bootIntercom-BF8W6edz.js} +2 -2
- package/dist/browser/bundle.json +71 -71
- package/dist/browser/{camera-events-7_9NDGJ3.js → camera-events-BM2DRKiu.js} +1 -1
- package/dist/browser/{classnames-DDNrf32h.js → classnames-zBYgq48f.js} +2 -2
- package/dist/browser/{client-CH-EyMGM.js → client-kHcAahev.js} +5 -5
- package/dist/browser/{components-CTpCoGVL.js → components-DAabWR_p.js} +37 -37
- package/dist/browser/{debug-context-k4yfSNiw.js → debug-context-DoIsRKLN.js} +7 -7
- package/dist/browser/{debug-overlay-DUJGPb45.js → debug-overlay-Cldouqb1.js} +10 -10
- package/dist/browser/{debug-ui-BHuX-GB3.js → debug-ui-BMvP-d9w.js} +6 -6
- package/dist/browser/{dimming-t9q0FUi7.js → dimming-Big09HME.js} +187 -175
- package/dist/browser/{dist-D53VlFs3.js → dist-BqsLBiXn.js} +6 -6
- package/dist/browser/{dist-BN7aRMYg.js → dist-DUkTj21m.js} +3 -3
- package/dist/browser/{dist-BH6ccsWu.js → dist-Da-W2paU.js} +5 -5
- package/dist/browser/{efp-debug-init-FVwthqE9.js → efp-debug-init-Br53YSLH.js} +3 -3
- package/dist/browser/{enum-editor-D2DqVE0U.js → enum-editor-BF0tTe81.js} +4 -4
- package/dist/browser/{es5-CTnRrfUa.js → es5-DLwEWAqt.js} +2 -2
- package/dist/browser/{event-head-NyeKC_a-.js → event-head-D7Uj7byv.js} +1 -1
- package/dist/browser/{event-not-found-DIhmLXDl.js → event-not-found-CANnIJrZ.js} +3 -3
- package/dist/browser/{exports-BozCwlV6.js → exports-KRrUY3Z1.js} +1 -1
- package/dist/browser/{favicon-B1mctnat.js → favicon-Bze7lfTk.js} +1 -1
- package/dist/browser/{fetch-retry.umd-D9r-WEgL.js → fetch-retry.umd-D6rdaNIF.js} +2 -2
- package/dist/browser/{flex-_eXPuQqS.js → flex-_QSLGHt0.js} +5 -5
- package/dist/browser/{floorplan.loader-CfJ8Vn2f.js → floorplan.loader-CvNH6Qc4.js} +10 -10
- package/dist/browser/{floorplan.ready-Di_3P8e2.js → floorplan.ready-HPblmUxV.js} +15 -15
- package/dist/browser/{fuse-v2l3pyGv.js → fuse-9EzVEd12.js} +2 -2
- package/dist/browser/{i18n-B5-zCiY_.js → i18n-DsPOygSI.js} +7 -6
- package/dist/browser/index.js +16 -16
- package/dist/browser/{index.module-6qVgT1Ws.js → index.module-BnkEmOmv.js} +4 -4
- package/dist/browser/{integrateKiosk-D8Xc_hN4.js → integrateKiosk-DlUC2piv.js} +4 -4
- package/dist/browser/{is-own-domain-CRNYcXgm.js → is-own-domain-Db2dg_LE.js} +1 -1
- package/dist/browser/{is-webview-BKVg7rVR.js → is-webview-CKWDUFMW.js} +1 -1
- package/dist/browser/{jsx-runtime-CvluGX9h.js → jsx-runtime-BxX9Q763.js} +2 -2
- package/dist/browser/{kiosk-record-CkIaRaVs.js → kiosk-record-BDPzvIrP.js} +1 -1
- package/dist/browser/{lib-F5uPIjZZ.js → lib-BuATiAoM.js} +3 -3
- package/dist/browser/{loadImage-CWZCt1gk.js → loadImage-BvSruq1k.js} +4 -4
- package/dist/browser/{logDeviceInfo-KsHijAvU.js → logDeviceInfo-Cu3Vy9La.js} +9 -9
- package/dist/browser/{mobx-DyNIDReK.js → mobx-C6ZnBiyR.js} +4 -4
- package/dist/browser/{optional-boolean-editor-BuEtS0T3.js → optional-boolean-editor-D4LT9fSN.js} +3 -3
- package/dist/browser/{optional-enum-editor-CdbmJsGL.js → optional-enum-editor-Cxn6rM4t.js} +4 -4
- package/dist/browser/{optional-string-editor-D2PcwHgW.js → optional-string-editor-CTUOwnCm.js} +4 -4
- package/dist/browser/{particles.min-E6qiqBch.js → particles.min-dLuHpqHJ.js} +2 -2
- package/dist/browser/{react-Dn5R1i44.js → react-8e9Lx7_L.js} +2 -2
- package/dist/browser/{react-dom-CNKhUGTA.js → react-dom-DVm8zF94.js} +3 -3
- package/dist/browser/{rolldown-runtime-Rtc3Wq1o.js → rolldown-runtime-CgLujcqt.js} +1 -1
- package/dist/browser/{scheduler-B63wNQ6O.js → scheduler-BviKXQIp.js} +2 -2
- package/dist/browser/{select-FAFZn4pa.js → select-DqlFRrKq.js} +10 -10
- package/dist/browser/{settings-DxbVRDcz.js → settings-DYHQnr2h.js} +2 -2
- package/dist/browser/{settings-item-BvQw5Dzf.js → settings-item-C7c9AnkF.js} +6 -6
- package/dist/browser/{store-BWnOp-D9.js → store-CrXKrvfj.js} +5821 -5262
- package/dist/browser/{string-editor-unUjOHfG.js → string-editor-DziXqaWJ.js} +4 -4
- package/dist/browser/{text-field-YhZt_uCf.js → text-field-Dh7Ux2mR.js} +5 -5
- package/dist/browser/{theme-ycAtwSHv.js → theme-me78t_PC.js} +8 -8
- package/dist/browser/{ui-BDt3wLKg.js → ui-yPy4UNxE.js} +8 -8
- package/dist/browser/{useRenderTarget-dNFV5pof.js → useRenderTarget-Cm9xuQ0_.js} +4 -4
- package/dist/browser/{viewport-DE8ekt3O.js → viewport-rjH0BXVJ.js} +2 -2
- package/dist/esm/components/Kiosk/KioskStore.js +1 -1
- package/dist/esm/components/Map/drawing/config/booth-logos.d.ts +38 -0
- package/dist/esm/components/Map/drawing/config/booth-logos.js +1 -0
- package/dist/esm/components/Map/drawing/config/config-all.js +1 -1
- package/dist/esm/components/Map/drawing/config/config-booth-labels-special.js +2 -2
- package/dist/esm/components/Map/drawing/config/config-booth-labels.js +1 -1
- package/dist/esm/components/Map/drawing/config/config-booths.js +1 -1
- package/dist/esm/components/Map/drawing/config/config-load-layer.js +1 -1
- package/dist/esm/components/Map/drawing/config/config-markers.d.ts +2 -2
- package/dist/esm/components/Map/drawing/config/config-markers.js +1 -1
- package/dist/esm/components/Map/drawing/config/layer-models.d.ts +2 -2
- package/dist/esm/components/Map/drawing/config/loadBoothsImages.d.ts +19 -2
- package/dist/esm/components/Map/drawing/config/loadBoothsImages.js +1 -1
- package/dist/esm/components/Map/traffic/useManageTraffic.js +1 -1
- package/dist/esm/engine/canvases.d.ts +1 -1
- package/dist/esm/engine/canvases.js +1 -1
- package/dist/esm/engine/defs.d.ts +7 -3
- package/dist/esm/engine/update-def.js +1 -1
- package/dist/esm/store/ExhibitorStore.d.ts +2 -0
- package/dist/esm/types.d.ts +1 -1
- package/dist/esm/utils/blob-image-size.d.ts +27 -0
- package/dist/esm/utils/blob-image-size.js +1 -0
- package/dist/esm/utils/loadBlob.d.ts +16 -0
- package/dist/esm/utils/loadBlob.js +1 -0
- package/dist/esm/utils/loadImagesInBatches.d.ts +16 -1
- package/dist/esm/utils/loadImagesInBatches.js +1 -1
- package/dist/esm/utils/loadLayerImages.d.ts +46 -0
- package/dist/esm/utils/loadLayerImages.js +1 -0
- package/dist/esm/utils/rasterize-svg.d.ts +32 -0
- package/dist/esm/utils/rasterize-svg.js +1 -0
- package/dist/esm/wayfinding/createWayfinding.js +1 -1
- package/dist/esm/wayfinding/handlers/kioskHandler.js +1 -1
- package/package.json +10 -10
- package/dist/esm/utils/imageloader.d.ts +0 -15
- package/dist/esm/utils/imageloader.js +0 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
(function() {
|
|
2
2
|
try {
|
|
3
3
|
var e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {};
|
|
4
|
-
e.SENTRY_RELEASE = { id: "3.
|
|
4
|
+
e.SENTRY_RELEASE = { id: "3.39.0" };
|
|
5
5
|
var t = new e.Error().stack;
|
|
6
6
|
t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "8f241b7f-d106-4e96-a6a2-b96a0f9abf69", e._sentryDebugIdIdentifier = "sentry-dbid-8f241b7f-d106-4e96-a6a2-b96a0f9abf69");
|
|
7
7
|
} catch {}
|
|
8
8
|
})();
|
|
9
|
-
import { t as e } from "./jsx-runtime-
|
|
10
|
-
import { t } from "./settings-item-
|
|
11
|
-
import { t as n } from "./text-field-
|
|
9
|
+
import { t as e } from "./jsx-runtime-BxX9Q763.js";
|
|
10
|
+
import { t } from "./settings-item-C7c9AnkF.js";
|
|
11
|
+
import { t as n } from "./text-field-Dh7Ux2mR.js";
|
|
12
12
|
//#region ../debug/src/lib/ui/string-editor.tsx
|
|
13
13
|
var r = e(), i = (e) => {
|
|
14
14
|
var i;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
(function() {
|
|
2
2
|
try {
|
|
3
3
|
var e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {};
|
|
4
|
-
e.SENTRY_RELEASE = { id: "3.
|
|
4
|
+
e.SENTRY_RELEASE = { id: "3.39.0" };
|
|
5
5
|
var t = new e.Error().stack;
|
|
6
6
|
t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "e13f8c4e-8995-47cd-802d-392fd9bdf13a", e._sentryDebugIdIdentifier = "sentry-dbid-e13f8c4e-8995-47cd-802d-392fd9bdf13a");
|
|
7
7
|
} catch {}
|
|
8
8
|
})();
|
|
9
|
-
import { r as e } from "./rolldown-runtime-
|
|
10
|
-
import { t } from "./react-
|
|
11
|
-
import { D as n, i as r, l as i, n as a, s as o, u as s, y as c } from "./flex-
|
|
12
|
-
import { t as l } from "./classnames-
|
|
9
|
+
import { r as e } from "./rolldown-runtime-CgLujcqt.js";
|
|
10
|
+
import { t } from "./react-8e9Lx7_L.js";
|
|
11
|
+
import { D as n, i as r, l as i, n as a, s as o, u as s, y as c } from "./flex-_QSLGHt0.js";
|
|
12
|
+
import { t as l } from "./classnames-zBYgq48f.js";
|
|
13
13
|
//#region ../../node_modules/.pnpm/@radix-ui+themes@3.3.0_@types+react-dom@19.2.3_@types+react@19.2.17__@types+react@19.2._5ea800d4e947acedb1fa1275f1697b17/node_modules/@radix-ui/themes/dist/esm/components/text-field.props.js
|
|
14
14
|
var u = /* @__PURE__ */ e(t()), d = /* @__PURE__ */ e(l()), f = {
|
|
15
15
|
size: {
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
(function() {
|
|
2
2
|
try {
|
|
3
3
|
var e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {};
|
|
4
|
-
e.SENTRY_RELEASE = { id: "3.
|
|
4
|
+
e.SENTRY_RELEASE = { id: "3.39.0" };
|
|
5
5
|
var t = new e.Error().stack;
|
|
6
6
|
t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "5b26ff7f-61de-4d09-8508-a74b71b94f98", e._sentryDebugIdIdentifier = "sentry-dbid-5b26ff7f-61de-4d09-8508-a74b71b94f98");
|
|
7
7
|
} catch {}
|
|
8
8
|
})();
|
|
9
|
-
import { r as e } from "./rolldown-runtime-
|
|
10
|
-
import { t } from "./react-
|
|
11
|
-
import { t as n } from "./jsx-runtime-
|
|
12
|
-
import { t as r } from "./react-dom-
|
|
13
|
-
import { C as i, E as a, O as o, T as s, _ as c, o as l, v as u, w as d } from "./flex-
|
|
14
|
-
import { c as f, i as p, n as m, o as h, r as g, s as _, t as v } from "./dist-
|
|
15
|
-
import { t as y } from "./classnames-
|
|
9
|
+
import { r as e } from "./rolldown-runtime-CgLujcqt.js";
|
|
10
|
+
import { t } from "./react-8e9Lx7_L.js";
|
|
11
|
+
import { t as n } from "./jsx-runtime-BxX9Q763.js";
|
|
12
|
+
import { t as r } from "./react-dom-DVm8zF94.js";
|
|
13
|
+
import { C as i, E as a, O as o, T as s, _ as c, o as l, v as u, w as d } from "./flex-_QSLGHt0.js";
|
|
14
|
+
import { c as f, i as p, n as m, o as h, r as g, s as _, t as v } from "./dist-BqsLBiXn.js";
|
|
15
|
+
import { t as y } from "./classnames-zBYgq48f.js";
|
|
16
16
|
//#region ../../node_modules/.pnpm/@radix-ui+react-visually-hidden@1.2.3_@types+react-dom@19.2.3_@types+react@19.2.17__@ty_cffccd7838985066e8e1d993b5cb6017/node_modules/@radix-ui/react-visually-hidden/dist/index.mjs
|
|
17
17
|
var b = /* @__PURE__ */ e(r(), 1), x = /* @__PURE__ */ e(t(), 1), S = n(), C = Object.freeze({
|
|
18
18
|
position: "absolute",
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
(function() {
|
|
2
2
|
try {
|
|
3
3
|
var e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {};
|
|
4
|
-
e.SENTRY_RELEASE = { id: "3.
|
|
4
|
+
e.SENTRY_RELEASE = { id: "3.39.0" };
|
|
5
5
|
var t = new e.Error().stack;
|
|
6
6
|
t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "80a4f49f-d869-4a38-b1c0-c3cfd645ceec", e._sentryDebugIdIdentifier = "sentry-dbid-80a4f49f-d869-4a38-b1c0-c3cfd645ceec");
|
|
7
7
|
} catch {}
|
|
8
8
|
})();
|
|
9
|
-
import { r as e } from "./rolldown-runtime-
|
|
10
|
-
import { a as t, i as n, s as r } from "./efp-debug-init-
|
|
11
|
-
import { a as i, i as a } from "./adopt-global-settings-
|
|
12
|
-
import { t as o } from "./jsx-runtime-
|
|
13
|
-
import "./settings-
|
|
14
|
-
import { t as s } from "./add-debug-secret-listener-
|
|
9
|
+
import { r as e } from "./rolldown-runtime-CgLujcqt.js";
|
|
10
|
+
import { a as t, i as n, s as r } from "./efp-debug-init-Br53YSLH.js";
|
|
11
|
+
import { a as i, i as a } from "./adopt-global-settings-BQr2uaJi.js";
|
|
12
|
+
import { t as o } from "./jsx-runtime-BxX9Q763.js";
|
|
13
|
+
import "./settings-DYHQnr2h.js";
|
|
14
|
+
import { t as s } from "./add-debug-secret-listener-DcRkKb16.js";
|
|
15
15
|
//#region ../debug/src/lib/ui/render-debug-ui.tsx
|
|
16
16
|
var c = /* @__PURE__ */ e(r(), 1), l = o(), u = !1;
|
|
17
17
|
function d() {
|
|
@@ -26,7 +26,7 @@ function d() {
|
|
|
26
26
|
}
|
|
27
27
|
});
|
|
28
28
|
let o = async (t) => {
|
|
29
|
-
let { DebugUi: n } = await import("./debug-ui-
|
|
29
|
+
let { DebugUi: n } = await import("./debug-ui-BMvP-d9w.js"), { createRoot: i } = await import("./client-kHcAahev.js").then((t) => /* @__PURE__ */ e(t.t(), 1)), a = document.createElement("div");
|
|
30
30
|
document.body.appendChild(a), i(a).render(/* @__PURE__ */ (0, l.jsx)(n, {
|
|
31
31
|
useDebugButtonState: r.useState,
|
|
32
32
|
open: t
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
(function() {
|
|
2
2
|
try {
|
|
3
3
|
var e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {};
|
|
4
|
-
e.SENTRY_RELEASE = { id: "3.
|
|
4
|
+
e.SENTRY_RELEASE = { id: "3.39.0" };
|
|
5
5
|
var t = new e.Error().stack;
|
|
6
6
|
t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "44feeb02-c84e-4fb1-b2f8-984c7d50f58d", e._sentryDebugIdIdentifier = "sentry-dbid-44feeb02-c84e-4fb1-b2f8-984c7d50f58d");
|
|
7
7
|
} catch {}
|
|
8
8
|
})();
|
|
9
|
-
import { r as e } from "./rolldown-runtime-
|
|
10
|
-
import { t } from "./react-
|
|
11
|
-
import { l as n } from "./store-
|
|
9
|
+
import { r as e } from "./rolldown-runtime-CgLujcqt.js";
|
|
10
|
+
import { t } from "./react-8e9Lx7_L.js";
|
|
11
|
+
import { l as n } from "./store-CrXKrvfj.js";
|
|
12
12
|
//#region ../ui/src/shared/activeElement.ts
|
|
13
13
|
var r = (e) => !!e && "activeElement" in e;
|
|
14
14
|
function i(e) {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
(function() {
|
|
2
2
|
try {
|
|
3
3
|
var e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {};
|
|
4
|
-
e.SENTRY_RELEASE = { id: "3.
|
|
4
|
+
e.SENTRY_RELEASE = { id: "3.39.0" };
|
|
5
5
|
var t = new e.Error().stack;
|
|
6
6
|
t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "233b3b22-a917-48c8-8f7e-f558b0dbd9d8", e._sentryDebugIdIdentifier = "sentry-dbid-233b3b22-a917-48c8-8f7e-f558b0dbd9d8");
|
|
7
7
|
} catch {}
|
|
8
8
|
})();
|
|
9
|
-
import { c as e, vt as t } from "./store-
|
|
9
|
+
import { c as e, vt as t } from "./store-CrXKrvfj.js";
|
|
10
10
|
//#region src/components/Map/viewport.ts
|
|
11
11
|
function n(e) {
|
|
12
12
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__decorate as i}from"tslib";import{getConfig as
|
|
1
|
+
import{__decorate as i}from"tslib";import{getConfig as C}from"@expofp/config";import{action as n,computed as g,observable as S,toJS as m,when as y}from"mobx";import{KIOSK_ENABLE_KEY as p}from"../../constants";import a from"../../store";import{areLayersEnabled as K}from"../../utils/areLayersEnabled";import{t as h}from"../../utils/i18n";import{isLocalStorageAvailable as d}from"../../utils/localStorage";import{mapCamera as f}from"../Map/camera";import{mapViewport as M}from"../Map/viewport";import{screenFitsKiosk as v,storedKioskMode as P}from"./kiosk-mode";import{getPtScaleZoomRatio as b,toFiniteNumber as u}from"./kiosk-record";import{updateKiosk as w}from"./kioskApi";import{getSavedKiosk as F,removeKiosk as R,saveKiosk as D}from"./SetKiosk";import{KIOSK_STORAGE_KEY as I}from"./SetKiosk/constants";const z=2e4;class s{constructor(){this.savedKiosk=null,this.statusMessages=[],this.statusMessageTimer=0,this.isResettingCamera=!1,this.isRestoringFraming=!1}get kiosk(){return a.uiState.kioskData}setKiosk(e){a.uiState.setKioskData(e)}getCameraState(){if(a.maplibreStore.showMaplibre){const t=a.maplibreStore.cameraPort?.getCameraState();return t?{mapCenterLng:t.lng,mapCenterLat:t.lat,mapZoom:t.zoom,mapBearingDegrees:t.bearing,mapPitchDegrees:t.pitch}:{}}const e=f()?.state();return e?{mapInitialPtScale:this.initialPtScale,mapPtScale:e.pixelSize,mapCenterX:e.center.x,mapCenterY:e.center.y,mapRollDegrees:e.roll,mapPitch:e.pitch}:{}}get hasUnsavedChanges(){const e=this.savedKiosk,t=m(this.kiosk);if(!t||!e)return!!t!=!!e;const o=Object.keys(e),r=Object.keys(t);if(o.length!==r.length)return!0;for(const l of o)if(!(l in t)||e[l]!==t[l])return!0;return!1}addStatusMessage(e){this.statusMessages=[{...e,id:Date.now()}],this.startCleanupMessages()}clearStatusMessages(){this.statusMessages=[]}startCleanupMessages(){clearTimeout(this.statusMessageTimer),this.statusMessageTimer=window.setTimeout(()=>this.clearStatusMessages(),1e3)}async resetCamera(){if(!this.isResettingCamera){this.isResettingCamera=!0;try{if(a.maplibreStore.showMaplibre&&await this.resetMaplibreCamera()){this.isRestoringFraming=!0;return}this.isRestoringFraming=await this.resetPlanCamera()}finally{this.isResettingCamera=!1}}}async resetMaplibreCamera(){const e=await this.waitForMaplibreCameraPort();if(!e)return!1;const t=this.kiosk;t?.z!=null&&a.fp.activateFloor({name:String(t.z)});const o=u(t?.mapCenterLng),r=u(t?.mapCenterLat),l=u(t?.mapZoom);return o===void 0||r===void 0||l===void 0?(e.resetPitch(),a.uiState.fitBounds(),!0):(e.applyCameraState({lng:o,lat:r,zoom:l,bearing:u(t?.mapBearingDegrees),pitch:u(t?.mapPitchDegrees)}),!0)}async waitForMaplibreCameraPort(){const{maplibreStore:e}=a;if(e.cameraPort)return e.cameraPort;try{await y(()=>!!e.cameraPort||!e.showMaplibre,{timeout:z})}catch{return null}return e.cameraPort}async resetPlanCamera(){const e=f();if(!e)return!1;const t=this.kiosk;await e.api.reset({pan:!0,zoom:!0,roll:!0,pitch:!0},{immediate:!0}),t?.z!=null&&a.fp.activateFloor({name:String(t.z)});const o=b(t);o!==void 0&&await e.api.zoomBy(o,{immediate:!0});const r=u(t?.mapCenterX),l=u(t?.mapCenterY);r!==void 0&&l!==void 0&&await e.api.panTo({x:r,y:l},{immediate:!0});const c=u(t?.mapRollDegrees);c!==void 0&&await e.api.rollTo(c,{immediate:!0});const k=u(t?.mapPitch);return k!==void 0&&await e.api.pitchTo(k,{immediate:!0}),!0}restoreData(){const e=F();this.savedKiosk=e??null,e&&(this.setKiosk(e),a.uiState.kiosk=!0)}handleSetupReady(){this.restoreData(),a.uiState.kiosk=!0,a.uiState.hideFreeOrDemo=!0,a.uiState.setForceDim(!0),a.searchStore.setSearchText(""),a.searchStore.setFocused(!1),this.resetCamera()}handleClose(){v(a.uiState)&&P(C())||(a.uiState.kiosk=!1),a.uiState.restoreUIScale(),this.setKiosk(null),a.uiState.setForceDim(!1),a.uiState.enableSetKioskMode(!1),a.searchStore.closeSearch()}handleDelete(){d&&localStorage.getItem(I)!==null&&localStorage.getItem(p)==="1"&&localStorage.removeItem(p),R(),this.savedKiosk=null,this.setKiosk(null),a.uiState.resetMapSettings(),a.uiState.resetUIScale(),this.addStatusMessage({variant:"success",title:h("Deleted")})}handleSave(){const e=M();if(!e)return;const t=m(this.kiosk);if(!t)return;const o=this.getCameraState(),r={...t,...o};if(!e.isVisible({x:r.x,y:r.y})){this.addStatusMessage({variant:"error",title:h("Kiosk not visible")});return}this.setKiosk(r),D(r),d&&localStorage.setItem(p,"1"),w(r,"https://app.expofp.com/"),a.uiState.setUIScale(r.uiScale,!0),this.addStatusMessage({variant:"success",title:h("Saved")}),this.savedKiosk=r}delayChange(e){requestAnimationFrame(()=>e?.())}handleChange(e){const t=m(this.kiosk);t&&(Number.isFinite(e.angle)&&this.setKiosk({...t,heading:e.angle}),Number.isFinite(e.scale)&&(this.setKiosk({...t,uiScale:e.scale}),this.delayChange(()=>a.uiState.setUIScale(e.scale,!1))),Number.isFinite(e.percent)&&this.setKiosk({...t,iconSizePercent:e.percent}))}setInitialPtScale(e){if(this.initialPtScale)return;this.initialPtScale=e;const t=m(this.kiosk);t&&this.setKiosk({...t,mapInitialPtScale:e})}handleClick(e){const t=m(this.kiosk),o=a.fp.getFloors(),r=K()?o.find(c=>c.active)?.name??null:null,l=a.uiState.uiScale;this.setKiosk({...t,x:e.x,y:e.y,z:r,uiScale:t?.uiScale||l,heading:t?.heading||0,iconSizePercent:t?.iconSizePercent||100,...this.getCameraState()})}handleNavigationChange(){const e=this.isRestoringFraming;this.isRestoringFraming=!1;const t=m(this.kiosk);if(!t)return;const o=this.getCameraState();this.setKiosk({...t,...o}),e&&this.savedKiosk&&(this.savedKiosk={...this.savedKiosk,...o})}}i([g({keepAlive:!0})],s.prototype,"kiosk",null),i([n],s.prototype,"setKiosk",null),i([S],s.prototype,"savedKiosk",void 0),i([g({keepAlive:!0})],s.prototype,"hasUnsavedChanges",null),i([S],s.prototype,"statusMessages",void 0),i([n],s.prototype,"addStatusMessage",null),i([n],s.prototype,"clearStatusMessages",null),i([n],s.prototype,"startCleanupMessages",null),i([n],s.prototype,"resetCamera",null),i([n],s.prototype,"restoreData",null),i([n],s.prototype,"handleSetupReady",null),i([n],s.prototype,"handleClose",null),i([n],s.prototype,"handleDelete",null),i([n],s.prototype,"handleSave",null),i([n],s.prototype,"handleChange",null),i([n],s.prototype,"setInitialPtScale",null),i([n],s.prototype,"handleClick",null),i([n],s.prototype,"handleNavigationChange",null);export default new s;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { type Booth } from '../../../../store/BoothStore';
|
|
2
|
+
import { type Exhibitor } from '../../../../store/ExhibitorStore';
|
|
3
|
+
/** One booth logo, ready to draw. */
|
|
4
|
+
export interface BoothLogo {
|
|
5
|
+
/** The bytes the renderer packs. An SVG logo is rasterized and re-encoded as PNG. */
|
|
6
|
+
blob: Blob;
|
|
7
|
+
/** The logo's width divided by its height, which is what fits it inside the booth. */
|
|
8
|
+
aspectRatio: number;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* The exhibitor whose logo is painted in this booth, if any.
|
|
12
|
+
*
|
|
13
|
+
* One function, so the logo URL and the stated ratio always come off the same exhibitor. A booth
|
|
14
|
+
* can hold several.
|
|
15
|
+
* @param booth - The booth to look at.
|
|
16
|
+
* @returns The exhibitor, or undefined when no exhibitor in the booth wants its logo painted.
|
|
17
|
+
*/
|
|
18
|
+
export declare function boothLogoExhibitor(booth: Booth): Exhibitor | undefined;
|
|
19
|
+
/**
|
|
20
|
+
* The logo aspect ratio the event data states for this booth, when it states a usable one.
|
|
21
|
+
*
|
|
22
|
+
* A value that is not a finite positive number is not a ratio. It would mis-fit the logo in every
|
|
23
|
+
* booth the exhibitor holds, and nothing downstream would catch it, so it is rejected here and the
|
|
24
|
+
* caller measures the pixels instead.
|
|
25
|
+
* @param booth - The booth whose logo is being placed.
|
|
26
|
+
* @returns The ratio, or undefined when the data states none that can be used.
|
|
27
|
+
*/
|
|
28
|
+
export declare function statedLogoAspectRatio(booth: Booth): number | undefined;
|
|
29
|
+
/**
|
|
30
|
+
* Makes the logo preparer for one batch of booths.
|
|
31
|
+
*
|
|
32
|
+
* The preparer answers two questions per booth: which bytes the renderer packs, and at what ratio
|
|
33
|
+
* the logo is fitted. It holds the batch's two caches, which is why it is built per batch rather
|
|
34
|
+
* than imported: booths share logos, and both answers must be shared with them.
|
|
35
|
+
* @returns A function preparing one booth's logo. It returns null when the logo cannot be drawn.
|
|
36
|
+
*/
|
|
37
|
+
export declare function createLogoPreparer(): (booth: Booth, blob: Blob) => Promise<BoothLogo | null>;
|
|
38
|
+
//# sourceMappingURL=booth-logos.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{blobImageSize as u}from"../../../../utils/blob-image-size";import{isSvgBlob as c,svgToPngBlob as g}from"../../../../utils/rasterize-svg";export function boothLogoExhibitor(e){return e.exhibitors.find(t=>t.logoInBooth&&t.logo)}export function statedLogoAspectRatio(e){const t=boothLogoExhibitor(e)?.logoAspectRatio;return typeof t=="number"&&Number.isFinite(t)&&t>0?t:void 0}export function createLogoPreparer(){const e=new Map,t=o=>{let n=e.get(o);return n||(n=f(o),e.set(o,n)),n},i=new Map,s=o=>{let n=i.get(o);return n||(n=l(o),i.set(o,n)),n};return async(o,n)=>{const r=await t(n);if(!r)return null;const a=statedLogoAspectRatio(o)??await s(r);return a===null?null:{blob:r,aspectRatio:a}}}async function f(e){return c(e)?g(e):e}async function l(e){const t=await u(e);return t?.height?t.width/t.height:null}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{initWayfindingLayers as
|
|
1
|
+
import{initWayfindingLayers as p}from"@expofp/wayfinding";import{createLayerDef as L}from"../../../../engine/defs";import f,{boothStore as d,uiState as l}from"../../../../store";import{isPathwayLayer as u}from"../../../../utils/is-pathway-layer";import{createTrafficLayers as h}from"../../traffic/trafficLayers";import{configBoothsBadges as g}from"./config-booth-badge";import w from"./config-load-layer";import{MARKER_LAYER_NAME as b}from"./config-markers";export default function A(){const{defaultLayer:a}=f.layerStore;let{layers:e}=f.layerStore;if(a){const r=[...e],o=e.indexOf(a);r.splice(o,1),e=[a,...r]}const m=e.filter(r=>!r.rootParent).map(r=>w(r));return Promise.all(m).then(r=>{const o=L(b,[]);o.overlay=l.is3DView;const y=p({overlay:l.is3DView}),i=[],s=[];for(const t of r.flat())u(t.name)?(t.dim=0,s.push(t)):i.push(t);const{layer:n,cleanup:c}=g("root",d.booths);return{layers:[...i,...n?[n]:[],...s,...h(),o,y],cleanup:c}})}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Rect as m}from"@expofp/geometry";import{update as L}from"@expofp/renderer";import{reaction as b}from"mobx";import{FONT_WEIGHT_PRIMARY_BOOTH as g,FONT_WEIGHT_PRIMARY_SPECIAL as
|
|
2
|
-
`),this.shapeLabel.padding=[this.paddingScaled[0]*t+this.padding,this.paddingScaled[1]*t+this.padding],[this.shapeLabel]):(this.shapeLabel.lines[0].fontSize=0,[this.shapeLabel])}layOutDot(t){const s=this.steps.find(
|
|
1
|
+
import{Rect as m}from"@expofp/geometry";import{update as L}from"@expofp/renderer";import{reaction as b}from"mobx";import{FONT_WEIGHT_PRIMARY_BOOTH as g,FONT_WEIGHT_PRIMARY_SPECIAL as y}from"../../../../constants";import{createTextDef as D}from"../../../../engine/defs";import{loadCustomFontsUrls as F}from"../../../../engine/fonts";import{getQuarterTurns as x,getRollValue as R,rotateRectByQuarters as S,rotateTextDefByQuarters as T,shouldFlip as v}from"../../../../engine/update-def";import{heatmapStore as B,layersStore as I,uiState as l}from"../../../../store";import{SpecialBooth as w}from"../../../../store/BoothStore";import z from"../../../../tools/settings";import{getFont as M}from"./canvases";import{BoothLabelDrawer as O,getFontUrlByWeight as k,getMinZoomFactorForDot as C,isDirectionsMode as P}from"./config-booth-labels";import{LABEL_MARGIN_FRACTION as f}from"./label-inset.js";import _ from"./TextFitter";const c=new Map;function A(i){let t=c.get(i);if(!t){const s=[18,16,14,12,10,7].map(o=>o*i),e=14*i;t=new _(M,s,e),c.set(i,t),setTimeout(()=>c.delete(i),5e3)}return t}export default function N(i){if(!(!(i instanceof w)||i.noLabels))return new V(i)}class V extends O{constructor(t){super(t),this.steps=[],this.text="";const s=this.booth.rect,e=Number(getComputedStyle(document.body).getPropertyValue(y))||Number(getComputedStyle(document.body).getPropertyValue(g))||500,o=k(e,F()),h=s.expand({x:-(s.size.width*f+this.padding),y:-(s.size.height*f+this.padding)});this.setText(),this.canvasRect=new m(h.center,h.size,t.rotate,t.elevation),this.setFactors(this.text),this.labelIsVertical=Math.abs(Math.abs(t.rotate)-Math.PI/2)<.01,this.fontSizes=[this.steps,[]],this.minZoomDotVisible=C(this.steps.map(a=>a.scaleFactor)),this.shapeLabel=D([{text:this.text,color:t.labelColor||z.boothLabelColor,fontUrl:o,fontSize:0}],new m(h.center,h.size,t.rotate,t.elevation),[this.padding,this.padding],{horizontal:"center",text:"center",vertical:"center"}),this.shapeLabel.onScale=({pixelSize:a})=>this.layOutLabel(a),this.getShapeDot(),b(()=>[this.booth.skipDim,l.selectedRoute,I.layersLoaded],()=>{const a=P();this.shapeLabel.dim=a||this.booth.skipDim?0:void 0,this.shapeDot.dim=a||this.booth.skipDim?0:void 0,L(this.shapeLabel,this.shapeDot)}),b(()=>l.mapSettings,({roll:a})=>{R(a??0)&&(this.shapeLabel.onRoll=({roll:p,pixelSize:d})=>{const r=this.shapeLabel.bounds.rotation;if(this.labelIsVertical)return v(p,r)?(this.shapeLabel.bounds.rotate(-2*r,this.shapeLabel.bounds),[this.shapeLabel,this.shapeDot]):void 0;const n=x(p,r);if(n===0)return;const{size:u}=this.canvasRect;return this.shapeLabel=T(this.shapeLabel,n),u.x!==u.y&&!this.shapeLabel.hidden&&(this.canvasRect=S(this.canvasRect,n),this.setFactors(this.text),this.layOutLabel(d),this.layOutDot(d)),[this.shapeLabel,this.shapeDot]})},{fireImmediately:!0})}getShape(){return[this.shapeLabel,this.shapeDot]}layOutLabel(t){const s=this.steps.find(e=>e.scaleFactor<1/t);return s?(this.shapeLabel.lines[0].fontSize=s.value*t,this.shapeLabel.lines[0].text=s.lines.join(`
|
|
2
|
+
`),this.shapeLabel.padding=[this.paddingScaled[0]*t+this.padding,this.paddingScaled[1]*t+this.padding],[this.shapeLabel]):(this.shapeLabel.lines[0].fontSize=0,[this.shapeLabel])}layOutDot(t){const s=this.steps.find(h=>h.scaleFactor<1/t),e=this.shapeDot.bounds,o=this.shapeDot.source;return e.scale({x:o.width*t/e.size.x,y:o.height*t/e.size.y},e.center,e),this.shapeDot.hidden=!!s,[this.shapeDot]}setFactors(t){this.steps=A(devicePixelRatio).getStepsForRect(t,this.canvasRect.size.x,this.canvasRect.size.y)}setText(){const t=this.booth.title||this.booth.name,e=`Clicks: ${B.getTotalClicksByBooth(this.booth)}`;this.text=l.heatmap?`${t} - ${e}`:t}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Rect as B}from"@expofp/geometry";import{update as U}from"@expofp/renderer";import{reaction as M}from"mobx";import{FONT_WEIGHT_PRIMARY_BOOTH as V,FONT_WEIGHT_PRIMARY_EXHIBITOR as Z,FONT_WEIGHT_SECONDARY_BOOTH as X,FONT_WEIGHT_SECONDARY_EXHIBITOR as G}from"../../../../constants";import c from"../../../../data";import{createShapeDot as k,createTextDef as Y,createTextDefLines as Q}from"../../../../engine/defs";import{DEFAULT_FONT_LIGHT_URL as $,DEFAULT_FONT_URL as W,loadCustomFontsUrls as q}from"../../../../engine/fonts";import{getQuarterTurns as j,getRollValue as J,rotateRectByQuarters as K,rotateTextDefByQuarters as tt,updateLinesScale as et}from"../../../../engine/update-def";import{boothStore as it,layersStore as _,uiState as m}from"../../../../store";import{RegularBooth as st,SpecialBooth as ot}from"../../../../store/BoothStore";import v from"../../../../tools/settings";import{t as S}from"../../../../utils/i18n";import nt from"../../../../utils/is-mobile";import at from"../../../../utils/is-webview";import{isArabicText as
|
|
1
|
+
import{Rect as B}from"@expofp/geometry";import{update as U}from"@expofp/renderer";import{reaction as M}from"mobx";import{FONT_WEIGHT_PRIMARY_BOOTH as V,FONT_WEIGHT_PRIMARY_EXHIBITOR as Z,FONT_WEIGHT_SECONDARY_BOOTH as X,FONT_WEIGHT_SECONDARY_EXHIBITOR as G}from"../../../../constants";import c from"../../../../data";import{createShapeDot as k,createTextDef as Y,createTextDefLines as Q}from"../../../../engine/defs";import{DEFAULT_FONT_LIGHT_URL as $,DEFAULT_FONT_URL as W,loadCustomFontsUrls as q}from"../../../../engine/fonts";import{getQuarterTurns as j,getRollValue as J,rotateRectByQuarters as K,rotateTextDefByQuarters as tt,updateLinesScale as et}from"../../../../engine/update-def";import{boothStore as it,layersStore as _,uiState as m}from"../../../../store";import{RegularBooth as st,SpecialBooth as ot}from"../../../../store/BoothStore";import v from"../../../../tools/settings";import{t as S}from"../../../../utils/i18n";import nt from"../../../../utils/is-mobile";import at from"../../../../utils/is-webview";import{isArabicText as rt}from"../../../../utils/rtl";import{BoothDrawerBaseWithoutPainter as ht}from"./BoothDrawerBase";import{getFont as I}from"./canvases";import{getLabelBorderInset as lt}from"./label-inset.js";let z=v.boothLabelColor;v.EXPO==="tqs2021"&&(z="#000");const x=nt||at,F=n=>n.replace(" ","").substring(0,4).replace(/[0-9]/g,"3").replace(/[A-Z]/gi,"A"),P=document.createElement("canvas").getContext("2d");export default function ct(n){if(!(!(n instanceof st)||n.noLabels))return new BoothLabelDrawer(n)}export function getMinZoomFactorForDot(n){return Array.isArray(n)&&n.length>0?Math.max(...n.map(t=>t)):typeof n=="number"?n:-0}export const isDirectionsMode=()=>!!(m.selectedRoute?.from&&m.selectedRoute?.to);export function getFontUrlByWeight(n,t=[],e="normal"){return[...t,{weight:500,url:W,style:"normal"},{weight:300,url:$,style:"normal"}].find(s=>+s.weight===n&&s.style===e)?.url||W}function b(n,t){return Number(getComputedStyle(document.body).getPropertyValue(n))||t}export function getBoothLabelWeights(){return{main:b(V,500),details:b(X,300)}}export function getExhibitorLabelWeights(){return{main:b(Z,500),details:b(G,300)}}export function getBadgeFontWeight(){return getExhibitorLabelWeights().details}const y="Details";export class BoothLabelDrawer extends ht{constructor(t){super(t),this.minZoomDotVisible=0,this.maxZoomDotVisible=0,this.exh=[],this.shapeLabel=void 0,this.shapeDot=void 0,this.fontSizes=[[],[]],this.lines=[[],[]],this.fontUrls=["",""],this.canvasRect=new B(t.rect.center,t.rect.size,t.rotate,t.elevation),this.paddingScaled=[4,4],this.padding=lt(t.borderWidth||it.borderWidth,t.rect.size),this.topLeftAlignment={horizontal:m.rtl?"right":"left",vertical:"top"},this.centerAlignment={horizontal:"center",vertical:"center"},this.prefixes=x?[{fontSize:7,name:"XS",short:!0},{fontSize:10,name:"S",short:!0},{fontSize:16,name:y,short:!1}]:[{fontSize:7,name:"XS",short:!0},{fontSize:10,name:"S",short:!0},{fontSize:12,name:"M",short:!0},{fontSize:14,name:"L",short:!0},{fontSize:18,name:y,short:!1}],!(t instanceof ot)&&(this.exh=c.hideExhibitors?[]:c.onlyFeaturedExhibitors?t.exhibitors.filter(e=>e.featured):t.exhibitors,x&&this.optimizationLevel()>=3&&(this.prefixes=this.prefixes.filter(e=>e.name!=="S")),this.createLines(),this.calculateFontSizeFactors(),this.shapeLabel=Y(Q(this.lines,this.booth.labelColor||z,0,this.fontUrls),new B(this.booth.rect.center,this.booth.rect.size,this.booth.rotate,this.booth.elevation),[...this.paddingScaled],{horizontal:"left",vertical:"top"}),this.shapeLabel.onScale=({pixelSize:e})=>this.layOutLabel(e),this.getShapeDot(),M(()=>[this.booth.skipDim,m.selectedRoute,_.layersLoaded],()=>{if(!_.layersLoaded)return;const e=isDirectionsMode();this.shapeLabel.dim=e||this.booth.skipDim?0:void 0,this.shapeDot.dim=e||this.booth.skipDim?0:void 0,U(this.shapeLabel,this.shapeDot)}),M(()=>m.mapSettings,({roll:e})=>{J(e??0)&&(this.shapeLabel.onRoll=({roll:i,pixelSize:a})=>{const s=j(i,this.shapeLabel.bounds.rotation);if(s===0)return;const{size:r}=this.canvasRect;return this.shapeLabel=tt(this.shapeLabel,s),!this.shapeLabel.hidden&&!this.exh.length&&r.x!==r.y&&(this.canvasRect=K(this.canvasRect,s),this.calculateFontSizeFactors(),this.layOutLabel(a),this.layOutDot(a)),[this.shapeLabel,this.shapeDot]})},{fireImmediately:!0}))}getShape(){return[this.shapeLabel,this.shapeDot]}layOutLabel(t){const e=this.lines[1]??[],i=this.fontSizes[1]??[];if(v.EXPO!=="wineparis2026"){const s=this.exh.length?this.topLeftAlignment:e.length?t<i[i.length-1].scaleFactor?this.topLeftAlignment:this.centerAlignment:this.topLeftAlignment;this.shapeLabel.alignment=s}return et(this.shapeLabel.lines,t,this.fontSizes)?(this.shapeLabel.padding[0]=this.paddingScaled[0]*t+this.padding,this.shapeLabel.padding[1]=this.paddingScaled[1]*t+this.padding,[this.shapeLabel]):[]}layOutDot(t){const e=t>=this.minZoomDotVisible&&t<=this.maxZoomDotVisible;if(!e&&this.shapeDot.hidden)return[];const i=this.shapeDot.bounds,a=this.shapeDot.source;return i.scale({x:a.width*t/i.size.x,y:a.height*t/i.size.y},i.center,i),this.shapeDot.hidden=!e,[this.shapeDot]}getShapeDot(){this.shapeDot=k(this.canvasRect,this.booth.labelColor||z),this.shapeDot.hidden=!0,this.shapeDot.onScale=({pixelSize:e})=>this.layOutDot(e);const t=this.shapeDot.source;this.maxZoomDotVisible=Math.min(this.canvasRect.size.x/t.width,this.canvasRect.size.y/t.height)}createLines(){const t=this.booth,e=[],i=[],a=x&&this.optimizationLevel()>=3?1:3;if(this.exh.length){const s=t.exhibitors.filter(o=>o.order===0),r=t.exhibitors.filter(o=>o.order);if(s.length>0)e.push(...s.map(o=>o.name));else if(c.onlyFeaturedExhibitors)e.push(...t.exhibitors.filter(o=>o.featured).map(o=>o.name));else if(r.length>0){e.push(...r.map(u=>u.name));const o=t.exhibitors.filter(u=>u.order===void 0);o.length>0&&e.push(S("and {{moreCount}} more",{moreCount:o.length}))}else t.exhibitors.length>a?e.push(`${t.exhibitors.length} ${c.exhibitorTermPlural}`):e.push(...t.exhibitors.map(o=>o.name));i.push(t.title||t.name)}else{const s=!!t.exhibitors.length;e.push(t.title||t.name),t.onHold?i.push(S("On Hold")):t.reserved?i.push(S("Reserved")):s||i.push(...t.exhibitors.map(r=>r.name).sort((r,o)=>r>o?1:-1)),t.size&&i.push(t.size.indexOf("/")>-1?t.size.substring(0,t.size.indexOf("/")).trim():t.size),t.price&&t.price!=="0"&&!m.previewMode&&i.push(t.price)}m.rtl&&e.forEach((s,r)=>{(s.endsWith(".")||s.endsWith("!")||s.endsWith("?"))&&(e[r]=e[r]+"\u200F"),rt(s)&&(e[r]=e[r]+" ")}),this.lines=[e,i]}calculateFontSizeFactors(){const t=this.lines[0];let e;const i=this.canvasRect,a=[],s=[],r=this.prefixes.slice(0,this.exh.length?this.prefixes.length:this.prefixes.length-1),{main:o,details:u}=this.exh.length?getExhibitorLabelWeights():getBoothLabelWeights();for(const{fontSize:l,short:p}of r){const d=l*devicePixelRatio,L=.9*l*devicePixelRatio,f=I(d,o),T=I(L,u),O=c.hideExhibitorBoothNumber||p;let w,A,D,g;if(this.exh.length)e=p?[]:this.lines[1],D=Math.max(...t.map(h=>this.measureText(h,f).width),...e.map(h=>this.measureText(h,T).width)),w=Math.max(...t.map(h=>this.exh.length?this.measureText(F(h),f).width:this.measureText(F(h),f).width+3+3),...e.map(h=>this.measureText(F(h),T).width)),g=d*t.length+L*e.length+devicePixelRatio*(t.length+e.length)+3,A=O?g/t.length:null;else{const h=t[0].replace(/[0-9]/g,"3").replace(/[A-Z]/g,"A"),H=4;D=this.measureText(h,f).width+3+3,g=d+H}const C=i.size.x/(w||D),N=i.size.y/(A||g),E=Math.min(C,N);a.push({scaleFactor:E,value:d,lines:[]}),O||s.push({scaleFactor:E,value:L,lines:[]})}if(!this.exh.length){const l=a[a.length-1],p=this.prefixes.find(d=>d.name===y);p&&(a.push({scaleFactor:l.scaleFactor/1.8,value:p.fontSize*devicePixelRatio,lines:[]}),s.push({scaleFactor:l.scaleFactor/1.8,value:p.fontSize*(x?1:.9)*devicePixelRatio,lines:[]}))}const R=q();this.fontUrls=[getFontUrlByWeight(o,R),getFontUrlByWeight(u,R)],this.minZoomDotVisible=getMinZoomFactorForDot(a.map(l=>l.scaleFactor)),this.fontSizes=[a,s]}calcArea(t,e){return Math.floor(Math.max(0,t)*Math.max(0,e)/1e3)}optimizationLevel(){return Math.min(c.viewOptimizationLevel?c.viewOptimizationLevel:Math.floor(this.calcArea(this.canvasRect.size.x,this.canvasRect.size.y)/5e3),3)}measureText(t,e){return P.font=e,P.measureText(t)}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Rect as
|
|
1
|
+
import{Rect as A}from"@expofp/geometry";import C from"debug";import{SEPARATOR as I}from"../../../../constants";import{createImageDef as E}from"../../../../engine/defs";import{flipImageDef as T,isInnerInsideOuter as U,rotateImageDef as _}from"../../../../engine/utils/rotation";import{boothStore as y,uiState as z}from"../../../../store";import K from"../../../../tools/settings";import{loadBlobsInBatchesById as M}from"../../../../utils/loadImagesInBatches";import{clearHoveredBooth as Z,hoverBooth as j,rememberBoothShapes as q,selectBooth as F}from"../../pointer";import{createLogoPreparer as G}from"./booth-logos";import J from"./config-booth-bg";import Q from"./config-booth-bookmark";import V from"./config-booth-border";import X from"./config-booth-labels";import Y from"./config-booth-labels-special";import{registerLayerImages as oo}from"./layer-images";import{createBoothImg as eo,getImageLayerName as to,mapBoothsLogos as ro}from"./loadBoothsImages";const k=C("efp:booth-logos");export const BOOTHS_CHUNK_SIZE=350;export default function no($,D){return(l=>{const i=$,d=[],m=[],p=[],g=[],b=[],u=to(i),B={name:u,children:[]};for(const o of l){const s=J(o)?.getShape();s&&(d.push(...s),q(o,s));const a=X(o)?.getShape();a&&m.push(...a);const c=Y(o)?.getShape();if(c&&p.push(...c),!K.borderless){const e=V(o)?.getShape();e&&g.push(e)}const h=Q(o)?.getShape();h&&b.push(h)}const R=m.filter(o=>o.lines),x=p.filter(o=>o.lines),O=m.filter(o=>o.source),P=p.filter(o=>o.source);if(!z.hideLogoInBooth){const o=ro(l);oo(u,async()=>{const s=await M(o,BOOTHS_CHUNK_SIZE),a=[],c=G(),h=await Promise.all([...s].map(async([e,t])=>{const n=y.boothById.get(e);return[e,n,n?await c(n,t):null]}));for(const[e,t,n]of h){if(!t){k("dropped a logo: no booth has id %s",e);continue}if(!n){k("dropped the logo of booth %s: the image could not be read",e);continue}const{blob:w,aspectRatio:v}=n,{bounds:H}=eo(t,v),r=E(w,H),N=t.borderWidth||y.borderWidth,S=t.rect.expand(-N),W=new A(S.center,S.size,t.rotate);r.onRoll=U(r.bounds,W)?({roll:f})=>_(r,f)?[r]:void 0:({roll:f})=>T(r,f)?[r]:void 0,t.shapes.push(r),a.push(r)}return{layer:B,children:a}})}let L=[];if(l.length){const o=i+I;L=[{name:`${o}boothBackground`,children:d,onPointerMove:j,onPointerOut:Z,onClick:F},{name:`${o}labels`,children:R},{name:`${o}specialLabels`,children:x},{name:`${o}dots`,children:O},{name:`${o}specialDots`,children:P},B,{name:`${o}boothsBookmark`,children:b},{name:`${i}${I}boothBorder`,children:g}]}return{name:i,children:L}})(D)}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getConfig as x}from"@expofp/config";import{degToRad as C,Rect as T}from"@expofp/geometry";import{resolve as v}from"@expofp/resolve";import{BOOTHS_PAINTER_MARKER as D,SEPARATOR as s}from"../../../../constants";import{getFpPaths as F}from"../../../../data/fp-payloads";import{createImageDef as G,createLayerDef as h}from"../../../../engine/defs";import m,{boothStore as H,uiState as k}from"../../../../store";import K from"../../../../store/init/init-booths";import{getChildLayers as Y}from"../../../../store/init/init-layers";import{LayersMode as J}from"../../../../store/LayerStore";import{chunkArray as U}from"../../../../utils";import{
|
|
1
|
+
import{getConfig as x}from"@expofp/config";import{degToRad as C,Rect as T}from"@expofp/geometry";import{resolve as v}from"@expofp/resolve";import{BOOTHS_PAINTER_MARKER as D,SEPARATOR as s}from"../../../../constants";import{getFpPaths as F}from"../../../../data/fp-payloads";import{createImageDef as G,createLayerDef as h}from"../../../../engine/defs";import m,{boothStore as H,uiState as k}from"../../../../store";import K from"../../../../store/init/init-booths";import{getChildLayers as Y}from"../../../../store/init/init-layers";import{LayersMode as J}from"../../../../store/LayerStore";import{chunkArray as U}from"../../../../utils";import{loadLayerImages as Z}from"../../../../utils/loadLayerImages";import j,{BG_LAYER_NAME as $,FG_LAYER_NAME as E}from"./config-bg";import q,{BOOTHS_CHUNK_SIZE as z}from"./config-booths";import{configOutdoorPoiLayer as Q}from"./config-outdoor-poi";import{registerLayerImages as V}from"./layer-images";import{createModelDefFromElement as W}from"./layer-models";import{getImageLayerName as X,getLayerGraphics as ee,getModelLayerName as oe}from"./loadBoothsImages";function re(e){return e.childLayers.length?e.childLayers:Y(e,e.basePriority,15).layers}async function R(e,i){const r=[],n=K(m,e);if(Q(e,n))return e.loaded=!0,e.configured=!0,e.children=[],h(e.name,[],{hidden:!0});const a=await j(e),c=[],S=U(n,z),d=H.booths.filter(o=>o.rect&&(!o.layer||o.layer===e||o.layer.childLayers.includes(e))&&o.exhibitors.find(t=>!!t.logoInBooth&&!!t.logo?.url)&&!k.hideLogoInBooth),I=new Map(d.map(o=>[o,o.noLabels]));d.forEach(o=>o.noLabels=!0),n.length&&S.forEach((o,t)=>{c.push(q(`${e.name}${s}${D}${s}${t}`,o))});for(const[o,t]of I)o.noLabels=t;e.loaded=!0;const g=a.children.find(o=>o.name===$),l=a.children.find(o=>o.name===E),u=X(e.name),{icons:f,models:A}=ee(e),p={name:u,children:[]},y={name:oe(e.name),children:A.map(W)};f.length&&V(u,async()=>{const o=await Z(f),t=[];for(const M of o){const{bounds:{x:L,y:b,height:P,angle:N,width:_},source:w}=M,O=T.fromMinMax({x:L,y:b},{x:L+_,y:b+P},C(N));t.push(G(w,O))}return{layer:p,children:t}}),g&&r.push({...g,name:`${a.name}${s}${$}`}),c.length&&r.push(...c),l&&r.push({...l,name:`${a.name}${s}${E}`}),f.length&&r.push(p),y.children.length&&r.push(y);const B=await Promise.all(e.childLayers.sort((o,t)=>o.basePriority-t.basePriority).map(o=>R(o,!0)));return r.push(...B),e.children=r,e.configured=!0,h(e.name,r,{hidden:!i})}export default async function te(e){if(e.configured)return h(e.name,e.children,{hidden:!e.visible});if(m.layerStore.mode!==J.Default&&!F(e.name)&&!e.rootParent)try{const n=x().fpSvgLayerJsRefs[e.name];n&&await v(n)}catch(n){console.warn(`Layer data not loaded: ${e.name}`,n)}const i=re(e);i.length&&(e.childLayers=i);const{layers:r}=m.layerStore;return m.layerStore.layers=[...r,...i.filter(n=>!r.some(a=>a.name===n.name))],R(e,e.visible)}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { SceneDef } from '@expofp/renderer';
|
|
2
|
-
import { FloorPlanMarkerEvent } from '../../../../types';
|
|
1
|
+
import { type SceneDef } from '@expofp/renderer';
|
|
2
|
+
import { type FloorPlanMarkerEvent } from '../../../../types';
|
|
3
3
|
export declare const MARKER_LAYER_NAME = "markers";
|
|
4
4
|
/** What {@link configMarkers} needs: the scene whose root layers hold the marker layer. */
|
|
5
5
|
export interface MarkerOptions {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Box as
|
|
1
|
+
import{Box as K}from"@expofp/geometry";import{update as v}from"@expofp/renderer";import{reaction as I}from"mobx";import{getBounds as y}from"../../../../engine/canvases";import{createImageDef as E}from"../../../../engine/defs";import l,{layersStore as R,uiState as N}from"../../../../store";import{setMarkerResolver as P}from"../../pointer";import{createImageCanvas as O}from"./canvases";const C="_selected";export const MARKER_LAYER_NAME="markers";function T(r,f){const{center:c,rotation:o,elevation:d}=r.bounds,{width:i,height:s}=r.source;return r.bounds=y(c.x,c.y,i,s,f,o,d),[r]}function V(r){L=r}export function configMarkers(r){const{scene:f}=r,c=[],o=new Map,d=new Map;let i=[];const s=f.rootLayer.children.find(e=>e.name===MARKER_LAYER_NAME);s.onScale=({pixelSize:e})=>V(e),P(markerAt),v(s);async function p(e){const n=[];e.forEach(u=>{const{name:a,content:t,width:h,height:D,scale:g}=u;if(o.has(a))return;const m=new Image,S=new Promise((M,b)=>{m.onload=()=>{o.set(a,{img:m,width:h,height:D,scale:g}),M()},m.onerror=x=>{b(x)}});n.push(S),m.src=t,m.crossOrigin="anonymous"}),await Promise.all(n)}const B=e=>{e.onScale=({pixelSize:n})=>T(e,n)},z=e=>{e.screenSpace||(e.onRoll=({roll:n})=>{if(n!==e.bounds.rotation)return e.bounds.rotate(n-e.bounds.rotation,e.bounds),[e]})};function w(e,n,u){const a=d.get(e);if(a)return a;const t=O(n.img,n.width,n.height,u);return d.set(e,t),t}function A(){const e=l.routeStore.markersData.markers;if(!e.length)return;i=[];const n=1,u=0,a=N.is3DView;e.forEach(t=>{const h=o.get(t.icon);if(!h)return;const D=o.get(t.selectedIcon);if(!D)return;const g=h.scale||window.devicePixelRatio,m=w(t.icon,h,g),S=w(t.selectedIcon,D,g),M=R.findLayer(t.z)?.visible??!0,b=y(t.x,t.y,m.width,m.height,n,u),x=y(t.x,t.y,S.width,S.height,n,u);let k;switch(t.position){case"lefttop":k=[0,0];break;case"centertop":k=[.5,0];break;case"centerbottom":k=[.5,1];break;default:k=[.5,.5]}const F={...E(m,b,{hidden:!M,origin:k}),id:t.id,scale:g,screenSpace:a},H={...E(S,x,{hidden:!(M&&t.active),origin:k}),id:`${t.id}${C}`,scale:g,screenSpace:a};i.push(F,H)}),s.children=i,i.forEach(t=>{B(t),z(t)})}function _(){s.children=[],i=[]}function $(){const e=l.routeStore.markersData.markers;e.length&&e.forEach(n=>{const u=i.find(h=>h.id===n.id),a=i.find(h=>h.id===`${n.id}${C}`);if(!u||!a)return;const t=R.findLayer(n.z)?.visible??!0;n.active?(u.hidden=!0,a.hidden=!(t&&n.active)):(u.hidden=!t,a.hidden=!0)})}return c.push(I(()=>[l.routeStore.selectedMarkers,l.layerStore.visible],()=>{if(!l.routeStore.markersData.markers.length){_(),v(s);return}$(),v(...i)})),c.push(I(()=>l.routeStore.markersData.markers,()=>{p(l.routeStore.markersData.icons).then(()=>{A(),v(s)})},{fireImmediately:!0})),function(){c.forEach(n=>n()),c.length=0,s.onScale=void 0,P(),v(s)}}export function markerAt(r,f){return getMarkerFromClick(r,f,L)}export function getMarkerFromClick(r,f,c){for(const o of l.routeStore.markersData.markers){const d=l.routeStore.markersData.icons.find(p=>p.name===o.icon);if(!d)continue;const i=d.width*c*devicePixelRatio,s=d.height*c*devicePixelRatio;if(W(r,f,o.x,o.y,i,s)){const p=l.layerStore.findLayer(o.z);if(!p||p&&p.visible)return o}}return null}function W(r,f,c,o,d,i){return K.fromCenter({x:c,y:o},{x:2*d,y:2*i}).containsPoint({x:r,y:f})}let L=1;
|
|
@@ -11,8 +11,8 @@ export declare const MODEL_3D_ATTRIBUTE = "data-model-3d";
|
|
|
11
11
|
* The rotation an element's `transform` carries, in radians.
|
|
12
12
|
*
|
|
13
13
|
* Only the first transform in the list is read, which is what the designer emits. It inherits the
|
|
14
|
-
* assumption `
|
|
15
|
-
* the element's own center, because that is what a geometry `Rect` does. A transform with a
|
|
14
|
+
* assumption `loadLayerImages` has always made: an SVG `rotate(a, cx, cy)` is treated as pivoting
|
|
15
|
+
* about the element's own center, because that is what a geometry `Rect` does. A transform with a
|
|
16
16
|
* different pivot is placed wrongly — pre-existing behavior, recorded rather than fixed here.
|
|
17
17
|
* @param element - The graphic to read.
|
|
18
18
|
* @returns The rotation in radians, positive = clockwise.
|
|
@@ -18,11 +18,28 @@ export interface LayerGraphics {
|
|
|
18
18
|
models: SVGImageElement[];
|
|
19
19
|
}
|
|
20
20
|
export declare function getLayerGraphics(layer: Layer): LayerGraphics;
|
|
21
|
+
/** Where one booth's logo goes. */
|
|
21
22
|
export interface BoothImg {
|
|
23
|
+
/** The booth the logo sits in. */
|
|
22
24
|
booth: Booth;
|
|
25
|
+
/** The booth's slug, which becomes the def's name. */
|
|
23
26
|
name?: string;
|
|
24
|
-
|
|
27
|
+
/**
|
|
28
|
+
* The booth center, the fitted logo size, and the booth rotation.
|
|
29
|
+
*
|
|
30
|
+
* The image def keeps this `Rect` by reference, and `rotateImageDef` and `flipImageDef` rotate
|
|
31
|
+
* it in place. Each booth gets its own, so no other owner sees those writes.
|
|
32
|
+
*/
|
|
25
33
|
bounds: Rect;
|
|
26
34
|
}
|
|
27
|
-
|
|
35
|
+
/**
|
|
36
|
+
* Fits a logo inside a booth and returns where the logo goes.
|
|
37
|
+
*
|
|
38
|
+
* This function takes the logo's aspect ratio, not the logo and not its pixel size. The ratio is
|
|
39
|
+
* the only fact it ever needed from the image: every length below comes from the booth.
|
|
40
|
+
* @param booth - The booth to fit the logo into.
|
|
41
|
+
* @param ratio - The logo's width divided by its height. A finite positive number.
|
|
42
|
+
* @returns The placement.
|
|
43
|
+
*/
|
|
44
|
+
export declare function createBoothImg(booth: Booth, ratio: number): BoothImg;
|
|
28
45
|
//# sourceMappingURL=loadBoothsImages.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{degToRad as
|
|
1
|
+
import{degToRad as f,radToDeg as p,Rect as d}from"@expofp/geometry";import{update as h}from"@expofp/renderer";import{select as u}from"d3";import{SEPARATOR as g}from"../../../../constants";import{getFpSvgJs as y}from"../../../../data/fp-payloads";import{getLayerSvg as L}from"../../../../data/svg";import{getLogoUrl as A}from"../../../../utils/getLogoUrl";import{boothLogoExhibitor as x}from"./booth-logos";import{invokeLayerImages as T}from"./layer-images";import{MODEL_3D_ATTRIBUTE as R}from"./layer-models";export async function loadLayersImages(){const e=T();await Promise.all(e.map(async t=>{const r=await t;if(!r?.children.length)return;const{layer:o,children:s}=r;o.children.push(...s),h(o)}))}export const getImageLayerName=e=>`${e}${g}images`,getModelLayerName=e=>`${e}${g}models`;export function mapBoothsLogos(e){const t=new Map;for(const r of e){if(!r.rect)continue;const o=x(r)?.logo;o&&t.set(r.id,{preferred:A(o),fallback:o.url})}return t}export function getLayerGraphics(e){const t=u(L(e)).select(`[data-layer="${e.name}"]`),r=((y().__fpVersion??0)>5?t.selectAll(":scope > image, :scope > g:not([data-layer]) image").nodes():t.selectAll(":scope > g[data-is-editable='false'] image").nodes()).filter(Boolean),o=[],s=[];for(const a of r)(a.hasAttribute(R)?s:o).push(a);return{icons:o,models:s}}export function createBoothImg(e,t){const r=e.rect,o=r.size.width,s=r.size.height,a=s?o/s:1;let i,n,c;const l=.9;a>t?(n=s*l,i=n*t):(i=o*l,n=i/t);const m=e.rotate||0;return t>=2&&!m&&s>=o*2?(n=o*l,i=n*t,c=-90):c=p(m),i>o&&(i=o,n=i/t),n>s&&(n=s,i=n*t),{name:e.slug,bounds:new d(r.center,{x:i,y:n},f(c),e.elevation),booth:e}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{degToRad as Me,lineAngle as ae,pointDistance as le}from"@expofp/geometry";import{update as
|
|
1
|
+
import{degToRad as Me,lineAngle as ae,pointDistance as le}from"@expofp/geometry";import{update as Y}from"@expofp/renderer";import{useEffect as ve,useRef as v}from"react";import{getBounds as $}from"../../../engine/canvases";import Le from"../../../tools/base-runtime-url";import{loadImage as Re}from"../../../utils/loadImage";import{mapCamera as ue}from"../camera";import{createImageCanvas as Se}from"../drawing/config/canvases";import{getRouteLayerRegex as be,getRouteStopLayerRegex as Te,TRAFFIC_VEHICLES as te}from"./trafficLayers";import{UpdateQueue as Ae}from"./UpdateQueue";const ne=2,Fe=ne*3.5,Z=ne*12,de=Z*.7,Pe=8,Ce="transport_locations",_e=150,Ne="#a4aab6",he=1e3,De=2e4,fe=500;export function useManageTraffic({permission:t,scene:r,dataJsonUrl:n,websocketUrl:a}){const e=v(window.devicePixelRatio),s=v(new Map),o=v(new Map),c=v(null),h=v(null),u=v(0),M=v(1),T=v(new Ae),L=v(new Map),x=v(he),f=v(new Map),p=v(void 0);ve(()=>{if(!t||!r)return;let l=!1,P;const R=r.rootLayer.children,g=o.current,y=s.current,I=T.current;async function ye(){try{let d;try{const i=await fetch(n,{method:"GET",headers:{"Content-Type":"application/json"}});if(!i.ok||i.status===204)return;d=await i.json()}catch(i){console.warn("useManageTraffic failed to get JSON",i)}if(!d||d.disabled||d.error)return;e.current=ge(ue()?.state().pixelSize??window.devicePixelRatio);const D=new Map(d.routes.map(({id:i,color:m})=>[i,m])),z=new Map;D.forEach(i=>{z.set(i,Ve({radius:Fe,color:i,scale:window.devicePixelRatio}))});const U=be(),j=R.filter(i=>U.test(i.name)),Q=Te(),q=R.filter(i=>Q.test(i.name));d.routes.slice(0,j.length).forEach(({id:i,color:m,path:w,stops:C,hiddenPoints:S},V)=>{L.current.set(i,w);const E=j[V];if(E){const H=new Map(S?.map(_=>[ce(_),_])??[]);for(let _=1;_<w.length;_++){const b=w[_-1],W=w[_];H.has(ce(b))||H.has(ce(W))||E.children.push({points:{p0:b,p1:W},color:m,width:ne})}E.children.length&&I.add(()=>Y(E))}const A=q[V],F=z.get(m);A&&F&&C?.length&&(C.forEach(H=>{A.children.push({source:F,bounds:$(H.x,H.y,F.width,F.height,e.current)})}),A.children.length&&I.add(()=>Y(A)))});const O=R.find(i=>i.name===te);if(!O){console.warn(`useManageTraffic: the scene has no "${te}" layer`);return}const B=new Map;O.onScale=({pixelSize:i})=>{e.current=ge(i);const m=[];for(const w of q){const C=w.children;for(const S of C){const V=S.source;S.bounds=$(S.bounds.center.x,S.bounds.center.y,V.width,V.height,e.current,S.bounds.rotation),m.push(S)}}for(const w of s.current.values()){const C=w.source;w.bounds=$(w.bounds.center.x,w.bounds.center.y,C.width,C.height,e.current,w.bounds.rotation),m.push(w)}return m},I.add(()=>Y(O)),D.forEach((i,m)=>{B.set(m,me({id:m,width:Z,height:Z,color:i,scale:window.devicePixelRatio}))});const xe=me({id:"orphan",width:Z,height:Z,color:Ne,scale:window.devicePixelRatio});let G=null;try{const i=await Re(`${Le}icons/bus-white.svg`);G=Se(i,de,de,window.devicePixelRatio)}catch(i){console.error(i)}h.current=i=>{try{const m=JSON.parse(i.data);if(m.type!==Ce)return;const w=i.timeStamp||performance.now();M.current=Math.round(w-u.current),u.current=w;const C=Math.max(M.current??fe,fe),S=O.children;let V=!1;m.data.forEach(({id:E,x:A,y:F,route_id:H,hidden:_})=>{g.has(E)&&(g.get(E)?.(),g.delete(E));const b=y.get(E),W=y.get(re(E))??null;if(_&&b&&W){b.hidden=!0,W.hidden=!0,I.add(()=>Y(b,W));return}if(f.current.set(E,performance.now()),!b){const k=B.get(H)??xe,N={source:k,bounds:$(A,F,k.width,k.height,e.current,0)};if(y.set(E,N),G){const X=re(E),ie={source:G,bounds:$(A,F,G.width,G.height,e.current,0)};G.setAttribute("id",X),y.set(X,ie),S.push(N,ie)}else S.push(N);V=!0;return}const Ee=b.bounds.center,ee=We(Ee,{x:A,y:F},L.current.get(H));if(ee.reduce((k,N,X)=>X===0?k:k+oe(ee[X-1],N),0)>=_e||document.hidden)we({updateQueue:I,vehicle:b,vehicleFinery:W,x:A,y:F,scale:e.current,angle:Oe(b.bounds.center,{x:A,y:F})});else{const k=ke(ee,C,N=>{we({updateQueue:I,vehicle:b,vehicleFinery:W,x:N.x,y:N.y,scale:e.current,angle:N.angle})});g.set(E,k)}}),V&&I.add(()=>Y(O))}catch(m){console.error("handleSocketMessage",m)}},u.current=performance.now(),K(),window.addEventListener("online",se),Ie(d.config?(Number(d.config.vehicle_inactive_interval)||20)*1e3:De)}catch(d){console.warn(d)}}ye();function K(){l||c.current?.readyState===WebSocket.OPEN||c.current?.readyState===WebSocket.CONNECTING||(c.current=new WebSocket(a),c.current.onmessage=h.current,c.current.onopen=()=>{x.current=he},c.current.onclose=()=>{if(l||!navigator.onLine)return;P=window.setTimeout(K,x.current);const d=3e4;x.current=Math.min(x.current*2,d)})}function se(){K()}function Ie(d){clearInterval(p.current),p.current=window.setInterval(()=>{const D=performance.now(),z=[],U=[];f.current.forEach((j,Q)=>{if(D-j<d)return;const q=y.get(Q);q&&(q.hidden=!0,U.push(q),z.push(Q));const O=re(Q),B=y.get(O);B&&(B.hidden=!0,U.push(B),z.push(O))}),U.length&&I.add(()=>Y(...U)),z.forEach(j=>f.current.delete(j))},d)}return()=>{l=!0,clearTimeout(P),c.current?.close(),c.current=null;const d=R.find(D=>D.name===te);d&&(d.onScale=void 0),g.forEach(D=>D?.()),g.clear(),y.clear(),I.destroy(),window.removeEventListener("online",se),clearInterval(p.current)}},[t,r,n,a])}function ge(t){return Math.min(t||window.devicePixelRatio,Pe)}function Oe(t,r){return ae(t,r)}function Ve({radius:t,scale:r,color:n}){const a=document.createElement("canvas"),e=a.getContext("2d");e.imageSmoothingEnabled=!1;const s=Math.ceil(t*2*r),o=s/2,c=t*.78,h=t*.33;return a.width=s,a.height=s,e.translate(o,o),e.scale(r,r),e.beginPath(),e.arc(0,0,t,0,2*Math.PI),e.fillStyle="#FFFFFF",e.fill(),e.beginPath(),e.arc(0,0,c,0,2*Math.PI),e.fillStyle=n,e.fill(),e.beginPath(),e.arc(0,0,h,0,2*Math.PI),e.fillStyle="#FFFFFF",e.fill(),a}function me({id:t,width:r,height:n,color:a,scale:e}){const s=2*e,o=r/2*e,c=n*e,h=.6,u=.01,M=c*h,T=c,L=8*e,x=T+s+M/2+L*2,f=o*2+M+s+L*2,p=document.createElement("canvas");p.setAttribute("id",t),p.width=x,p.height=f;const l=p.getContext("2d"),P=x/2,R=f/2;l.save(),l.translate(P,R),l.rotate(-Math.PI/2),l.translate(-P,-R);const g=P,y=R-T/2+o,I=y+M;return l.shadowColor="rgba(16, 24, 40, 0.2)",l.shadowBlur=L/2,l.beginPath(),l.arc(g,y,o,Math.PI,0,!1),l.bezierCurveTo(g+o,y+c*.3,g+u*o,I,g,I),l.bezierCurveTo(g-u*o,I,g-o,y+c*.3,g-o,y),l.closePath(),l.fillStyle=a,l.fill(),l.strokeStyle="#FFFFFF",l.lineWidth=s,l.stroke(),l.restore(),p}function oe(t,r){return le(t,r)}function re(t){return`${t}_finery`}function we({updateQueue:t,vehicle:r,vehicleFinery:n,x:a,y:e,scale:s,angle:o}){const c=r.source;if(r.bounds=$(a,e,c.width,c.height,s,o),r.hidden=!1,n){const h=ue()?.state().roll??0,u=n.source;n.bounds=$(a,e,u.width,u.height,s,Me(h)),n.hidden=!1,t.add(()=>Y(n,r))}else t.add(()=>Y(r))}function J(t,r,n){return{x:t.x+(r.x-t.x)*n,y:t.y+(r.y-t.y)*n}}function pe(t,r){let n=1/0,a={index:0,t:0};for(let e=0;e<r.length-1;e++){const s=r[e],o=r[e+1],c=o.x-s.x,h=o.y-s.y,u=c*c+h*h,M=u?((t.x-s.x)*c+(t.y-s.y)*h)/u:0,T=Math.max(0,Math.min(1,M)),L=J(s,o,T),x=oe(t,L);x<n&&(n=x,a={index:e,t:T})}return a}function He(t,r,n){const a=oe(t,r),e=Math.max(2,Math.ceil(a/n)+1),s=[];for(let o=0;o<e;o++){const c=o/(e-1),h=J(t,r,c);s.push(h)}return s}function We(t,r,n){if(!n||!n.length)return He(t,r,10);const a=pe(t,n),e=pe(r,n),s=[],o=c=>s.push(c);a.index+1<n.length?o(J(n[a.index],n[a.index+1],a.t)):o(n[a.index]);for(let c=a.index+1;c<=e.index&&c<n.length;c++)o(n[c]);return e.index+1<n.length?o(J(n[e.index],n[e.index+1],e.t)):o(n[e.index]),s}function ke(t,r,n,a){if(t.length<2)return()=>{};let e=null,s;const o=[];let c=0;for(let u=0;u<t.length-1;u++){const M=le(t[u],t[u+1]);o.push(M),c+=M}const h=u=>{e||(e=u);const M=u-e,T=Math.min(M/r,1),L=T*c;let x=0,f=0;for(;f<o.length&&x+o[f]<L;)x+=o[f],f++;f>=o.length&&(f=o.length-1);const p=t[f],l=t[Math.min(f+1,t.length-1)],P=o[f]||0,R=P===0?0:(L-x)/P,g=p.x+(l.x-p.x)*R,y=p.y+(l.y-p.y)*R,I=ae(p,l);n({x:g,y,angle:I}),T<1?s=requestAnimationFrame(h):a&&a()};return s=requestAnimationFrame(h),()=>{s&&cancelAnimationFrame(s)}}function ce(t){return`${t.x},${t.y}`}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Rect } from '@expofp/geometry';
|
|
2
2
|
export declare function createCircleCanvas(radius: number, color: string): HTMLCanvasElement;
|
|
3
3
|
export declare function createBookmarkCanvas(maxSizePx: number, pixelRatio: number): HTMLCanvasElement;
|
|
4
|
-
export declare function getBounds(x: number, y: number, width: number, height: number, scale?: number, rotate?: number): Rect;
|
|
4
|
+
export declare function getBounds(x: number, y: number, width: number, height: number, scale?: number, rotate?: number, elevation?: number): Rect;
|
|
5
5
|
//# sourceMappingURL=canvases.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Rect as d}from"@expofp/geometry";const r=new Map;export function createCircleCanvas(i,n){const c=n.toUpperCase();if(!r.has(c)){const
|
|
1
|
+
import{Rect as d}from"@expofp/geometry";const r=new Map;export function createCircleCanvas(i,n){const c=n.toUpperCase();if(!r.has(c)){const e=document.createElement("canvas"),a=i*2*devicePixelRatio+1*2;e.width=a,e.height=a;const s=e.getContext("2d");s.fillStyle=n,s.beginPath(),s.arc(a/2,a/2,i*devicePixelRatio,0,2*Math.PI),s.fill(),r.set(c,e)}return r.get(c)}const h=new Map;export function createBookmarkCanvas(i,n){const c=i;if(h.has(c))return h.get(c);const e=i,o=e*1.4,a=Math.ceil(e*n),s=Math.ceil(o*n),l=document.createElement("canvas");l.width=a,l.height=s;const t=l.getContext("2d");return t.scale(n,n),t.fillStyle="#fdbf2b",t.strokeStyle="#fff",t.lineWidth=4/n,t.beginPath(),t.moveTo(0,0),t.lineTo(0,o),t.lineTo(e/2,o-e/2),t.lineTo(e,o),t.lineTo(e,0),t.lineTo(0,0),t.fill(),t.stroke(),h.set(c,l),l}export function getBounds(i,n,c,e,o=1,a,s){const l=c*o,t=e*o;return new d({x:i,y:n},{x:l,y:t},a,s)}
|
|
@@ -18,12 +18,16 @@ export interface FontSizeFactor {
|
|
|
18
18
|
export declare function rectToShapeDef(rect: SVGRectElement, color?: string): ShapeDef;
|
|
19
19
|
export declare function meshToShapeDef(mesh: MeshType, color: string): ShapeDef;
|
|
20
20
|
export declare function createShapeDef(shape: Box | Rect | Polygon | Mesh, color?: string): ShapeDef;
|
|
21
|
-
export declare function createImageDef(source:
|
|
21
|
+
export declare function createImageDef<Source extends ImageSource>(source: Source, bounds: Rect, options?: SharedDef & {
|
|
22
22
|
origin?: [number, number];
|
|
23
|
-
}): ImageDef
|
|
23
|
+
}): ImageDef & {
|
|
24
|
+
source: Source;
|
|
25
|
+
};
|
|
24
26
|
export declare function createTextDef(textLines: TextLineDef[], bounds: Rect, padding: [number, number], alignment: TextAlignment, options?: SharedDef): TextDef;
|
|
25
27
|
export declare function createTextDefLines(textLines: TextLines, color: string, fontSize: number, fontUrl?: [string | undefined, string | undefined]): TextLineDef[];
|
|
26
28
|
export declare function createLayerDef(name: string, children: RenderableDefCollection, options?: SharedDef): LayerDef;
|
|
27
29
|
export declare function createSceneDef(layers: LayerDef[], viewboxRect: Box | SVGRectElement, background?: string): SceneDef;
|
|
28
|
-
export declare function createShapeDot(rect: Rect, color?: string, radius?: number): ImageDef
|
|
30
|
+
export declare function createShapeDot(rect: Rect, color?: string, radius?: number): ImageDef & {
|
|
31
|
+
source: HTMLCanvasElement;
|
|
32
|
+
};
|
|
29
33
|
//# sourceMappingURL=defs.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{angleDiff as
|
|
1
|
+
import{angleDiff as p,Rect as k}from"@expofp/geometry";import{getBounds as w}from"./canvases";export function updateLinesScale(t,o,n){let e=!1;return t.forEach((r,i)=>{let s=0;n[i].forEach(({value:a,scaleFactor:c})=>{o<c&&(s=a)}),r.fontSize!==s*o&&(e=!0),r.fontSize=s*o}),e}export function rotateTextDefByQuarters(t,o){const{center:n,size:e,rotation:r,elevation:i}=t.bounds,s=o%2!==0;return t.bounds.set(n.x,n.y,s?e.y:e.x,s?e.x:e.y,r+o*Math.PI/2,i),t}export function rotateRectByQuarters(t,o){const{size:n,center:e,rotation:r,elevation:i}=t,s=o%2!==0?{x:n.y,y:n.x}:n;return new k(e,s,r+o*Math.PI/2,i)}export function getQuarterTurns(t,o){if(!Number.isFinite(t)||!Number.isFinite(o))return 0;const n=p(t,o);return Math.abs(n)<=Math.PI/4?0:Math.round(n/(Math.PI/2))}export function shouldFlip(t,o){const n=p(t,o),e=Math.PI/2;return Math.abs(n)>e+.1}export function flipAngle(t){return(t+Math.PI+Math.PI)%(2*Math.PI)-Math.PI}export function getClampedBoundsCanvas(t,o,n,e){const r=o.width,i=o.height,s=t.size,a=t.center,c=t.rotation,d=s.x/r,M=s.x-n*2,b=(s.y-n*2)*.8,y=0,g=M/r,I=b/i,S=Math.min(g,I,d);e=Math.min(Math.max(e,y),S);const P=r*e,z=i*e,h=Math.sin(c),f=Math.cos(c),u=s.x/2-n,x=-s.y/2+n,B=a.x+u*f-x*h,R=a.y+u*h+x*f,l=P/2,m=-z/2,W=l*f-m*h,H=l*h+m*f,X=B-W,Y=R-H;return w(X,Y,r,i,e,c,t.elevation)}export function getRollValue(t){if(!t)return!1;if(!Number.isInteger(+t)||+t!=1&&+t!=0)throw new Error("Map roll: setting value is incorrect");return!!+t}
|
|
@@ -67,6 +67,8 @@ export declare class Exhibitor implements Omit<RawExhibitor, 'categories' | 'boo
|
|
|
67
67
|
/** Always the object form — `normalizeLegacyData` converts legacy string logos. */
|
|
68
68
|
readonly logo?: Logo;
|
|
69
69
|
readonly logoInBooth: boolean;
|
|
70
|
+
/** The logo's width divided by its height, when the event data states it. */
|
|
71
|
+
readonly logoAspectRatio?: number;
|
|
70
72
|
readonly gallery: string[];
|
|
71
73
|
readonly marketMaterials: MarketMaterial[];
|
|
72
74
|
readonly slug: string;
|
package/dist/esm/types.d.ts
CHANGED
|
@@ -372,7 +372,7 @@ export interface Marker extends CurrentPosition {
|
|
|
372
372
|
id: string;
|
|
373
373
|
icon: string;
|
|
374
374
|
selectedIcon: string;
|
|
375
|
-
position: 'centertop' | 'lefttop';
|
|
375
|
+
position: 'centertop' | 'lefttop' | 'centerbottom';
|
|
376
376
|
active?: boolean;
|
|
377
377
|
}
|
|
378
378
|
export interface MarkerIcon {
|