@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.
- package/dist/browser/{Button-BPQnJjoN.js → Button-CNs8VDGG.js} +5 -5
- package/dist/browser/{CookieConsent-CYpwXrw0.js → CookieConsent-CcBA-IqC.js} +7 -7
- package/dist/browser/{Debug-DJ02jJ5Q.js → Debug-DzeeojOv.js} +7 -7
- package/dist/browser/{DebugTools-BCx6s2Fc.js → DebugTools-Cg2kMVuz.js} +6 -6
- package/dist/browser/{Demo-EWDcqW4X.js → Demo-DlX2eRc5.js} +9 -9
- package/dist/browser/{Free-DKMv19Hs.js → Free-BPXxN14i.js} +9 -9
- package/dist/browser/{GalleryContainer-CvjywJze.js → GalleryContainer-D3PtNDq1.js} +10 -10
- package/dist/browser/{GpsLoader-DnZOaiOj.js → GpsLoader-MuKCP4hM.js} +29 -29
- package/dist/browser/KioskStore-DwJPzK8K.js +251 -0
- package/dist/browser/{MaplibreAdapter-DfUBzoCo.js → MaplibreAdapter-DzycfkS9.js} +1108 -1107
- package/dist/browser/{ModalContainer-iUxlX_EW.js → ModalContainer-U0c94Gcg.js} +10 -10
- package/dist/browser/{PermissionNotice-4GkEdwAt.js → PermissionNotice-DyTh0N80.js} +6 -6
- package/dist/browser/{SetKioskMode-r4WLFRA0.js → SetKioskMode-DFNqggA2.js} +13 -13
- package/dist/browser/{ShowKiosk-DmmyfPH3.js → ShowKiosk-BuXxL7Re.js} +11 -11
- package/dist/browser/{ViewerMenuPanel-G5WeOVxy.js → ViewerMenuPanel--flTFhEB.js} +10 -10
- package/dist/browser/{add-debug-secret-listener-cqT9ixCW.js → add-debug-secret-listener-DvCB0ort.js} +1 -1
- package/dist/browser/{adopt-global-settings-TiK3bdw8.js → adopt-global-settings-CVQmrlox.js} +9 -9
- package/dist/browser/{boolean-editor-gv5KgSFC.js → boolean-editor-Bk6Lfd_2.js} +9 -9
- package/dist/browser/{bootIntercom-DSN5Oxb8.js → bootIntercom-iv5wse99.js} +2 -2
- package/dist/browser/bundle.json +71 -71
- package/dist/browser/{camera-events-BzzhQV7p.js → camera-events-Uyswpptc.js} +1 -1
- package/dist/browser/{classnames-DaTJg5Ke.js → classnames-TUIUYS3L.js} +2 -2
- package/dist/browser/{client-DXynaRJh.js → client-Bm485HWD.js} +5 -5
- package/dist/browser/{components-BJkZsl-J.js → components-DcbtuzgN.js} +1193 -1191
- package/dist/browser/{debug-context-DafSJe6V.js → debug-context-CiRcA5z7.js} +5 -5
- package/dist/browser/{debug-overlay-Cnht9M1f.js → debug-overlay-BaIOFaoE.js} +10 -10
- package/dist/browser/{debug-ui-CfgbL90e.js → debug-ui-B3yO6QTa.js} +6 -6
- package/dist/browser/{dimming-BTSxZdFU.js → dimming-y3MYb4O3.js} +262 -262
- package/dist/browser/{dist-TUAZaqFf.js → dist-BaXVVYa9.js} +5 -5
- package/dist/browser/{dist-CyuhMWuJ.js → dist-DAWn7KI8.js} +6 -6
- package/dist/browser/{dist-C5PCsTLB.js → dist-fMLrkr8V.js} +3 -3
- package/dist/browser/{efp-debug-init-Dmuf0OD9.js → efp-debug-init-CVDjWVXl.js} +3 -3
- package/dist/browser/{enum-editor-DhSd_imG.js → enum-editor-B-vJDdwf.js} +4 -4
- package/dist/browser/{es5-DjAesjxT.js → es5-CYKbplUA.js} +2 -2
- package/dist/browser/{event-head-CQJFTgLp.js → event-head-BtayW8HA.js} +1 -1
- package/dist/browser/{event-not-found-BD8VwBEd.js → event-not-found-B4Tz7V1H.js} +3 -3
- package/dist/browser/{exports-BWxS7e8x.js → exports-DTjBGI92.js} +1 -1
- package/dist/browser/{favicon-knUtM628.js → favicon-Bq3vaHM_.js} +1 -1
- package/dist/browser/{fetch-retry.umd-DW0ekhe-.js → fetch-retry.umd-Cw9OsA-s.js} +2 -2
- package/dist/browser/{flex-Di6JEi7f.js → flex-C0jlxRr9.js} +5 -5
- package/dist/browser/{floorplan.loader-yNOwUjHQ.js → floorplan.loader-B0b2d8rT.js} +10 -10
- package/dist/browser/{floorplan.ready-C1R3whps.js → floorplan.ready-Bi2mkI_V.js} +186 -191
- package/dist/browser/{fuse-CklOJAb0.js → fuse-CS-5RDcg.js} +2 -2
- package/dist/browser/{i18n-DOTxhE5G.js → i18n-LVijVdMb.js} +5 -5
- package/dist/browser/index.js +16 -16
- package/dist/browser/{index.module-mXl8MtT3.js → index.module-D7TtIVgi.js} +4 -4
- package/dist/browser/{integrateKiosk-b2AMRK5l.js → integrateKiosk-BmVtSyFv.js} +4 -4
- package/dist/browser/{is-own-domain-BZ3_6LnT.js → is-own-domain-BL66TBhN.js} +1 -1
- package/dist/browser/{is-webview-BwUFYV3U.js → is-webview-DwQBZFcX.js} +1 -1
- package/dist/browser/{jsx-runtime-BUFDOCAr.js → jsx-runtime-DS8yJ69h.js} +2 -2
- package/dist/browser/{kiosk-record-Dx28-RL0.js → kiosk-record-goZjGV8Y.js} +1 -1
- package/dist/browser/{lib-BSoYmy6y.js → lib-dIwLYV0z.js} +3 -3
- package/dist/browser/{loadImage-CT_B_63i.js → loadImage-BDk9loud.js} +4 -4
- package/dist/browser/{logDeviceInfo-D5aYLPIp.js → logDeviceInfo-227-j__X.js} +9 -9
- package/dist/browser/{mobx-DmvJdfvB.js → mobx-D3NRVJz0.js} +4 -4
- package/dist/browser/{optional-boolean-editor-DQP8ScA6.js → optional-boolean-editor-BtWARd1i.js} +3 -3
- package/dist/browser/{optional-enum-editor-CK8QdwSw.js → optional-enum-editor-CJEQ7pDc.js} +4 -4
- package/dist/browser/{optional-string-editor-DXnEx_OV.js → optional-string-editor-Bd6a7i5L.js} +4 -4
- package/dist/browser/{particles.min-DTfxDQ63.js → particles.min-CGC94f9R.js} +2 -2
- package/dist/browser/{react-BYD9sU4s.js → react-DUWO7pPs.js} +2 -2
- package/dist/browser/{react-dom-DcdoI_pK.js → react-dom-C08Q2osf.js} +3 -3
- package/dist/browser/{rolldown-runtime-D02yMjJw.js → rolldown-runtime-CooLcCzw.js} +1 -1
- package/dist/browser/{scheduler-CHcj0Ili.js → scheduler-DuPfkMc5.js} +2 -2
- package/dist/browser/{select-CVLafnyq.js → select-4KfoG4mp.js} +10 -10
- package/dist/browser/{settings-DTliQPIF.js → settings-Dbl2f0ow.js} +2 -2
- package/dist/browser/{settings-item-CSulAbWO.js → settings-item-CRyyzC8b.js} +6 -6
- package/dist/browser/{store-hAR4IdGb.js → store-BcEvlgIF.js} +3695 -3695
- package/dist/browser/{string-editor-Bjapa7B7.js → string-editor-lytU5wX-.js} +4 -4
- package/dist/browser/{text-field-dygdoVbb.js → text-field-BGvPdsaN.js} +5 -5
- package/dist/browser/{theme-mpY9s4gk.js → theme-CxFvVGHQ.js} +8 -8
- package/dist/browser/{ui-B7DDzAAp.js → ui-D3H7hMUC.js} +8 -8
- package/dist/browser/{useRenderTarget-M5MRh8Ft.js → useRenderTarget-DGSXEfzc.js} +4 -4
- package/dist/browser/{viewport-DOv49fSW.js → viewport-BczDYrg4.js} +3 -3
- package/dist/esm/components/Kiosk/KioskStore.d.ts +8 -0
- package/dist/esm/components/Kiosk/KioskStore.js +1 -1
- package/dist/esm/components/Kiosk/kiosk-mode.d.ts +18 -2
- package/dist/esm/components/Kiosk/kiosk-mode.js +1 -1
- package/dist/esm/components/Map/MapCamera.js +1 -1
- package/dist/esm/components/Map/camera-events.d.ts +9 -6
- package/dist/esm/components/Map/drawing/config/config-booths.d.ts +2 -2
- package/dist/esm/components/Map/drawing/config/config-booths.js +1 -1
- package/dist/esm/components/Map/drawing/config/config-load-layer.d.ts +2 -2
- package/dist/esm/components/Map/drawing/config/config-load-layer.js +1 -1
- package/dist/esm/components/Map/drawing/config/layer-images.d.ts +1 -17
- package/dist/esm/components/Map/drawing/config/loadBoothsImages.js +1 -1
- package/dist/esm/components/Map/pointer.d.ts +7 -5
- package/dist/esm/components/MapControlsContainer.js +1 -1
- package/dist/esm/components/Maplibre/MaplibreAdapter.js +1 -1
- package/dist/esm/components/Maplibre/useKioskCameraEvents.d.ts +20 -0
- package/dist/esm/components/Maplibre/useKioskCameraEvents.js +1 -0
- package/dist/esm/intercom/shouldLoad.js +1 -1
- package/dist/esm/store/UIState.d.ts +2 -0
- package/dist/esm/store/UIState.js +1 -1
- package/dist/esm/store/init/init-ui.js +1 -1
- package/package.json +10 -10
- package/dist/browser/KioskStore-B_QD5WD2.js +0 -241
- package/dist/esm/components/Maplibre/useKioskIdleEvents.d.ts +0 -17
- 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.
|
|
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-
|
|
10
|
-
import { t } from "./settings-item-
|
|
11
|
-
import { t as n } from "./text-field-
|
|
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.
|
|
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-
|
|
10
|
-
import { t } from "./react-
|
|
11
|
-
import { D as n, i as r, l as i, n as a, s as o, u as s, y as c } from "./flex-
|
|
12
|
-
import { t as l } from "./classnames-
|
|
9
|
+
import { r as e } from "./rolldown-runtime-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.
|
|
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-
|
|
10
|
-
import { t } from "./react-
|
|
11
|
-
import { t as n } from "./jsx-runtime-
|
|
12
|
-
import { t as r } from "./react-dom-
|
|
13
|
-
import { C as i, E as a, O as o, T as s, _ as c, o as l, v as u, w as d } from "./flex-
|
|
14
|
-
import { c as f, i as p, n as m, o as h, r as g, s as _, t as v } from "./dist-
|
|
15
|
-
import { t as y } from "./classnames-
|
|
9
|
+
import { r as e } from "./rolldown-runtime-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.
|
|
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-
|
|
10
|
-
import { a as t, i as n, s as r } from "./efp-debug-init-
|
|
11
|
-
import { a as i, i as a } from "./adopt-global-settings-
|
|
12
|
-
import { t as o } from "./jsx-runtime-
|
|
13
|
-
import "./settings-
|
|
14
|
-
import { t as s } from "./add-debug-secret-listener-
|
|
9
|
+
import { r as e } from "./rolldown-runtime-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-
|
|
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.
|
|
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-
|
|
10
|
-
import { t } from "./react-
|
|
11
|
-
import { l as n } from "./store-
|
|
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.
|
|
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] = "
|
|
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,
|
|
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
|
|
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)
|
|
27
|
-
* resets the per-device UI scale
|
|
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
|
|
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,
|
|
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
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
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
|
|
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
|
|
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
|
|
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:
|
|
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
|
|
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
|
|
66
|
-
*
|
|
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
|
|
69
|
-
*
|
|
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
|
|
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
|
|
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{
|
|
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;
|