@expofp/floorplan 3.25.0 → 3.25.2
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-_J1eNxua.js → Button-DZ5RJVoX.js} +5 -5
- package/dist/browser/{CookieConsent-j0awTNGB.js → CookieConsent-CNE-7zNI.js} +7 -7
- package/dist/browser/{Debug-BAPQwOXG.js → Debug-TDQ_xzea.js} +7 -7
- package/dist/browser/{Demo-B0TxEACn.js → Demo-A0X5mRqG.js} +9 -9
- package/dist/browser/{Free-81RG6a4l.js → Free-BjYK0xDM.js} +9 -9
- package/dist/browser/{GalleryContainer-CVplb5Pc.js → GalleryContainer-BsQuHOrj.js} +10 -10
- package/dist/browser/{GpsLoader-oni76hrd.js → GpsLoader-DoutzmU_.js} +10 -10
- package/dist/browser/{KioskStore-Cdb5PpF9.js → KioskStore-CRN9B487.js} +4 -4
- package/dist/browser/{MaplibreAdapter-BfpIMgGx.js → MaplibreAdapter-W1ZdQQ00.js} +1520 -1511
- package/dist/browser/{ModalContainer-pEV9ZmkZ.js → ModalContainer-BfZm0B_L.js} +10 -10
- package/dist/browser/{PermissionNotice-CoXJjFWX.js → PermissionNotice-Cm6qrOC_.js} +6 -6
- package/dist/browser/{SetKioskMode-BUFIP2qd.js → SetKioskMode-BlmUmBkH.js} +8 -8
- package/dist/browser/{ShowKiosk-BHGX8mhm.js → ShowKiosk-B0cj0p6h.js} +10 -10
- package/dist/browser/{ViewerMenuPanel-Cr826oJ6.js → ViewerMenuPanel-FFmV-n9m.js} +9 -9
- package/dist/browser/{add-debug-secret-listener-C0cY_TFM.js → add-debug-secret-listener-BOW3NQe7.js} +1 -1
- package/dist/browser/{adopt-global-settings-Dq8ryk31.js → adopt-global-settings-DNTNdr3z.js} +9 -9
- package/dist/browser/{boolean-editor-CRK3sDV3.js → boolean-editor-Bx4HLLyu.js} +9 -9
- package/dist/browser/{bootIntercom-CHy1kgnP.js → bootIntercom-C_8HLvxg.js} +2 -2
- package/dist/browser/{booth-by-xy-BQVcyNx8.js → booth-by-xy-DgXTlV8u.js} +6 -6
- package/dist/browser/bundle.json +65 -65
- package/dist/browser/{classnames-_GyL4GDv.js → classnames-DovQg6we.js} +2 -2
- package/dist/browser/{client-B5zwzSQP.js → client-CadlVOps.js} +4 -4
- package/dist/browser/{components-CBQYRwuC.js → components-BK-czcTL.js} +36 -36
- package/dist/browser/{debug-overlay-DiLNtKlz.js → debug-overlay-vFTynZrP.js} +10 -10
- package/dist/browser/{debug-ui-gigsjIuv.js → debug-ui-BgSppEQg.js} +6 -6
- package/dist/browser/{dist-jT3iIwH-.js → dist-C1WQpGAq.js} +6 -6
- package/dist/browser/{dist-B0X-IEcM.js → dist-CkAU9dsV.js} +5 -5
- package/dist/browser/{dist-yT7nNd5R.js → dist-gIYlJ33F.js} +3 -3
- package/dist/browser/{efp-debug-init-B5YMdXnN.js → efp-debug-init-CGEJSmuk.js} +3 -3
- package/dist/browser/{enum-editor-DvCO-CYQ.js → enum-editor-BZXgS3I-.js} +4 -4
- package/dist/browser/{es5-BmsIRBXA.js → es5-DoqUhz95.js} +2 -2
- package/dist/browser/{event-not-found-fcpAoExJ.js → event-not-found-Dl66nXH1.js} +1 -1
- package/dist/browser/{exports-CnuKa6hu.js → exports-CK5UTqgq.js} +1 -1
- package/dist/browser/{favicon-CZw845Nj.js → favicon-BnTLQysW.js} +1 -1
- package/dist/browser/{fetch-retry.umd-CBMEcoUE.js → fetch-retry.umd-D_tGjwEb.js} +2 -2
- package/dist/browser/{flex-DixRjO_F.js → flex-BCrAgMxK.js} +5 -5
- package/dist/browser/{floorplan.loader-CsKKZnNp.js → floorplan.loader-DXJR9eeS.js} +10 -10
- package/dist/browser/{floorplan.ready-Bf3GEi21.js → floorplan.ready-C0sdmceF.js} +14 -14
- package/dist/browser/{fuse-DFd9yKfL.js → fuse-C7evxCwi.js} +2 -2
- package/dist/browser/{i18n-BexA6ZBP.js → i18n-Cp32ZzDq.js} +5 -5
- package/dist/browser/index.js +14 -14
- package/dist/browser/{index.module-hIW18pWv.js → index.module-CeDH7KeK.js} +4 -4
- package/dist/browser/{integrateKiosk-CHM4p0lX.js → integrateKiosk-JZG1AZBF.js} +4 -4
- package/dist/browser/{is-webview-8nXIDYh1.js → is-webview-Be9due3O.js} +1 -1
- package/dist/browser/{jsx-runtime-D38XzQ2p.js → jsx-runtime-DwNSQYOA.js} +2 -2
- package/dist/browser/{kiosk-record-De-vXYCY.js → kiosk-record-BMwfA16j.js} +1 -1
- package/dist/browser/{lib-D8TLRwKe.js → lib-DeQ47J_S.js} +3 -3
- package/dist/browser/{loadImage-COkvpk1U.js → loadImage-DVBOry5-.js} +4 -4
- package/dist/browser/{logDeviceInfo-CfoVdcPV.js → logDeviceInfo-uPn7yfGH.js} +9 -9
- package/dist/browser/{main-DOWrZS6x.js → main-WTEdqNkt.js} +1 -1
- package/dist/browser/{mobx-CCEGS5Bv.js → mobx-DFFcUY2e.js} +4 -4
- package/dist/browser/{optional-boolean-editor-DNZEf74O.js → optional-boolean-editor-DfcaW7-l.js} +3 -3
- package/dist/browser/{optional-enum-editor-CGnDO1mh.js → optional-enum-editor-SEARu4hs.js} +4 -4
- package/dist/browser/{optional-string-editor-C4uY45q3.js → optional-string-editor-COLkp8EA.js} +4 -4
- package/dist/browser/{particles.min-orMOzlvG.js → particles.min-DHvuM5ou.js} +2 -2
- package/dist/browser/{react-D4oi2zZ_.js → react-BNCBBLDK.js} +2 -2
- package/dist/browser/{react-dom-CLXWzmt1.js → react-dom-ql8ZgjdB.js} +3 -3
- package/dist/browser/{rolldown-runtime-C1NynmuH.js → rolldown-runtime-D0mAPq9J.js} +1 -1
- package/dist/browser/{select-D6Y0QY_4.js → select-CwB0Zi7C.js} +10 -10
- package/dist/browser/{settings-CI7KY77P.js → settings-MzAuoQZ6.js} +2 -2
- package/dist/browser/{settings-item-CSNxKqBD.js → settings-item-Ca6s5CDf.js} +6 -6
- package/dist/browser/{store-CVqBbCq4.js → store-B_c3r86U.js} +1270 -1259
- package/dist/browser/{string-editor-AyKbVKjB.js → string-editor-BjOeNcgJ.js} +4 -4
- package/dist/browser/{text-field-DKJXuGm9.js → text-field-6Ccfbuuo.js} +5 -5
- package/dist/browser/{theme-yzBklex5.js → theme-XlV0fBPc.js} +8 -8
- package/dist/browser/{ui-Dq3Q-Rqt.js → ui-BopruaHZ.js} +8 -8
- package/dist/browser/{useRenderTarget-BYqw3tDW.js → useRenderTarget-CdH-VI6E.js} +4 -4
- package/dist/esm/components/Map/drawing/config/config-booth-labels-special.d.ts +3 -3
- package/dist/esm/components/Map/drawing/config/config-booth-labels-special.js +2 -2
- package/dist/esm/components/Map/drawing/config/config-booth-labels.d.ts +4 -4
- package/dist/esm/components/Map/drawing/config/config-booth-labels.js +1 -1
- package/dist/esm/components/Map/drawing/config/label-inset.d.ts +26 -0
- package/dist/esm/components/Map/drawing/config/label-inset.js +1 -0
- package/dist/esm/components/Maplibre/MaplibreAdapter.js +1 -1
- package/package.json +9 -9
|
@@ -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.25.
|
|
4
|
+
e.SENTRY_RELEASE = { id: "3.25.2" };
|
|
5
5
|
var t = new e.Error().stack;
|
|
6
6
|
t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "0a67f4c1-0ef6-428f-92c6-94c57178bf21", e._sentryDebugIdIdentifier = "sentry-dbid-0a67f4c1-0ef6-428f-92c6-94c57178bf21");
|
|
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-DwNSQYOA.js";
|
|
10
|
+
import { t } from "./settings-item-Ca6s5CDf.js";
|
|
11
|
+
import { t as n } from "./text-field-6Ccfbuuo.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.25.
|
|
4
|
+
e.SENTRY_RELEASE = { id: "3.25.2" };
|
|
5
5
|
var t = new e.Error().stack;
|
|
6
6
|
t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "9c5a0877-c176-4e2d-b51c-123d50ab2b3c", e._sentryDebugIdIdentifier = "sentry-dbid-9c5a0877-c176-4e2d-b51c-123d50ab2b3c");
|
|
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-D0mAPq9J.js";
|
|
10
|
+
import { t } from "./react-BNCBBLDK.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-BCrAgMxK.js";
|
|
12
|
+
import { t as l } from "./classnames-DovQg6we.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.25.
|
|
4
|
+
e.SENTRY_RELEASE = { id: "3.25.2" };
|
|
5
5
|
var t = new e.Error().stack;
|
|
6
6
|
t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "f658045a-5be7-4ea4-a4b2-ddea9ab9caf3", e._sentryDebugIdIdentifier = "sentry-dbid-f658045a-5be7-4ea4-a4b2-ddea9ab9caf3");
|
|
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-D0mAPq9J.js";
|
|
10
|
+
import { t } from "./react-BNCBBLDK.js";
|
|
11
|
+
import { t as n } from "./jsx-runtime-DwNSQYOA.js";
|
|
12
|
+
import { t as r } from "./react-dom-ql8ZgjdB.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-BCrAgMxK.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-C1WQpGAq.js";
|
|
15
|
+
import { t as y } from "./classnames-DovQg6we.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.25.
|
|
4
|
+
e.SENTRY_RELEASE = { id: "3.25.2" };
|
|
5
5
|
var t = new e.Error().stack;
|
|
6
6
|
t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "3c34ab8b-5d65-4c06-8595-6ed371acabc5", e._sentryDebugIdIdentifier = "sentry-dbid-3c34ab8b-5d65-4c06-8595-6ed371acabc5");
|
|
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-D0mAPq9J.js";
|
|
10
|
+
import { a as t, i as n, s as r } from "./efp-debug-init-CGEJSmuk.js";
|
|
11
|
+
import { a as i, i as a } from "./adopt-global-settings-DNTNdr3z.js";
|
|
12
|
+
import { t as o } from "./jsx-runtime-DwNSQYOA.js";
|
|
13
|
+
import "./settings-MzAuoQZ6.js";
|
|
14
|
+
import { t as s } from "./add-debug-secret-listener-BOW3NQe7.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-BgSppEQg.js"), { createRoot: i } = await import("./client-CadlVOps.js").then((t) => /* @__PURE__ */ e(t.default, 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.25.
|
|
4
|
+
e.SENTRY_RELEASE = { id: "3.25.2" };
|
|
5
5
|
var t = new e.Error().stack;
|
|
6
6
|
t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "7407e64e-4c4e-4bfb-b2ef-80063ad22998", e._sentryDebugIdIdentifier = "sentry-dbid-7407e64e-4c4e-4bfb-b2ef-80063ad22998");
|
|
7
7
|
} catch {}
|
|
8
8
|
})();
|
|
9
|
-
import { r as e } from "./rolldown-runtime-
|
|
10
|
-
import { t } from "./react-
|
|
11
|
-
import { l as n } from "./store-
|
|
9
|
+
import { r as e } from "./rolldown-runtime-D0mAPq9J.js";
|
|
10
|
+
import { t } from "./react-BNCBBLDK.js";
|
|
11
|
+
import { l as n } from "./store-B_c3r86U.js";
|
|
12
12
|
//#region ../ui/src/shared/activeElement.ts
|
|
13
13
|
var r = (e) => !!e && "activeElement" in e;
|
|
14
14
|
function i(e) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ImageDef, TextDef } from '@expofp/renderer';
|
|
2
|
-
import { FontSizeFactor, RendererService } from '../../../../renderer';
|
|
3
|
-
import { Booth, SpecialBooth } from '../../../../store/BoothStore';
|
|
1
|
+
import { type ImageDef, type TextDef } from '@expofp/renderer';
|
|
2
|
+
import { type FontSizeFactor, type RendererService } from '../../../../renderer';
|
|
3
|
+
import { type Booth, SpecialBooth } from '../../../../store/BoothStore';
|
|
4
4
|
import { BoothLabelDrawer } from './config-booth-labels';
|
|
5
5
|
export default function configBoothLabelsSpecial(rendererService: RendererService, booth: Booth): BoothLabelSpecialDrawer | undefined;
|
|
6
6
|
declare class BoothLabelSpecialDrawer extends BoothLabelDrawer {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Box as
|
|
2
|
-
`),this.shapeLabel.padding=[this.paddingScaled[0]*e+this.padding,this.paddingScaled[1]*e+this.padding],this.shapeLabel):(this.shapeLabel.lines[0].fontSize=0,this.shapeLabel)},f=e=>{
|
|
1
|
+
import{Box as L,Rect as u}from"@expofp/geometry";import{reaction as b}from"mobx";import{FONT_WEIGHT_PRIMARY_BOOTH as x,FONT_WEIGHT_PRIMARY_SPECIAL as R}from"../../../../constants";import{boxToRenderer as D,createTextDef as F,getRollValue as v,getRotation as T,shouldFlip as y,updateRectRotation as z,updateTextDefRotation as I}from"../../../../renderer";import{heatmapStore as P,layersStore as w,uiState as d}from"../../../../store";import{SpecialBooth as B}from"../../../../store/BoothStore";import M from"../../../../tools/settings";import{getFont as k}from"./canvases";import{BoothLabelDrawer as C,getFontUrlByWeight as _,getMinZoomFactorForDot as A,isDirectionsMode as N}from"./config-booth-labels";import{LABEL_MARGIN_FRACTION as S}from"./label-inset.js";import V from"./TextFitter";const p=new Map;function W(i){let t=p.get(i);if(!t){const s=[18,16,14,12,10,7].map(l=>l*i),a=14*i;t=new V(k,s,a),p.set(i,t),setTimeout(()=>p.delete(i),5e3)}return t}export default function $(i,t){if(!(!(t instanceof B)||t.noLabels))return new O(i,t)}class O extends C{constructor(t,s){super(t,s),this.steps=[],this.text="";const a=this.booth.rect,l=Number(getComputedStyle(document.body).getPropertyValue(R))||Number(getComputedStyle(document.body).getPropertyValue(x))||500,g=_(l,this.rendererService.fontUrls),h=a.expand({x:-(a.size.width*S+this.padding),y:-(a.size.height*S+this.padding)});this.setText(),this.canvasRect=new u(h.center,h.size,s.rotate),this.setFactors(this.text),this.labelIsVertical=Math.abs(Math.abs(s.rotate)-Math.PI/2)<.01,this.fontSizes=[this.steps,[]],this.minZoomDotVisible=A(this.steps.map(e=>e.scaleFactor)),this.shapeLabel=F([{text:this.text,color:s.labelColor||M.boothLabelColor,fontUrl:g,fontSize:0}],new u(h.center,h.size,s.rotate),[this.padding,this.padding],{horizontal:"center",text:"center",vertical:"center"}),this.getShapeDot(),b(()=>[this.booth.skipDim,d.selectedRoute,w.layersLoaded],()=>{const e=N();this.shapeLabel.dim=e||this.booth.skipDim?!1:void 0,this.shapeDot.dim=e||this.booth.skipDim?!1:void 0,this.rendererService.update(this.shapeLabel,this.shapeDot)});const m=e=>{const o=this.steps.find(r=>r.scaleFactor<1/e);return o?(this.shapeLabel.lines[0].fontSize=o.value/devicePixelRatio*e,this.shapeLabel.lines[0].text=o.lines.join(`
|
|
2
|
+
`),this.shapeLabel.padding=[this.paddingScaled[0]*e+this.padding,this.paddingScaled[1]*e+this.padding],this.shapeLabel):(this.shapeLabel.lines[0].fontSize=0,this.shapeLabel)},f=e=>{const o=this.steps.find(c=>c.scaleFactor<1/e),r=this.shapeDot.source.width*e,n=this.shapeDot.source.height*e;return this.shapeDot.bounds=D(L.fromCenter(this.canvasRect.center,{x:r,y:n})),this.shapeDot.hidden=!!o,this.shapeDot};this.rendererService.onPtScale(`booth-special-label-${s.id}`,m),this.rendererService.onPtScale(`booth-special-dot-${s.id}`,f),b(()=>d.mapSettings,({roll:e})=>{v(e??0)&&this.rendererService.onRoll(`booth-special-roll-${s.id}`,o=>{const r=this.shapeLabel.bounds.rotation;if(this.labelIsVertical)y(o,r)&&(this.shapeLabel.bounds.rotation=-r);else{const n=T(o,r);if(n!==void 0){const{size:c}=this.canvasRect;this.shapeLabel=I(this.shapeLabel,n),c.x!==c.y&&!this.shapeLabel.hidden&&(this.canvasRect=z(this.canvasRect,n),this.setFactors(this.text),m(this.rendererService.scale),f(this.rendererService.scale))}}return[this.shapeLabel,this.shapeDot]})},{fireImmediately:!0})}getShape(){return[this.shapeLabel,this.shapeDot]}setFactors(t){this.steps=W(devicePixelRatio).getStepsForRect(t,this.canvasRect.size.x,this.canvasRect.size.y)}setText(){const t=this.booth.title||this.booth.name,a=`Clicks: ${P.getTotalClicksByBooth(this.booth)}`;this.text=d.heatmap?`${t} - ${a}`:t}}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Rect } from '@expofp/geometry';
|
|
2
|
-
import { ImageDef, TextAlignment, TextDef } from '@expofp/renderer';
|
|
3
|
-
import { CustomFonts, FontSizeFactor, RendererService } from '../../../../renderer';
|
|
4
|
-
import { Booth } from '../../../../store/BoothStore';
|
|
5
|
-
import { Exhibitor } from '../../../../store/ExhibitorStore';
|
|
2
|
+
import { type ImageDef, type TextAlignment, type TextDef } from '@expofp/renderer';
|
|
3
|
+
import { type CustomFonts, type FontSizeFactor, type RendererService } from '../../../../renderer';
|
|
4
|
+
import { type Booth } from '../../../../store/BoothStore';
|
|
5
|
+
import { type Exhibitor } from '../../../../store/ExhibitorStore';
|
|
6
6
|
import { BoothDrawerBaseWithoutPainter } from './BoothDrawerBase';
|
|
7
7
|
interface Prefix {
|
|
8
8
|
fontSize: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Rect as E}from"@expofp/geometry";import{reaction as W}from"mobx";import{FONT_WEIGHT_PRIMARY_BOOTH as N,FONT_WEIGHT_PRIMARY_EXHIBITOR as U,FONT_WEIGHT_SECONDARY_BOOTH as
|
|
1
|
+
import{Rect as E}from"@expofp/geometry";import{reaction as W}from"mobx";import{FONT_WEIGHT_PRIMARY_BOOTH as N,FONT_WEIGHT_PRIMARY_EXHIBITOR as U,FONT_WEIGHT_SECONDARY_BOOTH as V,FONT_WEIGHT_SECONDARY_EXHIBITOR as Z}from"../../../../constants";import p from"../../../../data";import{createShapeDot as X,createTextDef as G,createTextDefLines as Y,DEFAULT_FONT_LIGHT_URL as $,DEFAULT_FONT_URL as B,getRollValue as k,getRotation as q,updateLinesScale as j,updateRectRotation as J,updateTextDefRotation as K}from"../../../../renderer";import{boothStore as Q,layersStore as M,uiState as f}from"../../../../store";import{RegularBooth as ee,SpecialBooth as te}from"../../../../store/BoothStore";import L from"../../../../tools/settings";import{t as v}from"../../../../utils/i18n";import ie from"../../../../utils/is-mobile";import se from"../../../../utils/is-webview";import{isArabicText as ne}from"../../../../utils/rtl";import{BoothDrawerBaseWithoutPainter as oe}from"./BoothDrawerBase";import{getFont as _}from"./canvases";import{getLabelBorderInset as re}from"./label-inset.js";let z=L.boothLabelColor;L.EXPO==="tqs2021"&&(z="#000");const x=ie||se,D=r=>r.replace(" ","").substring(0,4).replace(/[0-9]/g,"3").replace(/[A-Z]/gi,"A"),I=document.createElement("canvas").getContext("2d");export default function he(r,e){if(!(!(e instanceof ee)||e.noLabels))return new BoothLabelDrawer(r,e)}export function getMinZoomFactorForDot(r){return Array.isArray(r)&&r.length>0?Math.max(...r.map(e=>e)):typeof r=="number"?r:-0}export const isDirectionsMode=()=>!!(f.selectedRoute?.from&&f.selectedRoute?.to);export function getFontUrlByWeight(r,e=[],t="normal"){return[...e,{weight:500,url:B,style:"normal"},{weight:300,url:$,style:"normal"}].find(i=>+i.weight===r&&i.style===t)?.url||B}function b(r,e){return Number(getComputedStyle(document.body).getPropertyValue(r))||e}export function getBoothLabelWeights(){return{main:b(N,500),details:b(V,300)}}export function getExhibitorLabelWeights(){return{main:b(U,500),details:b(Z,300)}}export function getBadgeFontWeight(){return getExhibitorLabelWeights().details}const F="Details";export class BoothLabelDrawer extends oe{constructor(e,t){if(super(t),this.minZoomDotVisible=0,this.maxZoomDotVisible=0,this.exh=[],this.shapeLabel=void 0,this.shapeDot=void 0,this.fontSizes=[[],[]],this.lines=[[],[]],this.fontUrls=["",""],this.rendererService=e,this.canvasRect=new E(t.rect.center,t.rect.size,t.rotate),this.paddingScaled=[4,4],this.padding=re(t.borderWidth||Q.borderWidth,t.rect.size),this.topLeftAlignment={horizontal:f.rtl?"right":"left",vertical:"top"},this.centerAlignment={horizontal:"center",vertical:"center"},this.prefixes=x?[{fontSize:7,name:"XS",short:!0},{fontSize:10,name:"S",short:!0},{fontSize:16,name:F,short:!1}]:[{fontSize:7,name:"XS",short:!0},{fontSize:10,name:"S",short:!0},{fontSize:12,name:"M",short:!0},{fontSize:14,name:"L",short:!0},{fontSize:18,name:F,short:!1}],t instanceof te)return;this.exh=p.hideExhibitors?[]:p.onlyFeaturedExhibitors?t.exhibitors.filter(i=>i.featured):t.exhibitors,x&&this.optimizationLevel()>=3&&(this.prefixes=this.prefixes.filter(i=>i.name!=="S")),this.createLines(),this.calculateFontSizeFactors(),this.shapeLabel=G(Y(this.lines,this.booth.labelColor||z,0,this.fontUrls),new E(this.booth.rect.center,this.booth.rect.size,this.booth.rotate),[...this.paddingScaled],{horizontal:"left",vertical:"top"}),this.getShapeDot();const o=i=>{const n=this.lines[1]??[],s=this.fontSizes[1]??[];if(L.EXPO!=="wineparis2026"){const m=this.exh.length?this.topLeftAlignment:n.length?i<s[s.length-1].scaleFactor?this.topLeftAlignment:this.centerAlignment:this.topLeftAlignment;this.shapeLabel.alignment=m}if(!j(this.shapeLabel.lines,i,this.fontSizes,this.booth.name))return;const l=this.paddingScaled[0]*i+this.padding,d=this.paddingScaled[1]*i+this.padding;return this.shapeLabel.padding[0]=l,this.shapeLabel.padding[1]=d,this.shapeLabel},h=i=>{const n=i>=this.minZoomDotVisible&&i<=this.maxZoomDotVisible,s=this.shapeDot.source.width*i,a=this.shapeDot.source.height*i;if(!(!n&&this.shapeDot.hidden))return this.shapeDot.bounds.size={x:s,y:a},this.shapeDot.hidden=!n,this.shapeDot};W(()=>[this.booth.skipDim,f.selectedRoute,M.layersLoaded],()=>{if(!M.layersLoaded)return;const i=isDirectionsMode();this.shapeLabel.dim=i||this.booth.skipDim?!1:void 0,this.shapeDot.dim=i||this.booth.skipDim?!1:void 0,this.rendererService.update(this.shapeLabel,this.shapeDot)}),W(()=>f.mapSettings,({roll:i})=>{k(i??0)&&this.rendererService.onRoll(`booth-roll-${t.id}`,n=>{const s=q(n,this.shapeLabel.bounds.rotation),{size:a}=this.canvasRect;return s!==void 0&&(this.shapeLabel=K(this.shapeLabel,s),!this.shapeLabel.hidden&&!this.exh.length&&a.x!==a.y&&(this.canvasRect=J(this.canvasRect,s),this.calculateFontSizeFactors(),o(this.rendererService.scale),h(this.rendererService.scale))),[this.shapeLabel,this.shapeDot]})},{fireImmediately:!0}),this.rendererService.onPtScale(`booth-label-${t.id}`,o),this.rendererService.onPtScale(`booth-dot-${t.id}`,h)}getShape(){return[this.shapeLabel,this.shapeDot]}getShapeDot(){this.shapeDot=X(this.canvasRect,this.booth.labelColor||z),this.shapeDot.hidden=!0,this.maxZoomDotVisible=Math.min(this.canvasRect.size.x/this.shapeDot.source.width,this.canvasRect.size.y/this.shapeDot.source.height)}createLines(){const e=this.booth,t=[],o=[],h=x&&this.optimizationLevel()>=3?1:3;if(this.exh.length){const i=e.exhibitors.filter(s=>s.order===0),n=e.exhibitors.filter(s=>s.order);if(i.length>0)t.push(...i.map(s=>s.name));else if(p.onlyFeaturedExhibitors)t.push(...e.exhibitors.filter(s=>s.featured).map(s=>s.name));else if(n.length>0){t.push(...n.map(a=>a.name));const s=e.exhibitors.filter(a=>a.order===void 0);s.length>0&&t.push(v("and {{moreCount}} more",{moreCount:s.length}))}else e.exhibitors.length>h?t.push(`${e.exhibitors.length} ${p.exhibitorTermPlural}`):t.push(...e.exhibitors.map(s=>s.name));o.push(e.title||e.name)}else{const i=!!e.exhibitors.length;t.push(e.title||e.name),e.onHold?o.push(v("On Hold")):e.reserved?o.push(v("Reserved")):i||o.push(...e.exhibitors.map(n=>n.name).sort((n,s)=>n>s?1:-1)),e.size&&o.push(e.size.indexOf("/")>-1?e.size.substring(0,e.size.indexOf("/")).trim():e.size),e.price&&e.price!=="0"&&!f.previewMode&&o.push(e.price)}f.rtl&&t.forEach((i,n)=>{(i.endsWith(".")||i.endsWith("!")||i.endsWith("?"))&&(t[n]=t[n]+"\u200F"),ne(i)&&(t[n]=t[n]+" ")}),this.lines=[t,o]}calculateFontSizeFactors(){const e=this.lines[0];let t;const o=this.canvasRect,h=[],i=[],n=this.prefixes.slice(0,this.exh.length?this.prefixes.length:this.prefixes.length-1),{main:s,details:a}=this.exh.length?getExhibitorLabelWeights():getBoothLabelWeights();for(const{fontSize:l,short:d}of n){const m=l*devicePixelRatio,R=.9*l*devicePixelRatio,u=_(m,s),T=_(R,a),y=p.hideExhibitorBoothNumber||d;let w,A,S,g;if(this.exh.length)t=d?[]:this.lines[1],S=Math.max(...e.map(c=>this.measureText(c,u).width),...t.map(c=>this.measureText(c,T).width)),w=Math.max(...e.map(c=>this.exh.length?this.measureText(D(c),u).width:this.measureText(D(c),u).width+3+3),...t.map(c=>this.measureText(D(c),T).width)),g=m*e.length+R*t.length+devicePixelRatio*(e.length+t.length)+3,A=y?g/e.length:null;else{const c=e[0].replace(/[0-9]/g,"3").replace(/[A-Z]/g,"A"),C=4;S=this.measureText(c,u).width+3+3,g=m+C}const H=o.size.x/(w||S),P=o.size.y/(A||g),O=Math.min(H,P);h.push({scaleFactor:O,value:l,lines:[]}),y||i.push({scaleFactor:O,value:.9*l,lines:[]})}if(!this.exh.length){const l=h[h.length-1],d=this.prefixes.find(m=>m.name===F);d&&(h.push({scaleFactor:l.scaleFactor/1.8,value:d.fontSize,lines:[]}),i.push({scaleFactor:l.scaleFactor/1.8,value:d.fontSize*(x?1:.9),lines:[]}))}this.fontUrls=[getFontUrlByWeight(s,this.rendererService.fontUrls),getFontUrlByWeight(a,this.rendererService.fontUrls)],this.minZoomDotVisible=getMinZoomFactorForDot(h.map(l=>l.scaleFactor)),this.fontSizes=[h,i]}calcArea(e,t){return Math.floor(Math.max(0,e)*Math.max(0,t)/1e3)}optimizationLevel(){return Math.min(p.viewOptimizationLevel?p.viewOptimizationLevel:Math.floor(this.calcArea(this.canvasRect.size.x,this.canvasRect.size.y)/5e3),3)}measureText(e,t){return I.font=t,I.measureText(e)}}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Geometry shared by the booth label drawers for holding label text clear of
|
|
3
|
+
* the booth border.
|
|
4
|
+
*/
|
|
5
|
+
/** Margin held around a booth label, as a share of each rect dimension. */
|
|
6
|
+
export declare const LABEL_MARGIN_FRACTION = 0.05;
|
|
7
|
+
/**
|
|
8
|
+
* How far a label box is pulled in from the booth footprint to clear the drawn
|
|
9
|
+
* border — half the stroke, since the border straddles the footprint edge.
|
|
10
|
+
*
|
|
11
|
+
* Capped at the margin and floored at zero: a plan can publish a
|
|
12
|
+
* `boothBorderWidth` far larger than the strokes it actually draws, and an
|
|
13
|
+
* uncapped inset then deflates the label box to nothing, so no font size fits
|
|
14
|
+
* and the label never renders at all. NaN and negative widths reach here too —
|
|
15
|
+
* an unparsable `stroke-width`, or the empty-booths `0 / 0` in
|
|
16
|
+
* `boothStore.borderWidth` — and fall out to zero rather than poisoning the box.
|
|
17
|
+
*
|
|
18
|
+
* @param borderWidth - stroke width actually painted for the booth
|
|
19
|
+
* @param size - the booth footprint
|
|
20
|
+
* @returns a non-negative inset, at most `LABEL_MARGIN_FRACTION` of the short side
|
|
21
|
+
*/
|
|
22
|
+
export declare function getLabelBorderInset(borderWidth: number, size: {
|
|
23
|
+
width: number;
|
|
24
|
+
height: number;
|
|
25
|
+
}): number;
|
|
26
|
+
//# sourceMappingURL=label-inset.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const LABEL_MARGIN_FRACTION=.05;export function getLabelBorderInset(t,n){const e=.05*Math.min(n.width,n.height);return t>0&&e>0?Math.min(t/2,e):0}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as re}from"react/jsx-runtime";import{degToRad as $}from"@expofp/geometry";import te from"color";import{runInAction as oe}from"mobx";import{observer as ne}from"mobx-react-lite";import{useCallback as B,useEffect as j,useMemo as b,useRef as d,useState as N}from"react";import ie from"../../data";import{getLayerSvg as ae,svgArea as P,svgAreaExplicit as ce}from"../../data/svg";import{createSceneDef as se}from"../../renderer";import{pickDefaultScenePoint as le}from"../../renderer/engine-core/defs";import c,{uiState as s}from"../../store";import{LayerMode as U}from"../../store/LayerStore";import T from"../../tools/settings";import{fitRectIsFraming as ue,getVenueFitMarginPercent as fe,resolveVenueFitRect as me}from"../../utils/scene-bounds";import pe from"../Map/drawing/config/config-all";import{loadLayersImages as de}from"../Map/drawing/config/loadBoothsImages";import{useBuildRoute as ge}from"../Map/traffic/useBuildRoute";import{useManageTraffic as be}from"../Map/traffic/useManageTraffic";import Se from"./MaplibreWrapper";import{useCameraReactions as Re}from"./useCameraReactions";import{useDimming as ye}from"./useDimming";import{useKioskIdleEvents as he}from"./useKioskIdleEvents";import{useLayerVisibilitySync as Ce}from"./useLayerVisibilitySync";import{usePoiMarkers as Me}from"./usePoiMarkers";import{useRendererEvents as ve}from"./useRendererEvents";import{useWayfindingAndMarkers as Ae}from"./useWayfindingAndMarkers";import{cameraForLocalRect as De,deriveGeoConfig as Pe,getLocalRectGeoBounds as Te,getVisibleRectFitPadding as ze,INITIAL_FIT_ZOOM_ADJUSTMENT as Le}from"./utils/geo-config";import{applyMapOptions as V,DEFAULT_MAP_OPTIONS as Oe,getTileSource as Ee,MAP_2D_OPTIONS as xe}from"./utils/map-helpers";import{calculateTransformMatrix as ke}from"./utils/solver";const G="routes-api.expofp.com",_e=800;function Fe(r,l,a){return{getCameraState:()=>{const o=r.getCenter();return{lng:o.lng,lat:o.lat,zoom:r.getZoom(),bearing:r.getBearing(),pitch:r.getPitch()}},applyCameraState:o=>{r.easeTo({center:[o.lng,o.lat],zoom:o.zoom,bearing:o.bearing??l,pitch:o.pitch??a(),duration:_e,essential:!0})},resetPitch:()=>{const o=a();r.getPitch()!==o&&r.jumpTo({pitch:o})}}}function W(){c.poiMarkerStore.clear(),oe(()=>{c.layerStore.layers.forEach(r=>{r.configured=!1,r.children=[],r.loaded=!1}),c.layerStore.layersLoaded=!1})}function X(r,l){const a=[];for(const o of r.rollRegistry.invoke(l))Array.isArray(o)?a.push(...o):a.push(o);a.length&&r.update(...a)}function we(r){const l=Math.abs(r[0]??0),a=Math.hypot(r[0]??0,r[1]??0);return l<=0||a<=0?1:l/a}const Ie=ne(function({viewMode:l}){const[a,o]=N(null),[C,x]=N(null),n=c.rendererService,z=d(null),u=d(null),M=d(null),L=d(null),k=d(null),v=d(null),e=b(()=>Pe(),[]),O=b(()=>me({layerViewbox:c.layerStore.viewboxRectangle,explicitArea:ce?P:null,layerRectangle:c.layerStore.rectangle,sceneDef:a,svgArea:P}),[a]),A=O.rect,S=b(()=>{if(!e)return null;const i=ue(O.source)?0:fe(A,P),t=ze(0);i&&s.screenSize&&(t.left+=s.screenSize.width*i,t.right+=s.screenSize.width*i,t.top+=s.screenSize.height*i,t.bottom+=s.screenSize.height*i);const m=s.screenSize?De(A,e.gpsConfig,e.bearing,{width:s.screenSize.width,height:s.screenSize.height},t):null;return m?{center:m.center,bearing:e.bearing,zoom:m.zoom}:{center:e.center,bearing:e.bearing,zoom:e.zoom,bounds:Te(A,e.gpsConfig),fitPadding:t,zoomAdjustment:Le}},[e,O,A]),R=b(()=>e?ke(e.gpsConfig,ae()?.getAttribute("units")):null,[e]),y=b(()=>({...l==="map2d"?xe:Oe}),[l]),E=d(y),H=b(()=>Ee(),[]),{mapDimAnimatorRef:_,venueDimAnimatorRef:F,applyDimmingTarget:w,handleMapDimLayerReady:J}=ye(u,n);j(()=>{if(!e)return;let i=!1;W();const t=pe(n).then(({layers:f,cleanup:p})=>{if(i){p();return}L.current=p;const D=te(T.backgroundColor==="none"?"#ebebeb":T.backgroundColor).string(),g=se(f,P,D);o(g)}).catch(f=>{i||console.warn("Maplibre scene configuration failed.",f)}),m=_.current,h=F.current;return()=>{i=!0,W();const f=z.current;t.finally(()=>n.disposeIfCurrent(f)),M.current?.(),M.current=null,L.current?.(),L.current=null,v.current&&(c.maplibreStore.clearCameraPortIfCurrent(v.current),v.current=null),z.current=null,u.current=null,k.current=null,x(null),m?.stop(),h?.stop(),s.sceneDefReady=!1}},[e,_,n,F]);const K=B((i,t,m,h)=>{z.current=i,u.current=t,k.current=h,x(i),n.attach(i,m,h,R?we(R):1),V(t,E.current);const f=Fe(t,e?.bearing??t.getBearing(),()=>E.current.pitch??0);v.current=f,c.maplibreStore.setCameraPort(f),c.fp.getCenterCoordinates=()=>{const{canvas:g}=i,q=le(i.viewport.canvasToSvg({x:g.clientWidth/2,y:g.clientHeight/2})),ee=c.layerStore.visible.find(I=>I.mode===U.TurnedOff||I.mode===U.TurnedOn);return{...q,z:ee?.name||null}},w({immediate:!0}),M.current?.();const p=()=>{const g=t.getBearing()-(e?.bearing??0);X(n,$(g))};t.on("rotate",p),t.on("rotateend",p),M.current=()=>{t.off("rotate",p),t.off("rotateend",p)},de(n);const D=n.ptScaleRegistry.invoke(n.scale||1);D.length&&n.update(...D),X(n,$(t.getBearing()-(e?.bearing??0))),c.layerStore.layersLoaded=!0,c.fp.onFpConfigured&&c.fp.onFpConfigured(),s.sceneDefReady=!0,h()},[n,w,R,e]);j(()=>{E.current=y,V(u.current,y,!0)},[y]),ve(C,n),he(C,u),Ae(C,n),Me(C,u,e),Ce(n,u,e),Re(u,e,a),ge({enabled:c.layerStore.layersLoaded&&s.buildRoute,rendererService:n});const Z=ie.busRoutes??!1;be({permission:c.layerStore.layersLoaded&&Z,rendererService:n,dataJsonUrl:`https://${G}/v1/routes?expo=${T.EXPO}`,websocketUrl:`wss://${G}/locations?expo=${T.EXPO}`});const Q=B(i=>{console.warn("Maplibre map failed to load; falling back to floorplan mode.",i),c.maplibreStore.deactivateMaplibre()},[]);if(!e||!S||!R||!a)return null;const Y=`${S.center.join(",")}:${S.bearing}:${S.zoom}`;return re(Se,{sceneDef:a,geoConfig:S,staticTransform:R,tileSource:H,mapOptions:y,onRendererReady:K,onMapDimLayerReady:J,onMapLoadError:Q},Y)});export default Ie;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@expofp/floorplan",
|
|
3
|
-
"version": "3.25.
|
|
3
|
+
"version": "3.25.2",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/expofp/efp-app.git",
|
|
@@ -70,14 +70,14 @@
|
|
|
70
70
|
"tslib": "^2.3.0",
|
|
71
71
|
"uuid": "^9.0.1",
|
|
72
72
|
"zod": "4.4.3",
|
|
73
|
-
"@expofp/config": "3.25.
|
|
74
|
-
"@expofp/debug": "3.25.
|
|
75
|
-
"@expofp/geometry": "3.25.
|
|
76
|
-
"@expofp/
|
|
77
|
-
"@expofp/
|
|
78
|
-
"@expofp/ui": "3.25.
|
|
79
|
-
"@expofp/utils": "3.25.
|
|
80
|
-
"@expofp/wayfinding": "3.25.
|
|
73
|
+
"@expofp/config": "3.25.2",
|
|
74
|
+
"@expofp/debug": "3.25.2",
|
|
75
|
+
"@expofp/geometry": "3.25.2",
|
|
76
|
+
"@expofp/resolve": "3.25.2",
|
|
77
|
+
"@expofp/schema": "3.25.2",
|
|
78
|
+
"@expofp/ui": "3.25.2",
|
|
79
|
+
"@expofp/utils": "3.25.2",
|
|
80
|
+
"@expofp/wayfinding": "3.25.2"
|
|
81
81
|
},
|
|
82
82
|
"devDependencies": {
|
|
83
83
|
"@babel/plugin-proposal-decorators": "^8.0.2",
|