@expofp/floorplan 3.32.0 → 3.34.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.
Files changed (87) hide show
  1. package/dist/browser/{Button-CNB2wS1D.js → Button-2mFDmipA.js} +5 -5
  2. package/dist/browser/{CookieConsent-9-_4FEUc.js → CookieConsent-BEpHu6hm.js} +7 -7
  3. package/dist/browser/{Debug-BUelP3lh.js → Debug-CINp17tI.js} +7 -7
  4. package/dist/browser/{DebugTools-6RBk4RXs.js → DebugTools-DZyXcKkH.js} +20 -14
  5. package/dist/browser/{Demo-B1Wq_-2I.js → Demo-pwOMoUNX.js} +9 -9
  6. package/dist/browser/{Free-Ce5a68cd.js → Free-n2LdN4sH.js} +9 -9
  7. package/dist/browser/{GalleryContainer-nNrPq8p3.js → GalleryContainer-BQHUOUWj.js} +10 -10
  8. package/dist/browser/{GpsLoader-DJD8M21U.js → GpsLoader-DVDwBcWh.js} +34 -34
  9. package/dist/browser/{KioskStore-DV6yg7gQ.js → KioskStore-CkcHydzS.js} +26 -26
  10. package/dist/browser/{MaplibreAdapter-DG-IOwAR.js → MaplibreAdapter-C_Gi0jYR.js} +843 -843
  11. package/dist/browser/{ModalContainer-lWcPEqKF.js → ModalContainer-DIjDnCvs.js} +10 -10
  12. package/dist/browser/{PermissionNotice-DzoxJYql.js → PermissionNotice-BB0e6bx0.js} +6 -6
  13. package/dist/browser/{SetKioskMode-D-drLiQS.js → SetKioskMode-BxDmUZZy.js} +15 -15
  14. package/dist/browser/{ShowKiosk-CmQAm7lA.js → ShowKiosk-B1KQkr08.js} +10 -10
  15. package/dist/browser/{ViewerMenuPanel-4K3IeFpI.js → ViewerMenuPanel-2yCc1Yoh.js} +18 -18
  16. package/dist/browser/{add-debug-secret-listener-BCbwpSUA.js → add-debug-secret-listener--vlZj85c.js} +1 -1
  17. package/dist/browser/{adopt-global-settings-BCXdoUeA.js → adopt-global-settings-D9S_-8Pi.js} +9 -9
  18. package/dist/browser/{boolean-editor-Bq5ovuVU.js → boolean-editor-Dep3teaO.js} +9 -9
  19. package/dist/browser/{bootIntercom-DJYZ3yyM.js → bootIntercom-BaNVkH7u.js} +2 -2
  20. package/dist/browser/bundle.json +69 -69
  21. package/dist/browser/{camera-events-DumvNN3C.js → camera-events-BZNqyOf_.js} +1 -1
  22. package/dist/browser/{classnames-XNi7nRCB.js → classnames-DtJmtEtm.js} +2 -2
  23. package/dist/browser/{client-CA8cGn8U.js → client-BknjHNie.js} +5 -5
  24. package/dist/browser/{components-MOPAfkCm.js → components-hf0Uzpv0.js} +1927 -1923
  25. package/dist/browser/{debug-context-C73IpGRj.js → debug-context-CQD4uBBU.js} +5 -5
  26. package/dist/browser/{debug-overlay-CIY57uQY.js → debug-overlay-DBD59hq_.js} +10 -10
  27. package/dist/browser/{debug-ui-D9GVgxaS.js → debug-ui-CjgQTndI.js} +6 -6
  28. package/dist/browser/{dimming-CXOoyeuK.js → dimming-BN_Zyj4Z.js} +391 -366
  29. package/dist/browser/{dist-CEbPeqIY.js → dist-BzL5JjBj.js} +6 -6
  30. package/dist/browser/{dist-Cuhm8hDS.js → dist-CatoUOv9.js} +3 -3
  31. package/dist/browser/{dist-CNBw7D1y.js → dist-D545K0si.js} +5 -5
  32. package/dist/browser/{efp-debug-init-CF3R1rs1.js → efp-debug-init-D9TAzqkD.js} +3 -3
  33. package/dist/browser/{enum-editor-Hfgu8R6H.js → enum-editor-DpDP_sEJ.js} +4 -4
  34. package/dist/browser/{es5-Ch3SnVpq.js → es5-h2t3KrEk.js} +2 -2
  35. package/dist/browser/{event-not-found-BBGk7sl1.js → event-not-found-CuIrTlZ3.js} +1 -1
  36. package/dist/browser/{exports-DdY5MNmH.js → exports-suDW8HiN.js} +1 -1
  37. package/dist/browser/{favicon-D0_sCTFa.js → favicon-DS50UBgo.js} +1 -1
  38. package/dist/browser/{fetch-retry.umd-DFU09v6m.js → fetch-retry.umd-C7dpV2rH.js} +2 -2
  39. package/dist/browser/{flex-Dd9f0dfq.js → flex-_7mTmqcr.js} +5 -5
  40. package/dist/browser/{floorplan.loader-DxE6hohE.js → floorplan.loader-DC0rXJkB.js} +10 -10
  41. package/dist/browser/{floorplan.ready-Cysrjlb9.js → floorplan.ready-CizYnUUO.js} +68 -68
  42. package/dist/browser/{fuse-BHP4h5hM.js → fuse-CD4wdS_W.js} +2 -2
  43. package/dist/browser/{i18n-3lyxjXox.js → i18n-IxPdCQIU.js} +5 -5
  44. package/dist/browser/index.js +14 -14
  45. package/dist/browser/{index.module-C6SF1hwf.js → index.module-DMZZSHxM.js} +4 -4
  46. package/dist/browser/{integrateKiosk-Dmtn4lIF.js → integrateKiosk-BcKz779g.js} +4 -4
  47. package/dist/browser/{is-webview-DBk4rvr1.js → is-webview-CnN0Z-gy.js} +1 -1
  48. package/dist/browser/{jsx-runtime-DLehizIL.js → jsx-runtime-ZPwB2s-q.js} +2 -2
  49. package/dist/browser/{kiosk-record-CWJVbWhN.js → kiosk-record-D-4E98Xs.js} +1 -1
  50. package/dist/browser/{lib-Cx0xfIyT.js → lib-BB6BeKVI.js} +3 -3
  51. package/dist/browser/{loadImage-BttawziQ.js → loadImage-IGMHv2TQ.js} +4 -4
  52. package/dist/browser/{logDeviceInfo-DtOdua8y.js → logDeviceInfo-Ch6YvMof.js} +9 -9
  53. package/dist/browser/{mobx-1TTEnMh_.js → mobx-D9kyiv2v.js} +4 -4
  54. package/dist/browser/{optional-boolean-editor--Ll4y7L3.js → optional-boolean-editor-CoFt3dip.js} +3 -3
  55. package/dist/browser/{optional-enum-editor-Diz4Gygu.js → optional-enum-editor-KkcsNc-Y.js} +4 -4
  56. package/dist/browser/{optional-string-editor-B_UUO3oV.js → optional-string-editor-DuSnXlWZ.js} +4 -4
  57. package/dist/browser/{particles.min-IsQntJd_.js → particles.min-BHClLy8M.js} +2 -2
  58. package/dist/browser/{react-DaVp-1nR.js → react-BNbBPFWS.js} +2 -2
  59. package/dist/browser/{react-dom-Cmin4STP.js → react-dom-CK03mqLi.js} +3 -3
  60. package/dist/browser/{rolldown-runtime-Dl53HvP8.js → rolldown-runtime-DK-Zb9cz.js} +1 -1
  61. package/dist/browser/{scheduler-CeO2Fq3-.js → scheduler-ChCsbqV0.js} +2 -2
  62. package/dist/browser/{select-CcBpWf_u.js → select-B46__qKm.js} +10 -10
  63. package/dist/browser/{settings-BnizsqhF.js → settings-CFTjNpgl.js} +2 -2
  64. package/dist/browser/{settings-item-JOfQImsE.js → settings-item-BtOFrwu5.js} +6 -6
  65. package/dist/browser/{store-BNPYvlw8.js → store-DfaVAvUl.js} +3672 -3662
  66. package/dist/browser/{string-editor-BmF12fyT.js → string-editor-D2_UtPhf.js} +4 -4
  67. package/dist/browser/{text-field-D4_C8M62.js → text-field-za8zc5c8.js} +5 -5
  68. package/dist/browser/{theme--BjIkuDi.js → theme-8RxL0k7R.js} +8 -8
  69. package/dist/browser/{ui-Bt8WOnfB.js → ui-IjOMff18.js} +8 -8
  70. package/dist/browser/{useRenderTarget-CKEW-h44.js → useRenderTarget-DrrZKd6v.js} +4 -4
  71. package/dist/browser/{viewport-Ch_DyTlN.js → viewport-CpIkkukX.js} +3 -3
  72. package/dist/esm/components/Map/Map.js +1 -1
  73. package/dist/esm/components/Map/MapCursorCoords.d.ts +13 -0
  74. package/dist/esm/components/Map/MapCursorCoords.js +1 -0
  75. package/dist/esm/components/Map/drawing/config/config-all.js +1 -1
  76. package/dist/esm/components/Maplibre/MaplibreAdapter.js +1 -1
  77. package/dist/esm/engine/defs.d.ts +2 -3
  78. package/dist/esm/engine/defs.js +3 -3
  79. package/dist/esm/wayfinding/createWayfinding.d.ts +1 -1
  80. package/dist/esm/wayfinding/createWayfinding.js +1 -1
  81. package/dist/esm/wayfinding/handlers/kioskHandler.d.ts +1 -2
  82. package/dist/esm/wayfinding/handlers/kioskHandler.js +1 -1
  83. package/dist/esm/wayfinding/handlers/yahHandler.d.ts +1 -2
  84. package/dist/esm/wayfinding/handlers/yahHandler.js +1 -1
  85. package/package.json +10 -10
  86. package/dist/esm/wayfinding/layers.d.ts +0 -15
  87. package/dist/esm/wayfinding/layers.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.32.0" };
4
+ e.SENTRY_RELEASE = { id: "3.34.0" };
5
5
  var t = new e.Error().stack;
6
6
  t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "edf52ee9-f3a6-424f-a5ff-f0c8342333ab", e._sentryDebugIdIdentifier = "sentry-dbid-edf52ee9-f3a6-424f-a5ff-f0c8342333ab");
7
7
  } catch {}
8
8
  })();
9
- import { t as e } from "./jsx-runtime-DLehizIL.js";
10
- import { t } from "./settings-item-JOfQImsE.js";
11
- import { t as n } from "./text-field-D4_C8M62.js";
9
+ import { t as e } from "./jsx-runtime-ZPwB2s-q.js";
10
+ import { t } from "./settings-item-BtOFrwu5.js";
11
+ import { t as n } from "./text-field-za8zc5c8.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.32.0" };
4
+ e.SENTRY_RELEASE = { id: "3.34.0" };
5
5
  var t = new e.Error().stack;
6
6
  t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "b57a1337-f6ba-488a-8e6f-60f9358b45a2", e._sentryDebugIdIdentifier = "sentry-dbid-b57a1337-f6ba-488a-8e6f-60f9358b45a2");
7
7
  } catch {}
8
8
  })();
9
- import { r as e } from "./rolldown-runtime-Dl53HvP8.js";
10
- import { t } from "./react-DaVp-1nR.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-Dd9f0dfq.js";
12
- import { t as l } from "./classnames-XNi7nRCB.js";
9
+ import { r as e } from "./rolldown-runtime-DK-Zb9cz.js";
10
+ import { t } from "./react-BNbBPFWS.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-_7mTmqcr.js";
12
+ import { t as l } from "./classnames-DtJmtEtm.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.32.0" };
4
+ e.SENTRY_RELEASE = { id: "3.34.0" };
5
5
  var t = new e.Error().stack;
6
6
  t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "f5429b84-6f5b-4b20-898f-e5345902ef44", e._sentryDebugIdIdentifier = "sentry-dbid-f5429b84-6f5b-4b20-898f-e5345902ef44");
7
7
  } catch {}
8
8
  })();
9
- import { r as e } from "./rolldown-runtime-Dl53HvP8.js";
10
- import { t } from "./react-DaVp-1nR.js";
11
- import { t as n } from "./jsx-runtime-DLehizIL.js";
12
- import { t as r } from "./react-dom-Cmin4STP.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-Dd9f0dfq.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-CEbPeqIY.js";
15
- import { t as y } from "./classnames-XNi7nRCB.js";
9
+ import { r as e } from "./rolldown-runtime-DK-Zb9cz.js";
10
+ import { t } from "./react-BNbBPFWS.js";
11
+ import { t as n } from "./jsx-runtime-ZPwB2s-q.js";
12
+ import { t as r } from "./react-dom-CK03mqLi.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-_7mTmqcr.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-BzL5JjBj.js";
15
+ import { t as y } from "./classnames-DtJmtEtm.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.32.0" };
4
+ e.SENTRY_RELEASE = { id: "3.34.0" };
5
5
  var t = new e.Error().stack;
6
6
  t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "cbb5c555-77ff-4375-8420-80c8ae476dcf", e._sentryDebugIdIdentifier = "sentry-dbid-cbb5c555-77ff-4375-8420-80c8ae476dcf");
7
7
  } catch {}
8
8
  })();
9
- import { r as e } from "./rolldown-runtime-Dl53HvP8.js";
10
- import { a as t, i as n, s as r } from "./efp-debug-init-CF3R1rs1.js";
11
- import { a as i, i as a } from "./adopt-global-settings-BCXdoUeA.js";
12
- import { t as o } from "./jsx-runtime-DLehizIL.js";
13
- import "./settings-BnizsqhF.js";
14
- import { t as s } from "./add-debug-secret-listener-BCbwpSUA.js";
9
+ import { r as e } from "./rolldown-runtime-DK-Zb9cz.js";
10
+ import { a as t, i as n, s as r } from "./efp-debug-init-D9TAzqkD.js";
11
+ import { a as i, i as a } from "./adopt-global-settings-D9S_-8Pi.js";
12
+ import { t as o } from "./jsx-runtime-ZPwB2s-q.js";
13
+ import "./settings-CFTjNpgl.js";
14
+ import { t as s } from "./add-debug-secret-listener--vlZj85c.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-D9GVgxaS.js"), { createRoot: i } = await import("./client-CA8cGn8U.js").then((t) => /* @__PURE__ */ e(t.t(), 1)), a = document.createElement("div");
29
+ let { DebugUi: n } = await import("./debug-ui-CjgQTndI.js"), { createRoot: i } = await import("./client-BknjHNie.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.32.0" };
4
+ e.SENTRY_RELEASE = { id: "3.34.0" };
5
5
  var t = new e.Error().stack;
6
6
  t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "7407e64e-4c4e-4bfb-b2ef-80063ad22998", e._sentryDebugIdIdentifier = "sentry-dbid-7407e64e-4c4e-4bfb-b2ef-80063ad22998");
7
7
  } catch {}
8
8
  })();
9
- import { r as e } from "./rolldown-runtime-Dl53HvP8.js";
10
- import { t } from "./react-DaVp-1nR.js";
11
- import { l as n } from "./store-BNPYvlw8.js";
9
+ import { r as e } from "./rolldown-runtime-DK-Zb9cz.js";
10
+ import { t } from "./react-BNbBPFWS.js";
11
+ import { l as n } from "./store-DfaVAvUl.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.32.0" };
4
+ e.SENTRY_RELEASE = { id: "3.34.0" };
5
5
  var t = new e.Error().stack;
6
- t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "30d5a1aa-2d79-4710-91d1-937109f43b1a", e._sentryDebugIdIdentifier = "sentry-dbid-30d5a1aa-2d79-4710-91d1-937109f43b1a");
6
+ t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "a86b34fc-4db5-43a7-965f-2af06c6fef45", e._sentryDebugIdIdentifier = "sentry-dbid-a86b34fc-4db5-43a7-965f-2af06c6fef45");
7
7
  } catch {}
8
8
  })();
9
- import { c as e, vt as t } from "./store-BNPYvlw8.js";
9
+ import { c as e, mt as t } from "./store-DfaVAvUl.js";
10
10
  //#region src/components/Map/viewport.ts
11
11
  function n(e) {
12
12
  return {
@@ -1 +1 @@
1
- import{jsx as S,jsxs as P}from"react/jsx-runtime";import{Renderer as _,update as h}from"@expofp/renderer";import F from"classnames";import{observable as D}from"mobx";import{useObserver as b}from"mobx-react-lite";import{useEffect as g,useMemo as N,useRef as y,useState as O}from"react";import z from"../../data";import{svgArea as k}from"../../data/svg";import{createSceneDef as j}from"../../engine/defs";import i,{layersStore as d,uiState as m}from"../../store";import f from"../../tools/settings";import{applyVenueDim as I,createDimmingAnimator as V}from"../../utils/dimming";import Z from"../../utils/is-debug";import{isPathwayLayer as x}from"../../utils/is-pathway-layer";import{useReaction as v}from"../../utils/mobx";import{createWayfinding as $}from"../../wayfinding";import U from"./drawing/config/config-all";import{configMarkers as W}from"./drawing/config/config-markers";import{loadLayersImages as X}from"./drawing/config/loadBoothsImages";import{MapCamera as B}from"./MapCamera";import{MapViewport as H}from"./MapViewport";import{clearSelection as G}from"./pointer";import{setMapScene as E}from"./scene";import{useBuildRoute as J}from"./traffic/useBuildRoute";import{useManageTraffic as q}from"./traffic/useManageTraffic";import{centerCoordinates as K}from"./viewport";const Q="#ebebeb",C="routes-api.expofp.com",Y=1e4;function ee(t){return Number.isFinite(f.maxZoom)?f.maxZoom:t.viewbox.size.width>Y?100:35}function re(){if(!i.fp.enableRotation)return!1;const t=m.mapSettings.roll;return t===void 0||Number(t)===1}function oe(){return f.EXPO==="imexamerica25-3d"?!0:void 0}function te(){const t=m.mapSettings.zoomtime;if(!(!t||t===m.defaultMapSettings.zoomtime))return{zoomTime:t/1e3}}export default function ne(){const t=y(null),l=N(()=>D({moving:!1,prevLevel:i.layerStore.layers.find(r=>!r.frozen&&r.visible)}),[]),[o,T]=O(void 0),c=y(null),p=y(null);function R(){d.layers.forEach(r=>{r.configured=!1,r.children=[],r.loaded=!1})}g(()=>{let r=!1;return R(),d.layersLoaded=!1,U().then(({layers:s,cleanup:a})=>{if(r){a();return}p.current=a;const n=f.backgroundColor==="none"?Q:f.backgroundColor,e=j(s,k,n);T(e),E(e),c.current=V(u=>{I(e,u)&&h(e.rootLayer)}),c.current.setTarget(m.dimmed,{immediate:!0}),d.layersLoaded=!0,i.fp.onFpConfigured&&i.fp.onFpConfigured(),X()}),()=>{r=!0,p.current?.(),p.current=null,c.current?.stop(),c.current=null,E(void 0),R()}},[]),v(()=>m.dimmed,r=>{c.current?.setTarget(r)}),g(()=>{i.fp.getCenterCoordinates=()=>K(t.current)},[]),g(()=>{if(!o)return;const r=$({scene:o,store:i,canvas:t}),s=W({scene:o});return()=>{r(),s()}},[o]),v(()=>i.routeStore.currentRouteLayer,()=>{const r=i.routeStore.currentRouteLayer;if(!o||!r||l.prevLevel===r)return;const s=o.rootLayer.children.filter(e=>i.layerStore.floors.some(u=>e.name.includes(u.name))),a=r.name;if(!s.find(e=>e.name===a))return;const n=[];s.forEach(e=>{e.name===a&&e.hidden!==!1&&(e.hidden=!1,n.push(e)),e.name===l.prevLevel?.name&&e.hidden!==!0&&(e.hidden=!0,n.push(e))}),l.prevLevel=r,n.length&&h(...n)},void 0,[o]),v(()=>i.layerStore.visible,r=>{if(!o)return;const s=r.filter(e=>x(e.name)),a=o.rootLayer.children,n=[];for(const e of a){if(!x(e.name))continue;const u=!s.find(A=>A.name===e.name);e.hidden!==u&&(e.hidden=u,n.push(e))}n.length&&h(...n)},void 0,[o]);const L=b(()=>d.layersLoaded),M=b(()=>!!m.buildRoute);J({enabled:L&&M,scene:o});const w=z.busRoutes??!1;return q({permission:L&&w,scene:o,dataJsonUrl:`https://${C}/v1/routes?expo=${f.EXPO}`,websocketUrl:`wss://${C}/locations?expo=${f.EXPO}`}),b(()=>o?P(_,{debug:Z,style:{width:"100%",height:"100%"},ref:t,className:F({map:!0}),scene:o,maxZoom:ee(o),bounds:d.bounds,controls:{roll:re(),pitch:oe()},smoothTime:te(),visibleRect:m.canvasVisibleRectPx,onPointerMissed:G,children:[S(B,{}),S(H,{})]}):null)}
1
+ import{jsx as h,jsxs as _}from"react/jsx-runtime";import{Renderer as F,update as b}from"@expofp/renderer";import D from"classnames";import{observable as N}from"mobx";import{useObserver as g}from"mobx-react-lite";import{useEffect as y,useMemo as O,useRef as v,useState as z}from"react";import k from"../../data";import{svgArea as j}from"../../data/svg";import{createSceneDef as I}from"../../engine/defs";import i,{layersStore as d,uiState as m}from"../../store";import f from"../../tools/settings";import{applyVenueDim as V,createDimmingAnimator as Z}from"../../utils/dimming";import x from"../../utils/is-debug";import{isPathwayLayer as C}from"../../utils/is-pathway-layer";import{useReaction as R}from"../../utils/mobx";import{createWayfinding as $}from"../../wayfinding";import U from"./drawing/config/config-all";import{configMarkers as W}from"./drawing/config/config-markers";import{loadLayersImages as X}from"./drawing/config/loadBoothsImages";import{MapCamera as B}from"./MapCamera";import{MapCursorCoords as H}from"./MapCursorCoords";import{MapViewport as G}from"./MapViewport";import{clearSelection as J}from"./pointer";import{setMapScene as E}from"./scene";import{useBuildRoute as q}from"./traffic/useBuildRoute";import{useManageTraffic as K}from"./traffic/useManageTraffic";import{centerCoordinates as Q}from"./viewport";const Y="#ebebeb",M="routes-api.expofp.com",ee=1e4;function re(t){return Number.isFinite(f.maxZoom)?f.maxZoom:t.viewbox.size.width>ee?100:35}function oe(){if(!i.fp.enableRotation)return!1;const t=m.mapSettings.roll;return t===void 0||Number(t)===1}function te(){return f.EXPO==="imexamerica25-3d"?!0:void 0}function ne(){const t=m.mapSettings.zoomtime;if(!(!t||t===m.defaultMapSettings.zoomtime))return{zoomTime:t/1e3}}export default function ie(){const t=v(null),l=O(()=>N({moving:!1,prevLevel:i.layerStore.layers.find(r=>!r.frozen&&r.visible)}),[]),[o,T]=z(void 0),c=v(null),p=v(null);function L(){d.layers.forEach(r=>{r.configured=!1,r.children=[],r.loaded=!1})}y(()=>{let r=!1;return L(),d.layersLoaded=!1,U().then(({layers:s,cleanup:a})=>{if(r){a();return}p.current=a;const n=f.backgroundColor==="none"?Y:f.backgroundColor,e=I(s,j,n);T(e),E(e),c.current=Z(u=>{V(e,u)&&b(e.rootLayer)}),c.current.setTarget(m.dimmed,{immediate:!0}),d.layersLoaded=!0,i.fp.onFpConfigured&&i.fp.onFpConfigured(),X()}),()=>{r=!0,p.current?.(),p.current=null,c.current?.stop(),c.current=null,E(void 0),L()}},[]),R(()=>m.dimmed,r=>{c.current?.setTarget(r)}),y(()=>{i.fp.getCenterCoordinates=()=>Q(t.current)},[]),y(()=>{if(!o)return;const r=$({scene:o,store:i,canvas:t}),s=W({scene:o});return()=>{r(),s()}},[o]),R(()=>i.routeStore.currentRouteLayer,()=>{const r=i.routeStore.currentRouteLayer;if(!o||!r||l.prevLevel===r)return;const s=o.rootLayer.children.filter(e=>i.layerStore.floors.some(u=>e.name.includes(u.name))),a=r.name;if(!s.find(e=>e.name===a))return;const n=[];s.forEach(e=>{e.name===a&&e.hidden!==!1&&(e.hidden=!1,n.push(e)),e.name===l.prevLevel?.name&&e.hidden!==!0&&(e.hidden=!0,n.push(e))}),l.prevLevel=r,n.length&&b(...n)},void 0,[o]),R(()=>i.layerStore.visible,r=>{if(!o)return;const s=r.filter(e=>C(e.name)),a=o.rootLayer.children,n=[];for(const e of a){if(!C(e.name))continue;const u=!s.find(P=>P.name===e.name);e.hidden!==u&&(e.hidden=u,n.push(e))}n.length&&b(...n)},void 0,[o]);const S=g(()=>d.layersLoaded),w=g(()=>!!m.buildRoute);q({enabled:S&&w,scene:o});const A=k.busRoutes??!1;return K({permission:S&&A,scene:o,dataJsonUrl:`https://${M}/v1/routes?expo=${f.EXPO}`,websocketUrl:`wss://${M}/locations?expo=${f.EXPO}`}),g(()=>o?_(F,{debug:x,style:{width:"100%",height:"100%"},ref:t,className:D({map:!0}),scene:o,maxZoom:re(o),bounds:d.bounds,controls:{roll:oe(),pitch:te()},smoothTime:ne(),visibleRect:m.canvasVisibleRectPx,onPointerMissed:J,children:[h(B,{}),h(G,{}),x&&h(H,{canvas:t})]}):null)}
@@ -0,0 +1,13 @@
1
+ import { type RefObject } from 'react';
2
+ /**
3
+ * Publishes the plan coordinates under the pointer to the debug panel. Debug builds only.
4
+ *
5
+ * Rendered inside `<Renderer>`: `useViewport` and the panel resolve nowhere else, and each view
6
+ * passes its own canvas.
7
+ * @param props - The canvas the plan draws on.
8
+ * @returns Nothing; this renders no scene node.
9
+ */
10
+ export declare function MapCursorCoords(props: {
11
+ canvas: RefObject<HTMLCanvasElement | null>;
12
+ }): null;
13
+ //# sourceMappingURL=MapCursorCoords.d.ts.map
@@ -0,0 +1 @@
1
+ import{useDebugPanel as m,useViewport as v}from"@expofp/renderer";import{useCallback as l,useEffect as p,useEffectEvent as E}from"react";import L from"../../store";import{LayerMode as u}from"../../store/LayerStore";const a=2;export function MapCursorCoords(r){const{canvas:e}=r,o=v(),s=m(),i=l(()=>s("cursor",void 0),[s]),f=E(n=>{if(!n.isPrimary)return;const t=o.canvasToPlan({x:n.offsetX,y:n.offsetY});s("cursor",t?x(t,b()):void 0)});return p(()=>{const n=e.current;if(!n)return;const t=d=>f(d),c=()=>i();return n.addEventListener("pointermove",t),n.addEventListener("pointerleave",c),()=>{n.removeEventListener("pointermove",t),n.removeEventListener("pointerleave",c)}},[e,i]),null}function b(){return L.layerStore.layers.find(e=>e.visible&&(e.mode===u.TurnedOn||e.mode===u.TurnedOff))?.name||null}function x(r,e){const o=`[${r.x.toFixed(a)}, ${r.y.toFixed(a)}]`;return e?`${o} \xB7 layer ${e}`:o}
@@ -1 +1 @@
1
- import{createLayerDef as e}from"../../../../engine/defs";import n from"../../../../store";import{isPathwayLayer as E}from"../../../../utils/is-pathway-layer";import{WF_CURRENT_POSITION_LAYER_NAME as d,WF_LINES_ANIMATED_LAYER_NAME as N,WF_LINES_LAYER_NAME as u,WF_POINTS_LAYER_NAME as R,WF_TRAIL_LAYER_NAME as h}from"../../../../wayfinding/layers";import{createTrafficLayers as M}from"../../traffic/trafficLayers";import{configBoothsBadges as w}from"./config-booth-badge";import I from"./config-load-layer";import{MARKER_LAYER_NAME as P}from"./config-markers";export default function S(){const{defaultLayer:a}=n.layerStore;let{layers:o}=n.layerStore;if(a){const r=[...o],s=o.indexOf(a);r.splice(s,1),o=[a,...r]}const L=o.filter(r=>!r.rootParent).map(r=>I(r));return Promise.all(L).then(r=>{const s=e(R,[],{dim:0}),l=e(u,[],{dim:0}),c=e(P,[]),y=e(h,[],{dim:0}),p=e(N,[],{dim:0}),_=e(d,[],{dim:0}),i=[],f=[];for(const t of r.flat())E(t.name)?(t.dim=0,f.push(t)):i.push(t);const{layer:m,cleanup:A}=w("root",n.boothStore.booths);return{layers:[...i,...m?[m]:[],...f,...M(),c,y,l,p,s,_],cleanup:A}})}
1
+ import{initWayfindingLayers as c}from"@expofp/wayfinding";import{createLayerDef as p}from"../../../../engine/defs";import s from"../../../../store";import{isPathwayLayer as L}from"../../../../utils/is-pathway-layer";import{createTrafficLayers as d}from"../../traffic/trafficLayers";import{configBoothsBadges as u}from"./config-booth-badge";import h from"./config-load-layer";import{MARKER_LAYER_NAME as g}from"./config-markers";export default function b(){const{defaultLayer:t}=s.layerStore;let{layers:e}=s.layerStore;if(t){const r=[...e],a=e.indexOf(t);r.splice(a,1),e=[t,...r]}const l=e.filter(r=>!r.rootParent).map(r=>h(r));return Promise.all(l).then(r=>{const a=p(g,[]),m=c(),n=[],i=[];for(const o of r.flat())L(o.name)?(o.dim=0,i.push(o)):n.push(o);const{layer:f,cleanup:y}=u("root",s.boothStore.booths);return{layers:[...n,...f?[f]:[],...i,...d(),a,m],cleanup:y}})}
@@ -1 +1 @@
1
- import{jsx as x}from"react/jsx-runtime";import{isLayerDefs as Z}from"@expofp/renderer";import H from"color";import{runInAction as Q}from"mobx";import{observer as Y}from"mobx-react-lite";import{useCallback as F,useEffect as h,useMemo as m,useRef as f,useState as k}from"react";import q from"../../data";import{getLayerSvg as ee,svgArea as C,svgAreaExplicit as re}from"../../data/svg";import{createSceneDef as te}from"../../engine/defs";import t,{uiState as c}from"../../store";import M from"../../tools/settings";import oe from"../../utils/is-debug";import{fitRectIsFraming as ne,getVenueFitMarginPercent as ie,resolveVenueFitRect as ae}from"../../utils/scene-bounds";import ce from"../Map/drawing/config/config-all";import{loadLayersImages as se}from"../Map/drawing/config/loadBoothsImages";import{MapViewport as le}from"../Map/MapViewport";import{clearSelection as ue}from"../Map/pointer";import{setMapScene as $}from"../Map/scene";import{useBuildRoute as me}from"../Map/traffic/useBuildRoute";import{useManageTraffic as fe}from"../Map/traffic/useManageTraffic";import{centerCoordinates as pe}from"../Map/viewport";import de from"./MaplibreWrapper";import{useCameraReactions as ge}from"./useCameraReactions";import{useDimming as be}from"./useDimming";import{useKioskIdleEvents as Se}from"./useKioskIdleEvents";import{useLayerVisibilitySync as ye}from"./useLayerVisibilitySync";import{usePoiMarkers as Re}from"./usePoiMarkers";import{useWayfindingAndMarkers as he}from"./useWayfindingAndMarkers";import{cameraForLocalRect as Ce,deriveGeoConfig as Me,getLocalRectGeoBounds as Ae,getVisibleRectFitPadding as Le,INITIAL_FIT_ZOOM_ADJUSTMENT as Pe}from"./utils/geo-config";import{applyMapOptions as V,DEFAULT_MAP_OPTIONS as De,getTileSource as ze,MAP_2D_OPTIONS as Te}from"./utils/map-helpers";import{calculateTransformMatrix as ve}from"./utils/solver";const j="routes-api.expofp.com",Oe=800;function Ee(i,g,s){return{getCameraState:()=>{const o=i.getCenter();return{lng:o.lng,lat:o.lat,zoom:i.getZoom(),bearing:i.getBearing(),pitch:i.getPitch()}},applyCameraState:o=>{i.easeTo({center:[o.lng,o.lat],zoom:o.zoom,bearing:o.bearing??g,pitch:o.pitch??s(),duration:Oe,essential:!0})},resetPitch:()=>{const o=s();i.getPitch()!==o&&i.jumpTo({pitch:o})}}}function N(){t.poiMarkerStore.clear(),Q(()=>{t.layerStore.layers.forEach(i=>{i.configured=!1,i.children=[],i.loaded=!1}),t.layerStore.layersLoaded=!1})}const Ie=Y(function({viewMode:g}){const[s,o]=k(null),[z,T]=k(!1),u=f(null),b=f(null),A=f(null),v=f(null),S=f(null),r=m(()=>Me(),[]),L=m(()=>ae({layerViewbox:t.layerStore.viewboxRectangle,explicitArea:re?C:null,layerRectangle:t.layerStore.rectangle,sceneDef:s,svgArea:C}),[s]),y=L.rect,p=m(()=>{if(!r)return null;const e=ne(L.source)?0:ie(y,C),n=Le(0);e&&c.screenSize&&(n.left+=c.screenSize.width*e,n.right+=c.screenSize.width*e,n.top+=c.screenSize.height*e,n.bottom+=c.screenSize.height*e);const l=c.screenSize?Ce(y,r.gpsConfig,r.bearing,{width:c.screenSize.width,height:c.screenSize.height},n):null;return l?{center:l.center,bearing:r.bearing,zoom:l.zoom}:{center:r.center,bearing:r.bearing,zoom:r.zoom,bounds:Ae(y,r.gpsConfig),fitPadding:n,zoomAdjustment:Pe}},[r,L,y]),R=m(()=>r?ve(r.gpsConfig,ee()?.getAttribute("units")):null,[r]),d=m(()=>({...g==="map2d"?Te:De}),[g]),P=f(d),U=m(()=>ze(),[]),a=m(()=>{if(!s||!R)return null;const e=s.rootLayer.children,n=Z(e)?e.filter(l=>l.name.toLowerCase()!=="areamap"):e;return{...s,rootLayer:{...s.rootLayer,children:n},background:void 0,staticTransform:R}},[s,R]),O=f(null);h(()=>{O.current=a},[a]),h(()=>{if(a)return $(a),()=>$(void 0)},[a]);const{mapDimAnimatorRef:E,venueDimAnimatorRef:I,applyDimmingTarget:_,handleMapDimLayerReady:B}=be(u,O);h(()=>{if(!r)return;let e=!1;N(),ce().then(({layers:D,cleanup:w})=>{if(e){w();return}A.current=w;const X=H(M.backgroundColor==="none"?"#ebebeb":M.backgroundColor).string();o(te(D,C,X))}).catch(D=>{e||console.warn("Maplibre scene configuration failed.",D)});const n=E.current,l=I.current;return()=>{e=!0,N(),A.current?.(),A.current=null,S.current&&(t.maplibreStore.clearCameraPortIfCurrent(S.current),S.current=null),u.current=null,b.current=null,v.current=null,T(!1),n?.stop(),l?.stop(),c.sceneDefReady=!1}},[r,E,I]);const G=F((e,n)=>{u.current=e,b.current=e.getCanvas(),v.current=n,T(!0),V(e,P.current);const l=Ee(e,r?.bearing??e.getBearing(),()=>P.current.pitch??0);S.current=l,t.maplibreStore.setCameraPort(l),t.fp.getCenterCoordinates=()=>pe(b.current),_({immediate:!0}),se(),t.layerStore.layersLoaded=!0,t.fp.onFpConfigured&&t.fp.onFpConfigured(),c.sceneDefReady=!0,n()},[_,r]);h(()=>{P.current=d,V(u.current,d,!0)},[d]),Se(z,u),he(a,b),Re(z,u,r),ye(a,u,r),ge(u,r,a),me({enabled:t.layerStore.layersLoaded&&c.buildRoute,scene:a??void 0});const J=q.busRoutes??!1;fe({permission:t.layerStore.layersLoaded&&J,scene:a??void 0,dataJsonUrl:`https://${j}/v1/routes?expo=${M.EXPO}`,websocketUrl:`wss://${j}/locations?expo=${M.EXPO}`});const K=F(e=>{console.warn("Maplibre map failed to load; falling back to floorplan mode.",e),t.maplibreStore.deactivateMaplibre()},[]);if(!r||!p||!R||!a)return null;const W=`${p.center.join(",")}:${p.bearing}:${p.zoom}`;return x(de,{sceneDef:a,geoConfig:p,tileSource:U,mapOptions:d,debug:oe,onMapReady:G,onMapDimLayerReady:B,onMapLoadError:K,onPointerMissed:ue,children:x(le,{})},W)});export default Ie;
1
+ import{jsx as w,jsxs as H}from"react/jsx-runtime";import{isLayerDefs as Q}from"@expofp/renderer";import Y from"color";import{runInAction as q}from"mobx";import{observer as ee}from"mobx-react-lite";import{useCallback as F,useEffect as h,useMemo as m,useRef as f,useState as k}from"react";import re from"../../data";import{getLayerSvg as te,svgArea as C,svgAreaExplicit as oe}from"../../data/svg";import{createSceneDef as ne}from"../../engine/defs";import t,{uiState as c}from"../../store";import M from"../../tools/settings";import j from"../../utils/is-debug";import{fitRectIsFraming as ie,getVenueFitMarginPercent as ae,resolveVenueFitRect as ce}from"../../utils/scene-bounds";import se from"../Map/drawing/config/config-all";import{loadLayersImages as le}from"../Map/drawing/config/loadBoothsImages";import{MapCursorCoords as ue}from"../Map/MapCursorCoords";import{MapViewport as me}from"../Map/MapViewport";import{clearSelection as fe}from"../Map/pointer";import{setMapScene as $}from"../Map/scene";import{useBuildRoute as pe}from"../Map/traffic/useBuildRoute";import{useManageTraffic as de}from"../Map/traffic/useManageTraffic";import{centerCoordinates as ge}from"../Map/viewport";import be from"./MaplibreWrapper";import{useCameraReactions as Se}from"./useCameraReactions";import{useDimming as ye}from"./useDimming";import{useKioskIdleEvents as Re}from"./useKioskIdleEvents";import{useLayerVisibilitySync as he}from"./useLayerVisibilitySync";import{usePoiMarkers as Ce}from"./usePoiMarkers";import{useWayfindingAndMarkers as Me}from"./useWayfindingAndMarkers";import{cameraForLocalRect as Ae,deriveGeoConfig as Le,getLocalRectGeoBounds as Pe,getVisibleRectFitPadding as De,INITIAL_FIT_ZOOM_ADJUSTMENT as ve}from"./utils/geo-config";import{applyMapOptions as V,DEFAULT_MAP_OPTIONS as ze,getTileSource as Te,MAP_2D_OPTIONS as Oe}from"./utils/map-helpers";import{calculateTransformMatrix as Ee}from"./utils/solver";const N="routes-api.expofp.com",xe=800;function Ie(i,b,s){return{getCameraState:()=>{const o=i.getCenter();return{lng:o.lng,lat:o.lat,zoom:i.getZoom(),bearing:i.getBearing(),pitch:i.getPitch()}},applyCameraState:o=>{i.easeTo({center:[o.lng,o.lat],zoom:o.zoom,bearing:o.bearing??b,pitch:o.pitch??s(),duration:xe,essential:!0})},resetPitch:()=>{const o=s();i.getPitch()!==o&&i.jumpTo({pitch:o})}}}function U(){t.poiMarkerStore.clear(),q(()=>{t.layerStore.layers.forEach(i=>{i.configured=!1,i.children=[],i.loaded=!1}),t.layerStore.layersLoaded=!1})}const _e=ee(function({viewMode:b}){const[s,o]=k(null),[v,z]=k(!1),u=f(null),p=f(null),A=f(null),T=f(null),S=f(null),r=m(()=>Le(),[]),L=m(()=>ce({layerViewbox:t.layerStore.viewboxRectangle,explicitArea:oe?C:null,layerRectangle:t.layerStore.rectangle,sceneDef:s,svgArea:C}),[s]),y=L.rect,d=m(()=>{if(!r)return null;const e=ie(L.source)?0:ae(y,C),n=De(0);e&&c.screenSize&&(n.left+=c.screenSize.width*e,n.right+=c.screenSize.width*e,n.top+=c.screenSize.height*e,n.bottom+=c.screenSize.height*e);const l=c.screenSize?Ae(y,r.gpsConfig,r.bearing,{width:c.screenSize.width,height:c.screenSize.height},n):null;return l?{center:l.center,bearing:r.bearing,zoom:l.zoom}:{center:r.center,bearing:r.bearing,zoom:r.zoom,bounds:Pe(y,r.gpsConfig),fitPadding:n,zoomAdjustment:ve}},[r,L,y]),R=m(()=>r?Ee(r.gpsConfig,te()?.getAttribute("units")):null,[r]),g=m(()=>({...b==="map2d"?Oe:ze}),[b]),P=f(g),B=m(()=>Te(),[]),a=m(()=>{if(!s||!R)return null;const e=s.rootLayer.children,n=Q(e)?e.filter(l=>l.name.toLowerCase()!=="areamap"):e;return{...s,rootLayer:{...s.rootLayer,children:n},background:void 0,staticTransform:R}},[s,R]),O=f(null);h(()=>{O.current=a},[a]),h(()=>{if(a)return $(a),()=>$(void 0)},[a]);const{mapDimAnimatorRef:E,venueDimAnimatorRef:x,applyDimmingTarget:I,handleMapDimLayerReady:G}=ye(u,O);h(()=>{if(!r)return;let e=!1;U(),se().then(({layers:D,cleanup:_})=>{if(e){_();return}A.current=_;const Z=Y(M.backgroundColor==="none"?"#ebebeb":M.backgroundColor).string();o(ne(D,C,Z))}).catch(D=>{e||console.warn("Maplibre scene configuration failed.",D)});const n=E.current,l=x.current;return()=>{e=!0,U(),A.current?.(),A.current=null,S.current&&(t.maplibreStore.clearCameraPortIfCurrent(S.current),S.current=null),u.current=null,p.current=null,T.current=null,z(!1),n?.stop(),l?.stop(),c.sceneDefReady=!1}},[r,E,x]);const J=F((e,n)=>{u.current=e,p.current=e.getCanvas(),T.current=n,z(!0),V(e,P.current);const l=Ie(e,r?.bearing??e.getBearing(),()=>P.current.pitch??0);S.current=l,t.maplibreStore.setCameraPort(l),t.fp.getCenterCoordinates=()=>ge(p.current),I({immediate:!0}),le(),t.layerStore.layersLoaded=!0,t.fp.onFpConfigured&&t.fp.onFpConfigured(),c.sceneDefReady=!0,n()},[I,r]);h(()=>{P.current=g,V(u.current,g,!0)},[g]),Re(v,u),Me(a,p),Ce(v,u,r),he(a,u,r),Se(u,r,a),pe({enabled:t.layerStore.layersLoaded&&c.buildRoute,scene:a??void 0});const K=re.busRoutes??!1;de({permission:t.layerStore.layersLoaded&&K,scene:a??void 0,dataJsonUrl:`https://${N}/v1/routes?expo=${M.EXPO}`,websocketUrl:`wss://${N}/locations?expo=${M.EXPO}`});const W=F(e=>{console.warn("Maplibre map failed to load; falling back to floorplan mode.",e),t.maplibreStore.deactivateMaplibre()},[]);if(!r||!d||!R||!a)return null;const X=`${d.center.join(",")}:${d.bearing}:${d.zoom}`;return H(be,{sceneDef:a,geoConfig:d,tileSource:B,mapOptions:g,debug:j,onMapReady:J,onMapDimLayerReady:G,onMapLoadError:W,onPointerMissed:fe,children:[w(me,{}),j&&w(ue,{canvas:p})]},X)});export default _e;
@@ -1,5 +1,5 @@
1
- import { Box, type LineLike, Mesh, type Polygon, Rect, type TriangleIndex } from '@expofp/geometry';
2
- import { type ImageDef, type ImageSource, type LayerDef, type LineDef, type RenderableDefCollection, type SceneDef, type ShapeDef, type SharedDef, type TextAlignment, type TextDef, type TextLineDef } from '@expofp/renderer';
1
+ import { Box, Mesh, type Polygon, Rect, type TriangleIndex } from '@expofp/geometry';
2
+ import { type ImageDef, type ImageSource, type LayerDef, type RenderableDefCollection, type SceneDef, type ShapeDef, type SharedDef, type TextAlignment, type TextDef, type TextLineDef } from '@expofp/renderer';
3
3
  /**
4
4
  * What svgMesh3d puts on `window.__fpPaths`: vertices as bare number tuples, which is why this is
5
5
  * not geometry's `MeshLike` — that one holds points. The third component is optional because
@@ -23,7 +23,6 @@ export declare function createImageDef(source: ImageSource, bounds: Rect, option
23
23
  }): ImageDef;
24
24
  export declare function createTextDef(textLines: TextLineDef[], bounds: Rect, padding: [number, number], alignment: TextAlignment, options?: SharedDef): TextDef;
25
25
  export declare function createTextDefLines(textLines: TextLines, color: string, fontSize: number, fontUrl?: [string | undefined, string | undefined]): TextLineDef[];
26
- export declare function createLineDef({ p0, p1 }: LineLike, color?: string, width?: number): LineDef;
27
26
  export declare function createLayerDef(name: string, children: RenderableDefCollection, options?: SharedDef): LayerDef;
28
27
  export declare function createSceneDef(layers: LayerDef[], viewboxRect: Box | SVGRectElement, background?: string): SceneDef;
29
28
  export declare function createShapeDot(rect: Rect, color?: string, radius?: number): ImageDef;
@@ -1,3 +1,3 @@
1
- import{Box as i,isBox as s,isMesh as c,isPolygon as u,isRect as x,Mesh as d,Rect as h}from"@expofp/geometry";import{createCircleCanvas as p}from"./canvases";import{DEFAULT_FONT_LIGHT_URL as w,DEFAULT_FONT_URL as D}from"./fonts";export function rectToShapeDef(e,r){return createShapeDef(i.fromSvg(e),r)}export function meshToShapeDef(e,r){if(!e)throw new Error("Create ShapeDef: mesh is not provided");const t=e.positions.map(o=>({x:o[0],y:Math.abs(o[1]),z:o[2]??0})),n=e.cells;return createShapeDef(new d(t,n),r)}export function createShapeDef(e,r="#000"){if(!e||!(s(e)||x(e)||u(e)||c(e)))throw new Error("Invalid shape definition");return{shape:e,color:r}}export function createImageDef(e,r,t){if(!e)throw new Error("Image source is not provided");return{source:e,bounds:r,...t}}export function createTextDef(e,r,t,n,o){if(e.length===0)throw new Error("Invalid text lines");return{lines:e,bounds:r,padding:t,alignment:n,...o}}export function createTextDefLines(e,r,t,n=[void 0,void 0]){const[o,f]=e,a=[{text:o.join(`
2
- `),fontUrl:n[0]||D,color:r,fontSize:t}];return f.length&&a.push({text:f.join(`
3
- `),fontUrl:n[1]||w,color:r,fontSize:t}),a}export function createLineDef({p0:e,p1:r},t="#000",n=10){if(!(e?.x&&e.y||r?.x&&r.y))throw new Error("Line data is invalid");return{points:{p0:{x:e.x,y:e.y},p1:{x:r.x,y:r.y}},color:t,width:n}}export function createLayerDef(e,r,t){if(!e)throw new Error("Layer name is required");return r||(r=[]),{name:e,children:r,...t}}export function createSceneDef(e,r,t){const n=r instanceof i?r:i.fromSvg(r);return{rootLayer:createLayerDef("root",e),background:t,viewbox:n}}export function createShapeDot(e,r="#000",t=1.5){const n=p(t,r),o=new h(e.center,{x:n.width,y:n.height},e.rotation,e.elevation);return createImageDef(n,o)}
1
+ import{Box as i,isBox as c,isMesh as a,isPolygon as u,isRect as p,Mesh as x,Rect as d}from"@expofp/geometry";import{createCircleCanvas as h}from"./canvases";import{DEFAULT_FONT_LIGHT_URL as m,DEFAULT_FONT_URL as w}from"./fonts";export function rectToShapeDef(e,r){return createShapeDef(i.fromSvg(e),r)}export function meshToShapeDef(e,r){if(!e)throw new Error("Create ShapeDef: mesh is not provided");const t=e.positions.map(o=>({x:o[0],y:Math.abs(o[1]),z:o[2]??0})),n=e.cells;return createShapeDef(new x(t,n),r)}export function createShapeDef(e,r="#000"){if(!e||!(c(e)||p(e)||u(e)||a(e)))throw new Error("Invalid shape definition");return{shape:e,color:r}}export function createImageDef(e,r,t){if(!e)throw new Error("Image source is not provided");return{source:e,bounds:r,...t}}export function createTextDef(e,r,t,n,o){if(e.length===0)throw new Error("Invalid text lines");return{lines:e,bounds:r,padding:t,alignment:n,...o}}export function createTextDefLines(e,r,t,n=[void 0,void 0]){const[o,f]=e,s=[{text:o.join(`
2
+ `),fontUrl:n[0]||w,color:r,fontSize:t}];return f.length&&s.push({text:f.join(`
3
+ `),fontUrl:n[1]||m,color:r,fontSize:t}),s}export function createLayerDef(e,r,t){if(!e)throw new Error("Layer name is required");return r||(r=[]),{name:e,children:r,...t}}export function createSceneDef(e,r,t){const n=r instanceof i?r:i.fromSvg(r);return{rootLayer:createLayerDef("root",e),background:t,viewbox:n}}export function createShapeDot(e,r="#000",t=1.5){const n=h(t,r),o=new d(e.center,{x:n.width,y:n.height},e.rotation,e.elevation);return createImageDef(n,o)}
@@ -15,7 +15,7 @@ export declare function buildRoute(from: RouteEndpoint, to: RouteEndpoint, optio
15
15
  }): Route;
16
16
  /** What {@link createWayfinding} needs: a scene to draw into, and the stores to observe. */
17
17
  export interface WayfindingOptions {
18
- /** The scene wayfinding fills; its root layers hold the `wf-*` layers. */
18
+ /** The scene wayfinding fills; its root layers hold the block `configAll` mounted. */
19
19
  readonly scene: SceneDef;
20
20
  /** The app store. */
21
21
  readonly store: RootStore;
@@ -1 +1 @@
1
- import{update as y}from"@expofp/renderer";import{createWayfinding as g}from"@expofp/wayfinding";import{fpGeo as A}from"../data/fpGeo";import{createImageDef as E,createLineDef as _}from"../engine/defs";import{attachCardinalSnap as h}from"../engine/utils/rotation";import{createCanvasIconProvider as L,createFloorContext as v,createGraphDataSource as I}from"./adapters";import{bindMobxReactions as W}from"./bindMobxReactions";import{createKioskHandler as M}from"./handlers/kioskHandler";import{createYahHandler as P}from"./handlers/yahHandler";import{WF_CURRENT_POSITION_LAYER_NAME as x,WF_LINES_ANIMATED_LAYER_NAME as C,WF_LINES_LAYER_NAME as N,WF_POINTS_LAYER_NAME as R,WF_TRAIL_LAYER_NAME as k}from"./layers";let f=null;export function isWayfindingReady(){return f!==null}function w(){if(!f)throw new Error("Wayfinding is not initialized \u2014 call createWayfinding() first.");return f}export function buildRoute(e,n,t){return w().wayfinding.buildRoute(e,n,t)}export function createWayfinding(e){const{scene:n,store:t,canvas:o}=e,c=n.rootLayer.children,{wayfinding:s,dispose:a}=b(t,{createImageDef:(u,p,l)=>{const{cardinalSnap:i,...d}=l??{},m=E(u,p,d);return i?h(m):m},createLineDef:_,layers:c,update:y}),r=T(c,R);return r.onClick=u=>F(s,u),r.onPointerMove=u=>S(s,o,u),r.onPointerOut=()=>S(s,o),y(r),()=>{r.onClick=void 0,r.onPointerMove=void 0,r.onPointerOut=void 0,o.current&&(o.current.style.cursor=""),y(r),a()}}function b(e,n){const t=I(),o=L({iconMap:e.fp.icons,pixelRatio:devicePixelRatio}),c=v(e.layerStore,e.routeStore),s={points:R,trail:k,lines:N,linesAnimated:C,currentPosition:x},a=g({dataSource:t,renderer:n,iconProvider:o,floorContext:c,layers:s,gpsConfig:A?.properties?.config,onTransitionClick:i=>{i.role==="exit"&&e.layerStore.updateVisibility(i.targetLayer,!0)},onRouteUpdate:(i,d)=>{e.routeStore.updateRoute([...i]),d.isEmpty()||(e.uiState.moveToRect=d)},onRouteDistance:i=>e.routeStore.updateRouteDistance(i)}),r=M({wayfinding:a,kioskIconMap:e.fp.icons,layer:s.points}),u=P({wayfinding:a,iconMap:e.fp.icons,pixelRatio:devicePixelRatio,floorContext:c,layer:s.points}),p=W({wayfinding:a,kioskHandler:r,yahHandler:u,stores:{routeStore:e.routeStore,uiState:e.uiState,layerStore:e.layerStore}});e.routeStore.showAccessible=t.getLines().some(i=>i.unaccessible);const l={wayfinding:a};return f=l,a.flush(),{wayfinding:a,dispose(){D(l)&&(f=null,e.routeStore.showAccessible=!1),p(),a.destroy()}}}function D(e){return f===e}function T(e,n){const t=e.find(o=>o.name===n);if(!t)throw new Error(`renderer: layer "${n}" not found in scene`);return t}function F(e,n){e.handleClick([n.def])&&n.stopPropagation()}function S(e,n,t){const o=n.current;if(!o)return;const c=t?e.handleHover([t.def]):!1;o.style.cursor=c?"pointer":""}
1
+ import{update as d}from"@expofp/renderer";import{createWayfinding as g,resolveWayfindingLayers as S}from"@expofp/wayfinding";import{fpGeo as R}from"../data/fpGeo";import{attachCardinalSnap as v}from"../engine/utils/rotation";import{createCanvasIconProvider as h,createFloorContext as x,createGraphDataSource as k}from"./adapters";import{bindMobxReactions as C}from"./bindMobxReactions";import{createKioskHandler as P}from"./handlers/kioskHandler";import{createYahHandler as W}from"./handlers/yahHandler";let u=null;export function isWayfindingReady(){return u!==null}function b(){if(!u)throw new Error("Wayfinding is not initialized \u2014 call createWayfinding() first.");return u}export function buildRoute(e,n,r){return b().wayfinding.buildRoute(e,n,r)}export function createWayfinding(e){const{scene:n,store:r,canvas:o}=e,c=S(n.rootLayer),{wayfinding:s,dispose:i}=w(r,c,{attachCardinalSnap:v,update:d}),t=c.icons;return t.onClick=f=>M(s,f),t.onPointerMove=f=>y(s,o,f),t.onPointerOut=()=>y(s,o),d(t),()=>{t.onClick=void 0,t.onPointerMove=void 0,t.onPointerOut=void 0,o.current&&(o.current.style.cursor=""),d(t),i()}}function w(e,n,r){const o=k(),c=h({iconMap:e.fp.icons,pixelRatio:devicePixelRatio}),s=x(e.layerStore,e.routeStore),i=g({dataSource:o,renderer:r,iconProvider:c,floorContext:s,layers:n,gpsConfig:R?.properties?.config,onTransitionClick:a=>{a.role==="exit"&&e.layerStore.updateVisibility(a.targetLayer,!0)},onRouteUpdate:(a,p)=>{e.routeStore.updateRoute([...a]),p.isEmpty()||(e.uiState.moveToRect=p)},onRouteDistance:a=>e.routeStore.updateRouteDistance(a)}),t=P({wayfinding:i,kioskIconMap:e.fp.icons}),f=W({wayfinding:i,iconMap:e.fp.icons,pixelRatio:devicePixelRatio,floorContext:s}),m=C({wayfinding:i,kioskHandler:t,yahHandler:f,stores:{routeStore:e.routeStore,uiState:e.uiState,layerStore:e.layerStore}});e.routeStore.showAccessible=o.getLines().some(a=>a.unaccessible);const l={wayfinding:i};return u=l,i.flush(),{wayfinding:i,dispose(){H(l)&&(u=null,e.routeStore.showAccessible=!1),m(),i.destroy()}}}function H(e){return u===e}function M(e,n){e.handleClick([n.def])&&n.stopPropagation()}function y(e,n,r){const o=n.current;if(!o)return;const c=r?e.handleHover([r.def]):!1;o.style.cursor=c?"pointer":""}
@@ -17,9 +17,8 @@ export type KioskHandler = (kiosk: Kiosk | null, activeFloor: string | undefined
17
17
  * runtime's portability: the runtime deals with source/destination/position/
18
18
  * transitions only, and never learns that kiosks exist.
19
19
  */
20
- export declare function createKioskHandler({ wayfinding, kioskIconMap, layer, }: {
20
+ export declare function createKioskHandler({ wayfinding, kioskIconMap, }: {
21
21
  wayfinding: Pick<Wayfinding, 'setIcon' | 'flush'>;
22
22
  kioskIconMap: Map<string, HTMLImageElement> | undefined;
23
- layer: string;
24
23
  }): KioskHandler;
25
24
  //# sourceMappingURL=kioskHandler.d.ts.map
@@ -1 +1 @@
1
- import{degToRad as u}from"@expofp/geometry";import{createKioskCanvas as s}from"../adapters";const r="kiosk",f=0;export function createKioskHandler({wayfinding:o,kioskIconMap:c,layer:n}){return(e,t,l)=>{if(!e){o.setIcon(r,null),o.flush();return}if(l!==f&&e.z&&t&&e.z!==t){o.setIcon(r,null),o.flush();return}o.setIcon(r,{canvas:s(c,e.iconSizePercent),layer:n,x:e.x,y:e.y,rotation:u(e.heading??0)}),o.flush()}}
1
+ import{degToRad as l}from"@expofp/geometry";import{createKioskCanvas as f}from"../adapters";const n="kiosk",p=0;export function createKioskHandler({wayfinding:t,kioskIconMap:a}){const s=new Map,u=e=>{const o=e??100,c=s.get(o);if(c)return c;const r=f(a,e);return s.set(o,r),r};return(e,o,c)=>{if(!e){t.setIcon(n,null),t.flush();return}if(c!==p&&e.z&&o&&e.z!==o){t.setIcon(n,null),t.flush();return}t.setIcon(n,{canvas:u(e.iconSizePercent),x:e.x,y:e.y,rotation:l(e.heading??0)}),t.flush()}}
@@ -12,11 +12,10 @@ export type YahHandler = (position: {
12
12
  readonly y: number;
13
13
  readonly layer: string;
14
14
  } | null) => void;
15
- export declare function createYahHandler({ wayfinding, iconMap, pixelRatio, floorContext, layer, }: {
15
+ export declare function createYahHandler({ wayfinding, iconMap, pixelRatio, floorContext, }: {
16
16
  wayfinding: Pick<Wayfinding, 'setIcon' | 'flush'>;
17
17
  iconMap: Map<string, HTMLImageElement>;
18
18
  pixelRatio: number;
19
19
  floorContext: FloorContext;
20
- layer: string;
21
20
  }): YahHandler;
22
21
  //# sourceMappingURL=yahHandler.d.ts.map
@@ -1 +1 @@
1
- import{createImageCanvas as u,createYahCanvas as A}from"../../components/Map/drawing/config/canvases";import{decreaseByPercentage as o}from"../../utils/math";const n="yah",C="#ff4343",E=64,H=90,_=32;function Y(e,a){const r=e.get(n);return r?(r.id=n,u(r,o(E,_),o(H,_),a)):A(a,C)}export function createYahHandler({wayfinding:e,iconMap:a,pixelRatio:r,floorContext:I,layer:l}){const c=Y(a,r);return c.id="current-location-2",t=>{if(!t){e.setIcon(n,null),e.flush();return}const s=I.isLayerVisible(t.layer);e.setIcon(n,{canvas:c,layer:l,x:t.x,y:t.y,hidden:!s,dimmed:!s,origin:[.5,1]}),e.flush()}}
1
+ import{createImageCanvas as l,createYahCanvas as u}from"../../components/Map/drawing/config/canvases";import{decreaseByPercentage as o}from"../../utils/math";const n="yah",A="#ff4343",C=64,E=90,_=32;function H(e,a){const r=e.get(n);return r?(r.id=n,l(r,o(C,_),o(E,_),a)):u(a,A)}export function createYahHandler({wayfinding:e,iconMap:a,pixelRatio:r,floorContext:I}){const c=H(a,r);return c.id="current-location-2",t=>{if(!t){e.setIcon(n,null),e.flush();return}const s=I.isLayerVisible(t.layer);e.setIcon(n,{canvas:c,x:t.x,y:t.y,hidden:!s,dimmed:!s,origin:[.5,1]}),e.flush()}}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@expofp/floorplan",
3
- "version": "3.32.0",
3
+ "version": "3.34.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/expofp/efp-app.git",
@@ -69,15 +69,15 @@
69
69
  "tslib": "^2.3.0",
70
70
  "uuid": "^9.0.1",
71
71
  "zod": "4.4.3",
72
- "@expofp/config": "3.32.0",
73
- "@expofp/debug": "3.32.0",
74
- "@expofp/geometry": "3.32.0",
75
- "@expofp/renderer": "3.32.0",
76
- "@expofp/resolve": "3.32.0",
77
- "@expofp/schema": "3.32.0",
78
- "@expofp/ui": "3.32.0",
79
- "@expofp/utils": "3.32.0",
80
- "@expofp/wayfinding": "3.32.0"
72
+ "@expofp/config": "3.34.0",
73
+ "@expofp/debug": "3.34.0",
74
+ "@expofp/geometry": "3.34.0",
75
+ "@expofp/renderer": "3.34.0",
76
+ "@expofp/resolve": "3.34.0",
77
+ "@expofp/schema": "3.34.0",
78
+ "@expofp/ui": "3.34.0",
79
+ "@expofp/utils": "3.34.0",
80
+ "@expofp/wayfinding": "3.34.0"
81
81
  },
82
82
  "devDependencies": {
83
83
  "@babel/plugin-proposal-decorators": "^8.0.2",
@@ -1,15 +0,0 @@
1
- /**
2
- * Layer name constants — the contract between scene setup (config-all.ts)
3
- * and the wayfinding runtime that fills these layers via the renderer.
4
- *
5
- * TODO(future): when renderer learns to create layers dynamically inside
6
- * createWayfindingRenderer, these constants disappear — runtime will pass
7
- * IconConfigs without naming layers, and config-all.ts will not pre-create
8
- * any wf-* layers.
9
- */
10
- export declare const WF_POINTS_LAYER_NAME = "wf-points";
11
- export declare const WF_TRAIL_LAYER_NAME = "wf-trail-points";
12
- export declare const WF_LINES_LAYER_NAME = "wf-lines";
13
- export declare const WF_LINES_ANIMATED_LAYER_NAME = "wf-lines-animated";
14
- export declare const WF_CURRENT_POSITION_LAYER_NAME = "wf-current-position";
15
- //# sourceMappingURL=layers.d.ts.map
@@ -1 +0,0 @@
1
- export const WF_POINTS_LAYER_NAME="wf-points",WF_TRAIL_LAYER_NAME="wf-trail-points",WF_LINES_LAYER_NAME="wf-lines",WF_LINES_ANIMATED_LAYER_NAME="wf-lines-animated",WF_CURRENT_POSITION_LAYER_NAME="wf-current-position";