@expofp/floorplan 3.44.3 → 3.44.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. package/dist/browser/{Button-CNVBhsa-.js → Button-F_XLD8Fy.js} +5 -5
  2. package/dist/browser/{CookieConsent-Dxv1Wsat.js → CookieConsent-DZfbYufk.js} +7 -7
  3. package/dist/browser/{Debug-CFKoef7p.js → Debug-Bfe4H5gN.js} +7 -7
  4. package/dist/browser/{DebugTools-B8V3wXuK.js → DebugTools-D8ye4Kez.js} +6 -6
  5. package/dist/browser/{Demo-DM0A_1km.js → Demo-CuFsb-_M.js} +9 -9
  6. package/dist/browser/{Free-CzO-mFfd.js → Free-C0Nk9qPr.js} +10 -10
  7. package/dist/browser/{GalleryContainer-CbEnMCVB.js → GalleryContainer-CyAGAg4x.js} +11 -11
  8. package/dist/browser/{GpsLoader-CVbPQRMb.js → GpsLoader-CoB3sRdS.js} +14 -14
  9. package/dist/browser/{KioskStore-CwqXi5BX.js → KioskStore-CFuPEGt0.js} +10 -10
  10. package/dist/browser/{LayerStore-Zb7qIu0z.js → LayerStore-CoevODUO.js} +3164 -3107
  11. package/dist/browser/{MaplibreAdapter-CpqKTkaf.js → MaplibreAdapter-Cu_LsCXF.js} +647 -645
  12. package/dist/browser/{ModalContainer-DXJrM1Bp.js → ModalContainer-My0C_xoz.js} +10 -10
  13. package/dist/browser/{PermissionNotice-DDKii54V.js → PermissionNotice-BOGBP1GX.js} +6 -6
  14. package/dist/browser/{RouteStore-hvwT2i2u.js → RouteStore-Dm2o_5F2.js} +143 -143
  15. package/dist/browser/{SetKioskMode-BwmKtUXS.js → SetKioskMode-DPCRqozK.js} +12 -12
  16. package/dist/browser/{ShowKiosk-BRG5YHbS.js → ShowKiosk-DrNye8Aa.js} +11 -11
  17. package/dist/browser/{UIState-CE6LgRm0.js → UIState-BQFpVx6u.js} +81 -81
  18. package/dist/browser/{ViewerMenuPanel-mc608c2h.js → ViewerMenuPanel-CR4YhVRV.js} +11 -11
  19. package/dist/browser/{add-debug-secret-listener-BK7p-z9L.js → add-debug-secret-listener-ujLceXxU.js} +1 -1
  20. package/dist/browser/{adopt-global-settings-CRMYLGuM.js → adopt-global-settings-CN0GZTt5.js} +9 -9
  21. package/dist/browser/{boolean-editor-C-3p4K-F.js → boolean-editor-Ceq6Etwz.js} +9 -9
  22. package/dist/browser/{bootIntercom-Db2ZY2IP.js → bootIntercom-B1uR7uMB.js} +2 -2
  23. package/dist/browser/bundle.json +85 -85
  24. package/dist/browser/{camera-events-R9lBN0gH.js → camera-events-CvNcBo4O.js} +1 -1
  25. package/dist/browser/{classnames-BbFWiHL5.js → classnames-CrsP-Ebw.js} +2 -2
  26. package/dist/browser/{client-BEMnZXAF.js → client-BHrMhFVE.js} +5 -5
  27. package/dist/browser/{components-DliPPf5t.js → components-BqCyp8zM.js} +152 -152
  28. package/dist/browser/{create-live-plan-DAzphLxx.js → create-live-plan-CvZGo-XN.js} +77 -77
  29. package/dist/browser/{debug-context-CvwXOlAn.js → debug-context-i7l7Gx3K.js} +5 -5
  30. package/dist/browser/{debug-overlay-C4EOfo6K.js → debug-overlay-CRW_rbNG.js} +10 -10
  31. package/dist/browser/{debug-ui-C4ij0VwK.js → debug-ui-3YKCQhko.js} +6 -6
  32. package/dist/browser/{dimming-DDbaTusx.js → dimming-Dvu1pvil.js} +287 -287
  33. package/dist/browser/{dist-7WIWetl1.js → dist-Cle-ua_T.js} +3 -3
  34. package/dist/browser/{dist-Bec_HPvI.js → dist-DkwknQXP.js} +5 -5
  35. package/dist/browser/{dist-YzxDC-l3.js → dist-uDlhOKs3.js} +6 -6
  36. package/dist/browser/{efp-debug-init-DcPbyNJ4.js → efp-debug-init-BYeJPe2d.js} +3 -3
  37. package/dist/browser/{enum-editor-D7bIWtJ_.js → enum-editor-B_FawgZE.js} +4 -4
  38. package/dist/browser/{es5-BrgEa0Fa.js → es5-Dbukoinx.js} +2 -2
  39. package/dist/browser/{event-head-z1FHiOEx.js → event-head-D6VrYuEF.js} +1 -1
  40. package/dist/browser/{event-not-found-CmEMYoWH.js → event-not-found-BDz3WPij.js} +3 -3
  41. package/dist/browser/{event-scoped-cache-BYrRCtdG.js → event-scoped-cache-e6nGR3aQ.js} +2 -2
  42. package/dist/browser/{expofpUrl-CEUejCEN.js → expofpUrl-B0MZmxoe.js} +1 -1
  43. package/dist/browser/{exports-DKQt5QYX.js → exports-DEZevwDn.js} +1 -1
  44. package/dist/browser/{favicon-hXbIh_yH.js → favicon-u31TeYa4.js} +1 -1
  45. package/dist/browser/{fetch-retry.umd-CLXaW0xF.js → fetch-retry.umd-Cn-1aORd.js} +2 -2
  46. package/dist/browser/{flex-KPw9gVGD.js → flex-cYeXiUeX.js} +5 -5
  47. package/dist/browser/{floorplan.loader-D93gRJBq.js → floorplan.loader-DQ33Y83e.js} +12 -12
  48. package/dist/browser/{floorplan.ready-BNLEOdiv.js → floorplan.ready-DzJBQvVZ.js} +43 -43
  49. package/dist/browser/{freeBanner-oymjDdPI.js → freeBanner-DIcnNW6x.js} +2 -2
  50. package/dist/browser/{fuse-BFSl1xAm.js → fuse-ZGglAVb9.js} +2 -2
  51. package/dist/browser/{i18n-rk8cQWa3.js → i18n-DkibBSFF.js} +6 -6
  52. package/dist/browser/index.js +17 -17
  53. package/dist/browser/{index.module-CSdtATMD.js → index.module-BP-TB38-.js} +4 -4
  54. package/dist/browser/{init-ui-lJmr6-g1.js → init-ui-DwX0YEOm.js} +15 -15
  55. package/dist/browser/{integrateKiosk-CRw9kkw3.js → integrateKiosk-Di2HTJ8S.js} +6 -6
  56. package/dist/browser/{is-debug-BmKkiaOm.js → is-debug-DH7N8jQh.js} +4 -4
  57. package/dist/browser/{is-own-domain-WyB1g8Cb.js → is-own-domain-CE5Nyu9G.js} +1 -1
  58. package/dist/browser/{is-webview-zrRx507t.js → is-webview-BCZ5IIAQ.js} +1 -1
  59. package/dist/browser/{jsx-runtime-D9gYD2sV.js → jsx-runtime-DRF-BLHf.js} +2 -2
  60. package/dist/browser/{kiosk-mode-BpbUrRKq.js → kiosk-mode-AIiDx_CP.js} +5 -5
  61. package/dist/browser/{kiosk-record-B3e1fovJ.js → kiosk-record-DjdRCsw4.js} +1 -1
  62. package/dist/browser/{kioskApi-D_uzTtqk.js → kioskApi-CvKNO-wZ.js} +7 -7
  63. package/dist/browser/{lib-B3FA8Hoq.js → lib-D51yHChz.js} +3 -3
  64. package/dist/browser/{loadImage-BBg66Nnb.js → loadImage-mqrRnYPB.js} +1 -1
  65. package/dist/browser/{logDeviceInfo-WQQRX_vW.js → logDeviceInfo-BbgtT2xS.js} +9 -9
  66. package/dist/browser/{mobx-BvloKnDW.js → mobx-DzcgHXfh.js} +4 -4
  67. package/dist/browser/{mobx.module-CjTRKVWn.js → mobx.module-DXfPwJbY.js} +1 -1
  68. package/dist/browser/{optional-boolean-editor-CBiiGQUP.js → optional-boolean-editor-i9cNIguy.js} +3 -3
  69. package/dist/browser/{optional-enum-editor-BItRyjei.js → optional-enum-editor-OmCRikPm.js} +4 -4
  70. package/dist/browser/{optional-string-editor-B7jzDfQN.js → optional-string-editor-C5sw9XjO.js} +4 -4
  71. package/dist/browser/{particles.min-A7cunk1O.js → particles.min-Cj5RSf6H.js} +2 -2
  72. package/dist/browser/{react-DJbZe8VG.js → react-BU3jD5B2.js} +2 -2
  73. package/dist/browser/{react-dom-CF-AXfUm.js → react-dom-DJDMclnf.js} +3 -3
  74. package/dist/browser/{rolldown-runtime-BiG6A0mX.js → rolldown-runtime-CEvxUPK8.js} +1 -1
  75. package/dist/browser/{scene-CXn1c6mI.js → scene-B7RN58fT.js} +12 -12
  76. package/dist/browser/{scheduler-Dafdeh3M.js → scheduler-BZKT_e0-.js} +2 -2
  77. package/dist/browser/{select-BxjiQiLf.js → select-COMyfaY9.js} +10 -10
  78. package/dist/browser/{settings-BOBQS9z-.js → settings-Cg-yMbvI.js} +2 -2
  79. package/dist/browser/{settings-item-DUoTvDE-.js → settings-item-D1VQ8quC.js} +6 -6
  80. package/dist/browser/{store-D-LRnUif.js → store-XoxiSr-z.js} +2 -2
  81. package/dist/browser/{string-editor-DiDkcybB.js → string-editor-CWO5nIcD.js} +4 -4
  82. package/dist/browser/{text-field-CIc92NZ5.js → text-field-BqEB9Lpy.js} +5 -5
  83. package/dist/browser/{theme-0Xo52fpM.js → theme-Drd2jIAq.js} +8 -8
  84. package/dist/browser/{ui-D9VGB23k.js → ui-Bg4NEUSa.js} +8 -8
  85. package/dist/browser/{useRenderTarget-DZ5XMBlN.js → useRenderTarget-Bqxwvxh1.js} +4 -4
  86. package/dist/browser/{viewport-DBg-6DYR.js → viewport-BkMq7yU7.js} +3 -3
  87. package/dist/browser/{wayfinding-B87Zv5e1.js → wayfinding-BvV-kzMQ.js} +411 -411
  88. package/dist/esm/components/Map/drawing/config/canvases.d.ts +0 -9
  89. package/dist/esm/components/Map/drawing/config/canvases.js +1 -1
  90. package/dist/esm/components/Map/drawing/config/config-outdoor-poi.js +1 -1
  91. package/dist/esm/components/Map/drawing/config/poi-pin-shape.d.ts +100 -0
  92. package/dist/esm/components/Map/drawing/config/poi-pin-shape.js +1 -0
  93. package/dist/esm/components/Map/drawing/config/poi-pin.d.ts +10 -0
  94. package/dist/esm/components/Map/drawing/config/poi-pin.js +1 -0
  95. package/dist/esm/components/Maplibre/usePoiMarkers.js +1 -1
  96. package/dist/esm/constants.d.ts +2 -2
  97. package/dist/esm/constants.js +1 -1
  98. package/package.json +10 -10
@@ -4,14 +4,5 @@ export declare function createTargetCanvas(pixelRatio: number, color?: string, s
4
4
  export declare function createArrowCurrentCanvas(pixelRatio: number, color?: string, scale?: number): HTMLCanvasElement;
5
5
  export declare function createYahCanvas(pixelRatio: number, color?: string, scale?: number): HTMLCanvasElement;
6
6
  export declare function createLabelCanvas(text: string, fontSize: number, pixelRatio: number, color: string | undefined, fontWeight: number, strokeStyle?: string, strokeWidth?: number): HTMLCanvasElement;
7
- /**
8
- * The category pin for one outdoor PoI: the poiType glyph knocked out in white
9
- * inside a pin filled with the booth's authored color. Returns `ImageData`
10
- * rather than a canvas — the only consumer is `map.addImage`, and a canvas per
11
- * PoI would stay resident for the session.
12
- */
13
- export declare function createPoiPinImage(image: HTMLImageElement | null, widthPx: number, pixelRatio: number, color: string): ImageData;
14
- /** The shared selection pinhead — one image serves every marker. */
15
- export declare function createPoiPinheadImage(size: number, pixelRatio: number, color: string): ImageData;
16
7
  export declare function getFont(px: number, weight?: number, style?: string): string;
17
8
  //# sourceMappingURL=canvases.d.ts.map
@@ -1 +1 @@
1
- import{FONT_FACE as z,FONT_WEIGHT_PRIMARY_BOOTH as d}from"../../../../constants";export function createImageCanvas(i,l,r,o,c=1,n){const e=i?i.width/i.height:1;let a=l*o*c,t=r*o*c;l/r>e?a=t*e:t=a/e;const u=document.createElement("canvas"),s=u.getContext("2d");return u.width=a,u.height=t,u.id=i.id,n==="horizontal"?(s.scale(-1,1),s.translate(-a,0)):n==="vertical"&&(s.scale(1,-1),s.translate(0,-t)),s.drawImage(i,0,0,a,t),u}export function createCurrentCanvas(i,l="#c8248b",r=i*.4,o,c,n,e="#000"){o=o||95,c=c||95;const a=document.createElement("canvas"),t=a.getContext("2d");a.width=o*r,a.height=c*r,t.scale(r,r);const u=o/2,s=c/2;if(t.translate(u-35,n?0:s-35),t.beginPath(),t.fillStyle="#FFFFFF",t.moveTo(0,35),t.bezierCurveTo(0,54.329966,15.670034,70,35,70),t.bezierCurveTo(54.329966,70,70,54.329966,70,35),t.bezierCurveTo(70,15.670034,54.329966,0,35,0),t.bezierCurveTo(15.670034,0,0,15.670034,0,35),t.fill(),t.beginPath(),t.fillStyle=l,t.moveTo(10,35),t.bezierCurveTo(10,48.807119,21.192881,60,35,60),t.bezierCurveTo(48.807119,60,60,48.807119,60,35),t.bezierCurveTo(60,21.192881,48.807119,10,35,10),t.bezierCurveTo(21.192881,10,10,21.192881,10,35),t.fill(),n){t.textAlign="center",t.textBaseline="alphabetic",t.lineJoin="round",t.strokeStyle="#fff",t.fillStyle=e;const v=38;t.font=getFont(v),t.lineWidth=6;const T=70+v;t.strokeText(n,35,T,o),t.fillText(n,35,T,o)}return a}export function createTargetCanvas(i,l="#c8248b",r=i*.5){const o=70*r,c=100*r,n=document.createElement("canvas"),e=n.getContext("2d");return n.width=o,n.height=c,e.scale(r,r),e.beginPath(),e.fillStyle="rgb(255, 255, 255)",e.moveTo(32.6,97.8),e.bezierCurveTo(24.4,81.5,0,57,0,32.6),e.bezierCurveTo(0,14.6,14.6,0,32.6,0),e.bezierCurveTo(50.5,0,65.2,14.6,65.2,32.6),e.bezierCurveTo(65.2,57,40.7,81.5,32.6,97.8),e.fill(),e.beginPath(),e.fillStyle=l,e.moveTo(32.6,91.1),e.bezierCurveTo(25.2,76.3,3.1,54.2,3.1,32.1),e.bezierCurveTo(3.1,15.9,16.3,2.6,32.6,2.6),e.bezierCurveTo(48.8,2.6,62,15.9,62,32.1),e.bezierCurveTo(62,54.2,39.9,76.3,32.6,91.1),e.fill(),e.beginPath(),e.fillStyle="rgb(255, 255, 255)",e.moveTo(16.2,32.6),e.bezierCurveTo(16.2,41.6,23.5,48.9,32.5,48.9),e.bezierCurveTo(41.5,48.9,48.8,41.6,48.8,32.6),e.bezierCurveTo(48.8,23.6,41.5,16.3,32.5,16.3),e.bezierCurveTo(23.5,16.3,16.2,23.6,16.2,32.6),e.fill(),n}export function createArrowCurrentCanvas(i,l="#c8248b",r=i*.4){const o=95*r,c=95*r,n=document.createElement("canvas"),e=n.getContext("2d");return n.width=o,n.height=c,e.scale(r,r),e.beginPath(),e.arc(47,47,25,0,2*Math.PI),e.fillStyle=l,e.fill(),e.beginPath(),e.fillStyle=l,e.moveTo(75,27),e.lineTo(95,47),e.lineTo(75,67),e.lineTo(80,47),e.closePath(),e.fill(),n}export function createYahCanvas(i,l="#ff4343",r=i*.5){const o=77*r,c=116*r,n=document.createElement("canvas"),e=n.getContext("2d");return n.width=o,n.height=c,e.scale(r,r),e.scale(r,r),e.beginPath(),e.fillStyle="#FFFFFF",e.moveTo(68.303,57.335),e.bezierCurveTo(77.894,39.304,70.649,15.785,50.95,8.04),e.bezierCurveTo(30.727,0,8.375,11.837,3.207,32.831),e.bezierCurveTo(0,46.185,6.644,57.323,13.131,68.211),e.fill(),e.beginPath(),e.fillStyle=l,e.moveTo(51.565,35.459),e.bezierCurveTo(51.565,43.256,45.201,49.575,37.354,49.575),e.bezierCurveTo(29.516,49.575,23.159,43.256,23.159,35.459),e.bezierCurveTo(23.159,27.668,29.516,21.345,37.354,21.345),e.bezierCurveTo(45.201,21.345,51.565,27.668,51.565,35.459),e.closePath(),e.fill(),e.beginPath(),e.moveTo(68.303,57.335),e.bezierCurveTo(77.894,39.304,70.649,15.785,50.95,8.04),e.bezierCurveTo(30.727,0,8.375,11.837,3.207,32.831),e.bezierCurveTo(0,46.185,6.644,57.323,13.131,68.211),e.lineTo(13.131,68.211),e.lineTo(13.131,68.211),e.bezierCurveTo(13.921,69.533,14.698,70.829,15.454,72.137),e.bezierCurveTo(19.465,79.158,23.533,86.12,27.571,93.086),e.lineTo(27.571,93.086),e.bezierCurveTo(30.098,97.421,32.611,101.756,35.116,106.077),e.bezierCurveTo(36.128,107.868,38.934,107.868,39.945,106.077),e.bezierCurveTo(49.387,90.003,58.708,74.029,68.031,57.951),e.bezierCurveTo(68.15,57.743,68.24,57.543,68.303,57.335),e.closePath(),e.moveTo(60.103,60.395),e.lineTo(63.201,55.041),e.lineTo(63.201,55.041),e.bezierCurveTo(73.31,36.735,61.285,11.614,39.04,11.17),e.bezierCurveTo(19.388,10.714,2.759,29.479,9.386,49.013),e.bezierCurveTo(10.726,52.998,12.657,56.9,14.84,60.721),e.bezierCurveTo(15.041,58.454,15.938,56.258,17.589,54.586),e.bezierCurveTo(19.708,52.425,22.216,50.638,24.996,49.283),e.bezierCurveTo(28.252,52.249,32.595,54.051,37.354,54.051),e.bezierCurveTo(42.123,54.051,46.47,52.249,49.73,49.283),e.bezierCurveTo(52.505,50.638,55.017,52.425,57.135,54.586),e.bezierCurveTo(58.701,56.188,59.701,58.245,60.103,60.395),e.closePath(),e.fill("evenodd"),e.beginPath(),e.moveTo(29.024,104.982),e.bezierCurveTo(29.024,103.626,27.923,102.527,26.57,102.527),e.bezierCurveTo(25.214,102.527,24.114,103.626,24.114,104.982),e.bezierCurveTo(24.114,111.395,30.347,116.838,37.444,116.838),e.bezierCurveTo(44.54,116.838,50.771,111.395,50.771,104.982),e.bezierCurveTo(50.771,103.626,49.666,102.527,48.317,102.527),e.bezierCurveTo(46.961,102.527,45.855,103.626,45.855,104.982),e.bezierCurveTo(45.855,108.193,42.352,111.956,37.444,111.956),e.bezierCurveTo(32.528,111.956,29.024,108.193,29.024,104.982),e.closePath(),e.fill(),n}const m=document.createElement("canvas"),f=m.getContext("2d");let P;function y(i,l){return P!==i&&(f.font=i),f.measureText(l).width}export function createLabelCanvas(i,l,r,o="#fff",c,n,e){i=i.replace(/^_/,""),l*=r;const a=document.createElement("canvas"),t=a.getContext("2d"),u=Number(getComputedStyle(document.body).getPropertyValue(d)),s=getFont(l,u||c),v=y(s,i.replace(/[0-9]/g,"3").replace(/[A-Z]/g,"A"))+3+3,T=4,C=l+T;return a.width=v*r,a.height=C*r,t.font=s,t.textAlign="center",t.textBaseline="alphabetic",t.fillStyle=o,e&&n&&(t.lineWidth=e,t.strokeStyle=n,t.strokeText(i,v/2,C-T/2*r),t.lineJoin="round"),t.fillText(i,v/2,C-T/2*r),a}function S(i,l,r,o,c){const n=l/2,e=o+c,a=r-c;i.beginPath(),i.moveTo(n,a),i.bezierCurveTo(n-o*.55,e+o*.8,n-o,e+o*.35,n-o,e),i.bezierCurveTo(n-o,e-o*.72,n-o*.45,e-o,n,e-o),i.bezierCurveTo(n+o*.45,e-o,n+o,e-o*.72,n+o,e),i.bezierCurveTo(n+o,e+o*.35,n+o*.55,e+o*.8,n,a),i.closePath()}const b="#ffffff",F=93/81,x=125/90;function h(i,l,r,o,c,n){const e=i,a=i*l,t=document.createElement("canvas"),u=t.getContext("2d");t.width=e*r,t.height=a*r,u.scale(r,r);const s=e*o;return S(u,e,a,s,c),u.fillStyle=n,u.strokeStyle=b,u.lineWidth=c,u.lineJoin="round",u.fill(),u.stroke(),{canvas:t,ctx:u,cx:e/2,cy:s+c,r:s}}function g(i){return i.getContext("2d").getImageData(0,0,i.width,i.height)}export function createPoiPinImage(i,l,r,o){const{canvas:c,ctx:n,cx:e,cy:a}=h(l,F,r,.37,2,o);if(i){const t=createImageCanvas(i,l*.42,l*.42,r),u=t.getContext("2d");u.globalCompositeOperation="source-in",u.fillStyle=b,u.fillRect(0,0,t.width,t.height);const s=t.width/r,v=t.height/r;n.drawImage(t,e-s/2,a-v/2,s,v)}return g(c)}export function createPoiPinheadImage(i,l,r){const{canvas:o,ctx:c,cx:n,cy:e,r:a}=h(i,x,l,.38,3,r);return c.beginPath(),c.arc(n,e,a*.34,0,2*Math.PI),c.fillStyle=b,c.fill(),g(o)}export function getFont(i,l=500,r="normal"){const o=getComputedStyle(document.body).getPropertyValue(z),c='Oswald, -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',n=o?`${o}, ${c}`:c;return`${r} ${l} ${i}px ${n}`}
1
+ import{FONT_FACE as z,FONT_WEIGHT_PRIMARY_BOOTH as f}from"../../../../constants";export function createImageCanvas(n,l,o,i,c=1,r){const e=n?n.width/n.height:1;let a=l*i*c,t=o*i*c;l/o>e?a=t*e:t=a/e;const v=document.createElement("canvas"),u=v.getContext("2d");return v.width=a,v.height=t,v.id=n.id,r==="horizontal"?(u.scale(-1,1),u.translate(-a,0)):r==="vertical"&&(u.scale(1,-1),u.translate(0,-t)),u.drawImage(n,0,0,a,t),v}export function createCurrentCanvas(n,l="#c8248b",o=n*.4,i,c,r,e="#000"){i=i||95,c=c||95;const a=document.createElement("canvas"),t=a.getContext("2d");a.width=i*o,a.height=c*o,t.scale(o,o);const v=i/2,u=c/2;if(t.translate(v-35,r?0:u-35),t.beginPath(),t.fillStyle="#FFFFFF",t.moveTo(0,35),t.bezierCurveTo(0,54.329966,15.670034,70,35,70),t.bezierCurveTo(54.329966,70,70,54.329966,70,35),t.bezierCurveTo(70,15.670034,54.329966,0,35,0),t.bezierCurveTo(15.670034,0,0,15.670034,0,35),t.fill(),t.beginPath(),t.fillStyle=l,t.moveTo(10,35),t.bezierCurveTo(10,48.807119,21.192881,60,35,60),t.bezierCurveTo(48.807119,60,60,48.807119,60,35),t.bezierCurveTo(60,21.192881,48.807119,10,35,10),t.bezierCurveTo(21.192881,10,10,21.192881,10,35),t.fill(),r){t.textAlign="center",t.textBaseline="alphabetic",t.lineJoin="round",t.strokeStyle="#fff",t.fillStyle=e;const T=38;t.font=getFont(T),t.lineWidth=6;const b=70+T;t.strokeText(r,35,b,i),t.fillText(r,35,b,i)}return a}export function createTargetCanvas(n,l="#c8248b",o=n*.5){const i=70*o,c=100*o,r=document.createElement("canvas"),e=r.getContext("2d");return r.width=i,r.height=c,e.scale(o,o),e.beginPath(),e.fillStyle="rgb(255, 255, 255)",e.moveTo(32.6,97.8),e.bezierCurveTo(24.4,81.5,0,57,0,32.6),e.bezierCurveTo(0,14.6,14.6,0,32.6,0),e.bezierCurveTo(50.5,0,65.2,14.6,65.2,32.6),e.bezierCurveTo(65.2,57,40.7,81.5,32.6,97.8),e.fill(),e.beginPath(),e.fillStyle=l,e.moveTo(32.6,91.1),e.bezierCurveTo(25.2,76.3,3.1,54.2,3.1,32.1),e.bezierCurveTo(3.1,15.9,16.3,2.6,32.6,2.6),e.bezierCurveTo(48.8,2.6,62,15.9,62,32.1),e.bezierCurveTo(62,54.2,39.9,76.3,32.6,91.1),e.fill(),e.beginPath(),e.fillStyle="rgb(255, 255, 255)",e.moveTo(16.2,32.6),e.bezierCurveTo(16.2,41.6,23.5,48.9,32.5,48.9),e.bezierCurveTo(41.5,48.9,48.8,41.6,48.8,32.6),e.bezierCurveTo(48.8,23.6,41.5,16.3,32.5,16.3),e.bezierCurveTo(23.5,16.3,16.2,23.6,16.2,32.6),e.fill(),r}export function createArrowCurrentCanvas(n,l="#c8248b",o=n*.4){const i=95*o,c=95*o,r=document.createElement("canvas"),e=r.getContext("2d");return r.width=i,r.height=c,e.scale(o,o),e.beginPath(),e.arc(47,47,25,0,2*Math.PI),e.fillStyle=l,e.fill(),e.beginPath(),e.fillStyle=l,e.moveTo(75,27),e.lineTo(95,47),e.lineTo(75,67),e.lineTo(80,47),e.closePath(),e.fill(),r}export function createYahCanvas(n,l="#ff4343",o=n*.5){const i=77*o,c=116*o,r=document.createElement("canvas"),e=r.getContext("2d");return r.width=i,r.height=c,e.scale(o,o),e.scale(o,o),e.beginPath(),e.fillStyle="#FFFFFF",e.moveTo(68.303,57.335),e.bezierCurveTo(77.894,39.304,70.649,15.785,50.95,8.04),e.bezierCurveTo(30.727,0,8.375,11.837,3.207,32.831),e.bezierCurveTo(0,46.185,6.644,57.323,13.131,68.211),e.fill(),e.beginPath(),e.fillStyle=l,e.moveTo(51.565,35.459),e.bezierCurveTo(51.565,43.256,45.201,49.575,37.354,49.575),e.bezierCurveTo(29.516,49.575,23.159,43.256,23.159,35.459),e.bezierCurveTo(23.159,27.668,29.516,21.345,37.354,21.345),e.bezierCurveTo(45.201,21.345,51.565,27.668,51.565,35.459),e.closePath(),e.fill(),e.beginPath(),e.moveTo(68.303,57.335),e.bezierCurveTo(77.894,39.304,70.649,15.785,50.95,8.04),e.bezierCurveTo(30.727,0,8.375,11.837,3.207,32.831),e.bezierCurveTo(0,46.185,6.644,57.323,13.131,68.211),e.lineTo(13.131,68.211),e.lineTo(13.131,68.211),e.bezierCurveTo(13.921,69.533,14.698,70.829,15.454,72.137),e.bezierCurveTo(19.465,79.158,23.533,86.12,27.571,93.086),e.lineTo(27.571,93.086),e.bezierCurveTo(30.098,97.421,32.611,101.756,35.116,106.077),e.bezierCurveTo(36.128,107.868,38.934,107.868,39.945,106.077),e.bezierCurveTo(49.387,90.003,58.708,74.029,68.031,57.951),e.bezierCurveTo(68.15,57.743,68.24,57.543,68.303,57.335),e.closePath(),e.moveTo(60.103,60.395),e.lineTo(63.201,55.041),e.lineTo(63.201,55.041),e.bezierCurveTo(73.31,36.735,61.285,11.614,39.04,11.17),e.bezierCurveTo(19.388,10.714,2.759,29.479,9.386,49.013),e.bezierCurveTo(10.726,52.998,12.657,56.9,14.84,60.721),e.bezierCurveTo(15.041,58.454,15.938,56.258,17.589,54.586),e.bezierCurveTo(19.708,52.425,22.216,50.638,24.996,49.283),e.bezierCurveTo(28.252,52.249,32.595,54.051,37.354,54.051),e.bezierCurveTo(42.123,54.051,46.47,52.249,49.73,49.283),e.bezierCurveTo(52.505,50.638,55.017,52.425,57.135,54.586),e.bezierCurveTo(58.701,56.188,59.701,58.245,60.103,60.395),e.closePath(),e.fill("evenodd"),e.beginPath(),e.moveTo(29.024,104.982),e.bezierCurveTo(29.024,103.626,27.923,102.527,26.57,102.527),e.bezierCurveTo(25.214,102.527,24.114,103.626,24.114,104.982),e.bezierCurveTo(24.114,111.395,30.347,116.838,37.444,116.838),e.bezierCurveTo(44.54,116.838,50.771,111.395,50.771,104.982),e.bezierCurveTo(50.771,103.626,49.666,102.527,48.317,102.527),e.bezierCurveTo(46.961,102.527,45.855,103.626,45.855,104.982),e.bezierCurveTo(45.855,108.193,42.352,111.956,37.444,111.956),e.bezierCurveTo(32.528,111.956,29.024,108.193,29.024,104.982),e.closePath(),e.fill(),r}const h=document.createElement("canvas"),C=h.getContext("2d");function d(n,l){return C.font=n,C.measureText(l).width}export function createLabelCanvas(n,l,o,i="#fff",c,r,e){n=n.replace(/^_/,""),l*=o;const a=document.createElement("canvas"),t=a.getContext("2d"),v=Number(getComputedStyle(document.body).getPropertyValue(f)),u=getFont(l,v||c),T=d(u,n.replace(/[0-9]/g,"3").replace(/[A-Z]/g,"A"))+3+3,b=4,s=l+b;return a.width=T*o,a.height=s*o,t.font=u,t.textAlign="center",t.textBaseline="alphabetic",t.fillStyle=i,e&&r&&(t.lineWidth=e,t.strokeStyle=r,t.strokeText(n,T/2,s-b/2*o),t.lineJoin="round"),t.fillText(n,T/2,s-b/2*o),a}export function getFont(n,l=500,o="normal"){const i=getComputedStyle(document.body).getPropertyValue(z),c='Oswald, -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',r=i?`${i}, ${c}`:c;return`${o} ${l} ${n}px ${r}`}
@@ -1 +1 @@
1
- import m from"color";import{OUTDOOR_LAYER_PREFIX as u,POI_MARKER_PIN_WIDTH_PX as P,POI_PIN_DEFAULT_COLOR as y}from"../../../../constants";import I from"../../../../data";import s,{uiState as g}from"../../../../store";import{loadImage as M}from"../../../../utils/loadImage";import{createPoiPinImage as w}from"./canvases";const d=r=>!!r&&r!=="transparent"&&r!=="none";function O(r){const i=(r.paths??[]).map(a=>a.color).find(d),t=(r.shapes??[]).map(a=>a.color).find(d),n=i??t??null;if(!n)return null;try{return g.monochrome?m(n).grayscale().rgb().string():n}catch{return n}}export function isOutdoorMarkersEnabled(){return I.enableExperimentalOutdoorMarkers===!0}export function isOutdoorPoiLayer(r){return r.name.toLowerCase().startsWith(u.toLowerCase())}async function T(r){const i=s.poiMarkerStore.generation,t=window.devicePixelRatio||1,n=[],a=new Map((s.poiTypeStore?.poiTypes??[]).map(e=>[e.id,e])),c=new Map,f=e=>{let o=c.get(e);return o||(o=M(e),c.set(e,o)),o};await Promise.all(r.map(async e=>{const o=e.poiTypeId==null?void 0:a.get(e.poiTypeId)?.iconUrl,p=o?await f(o):null;o&&!p&&console.warn("PoI icon failed to load",e.name,o);const l=e.rect.center;n.push({boothId:e.id,center:{x:l.x,y:l.y},icon:w(p,P,t,O(e)??y)})})),s.poiMarkerStore.generation===i&&s.poiMarkerStore.addMany(n)}export function configOutdoorPoiLayer(r,i){return!isOutdoorMarkersEnabled()||!isOutdoorPoiLayer(r)?!1:(s.maplibreStore.showMaplibre&&T(i.filter(t=>t.poiTypeId&&t.rect)),!0)}
1
+ import m from"color";import{OUTDOOR_LAYER_PREFIX as u,POI_MARKER_PIN_WIDTH_PX as P,POI_PIN_DEFAULT_COLOR as y}from"../../../../constants";import I from"../../../../data";import s,{uiState as g}from"../../../../store";import{loadImage as M}from"../../../../utils/loadImage";import{createPoiPinImage as w}from"./poi-pin.js";const d=r=>!!r&&r!=="transparent"&&r!=="none";function O(r){const i=(r.paths??[]).map(a=>a.color).find(d),t=(r.shapes??[]).map(a=>a.color).find(d),n=i??t??null;if(!n)return null;try{return g.monochrome?m(n).grayscale().rgb().string():n}catch{return n}}export function isOutdoorMarkersEnabled(){return I.enableExperimentalOutdoorMarkers===!0}export function isOutdoorPoiLayer(r){return r.name.toLowerCase().startsWith(u.toLowerCase())}async function T(r){const i=s.poiMarkerStore.generation,t=window.devicePixelRatio||1,n=[],a=new Map((s.poiTypeStore?.poiTypes??[]).map(e=>[e.id,e])),c=new Map,f=e=>{let o=c.get(e);return o||(o=M(e),c.set(e,o)),o};await Promise.all(r.map(async e=>{const o=e.poiTypeId==null?void 0:a.get(e.poiTypeId)?.iconUrl,p=o?await f(o):null;o&&!p&&console.warn("PoI icon failed to load",e.name,o);const l=e.rect.center;n.push({boothId:e.id,center:{x:l.x,y:l.y},icon:w(p,P,t,O(e)??y)})})),s.poiMarkerStore.generation===i&&s.poiMarkerStore.addMany(n)}export function configOutdoorPoiLayer(r,i){return!isOutdoorMarkersEnabled()||!isOutdoorPoiLayer(r)?!1:(s.maplibreStore.showMaplibre&&T(i.filter(t=>t.poiTypeId&&t.rect)),!0)}
@@ -0,0 +1,100 @@
1
+ /**
2
+ * A vector outdoor-PoI pin, traced from the outdoor-only app's marker artwork. Coordinates
3
+ * are in that artwork's pixel frame (which includes a drop-shadow margin), so
4
+ * the numbers can be checked against the source PNGs directly.
5
+ */
6
+ export interface PoiPinShape {
7
+ /** The artwork frame: the pin plus room for its drop shadow. */
8
+ readonly frame: {
9
+ readonly width: number;
10
+ readonly height: number;
11
+ };
12
+ /** Width of the visible pin (stroke included) — what the size constants set. */
13
+ readonly bodyWidth: number;
14
+ /**
15
+ * Teardrop outline as SVG path data, starting at the tip apex. For a stroked
16
+ * pin this is the stroke's centerline.
17
+ */
18
+ readonly outline: string;
19
+ readonly strokeWidth: number;
20
+ /** Lowest point of {@link outline}, at the horizontal center of the frame. */
21
+ readonly tipApexY: number;
22
+ /**
23
+ * The round head: its center, and the radius of the disc drawn on it (the
24
+ * glyph's colored disc, or the selection dot).
25
+ */
26
+ readonly head: {
27
+ readonly x: number;
28
+ readonly y: number;
29
+ readonly innerRadius: number;
30
+ };
31
+ readonly shadow: {
32
+ readonly offsetY: number;
33
+ readonly blur: number;
34
+ };
35
+ }
36
+ /**
37
+ * The category pin (82x96 artwork): a white teardrop around a colored disc
38
+ * that carries the poiType glyph.
39
+ */
40
+ export declare const POI_MARKER_PIN_SHAPE: {
41
+ readonly frame: {
42
+ readonly width: 82;
43
+ readonly height: 96;
44
+ };
45
+ readonly bodyWidth: 70;
46
+ readonly outline: 'M41 86.13C41.68 85.63 76 61.93 76 36.1A35 35 0 0 0 6 36.1C6 61.93 40.32 85.63 41 86.13Z';
47
+ readonly strokeWidth: 0;
48
+ readonly tipApexY: 86.13;
49
+ readonly head: {
50
+ readonly x: 41;
51
+ readonly y: 36.1;
52
+ readonly innerRadius: 29.3;
53
+ };
54
+ readonly shadow: {
55
+ readonly offsetY: 2;
56
+ readonly blur: 4;
57
+ };
58
+ };
59
+ /**
60
+ * The selection pin (102x137 artwork): a teardrop filled with the selection
61
+ * color, outlined and dotted in a darker shade of it.
62
+ */
63
+ export declare const POI_SELECTED_PIN_SHAPE: {
64
+ readonly frame: {
65
+ readonly width: 102;
66
+ readonly height: 137;
67
+ };
68
+ readonly bodyWidth: 90;
69
+ readonly outline: 'M51 125.88C56.54 123.07 94.5 77 94.5 47A43.5 43.5 0 0 0 7.5 47C7.5 77 45.46 123.07 51 125.88Z';
70
+ readonly strokeWidth: 3;
71
+ readonly tipApexY: 125.88;
72
+ readonly head: {
73
+ readonly x: 51;
74
+ readonly y: 47;
75
+ readonly innerRadius: 19;
76
+ };
77
+ readonly shadow: {
78
+ readonly offsetY: 2.5;
79
+ readonly blur: 5;
80
+ };
81
+ };
82
+ export interface PoiPinLayout {
83
+ /** Artwork frame units → device pixels. */
84
+ readonly scale: number;
85
+ readonly canvasWidth: number;
86
+ readonly canvasHeight: number;
87
+ /**
88
+ * CSS px to shift the bottom-anchored image down by (MapLibre `icon-offset`),
89
+ * so the pin tip — not the shadow below it — sits on the point.
90
+ */
91
+ readonly tipOffset: number;
92
+ }
93
+ /** Sizes a pin whose visible body is `bodyWidthPx` CSS px wide. */
94
+ export declare function getPoiPinLayout(shape: PoiPinShape, bodyWidthPx: number, pixelRatio: number): PoiPinLayout;
95
+ /**
96
+ * The darker shade the selection pin draws its outline and dot in — the
97
+ * artwork's #ff4747 → #9a2626 pairing, applied to any selection color.
98
+ */
99
+ export declare function getPoiPinShadeColor(color: string): string;
100
+ //# sourceMappingURL=poi-pin-shape.d.ts.map
@@ -0,0 +1 @@
1
+ import d from"color";export const POI_MARKER_PIN_SHAPE={frame:{width:82,height:96},bodyWidth:70,outline:"M41 86.13C41.68 85.63 76 61.93 76 36.1A35 35 0 0 0 6 36.1C6 61.93 40.32 85.63 41 86.13Z",strokeWidth:0,tipApexY:86.13,head:{x:41,y:36.1,innerRadius:29.3},shadow:{offsetY:2,blur:4}},POI_SELECTED_PIN_SHAPE={frame:{width:102,height:137},bodyWidth:90,outline:"M51 125.88C56.54 123.07 94.5 77 94.5 47A43.5 43.5 0 0 0 7.5 47C7.5 77 45.46 123.07 51 125.88Z",strokeWidth:3,tipApexY:125.88,head:{x:51,y:47,innerRadius:19},shadow:{offsetY:2.5,blur:5}};export function getPoiPinLayout(t,r,i){const e=r/t.bodyWidth*i,o=Math.ceil(t.frame.height*e),n=(t.tipApexY+t.strokeWidth/2)*e;return{scale:e,canvasWidth:Math.ceil(t.frame.width*e),canvasHeight:o,tipOffset:(o-n)/i}}export function getPoiPinShadeColor(t){try{return d(t).darken(.41).desaturate(.4).hex()}catch{return t}}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * The category pin for one outdoor PoI: the poiType glyph knocked out in white
3
+ * on a disc in the booth's authored color, inside a white teardrop. Returns
4
+ * `ImageData` rather than a canvas — the only consumer is `map.addImage`, and
5
+ * a canvas per PoI would stay resident for the session.
6
+ */
7
+ export declare function createPoiPinImage(image: HTMLImageElement | null, bodyWidthPx: number, pixelRatio: number, color: string): ImageData;
8
+ /** The shared selection pin — one image serves every marker. */
9
+ export declare function createPoiPinheadImage(bodyWidthPx: number, pixelRatio: number, color: string): ImageData;
10
+ //# sourceMappingURL=poi-pin.d.ts.map
@@ -0,0 +1 @@
1
+ import{POI_PIN_DEFAULT_COLOR as _}from"../../../../constants.js";import{createImageCanvas as y}from"./canvases.js";import{getPoiPinLayout as I,getPoiPinShadeColor as O,POI_MARKER_PIN_SHAPE as R,POI_SELECTED_PIN_SHAPE as E}from"./poi-pin-shape.js";const x=.6,p="#ffffff",A="rgba(0, 0, 0, 0.35)";function w(t,i){const n=document.createElement("canvas");n.width=i.canvasWidth,n.height=i.canvasHeight;const o=n.getContext("2d");return o.scale(i.scale,i.scale),{canvas:n,ctx:o,path:new Path2D(t.outline)}}function m(t,i,n){t.shadowColor=A,t.shadowOffsetY=i.shadow.offsetY*n,t.shadowBlur=i.shadow.blur*n}function C(t){t.shadowColor="transparent",t.shadowOffsetY=0,t.shadowBlur=0}function S(t){return t.getContext("2d").getImageData(0,0,t.width,t.height)}export function createPoiPinImage(t,i,n,o){const s=R,l=I(s,i,n),{canvas:e,ctx:a,path:c}=w(s,l),{x:d,y:f}=s.head;if(m(a,s,l.scale),a.fillStyle=p,a.fill(c),C(a),a.beginPath(),a.arc(d,f,s.head.innerRadius,0,2*Math.PI),a.fillStyle=_,a.fillStyle=o,a.fill(),t){const P=2*s.head.innerRadius*x*l.scale,h=y(t,P,P,1),r=h.getContext("2d");r.globalCompositeOperation="source-in",r.fillStyle=p,r.fillRect(0,0,h.width,h.height);const g=h.width/l.scale,u=h.height/l.scale;a.drawImage(h,d-g/2,f-u/2,g,u)}return S(e)}export function createPoiPinheadImage(t,i,n){const o=E,s=I(o,t,i),{canvas:l,ctx:e,path:a}=w(o,s),c=O(n);return m(e,o,s.scale),e.fillStyle=n,e.fill(a),C(e),e.strokeStyle=c,e.lineWidth=o.strokeWidth,e.lineJoin="round",e.stroke(a),e.beginPath(),e.arc(o.head.x,o.head.y,o.head.innerRadius,0,2*Math.PI),e.fillStyle=c,e.fill(),S(l)}
@@ -1 +1 @@
1
- import{Box as j}from"@expofp/geometry";import{reaction as h}from"mobx";import{useEffect as K}from"react";import{POI_CLUSTER_COLOR as W,POI_CLUSTER_MIN_POINTS as q,POI_CLUSTER_RADIUS_PX as $,POI_CLUSTER_SIZE_PX as J,POI_CLUSTER_STROKE_COLOR as Q,POI_CLUSTER_STROKE_WIDTH_PX as ee,POI_CLUSTER_TEXT_SIZE_PX as te,POI_SELECTED_PIN_WIDTH_PX as oe}from"../../constants";import c from"../../store";import re from"../../tools/settings";import{DIM_INTENSITY as ie}from"../../utils/dimming";import{convertLocalToGps as C}from"../../utils/gps";import{createPoiPinheadImage as ne}from"../Map/drawing/config/canvases";import{isOutdoorMarkersEnabled as ce}from"../Map/drawing/config/config-outdoor-poi";import{getMapDimTarget as v}from"./useDimming";import{getLocalRectGeoBounds as se,getVisibleRectFitPadding as ae,isLngLatInVisibleViewport as le}from"./utils/geo-config";import{poiMarkerHitTest as U}from"./utils/poi-marker-hit-test";const s="expofp-poi",a="expofp-poi-clusters",S="expofp-poi-cluster-count",I="expofp-poi-unclustered",y="expofp-poi-selected",P="expofp-poi-pinhead-image",A=[a,S,I,y],pe=A.filter(p=>p!==S),L=p=>`expofp-poi-icon-${p}`;export function usePoiMarkers(p,E,f){K(()=>{if(!ce())return;const e=E.current;if(!p||!e||!f)return;const{gpsConfig:b}=f,l=new Set,k=window.devicePixelRatio||1,w=re.colors?.booths?.selected||"#3b6ef5",F=ne(oe,k,w),T=t=>C(t.center.x,t.center.y,b),O=(t,o)=>{e.hasImage(t)&&e.removeImage(t),e.addImage(t,o,{pixelRatio:k}),l.add(t)},N=t=>{const o=c.poiMarkerStore.markers,i=new Set(o.map(r=>L(r.boothId)));i.add(P);for(const r of[...l])i.has(r)||(e.hasImage(r)&&e.removeImage(r),l.delete(r));for(const r of o){const n=L(r.boothId);(t||!l.has(n))&&O(n,r.icon)}l.has(P)||O(P,F)},B=()=>{const t=c.poiMarkerStore.selectedMarkerId,o=c.poiMarkerStore.outdoorFilter,i=!o.active;let r=c.poiMarkerStore.markers;return t!==null?r=r.filter(n=>n.boothId===t):o.active&&(r=o.matchingMarkers),{cluster:i,data:{type:"FeatureCollection",features:r.map(n=>({type:"Feature",geometry:{type:"Point",coordinates:T(n)},properties:{boothId:n.boothId,icon:L(n.boothId),pinhead:n.boothId===t}}))}}},Y=()=>{let t=null;for(const o of e.getStyle()?.layers??[]){if(o.type!=="symbol")continue;const i=o.layout?.["text-font"];if(!(!Array.isArray(i)||!i.every(r=>typeof r=="string"))){if(!i.some(r=>/italic/i.test(r)))return i;t??=i}}return t??["Noto Sans Regular"]};let g=null;const R=()=>{for(const t of A)e.getLayer(t)&&e.removeLayer(t);e.getSource(s)&&e.removeSource(s),g=null},X=(t,o)=>{if(g!==null&&g!==o&&R(),e.getSource(s)||(e.addSource(s,{type:"geojson",data:t,cluster:o,clusterRadius:$,clusterMinPoints:q}),g=o),e.getLayer(a))return;const i=["!",["has","point_count"]],r=["==",["coalesce",["get","pinhead"],!1],!0];e.addLayer({id:a,type:"circle",source:s,filter:["has","point_count"],paint:{"circle-radius":J/2,"circle-color":W,"circle-stroke-color":Q,"circle-stroke-width":ee,"circle-pitch-alignment":"viewport"}}),e.addLayer({id:S,type:"symbol",source:s,filter:["has","point_count"],layout:{"text-field":["get","point_count_abbreviated"],"text-font":Y(),"text-size":te,"text-allow-overlap":!0,"text-ignore-placement":!0},paint:{"text-color":"#ffffff"}}),e.addLayer({id:I,type:"symbol",source:s,filter:["all",i,["!",r]],layout:{"icon-image":["get","icon"],"icon-anchor":"bottom","icon-allow-overlap":!0,"icon-ignore-placement":!0}}),e.addLayer({id:y,type:"symbol",source:s,filter:["all",i,r],layout:{"icon-image":P,"icon-anchor":"bottom","icon-allow-overlap":!0,"icon-ignore-placement":!0}})},M=()=>{if(!e.getLayer(a))return;const t=v()?1-ie:1;e.setPaintProperty(a,"circle-opacity",t),e.setPaintProperty(a,"circle-stroke-opacity",t),e.setPaintProperty(S,"text-opacity",t),e.setPaintProperty(I,"icon-opacity",t),e.setPaintProperty(y,"icon-opacity",t)},d=(t=!1)=>{N(t);const{cluster:o,data:i}=B();X(i,o),e.getSource(s)?.setData(i),M()},z=t=>{if(!t.length)return;const o=ae(50);if(t.every(m=>le(e,T(m),o)))return;const r=j.fromPoints(t.map(m=>m.center)),n=se(r,b),u=e.cameraForBounds(n,{padding:o,bearing:f.bearing});!u?.center||typeof u.zoom!="number"||e.easeTo({center:u.center,zoom:Math.min(e.getZoom(),u.zoom),bearing:f.bearing,duration:500,essential:!0})},_=t=>{const o=t.features?.[0]?.properties?.boothId;if(typeof o!="number")return;const i=c.boothStore.boothById.get(o);i&&c.clickBooth(i)},x=t=>{const o=t.features?.[0],i=o?.properties?.cluster_id,r=e.getSource(s);if(typeof i!="number"||!r||o?.geometry?.type!=="Point")return;const[n=0,u=0]=o.geometry.coordinates;r.getClusterExpansionZoom(i).then(m=>{e.easeTo({center:[n,u],zoom:Math.min(m,e.getMaxZoom()),duration:500})})};e.on("click",I,_),e.on("click",y,_),e.on("click",a,x),U.set((t,o)=>{const i=pe.filter(n=>!!e.getLayer(n));if(!i.length)return!1;const r=e.project(C(t,o,b));return e.queryRenderedFeatures([r.x,r.y],{layers:i}).length>0});const D=()=>{l.clear(),d(!0)};e.on("style.load",D);const H=h(()=>c.poiMarkerStore.markers,()=>d(!0)),V=h(()=>c.poiMarkerStore.selectedMarkerId,()=>d()),Z=h(()=>c.poiMarkerStore.outdoorFilter.key,()=>{d(),z(c.poiMarkerStore.outdoorFilter.matchingMarkers)}),G=h(()=>v(),()=>M());return d(!0),()=>{H(),V(),Z(),G(),U.set(null),e.off("style.load",D),e.off("click",I,_),e.off("click",y,_),e.off("click",a,x);try{R();for(const t of l)e.hasImage(t)&&e.removeImage(t)}catch{}}},[p,E,f])}
1
+ import{Box as $}from"@expofp/geometry";import{reaction as h}from"mobx";import{useEffect as J}from"react";import{POI_CLUSTER_COLOR as Q,POI_CLUSTER_MIN_POINTS as ee,POI_CLUSTER_RADIUS_PX as te,POI_CLUSTER_SIZE_PX as oe,POI_CLUSTER_STROKE_COLOR as re,POI_CLUSTER_STROKE_WIDTH_PX as ie,POI_CLUSTER_TEXT_SIZE_PX as ne,POI_MARKER_PIN_WIDTH_PX as ce,POI_SELECTED_PIN_WIDTH_PX as C}from"../../constants";import c from"../../store";import se from"../../tools/settings";import{DIM_INTENSITY as ae}from"../../utils/dimming";import{convertLocalToGps as v}from"../../utils/gps";import{isOutdoorMarkersEnabled as le}from"../Map/drawing/config/config-outdoor-poi";import{createPoiPinheadImage as pe}from"../Map/drawing/config/poi-pin.js";import{getPoiPinLayout as A,POI_MARKER_PIN_SHAPE as fe,POI_SELECTED_PIN_SHAPE as ue}from"../Map/drawing/config/poi-pin-shape.js";import{getMapDimTarget as U}from"./useDimming";import{getLocalRectGeoBounds as de,getVisibleRectFitPadding as me,isLngLatInVisibleViewport as Ie}from"./utils/geo-config";import{poiMarkerHitTest as N}from"./utils/poi-marker-hit-test";const s="expofp-poi",a="expofp-poi-clusters",S="expofp-poi-cluster-count",I="expofp-poi-unclustered",y="expofp-poi-selected",E="expofp-poi-pinhead-image",w=[a,S,I,y],ye=w.filter(p=>p!==S),b=p=>`expofp-poi-icon-${p}`;export function usePoiMarkers(p,k,u){J(()=>{if(!le())return;const e=k.current;if(!p||!e||!u)return;const{gpsConfig:L}=u,l=new Set,_=window.devicePixelRatio||1,F=se.colors?.booths?.selected||"#3b6ef5",H=pe(C,_,F),B=A(fe,ce,_).tipOffset,X=A(ue,C,_).tipOffset,O=t=>v(t.center.x,t.center.y,L),T=(t,o)=>{e.hasImage(t)&&e.removeImage(t),e.addImage(t,o,{pixelRatio:_}),l.add(t)},Y=t=>{const o=c.poiMarkerStore.markers,i=new Set(o.map(r=>b(r.boothId)));i.add(E);for(const r of[...l])i.has(r)||(e.hasImage(r)&&e.removeImage(r),l.delete(r));for(const r of o){const n=b(r.boothId);(t||!l.has(n))&&T(n,r.icon)}l.has(E)||T(E,H)},z=()=>{const t=c.poiMarkerStore.selectedMarkerId,o=c.poiMarkerStore.outdoorFilter,i=!o.active;let r=c.poiMarkerStore.markers;return t!==null?r=r.filter(n=>n.boothId===t):o.active&&(r=o.matchingMarkers),{cluster:i,data:{type:"FeatureCollection",features:r.map(n=>({type:"Feature",geometry:{type:"Point",coordinates:O(n)},properties:{boothId:n.boothId,icon:b(n.boothId),pinhead:n.boothId===t}}))}}},V=()=>{let t=null;for(const o of e.getStyle()?.layers??[]){if(o.type!=="symbol")continue;const i=o.layout?.["text-font"];if(!(!Array.isArray(i)||!i.every(r=>typeof r=="string"))){if(!i.some(r=>/italic/i.test(r)))return i;t??=i}}return t??["Noto Sans Regular"]};let g=null;const R=()=>{for(const t of w)e.getLayer(t)&&e.removeLayer(t);e.getSource(s)&&e.removeSource(s),g=null},Z=(t,o)=>{if(g!==null&&g!==o&&R(),e.getSource(s)||(e.addSource(s,{type:"geojson",data:t,cluster:o,clusterRadius:te,clusterMinPoints:ee}),g=o),e.getLayer(a))return;const i=["!",["has","point_count"]],r=["==",["coalesce",["get","pinhead"],!1],!0];e.addLayer({id:a,type:"circle",source:s,filter:["has","point_count"],paint:{"circle-radius":oe/2,"circle-color":Q,"circle-stroke-color":re,"circle-stroke-width":ie,"circle-pitch-alignment":"viewport"}}),e.addLayer({id:S,type:"symbol",source:s,filter:["has","point_count"],layout:{"text-field":["get","point_count_abbreviated"],"text-font":V(),"text-size":ne,"text-allow-overlap":!0,"text-ignore-placement":!0},paint:{"text-color":"#ffffff"}}),e.addLayer({id:I,type:"symbol",source:s,filter:["all",i,["!",r]],layout:{"icon-image":["get","icon"],"icon-anchor":"bottom","icon-offset":[0,B],"icon-allow-overlap":!0,"icon-ignore-placement":!0}}),e.addLayer({id:y,type:"symbol",source:s,filter:["all",i,r],layout:{"icon-image":E,"icon-anchor":"bottom","icon-offset":[0,X],"icon-allow-overlap":!0,"icon-ignore-placement":!0}})},M=()=>{if(!e.getLayer(a))return;const t=U()?1-ae:1;e.setPaintProperty(a,"circle-opacity",t),e.setPaintProperty(a,"circle-stroke-opacity",t),e.setPaintProperty(S,"text-opacity",t),e.setPaintProperty(I,"icon-opacity",t),e.setPaintProperty(y,"icon-opacity",t)},d=(t=!1)=>{Y(t);const{cluster:o,data:i}=z();Z(i,o),e.getSource(s)?.setData(i),M()},K=t=>{if(!t.length)return;const o=me(50);if(t.every(m=>Ie(e,O(m),o)))return;const r=$.fromPoints(t.map(m=>m.center)),n=de(r,L),f=e.cameraForBounds(n,{padding:o,bearing:u.bearing});!f?.center||typeof f.zoom!="number"||e.easeTo({center:f.center,zoom:Math.min(e.getZoom(),f.zoom),bearing:u.bearing,duration:500,essential:!0})},P=t=>{const o=t.features?.[0]?.properties?.boothId;if(typeof o!="number")return;const i=c.boothStore.boothById.get(o);i&&c.clickBooth(i)},D=t=>{const o=t.features?.[0],i=o?.properties?.cluster_id,r=e.getSource(s);if(typeof i!="number"||!r||o?.geometry?.type!=="Point")return;const[n=0,f=0]=o.geometry.coordinates;r.getClusterExpansionZoom(i).then(m=>{e.easeTo({center:[n,f],zoom:Math.min(m,e.getMaxZoom()),duration:500})})};e.on("click",I,P),e.on("click",y,P),e.on("click",a,D),N.set((t,o)=>{const i=ye.filter(n=>!!e.getLayer(n));if(!i.length)return!1;const r=e.project(v(t,o,L));return e.queryRenderedFeatures([r.x,r.y],{layers:i}).length>0});const x=()=>{l.clear(),d(!0)};e.on("style.load",x);const G=h(()=>c.poiMarkerStore.markers,()=>d(!0)),W=h(()=>c.poiMarkerStore.selectedMarkerId,()=>d()),j=h(()=>c.poiMarkerStore.outdoorFilter.key,()=>{d(),K(c.poiMarkerStore.outdoorFilter.matchingMarkers)}),q=h(()=>U(),()=>M());return d(!0),()=>{G(),W(),j(),q(),N.set(null),e.off("style.load",x),e.off("click",I,P),e.off("click",y,P),e.off("click",a,D);try{R();for(const t of l)e.hasImage(t)&&e.removeImage(t)}catch{}}},[p,k,u])}
@@ -5,8 +5,8 @@ export declare const SEPARATOR = ":";
5
5
  export declare const OUTDOOR_LAYER_PREFIX = "Outdoor";
6
6
  export declare const POI_CLUSTER_RADIUS_PX = 50;
7
7
  export declare const POI_CLUSTER_MIN_POINTS = 3;
8
- export declare const POI_MARKER_PIN_WIDTH_PX = 42;
9
- export declare const POI_SELECTED_PIN_WIDTH_PX = 36;
8
+ export declare const POI_MARKER_PIN_WIDTH_PX = 40;
9
+ export declare const POI_SELECTED_PIN_WIDTH_PX = 40;
10
10
  export declare const POI_PIN_DEFAULT_COLOR = "#ea4236";
11
11
  export declare const POI_CLUSTER_SIZE_PX = 36;
12
12
  export declare const POI_CLUSTER_COLOR = "rgba(234, 66, 54, 0.85)";
@@ -1 +1 @@
1
- export const VISIBILITY_STORAGE_KEY="___visibility",PREVIEW_MODE_ATTRIBUTE="data-preview-mode",BOOTHS_PAINTER_MARKER="booths",SEPARATOR=":",OUTDOOR_LAYER_PREFIX="Outdoor",POI_CLUSTER_RADIUS_PX=50,POI_CLUSTER_MIN_POINTS=3,POI_MARKER_PIN_WIDTH_PX=42,POI_SELECTED_PIN_WIDTH_PX=36,POI_PIN_DEFAULT_COLOR="#ea4236",POI_CLUSTER_SIZE_PX=36,POI_CLUSTER_COLOR="rgba(234, 66, 54, 0.85)",POI_CLUSTER_STROKE_COLOR="#ffffff",POI_CLUSTER_STROKE_WIDTH_PX=2,POI_CLUSTER_TEXT_SIZE_PX=14,LAYER_LOGOS_MARKER="logos",LAYER_ICONS_MARKER="icons",STRING_META_DELIMITER="$$",KIOSK_ENABLE_KEY="kiosk",SET_KIOSK_KEY="setkiosk",BOOKMARK_PAINTER_MARKER="booth-bookmark",DEBUG_KEY="debug",DEBUG_STORAGE_KEY="efp-debugMode",DEFAULT_UNITS="ft",PATHWAY_KEY="pathway",CACHE_DURATION=1e3,MOBILE_BREAKPOINT=768,LANGUAGE_TYPE="language",MAX_ROUTE_WAYPOINTS=8,VIEWER_MODE_STORAGE_KEY="efp-viewerMode",LEGACY_VIEWER_MODE_STORAGE_KEY="___viewer_mode",PREVIEW_MODE_STORAGE_KEY="efp-previewMode",LEGACY_PREVIEW_MODE_STORAGE_KEY="___preview_mode",UI_SCALE_STORAGE_KEY="efp-uiScale",LEGACY_UI_SCALE_STORAGE_KEY="___ui-scale",FONT_FACE="--expofp-font-face",FONT_WEIGHT_PRIMARY_BOOTH="--expofp-booth-main-weight",FONT_WEIGHT_SECONDARY_BOOTH="--expofp-booth-details-weight",FONT_WEIGHT_PRIMARY_EXHIBITOR="--expofp-exhibitor-main-weight",FONT_WEIGHT_SECONDARY_EXHIBITOR="--expofp-exhibitor-details-weight",FONT_WEIGHT_PRIMARY_SPECIAL="--expofp-booth-special-weight",ORIENTATION_GRANTED_KEY="efp-compass-permission-granted";
1
+ export const VISIBILITY_STORAGE_KEY="___visibility",PREVIEW_MODE_ATTRIBUTE="data-preview-mode",BOOTHS_PAINTER_MARKER="booths",SEPARATOR=":",OUTDOOR_LAYER_PREFIX="Outdoor",POI_CLUSTER_RADIUS_PX=50,POI_CLUSTER_MIN_POINTS=3,POI_MARKER_PIN_WIDTH_PX=40,POI_SELECTED_PIN_WIDTH_PX=40,POI_PIN_DEFAULT_COLOR="#ea4236",POI_CLUSTER_SIZE_PX=36,POI_CLUSTER_COLOR="rgba(234, 66, 54, 0.85)",POI_CLUSTER_STROKE_COLOR="#ffffff",POI_CLUSTER_STROKE_WIDTH_PX=2,POI_CLUSTER_TEXT_SIZE_PX=14,LAYER_LOGOS_MARKER="logos",LAYER_ICONS_MARKER="icons",STRING_META_DELIMITER="$$",KIOSK_ENABLE_KEY="kiosk",SET_KIOSK_KEY="setkiosk",BOOKMARK_PAINTER_MARKER="booth-bookmark",DEBUG_KEY="debug",DEBUG_STORAGE_KEY="efp-debugMode",DEFAULT_UNITS="ft",PATHWAY_KEY="pathway",CACHE_DURATION=1e3,MOBILE_BREAKPOINT=768,LANGUAGE_TYPE="language",MAX_ROUTE_WAYPOINTS=8,VIEWER_MODE_STORAGE_KEY="efp-viewerMode",LEGACY_VIEWER_MODE_STORAGE_KEY="___viewer_mode",PREVIEW_MODE_STORAGE_KEY="efp-previewMode",LEGACY_PREVIEW_MODE_STORAGE_KEY="___preview_mode",UI_SCALE_STORAGE_KEY="efp-uiScale",LEGACY_UI_SCALE_STORAGE_KEY="___ui-scale",FONT_FACE="--expofp-font-face",FONT_WEIGHT_PRIMARY_BOOTH="--expofp-booth-main-weight",FONT_WEIGHT_SECONDARY_BOOTH="--expofp-booth-details-weight",FONT_WEIGHT_PRIMARY_EXHIBITOR="--expofp-exhibitor-main-weight",FONT_WEIGHT_SECONDARY_EXHIBITOR="--expofp-exhibitor-details-weight",FONT_WEIGHT_PRIMARY_SPECIAL="--expofp-booth-special-weight",ORIENTATION_GRANTED_KEY="efp-compass-permission-granted";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@expofp/floorplan",
3
- "version": "3.44.3",
3
+ "version": "3.44.4",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/expofp/efp-app.git",
@@ -69,15 +69,15 @@
69
69
  "tslib": "^2.3.0",
70
70
  "uuid": "^9.0.1",
71
71
  "zod": "4.4.3",
72
- "@expofp/config": "3.44.3",
73
- "@expofp/debug": "3.44.3",
74
- "@expofp/geometry": "3.44.3",
75
- "@expofp/renderer": "3.44.3",
76
- "@expofp/resolve": "3.44.3",
77
- "@expofp/schema": "3.44.3",
78
- "@expofp/ui": "3.44.3",
79
- "@expofp/utils": "3.44.3",
80
- "@expofp/wayfinding": "3.44.3"
72
+ "@expofp/config": "3.44.4",
73
+ "@expofp/debug": "3.44.4",
74
+ "@expofp/geometry": "3.44.4",
75
+ "@expofp/renderer": "3.44.4",
76
+ "@expofp/resolve": "3.44.4",
77
+ "@expofp/schema": "3.44.4",
78
+ "@expofp/ui": "3.44.4",
79
+ "@expofp/utils": "3.44.4",
80
+ "@expofp/wayfinding": "3.44.4"
81
81
  },
82
82
  "devDependencies": {
83
83
  "@babel/plugin-proposal-decorators": "^8.0.2",