@expofp/floorplan 3.9.0 → 3.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (113) hide show
  1. package/dist/browser/{Button-D6kSs8oT.js → Button-DdPvRBTh.js} +5 -5
  2. package/dist/browser/{CookieConsent-COR-7PnR.js → CookieConsent-C39dYjaQ.js} +7 -7
  3. package/dist/browser/{Debug-hcVDK_6B.js → Debug-B5r6LCAX.js} +7 -7
  4. package/dist/browser/{Demo-CXfqKcNa.js → Demo-Dbrjn3oi.js} +9 -9
  5. package/dist/browser/{Free-UltUjcsW.js → Free-DUcGDkLZ.js} +9 -9
  6. package/dist/browser/{Gallery-Dw_l4-HJ.js → Gallery-CvO5_8hs.js} +9 -9
  7. package/dist/browser/{GpsLoader-BeUr-tWe.js → GpsLoader-Cybs-6Z0.js} +21 -21
  8. package/dist/browser/{KioskStore-rXGF6ISj.js → KioskStore-Df_lwtgJ.js} +34 -34
  9. package/dist/browser/{MaplibreAdapter-DBu4xFLx.js → MaplibreAdapter-BgOzaHlx.js} +1866 -1863
  10. package/dist/browser/{ModalContainer-CHubcxXg.js → ModalContainer-DXVCm1fb.js} +10 -10
  11. package/dist/browser/{PermissionNotice-Dcyf-h-X.js → PermissionNotice-B0OJFFky.js} +6 -6
  12. package/dist/browser/{SetKioskMode-Dsaeb_7s.js → SetKioskMode-BdOX40be.js} +12 -12
  13. package/dist/browser/ShowKiosk-cvnSTpd2.js +28 -0
  14. package/dist/browser/{TouchHand-BglJHdqZ.js → TouchHand-RDWCILm_.js} +4 -4
  15. package/dist/browser/{ViewerMenuPanel-6hwMrGsD.js → ViewerMenuPanel-BlCzm_mm.js} +10 -10
  16. package/dist/browser/{add-debug-secret-listener-CrjDiiDe.js → add-debug-secret-listener-lYBneebf.js} +1 -1
  17. package/dist/browser/{boolean-editor-B8TY5r_7.js → boolean-editor-C_bdHxC2.js} +9 -9
  18. package/dist/browser/{bootIntercom-BLVUFUo9.js → bootIntercom-Bf4CaruD.js} +2 -2
  19. package/dist/browser/booth-by-xy-WnHwiopn.js +1067 -0
  20. package/dist/browser/{browser-C0ZAqhfq.js → browser-BGtGwkTn.js} +2 -2
  21. package/dist/browser/bundle.json +62 -62
  22. package/dist/browser/{classnames-CORO_J9N.js → classnames-DRy7JPyJ.js} +2 -2
  23. package/dist/browser/{client-B8k3_zlK.js → client-BE52OM0U.js} +4 -4
  24. package/dist/browser/{components-Br23UmiD.js → components-BfKSs6sY.js} +1697 -1696
  25. package/dist/browser/{debug-overlay-OnJ9mpi3.js → debug-overlay-mKmIzOYk.js} +10 -10
  26. package/dist/browser/{debug-ui-BGxXBqCM.js → debug-ui-DLxMK2XU.js} +6 -6
  27. package/dist/browser/{dist-DeenbCqa.js → dist-DSRSA5oz.js} +6 -6
  28. package/dist/browser/{dist-Bwo0bena.js → dist-QsCYWHCu.js} +5 -5
  29. package/dist/browser/{dist-DJcDQ9wl.js → dist-eojWwYB5.js} +3 -3
  30. package/dist/browser/{efp-debug-init-D4xpSVxZ.js → efp-debug-init-C5HgsgC2.js} +2 -2
  31. package/dist/browser/{enum-editor-BtQ7q_B6.js → enum-editor-BqpFqXiM.js} +11 -11
  32. package/dist/browser/{es5-DyYwMIHo.js → es5-7bslpbjj.js} +2 -2
  33. package/dist/browser/{event-not-found-DHZml9YG.js → event-not-found-Bc1SpnKw.js} +1 -1
  34. package/dist/browser/{exports-BSvGPafo.js → exports-CYJRF2aW.js} +1 -1
  35. package/dist/browser/{favicon-7eGefoDS.js → favicon-CRiidRYo.js} +1 -1
  36. package/dist/browser/{fetch-retry.umd-D4q_0lN2.js → fetch-retry.umd-Btwt1fg_.js} +2 -2
  37. package/dist/browser/{flex-BNMB3s0s.js → flex-ITkzmA3C.js} +5 -5
  38. package/dist/browser/{floorplan.loader-C464BfTl.js → floorplan.loader-DJVlfwah.js} +11 -11
  39. package/dist/browser/{floorplan.ready-F-rEW40x.js → floorplan.ready-7KwBZy9I.js} +156 -156
  40. package/dist/browser/{fuse-BOOzXNLy.js → fuse-CcYz7YAl.js} +2 -2
  41. package/dist/browser/{i18n-CJxFIIru.js → i18n-CeVxHTr1.js} +4 -4
  42. package/dist/browser/index.js +12 -12
  43. package/dist/browser/{index.module-CkT4oOvs.js → index.module-CV2WVv52.js} +4 -4
  44. package/dist/browser/{is-webview-B86RAuQv.js → is-webview-BOqof5Uq.js} +1 -1
  45. package/dist/browser/{jsx-runtime-3_7049j-.js → jsx-runtime-BiSrB4Oo.js} +2 -2
  46. package/dist/browser/{lib-CjZn5G8Q.js → lib-Dg9vXDVM.js} +4 -4
  47. package/dist/browser/{loadImage-CV72jhce.js → loadImage-VYhbBgH6.js} +4 -4
  48. package/dist/browser/{logDeviceInfo-CH_mwixN.js → logDeviceInfo-B8Mi-9H5.js} +9 -9
  49. package/dist/browser/{main-DBcClnTP.js → main-D6ItQIYj.js} +1 -1
  50. package/dist/browser/{mobx-Cnc_mxKS.js → mobx-Deoo_wpx.js} +4 -4
  51. package/dist/browser/{particles.min-Bdddyoyn.js → particles.min-BNwqgit-.js} +2 -2
  52. package/dist/browser/{prop-types-D9saedjy.js → prop-types-CuEYshV7.js} +2 -2
  53. package/dist/browser/{react-CtAjLpE4.js → react-BMPhuMz9.js} +2 -2
  54. package/dist/browser/{react-dom-9Z9grXEI.js → react-dom-DSdkXj0b.js} +3 -3
  55. package/dist/browser/{reset-all-settings-D2rGLtD9.js → reset-all-settings-C2yTiJ1V.js} +7 -7
  56. package/dist/browser/{rolldown-runtime-6HCGHF5o.js → rolldown-runtime-I1EwXf_t.js} +1 -1
  57. package/dist/browser/{settings-r2jCygEX.js → settings-Dr8bs0FB.js} +2 -2
  58. package/dist/browser/{settings-item-CmuDoi0N.js → settings-item-DjfyQTQB.js} +6 -6
  59. package/dist/browser/{store-hsXE5nII.js → store-CVdrQCza.js} +6737 -5892
  60. package/dist/browser/{string-editor-UncyEsWj.js → string-editor-3sN4j-ci.js} +7 -7
  61. package/dist/browser/{theme-DmuulesT.js → theme-BSTLt6eV.js} +8 -8
  62. package/dist/browser/{ui-CBeseOX-.js → ui-CiFfwrN8.js} +8 -8
  63. package/dist/browser/{useRenderTarget-C5lcypnV.js → useRenderTarget-DF7LdnYr.js} +4 -4
  64. package/dist/esm/components/Map/Map.js +1 -1
  65. package/dist/esm/components/Maplibre/MaplibreAdapter.js +1 -1
  66. package/dist/esm/components/Maplibre/useWayfindingAndMarkers.js +1 -1
  67. package/dist/esm/data/Flags.d.ts +8 -0
  68. package/dist/esm/store/RouteStore.d.ts +1 -2
  69. package/dist/esm/store/RouteStore.js +1 -1
  70. package/dist/esm/wayfinding/adapters/canvasIconProvider.d.ts +1 -1
  71. package/dist/esm/wayfinding/adapters/canvasIconProvider.js +1 -1
  72. package/dist/esm/wayfinding/adapters/graphDataSource.d.ts +2 -1
  73. package/dist/esm/wayfinding/adapters/graphDataSource.js +1 -1
  74. package/dist/esm/wayfinding/adapters/index.d.ts +3 -4
  75. package/dist/esm/wayfinding/adapters/index.js +1 -1
  76. package/dist/esm/wayfinding/bindMobxReactions.d.ts +6 -0
  77. package/dist/esm/wayfinding/bindMobxReactions.js +1 -1
  78. package/dist/esm/wayfinding/core/__tests__/helpers.d.ts +4 -4
  79. package/dist/esm/wayfinding/core/createWayfindingEngine.js +1 -1
  80. package/dist/esm/wayfinding/core/graph/buildGraph.d.ts +1 -1
  81. package/dist/esm/wayfinding/core/graph/buildNGraph.d.ts +2 -2
  82. package/dist/esm/wayfinding/core/graph/findShortestPath.d.ts +2 -2
  83. package/dist/esm/wayfinding/core/graph/graphHelpers.d.ts +4 -4
  84. package/dist/esm/wayfinding/core/graph/graphHelpers.js +1 -1
  85. package/dist/esm/wayfinding/core/graph/linkCost.d.ts +2 -2
  86. package/dist/esm/wayfinding/core/index.d.ts +8 -8
  87. package/dist/esm/wayfinding/core/index.js +1 -1
  88. package/dist/esm/wayfinding/core/position/gpsThreshold.d.ts +2 -2
  89. package/dist/esm/wayfinding/core/routing/getRouteLength.d.ts +1 -1
  90. package/dist/esm/wayfinding/core/types.d.ts +19 -9
  91. package/dist/esm/wayfinding/createWayfinding.d.ts +15 -1
  92. package/dist/esm/wayfinding/createWayfinding.js +1 -1
  93. package/dist/esm/wayfinding/handlers/yahHandler.d.ts +3 -3
  94. package/dist/esm/wayfinding/handlers/yahHandler.js +1 -1
  95. package/dist/esm/wayfinding/index.d.ts +13 -0
  96. package/dist/esm/wayfinding/index.js +1 -0
  97. package/dist/esm/wayfinding/renderer/createWayfindingRenderer.js +1 -1
  98. package/dist/esm/wayfinding/renderer/iconManager.d.ts +3 -3
  99. package/dist/esm/wayfinding/renderer/routeLineManager.d.ts +5 -5
  100. package/dist/esm/wayfinding/renderer/trailManager.d.ts +2 -2
  101. package/dist/esm/wayfinding/runtime/createWayfindingRuntime.js +1 -1
  102. package/dist/esm/wayfinding/runtime/endpointView.d.ts +1 -2
  103. package/dist/esm/wayfinding/runtime/positionTrailView.d.ts +5 -6
  104. package/dist/esm/wayfinding/runtime/positionView.d.ts +2 -3
  105. package/dist/esm/wayfinding/runtime/routeUpdate.d.ts +3 -3
  106. package/dist/esm/wayfinding/runtime/trailView.d.ts +1 -2
  107. package/dist/esm/wayfinding/runtime/transitionView.d.ts +2 -3
  108. package/dist/esm/wayfinding/runtime/types.d.ts +10 -2
  109. package/package.json +4 -4
  110. package/dist/browser/ShowKiosk-B33TvvNh.js +0 -28
  111. package/dist/browser/createWayfinding-CywBuuhE.js +0 -1892
  112. package/dist/esm/wayfinding/adapters/iconProvider.d.ts +0 -15
  113. package/dist/esm/wayfinding/adapters/iconProvider.js +0 -1
@@ -7,18 +7,28 @@ export interface RoutePoint {
7
7
  readonly y: number;
8
8
  readonly layer: string;
9
9
  }
10
+ /**
11
+ * A computed route segment — the public output of routing, consumed by the
12
+ * runtime and rendering. Carries only what consumers read; graph-build
13
+ * properties (direction, cost) live on {@link GraphLine}, not here.
14
+ */
10
15
  export interface RouteLine {
11
16
  readonly p0: RoutePoint;
12
17
  readonly p1: RoutePoint;
13
- /**
14
- * Internal graph properties from external wayfinding data (wf.data.js).
15
- * Temporarily public because config-wf.ts and RouteStore read RouteLine directly.
16
- * After Phase 7 (WayfindingRuntime), consumers will receive filtered data
17
- * through RenderPort/WayfindingStore and these fields will become internal.
18
- */
18
+ /** Virtual (floor-transition) link rather than a physical path segment. */
19
+ readonly virtual: boolean;
20
+ }
21
+ /**
22
+ * A source graph line from external wayfinding data (wf.data.js) — the input to
23
+ * graph building. Extends {@link RouteLine} with build-only properties
24
+ * (accessibility, direction, cost) that never reach a computed route.
25
+ */
26
+ export interface GraphLine extends RouteLine {
27
+ /** Flagged inaccessible in source data: graph-build filter + the venue accessible toggle. */
19
28
  readonly unaccessible: boolean;
29
+ /** One-way link: in oriented mode no reverse edge is added. */
20
30
  readonly unidirection: boolean;
21
- readonly virtual: boolean;
31
+ /** Link weight for cost (`0` = unset → `DEFAULT_LINE_WEIGHT`). */
22
32
  readonly weight: number;
23
33
  /**
24
34
  * Optional custom cost for virtual (floor-transition) links, configured
@@ -40,12 +50,12 @@ export interface PathFinderOptions {
40
50
  readonly onlyAccessible: boolean;
41
51
  }
42
52
  export interface PathFinder {
43
- build(lines: RouteLine[], options: PathFinderOptions): void;
53
+ build(lines: GraphLine[], options: PathFinderOptions): void;
44
54
  find(fromId: string, toId: string): PathNode[];
45
55
  hasNode(id: string): boolean;
46
56
  }
47
57
  export interface GraphDataSource {
48
- getLines(): RouteLine[];
58
+ getLines(): GraphLine[];
49
59
  getLineEnds(): RoutePoint[];
50
60
  }
51
61
  export interface GraphInstance {
@@ -1,3 +1,17 @@
1
1
  import type { RendererService } from '../renderer';
2
- export declare function createWayfinding(rendererService: RendererService): () => void;
2
+ import type RootStore from '../store/RootStore';
3
+ import { type Route, type RouteEndpoint } from './core';
4
+ /** Whether `createWayfinding` has run and not yet been disposed. */
5
+ export declare function isWayfindingReady(): boolean;
6
+ /**
7
+ * Build a route between two endpoints. Throws if wayfinding is not initialized.
8
+ *
9
+ * TODO: compromise for the public SDK (`RouteStore.checkRoutes` diagnostic). Ad-hoc
10
+ * route building should not be a public capability — routing belongs to the runtime.
11
+ * Remove once the SDK surface no longer needs standalone route checks.
12
+ */
13
+ export declare function buildRoute(from: RouteEndpoint, to: RouteEndpoint, options?: {
14
+ accessible?: boolean;
15
+ }): Route;
16
+ export declare function createWayfinding(rendererService: RendererService, store: RootStore): () => void;
3
17
  //# sourceMappingURL=createWayfinding.d.ts.map
@@ -1 +1 @@
1
- import{fpGeo as i}from"../data/fpGeo";import o,{layersStore as n,uiState as l}from"../store";import{createCanvasIconProvider as g,createFloorContext as h,graphDataSource as T}from"./adapters";import{bindMobxReactions as A}from"./bindMobxReactions";import{SNAP_THRESHOLD_METERS as y,createWayfindingEngine as M,getThresholdFromMetersToSvg as N,getThresholdSafe as I,resolveRerouteThresholdSvg as L}from"./core";import{createKioskHandler as v}from"./handlers/kioskHandler";import{createYahHandler as W}from"./handlers/yahHandler";import{WF_CURRENT_POSITION_LAYER_NAME as x,WF_LINES_ANIMATED_LAYER_NAME as F,WF_LINES_LAYER_NAME as P,WF_POINTS_LAYER_NAME as k,WF_TRAIL_LAYER_NAME as C}from"./layers";import{createWayfindingRuntime as H}from"./runtime/createWayfindingRuntime";import{createWayfindingRenderer as Y}from"./renderer";export function createWayfinding(d){const f=M(T),s=g({iconMap:o.fp.icons,pixelRatio:devicePixelRatio}),r=Y(d),a=h(n,o.routeStore),t={points:k,trail:C,lines:P,linesAnimated:F,currentPosition:x},m=I(i?.properties?.config?.snapThreshold)||y,u=N({thresholdInMeters:m,gpsConfig:i?.properties?.config}),c=H({engine:f,renderer:r,iconProvider:s,floorContext:a,layers:t,snapThreshold:u,onTransitionClick:e=>{e.role==="exit"&&n.updateVisibility(e.targetLayer,!0)},onRouteUpdate:(e,p)=>{o.routeStore.updateRoute(e),p.isEmpty()||(l.moveToRect=p)},onRouteDistance:e=>o.routeStore.updateRouteDistance(e)}),R=v({renderer:r,kioskIconMap:o.fp.icons,layer:t.points}),S=W({renderer:r,iconProvider:s,floorContext:a,layer:t.points}),E=L(i?.properties?.config),_=A({runtime:c,kioskHandler:R,yahHandler:S,stores:{routeStore:o.routeStore,uiState:l,layerStore:n},rerouteThresholdSvg:E});return r.flush(),()=>{_(),c.destroy()}}
1
+ import{fpGeo as c}from"../data/fpGeo";import{createCanvasIconProvider as E,createFloorContext as _,createGraphDataSource as A}from"./adapters";import{bindMobxReactions as T}from"./bindMobxReactions";import{createWayfindingEngine as W,getThresholdFromMetersToSvg as M,getThresholdSafe as N,resolveRerouteThresholdSvg as v,SNAP_THRESHOLD_METERS as x}from"./core";import{createKioskHandler as L}from"./handlers/kioskHandler";import{createYahHandler as I}from"./handlers/yahHandler";import{WF_CURRENT_POSITION_LAYER_NAME as P,WF_LINES_ANIMATED_LAYER_NAME as b,WF_LINES_LAYER_NAME as F,WF_POINTS_LAYER_NAME as k,WF_TRAIL_LAYER_NAME as C}from"./layers";import{createWayfindingRenderer as H}from"./renderer";import{createWayfindingRuntime as Y}from"./runtime/createWayfindingRuntime";let t=null;export function isWayfindingReady(){return t!==null}function w(){if(!t)throw new Error("Wayfinding is not initialized \u2014 call createWayfinding() first.");return t}export function buildRoute(n,e,i){return w().engine.buildRoute(n,e,i)}export function createWayfinding(n,e){const i=A(),s=W(i),p=E({iconMap:e.fp.icons,pixelRatio:devicePixelRatio}),r=H(n),l=_(e.layerStore,e.routeStore),a={points:k,trail:C,lines:F,linesAnimated:b,currentPosition:P},R=N(c?.properties?.config?.snapThreshold)||x,S=M({thresholdInMeters:R,gpsConfig:c?.properties?.config}),u=Y({engine:s,renderer:r,iconProvider:p,floorContext:l,layers:a,snapThreshold:S,onTransitionClick:o=>{o.role==="exit"&&e.layerStore.updateVisibility(o.targetLayer,!0)},onRouteUpdate:(o,d)=>{e.routeStore.updateRoute(o),d.isEmpty()||(e.uiState.moveToRect=d)},onRouteDistance:o=>e.routeStore.updateRouteDistance(o)}),g=L({renderer:r,kioskIconMap:e.fp.icons,layer:a.points}),m=I({renderer:r,iconMap:e.fp.icons,pixelRatio:devicePixelRatio,floorContext:l,layer:a.points}),y=v(c?.properties?.config),h=T({runtime:u,kioskHandler:g,yahHandler:m,stores:{routeStore:e.routeStore,uiState:e.uiState,layerStore:e.layerStore},rerouteThresholdSvg:y});e.routeStore.showAccessible=i.getLines().some(o=>o.unaccessible);const f={engine:s};return t=f,r.flush(),()=>{t===f&&(t=null,e.routeStore.showAccessible=!1),h(),u.destroy()}}
@@ -1,4 +1,3 @@
1
- import { type IconProvider } from '../adapters';
2
1
  import { type WayfindingRenderer } from '../renderer';
3
2
  import { type FloorContext } from '../runtime/types';
4
3
  /**
@@ -14,9 +13,10 @@ export type YahHandler = (position: {
14
13
  readonly y: number;
15
14
  readonly layer: string;
16
15
  } | null) => void;
17
- export declare function createYahHandler({ renderer, iconProvider, floorContext, layer, }: {
16
+ export declare function createYahHandler({ renderer, iconMap, pixelRatio, floorContext, layer, }: {
18
17
  renderer: WayfindingRenderer;
19
- iconProvider: IconProvider;
18
+ iconMap: Map<string, HTMLImageElement>;
19
+ pixelRatio: number;
20
20
  floorContext: FloorContext;
21
21
  layer: string;
22
22
  }): YahHandler;
@@ -1 +1 @@
1
- const t="yah";export function createYahHandler({renderer:a,iconProvider:n,floorContext:s,layer:e}){return c=>{if(!c){a.setIcon("yah",null),a.flush();return}const l=s.isLayerVisible(c.layer);a.setIcon("yah",{canvas:n.getIcon("yah").canvas,layer:e,x:c.x,y:c.y,hidden:!l,dimmed:!l,origin:[.5,1]}),a.flush()}}
1
+ import{createImageCanvas as f,createYahCanvas as l}from"../../components/Map/drawing/config/canvases";import{decreaseByPercentage as o}from"../../utils/math";const c="yah",u="#ff4343",A=64,C=90,_=32;function E(a,e){const n=a.get(c);return n?(n.id=c,f(n,o(A,_),o(C,_),e)):l(e,u)}export function createYahHandler({renderer:a,iconMap:e,pixelRatio:n,floorContext:i,layer:I}){const s=E(e,n);return s.id="current-location-2",t=>{if(!t){a.setIcon(c,null),a.flush();return}const r=i.isLayerVisible(t.layer);a.setIcon(c,{canvas:s,layer:I,x:t.x,y:t.y,hidden:!r,dimmed:!r,origin:[.5,1]}),a.flush()}}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * efp-side wayfinding facade — the single entry the floorplan app imports from
3
+ * (stores, mount points). Re-exports the bootstrap (`createWayfinding`), the
4
+ * runtime facade (`buildRoute`/`isWayfindingReady`), the glue endpoint helpers,
5
+ * and the `RouteLine` type.
6
+ *
7
+ * When `core`/`runtime`/`renderer` move into `@expofp/wayfinding`, this file
8
+ * stays on the efp side and re-points the type exports at the package.
9
+ */
10
+ export { boothToEndpoint, CURRENT_LOCATION_NAME, CURRENT_POSITION_POINT_ID, KIOSK_ANCHOR_POINT_ID, toArbitraryPoint, } from './adapters';
11
+ export type { RouteLine } from './core';
12
+ export { buildRoute, createWayfinding, isWayfindingReady } from './createWayfinding';
13
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ export{boothToEndpoint,CURRENT_LOCATION_NAME,CURRENT_POSITION_POINT_ID,KIOSK_ANCHOR_POINT_ID,toArbitraryPoint}from"./adapters";export{buildRoute,createWayfinding,isWayfindingReady}from"./createWayfinding";
@@ -1 +1 @@
1
- import{createLayerManager as d}from"./layerManager";import{createIconManager as m}from"./iconManager";import{createTrailManager as f}from"./trailManager";import{createRouteLineManager as u}from"./routeLineManager";const v={passed:"#B5B7BC",remaining:"#A4CCE2",active:"#0794EA"};export function createWayfindingRenderer(r,i={}){const l={...v,...i.colors},n=d(r),e=m(n,r),t=f(n,r),o=u(n,r,l),a=r.renderer;if(!a)throw new Error("renderer: rendererService.renderer is null \u2014 start RendererService before constructing renderer");a.events.addEventListener("pointer:click",e.handleClick),a.events.addEventListener("pointer:move",e.handleHover);const c={setIcon:e.setIcon,clearIcons:e.clearIcons,setTrail:t.setTrail,setRouteLines:o.setRouteLines,clearRoute(){o.clearLines(),t.destroy(),e.hideAll()},flush:n.flush,destroy(){c.clearRoute();const s=r.renderer;s&&(s.events.removeEventListener("pointer:click",e.handleClick),s.events.removeEventListener("pointer:move",e.handleHover)),e.destroy(),t.destroy(),o.destroy(),n.destroy()}};return c}
1
+ import{createIconManager as d}from"./iconManager";import{createLayerManager as m}from"./layerManager";import{createRouteLineManager as f}from"./routeLineManager";import{createTrailManager as u}from"./trailManager";const v={passed:"#B5B7BC",remaining:"#A4CCE2",active:"#0794EA"};export function createWayfindingRenderer(r,i={}){const l={...v,...i.colors},n=m(r),e=d(n,r),t=u(n,r),o=f(n,r,l),a=r.renderer;if(!a)throw new Error("renderer: rendererService.renderer is null \u2014 start RendererService before constructing renderer");a.events.addEventListener("pointer:click",e.handleClick),a.events.addEventListener("pointer:move",e.handleHover);const c={setIcon:e.setIcon,clearIcons:e.clearIcons,setTrail:t.setTrail,setRouteLines:o.setRouteLines,clearRoute(){o.clearLines(),t.destroy(),e.hideAll()},flush:n.flush,destroy(){c.clearRoute();const s=r.renderer;s&&(s.events.removeEventListener("pointer:click",e.handleClick),s.events.removeEventListener("pointer:move",e.handleHover)),e.destroy(),t.destroy(),o.destroy(),n.destroy()}};return c}
@@ -1,7 +1,7 @@
1
1
  import type { MouseEventData } from '@expofp/renderer';
2
- import type { RendererService } from '../../renderer';
3
- import type { IconConfig } from './types';
2
+ import { type RendererService } from '../../renderer';
4
3
  import type { LayerManager } from './layerManager';
4
+ import type { IconConfig } from './types';
5
5
  /**
6
6
  * Manages `ImageDef` icons in the scene graph.
7
7
  *
@@ -13,7 +13,7 @@ export interface IconManager {
13
13
  /** Place, update, or hide an icon. See {@link WayfindingRenderer.setIcon}. */
14
14
  setIcon(name: string, config: IconConfig | null, key?: string | number): void;
15
15
  /** Hide all icons matching the given name(s). */
16
- clearIcons(names: string | ReadonlyArray<string>): void;
16
+ clearIcons(names: string | readonly string[]): void;
17
17
  /** Hide every managed icon (used by `clearRoute`). */
18
18
  hideAll(): void;
19
19
  /** Unregister all scale/roll handlers and clear internal state. */
@@ -1,12 +1,12 @@
1
- import type { RendererService } from '../../renderer';
2
- import type { RouteColors } from './types';
1
+ import { type RendererService } from '../../renderer';
3
2
  import type { LayerManager } from './layerManager';
3
+ import type { RouteColors } from './types';
4
4
  /**
5
5
  * Manages static route lines (passed + remaining) and an animated overlay
6
6
  * on the remaining segment.
7
7
  */
8
8
  export interface RouteLineManager {
9
- setRouteLines(passed: ReadonlyArray<{
9
+ setRouteLines(passed: readonly {
10
10
  readonly p0: {
11
11
  x: number;
12
12
  y: number;
@@ -15,7 +15,7 @@ export interface RouteLineManager {
15
15
  x: number;
16
16
  y: number;
17
17
  };
18
- }>, remaining: ReadonlyArray<{
18
+ }[], remaining: readonly {
19
19
  readonly p0: {
20
20
  x: number;
21
21
  y: number;
@@ -24,7 +24,7 @@ export interface RouteLineManager {
24
24
  x: number;
25
25
  y: number;
26
26
  };
27
- }>, options: {
27
+ }[], options: {
28
28
  readonly linesLayer: string;
29
29
  readonly animatedLinesLayer: string;
30
30
  readonly resetAnimation?: boolean;
@@ -1,6 +1,6 @@
1
- import type { RendererService } from '../../renderer';
2
- import type { Point } from './types';
1
+ import { type RendererService } from '../../renderer';
3
2
  import type { LayerManager } from './layerManager';
3
+ import type { Point } from './types';
4
4
  /**
5
5
  * Manages named trails of evenly-spaced dots between two points.
6
6
  *
@@ -1 +1 @@
1
- import{Box as C}from"@expofp/geometry";import{CURRENT_POSITION_POINT_ID as G}from"./positionView";import{getRouteLength as H,snapToRoute as J}from"../core";import{getRouteLines as K}from"./getRouteLines";import{createEndpointView as Q}from"./endpointView";import{createPositionTrailView as X}from"./positionTrailView";import{createRouteLinesView as Y}from"./routeLinesView";import{computeRouteRenderData as Z}from"./routeRenderData";import{computeRouteUpdate as $}from"./routeUpdate";import{createTrailView as D}from"./trailView";import{createTransitionView as x}from"./transitionView";const tt=A=>A.flatMap(e=>[e.p0,e.p1]);export function createWayfindingRuntime({engine:A,renderer:e,iconProvider:P,floorContext:c,layers:f,snapThreshold:E,onTransitionClick:B,onRouteUpdate:N,onRouteDistance:R}){const d=Q({renderer:e,iconProvider:P,floorContext:c,layer:f.points}),I=x({renderer:e,iconProvider:P,floorContext:c,onTransitionClick:B,layer:f.points}),M=D({renderer:e,iconProvider:P,floorContext:c,layer:f.trail}),l=X({renderer:e,iconProvider:P,floorContext:c,trails:M,iconLayer:f.currentPosition,snapThreshold:E}),O=Y({renderer:e,linesLayer:f.lines,animatedLinesLayer:f.linesAnimated});let u=[],o=null,r=null,s=null,p=0,y=!1,T=!1;function S(){return c.showAllFloors()?null:c.getActiveFloor()}function _(){const t=S();return t===null?u.filter(n=>!n.virtual):u.filter(n=>n.p0.layer===t&&!n.virtual)}function V(){if(!o||!r)return null;const t=_();return t.length?{from:o,to:r,routePoints:tt(t),visibleLines:t}:null}function m(t=null,n=!1){if(!o||!r)return;const i=Z({routeLines:u,currentRouteLayer:S(),from:o,to:r,snap:t});O.draw(i,n),p=i.distance}function g(t){const n=V();if(!n){l.setTrail(null,null);return}const i=s&&t&&!t.snapped?s:null,h=a=>a.bounds?.length?null:a.id===G?i:a,L=y?null:h(n.from);if(L){l.setTrail(n.routePoints[n.routePoints.length-1],L);return}const b=h(n.to);l.setTrail(b?n.routePoints[0]:null,b)}function U(){if(!o||!r)return;const t=V();if(!t){d.hide(),I.clear(),l.clearTrail(),m();return}d.place(o,r,t.routePoints,T),I.place(u),m(),g(null)}function w(){if(!o||!r)return;const t=V();t&&d.place(o,r,t.routePoints,T)}function F(){if(T=!1,!s||!o||!r)return null;const t=u.filter(h=>!h.virtual);if(!t.length)return null;const n=V(),i=n?l.applyToRoute(s,n,t):J(s,t,{snapThreshold:E,from:o,to:r});return i.snapped&&(y=!0),T=i.snapped,i}function k(){const t=$(u,_());return N(t.lines,t.bounds),t}function W({from:t,to:n,waypoints:i,accessible:h}){const L=K({engine:A,from:t,to:n,waypoints:i,accessible:h});if(!L.length)return v(),!1;y=!1,o=t,r=n,u=L,U();const{lines:b}=k(),a=F();return w(),g(a),a&&m(a,!0),R(a?p:H(b)),e.flush(),!0}function j(t){const n=s!==null;if(s=t,!t){T=!1,l.hideIcon(),g(null),n&&w(),m(),R(p),e.flush();return}l.placeIcon(t);const i=F();w(),g(i),i&&m(i,!0),R(p),e.flush()}function q(){U();const t=F();w(),g(t),t&&m(t,!0),u.length&&k(),R(p),e.flush()}function v(){y=!1,u=[],o=null,r=null,p=0,d.hide(),I.clear(),l.clearTrail(),O.clear(),N([],new C),R(0),e.flush()}function z(){v(),s=null,e.destroy()}return{setRoute:W,onPositionChanged:j,onFloorChanged:q,clearRoute:v,destroy:z}}
1
+ import{Box as C}from"@expofp/geometry";import{getRouteLength as G,snapToRoute as H}from"../core";import{createEndpointView as J}from"./endpointView";import{getRouteLines as K}from"./getRouteLines";import{createPositionTrailView as Q}from"./positionTrailView";import{CURRENT_POSITION_POINT_ID as X}from"./positionView";import{createRouteLinesView as Y}from"./routeLinesView";import{computeRouteRenderData as Z}from"./routeRenderData";import{computeRouteUpdate as $}from"./routeUpdate";import{createTrailView as D}from"./trailView";import{createTransitionView as x}from"./transitionView";const tt=A=>A.flatMap(e=>[e.p0,e.p1]);export function createWayfindingRuntime({engine:A,renderer:e,iconProvider:P,floorContext:c,layers:f,snapThreshold:E,onTransitionClick:B,onRouteUpdate:N,onRouteDistance:R}){const d=J({renderer:e,iconProvider:P,floorContext:c,layer:f.points}),I=x({renderer:e,iconProvider:P,floorContext:c,onTransitionClick:B,layer:f.points}),M=D({renderer:e,iconProvider:P,floorContext:c,layer:f.trail}),l=Q({renderer:e,iconProvider:P,floorContext:c,trails:M,iconLayer:f.currentPosition,snapThreshold:E}),O=Y({renderer:e,linesLayer:f.lines,animatedLinesLayer:f.linesAnimated});let u=[],o=null,r=null,s=null,p=0,y=!1,T=!1;function S(){return c.showAllFloors()?null:c.getActiveFloor()}function _(){const t=S();return t===null?u.filter(n=>!n.virtual):u.filter(n=>n.p0.layer===t&&!n.virtual)}function V(){if(!o||!r)return null;const t=_();return t.length?{from:o,to:r,routePoints:tt(t),visibleLines:t}:null}function m(t=null,n=!1){if(!o||!r)return;const i=Z({routeLines:u,currentRouteLayer:S(),from:o,to:r,snap:t});O.draw(i,n),p=i.distance}function g(t){const n=V();if(!n){l.setTrail(null,null);return}const i=s&&t&&!t.snapped?s:null,h=a=>a.bounds?.length?null:a.id===X?i:a,L=y?null:h(n.from);if(L){l.setTrail(n.routePoints[n.routePoints.length-1],L);return}const b=h(n.to);l.setTrail(b?n.routePoints[0]:null,b)}function U(){if(!o||!r)return;const t=V();if(!t){d.hide(),I.clear(),l.clearTrail(),m();return}d.place(o,r,t.routePoints,T),I.place(u),m(),g(null)}function w(){if(!o||!r)return;const t=V();t&&d.place(o,r,t.routePoints,T)}function F(){if(T=!1,!s||!o||!r)return null;const t=u.filter(h=>!h.virtual);if(!t.length)return null;const n=V(),i=n?l.applyToRoute(s,n,t):H(s,t,{snapThreshold:E,from:o,to:r});return i.snapped&&(y=!0),T=i.snapped,i}function k(){const t=$(u,_());return N(t.lines,t.bounds),t}function W({from:t,to:n,waypoints:i,accessible:h}){const L=K({engine:A,from:t,to:n,waypoints:i,accessible:h});if(!L.length)return v(),!1;y=!1,o=t,r=n,u=L,U();const{lines:b}=k(),a=F();return w(),g(a),a&&m(a,!0),R(a?p:G(b)),e.flush(),!0}function j(t){const n=s!==null;if(s=t,!t){T=!1,l.hideIcon(),g(null),n&&w(),m(),R(p),e.flush();return}l.placeIcon(t);const i=F();w(),g(i),i&&m(i,!0),R(p),e.flush()}function q(){U();const t=F();w(),g(t),t&&m(t,!0),u.length&&k(),R(p),e.flush()}function v(){y=!1,u=[],o=null,r=null,p=0,d.hide(),I.clear(),l.clearTrail(),O.clear(),N([],new C),R(0),e.flush()}function z(){v(),s=null,e.destroy()}return{setRoute:W,onPositionChanged:j,onFloorChanged:q,clearRoute:v,destroy:z}}
@@ -1,7 +1,6 @@
1
- import { type IconProvider } from '../adapters';
2
1
  import { type RouteEndpoint, type RoutePoint } from '../core';
3
2
  import { type WayfindingRenderer } from '../renderer';
4
- import { type FloorContext } from './types';
3
+ import { type FloorContext, type IconProvider } from './types';
5
4
  interface EndpointView {
6
5
  /** Place source/destination icons. `snapped` — the live CP is currently on the route, so its
7
6
  * source shows greyed-out. A kiosk anchor (off-graph origin that isn't the CP) stays hidden;
@@ -1,8 +1,7 @@
1
- import type { IconProvider } from '../adapters';
2
- import type { RouteEndpoint, RouteLine, RoutePoint, RouteSnapResult } from '../core';
1
+ import { type RouteEndpoint, type RouteLine, type RoutePoint, type RouteSnapResult } from '../core';
3
2
  import type { WayfindingRenderer } from '../renderer';
4
- import type { FloorContext, PositionInput } from './types';
5
3
  import type { TrailView } from './trailView';
4
+ import type { FloorContext, IconProvider, PositionInput } from './types';
6
5
  /**
7
6
  * Snapshot of the visible route the position-trail view operates on. The runtime computes it
8
7
  * (visibility filtering, route-points derivation) and passes it in so the view stays free of
@@ -11,8 +10,8 @@ import type { TrailView } from './trailView';
11
10
  export interface RouteSnapshot {
12
11
  readonly from: RouteEndpoint;
13
12
  readonly to: RouteEndpoint;
14
- readonly routePoints: ReadonlyArray<RoutePoint>;
15
- readonly visibleLines: ReadonlyArray<RouteLine>;
13
+ readonly routePoints: readonly RoutePoint[];
14
+ readonly visibleLines: readonly RouteLine[];
16
15
  }
17
16
  /**
18
17
  * Owns the user-position icon and the single off-graph trail slot. The runtime decides which end of
@@ -32,7 +31,7 @@ interface PositionTrailView {
32
31
  * `routeLines` is decoupled from `route.visibleLines` so the snap stays correct regardless of
33
32
  * which floor is currently selected in the UI.
34
33
  */
35
- applyToRoute(position: PositionInput, route: RouteSnapshot, routeLines: ReadonlyArray<RouteLine>): RouteSnapResult;
34
+ applyToRoute(position: PositionInput, route: RouteSnapshot, routeLines: readonly RouteLine[]): RouteSnapResult;
36
35
  /** Draw the trail from `tip` (a route's graph endpoint) to `anchor` (the off-graph point).
37
36
  * Passing either as null hides the trail. */
38
37
  setTrail(tip: RoutePoint | null, anchor: RoutePoint | null): void;
@@ -1,6 +1,5 @@
1
- import type { IconProvider } from '../adapters';
2
- import type { WayfindingRenderer } from '../renderer';
3
- import type { PositionInput } from './types';
1
+ import { type WayfindingRenderer } from '../renderer';
2
+ import { type IconProvider, type PositionInput } from './types';
4
3
  export declare const CURRENT_POSITION_POINT_ID = "current-position";
5
4
  interface PositionView {
6
5
  /**
@@ -1,5 +1,5 @@
1
- import type { RouteLine } from '../core';
2
- import { Box } from '@expofp/geometry';
1
+ import { type Box } from '@expofp/geometry';
2
+ import { type RouteLine } from '../core';
3
3
  /**
4
4
  * Compute the payload for the runtime's `onRouteUpdate` callback:
5
5
  * - `lines`: route lines as the consumer sees them — virtual graph-internal
@@ -8,7 +8,7 @@ import { Box } from '@expofp/geometry';
8
8
  * (`bounds.isEmpty()`) when the route is empty or collapses to a single point
9
9
  * (no useful viewport to fit); consumers check `isEmpty()` rather than null.
10
10
  */
11
- export declare function computeRouteUpdate(routeLines: ReadonlyArray<RouteLine>, visibleLines: ReadonlyArray<RouteLine>): {
11
+ export declare function computeRouteUpdate(routeLines: readonly RouteLine[], visibleLines: readonly RouteLine[]): {
12
12
  lines: RouteLine[];
13
13
  bounds: Box;
14
14
  };
@@ -1,7 +1,6 @@
1
- import { type IconProvider } from '../adapters';
2
1
  import { type RoutePoint } from '../core';
3
2
  import { type WayfindingRenderer } from '../renderer';
4
- import { type FloorContext } from './types';
3
+ import { type FloorContext, type IconProvider } from './types';
5
4
  /**
6
5
  * Callers choose the slot name and provide two route-points; the view draws a dotted trail between them (or hides
7
6
  * them if the layers are not on the active floor)
@@ -1,7 +1,6 @@
1
- import type { IconProvider } from '../adapters';
2
- import type { RouteLine, TransitionPointDef } from '../core';
1
+ import { type RouteLine, type TransitionPointDef } from '../core';
3
2
  import type { WayfindingRenderer } from '../renderer';
4
- import type { FloorContext } from './types';
3
+ import type { FloorContext, IconProvider } from './types';
5
4
  interface TransitionView {
6
5
  /** Recomputes transition points from route lines + floor context and places their icons. */
7
6
  place(routeLines: RouteLine[]): void;
@@ -1,7 +1,15 @@
1
1
  import type { Box } from '@expofp/geometry';
2
2
  import type { RouteEndpoint, RouteLine, TransitionPointDef, WayfindingEngine } from '../core';
3
3
  import type { WayfindingRenderer } from '../renderer';
4
- import type { IconProvider } from '../adapters';
4
+ export type IconName = 'source' | 'source_inactive' | 'destination' | 'current' | 'current_arrow' | 'transition' | 'transition_up' | 'transition_down' | 'transition_entry' | 'trail';
5
+ export interface IconAsset {
6
+ readonly canvas: HTMLCanvasElement;
7
+ readonly width: number;
8
+ readonly height: number;
9
+ }
10
+ export interface IconProvider {
11
+ getIcon(name: IconName): IconAsset;
12
+ }
5
13
  /** User position + optional heading, without efp store coupling. */
6
14
  export interface PositionInput {
7
15
  readonly x: number;
@@ -20,7 +28,7 @@ export interface LayerNames {
20
28
  export interface SetRouteInput {
21
29
  readonly from: RouteEndpoint;
22
30
  readonly to: RouteEndpoint;
23
- readonly waypoints?: ReadonlyArray<RouteEndpoint>;
31
+ readonly waypoints?: readonly RouteEndpoint[];
24
32
  readonly accessible: boolean;
25
33
  }
26
34
  export interface WayfindingRuntime {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@expofp/floorplan",
3
- "version": "3.9.0",
3
+ "version": "3.10.1",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/expofp/efp-app.git",
@@ -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.9.0",
76
- "@expofp/geometry": "3.9.0",
77
- "@expofp/resolve": "3.9.0"
75
+ "@expofp/debug": "3.10.1",
76
+ "@expofp/geometry": "3.10.1",
77
+ "@expofp/resolve": "3.10.1"
78
78
  },
79
79
  "devDependencies": {
80
80
  "@babel/plugin-proposal-decorators": "^8.0.2",
@@ -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.9.0" };
5
- var t = new e.Error().stack;
6
- t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "6d17f9c3-15f0-4e0a-bcd4-f8ac25d1ed0d", e._sentryDebugIdIdentifier = "sentry-dbid-6d17f9c3-15f0-4e0a-bcd4-f8ac25d1ed0d");
7
- } catch {}
8
- })();
9
- import "./rolldown-runtime-6HCGHF5o.js";
10
- import { t as e } from "./react-CtAjLpE4.js";
11
- import { t } from "./jsx-runtime-3_7049j-.js";
12
- import "./i18n-CJxFIIru.js";
13
- import { t as n } from "./index.module-CkT4oOvs.js";
14
- import { ct as r, lt as i, o as a } from "./store-hsXE5nII.js";
15
- import { n as o } from "./mobx-Cnc_mxKS.js";
16
- import { t as s } from "./KioskStore-rXGF6ISj.js";
17
- import { t as c } from "./TouchHand-BglJHdqZ.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), i(e), s.resetCamera(), a.setResetCameraFn(() => s.resetCamera()), () => {
24
- a.uiState.setKioskData(null), a.uiState.resetMapSettings();
25
- };
26
- }), a.uiState.kiosk && a.uiState.inIdle ? /* @__PURE__ */ (0, l.jsx)(c, {}) : null));
27
- //#endregion
28
- export { u as default };