@expofp/floorplan 3.10.1 → 3.11.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-DdPvRBTh.js → Button-DmPeJZCN.js} +6 -6
- package/dist/browser/{CookieConsent-C39dYjaQ.js → CookieConsent-6-9q2wKV.js} +7 -7
- package/dist/browser/{Debug-B5r6LCAX.js → Debug-3bI5vwTv.js} +7 -7
- package/dist/browser/{Demo-Dbrjn3oi.js → Demo-qTtvWifi.js} +10 -10
- package/dist/browser/{Free-DUcGDkLZ.js → Free-CD_OvzMT.js} +10 -10
- package/dist/browser/{Gallery-CvO5_8hs.js → Gallery-D16-00mk.js} +10 -10
- package/dist/browser/{GpsLoader-Cybs-6Z0.js → GpsLoader-CMPI_EJr.js} +19 -19
- package/dist/browser/{KioskStore-Df_lwtgJ.js → KioskStore-KhqffTn9.js} +30 -30
- package/dist/browser/{MaplibreAdapter-BgOzaHlx.js → MaplibreAdapter-CxVjU49j.js} +749 -614
- package/dist/browser/{ModalContainer-DXVCm1fb.js → ModalContainer-RI1x2sgo.js} +11 -11
- package/dist/browser/{PermissionNotice-B0OJFFky.js → PermissionNotice-D8kO5oWK.js} +7 -7
- package/dist/browser/{SetKioskMode-BdOX40be.js → SetKioskMode-CVACOg2n.js} +11 -11
- package/dist/browser/ShowKiosk-9Cegzzmp.js +28 -0
- package/dist/browser/{TouchHand-RDWCILm_.js → TouchHand-Ep4vi1-O.js} +4 -4
- package/dist/browser/{ViewerMenuPanel-BlCzm_mm.js → ViewerMenuPanel-DjMPzBGY.js} +10 -10
- package/dist/browser/{add-debug-secret-listener-lYBneebf.js → add-debug-secret-listener-sVpxJOA4.js} +1 -1
- package/dist/browser/{boolean-editor-C_bdHxC2.js → boolean-editor-DbKheXB7.js} +45 -45
- package/dist/browser/{bootIntercom-Bf4CaruD.js → bootIntercom-BwUrDpiz.js} +2 -2
- package/dist/browser/{booth-by-xy-WnHwiopn.js → booth-by-xy-DRUiuOmc.js} +260 -245
- package/dist/browser/{browser-BGtGwkTn.js → browser-DfAAgCEL.js} +2 -2
- package/dist/browser/bundle.json +61 -61
- package/dist/browser/{classnames-DRy7JPyJ.js → classnames-DDqQQkCN.js} +2 -2
- package/dist/browser/{client-BE52OM0U.js → client-CZSclqZM.js} +10 -10
- package/dist/browser/{components-BfKSs6sY.js → components-Bjyqu35r.js} +1675 -1675
- package/dist/browser/{debug-overlay-mKmIzOYk.js → debug-overlay-CGt1pj-M.js} +355 -355
- package/dist/browser/{debug-ui-DLxMK2XU.js → debug-ui-D-D_vlp1.js} +6 -6
- package/dist/browser/{dist-eojWwYB5.js → dist-CL_uyaoa.js} +3 -3
- package/dist/browser/{dist-QsCYWHCu.js → dist-ONDtUhT2.js} +5 -5
- package/dist/browser/{dist-DSRSA5oz.js → dist-V33BDzLb.js} +64 -63
- package/dist/browser/{efp-debug-init-C5HgsgC2.js → efp-debug-init-DxEQuRHk.js} +2 -2
- package/dist/browser/{enum-editor-BqpFqXiM.js → enum-editor-DG92oZeF.js} +478 -478
- package/dist/browser/{es5-7bslpbjj.js → es5-BSWs3YWr.js} +2 -2
- package/dist/browser/{event-not-found-Bc1SpnKw.js → event-not-found-Z4wb-LNc.js} +1 -1
- package/dist/browser/{exports-CYJRF2aW.js → exports-BLV4-zfL.js} +449 -443
- package/dist/browser/{favicon-CRiidRYo.js → favicon-BQW1E3bU.js} +1 -1
- package/dist/browser/{fetch-retry.umd-Btwt1fg_.js → fetch-retry.umd-DC6Ql4P0.js} +2 -2
- package/dist/browser/{flex-ITkzmA3C.js → flex-B_4SOC_u.js} +7 -7
- package/dist/browser/{floorplan.loader-DJVlfwah.js → floorplan.loader-DoJ2VQu0.js} +1284 -1282
- package/dist/browser/{floorplan.ready-7KwBZy9I.js → floorplan.ready-B_BwJrtz.js} +282 -282
- package/dist/browser/{fuse-CcYz7YAl.js → fuse-z0Cnj-cM.js} +4 -4
- package/dist/browser/{i18n-CeVxHTr1.js → i18n-xEZCBKNV.js} +19 -20
- package/dist/browser/index.js +12 -12
- package/dist/browser/{index.module-CV2WVv52.js → index.module-DLdW0sj8.js} +4 -4
- package/dist/browser/{is-webview-BOqof5Uq.js → is-webview-DyfiukCX.js} +1 -1
- package/dist/browser/{jsx-runtime-BiSrB4Oo.js → jsx-runtime-DAN07kgB.js} +2 -2
- package/dist/browser/{lib-Dg9vXDVM.js → lib-BeWX12Ej.js} +4 -4
- package/dist/browser/{loadImage-VYhbBgH6.js → loadImage-CArumIxk.js} +4 -4
- package/dist/browser/{logDeviceInfo-B8Mi-9H5.js → logDeviceInfo-DWxMGiZR.js} +9 -9
- package/dist/browser/{main-D6ItQIYj.js → main-Bc1iznBR.js} +1 -1
- package/dist/browser/{mobx-Deoo_wpx.js → mobx-Dzavco9D.js} +4 -4
- package/dist/browser/{particles.min-BNwqgit-.js → particles.min-CHtISs00.js} +2 -2
- package/dist/browser/{prop-types-CuEYshV7.js → prop-types-BQxsUoxX.js} +2 -2
- package/dist/browser/{react-BMPhuMz9.js → react-Cu706Ph1.js} +2 -2
- package/dist/browser/{react-dom-DSdkXj0b.js → react-dom-DT1n8Muz.js} +3 -3
- package/dist/browser/{reset-all-settings-C2yTiJ1V.js → reset-all-settings-D2RthoP4.js} +7 -7
- package/dist/browser/{rolldown-runtime-I1EwXf_t.js → rolldown-runtime-DHef_8fH.js} +1 -1
- package/dist/browser/{settings-Dr8bs0FB.js → settings--Y0n4PSR.js} +2 -2
- package/dist/browser/{settings-item-DjfyQTQB.js → settings-item-Dv1G9gTh.js} +15 -15
- package/dist/browser/{store-CVdrQCza.js → store-C1iT-e-6.js} +5123 -5042
- package/dist/browser/{string-editor-3sN4j-ci.js → string-editor-BfNPvbRL.js} +22 -22
- package/dist/browser/{theme-BSTLt6eV.js → theme-byX3VrfS.js} +927 -930
- package/dist/browser/{ui-CiFfwrN8.js → ui-DJZFvwjb.js} +8 -8
- package/dist/browser/{useRenderTarget-DF7LdnYr.js → useRenderTarget-OQs5aKcF.js} +4 -4
- package/dist/esm/components/Map/drawing/config/config-booth-badge-eligibility.d.ts +28 -0
- package/dist/esm/components/Map/drawing/config/config-booth-badge-eligibility.js +1 -0
- package/dist/esm/components/Map/drawing/config/config-booth-badge.js +1 -1
- package/dist/esm/components/Maplibre/MaplibreAdapter.js +1 -1
- package/dist/esm/components/Maplibre/MaplibreWrapper.js +1 -1
- package/dist/esm/components/Maplibre/styles/mapbox-streets-bright.d.ts +3 -0
- package/dist/esm/components/Maplibre/styles/mapbox-streets-bright.js +16 -0
- package/dist/esm/components/Maplibre/styles/mapbox-streets.d.ts +3 -0
- package/dist/esm/components/Maplibre/styles/mapbox-streets.js +16 -0
- package/dist/esm/components/Maplibre/useCameraReactions.d.ts +4 -3
- package/dist/esm/components/Maplibre/useCameraReactions.js +1 -1
- package/dist/esm/components/Maplibre/utils/geo-config.d.ts +5 -8
- package/dist/esm/components/Maplibre/utils/geo-config.js +1 -1
- package/dist/esm/components/Maplibre/utils/map-helpers.js +1 -1
- package/dist/esm/components/Maplibre/utils/solver.d.ts +6 -7
- package/dist/esm/components/Maplibre/utils/solver.js +1 -1
- package/dist/esm/data/Flags.d.ts +4 -0
- package/dist/esm/data/svg.d.ts +2 -1
- package/dist/esm/data/svg.js +1 -1
- package/dist/esm/renderer/RendererService.d.ts +2 -1
- package/dist/esm/renderer/RendererService.js +1 -1
- package/dist/esm/store/LayerStore.d.ts +1 -0
- package/dist/esm/store/LayerStore.js +1 -1
- package/dist/esm/store/UIState.js +1 -1
- package/dist/esm/utils/gps.js +1 -1
- package/dist/esm/utils/planBearing.d.ts +14 -0
- package/dist/esm/utils/planBearing.js +1 -0
- package/dist/esm/utils/scene-bounds.d.ts +57 -0
- package/dist/esm/utils/scene-bounds.js +1 -0
- package/package.json +8 -8
- package/dist/browser/ShowKiosk-cvnSTpd2.js +0 -28
package/dist/esm/utils/gps.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{haversineDistance as
|
|
1
|
+
import{haversineDistance as m,lineCenter as x,lineLength as d,pointDistance as v,projectGpsToLocal as b,projectLocalToGps as G}from"@expofp/geometry";import{fpGeo as y}from"../data/fpGeo";import p from"../tools/logger";import{planBearing as L}from"./planBearing";function c(e){return[{local:{x:e.p0.x,y:e.p0.y},geo:{lat:e.p0.lat,lng:e.p0.lng}},{local:{x:e.p2.x,y:e.p2.y},geo:{lat:e.p2.lat,lng:e.p2.lng}}]}export function isValidPointCoords(e){return typeof e=="number"&&Number.isFinite(e)}export function convertGpsToLocal({lat:e,lng:n,angle:o},l){if(!(isValidPointCoords(e)&&isValidPointCoords(n)))return null;let{p0:t,p2:r}=l;const i=m(t,r);if(!isValidPointCoords(i)||i<=0)return p.warn("Invalid GPS config: zero or negative distance",{fullGpsDistance:i,p0:t,p2:r}),null;const[s,u]=c(l);let a=b({lat:e,lng:n},s,u),g=d({p0:a,p1:x({p0:t,p1:r})}),f=v(t,r);return g>5*f?(p.warn("Current position too far"),null):{...a,angle:o}}export function convertLocalToGps(e,n,o){const[l,t]=c(o),{lat:r,lng:i}=G({x:e,y:n},l,t);return[i,r]}export function calculateRelativeBearing(e){const n=y?.properties?.config,o=n?L(n.p0,n.p2):NaN,l=Number.isFinite(o)?o:n?.bearing??0;return e?.angle===null?0:(((e.angle-l)%360+360)%360-90+360)%360}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
interface AnchorPoint {
|
|
2
|
+
x: number;
|
|
3
|
+
y: number;
|
|
4
|
+
lat: number;
|
|
5
|
+
lng: number;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Bearing (degrees, 0..360) that renders a floor plan upright on the map: the
|
|
9
|
+
* rotation from the p0->p2 anchor diagonal in plan coordinates to its direction
|
|
10
|
+
* in Web Mercator. Returns NaN for non-finite anchors.
|
|
11
|
+
*/
|
|
12
|
+
export declare function planBearing(p0: AnchorPoint, p2: AnchorPoint): number;
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=planBearing.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(t){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+t*Math.PI/360)))/360}export function planBearing(t,a){const r=Math.atan2(e(a.lat)-e(t.lat),(a.lng-t.lng)/360),l=Math.atan2(a.y-t.y,a.x-t.x),n=(r-l)*180/Math.PI%360;return Number.isFinite(n)?(n+360)%360:NaN}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { Box } from '@expofp/geometry';
|
|
2
|
+
import type { SceneDef } from '@expofp/renderer';
|
|
3
|
+
/**
|
|
4
|
+
* Bounding box (in local SVG units) of all drawn scene content, excluding the
|
|
5
|
+
* background "areamap" layer. This is the real venue extent and the rect that
|
|
6
|
+
* Fit-to-screen should target — the full SVG area (`svgArea`) instead spans the
|
|
7
|
+
* whole surrounding map (e.g. an entire city), which makes the fit zoom out far
|
|
8
|
+
* too much.
|
|
9
|
+
*
|
|
10
|
+
* Uses the same name-based areamap exclusion as MaplibreWrapper, so it needs no
|
|
11
|
+
* layer flags and degrades to "all content" for venue-only floorplans.
|
|
12
|
+
*/
|
|
13
|
+
export declare function getSceneVenueRect(sceneDef: SceneDef | null | undefined): Box | null;
|
|
14
|
+
/**
|
|
15
|
+
* Margin to leave around the venue when fitting, as a fraction of the venue
|
|
16
|
+
* size. Mirrors the legacy renderer's adaptive rule: a venue that is tiny
|
|
17
|
+
* relative to its surroundings gets more breathing room than one that already
|
|
18
|
+
* fills most of the available area.
|
|
19
|
+
*/
|
|
20
|
+
export declare function getVenueFitMarginPercent(venueRect: Box, baseRect: Box): number;
|
|
21
|
+
/** Grow a rect outward by `pct` of its size on each side. */
|
|
22
|
+
export declare function expandRectByPercent(rect: Box, pct: number): Box;
|
|
23
|
+
/**
|
|
24
|
+
* Canonical Fit-to-screen target: the venue extent grown by its adaptive margin.
|
|
25
|
+
* `baseRect` is the surrounding map area (`svgArea`) used to scale the margin.
|
|
26
|
+
* Returns null when the scene has no fittable content.
|
|
27
|
+
*/
|
|
28
|
+
export declare function getVenueFitRect(sceneDef: SceneDef | null | undefined, baseRect: Box): Box | null;
|
|
29
|
+
/** Where a resolved Fit-to-screen rectangle came from (most → least specific). */
|
|
30
|
+
export type VenueFitSource = 'layer-viewbox' | 'explicit-viewbox' | 'layer-rectangle' | 'scene-derived' | 'svg-area';
|
|
31
|
+
export interface VenueFitInputs {
|
|
32
|
+
/** Union of authored per-layer viewboxes (`LayerStore.viewboxRectangle`). */
|
|
33
|
+
layerViewbox?: Box | null;
|
|
34
|
+
/** `svgArea` when it was explicitly authored (`__viewbox` / `rect#VIEWBOX`). */
|
|
35
|
+
explicitArea?: Box | null;
|
|
36
|
+
/** Current-level geometry rect in radio mode (`LayerStore.rectangle`). */
|
|
37
|
+
layerRectangle?: Box | null;
|
|
38
|
+
/** Scene to derive the venue extent from when nothing above is authored. */
|
|
39
|
+
sceneDef?: SceneDef | null;
|
|
40
|
+
/** Whole-canvas fallback and margin base. */
|
|
41
|
+
svgArea: Box;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Single source of truth for the Fit-to-screen / initial-view target. Picks the
|
|
45
|
+
* most specific available reference in priority order. This is the seam a future
|
|
46
|
+
* multi-venue model plugs into: it would resolve the *active* venue's box here,
|
|
47
|
+
* leaving every call site unchanged.
|
|
48
|
+
*
|
|
49
|
+
* Authored boxes (`layer-viewbox`, `explicit-viewbox`) are returned as-is — the
|
|
50
|
+
* caller's fit already adds viewport padding. Geometry-derived boxes
|
|
51
|
+
* (`scene-derived`) carry their adaptive breathing-room margin.
|
|
52
|
+
*/
|
|
53
|
+
export declare function resolveVenueFitRect(inputs: VenueFitInputs): {
|
|
54
|
+
rect: Box;
|
|
55
|
+
source: VenueFitSource;
|
|
56
|
+
};
|
|
57
|
+
//# sourceMappingURL=scene-bounds.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Box as s}from"@expofp/geometry";const x="areamap";export function getSceneVenueRect(e){const n=e?.rootLayer?.children;if(!n?.length)return null;let t=1/0,o=1/0,a=-1/0,c=-1/0;const f=(i,r)=>{!Number.isFinite(i)||!Number.isFinite(r)||(i<t&&(t=i),r<o&&(o=r),i>a&&(a=i),r>c&&(c=r))},u=i=>{const r=i;r.children&&r.children.forEach(u),r.bounds?.min&&r.bounds?.max&&(f(r.bounds.min.x,r.bounds.min.y),f(r.bounds.max.x,r.bounds.max.y)),r.points&&r.points.forEach(l=>f(l.x,l.y))};for(const i of n){const r=i.name;typeof r=="string"&&r.toLowerCase()===x||u(i)}return t>a||o>c?null:s.fromMinMax({x:t,y:o},{x:a,y:c})}export function getVenueFitMarginPercent(e,n){return!e||!n||n.area<=0||e.area/n.area>.1?.15:.25}export function expandRectByPercent(e,n){return n?e.expand({x:e.size.width*n,y:e.size.height*n}):e}export function getVenueFitRect(e,n){const t=getSceneVenueRect(e);return t?expandRectByPercent(t,getVenueFitMarginPercent(t,n)):null}export function resolveVenueFitRect(e){if(e.layerViewbox)return{rect:e.layerViewbox,source:"layer-viewbox"};if(e.explicitArea)return{rect:e.explicitArea,source:"explicit-viewbox"};if(e.layerRectangle)return{rect:e.layerRectangle,source:"layer-rectangle"};const n=getVenueFitRect(e.sceneDef,e.svgArea);return n?{rect:n,source:"scene-derived"}:{rect:e.svgArea,source:"svg-area"}}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@expofp/floorplan",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.11.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/expofp/efp-app.git",
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
],
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@expofp/renderer": "3.2.4",
|
|
39
|
-
"@sentry/core": "^10.
|
|
40
|
-
"@sentry/react": "^10.
|
|
39
|
+
"@sentry/core": "^10.60.0",
|
|
40
|
+
"@sentry/react": "^10.60.0",
|
|
41
41
|
"bowser": "^2.14.1",
|
|
42
42
|
"classnames": "^2.2.6",
|
|
43
43
|
"color": "^3.1.2",
|
|
@@ -72,9 +72,9 @@
|
|
|
72
72
|
"tslib": "^2.3.0",
|
|
73
73
|
"uuid": "^9.0.1",
|
|
74
74
|
"zod": "4.3.5",
|
|
75
|
-
"@expofp/debug": "3.
|
|
76
|
-
"@expofp/geometry": "3.
|
|
77
|
-
"@expofp/resolve": "3.
|
|
75
|
+
"@expofp/debug": "3.11.0",
|
|
76
|
+
"@expofp/geometry": "3.11.0",
|
|
77
|
+
"@expofp/resolve": "3.11.0"
|
|
78
78
|
},
|
|
79
79
|
"devDependencies": {
|
|
80
80
|
"@babel/plugin-proposal-decorators": "^8.0.2",
|
|
@@ -89,10 +89,10 @@
|
|
|
89
89
|
"@types/lz-string": "1.3.32",
|
|
90
90
|
"@types/react": "^19.2.17",
|
|
91
91
|
"@types/react-dom": "^19.2.3",
|
|
92
|
-
"@vitejs/plugin-react": "^6.0.
|
|
92
|
+
"@vitejs/plugin-react": "^6.0.3",
|
|
93
93
|
"@vitest/browser-playwright": "^4.1.9",
|
|
94
94
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
95
|
-
"playwright": "^1.61.
|
|
95
|
+
"playwright": "^1.61.1",
|
|
96
96
|
"react": "^19.2.7",
|
|
97
97
|
"react-dom": "^19.2.7",
|
|
98
98
|
"rollup-plugin-visualizer": "^7.0.1",
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
(function() {
|
|
2
|
-
try {
|
|
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.10.1" };
|
|
5
|
-
var t = new e.Error().stack;
|
|
6
|
-
t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "b9c5dcc6-2ca6-41f3-af49-683f02085349", e._sentryDebugIdIdentifier = "sentry-dbid-b9c5dcc6-2ca6-41f3-af49-683f02085349");
|
|
7
|
-
} catch {}
|
|
8
|
-
})();
|
|
9
|
-
import "./rolldown-runtime-I1EwXf_t.js";
|
|
10
|
-
import { t as e } from "./react-BMPhuMz9.js";
|
|
11
|
-
import { t } from "./jsx-runtime-BiSrB4Oo.js";
|
|
12
|
-
import "./i18n-CeVxHTr1.js";
|
|
13
|
-
import { t as n } from "./index.module-CV2WVv52.js";
|
|
14
|
-
import { K as r, o as i, q as a } from "./store-CVdrQCza.js";
|
|
15
|
-
import { n as o } from "./mobx-Deoo_wpx.js";
|
|
16
|
-
import { t as s } from "./KioskStore-Df_lwtgJ.js";
|
|
17
|
-
import { t as c } from "./TouchHand-RDWCILm_.js";
|
|
18
|
-
e();
|
|
19
|
-
var l = t(), u = n(() => (o(() => {
|
|
20
|
-
if (localStorage.getItem("kiosk") === "0") return;
|
|
21
|
-
s.restoreData();
|
|
22
|
-
let e = s.kiosk;
|
|
23
|
-
if (e) return r(e, !0), a(e), s.resetCamera(), i.setResetCameraFn(() => s.resetCamera()), () => {
|
|
24
|
-
i.uiState.setKioskData(null), i.uiState.resetMapSettings();
|
|
25
|
-
};
|
|
26
|
-
}), i.uiState.kiosk && i.uiState.inIdle ? /* @__PURE__ */ (0, l.jsx)(c, {}) : null));
|
|
27
|
-
//#endregion
|
|
28
|
-
export { u as default };
|