@expofp/floorplan 3.35.2 → 3.37.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 (98) hide show
  1. package/dist/browser/{Button-BPQnJjoN.js → Button-CNs8VDGG.js} +5 -5
  2. package/dist/browser/{CookieConsent-CYpwXrw0.js → CookieConsent-CcBA-IqC.js} +7 -7
  3. package/dist/browser/{Debug-DJ02jJ5Q.js → Debug-DzeeojOv.js} +7 -7
  4. package/dist/browser/{DebugTools-BCx6s2Fc.js → DebugTools-Cg2kMVuz.js} +6 -6
  5. package/dist/browser/{Demo-EWDcqW4X.js → Demo-DlX2eRc5.js} +9 -9
  6. package/dist/browser/{Free-DKMv19Hs.js → Free-BPXxN14i.js} +9 -9
  7. package/dist/browser/{GalleryContainer-CvjywJze.js → GalleryContainer-D3PtNDq1.js} +10 -10
  8. package/dist/browser/{GpsLoader-DnZOaiOj.js → GpsLoader-MuKCP4hM.js} +29 -29
  9. package/dist/browser/KioskStore-DwJPzK8K.js +251 -0
  10. package/dist/browser/{MaplibreAdapter-DfUBzoCo.js → MaplibreAdapter-DzycfkS9.js} +1108 -1107
  11. package/dist/browser/{ModalContainer-iUxlX_EW.js → ModalContainer-U0c94Gcg.js} +10 -10
  12. package/dist/browser/{PermissionNotice-4GkEdwAt.js → PermissionNotice-DyTh0N80.js} +6 -6
  13. package/dist/browser/{SetKioskMode-r4WLFRA0.js → SetKioskMode-DFNqggA2.js} +13 -13
  14. package/dist/browser/{ShowKiosk-DmmyfPH3.js → ShowKiosk-BuXxL7Re.js} +11 -11
  15. package/dist/browser/{ViewerMenuPanel-G5WeOVxy.js → ViewerMenuPanel--flTFhEB.js} +10 -10
  16. package/dist/browser/{add-debug-secret-listener-cqT9ixCW.js → add-debug-secret-listener-DvCB0ort.js} +1 -1
  17. package/dist/browser/{adopt-global-settings-TiK3bdw8.js → adopt-global-settings-CVQmrlox.js} +9 -9
  18. package/dist/browser/{boolean-editor-gv5KgSFC.js → boolean-editor-Bk6Lfd_2.js} +9 -9
  19. package/dist/browser/{bootIntercom-DSN5Oxb8.js → bootIntercom-iv5wse99.js} +2 -2
  20. package/dist/browser/bundle.json +71 -71
  21. package/dist/browser/{camera-events-BzzhQV7p.js → camera-events-Uyswpptc.js} +1 -1
  22. package/dist/browser/{classnames-DaTJg5Ke.js → classnames-TUIUYS3L.js} +2 -2
  23. package/dist/browser/{client-DXynaRJh.js → client-Bm485HWD.js} +5 -5
  24. package/dist/browser/{components-BJkZsl-J.js → components-DcbtuzgN.js} +1193 -1191
  25. package/dist/browser/{debug-context-DafSJe6V.js → debug-context-CiRcA5z7.js} +5 -5
  26. package/dist/browser/{debug-overlay-Cnht9M1f.js → debug-overlay-BaIOFaoE.js} +10 -10
  27. package/dist/browser/{debug-ui-CfgbL90e.js → debug-ui-B3yO6QTa.js} +6 -6
  28. package/dist/browser/{dimming-BTSxZdFU.js → dimming-y3MYb4O3.js} +262 -262
  29. package/dist/browser/{dist-TUAZaqFf.js → dist-BaXVVYa9.js} +5 -5
  30. package/dist/browser/{dist-CyuhMWuJ.js → dist-DAWn7KI8.js} +6 -6
  31. package/dist/browser/{dist-C5PCsTLB.js → dist-fMLrkr8V.js} +3 -3
  32. package/dist/browser/{efp-debug-init-Dmuf0OD9.js → efp-debug-init-CVDjWVXl.js} +3 -3
  33. package/dist/browser/{enum-editor-DhSd_imG.js → enum-editor-B-vJDdwf.js} +4 -4
  34. package/dist/browser/{es5-DjAesjxT.js → es5-CYKbplUA.js} +2 -2
  35. package/dist/browser/{event-head-CQJFTgLp.js → event-head-BtayW8HA.js} +1 -1
  36. package/dist/browser/{event-not-found-BD8VwBEd.js → event-not-found-B4Tz7V1H.js} +3 -3
  37. package/dist/browser/{exports-BWxS7e8x.js → exports-DTjBGI92.js} +1 -1
  38. package/dist/browser/{favicon-knUtM628.js → favicon-Bq3vaHM_.js} +1 -1
  39. package/dist/browser/{fetch-retry.umd-DW0ekhe-.js → fetch-retry.umd-Cw9OsA-s.js} +2 -2
  40. package/dist/browser/{flex-Di6JEi7f.js → flex-C0jlxRr9.js} +5 -5
  41. package/dist/browser/{floorplan.loader-yNOwUjHQ.js → floorplan.loader-B0b2d8rT.js} +10 -10
  42. package/dist/browser/{floorplan.ready-C1R3whps.js → floorplan.ready-Bi2mkI_V.js} +186 -191
  43. package/dist/browser/{fuse-CklOJAb0.js → fuse-CS-5RDcg.js} +2 -2
  44. package/dist/browser/{i18n-DOTxhE5G.js → i18n-LVijVdMb.js} +5 -5
  45. package/dist/browser/index.js +16 -16
  46. package/dist/browser/{index.module-mXl8MtT3.js → index.module-D7TtIVgi.js} +4 -4
  47. package/dist/browser/{integrateKiosk-b2AMRK5l.js → integrateKiosk-BmVtSyFv.js} +4 -4
  48. package/dist/browser/{is-own-domain-BZ3_6LnT.js → is-own-domain-BL66TBhN.js} +1 -1
  49. package/dist/browser/{is-webview-BwUFYV3U.js → is-webview-DwQBZFcX.js} +1 -1
  50. package/dist/browser/{jsx-runtime-BUFDOCAr.js → jsx-runtime-DS8yJ69h.js} +2 -2
  51. package/dist/browser/{kiosk-record-Dx28-RL0.js → kiosk-record-goZjGV8Y.js} +1 -1
  52. package/dist/browser/{lib-BSoYmy6y.js → lib-dIwLYV0z.js} +3 -3
  53. package/dist/browser/{loadImage-CT_B_63i.js → loadImage-BDk9loud.js} +4 -4
  54. package/dist/browser/{logDeviceInfo-D5aYLPIp.js → logDeviceInfo-227-j__X.js} +9 -9
  55. package/dist/browser/{mobx-DmvJdfvB.js → mobx-D3NRVJz0.js} +4 -4
  56. package/dist/browser/{optional-boolean-editor-DQP8ScA6.js → optional-boolean-editor-BtWARd1i.js} +3 -3
  57. package/dist/browser/{optional-enum-editor-CK8QdwSw.js → optional-enum-editor-CJEQ7pDc.js} +4 -4
  58. package/dist/browser/{optional-string-editor-DXnEx_OV.js → optional-string-editor-Bd6a7i5L.js} +4 -4
  59. package/dist/browser/{particles.min-DTfxDQ63.js → particles.min-CGC94f9R.js} +2 -2
  60. package/dist/browser/{react-BYD9sU4s.js → react-DUWO7pPs.js} +2 -2
  61. package/dist/browser/{react-dom-DcdoI_pK.js → react-dom-C08Q2osf.js} +3 -3
  62. package/dist/browser/{rolldown-runtime-D02yMjJw.js → rolldown-runtime-CooLcCzw.js} +1 -1
  63. package/dist/browser/{scheduler-CHcj0Ili.js → scheduler-DuPfkMc5.js} +2 -2
  64. package/dist/browser/{select-CVLafnyq.js → select-4KfoG4mp.js} +10 -10
  65. package/dist/browser/{settings-DTliQPIF.js → settings-Dbl2f0ow.js} +2 -2
  66. package/dist/browser/{settings-item-CSulAbWO.js → settings-item-CRyyzC8b.js} +6 -6
  67. package/dist/browser/{store-hAR4IdGb.js → store-BcEvlgIF.js} +3695 -3695
  68. package/dist/browser/{string-editor-Bjapa7B7.js → string-editor-lytU5wX-.js} +4 -4
  69. package/dist/browser/{text-field-dygdoVbb.js → text-field-BGvPdsaN.js} +5 -5
  70. package/dist/browser/{theme-mpY9s4gk.js → theme-CxFvVGHQ.js} +8 -8
  71. package/dist/browser/{ui-B7DDzAAp.js → ui-D3H7hMUC.js} +8 -8
  72. package/dist/browser/{useRenderTarget-M5MRh8Ft.js → useRenderTarget-DGSXEfzc.js} +4 -4
  73. package/dist/browser/{viewport-DOv49fSW.js → viewport-BczDYrg4.js} +3 -3
  74. package/dist/esm/components/Kiosk/KioskStore.d.ts +8 -0
  75. package/dist/esm/components/Kiosk/KioskStore.js +1 -1
  76. package/dist/esm/components/Kiosk/kiosk-mode.d.ts +18 -2
  77. package/dist/esm/components/Kiosk/kiosk-mode.js +1 -1
  78. package/dist/esm/components/Map/MapCamera.js +1 -1
  79. package/dist/esm/components/Map/camera-events.d.ts +9 -6
  80. package/dist/esm/components/Map/drawing/config/config-booths.d.ts +2 -2
  81. package/dist/esm/components/Map/drawing/config/config-booths.js +1 -1
  82. package/dist/esm/components/Map/drawing/config/config-load-layer.d.ts +2 -2
  83. package/dist/esm/components/Map/drawing/config/config-load-layer.js +1 -1
  84. package/dist/esm/components/Map/drawing/config/layer-images.d.ts +1 -17
  85. package/dist/esm/components/Map/drawing/config/loadBoothsImages.js +1 -1
  86. package/dist/esm/components/Map/pointer.d.ts +7 -5
  87. package/dist/esm/components/MapControlsContainer.js +1 -1
  88. package/dist/esm/components/Maplibre/MaplibreAdapter.js +1 -1
  89. package/dist/esm/components/Maplibre/useKioskCameraEvents.d.ts +20 -0
  90. package/dist/esm/components/Maplibre/useKioskCameraEvents.js +1 -0
  91. package/dist/esm/intercom/shouldLoad.js +1 -1
  92. package/dist/esm/store/UIState.d.ts +2 -0
  93. package/dist/esm/store/UIState.js +1 -1
  94. package/dist/esm/store/init/init-ui.js +1 -1
  95. package/package.json +10 -10
  96. package/dist/browser/KioskStore-B_QD5WD2.js +0 -241
  97. package/dist/esm/components/Maplibre/useKioskIdleEvents.d.ts +0 -17
  98. package/dist/esm/components/Maplibre/useKioskIdleEvents.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.35.2" };
4
+ e.SENTRY_RELEASE = { id: "3.37.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-BUFDOCAr.js";
10
- import { t } from "./settings-item-CSulAbWO.js";
11
- import { t as n } from "./text-field-dygdoVbb.js";
9
+ import { t as e } from "./jsx-runtime-DS8yJ69h.js";
10
+ import { t } from "./settings-item-CRyyzC8b.js";
11
+ import { t as n } from "./text-field-BGvPdsaN.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.35.2" };
4
+ e.SENTRY_RELEASE = { id: "3.37.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-D02yMjJw.js";
10
- import { t } from "./react-BYD9sU4s.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-Di6JEi7f.js";
12
- import { t as l } from "./classnames-DaTJg5Ke.js";
9
+ import { r as e } from "./rolldown-runtime-CooLcCzw.js";
10
+ import { t } from "./react-DUWO7pPs.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-C0jlxRr9.js";
12
+ import { t as l } from "./classnames-TUIUYS3L.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.35.2" };
4
+ e.SENTRY_RELEASE = { id: "3.37.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-D02yMjJw.js";
10
- import { t } from "./react-BYD9sU4s.js";
11
- import { t as n } from "./jsx-runtime-BUFDOCAr.js";
12
- import { t as r } from "./react-dom-DcdoI_pK.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-Di6JEi7f.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-CyuhMWuJ.js";
15
- import { t as y } from "./classnames-DaTJg5Ke.js";
9
+ import { r as e } from "./rolldown-runtime-CooLcCzw.js";
10
+ import { t } from "./react-DUWO7pPs.js";
11
+ import { t as n } from "./jsx-runtime-DS8yJ69h.js";
12
+ import { t as r } from "./react-dom-C08Q2osf.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-C0jlxRr9.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-DAWn7KI8.js";
15
+ import { t as y } from "./classnames-TUIUYS3L.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.35.2" };
4
+ e.SENTRY_RELEASE = { id: "3.37.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-D02yMjJw.js";
10
- import { a as t, i as n, s as r } from "./efp-debug-init-Dmuf0OD9.js";
11
- import { a as i, i as a } from "./adopt-global-settings-TiK3bdw8.js";
12
- import { t as o } from "./jsx-runtime-BUFDOCAr.js";
13
- import "./settings-DTliQPIF.js";
14
- import { t as s } from "./add-debug-secret-listener-cqT9ixCW.js";
9
+ import { r as e } from "./rolldown-runtime-CooLcCzw.js";
10
+ import { a as t, i as n, s as r } from "./efp-debug-init-CVDjWVXl.js";
11
+ import { a as i, i as a } from "./adopt-global-settings-CVQmrlox.js";
12
+ import { t as o } from "./jsx-runtime-DS8yJ69h.js";
13
+ import "./settings-Dbl2f0ow.js";
14
+ import { t as s } from "./add-debug-secret-listener-DvCB0ort.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-CfgbL90e.js"), { createRoot: i } = await import("./client-DXynaRJh.js").then((t) => /* @__PURE__ */ e(t.t(), 1)), a = document.createElement("div");
29
+ let { DebugUi: n } = await import("./debug-ui-B3yO6QTa.js"), { createRoot: i } = await import("./client-Bm485HWD.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.35.2" };
4
+ e.SENTRY_RELEASE = { id: "3.37.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-D02yMjJw.js";
10
- import { t } from "./react-BYD9sU4s.js";
11
- import { l as n } from "./store-hAR4IdGb.js";
9
+ import { r as e } from "./rolldown-runtime-CooLcCzw.js";
10
+ import { t } from "./react-DUWO7pPs.js";
11
+ import { l as n } from "./store-BcEvlgIF.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.35.2" };
4
+ e.SENTRY_RELEASE = { id: "3.37.0" };
5
5
  var t = new e.Error().stack;
6
- t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "c4f57458-fee1-48bc-a518-81372913a556", e._sentryDebugIdIdentifier = "sentry-dbid-c4f57458-fee1-48bc-a518-81372913a556");
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, ht as t } from "./store-hAR4IdGb.js";
9
+ import { c as e, vt as t } from "./store-BcEvlgIF.js";
10
10
  //#region src/components/Map/viewport.ts
11
11
  function n(e) {
12
12
  return {
@@ -13,6 +13,13 @@ declare class KioskStore {
13
13
  statusMessageTimer: number;
14
14
  startCleanupMessages(): void;
15
15
  private isResettingCamera;
16
+ /**
17
+ * Set while a restore's own camera movement is still to be heard about, and consumed by the settle
18
+ * it ends with — see {@link handleNavigationChange}. Assigned from what the restore reports it
19
+ * moved, so a panel opened with no camera at all does not read the operator's first move as the
20
+ * restore's.
21
+ */
22
+ private isRestoringFraming;
16
23
  resetCamera(): Promise<void>;
17
24
  /**
18
25
  * Restores the home framing in map mode. The kiosk is integrated at page load,
@@ -25,6 +32,7 @@ declare class KioskStore {
25
32
  /**
26
33
  * Restores the home framing on the floor plan. The plan's own camera takes it whenever it is up;
27
34
  * without one mounted there is nothing to move.
35
+ * @returns Whether there was a camera to move.
28
36
  */
29
37
  private resetPlanCamera;
30
38
  restoreData(): void;
@@ -1 +1 @@
1
- import{__decorate as i}from"tslib";import{action as o,computed as h,observable as k,toJS as c,when as S}from"mobx";import a from"../../store";import{areLayersEnabled as g}from"../../utils/areLayersEnabled";import{t as m}from"../../utils/i18n";import{mapCamera as d}from"../Map/camera";import{mapViewport as f}from"../Map/viewport";import{getPtScaleZoomRatio as C,toFiniteNumber as u}from"./kiosk-record";import{updateKiosk as y}from"./kioskApi";import{getSavedKiosk as M,removeKiosk as K,saveKiosk as P}from"./SetKiosk";const b=2e4;class s{constructor(){this.savedKiosk=null,this.statusMessages=[],this.statusMessageTimer=0,this.isResettingCamera=!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=d()?.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=c(this.kiosk);if(!t||!e)return!!t!=!!e;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!0;for(const l of n)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())return;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 n=u(t?.mapCenterLng),r=u(t?.mapCenterLat),l=u(t?.mapZoom);return n===void 0||r===void 0||l===void 0?(e.resetPitch(),a.uiState.fitBounds(),!0):(e.applyCameraState({lng:n,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 S(()=>!!e.cameraPort||!e.showMaplibre,{timeout:b})}catch{return null}return e.cameraPort}async resetPlanCamera(){const e=d();if(!e)return;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 n=C(t);n!==void 0&&await e.api.zoomBy(n,{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 p=u(t?.mapRollDegrees);p!==void 0&&await e.api.rollTo(p,{immediate:!0})}restoreData(){const e=M();e&&(this.setKiosk(e),this.savedKiosk=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(){this.setKiosk(null),a.uiState.setForceDim(!1),a.uiState.enableSetKioskMode(!1),a.searchStore.closeSearch()}handleDelete(){K(),this.setKiosk(null),a.uiState.resetMapSettings(),a.uiState.resetUIScale(),this.addStatusMessage({variant:"success",title:m("Deleted")})}handleSave(){const e=f();if(!e)return;const t=c(this.kiosk);if(!t)return;const n=this.getCameraState(),r={...t,...n};if(!e.isVisible({x:r.x,y:r.y})){this.addStatusMessage({variant:"error",title:m("Kiosk not visible")});return}this.setKiosk(r),P(r),y(r,"https://app.expofp.com/"),a.uiState.setUIScale(r.uiScale,!0),this.addStatusMessage({variant:"success",title:m("Saved")}),this.savedKiosk=r}delayChange(e){requestAnimationFrame(()=>e?.())}handleChange(e){const t=c(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=c(this.kiosk);t&&this.setKiosk({...t,mapInitialPtScale:e})}handleClick(e){const t=c(this.kiosk),n=a.fp.getFloors(),r=g()?n.find(p=>p.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=c(this.kiosk);e&&this.setKiosk({...e,...this.getCameraState()})}}i([h({keepAlive:!0})],s.prototype,"kiosk",null),i([o],s.prototype,"setKiosk",null),i([k],s.prototype,"savedKiosk",void 0),i([h({keepAlive:!0})],s.prototype,"hasUnsavedChanges",null),i([k],s.prototype,"statusMessages",void 0),i([o],s.prototype,"addStatusMessage",null),i([o],s.prototype,"clearStatusMessages",null),i([o],s.prototype,"startCleanupMessages",null),i([o],s.prototype,"resetCamera",null),i([o],s.prototype,"restoreData",null),i([o],s.prototype,"handleSetupReady",null),i([o],s.prototype,"handleClose",null),i([o],s.prototype,"handleDelete",null),i([o],s.prototype,"handleSave",null),i([o],s.prototype,"handleChange",null),i([o],s.prototype,"setInitialPtScale",null),i([o],s.prototype,"handleClick",null),i([o],s.prototype,"handleNavigationChange",null);export default new s;
1
+ import{__decorate as i}from"tslib";import{getConfig as f}from"@expofp/config";import{action as n,computed as k,observable as g,toJS as m,when as C}from"mobx";import{KIOSK_ENABLE_KEY as p}from"../../constants";import a from"../../store";import{areLayersEnabled as y}from"../../utils/areLayersEnabled";import{t as h}from"../../utils/i18n";import{isLocalStorageAvailable as S}from"../../utils/localStorage";import{mapCamera as d}from"../Map/camera";import{mapViewport as K}from"../Map/viewport";import{screenFitsKiosk as M,storedKioskMode as v}from"./kiosk-mode";import{getPtScaleZoomRatio as P,toFiniteNumber as u}from"./kiosk-record";import{updateKiosk as b}from"./kioskApi";import{getSavedKiosk as w,removeKiosk as F,saveKiosk as R}from"./SetKiosk";import{KIOSK_STORAGE_KEY as D}from"./SetKiosk/constants";const I=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=d()?.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 C(()=>!!e.cameraPort||!e.showMaplibre,{timeout:I})}catch{return null}return e.cameraPort}async resetPlanCamera(){const e=d();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=P(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);return c!==void 0&&await e.api.rollTo(c,{immediate:!0}),!0}restoreData(){const e=w();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(){M(a.uiState)&&v(f())||(a.uiState.kiosk=!1),a.uiState.restoreUIScale(),this.setKiosk(null),a.uiState.setForceDim(!1),a.uiState.enableSetKioskMode(!1),a.searchStore.closeSearch()}handleDelete(){S&&localStorage.getItem(D)!==null&&localStorage.getItem(p)==="1"&&localStorage.removeItem(p),F(),this.savedKiosk=null,this.setKiosk(null),a.uiState.resetMapSettings(),a.uiState.resetUIScale(),this.addStatusMessage({variant:"success",title:h("Deleted")})}handleSave(){const e=K();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),R(r),S&&localStorage.setItem(p,"1"),b(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=y()?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([k({keepAlive:!0})],s.prototype,"kiosk",null),i([n],s.prototype,"setKiosk",null),i([g],s.prototype,"savedKiosk",void 0),i([k({keepAlive:!0})],s.prototype,"hasUnsavedChanges",null),i([g],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;
@@ -1,3 +1,4 @@
1
+ import { type Config } from '@expofp/config';
1
2
  import type UIState from '../../store/UIState';
2
3
  /**
3
4
  * Whether this plan has room for the kiosk layout.
@@ -23,12 +24,27 @@ import type UIState from '../../store/UIState';
23
24
  export declare function screenFitsKiosk(uiState: UIState): boolean;
24
25
  /**
25
26
  * Toggle kiosk mode — the single meaning of `kiosk=1` / `kiosk=0` from either
26
- * channel (the `?kiosk=` URL param, the typed search-box command). Exit also
27
- * resets the per-device UI scale; init-ui's reaction persists the choice.
27
+ * channel (the `?kiosk=` URL param, the typed search-box command) — and store
28
+ * that choice. Exit also resets the per-device UI scale.
28
29
  *
29
30
  * Turning it ON is refused where the kiosk layout does not fit
30
31
  * ({@link screenFitsKiosk}); turning it OFF always works, so the `kiosk=0`
31
32
  * opt-out can never be locked out by the size of the screen it is typed on.
32
33
  */
33
34
  export declare function applyKioskMode(uiState: UIState, enabled: boolean): void;
35
+ /**
36
+ * Store-free kiosk check — the mode a load starts in: the `?kiosk=` param wins, then whatever the
37
+ * device itself says. Used by the Intercom boot, which runs before the MobX stores exist, so the
38
+ * screen rule above is the caller's to add. The direct `?kiosk` read is kiosk-semantic and migrates
39
+ * with the kiosk config node (retirement plan §4.7).
40
+ */
41
+ export declare function isKioskMode(data: Config): boolean;
42
+ /**
43
+ * The same check without the `?kiosk=` param: the mode init-ui and ShowKiosk settle on between
44
+ * them, from the stored flag and the kiosks left — the enable flag, then a saved-kiosk object (a
45
+ * provisioned device is a kiosk on first load, before the flag is set), then the config anchor.
46
+ * What the setkiosk panel asks on close, since ShowKiosk remounts right after it and reads no
47
+ * param.
48
+ */
49
+ export declare function storedKioskMode(data: Config): boolean;
34
50
  //# sourceMappingURL=kiosk-mode.d.ts.map
@@ -1 +1 @@
1
- import{untracked as i}from"mobx";import{MOBILE_BREAKPOINT as o}from"../../constants";import n from"../../tools/logger";export function screenFitsKiosk(r){return r.screenSize.width>o}export function applyKioskMode(r,e){e&&i(()=>t(r))||(r.kiosk=e,e||r.resetUIScale())}function t(r){return screenFitsKiosk(r)?!1:(n.warn(`Kiosk mode refused: the plan is ${r.screenSize.width}px wide, and the kiosk layout needs more than ${o}px.`),!0)}
1
+ import{untracked as n}from"mobx";import{KIOSK_ENABLE_KEY as r,MOBILE_BREAKPOINT as i}from"../../constants";import s from"../../tools/logger";import{isLocalStorageAvailable as t}from"../../utils/localStorage";import{getSavedKiosk as a}from"./SetKiosk/storage";export function screenFitsKiosk(o){return o.screenSize.width>i}export function applyKioskMode(o,e){e&&n(()=>f(o))||(o.kiosk=e,e||o.resetUIScale(),t&&window.localStorage.setItem(r,e?"1":"0"))}export function isKioskMode(o){const e=new URLSearchParams(window.location.search).get(r);return e==="1"||e==="0"?e==="1":storedKioskMode(o)}export function storedKioskMode(o){const e=t?window.localStorage.getItem(r):null;return e==="1"||e==="0"?e==="1":t&&a()!=null||Object.keys(o.kiosk??{}).length>0}function f(o){return screenFitsKiosk(o)?!1:(s.warn(`Kiosk mode refused: the plan is ${o.screenSize.width}px wide, and the kiosk layout needs more than ${i}px.`),!0)}
@@ -1 +1 @@
1
- import{Box as s}from"@expofp/geometry";import{useCameraAPI as g,useCameraMoveStart as x,useCameraState as R}from"@expofp/renderer";import{useEffect as T,useLayoutEffect as B,useRef as M,useState as P}from"react";import{fpGeo as S}from"../../data/fpGeo";import{svgArea as F}from"../../data/svg";import l,{uiState as e}from"../../store";import{BoothBase as C}from"../../store/BoothStore";import d from"../../tools/logger";import w from"../../tools/settings";import{areLayersEnabled as N}from"../../utils/areLayersEnabled";import{parseNumberPair as v}from"../../utils/camera-map-settings";import{convertGpsToLocal as z}from"../../utils/gps";import{useOneShotReaction as f}from"../../utils/mobx";import{createMapCamera as E,setMapCamera as h}from"./camera";import{notifyCameraMoved as b}from"./camera-events";import{resetExternalOverlay as k}from"./pointer";export function MapCamera(){const t=g(),n=R(),r=M({api:t,state:n}),[a]=P(()=>E(r));return B(()=>{r.current={api:t,state:n}}),T(()=>(h(a),()=>h(void 0)),[a]),x(()=>{k(),b()}),f(()=>e.zoomBy,o=>{o&&(r.current.api.zoomBy(o),e.zoomBy=null)},[]),f(()=>e.rollReset,o=>{o&&(r.current.api.reset({roll:!0}),e.rollReset=!1)},[]),f(()=>e.centerMap,o=>{o&&(r.current.api.reset({zoom:!!(e.list.type==="search"&&e.list.text)}),e.centerMap=!1)},[]),f(()=>e.moveToRect,o=>{if(!o)return;const{width:m,height:i}=o.size;m>0&&i>0&&Number.isFinite(m)&&Number.isFinite(i)&&y(r.current.api,o,e.moveToRectPaddingPercent??void 0),e.moveToRect=null,e.moveToRectPaddingPercent=null},[]),f(()=>e.moveToBooths,o=>{if(!o)return;d.log("watched moveToBooths",o);const m=o.filter(i=>i.rect).map(i=>i.rect);m.length&&y(r.current.api,s.fromUnion(...m)),e.moveToBooths=null},[]),f(()=>e.mapSettings,({center:o,centerxy:m,bearing:i,pitchdegrees:c,z:p})=>{try{p&&l.fp.activateFloor({name:p});const u=O(o,m);u&&r.current.api.panTo(u),i!==void 0&&Number.isFinite(i)&&r.current.api.rollTo(i),c!=null&&Number.isFinite(c)&&r.current.api.pitchTo(c,{immediate:!e.animatePitch})}catch(u){d.error("Error in mapSettings reaction",u)}},[]),null}function y(t,n,r){t.zoomTo(G(n),{padding:r??A(n,F),maxZoom:Number.isFinite(w.maxZoom)?void 0:10,within:L()})}function L(){const t=e.canvasVisibleRectPx;return e.shouldShiftMapRect?s.fromMinMax({x:t.min.x+e.overlayWidthPx,y:t.min.y},t.max):t}function G(t){const n=e.kioskData;if(!n)return t;const r=e.selectedRoute?.from,a=r instanceof C?r.layer?.name:r?.layer;return(N()?a===l.routeStore.currentRouteLayer?.name:!0)?s.fromUnion(t,new s(n.x,n.y,1,1)):t}function A(t,n){return!t||!n?0:(t.area/n.area>.1?15:25)/100}function O(t,n){if(t){const a=v(t);if(!a)return;const o=S?.properties?.config;if(!o)throw new Error("Map center given in GPS, but the plan has no GPS config");return z({lat:a[0],lng:a[1]},o)??void 0}const r=v(n);if(r)return{x:r[0],y:r[1]}}
1
+ import{Box as s}from"@expofp/geometry";import{useCameraAPI as g,useCameraGesture as x,useCameraMoveEnd as R,useCameraState as T}from"@expofp/renderer";import{useEffect as B,useLayoutEffect as M,useRef as P,useState as S}from"react";import{fpGeo as C}from"../../data/fpGeo";import{svgArea as F}from"../../data/svg";import l,{uiState as e}from"../../store";import{BoothBase as w}from"../../store/BoothStore";import d from"../../tools/logger";import E from"../../tools/settings";import{areLayersEnabled as N}from"../../utils/areLayersEnabled";import{parseNumberPair as v}from"../../utils/camera-map-settings";import{convertGpsToLocal as z}from"../../utils/gps";import{useOneShotReaction as f}from"../../utils/mobx";import{createMapCamera as b,setMapCamera as h}from"./camera";import{notifyCameraMoved as k}from"./camera-events";import{resetExternalOverlay as G}from"./pointer";export function MapCamera(){const t=g(),n=T(),r=P({api:t,state:n}),[a]=S(()=>b(r));return M(()=>{r.current={api:t,state:n}}),B(()=>(h(a),()=>h(void 0)),[a]),x(()=>G()),R(()=>k()),f(()=>e.zoomBy,o=>{o&&(r.current.api.zoomBy(o),e.zoomBy=null)},[]),f(()=>e.rollReset,o=>{o&&(r.current.api.reset({roll:!0}),e.rollReset=!1)},[]),f(()=>e.centerMap,o=>{o&&(r.current.api.reset({zoom:!!(e.list.type==="search"&&e.list.text)}),e.centerMap=!1)},[]),f(()=>e.moveToRect,o=>{if(!o)return;const{width:m,height:i}=o.size;m>0&&i>0&&Number.isFinite(m)&&Number.isFinite(i)&&y(r.current.api,o,e.moveToRectPaddingPercent??void 0),e.moveToRect=null,e.moveToRectPaddingPercent=null},[]),f(()=>e.moveToBooths,o=>{if(!o)return;d.log("watched moveToBooths",o);const m=o.filter(i=>i.rect).map(i=>i.rect);m.length&&y(r.current.api,s.fromUnion(...m)),e.moveToBooths=null},[]),f(()=>e.mapSettings,({center:o,centerxy:m,bearing:i,pitchdegrees:c,z:p})=>{try{p&&l.fp.activateFloor({name:p});const u=U(o,m);u&&r.current.api.panTo(u),i!==void 0&&Number.isFinite(i)&&r.current.api.rollTo(i),c!=null&&Number.isFinite(c)&&r.current.api.pitchTo(c,{immediate:!e.animatePitch})}catch(u){d.error("Error in mapSettings reaction",u)}},[]),null}function y(t,n,r){t.zoomTo(A(n),{padding:r??O(n,F),maxZoom:Number.isFinite(E.maxZoom)?void 0:10,within:L()})}function L(){const t=e.canvasVisibleRectPx;return e.shouldShiftMapRect?s.fromMinMax({x:t.min.x+e.overlayWidthPx,y:t.min.y},t.max):t}function A(t){const n=e.kioskData;if(!n)return t;const r=e.selectedRoute?.from,a=r instanceof w?r.layer?.name:r?.layer;return(N()?a===l.routeStore.currentRouteLayer?.name:!0)?s.fromUnion(t,new s(n.x,n.y,1,1)):t}function O(t,n){return!t||!n?0:(t.area/n.area>.1?15:25)/100}function U(t,n){if(t){const a=v(t);if(!a)return;const o=C?.properties?.config;if(!o)throw new Error("Map center given in GPS, but the plan has no GPS config");return z({lat:a[0],lng:a[1]},o)??void 0}const r=v(n);if(r)return{x:r[0],y:r[1]}}
@@ -1,16 +1,19 @@
1
1
  /**
2
2
  * A camera-movement signal for the parts of the SDK that are not components.
3
3
  *
4
- * `MapCamera` notifies from the controls' own update event — the same signal the imperative
5
- * renderer published as `navigation:change` — and the kiosk setup screen listens to know the
6
- * operator has framed a new home view. Deliberately minimal: no payload, because every consumer
7
- * reads what it needs (`mapCamera().state()`) at the moment it cares.
8
- * @param listener - Called after every camera movement while subscribed.
4
+ * Reported once a movement has come to rest — the same signal the imperative renderer published as
5
+ * `navigation:change` — and the kiosk setup screen listens to know the operator has framed a new home
6
+ * view, whether they dragged the plan or pressed the zoom buttons. Both views produce it: `MapCamera`
7
+ * on the plan, `useKioskCameraEvents` on the MapLibre map. Deliberately minimal: no payload, because
8
+ * every consumer reads what it needs (`mapCamera().state()`) at the moment it cares — which is why
9
+ * the movement has to be over by the time this fires.
10
+ * @param listener - Called after each camera movement settles, while subscribed.
9
11
  * @returns An unsubscribe function.
10
12
  */
11
13
  export declare function onCameraMoved(listener: () => void): () => void;
12
14
  /**
13
- * Reports that the camera moved. Called by the mounted map; nothing else should.
15
+ * Reports that the camera has finished moving. Called by whichever view is mounted — the plan's
16
+ * camera or the map's; nothing else should.
14
17
  */
15
18
  export declare function notifyCameraMoved(): void;
16
19
  //# sourceMappingURL=camera-events.d.ts.map
@@ -1,5 +1,5 @@
1
- import { LayerDef } from '@expofp/renderer';
2
- import { Booth } from '../../../../store/BoothStore';
1
+ import type { LayerDef } from '@expofp/renderer';
2
+ import type { Booth } from '../../../../store/BoothStore';
3
3
  export declare const BOOTHS_CHUNK_SIZE = 350;
4
4
  export default function configBooths(layerID: string, booths: Booth[]): LayerDef;
5
5
  //# sourceMappingURL=config-booths.d.ts.map
@@ -1 +1 @@
1
- import{Rect as v}from"@expofp/geometry";import{SEPARATOR as u}from"../../../../constants";import{createImageDef as H}from"../../../../engine/defs";import N,{boothStore as P,uiState as W}from"../../../../store";import w from"../../../../tools/settings";import{loadImagesInBatchesById as A}from"../../../../utils/loadImagesInBatches";import{clearHoveredBooth as C,hoverBooth as E,rememberBoothShapes as T,selectBooth as U}from"../../pointer";import _ from"./config-booth-bg";import z from"./config-booth-bookmark";import K from"./config-booth-border";import M from"./config-booth-labels";import Z from"./config-booth-labels-special";import{registerLayerImages as j}from"./layer-images";import{createBoothImg as q,getImageLayerName as F,mapBoothsLogos as G}from"./loadBoothsImages";export const BOOTHS_CHUNK_SIZE=350;export default function J(L,S){return(i=>{const s=L,m=[],c=[],h=[],l=[],p=[],f=F(s),d={name:f,children:[]};for(const o of i){const t=_(o)?.getShape();t&&(m.push(...t),T(o,t));const r=M(o)?.getShape();r&&c.push(...r);const n=Z(o)?.getShape();if(n&&h.push(...n),!w.borderless){const e=K(o)?.getShape();e&&l.push(e)}const a=z(o)?.getShape();a&&p.push(a)}const I=c.filter(o=>o.lines),k=h.filter(o=>o.lines),y=c.filter(o=>o.source),$=h.filter(o=>o.source);if(!W.hideLogoInBooth){const o=G(i);j(f,async()=>{const t=await A(o,BOOTHS_CHUNK_SIZE),r=[];for(const[n,a]of t){const e=N.boothStore.boothById.get(n);if(!e)continue;const{bounds:x,htmlImage:D}=q(e,a),b=H(D,x),O=e.borderWidth||P.borderWidth,B=e.rect.expand(-O),R=new v(B.center,B.size,e.rotate);e.shapes.push(b),r.push({shape:b,parentRect:R})}return{layer:d,children:r}})}let g=[];if(i.length){const o=s+u;g=[{name:`${o}boothBackground`,children:m,onPointerMove:E,onPointerOut:C,onClick:U},{name:`${o}labels`,children:I},{name:`${o}specialLabels`,children:k},{name:`${o}dots`,children:y},{name:`${o}specialDots`,children:$},d,{name:`${o}boothsBookmark`,children:p},{name:`${s}${u}boothBorder`,children:l}]}return{name:s,children:g}})(S)}
1
+ import{Rect as N}from"@expofp/geometry";import{SEPARATOR as I}from"../../../../constants";import{createImageDef as P}from"../../../../engine/defs";import{flipImageDef as W,isInnerInsideOuter as w,rotateImageDef as A}from"../../../../engine/utils/rotation";import{boothStore as L,uiState as C}from"../../../../store";import E from"../../../../tools/settings";import{loadImagesInBatchesById as T}from"../../../../utils/loadImagesInBatches";import{clearHoveredBooth as U,hoverBooth as _,rememberBoothShapes as z,selectBooth as K}from"../../pointer";import M from"./config-booth-bg";import Z from"./config-booth-bookmark";import j from"./config-booth-border";import q from"./config-booth-labels";import F from"./config-booth-labels-special";import{registerLayerImages as G}from"./layer-images";import{createBoothImg as J,getImageLayerName as Q,mapBoothsLogos as V}from"./loadBoothsImages";export const BOOTHS_CHUNK_SIZE=350;export default function X(S,k){return(c=>{const s=S,f=[],h=[],m=[],p=[],d=[],g=Q(s),b={name:g,children:[]};for(const o of c){const r=M(o)?.getShape();r&&(f.push(...r),z(o,r));const n=q(o)?.getShape();n&&h.push(...n);const i=F(o)?.getShape();if(i&&m.push(...i),!E.borderless){const e=j(o)?.getShape();e&&p.push(e)}const a=Z(o)?.getShape();a&&d.push(a)}const y=h.filter(o=>o.lines),$=m.filter(o=>o.lines),D=h.filter(o=>o.source),x=m.filter(o=>o.source);if(!C.hideLogoInBooth){const o=V(c);G(g,async()=>{const r=await T(o,BOOTHS_CHUNK_SIZE),n=[];for(const[i,a]of r){const e=L.boothById.get(i);if(!e)continue;const{bounds:O,htmlImage:R}=J(e,a),t=P(R,O),v=e.borderWidth||L.borderWidth,u=e.rect.expand(-v),H=new N(u.center,u.size,e.rotate);t.onRoll=w(t.bounds,H)?({roll:l})=>A(t,l)?[t]:void 0:({roll:l})=>W(t,l)?[t]:void 0,e.shapes.push(t),n.push(t)}return{layer:b,children:n}})}let B=[];if(c.length){const o=s+I;B=[{name:`${o}boothBackground`,children:f,onPointerMove:_,onPointerOut:U,onClick:K},{name:`${o}labels`,children:y},{name:`${o}specialLabels`,children:$},{name:`${o}dots`,children:D},{name:`${o}specialDots`,children:x},b,{name:`${o}boothsBookmark`,children:d},{name:`${s}${I}boothBorder`,children:p}]}return{name:s,children:B}})(k)}
@@ -1,4 +1,4 @@
1
- import { LayerDef } from '@expofp/renderer';
2
- import { Layer } from '../../../../store/LayerStore';
1
+ import { type LayerDef } from '@expofp/renderer';
2
+ import { type Layer } from '../../../../store/LayerStore';
3
3
  export default function loadLayer(layer: Layer): Promise<LayerDef>;
4
4
  //# sourceMappingURL=config-load-layer.d.ts.map
@@ -1 +1 @@
1
- import{getConfig as T}from"@expofp/config";import{degToRad as v,Rect as D}from"@expofp/geometry";import{resolve as F}from"@expofp/resolve";import{BOOTHS_PAINTER_MARKER as G,SEPARATOR as m}from"../../../../constants";import{getFpPaths as H}from"../../../../data/fp-payloads";import{createImageDef as k,createLayerDef as g}from"../../../../engine/defs";import s,{boothStore as K}from"../../../../store";import Y from"../../../../store/init/init-booths";import{getChildLayers as j}from"../../../../store/init/init-layers";import{LayersMode as J}from"../../../../store/LayerStore";import{chunkArray as U}from"../../../../utils";import{loadIcons as Z}from"../../../../utils/imageloader";import q,{BG_LAYER_NAME as R,FG_LAYER_NAME as $}from"./config-bg";import z,{BOOTHS_CHUNK_SIZE as Q}from"./config-booths";import{configOutdoorPoiLayer as V}from"./config-outdoor-poi";import{registerLayerImages as W}from"./layer-images";import{createModelDefFromElement as X}from"./layer-models";import{getImageLayerName as ee,getLayerGraphics as oe,getModelLayerName as re}from"./loadBoothsImages";function te(e){return e.childLayers.length?e.childLayers:j(e,e.basePriority,15).layers}function S(e,c){return new Promise(async f=>{let r=[];const a=Y(s,e);if(V(e,a)){e.loaded=!0,e.configured=!0,e.children=[],f(g(e.name,[],{hidden:!0}));return}const i=await q(e),n=[],h=U(a,Q),d=K.booths.filter(o=>o.rect&&(!o.layer||o.layer===e||o.layer.childLayers.includes(e))&&o.exhibitors.find(t=>!!t.logoInBooth&&!!t.logo?.url)&&!s.uiState.hideLogoInBooth),B=new Map(d.map(o=>[o.id,o.noLabels]));d.forEach(o=>o.noLabels=!0),a.length&&h.forEach((o,t)=>{n.push(z(`${e.name}${m}${G}${m}${t}`,o))}),d.forEach(o=>{o.noLabels=B.get(o.id)}),e.loaded=!0;const u=i.children.find(o=>o.name===R),p=i.children.find(o=>o.name===$),y=ee(e.name),{icons:l,models:I}=oe(e),L={name:y,children:[]},b={name:re(e.name),children:I.map(X)};l.length&&W(y,async()=>{const o=await Z(l),t=[];for(const A of o.filter(Boolean)){const{bounds:{x:E,y:P,height:M,angle:N,width:_},htmlImage:C}=A,O=D.fromMinMax({x:E,y:P},{x:E+_,y:P+M},v(N)),x=k(C,O);t.push({shape:x})}return{layer:L,children:t}}),u&&r.push({...u,name:`${i.name}${m}${R}`}),n.length&&r.push(...n),p&&r.push({...p,name:`${i.name}${m}${$}`}),l.length&&r.push(L),b.children.length&&r.push(b);const w=e.childLayers.sort((o,t)=>o.basePriority-t.basePriority).map(async o=>S(o,!0));Promise.all(w).then(o=>{const t=o.flat();t.length&&r.push(...t),e.children=r,e.configured=!0,f(g(e.name,r,{hidden:!c}))})})}export default async function ne(e){return e.configured?g(e.name,e.children,{hidden:!e.visible}):new Promise(async(c,f)=>{if(s.layerStore.mode!==J.Default&&!H(e.name)&&!e.rootParent)try{const n=T().fpSvgLayerJsRefs[e.name];n&&await F(n)}catch(n){console.warn(`Layer data not loaded: ${e.name}`,n)}const r=te(e);r.length&&(e.childLayers=r);const{layers:a}=s.layerStore;s.layerStore.layers=[...a,...r.filter(n=>!a.some(h=>h.name===n.name))];const i=await S(e,e.visible);c(i)})}
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{loadIcons as Z}from"../../../../utils/imageloader";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),B=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 B)o.noLabels=t;e.loaded=!0;const l=a.children.find(o=>o.name===$),g=a.children.find(o=>o.name===E),u=X(e.name),{icons:f,models:I}=ee(e),p={name:u,children:[]},y={name:oe(e.name),children:I.map(W)};f.length&&V(u,async()=>{const o=await Z(f),t=[];for(const M of o.filter(Boolean)){const{bounds:{x:L,y:b,height:P,angle:N,width:_},htmlImage: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}}),l&&r.push({...l,name:`${a.name}${s}${$}`}),c.length&&r.push(...c),g&&r.push({...g,name:`${a.name}${s}${E}`}),f.length&&r.push(p),y.children.length&&r.push(y);const A=await Promise.all(e.childLayers.sort((o,t)=>o.basePriority-t.basePriority).map(o=>R(o,!0)));return r.push(...A),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,24 +1,8 @@
1
1
  import { type ImageDef, type LayerDef } from '@expofp/renderer';
2
- export interface ParentRectLike {
3
- readonly center: {
4
- readonly x: number;
5
- readonly y: number;
6
- };
7
- readonly size: {
8
- readonly x: number;
9
- readonly y: number;
10
- };
11
- readonly rotation: number;
12
- }
13
- /** A loaded layer image, with the bounds of whatever it was placed inside. */
14
- export interface ImageDefWithParentBounds {
15
- parentRect?: ParentRectLike;
16
- shape: ImageDef;
17
- }
18
2
  /** Loads one configured layer's designer images and hands back where they belong. */
19
3
  export type LayerImagesHandler = () => Promise<{
20
4
  layer: LayerDef;
21
- children: ImageDefWithParentBounds[];
5
+ children: ImageDef[];
22
6
  }>;
23
7
  /**
24
8
  * Registers a layer's image loader under its layer name.
@@ -1 +1 @@
1
- import{degToRad as p,radToDeg as d,Rect as u}from"@expofp/geometry";import{update as h}from"@expofp/renderer";import{select as y}from"d3";import{SEPARATOR as g}from"../../../../constants";import{getFpSvgJs as L}from"../../../../data/fp-payloads";import{getLayerSvg as R}from"../../../../data/svg";import{flipImageDef as A,isInnerInsideOuter as x,rotateImageDef as T}from"../../../../engine/utils/rotation";import{getLogoUrl as w}from"../../../../utils/getLogoUrl";import{invokeLayerImages as I}from"./layer-images";import{MODEL_3D_ATTRIBUTE as B}from"./layer-models";export async function loadLayersImages(){const t=I();await Promise.all(t.map(async r=>{const s=await r;if(!s)return;const{layer:e,children:n}=s;if(n.length){const c=[];for(const a of n){const{shape:o,parentRect:i}=a,m=x(o.bounds,i);e.name.includes("Pathway_")||(o.onRoll=m?({roll:l})=>T(o,l)?[o]:void 0:({roll:l})=>A(o,l)?[o]:void 0),c.push(o)}e.children.push(...c),h(e)}}))}export const getImageLayerName=t=>`${t}${g}images`,getModelLayerName=t=>`${t}${g}models`;export function mapBoothsLogos(t){const r=new Map;for(const s of t){if(!s.rect)continue;const e=s.exhibitors.find(n=>n.logoInBooth&&n.logo)?.logo;e&&r.set(s.id,{preferred:w(e),fallback:e.url})}return r}export function getLayerGraphics(t){const r=y(R(t)).select(`[data-layer="${t.name}"]`),s=((L().__fpVersion??0)>5?r.selectAll(":scope > image, :scope > g:not([data-layer]) image").nodes():r.selectAll(":scope > g[data-is-editable='false'] image").nodes()).filter(Boolean),e=[],n=[];for(const c of s)(c.hasAttribute(B)?n:e).push(c);return{icons:e,models:n}}export function createBoothImg(t,r){const s=t.rect,e=s.size.width,n=s.size.height,c=n?e/n:1,a=r.height?r.width/r.height:1;let o,i,m;const l=.9;c>a?(i=n*l,o=i*a):(o=e*l,i=o/a);const f=t.rotate||0;return a>=2&&!f&&n>=e*2?(i=e*l,o=i*a,m=-90):m=d(f),o>e&&(o=e,i=o/a),i>n&&(i=n,o=i*a),{name:t.slug,bounds:new u(s.center,{x:o,y:i},p(m),t.elevation),htmlImage:r,booth:t}}
1
+ import{degToRad as p,radToDeg as d,Rect as h}from"@expofp/geometry";import{update as u}from"@expofp/renderer";import{select as y}from"d3";import{SEPARATOR as f}from"../../../../constants";import{getFpSvgJs as L}from"../../../../data/fp-payloads";import{getLayerSvg as A}from"../../../../data/svg";import{getLogoUrl as x}from"../../../../utils/getLogoUrl";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 r=>{const n=await r;if(!n?.children.length)return;const{layer:o,children:t}=n;o.children.push(...t),u(o)}))}export const getImageLayerName=e=>`${e}${f}images`,getModelLayerName=e=>`${e}${f}models`;export function mapBoothsLogos(e){const r=new Map;for(const n of e){if(!n.rect)continue;const o=n.exhibitors.find(t=>t.logoInBooth&&t.logo)?.logo;o&&r.set(n.id,{preferred:x(o),fallback:o.url})}return r}export function getLayerGraphics(e){const r=y(A(e)).select(`[data-layer="${e.name}"]`),n=((L().__fpVersion??0)>5?r.selectAll(":scope > image, :scope > g:not([data-layer]) image").nodes():r.selectAll(":scope > g[data-is-editable='false'] image").nodes()).filter(Boolean),o=[],t=[];for(const c of n)(c.hasAttribute(R)?t:o).push(c);return{icons:o,models:t}}export function createBoothImg(e,r){const n=e.rect,o=n.size.width,t=n.size.height,c=t?o/t:1,a=r.height?r.width/r.height:1;let i,s,l;const g=.9;c>a?(s=t*g,i=s*a):(i=o*g,s=i/a);const m=e.rotate||0;return a>=2&&!m&&t>=o*2?(s=o*g,i=s*a,l=-90):l=d(m),i>o&&(i=o,s=i/a),s>t&&(s=t,i=s*a),{name:e.slug,bounds:new h(n.center,{x:i,y:s},p(l),e.elevation),htmlImage:r,booth:e}}
@@ -62,12 +62,14 @@ export declare function selectBooth(event: PointerEventData<ShapeDef>): void;
62
62
  */
63
63
  export declare function clearSelection(event: PointerMissedEventData): void;
64
64
  /**
65
- * Calls the host page's reset hook, if it left one. A global the embedding page installs; the SDK
66
- * only ever calls it.
65
+ * Calls the kiosk's idle-reset hook, if one is installed. A global (`window.__resett`), which is how
66
+ * the parts of the SDK that are not components reach the timer `init-ui` owns — and which an
67
+ * embedding page may install instead.
67
68
  *
68
- * Exported because a camera move clears it too, not only a click: `MapCamera` calls it from the
69
- * controls' own update event, which is what the imperative renderer's `navigation:change` listener
70
- * did.
69
+ * Exported because the user moving the camera counts as activity too, not only a click: `MapCamera`
70
+ * calls it while the visitor has hold of the plan, as the imperative renderer's `navigation:change`
71
+ * listener did. A command is left out on purpose — the idle reset moves the camera itself, and would
72
+ * re-arm the timer it had just fired.
71
73
  */
72
74
  export declare function resetExternalOverlay(): void;
73
75
  //# sourceMappingURL=pointer.d.ts.map
@@ -1 +1 @@
1
- import{jsx as d}from"react/jsx-runtime";import{MapControls as c}from"@expofp/ui";import p from"classnames";import{observer as u,useLocalStore as b}from"mobx-react-lite";import r,{layersStore as i,uiState as o}from"../store";import{LayerMode as l,LayersMode as y}from"../store/LayerStore";import{remsToPixels as s}from"../utils";import{t}from"../utils/i18n";const f=u(()=>{const a=b(()=>({get className(){return p({controls:!0,container:!0,"-ready":!0,[o.responsiveClass]:!0})},get style(){return{[o.rtl?"left":"right"]:o.overlayPosition==="left"?o.overlayCollapsed?s(.9):(o.kiosk?10:0)+s(.7)+"px":"10px",bottom:o.kiosk?s(4):s(9.6)}},get layers(){return i.layers.filter(e=>e.mode!==l.AlwaysHidden&&e.mode!==l.AlwaysVisible).map(e=>({id:e.name,name:e.description})).concat([]).reverse()},get visible(){return i.layers.filter(e=>e.visible).map(e=>e.name)}}));return d(c,{className:a.className,style:a.style,title:t("Map controls"),findLocationLabel:t("Find your location"),zoomInLabel:t("Zoom In"),zoomOutLabel:t("Zoom Out"),viewModeLabel:t("View switch"),fitToScreenLabel:t("Fit to screen"),layersLabel:t("Layers"),onFindLocation:()=>r.routeStore.findLocation(),onZoomIn:()=>o.zoomIn(),onZoomOut:()=>o.zoomOut(),onFitToScreen:()=>o.fitBounds(),onViewModeSwitch:()=>r.maplibreStore.activateMaplibre(),showModeSwitch:r.maplibreStore.maplibreEnabled&&!r.maplibreStore.hideModeSwitchButton,isMap3d:r.maplibreStore.isMap3d,showFindLocation:r.routeStore.canFindLocation&&!o.setKioskModeEnabled,layersActiveItems:a.visible,layersList:i.mode===y.CheckBox?a.layers:void 0,onChangeLayers:e=>{const n=i.layers.find(m=>m.name===e);n&&i.updateVisibility(e,!n.visible)}})});export default f;
1
+ import{jsx as c}from"react/jsx-runtime";import{MapControls as p}from"@expofp/ui";import u from"classnames";import{observer as b,useLocalStore as y}from"mobx-react-lite";import i,{layersStore as a,uiState as o}from"../store";import{LayerMode as m,LayersMode as f}from"../store/LayerStore";import{remsToPixels as s}from"../utils";import{t}from"../utils/i18n";function n(r){window.__resett?.(),r()}const L=b(()=>{const r=y(()=>({get className(){return u({controls:!0,container:!0,"-ready":!0,[o.responsiveClass]:!0})},get style(){return{[o.rtl?"left":"right"]:o.overlayPosition==="left"?o.overlayCollapsed?s(.9):(o.kiosk?10:0)+s(.7)+"px":"10px",bottom:o.kiosk?s(4):s(9.6)}},get layers(){return a.layers.filter(e=>e.mode!==m.AlwaysHidden&&e.mode!==m.AlwaysVisible).map(e=>({id:e.name,name:e.description})).concat([]).reverse()},get visible(){return a.layers.filter(e=>e.visible).map(e=>e.name)}}));return c(p,{className:r.className,style:r.style,title:t("Map controls"),findLocationLabel:t("Find your location"),zoomInLabel:t("Zoom In"),zoomOutLabel:t("Zoom Out"),viewModeLabel:t("View switch"),fitToScreenLabel:t("Fit to screen"),layersLabel:t("Layers"),onFindLocation:()=>i.routeStore.findLocation(),onZoomIn:()=>n(()=>o.zoomIn()),onZoomOut:()=>n(()=>o.zoomOut()),onFitToScreen:()=>n(()=>o.fitBounds()),onViewModeSwitch:()=>i.maplibreStore.activateMaplibre(),showModeSwitch:i.maplibreStore.maplibreEnabled&&!i.maplibreStore.hideModeSwitchButton,isMap3d:i.maplibreStore.isMap3d,showFindLocation:i.routeStore.canFindLocation&&!o.setKioskModeEnabled,layersActiveItems:r.visible,layersList:a.mode===f.CheckBox?r.layers:void 0,onChangeLayers:e=>{const l=a.layers.find(d=>d.name===e);l&&a.updateVisibility(e,!l.visible)}})});export default L;
@@ -1 +1 @@
1
- import{jsx as F,jsxs as Y}from"react/jsx-runtime";import{isLayerDefs as q}from"@expofp/renderer";import ee from"color";import{runInAction as re}from"mobx";import{observer as te}from"mobx-react-lite";import{useCallback as j,useEffect as R,useMemo as m,useRef as f,useState as $}from"react";import oe from"../../data";import{getLayerSvg as ne,svgArea as C,svgAreaExplicit as ie}from"../../data/svg";import{createSceneDef as ae}from"../../engine/defs";import t,{uiState as i}from"../../store";import M from"../../tools/settings";import V from"../../utils/is-debug";import{fitRectIsFraming as ce,getVenueFitMarginPercent as se,resolveVenueFitRect as le}from"../../utils/scene-bounds";import ue from"../Map/drawing/config/config-all";import{loadLayersImages as me}from"../Map/drawing/config/loadBoothsImages";import{MapCursorCoords as fe}from"../Map/MapCursorCoords";import{MapViewport as pe}from"../Map/MapViewport";import{clearSelection as de}from"../Map/pointer";import{setMapScene as B}from"../Map/scene";import{useBuildRoute as ge}from"../Map/traffic/useBuildRoute";import{useManageTraffic as be}from"../Map/traffic/useManageTraffic";import{centerCoordinates as Se}from"../Map/viewport";import he from"./MaplibreWrapper";import{useCameraReactions as ye}from"./useCameraReactions";import{useDimming as Re}from"./useDimming";import{useKioskIdleEvents as Ce}from"./useKioskIdleEvents";import{useLayerVisibilitySync as Me}from"./useLayerVisibilitySync";import{usePoiMarkers as Ae}from"./usePoiMarkers";import{useWayfindingAndMarkers as Le}from"./useWayfindingAndMarkers";import{cameraForLocalRect as Pe,deriveGeoConfig as ve,getLocalRectGeoBounds as ze,getVisibleRectFitPadding as De,INITIAL_FIT_ZOOM_ADJUSTMENT as xe}from"./utils/geo-config";import{applyMapOptions as N,getTileSource as Te,MAP_MIN_ZOOM as Ee}from"./utils/map-helpers";import{calculateTransformMatrix as Oe}from"./utils/solver";const U="routes-api.expofp.com",Ie=800;function we(a,b,s){return{getCameraState:()=>{const o=a.getCenter();return{lng:o.lng,lat:o.lat,zoom:a.getZoom(),bearing:a.getBearing(),pitch:a.getPitch()}},applyCameraState:o=>{a.easeTo({center:[o.lng,o.lat],zoom:o.zoom,bearing:o.bearing??b,pitch:o.pitch??s(),duration:Ie,essential:!0})},resetPitch:()=>{const o=s();a.getPitch()!==o&&a.jumpTo({pitch:o})}}}function Z(){t.poiMarkerStore.clear(),re(()=>{t.layerStore.layers.forEach(a=>{a.configured=!1,a.children=[],a.loaded=!1}),t.layerStore.layersLoaded=!1})}const _e=te(function({viewMode:b}){const[s,o]=$(null),[z,D]=$(!1),u=f(null),p=f(null),A=f(null),x=f(null),S=f(null),r=m(()=>ve(),[]),L=m(()=>le({layerViewbox:t.layerStore.viewboxRectangle,explicitArea:ie?C:null,layerRectangle:t.layerStore.rectangle,sceneDef:s,svgArea:C}),[s]),h=L.rect,d=m(()=>{if(!r)return null;const e=ce(L.source)?0:se(h,C),n=De(0);e&&i.screenSize&&(n.left+=i.screenSize.width*e,n.right+=i.screenSize.width*e,n.top+=i.screenSize.height*e,n.bottom+=i.screenSize.height*e);const l=i.screenSize?Pe(h,r.gpsConfig,r.bearing,{width:i.screenSize.width,height:i.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:ze(h,r.gpsConfig),fitPadding:n,zoomAdjustment:xe}},[r,L,h]),y=m(()=>r?Oe(r.gpsConfig,ne()?.getAttribute("units")):null,[r]),T=i.mapSettings.pitchdegrees,E=i.maxPitch,g=m(()=>{const e=b==="map2d";return{pitch:e?0:T,maxPitch:e?0:E,minZoom:Ee}},[b,T,E]),P=f(g),G=m(()=>Te(),[]),c=m(()=>{if(!s||!y)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:y}},[s,y]),O=f(null);R(()=>{O.current=c},[c]),R(()=>{if(c)return B(c),()=>B(void 0)},[c]);const{mapDimAnimatorRef:I,venueDimAnimatorRef:w,applyDimmingTarget:_,handleMapDimLayerReady:J}=Re(u,O);R(()=>{if(!r)return;let e=!1;Z(),ue().then(({layers:v,cleanup:k})=>{if(e){k();return}A.current=k;const Q=ee(M.backgroundColor==="none"?"#ebebeb":M.backgroundColor).string();o(ae(v,C,Q))}).catch(v=>{e||console.warn("Maplibre scene configuration failed.",v)});const n=I.current,l=w.current;return()=>{e=!0,Z(),A.current?.(),A.current=null,S.current&&(t.maplibreStore.clearCameraPortIfCurrent(S.current),S.current=null),u.current=null,p.current=null,x.current=null,D(!1),n?.stop(),l?.stop(),i.sceneDefReady=!1}},[r,I,w]);const K=j((e,n)=>{u.current=e,p.current=e.getCanvas(),x.current=n,D(!0),e.once("idle",()=>N(e,P.current));const l=we(e,r?.bearing??e.getBearing(),()=>P.current.pitch??0);S.current=l,t.maplibreStore.setCameraPort(l),t.fp.getCenterCoordinates=()=>Se(p.current),_({immediate:!0}),me(),t.layerStore.layersLoaded=!0,t.fp.onFpConfigured&&t.fp.onFpConfigured(),i.sceneDefReady=!0,n()},[_,r]);R(()=>{P.current=g,N(u.current,g)},[g]),Ce(z,u),Le(c,p),Ae(z,u,r),Me(c,u,r),ye(u,r,c),ge({enabled:t.layerStore.layersLoaded&&i.buildRoute,scene:c??void 0});const W=oe.busRoutes??!1;be({permission:t.layerStore.layersLoaded&&W,scene:c??void 0,dataJsonUrl:`https://${U}/v1/routes?expo=${M.EXPO}`,websocketUrl:`wss://${U}/locations?expo=${M.EXPO}`});const X=j(e=>{console.warn("Maplibre map failed to load; falling back to floorplan mode.",e),t.maplibreStore.deactivateMaplibre()},[]);if(!r||!d||!y||!c)return null;const H=`${d.center.join(",")}:${d.bearing}:${d.zoom}`;return Y(he,{sceneDef:c,geoConfig:d,tileSource:G,mapOptions:g,debug:V,onMapReady:K,onMapDimLayerReady:J,onMapLoadError:X,onPointerMissed:de,children:[F(pe,{}),V&&F(fe,{canvas:p})]},H)});export default _e;
1
+ import{jsx as F,jsxs as Y}from"react/jsx-runtime";import{isLayerDefs as q}from"@expofp/renderer";import ee from"color";import{runInAction as re}from"mobx";import{observer as te}from"mobx-react-lite";import{useCallback as j,useEffect as R,useMemo as u,useRef as f,useState as $}from"react";import oe from"../../data";import{getLayerSvg as ne,svgArea as C,svgAreaExplicit as ie}from"../../data/svg";import{createSceneDef as ae}from"../../engine/defs";import t,{uiState as i}from"../../store";import M from"../../tools/settings";import V from"../../utils/is-debug";import{fitRectIsFraming as ce,getVenueFitMarginPercent as se,resolveVenueFitRect as le}from"../../utils/scene-bounds";import me from"../Map/drawing/config/config-all";import{loadLayersImages as ue}from"../Map/drawing/config/loadBoothsImages";import{MapCursorCoords as fe}from"../Map/MapCursorCoords";import{MapViewport as pe}from"../Map/MapViewport";import{clearSelection as de}from"../Map/pointer";import{setMapScene as B}from"../Map/scene";import{useBuildRoute as ge}from"../Map/traffic/useBuildRoute";import{useManageTraffic as be}from"../Map/traffic/useManageTraffic";import{centerCoordinates as Se}from"../Map/viewport";import he from"./MaplibreWrapper";import{useCameraReactions as ye}from"./useCameraReactions";import{useDimming as Re}from"./useDimming";import{useKioskCameraEvents as Ce}from"./useKioskCameraEvents";import{useLayerVisibilitySync as Me}from"./useLayerVisibilitySync";import{usePoiMarkers as Ae}from"./usePoiMarkers";import{useWayfindingAndMarkers as Le}from"./useWayfindingAndMarkers";import{cameraForLocalRect as Pe,deriveGeoConfig as ve,getLocalRectGeoBounds as ze,getVisibleRectFitPadding as De,INITIAL_FIT_ZOOM_ADJUSTMENT as xe}from"./utils/geo-config";import{applyMapOptions as N,getTileSource as Te,MAP_MIN_ZOOM as Ee}from"./utils/map-helpers";import{calculateTransformMatrix as Oe}from"./utils/solver";const U="routes-api.expofp.com",we=800;function Ie(a,b,s){return{getCameraState:()=>{const o=a.getCenter();return{lng:o.lng,lat:o.lat,zoom:a.getZoom(),bearing:a.getBearing(),pitch:a.getPitch()}},applyCameraState:o=>{a.easeTo({center:[o.lng,o.lat],zoom:o.zoom,bearing:o.bearing??b,pitch:o.pitch??s(),duration:we,essential:!0})},resetPitch:()=>{const o=s();a.getPitch()!==o&&a.jumpTo({pitch:o})}}}function Z(){t.poiMarkerStore.clear(),re(()=>{t.layerStore.layers.forEach(a=>{a.configured=!1,a.children=[],a.loaded=!1}),t.layerStore.layersLoaded=!1})}const _e=te(function({viewMode:b}){const[s,o]=$(null),[z,D]=$(!1),m=f(null),p=f(null),A=f(null),x=f(null),S=f(null),r=u(()=>ve(),[]),L=u(()=>le({layerViewbox:t.layerStore.viewboxRectangle,explicitArea:ie?C:null,layerRectangle:t.layerStore.rectangle,sceneDef:s,svgArea:C}),[s]),h=L.rect,d=u(()=>{if(!r)return null;const e=ce(L.source)?0:se(h,C),n=De(0);e&&i.screenSize&&(n.left+=i.screenSize.width*e,n.right+=i.screenSize.width*e,n.top+=i.screenSize.height*e,n.bottom+=i.screenSize.height*e);const l=i.screenSize?Pe(h,r.gpsConfig,r.bearing,{width:i.screenSize.width,height:i.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:ze(h,r.gpsConfig),fitPadding:n,zoomAdjustment:xe}},[r,L,h]),y=u(()=>r?Oe(r.gpsConfig,ne()?.getAttribute("units")):null,[r]),T=i.mapSettings.pitchdegrees,E=i.maxPitch,g=u(()=>{const e=b==="map2d";return{pitch:e?0:T,maxPitch:e?0:E,minZoom:Ee}},[b,T,E]),P=f(g),G=u(()=>Te(),[]),c=u(()=>{if(!s||!y)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:y}},[s,y]),O=f(null);R(()=>{O.current=c},[c]),R(()=>{if(c)return B(c),()=>B(void 0)},[c]);const{mapDimAnimatorRef:w,venueDimAnimatorRef:I,applyDimmingTarget:_,handleMapDimLayerReady:J}=Re(m,O);R(()=>{if(!r)return;let e=!1;Z(),me().then(({layers:v,cleanup:k})=>{if(e){k();return}A.current=k;const Q=ee(M.backgroundColor==="none"?"#ebebeb":M.backgroundColor).string();o(ae(v,C,Q))}).catch(v=>{e||console.warn("Maplibre scene configuration failed.",v)});const n=w.current,l=I.current;return()=>{e=!0,Z(),A.current?.(),A.current=null,S.current&&(t.maplibreStore.clearCameraPortIfCurrent(S.current),S.current=null),m.current=null,p.current=null,x.current=null,D(!1),n?.stop(),l?.stop(),i.sceneDefReady=!1}},[r,w,I]);const K=j((e,n)=>{m.current=e,p.current=e.getCanvas(),x.current=n,D(!0),e.once("idle",()=>N(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=()=>Se(p.current),_({immediate:!0}),ue(),t.layerStore.layersLoaded=!0,t.fp.onFpConfigured&&t.fp.onFpConfigured(),i.sceneDefReady=!0,n()},[_,r]);R(()=>{P.current=g,N(m.current,g)},[g]),Ce(z,m),Le(c,p),Ae(z,m,r),Me(c,m,r),ye(m,r,c),ge({enabled:t.layerStore.layersLoaded&&i.buildRoute,scene:c??void 0});const W=oe.busRoutes??!1;be({permission:t.layerStore.layersLoaded&&W,scene:c??void 0,dataJsonUrl:`https://${U}/v1/routes?expo=${M.EXPO}`,websocketUrl:`wss://${U}/locations?expo=${M.EXPO}`});const X=j(e=>{console.warn("Maplibre map failed to load; falling back to floorplan mode.",e),t.maplibreStore.deactivateMaplibre()},[]);if(!r||!d||!y||!c)return null;const H=`${d.center.join(",")}:${d.bearing}:${d.zoom}`;return Y(he,{sceneDef:c,geoConfig:d,tileSource:G,mapOptions:g,debug:V,onMapReady:K,onMapDimLayerReady:J,onMapLoadError:X,onPointerMissed:de,children:[F(pe,{}),V&&F(fe,{canvas:p})]},H)});export default _e;
@@ -0,0 +1,20 @@
1
+ import { type Map as MaplibreMap } from 'maplibre-gl';
2
+ import { type RefObject } from 'react';
3
+ /**
4
+ * Turns the map's own camera movements into the two signals a kiosk depends on: the idle timer's
5
+ * keep-alive, and the camera-moved event the setkiosk panel records a new home framing from.
6
+ *
7
+ * Both come off the plan's camera in floorplan mode (`MapCamera`), which map mode does not drive —
8
+ * the plan is unmounted there and the map owns the camera. Without these listeners the idle timer
9
+ * runs out mid-gesture for a visitor who only moves the map, and the panel never learns that the
10
+ * operator reframed the view, leaving its Save button disabled over changes it cannot see.
11
+ *
12
+ * The two are not the same signal: activity is the visitor's own hand, where a reframing counts
13
+ * however it was made.
14
+ *
15
+ * `ready` is the mount signal: `mapRef.current` is assigned in the same `handleMapReady` call that
16
+ * sets it, so keying the effect on `ready` is what guarantees there is a map to subscribe to — the
17
+ * early return below is the assertion of that contract, not a tolerated miss.
18
+ */
19
+ export declare function useKioskCameraEvents(ready: boolean, mapRef: RefObject<MaplibreMap | null>): void;
20
+ //# sourceMappingURL=useKioskCameraEvents.d.ts.map
@@ -0,0 +1 @@
1
+ import{useEffect as i}from"react";import{notifyCameraMoved as a}from"../Map/camera-events";export function useKioskCameraEvents(o,n){i(()=>{const e=n.current;if(!o||!e)return;let t=!1;const r=f=>{f.originalEvent&&(t=!0,window.__resett?.())},s=()=>{a(),t&&(t=!1,window.__resett?.())};return e.on("movestart",r),e.on("moveend",s),()=>{e.off("movestart",r),e.off("moveend",s)}},[o,n])}
@@ -1 +1 @@
1
- import{getSavedKiosk as u}from"../components/Kiosk/SetKiosk/storage";import{KIOSK_ENABLE_KEY as r}from"../constants";import{isLocalStorageAvailable as o}from"../utils/localStorage";function c(t){const n=new URLSearchParams(window.location.search).get(r),e=o?window.localStorage.getItem(r):null,i=n??e;return i!=null?i==="1":o&&u()!=null||Object.keys(t.kiosk??{}).length>0}function s(){const t=window.location.hostname.split(".");return t.length>=3&&t[t.length-2]==="expofp"&&t[t.length-1]==="com"}function l(){return s()?window.location.hostname.split(".")[0]:"main"}function p(t){if(t?.free===!0)return"Free";const n=t?.trialExpiresAt;if(n){const e=new Date(n).getTime();if(!Number.isNaN(e))return Date.now()<e?"Trial Active":"Trial Expired"}return"Active"}function m(){if(process.env.NODE_ENV==="production")return!1;const t=new URLSearchParams(window.location.search);return!t.has("__intercom_subdomain")&&!t.has("__intercom_status")}function f(t){if(process.env.NODE_ENV==="production")return t;const n=new URLSearchParams(window.location.search),e=n.get("__intercom_subdomain"),i=n.get("__intercom_status"),a=i&&["Active","Trial Active","Trial Expired","Free"].includes(i)?i:t.subscriptionStatus;return{subDomain:e??t.subDomain,subscriptionStatus:a}}export function shouldLoadIntercom(t){if(m()||process.env.NODE_ENV==="production"&&!s()||c(t)||!window.navigator.onLine)return null;const n=f({subDomain:l(),subscriptionStatus:p(t)});return n.subDomain!=="demo"&&n.subscriptionStatus!=="Free"&&n.subscriptionStatus!=="Trial Expired"?null:n}
1
+ import{isKioskMode as o}from"../components/Kiosk/kiosk-mode";function e(){const t=window.location.hostname.split(".");return t.length>=3&&t[t.length-2]==="expofp"&&t[t.length-1]==="com"}function u(){return e()?window.location.hostname.split(".")[0]:"main"}function a(t){if(t?.free===!0)return"Free";const n=t?.trialExpiresAt;if(n){const i=new Date(n).getTime();if(!Number.isNaN(i))return Date.now()<i?"Trial Active":"Trial Expired"}return"Active"}function c(){if(process.env.NODE_ENV==="production")return!1;const t=new URLSearchParams(window.location.search);return!t.has("__intercom_subdomain")&&!t.has("__intercom_status")}function l(t){if(process.env.NODE_ENV==="production")return t;const n=new URLSearchParams(window.location.search),i=n.get("__intercom_subdomain"),r=n.get("__intercom_status"),s=r&&["Active","Trial Active","Trial Expired","Free"].includes(r)?r:t.subscriptionStatus;return{subDomain:i??t.subDomain,subscriptionStatus:s}}export function shouldLoadIntercom(t){if(c()||process.env.NODE_ENV==="production"&&!e()||o(t)||!window.navigator.onLine)return null;const n=l({subDomain:u(),subscriptionStatus:a(t)});return n.subDomain!=="demo"&&n.subscriptionStatus!=="Free"&&n.subscriptionStatus!=="Trial Expired"?null:n}
@@ -298,6 +298,8 @@ export default class UIState {
298
298
  maxUIScale: number;
299
299
  setUIScale(scale: number | undefined, saveToStorage?: boolean): void;
300
300
  resetUIScale(): void;
301
+ /** Drops a scale applied without saving, back to the stored one (or the default). */
302
+ restoreUIScale(): void;
301
303
  setKioskModeEnabled: boolean;
302
304
  enableSetKioskMode(enable: boolean): void;
303
305
  kioskData: Kiosk | null;