@expofp/floorplan 3.11.11 → 3.11.12

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 (188) hide show
  1. package/dist/browser/{Button-DmRjgZlq.js → Button-CdChKHNd.js} +5 -5
  2. package/dist/browser/{CookieConsent-BJLQ1IVh.js → CookieConsent-DmWcbyRQ.js} +7 -7
  3. package/dist/browser/{Debug-aXNyyjt9.js → Debug-BQJRkSVw.js} +7 -7
  4. package/dist/browser/{Demo-Br_48fiP.js → Demo-Dh5hQ00u.js} +9 -9
  5. package/dist/browser/{Free-CPqp0AlV.js → Free-Be0wdt8h.js} +9 -9
  6. package/dist/browser/{Gallery-DybTjssU.js → Gallery-DsC-3InH.js} +9 -9
  7. package/dist/browser/{GpsLoader-4QcLlh63.js → GpsLoader-l-DhiN5_.js} +9 -9
  8. package/dist/browser/{KioskStore-CwHiYm_-.js → KioskStore-hBGigttj.js} +3 -3
  9. package/dist/browser/{MaplibreAdapter-Cts8OaYm.js → MaplibreAdapter-B2PgQxAb.js} +9 -9
  10. package/dist/browser/{ModalContainer-BG7y_r6K.js → ModalContainer-DngQzOVE.js} +10 -10
  11. package/dist/browser/{PermissionNotice-DwlyTCP5.js → PermissionNotice-Bstp1Ig2.js} +6 -6
  12. package/dist/browser/{SetKioskMode-CvWZVqNw.js → SetKioskMode-BXTIENxU.js} +8 -8
  13. package/dist/browser/{ShowKiosk-B60doTCj.js → ShowKiosk-CpIQKRDF.js} +10 -10
  14. package/dist/browser/{TouchHand-RuKsL9Wb.js → TouchHand-CZ4-CE4e.js} +4 -4
  15. package/dist/browser/{ViewerMenuPanel-Dhd7sWsi.js → ViewerMenuPanel-Dc7XYnXW.js} +9 -9
  16. package/dist/browser/{add-debug-secret-listener-BRMVj2bX.js → add-debug-secret-listener-DOVFjqJo.js} +1 -1
  17. package/dist/browser/{boolean-editor-DpmP-U1q.js → boolean-editor-B-S4WhPP.js} +9 -9
  18. package/dist/browser/{bootIntercom-C1k788Mx.js → bootIntercom-D41iCVYM.js} +2 -2
  19. package/dist/browser/{booth-by-xy-CP-xbS2r.js → booth-by-xy-S_lLb4ur.js} +6 -6
  20. package/dist/browser/{browser-BO13Zt0K.js → browser-pQxW93uF.js} +2 -2
  21. package/dist/browser/bundle.json +61 -61
  22. package/dist/browser/{classnames-BkI7JKtT.js → classnames-BeH2kA4o.js} +2 -2
  23. package/dist/browser/{client-C3mnANrs.js → client-Be_UxAZT.js} +4 -4
  24. package/dist/browser/{components-Cg-q6o6G.js → components-RZNETvKi.js} +39 -39
  25. package/dist/browser/{debug-overlay-BtQ-2fHJ.js → debug-overlay-DjwfpG69.js} +10 -10
  26. package/dist/browser/{debug-ui-CjzERnaO.js → debug-ui-D_afzMrh.js} +6 -6
  27. package/dist/browser/{dist-Bn-20xtu.js → dist-B-m8ZFBo.js} +3 -3
  28. package/dist/browser/{dist-Bn99_f_N.js → dist-CZz9piI4.js} +5 -5
  29. package/dist/browser/{dist-DO20gNXa.js → dist-DKu24Nie.js} +6 -6
  30. package/dist/browser/{efp-debug-init-Dif87fzy.js → efp-debug-init-B-EZE_S2.js} +2 -2
  31. package/dist/browser/{enum-editor-CDtermvp.js → enum-editor-BtYkUhft.js} +11 -11
  32. package/dist/browser/{es5-Dvav8ihy.js → es5-DPnfG3EX.js} +2 -2
  33. package/dist/browser/{event-not-found-CC0X5cEh.js → event-not-found-CE2zhFPJ.js} +1 -1
  34. package/dist/browser/{exports-D1Nac_lG.js → exports-BtXbxSeU.js} +1 -1
  35. package/dist/browser/{favicon-Bid1H1Jx.js → favicon-B7xwIKyS.js} +1 -1
  36. package/dist/browser/{fetch-retry.umd-ETXiLKL-.js → fetch-retry.umd-BiAebF_i.js} +2 -2
  37. package/dist/browser/{flex-B6lY7ZeN.js → flex-DGirEfRz.js} +5 -5
  38. package/dist/browser/{floorplan.loader-g70WUpYB.js → floorplan.loader-DSx2rwZS.js} +16 -12
  39. package/dist/browser/{floorplan.ready-CZQeXSCk.js → floorplan.ready-CX4L0Qyc.js} +22 -22
  40. package/dist/browser/{fuse-BlXhXkUq.js → fuse-BuZwVNBr.js} +2 -2
  41. package/dist/browser/{i18n-CU-BJOBJ.js → i18n-BqlnpLSm.js} +4 -4
  42. package/dist/browser/index.js +12 -12
  43. package/dist/browser/{index.module-X_SYTiEf.js → index.module-BktNOlw2.js} +4 -4
  44. package/dist/browser/{is-webview-zoAn2Bb4.js → is-webview-DxtfBbGj.js} +1 -1
  45. package/dist/browser/{jsx-runtime-uErsjC2N.js → jsx-runtime-DftMjMlZ.js} +2 -2
  46. package/dist/browser/{lib-HG4Gm1_q.js → lib-_QD5dt19.js} +4 -4
  47. package/dist/browser/{loadImage-vQZ4dq8v.js → loadImage-CvnSDOL0.js} +4 -4
  48. package/dist/browser/locales/ru.json +1 -1
  49. package/dist/browser/{logDeviceInfo-DHyhFPeb.js → logDeviceInfo-CiCKGxKy.js} +9 -9
  50. package/dist/browser/{main-CTeBxXij.js → main-C6h73Uc5.js} +1 -1
  51. package/dist/browser/{mobx-Cnw3_TUT.js → mobx-71cpvuRe.js} +4 -4
  52. package/dist/browser/{particles.min-aU8uhhyJ.js → particles.min-CiLQfUCo.js} +2 -2
  53. package/dist/browser/{prop-types-90IFj1US.js → prop-types-8E5fCOgQ.js} +2 -2
  54. package/dist/browser/{react-Cr4w3-kF.js → react-B9lmaQYI.js} +2 -2
  55. package/dist/browser/{react-dom-BqelOkAi.js → react-dom-CPWfZdj5.js} +3 -3
  56. package/dist/browser/{reset-all-settings-O_33LwUw.js → reset-all-settings-CAVnp-HU.js} +7 -7
  57. package/dist/browser/{rolldown-runtime-CMis-gOy.js → rolldown-runtime-CJax_ib9.js} +1 -1
  58. package/dist/browser/{settings-BGmwy5RM.js → settings-BufKqYwI.js} +2 -2
  59. package/dist/browser/{settings-item-CDNsKf0A.js → settings-item-D3AzjjoO.js} +6 -6
  60. package/dist/browser/{store-CcwBnHB2.js → store-DGdGzsa_.js} +1362 -1316
  61. package/dist/browser/{string-editor-01VxR0gn.js → string-editor-BEBEF1X7.js} +7 -7
  62. package/dist/browser/{theme-C1rg17tG.js → theme-DvIMSzdB.js} +8 -8
  63. package/dist/browser/{ui-gZWduhVn.js → ui-DIQ3vheI.js} +8 -8
  64. package/dist/browser/{useRenderTarget-gmu3Wzj0.js → useRenderTarget-hqd7cVeW.js} +4 -4
  65. package/dist/esm/floorplan.ready.js +1 -1
  66. package/dist/esm/utils/loadCustomCss.js +1 -1
  67. package/dist/esm/wayfinding/adapters/arbitraryPoint.d.ts +1 -1
  68. package/dist/esm/wayfinding/adapters/arbitraryPoint.js +1 -1
  69. package/dist/esm/wayfinding/adapters/boothToEndpoint.d.ts +4 -4
  70. package/dist/esm/wayfinding/adapters/canvasIconProvider.d.ts +1 -1
  71. package/dist/esm/wayfinding/adapters/floorContext.d.ts +1 -1
  72. package/dist/esm/wayfinding/adapters/graphDataSource.d.ts +1 -1
  73. package/dist/esm/wayfinding/adapters/positionInput.d.ts +8 -7
  74. package/dist/esm/wayfinding/adapters/positionInput.js +1 -1
  75. package/dist/esm/wayfinding/bindMobxReactions.d.ts +10 -23
  76. package/dist/esm/wayfinding/bindMobxReactions.js +1 -1
  77. package/dist/esm/wayfinding/createWayfinding.d.ts +1 -1
  78. package/dist/esm/wayfinding/createWayfinding.js +1 -1
  79. package/dist/esm/wayfinding/handlers/kioskHandler.d.ts +3 -3
  80. package/dist/esm/wayfinding/handlers/kioskHandler.js +1 -1
  81. package/dist/esm/wayfinding/handlers/yahHandler.d.ts +3 -4
  82. package/dist/esm/wayfinding/handlers/yahHandler.js +1 -1
  83. package/dist/esm/wayfinding/index.d.ts +4 -7
  84. package/dist/esm/wayfinding/index.js +1 -1
  85. package/dist/esm/wayfinding/storePorts.d.ts +60 -0
  86. package/package.json +6 -5
  87. package/dist/esm/wayfinding/core/__tests__/helpers.d.ts +0 -16
  88. package/dist/esm/wayfinding/core/__tests__/helpers.js +0 -1
  89. package/dist/esm/wayfinding/core/createWayfindingEngine.d.ts +0 -16
  90. package/dist/esm/wayfinding/core/createWayfindingEngine.js +0 -1
  91. package/dist/esm/wayfinding/core/geometry/pointInPolygon.d.ts +0 -11
  92. package/dist/esm/wayfinding/core/geometry/pointInPolygon.js +0 -1
  93. package/dist/esm/wayfinding/core/geometry/projectPointOnSegment.d.ts +0 -24
  94. package/dist/esm/wayfinding/core/geometry/projectPointOnSegment.js +0 -1
  95. package/dist/esm/wayfinding/core/graph/buildGraph.d.ts +0 -3
  96. package/dist/esm/wayfinding/core/graph/buildGraph.js +0 -1
  97. package/dist/esm/wayfinding/core/graph/buildNGraph.d.ts +0 -9
  98. package/dist/esm/wayfinding/core/graph/buildNGraph.js +0 -1
  99. package/dist/esm/wayfinding/core/graph/constants.d.ts +0 -17
  100. package/dist/esm/wayfinding/core/graph/constants.js +0 -1
  101. package/dist/esm/wayfinding/core/graph/findShortestPath.d.ts +0 -14
  102. package/dist/esm/wayfinding/core/graph/findShortestPath.js +0 -1
  103. package/dist/esm/wayfinding/core/graph/graphCache.d.ts +0 -7
  104. package/dist/esm/wayfinding/core/graph/graphCache.js +0 -1
  105. package/dist/esm/wayfinding/core/graph/graphHelpers.d.ts +0 -8
  106. package/dist/esm/wayfinding/core/graph/graphHelpers.js +0 -1
  107. package/dist/esm/wayfinding/core/graph/linkCost.d.ts +0 -4
  108. package/dist/esm/wayfinding/core/graph/linkCost.js +0 -1
  109. package/dist/esm/wayfinding/core/graph/pathfinder/aStarPathFinder.d.ts +0 -3
  110. package/dist/esm/wayfinding/core/graph/pathfinder/aStarPathFinder.js +0 -1
  111. package/dist/esm/wayfinding/core/graph/pathfinder/parseNodeId.d.ts +0 -9
  112. package/dist/esm/wayfinding/core/graph/pathfinder/parseNodeId.js +0 -1
  113. package/dist/esm/wayfinding/core/index.d.ts +0 -17
  114. package/dist/esm/wayfinding/core/index.js +0 -1
  115. package/dist/esm/wayfinding/core/position/distanceToRoute.d.ts +0 -3
  116. package/dist/esm/wayfinding/core/position/distanceToRoute.js +0 -1
  117. package/dist/esm/wayfinding/core/position/gpsThreshold.d.ts +0 -31
  118. package/dist/esm/wayfinding/core/position/gpsThreshold.js +0 -1
  119. package/dist/esm/wayfinding/core/position/rerouteController.d.ts +0 -10
  120. package/dist/esm/wayfinding/core/position/rerouteController.js +0 -1
  121. package/dist/esm/wayfinding/core/position/snapToRoute.d.ts +0 -4
  122. package/dist/esm/wayfinding/core/position/snapToRoute.js +0 -1
  123. package/dist/esm/wayfinding/core/position/splitRouteByPoint.d.ts +0 -6
  124. package/dist/esm/wayfinding/core/position/splitRouteByPoint.js +0 -1
  125. package/dist/esm/wayfinding/core/rendering/computeTrailPoints.d.ts +0 -19
  126. package/dist/esm/wayfinding/core/rendering/computeTrailPoints.js +0 -1
  127. package/dist/esm/wayfinding/core/rendering/computeTransitionPoints.d.ts +0 -31
  128. package/dist/esm/wayfinding/core/rendering/computeTransitionPoints.js +0 -1
  129. package/dist/esm/wayfinding/core/rendering/getVisibleRouteLines.d.ts +0 -11
  130. package/dist/esm/wayfinding/core/rendering/getVisibleRouteLines.js +0 -1
  131. package/dist/esm/wayfinding/core/rendering/normalizeRouteDirection.d.ts +0 -20
  132. package/dist/esm/wayfinding/core/rendering/normalizeRouteDirection.js +0 -1
  133. package/dist/esm/wayfinding/core/rendering/routeGeometry.d.ts +0 -11
  134. package/dist/esm/wayfinding/core/rendering/routeGeometry.js +0 -1
  135. package/dist/esm/wayfinding/core/routing/buildMultiPointRoute.d.ts +0 -11
  136. package/dist/esm/wayfinding/core/routing/buildMultiPointRoute.js +0 -1
  137. package/dist/esm/wayfinding/core/routing/buildRoute.d.ts +0 -9
  138. package/dist/esm/wayfinding/core/routing/buildRoute.js +0 -1
  139. package/dist/esm/wayfinding/core/routing/getRouteLength.d.ts +0 -3
  140. package/dist/esm/wayfinding/core/routing/getRouteLength.js +0 -1
  141. package/dist/esm/wayfinding/core/routing/graphPointResolvers.d.ts +0 -4
  142. package/dist/esm/wayfinding/core/routing/graphPointResolvers.js +0 -1
  143. package/dist/esm/wayfinding/core/routing/optimizeWaypointOrder.d.ts +0 -19
  144. package/dist/esm/wayfinding/core/routing/optimizeWaypointOrder.js +0 -1
  145. package/dist/esm/wayfinding/core/routing/resolveWaypointCandidates.d.ts +0 -18
  146. package/dist/esm/wayfinding/core/routing/resolveWaypointCandidates.js +0 -1
  147. package/dist/esm/wayfinding/core/routing/routeResult.d.ts +0 -4
  148. package/dist/esm/wayfinding/core/routing/routeResult.js +0 -1
  149. package/dist/esm/wayfinding/core/types.d.ts +0 -106
  150. package/dist/esm/wayfinding/renderer/createWayfindingRenderer.d.ts +0 -13
  151. package/dist/esm/wayfinding/renderer/createWayfindingRenderer.js +0 -1
  152. package/dist/esm/wayfinding/renderer/iconManager.d.ts +0 -37
  153. package/dist/esm/wayfinding/renderer/iconManager.js +0 -1
  154. package/dist/esm/wayfinding/renderer/index.d.ts +0 -3
  155. package/dist/esm/wayfinding/renderer/index.js +0 -1
  156. package/dist/esm/wayfinding/renderer/layerManager.d.ts +0 -26
  157. package/dist/esm/wayfinding/renderer/layerManager.js +0 -1
  158. package/dist/esm/wayfinding/renderer/lineAnimation.d.ts +0 -7
  159. package/dist/esm/wayfinding/renderer/lineAnimation.js +0 -1
  160. package/dist/esm/wayfinding/renderer/routeLineManager.d.ts +0 -41
  161. package/dist/esm/wayfinding/renderer/routeLineManager.js +0 -1
  162. package/dist/esm/wayfinding/renderer/trailManager.d.ts +0 -30
  163. package/dist/esm/wayfinding/renderer/trailManager.js +0 -1
  164. package/dist/esm/wayfinding/renderer/types.d.ts +0 -129
  165. package/dist/esm/wayfinding/renderer/types.js +0 -1
  166. package/dist/esm/wayfinding/runtime/createWayfindingRuntime.d.ts +0 -3
  167. package/dist/esm/wayfinding/runtime/createWayfindingRuntime.js +0 -1
  168. package/dist/esm/wayfinding/runtime/endpointView.d.ts +0 -18
  169. package/dist/esm/wayfinding/runtime/endpointView.js +0 -1
  170. package/dist/esm/wayfinding/runtime/getRouteLines.d.ts +0 -13
  171. package/dist/esm/wayfinding/runtime/getRouteLines.js +0 -1
  172. package/dist/esm/wayfinding/runtime/positionTrailView.d.ts +0 -50
  173. package/dist/esm/wayfinding/runtime/positionTrailView.js +0 -1
  174. package/dist/esm/wayfinding/runtime/positionView.d.ts +0 -23
  175. package/dist/esm/wayfinding/runtime/positionView.js +0 -1
  176. package/dist/esm/wayfinding/runtime/routeLinesView.d.ts +0 -18
  177. package/dist/esm/wayfinding/runtime/routeLinesView.js +0 -1
  178. package/dist/esm/wayfinding/runtime/routeRenderData.d.ts +0 -29
  179. package/dist/esm/wayfinding/runtime/routeRenderData.js +0 -1
  180. package/dist/esm/wayfinding/runtime/routeUpdate.d.ts +0 -15
  181. package/dist/esm/wayfinding/runtime/routeUpdate.js +0 -1
  182. package/dist/esm/wayfinding/runtime/trailView.d.ts +0 -20
  183. package/dist/esm/wayfinding/runtime/trailView.js +0 -1
  184. package/dist/esm/wayfinding/runtime/transitionView.d.ts +0 -17
  185. package/dist/esm/wayfinding/runtime/transitionView.js +0 -1
  186. package/dist/esm/wayfinding/runtime/types.d.ts +0 -82
  187. package/dist/esm/wayfinding/runtime/types.js +0 -1
  188. /package/dist/esm/wayfinding/{core/types.js → storePorts.js} +0 -0
@@ -1,11 +0,0 @@
1
- import { type PolygonVertex } from '../types';
2
- /** Convex polygon area via fan triangulation from vertex[0]. */
3
- export declare function computePolygonArea(polygon: readonly PolygonVertex[]): number;
4
- /**
5
- * Area-based point-in-polygon test with 1% relative tolerance. Convex polygons only.
6
- * Inside ⇒ sum of (point, vertex_i, vertex_{i+1}) triangle areas equals polygon area; outside ⇒ larger.
7
- * Tolerance includes points sitting fractionally outside the polygon (editor/float imprecision).
8
- * Pass `polygonArea` from {@link computePolygonArea} to skip recomputation in hot loops.
9
- */
10
- export declare function pointInPolygon(point: PolygonVertex, polygon: readonly PolygonVertex[], polygonArea?: number): boolean;
11
- //# sourceMappingURL=pointInPolygon.d.ts.map
@@ -1 +0,0 @@
1
- const e=.01;function f(r,t,n){return Math.abs(.5*(r.x*(t.y-n.y)+t.x*(n.y-r.y)+n.x*(r.y-t.y)))}export function computePolygonArea(r){if(r.length<3)return 0;let t=0;for(let n=1;n<r.length-1;n++)t+=f(r[0],r[n],r[n+1]);return t}export function pointInPolygon(r,t,n=computePolygonArea(t)){if(n===0)return!1;let u=0;for(let i=0,a=t.length-1;i<t.length;a=i++)u+=f(r,t[a],t[i]);return Math.abs(n-u)<n*.01}
@@ -1,24 +0,0 @@
1
- import { type Point2Like } from '@expofp/geometry';
2
- export interface SegmentProjection {
3
- readonly projected: {
4
- readonly x: number;
5
- readonly y: number;
6
- };
7
- readonly distance: number;
8
- readonly t: number;
9
- }
10
- /**
11
- * Projects `point` onto the segment `a`–`b`, clamping the parameter `t` to
12
- * `[0, 1]` so the result always lies on the segment (not its infinite line).
13
- *
14
- * `t` is the normalized position along the segment: `0` = `a`, `1` = `b`.
15
- * For a zero-length segment (`a` equals `b`) the projection collapses to `a`
16
- * with `t = 0`.
17
- *
18
- * Thin wrapper over `@expofp/geometry`'s `lineProjectPoint`; the projected
19
- * position is re-shaped to a plain `{ x, y }` to preserve the legacy
20
- * {@link SegmentProjection} contract (callers depend on a bare point, not a
21
- * `Point` instance).
22
- */
23
- export declare function projectPointOnSegment(point: Point2Like, a: Point2Like, b: Point2Like): SegmentProjection;
24
- //# sourceMappingURL=projectPointOnSegment.d.ts.map
@@ -1 +0,0 @@
1
- import{lineProjectPoint as p}from"@expofp/geometry";export function projectPointOnSegment(e,o,n){const{projected:t,distance:r,t:c}=p({p0:o,p1:n},e);return{projected:{x:t.x,y:t.y},distance:r,t:c}}
@@ -1,3 +0,0 @@
1
- import { type GraphBuildOptions, type GraphDataSource, type GraphInstance, type PathFinder } from '../types';
2
- export declare function buildGraph(dataSource: GraphDataSource, pathFinder: PathFinder, options: GraphBuildOptions): GraphInstance;
3
- //# sourceMappingURL=buildGraph.d.ts.map
@@ -1 +0,0 @@
1
- export function buildGraph(l,i,e){return i.build(l.getLines(),{oriented:e.oriented??!0,onlyAccessible:e.onlyAccessible??!1}),{finder:i,dataSource:l,options:e}}
@@ -1,9 +0,0 @@
1
- import { type Graph } from 'ngraph.graph';
2
- import { type GraphLine, type PathFinderOptions } from '../types';
3
- interface LinkData {
4
- distance: number;
5
- }
6
- /** Builds an ngraph instance from route lines, filtering and linking per options. */
7
- export declare function buildNGraph(lines: GraphLine[], options: PathFinderOptions): Graph<unknown, LinkData>;
8
- export {};
9
- //# sourceMappingURL=buildNGraph.d.ts.map
@@ -1 +0,0 @@
1
- import p from"ngraph.graph";import{toNodeId as c}from"./graphHelpers";import{linkCost as a}from"./linkCost";export function buildNGraph(e,d){const{oriented:s,onlyAccessible:f}=d,n=p();for(const o of e){if(f&&o.unaccessible)continue;const t=c(o.p0),i=c(o.p1),r=a(o);n.addLink(t,i,{distance:r}),s&&!o.unidirection&&n.addLink(i,t,{distance:r})}return n}
@@ -1,17 +0,0 @@
1
- /**
2
- * Default A* cost for a virtual (floor-transition) link. Non-zero so a floor
3
- * change costs more than any same-floor detour; otherwise floor changes are free
4
- * and a route between two points on one floor can detour through another.
5
- */
6
- export declare const VIRTUAL_LINE_PENALTY = 10000;
7
- /**
8
- * Fallback line weight when `line.weight` is 0 (meaning "not set" in floorplan data,
9
- * not "free passage").
10
- */
11
- export declare const DEFAULT_LINE_WEIGHT = 4;
12
- /**
13
- * Multiplier applied to a graph edge cost whenever the route changes direction at a node
14
- * (A* turn penalty).
15
- */
16
- export declare const TURN_PENALTY = 1.01;
17
- //# sourceMappingURL=constants.d.ts.map
@@ -1 +0,0 @@
1
- export const VIRTUAL_LINE_PENALTY=1e4,DEFAULT_LINE_WEIGHT=4,TURN_PENALTY=1.01;
@@ -1,14 +0,0 @@
1
- import { type GraphInstance, type GraphLine, type RoutePoint, type ShortestPathResult } from '../types';
2
- /** Computes the weighted path cost matching the graph link distance formula. */
3
- export declare function computeWeightedPathCost(points: RoutePoint[], lines: GraphLine[]): number;
4
- /**
5
- * Finds the shortest path between candidate point sets by trying all from×to
6
- * pairs and picking the one with the lowest weighted cost.
7
- *
8
- * Complexity is O(N×M × A*) where N = |from|, M = |to|. In practice N, M ≤ 5
9
- * (rect-based booth candidates) or = 1 (nearest-point fallback), so the brute
10
- * force approach is acceptable. Multi-source A* would reduce this to a single
11
- * traversal but adds significant implementation complexity.
12
- */
13
- export declare function findShortestPath(graph: GraphInstance, from: RoutePoint[], to: RoutePoint[]): ShortestPathResult | null;
14
- //# sourceMappingURL=findShortestPath.d.ts.map
@@ -1 +0,0 @@
1
- import{getRouteLength as p}from"../routing/getRouteLength";import{buildRouteSegments as P,findLineByEndpoints as b,toNodeId as m}from"./graphHelpers";import{linkCost as x}from"./linkCost";function y(t,o,n){return{layer:t,x:o,y:n}}export function computeWeightedPathCost(t,o){let n=0;for(let e=1;e<t.length;e++){const i=b(o,t[e-1],t[e]);i&&(n+=x(i))}return n}export function findShortestPath(t,o,n){const e=t.dataSource.getLines();let i=null,d=1/0;for(const a of o)for(const g of n){const s=m(a),r=m(g);if(!t.finder.hasNode(s)||!t.finder.hasNode(r)){console.debug(`WF. findShortestPath: node not in graph, skipping pair ${s} \u2192 ${r}`);continue}const u=t.finder.find(s,r);if(!u.length)continue;const l=u.map(c=>y(c.layer,c.x,c.y)),f=P(l,e);if(!f.length)continue;const h=computeWeightedPathCost(l,e);h<d&&(d=h,i={lines:f,distance:p(f)})}return i}
@@ -1,7 +0,0 @@
1
- import { type GraphDataSource, type GraphInstance } from '../types';
2
- interface GraphCache {
3
- getOrBuild(dataSource: GraphDataSource, onlyAccessible: boolean): GraphInstance;
4
- }
5
- export declare function createGraphCache(): GraphCache;
6
- export {};
7
- //# sourceMappingURL=graphCache.d.ts.map
@@ -1 +0,0 @@
1
- import{buildGraph as i}from"./buildGraph";import{createAStarPathFinder as u}from"./pathfinder/aStarPathFinder";export function createGraphCache(){let r=null,t=!1;return{getOrBuild(a,e){if(r&&t===e)return r;const n=u();return r=i(a,n,{oriented:!0,onlyAccessible:e}),t=e,r}}}
@@ -1,8 +0,0 @@
1
- import { type GraphLine, type RouteLine, type RoutePoint } from '../types';
2
- export declare const toNodeId: (p: RoutePoint) => string;
3
- export declare const arePointsClose: (p1: RoutePoint, p2: RoutePoint) => boolean;
4
- export declare const matchesLine: (line: GraphLine, p0: RoutePoint, p1: RoutePoint) => boolean;
5
- export declare function findLineByEndpoints(lines: GraphLine[], p0: RoutePoint, p1: RoutePoint): GraphLine | undefined;
6
- export declare function canMergeSegments(lastSegment: RouteLine, segment: RouteLine): boolean;
7
- export declare function buildRouteSegments(points: RoutePoint[], lines: GraphLine[]): RouteLine[];
8
- //# sourceMappingURL=graphHelpers.d.ts.map
@@ -1 +0,0 @@
1
- import{degToRad as a,lineAngle as u,pointDistance as f}from"@expofp/geometry";export const toNodeId=t=>`${t.layer}_${t.x}_${t.y}`;const p=1;export const arePointsClose=(t,n)=>t.layer===n.layer&&f(t,n)<=p,matchesLine=(t,n,e)=>arePointsClose(t.p0,n)&&arePointsClose(t.p1,e)||arePointsClose(t.p0,e)&&arePointsClose(t.p1,n);export function findLineByEndpoints(t,n,e){return t.find(o=>matchesLine(o,n,e))}const d=a(5);export function canMergeSegments(t,n){if(t.virtual!==n.virtual)return!1;const e=u(t.p0,t.p1),o=u(n.p0,n.p1);let r=Math.abs(o-e);return r>Math.PI&&(r=2*Math.PI-r),r<=d}export function buildRouteSegments(t,n){const e=[];for(let o=1;o<t.length;o++){const r=t[o-1],i=t[o],l=findLineByEndpoints(n,r,i);if(!l){console.warn(`WF: buildRouteSegments \u2014 no line found between ${toNodeId(r)} and ${toNodeId(i)}`);continue}const s={p0:r,p1:i,virtual:l.virtual},c=e[e.length-1];c&&canMergeSegments(c,s)?e[e.length-1]={...c,p1:s.p1}:e.push(s)}return e}
@@ -1,4 +0,0 @@
1
- import { type GraphLine } from '../types';
2
- /** Weighted cost of a route line for A* graph edge (legacy formula). */
3
- export declare function linkCost(line: GraphLine): number;
4
- //# sourceMappingURL=linkCost.d.ts.map
@@ -1 +0,0 @@
1
- import{pointDistance as r}from"@expofp/geometry";import{DEFAULT_LINE_WEIGHT as o,VIRTUAL_LINE_PENALTY as i}from"./constants";export function linkCost(t){return t.virtual?t.virtualLength??i:r(t.p0,t.p1)/(t.weight||o)}
@@ -1,3 +0,0 @@
1
- import { type PathFinder } from '../../types';
2
- export declare function createAStarPathFinder(): PathFinder;
3
- //# sourceMappingURL=aStarPathFinder.d.ts.map
@@ -1 +0,0 @@
1
- import{lineAngle as c}from"@expofp/geometry";import{buildNGraph as h}from"../buildNGraph";import{TURN_PENALTY as y}from"../constants";import g from"../utils/a-star/a-star";import{parseNodeId as f}from"./parseNodeId";function x(){return function(n,e,r){let t=1;if(e.parent){const[,a,l]=f(e.parent.node.id),[,o,d]=f(e.node.id),[,u,s]=f(n.id),p=c({x:a,y:l},{x:o,y:d}),m=c({x:o,y:d},{x:u,y:s});p!==m&&(t=y)}return t*r.data.distance}}export function createAStarPathFinder(){let i=null,n=null;return{build(e,r){n=h(e,r),i=g(n,{oriented:r.oriented,distance:x()})},hasNode(e){return n?!!n.hasNode(e):!1},find(e,r){if(!i)return[];const t=i.find(e,r);return t.length?t.map(a=>{const[l,o,d]=f(a.id);return{id:a.id,layer:l,x:o,y:d}}):[]}}}
@@ -1,9 +0,0 @@
1
- /**
2
- * Decodes a node ID created by `pointId` back into [layer, x, y].
3
- *
4
- * Point IDs are formatted as "{layer}_{x}_{y}". Since layer names may
5
- * contain underscores (e.g. "floor_1"), we parse from the right where
6
- * x and y are always the last two segments.
7
- */
8
- export declare function parseNodeId(id: string): [string, number, number];
9
- //# sourceMappingURL=parseNodeId.d.ts.map
@@ -1 +0,0 @@
1
- export function parseNodeId(e){const t=e.lastIndexOf("_"),s=e.lastIndexOf("_",t-1);if(s===-1)throw new Error(`WF: invalid node ID format "${e}", expected "{layer}_{x}_{y}"`);return[e.substring(0,s),parseFloat(e.substring(s+1,t)),parseFloat(e.substring(t+1))]}
@@ -1,17 +0,0 @@
1
- export type { Route, WayfindingEngine } from './createWayfindingEngine';
2
- export { createWayfindingEngine } from './createWayfindingEngine';
3
- export type { GraphDataSource, GraphLine, RouteEndpoint, RouteLine, RoutePoint, RouteSnapResult, SnapToRouteConfig, } from './types';
4
- export type { SegmentProjection } from './geometry/projectPointOnSegment';
5
- export { projectPointOnSegment } from './geometry/projectPointOnSegment';
6
- export { computeTrailPoints } from './rendering/computeTrailPoints';
7
- export type { TransitionPointDef } from './rendering/computeTransitionPoints';
8
- export { computeTransitionPoints } from './rendering/computeTransitionPoints';
9
- export { normalizeRouteDirection } from './rendering/normalizeRouteDirection';
10
- export { computeBoundingBox } from './rendering/routeGeometry';
11
- export { getRouteLength } from './routing/getRouteLength';
12
- export { getThresholdFromMetersToSvg, getThresholdSafe, resolveRerouteThresholdSvg, SNAP_THRESHOLD_METERS, } from './position/gpsThreshold';
13
- export type { RerouteController } from './position/rerouteController';
14
- export { createRerouteController } from './position/rerouteController';
15
- export { snapToRoute } from './position/snapToRoute';
16
- export { splitRouteByPoint } from './position/splitRouteByPoint';
17
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- export{createWayfindingEngine}from"./createWayfindingEngine";export{projectPointOnSegment}from"./geometry/projectPointOnSegment";export{computeTrailPoints}from"./rendering/computeTrailPoints";export{computeTransitionPoints}from"./rendering/computeTransitionPoints";export{normalizeRouteDirection}from"./rendering/normalizeRouteDirection";export{computeBoundingBox}from"./rendering/routeGeometry";export{getRouteLength}from"./routing/getRouteLength";export{getThresholdFromMetersToSvg,getThresholdSafe,resolveRerouteThresholdSvg,SNAP_THRESHOLD_METERS}from"./position/gpsThreshold";export{createRerouteController}from"./position/rerouteController";export{snapToRoute}from"./position/snapToRoute";export{splitRouteByPoint}from"./position/splitRouteByPoint";
@@ -1,3 +0,0 @@
1
- import type { RouteLine, RoutePoint } from '../types';
2
- export declare function distancePointToRouteOnLayer(point: RoutePoint, lines: RouteLine[]): number;
3
- //# sourceMappingURL=distanceToRoute.d.ts.map
@@ -1 +0,0 @@
1
- import{pointDistance as f}from"@expofp/geometry";function d(n,c,e,t,r,l){const i=r-e,s=l-t,a=n-e,u=c-t,y=i*i+s*s;if(y===0)return f({x:n,y:c},{x:e,y:t});let o=(a*i+u*s)/y;o<0?o=0:o>1&&(o=1);const x=e+o*i,b=t+o*s;return f({x:n,y:c},{x,y:b})}export function distancePointToRouteOnLayer(n,c){let e=1/0;for(const t of c){if(n.layer&&(t.p0.layer!==n.layer||t.p1.layer!==n.layer))continue;const r=d(n.x,n.y,t.p0.x,t.p0.y,t.p1.x,t.p1.y);r<e&&(e=r)}return e}
@@ -1,31 +0,0 @@
1
- export declare const SNAP_THRESHOLD_METERS = 7.5;
2
- interface GpsProjectionConfig {
3
- p0: {
4
- x: number;
5
- y: number;
6
- lat: number;
7
- lng: number;
8
- };
9
- p2: {
10
- x: number;
11
- y: number;
12
- lat: number;
13
- lng: number;
14
- };
15
- }
16
- export declare const getThresholdSafe: (value?: number) => number | undefined;
17
- export declare function getThresholdFromMetersToSvg({ thresholdInMeters, gpsConfig, }: {
18
- thresholdInMeters?: number;
19
- gpsConfig?: GpsProjectionConfig;
20
- }): number;
21
- /**
22
- * Resolves the reroute threshold (SVG units) for the active plan: honours
23
- * `gpsConfig.rerouteThreshold` (meters) override, otherwise falls back to
24
- * {@link REROUTE_THRESHOLD_METERS}. Returns plan-scaled SVG units suitable
25
- * for `shouldReroute`.
26
- */
27
- export declare function resolveRerouteThresholdSvg(gpsConfig?: GpsProjectionConfig & {
28
- rerouteThreshold?: number;
29
- }): number;
30
- export {};
31
- //# sourceMappingURL=gpsThreshold.d.ts.map
@@ -1 +0,0 @@
1
- import{haversineDistance as i,pointDistance as c}from"@expofp/geometry";export const SNAP_THRESHOLD_METERS=7.5;const u=15,S=20;function h(t,r){const{p0:e,p2:o}=r,n=i(e,o),s=c(e,o);return!n||!s?0:t*(s/n)}export const getThresholdSafe=t=>{if(typeof t=="number"&&Number.isFinite(t))return t};export function getThresholdFromMetersToSvg({thresholdInMeters:t,gpsConfig:r}){let e=0;return t&&r&&(e=h(t,r)),e||(e=S),e}export function resolveRerouteThresholdSvg(t){const r=getThresholdSafe(t?.rerouteThreshold)||u;return getThresholdFromMetersToSvg({thresholdInMeters:r,gpsConfig:t})}
@@ -1,10 +0,0 @@
1
- import type { RouteLine, RoutePoint } from '../types';
2
- /** Decides whether the current GPS tick warrants rebuilding the route. */
3
- export interface RerouteController {
4
- /** Evaluates the current tick. Returns `true` when the caller should rebuild the route. */
5
- shouldReroute(position: RoutePoint, routeLines: RouteLine[]): boolean;
6
- }
7
- /** `thresholdSvg` — plan-scale-aware off-route distance (SVG units), produced by
8
- * `resolveRerouteThresholdSvg` and passed in by the composition root. */
9
- export declare function createRerouteController(thresholdSvg: number): RerouteController;
10
- //# sourceMappingURL=rerouteController.d.ts.map
@@ -1 +0,0 @@
1
- import{distancePointToRouteOnLayer as a}from"./distanceToRoute";export function createRerouteController(n){return{shouldReroute(t,e){if(!e.length)return!1;const r=t.layer;return r&&!e.some(o=>o.p0.layer===r&&o.p1.layer===r)?!0:a(t,e)>n}}}
@@ -1,4 +0,0 @@
1
- import { type RouteLine, type RoutePoint, type RouteSnapResult, type SnapToRouteConfig } from '../types';
2
- export { SNAP_THRESHOLD_METERS } from './gpsThreshold';
3
- export declare function snapToRoute(position: RoutePoint, routeLines: RouteLine[], config: SnapToRouteConfig): RouteSnapResult;
4
- //# sourceMappingURL=snapToRoute.d.ts.map
@@ -1 +0,0 @@
1
- import{pointDistance as P}from"@expofp/geometry";import{pointInPolygon as E}from"../geometry/pointInPolygon";import{projectPointOnSegment as v}from"../geometry/projectPointOnSegment";function F(e,a){let p=0;for(const n of e){const o=P(n.p0,n.p1);if(o!==0){if(p+o>=a){const r=(a-p)/o,h=n.p0.x+(n.p1.x-n.p0.x)*r,s=n.p0.y+(n.p1.y-n.p0.y)*r;return{point:{layer:n.p0.layer,x:h,y:s},line:n}}p+=o}}const i=e[e.length-1];return{point:{layer:i.p0.layer,x:i.p1.x,y:i.p1.y},line:i}}export{SNAP_THRESHOLD_METERS}from"./gpsThreshold";export function snapToRoute(e,a,p){const i=a.length;if(!i)return{snapped:!1};const{snapThreshold:n,to:o,from:r,minRemainingUnits:h=.5}=p,s=e.layer||null;let D=1/0,m=null,u=0,b=s==null;for(let t=0;t<i;t++){const y=a[t],{p0:l,p1:f}=y,g=P(l,f);if(g===0)continue;if(s!=null&&String(l.layer)!==s){u+=g;continue}b=!0;const x=v({x:e.x,y:e.y},l,f);x.distance<D&&(D=x.distance,m={segmentIndex:t,t:x.t,distanceFromPolylineStart:u+g*x.t}),u+=g}if(s!=null&&!b)return{snapped:!1};const c=u,A=a[0].p0,I=a[i-1].p1,L=P(o,A),O=P(o,I),S=L<=O,T=Math.min(h,c);if(r?.bounds&&(s==null||!r.layer||r.layer===s)&&E({x:e.x,y:e.y},r.bounds)){const t=c,y=S?t:c-t,l=F(a,y);return{snapped:!0,snappedPoint:l.point,snappedLine:l.line,distance:t}}if(o.bounds&&(s==null||!o.layer||o.layer===s)&&E({x:e.x,y:e.y},o.bounds)){const t=T,y=c-t,f=F(a,S?t:y);return{snapped:!0,snappedPoint:f.point,snappedLine:f.line,distance:t}}if(!m||D>n)return{snapped:!1};let d=S?m.distanceFromPolylineStart:c-m.distanceFromPolylineStart;d<T&&(d=T);const j=c-d,R=F(a,S?d:j);return{snapped:!0,snappedPoint:R.point,snappedLine:R.line,distance:d}}
@@ -1,6 +0,0 @@
1
- import { type RouteLine, type RoutePoint } from '../types';
2
- export declare function splitRouteByPoint(routeLines: RouteLine[], snapPoint: RoutePoint): {
3
- passed: RouteLine[];
4
- remaining: RouteLine[];
5
- };
6
- //# sourceMappingURL=splitRouteByPoint.d.ts.map
@@ -1 +0,0 @@
1
- export function splitRouteByPoint(t,c){let n=-1,e=0,f=1/0;for(let l=0;l<t.length;l++){const p=t[l];if(p.p0.layer!==c.layer)continue;const s=p.p1.x-p.p0.x,y=p.p1.y-p.p0.y,r=s*s+y*y;if(r===0)continue;const x=((c.x-p.p0.x)*s+(c.y-p.p0.y)*y)/r;if(x<-1e-6||x>1+1e-6)continue;const a=Math.min(1,Math.max(0,x)),m=p.p0.x+a*s,g=p.p0.y+a*y,o=(c.x-m)**2+(c.y-g)**2;o<f&&(f=o,n=l,e=a)}if(n===-1)return{passed:[],remaining:t};if(e<1e-6)return{passed:t.slice(0,n),remaining:t.slice(n)};if(e>1-1e-6)return{passed:t.slice(0,n+1),remaining:t.slice(n+1)};const i=t[n],d={layer:i.p0.layer,x:i.p0.x+e*(i.p1.x-i.p0.x),y:i.p0.y+e*(i.p1.y-i.p0.y)};return{passed:[...t.slice(0,n),{...i,p1:d}],remaining:[{...i,p0:d},...t.slice(n+1)]}}
@@ -1,19 +0,0 @@
1
- import { type Point2Like } from '@expofp/geometry';
2
- /**
3
- * Generates evenly-spaced points along a quadratic Bézier curve
4
- * between two points. Used for dotted trail visualization when
5
- * a point (kiosk, GPS, marker, etc.) is far from the route.
6
- *
7
- * @param from - Start point (e.g. route endpoint)
8
- * @param to - End point (e.g. off-route position)
9
- * @param interval - Spacing between points in SVG units (default: 8)
10
- * @param curvature - Arc height as fraction of distance (0 = straight, 0.4 = default arc)
11
- */
12
- export declare function computeTrailPoints(from: {
13
- x: number;
14
- y: number;
15
- }, to: {
16
- x: number;
17
- y: number;
18
- }, interval?: number, curvature?: number): Point2Like[];
19
- //# sourceMappingURL=computeTrailPoints.d.ts.map
@@ -1 +0,0 @@
1
- import{pointDistance as a}from"@expofp/geometry";const y=.4,T=8;export function computeTrailPoints(c,i,o=T,t=y){const n=a(i,c);if(n===0||o<=0)return[];const e=Math.max(Math.ceil(n/o)+1,2),u={x:(c.x+i.x)/2,y:(c.y+i.y)/2-n*t},r=[];for(let s=0;s<e;s++){const x=s/(e-1);r.push(A(c,u,i,x))}return r}function A(c,i,o,t){const n=1-t;return{x:n*n*c.x+2*n*t*i.x+t*t*o.x,y:n*n*c.y+2*n*t*i.y+t*t*o.y}}
@@ -1,31 +0,0 @@
1
- import { type RouteLine } from '../types';
2
- interface TransitionPointsInput {
3
- /** Full route including virtual lines */
4
- readonly routeLines: RouteLine[];
5
- /** Floor to scope to. `null` = no floor scoping (returns transitions on every floor). */
6
- readonly currentLayerName: string | null;
7
- /** Floor names ordered low → high (from layerStore.floors) */
8
- readonly floorOrder: string[];
9
- }
10
- export interface TransitionPointDef {
11
- readonly x: number;
12
- readonly y: number;
13
- /** Floor where the icon is rendered */
14
- readonly layer: string;
15
- /** Floor the transition leads to (for click-to-switch) */
16
- readonly targetLayer: string;
17
- readonly direction: 'up' | 'down' | 'neutral';
18
- /** Whether this is an entry (arriving from another floor) or exit (leaving to another floor) in walking direction */
19
- readonly role: 'entry' | 'exit';
20
- }
21
- /**
22
- * Computes deduplicated, correctly-directed transition points for the
23
- * current floor.
24
- *
25
- * Works directly with the full `routeLines` array (including virtual lines)
26
- * and does NOT depend on `routeNextFloor` — the target floor is read from
27
- * the opposite endpoint of each virtual line.
28
- */
29
- export declare function computeTransitionPoints(input: TransitionPointsInput): TransitionPointDef[];
30
- export {};
31
- //# sourceMappingURL=computeTransitionPoints.d.ts.map
@@ -1 +0,0 @@
1
- function s(a,n){return a.toLowerCase()===n.toLowerCase()}function d(a,n){return a.findIndex(r=>s(r,n))}function C(a,n,r){const o=d(a,n),t=d(a,r);return o===-1||t===-1?"neutral":t>o?"up":"down"}function w(a,n,r){return a.find(o=>s(o.p0.layer,n)?!r.has(o.p1.layer.toLowerCase()):s(o.p1.layer,n)?!r.has(o.p0.layer.toLowerCase()):!1)}function h(a,n,r,o){if(n.has(o.toLowerCase()))return o;let t=o;const l=new Set([r.toLowerCase(),t.toLowerCase()]);let u=w(a,t,l);for(;u&&(t=s(u.p0.layer,t)?u.p1.layer:u.p0.layer,!n.has(t.toLowerCase()));)l.add(t.toLowerCase()),u=w(a,t,l);return t}export function computeTransitionPoints(a){const{routeLines:n,currentLayerName:r,floorOrder:o}=a,t=n.filter(e=>e.virtual&&!s(e.p0.layer,e.p1.layer)),l=new Set;for(const e of n)e.virtual||(l.add(e.p0.layer.toLowerCase()),l.add(e.p1.layer.toLowerCase()));const c=(r?t.filter(e=>s(e.p0.layer,r)||s(e.p1.layer,r)):t).map(e=>{const i=r?s(e.p0.layer,r):!0,y=i?e.p0:e.p1,x=i?e.p1:e.p0,p=h(t,l,y.layer,x.layer);return{x:y.x,y:y.y,layer:y.layer,targetLayer:p,direction:C(o,y.layer,p),role:r&&i?"entry":"exit"}}),L=new Set(c.filter(e=>e.role==="exit").map(e=>`${e.x}:${e.y}`)),f=new Set;return c.filter(e=>{const i=`${e.x}:${e.y}`;return e.role==="entry"&&L.has(i)||f.has(i)?!1:(f.add(i),!0)})}
@@ -1,11 +0,0 @@
1
- import { type RouteLine } from '../types';
2
- /**
3
- * Filters route lines for a given floor: removes virtual segments
4
- * and keeps only lines on the specified floor.
5
- *
6
- * @param routeLines - All route lines (may span multiple floors)
7
- * @param currentFloor - Floor to filter by, or `null` to return all non-virtual lines
8
- * (single-floor plans / "show all" mode)
9
- */
10
- export declare function getVisibleRouteLines(routeLines: readonly RouteLine[], currentFloor: string | null): RouteLine[];
11
- //# sourceMappingURL=getVisibleRouteLines.d.ts.map
@@ -1 +0,0 @@
1
- export function getVisibleRouteLines(t,e){const i=[];for(const n of t)n.virtual||e!==null&&n.p0.layer!==e||i.push(n);return i}
@@ -1,20 +0,0 @@
1
- import type { RouteLine, RoutePoint } from '../types';
2
- /**
3
- * Ensures that `routeLines` run in the from→to direction.
4
- *
5
- * A* returns paths in target→source order. For rendering (arrow animation,
6
- * route progress split) and remaining-distance computation the lines must
7
- * go from the origin to the destination.
8
- *
9
- * Direction is decided by projecting `from` (or `to` as a fallback) onto
10
- * `routeLines`: if the anchor lands closer to the polyline end than to
11
- * its start, the array is reversed and each segment's endpoints are
12
- * flipped to keep continuity.
13
- *
14
- * @param routeLines Lines to normalize.
15
- * @param from Route origin (user-selected "from" point).
16
- * @param to Route destination (user-selected "to" point).
17
- * @returns Lines guaranteed to run from→to, or the original array unchanged.
18
- */
19
- export declare function normalizeRouteDirection(routeLines: RouteLine[], from: RoutePoint, to: RoutePoint): RouteLine[];
20
- //# sourceMappingURL=normalizeRouteDirection.d.ts.map
@@ -1 +0,0 @@
1
- import{pointDistance as g}from"@expofp/geometry";function y(t,s,f){let r=0,a=1/0,c=1/0;const p=f.reduce((e,n)=>e+n,0);for(let e=0;e<s.length;e++){const n=s[e],o=f[e];if(t.layer&&n.p0.layer!==t.layer){r+=o;continue}const d=n.p1.x-n.p0.x,i=n.p1.y-n.p0.y,u=d*d+i*i;if(u<1e-10){r+=o;continue}const h=((t.x-n.p0.x)*d+(t.y-n.p0.y)*i)/u,m=Math.max(0,Math.min(1,h)),x=n.p0.x+d*m,S=n.p0.y+i*m,l=Math.hypot(t.x-x,t.y-S);l<a&&(a=l,c=r+o*m),r+=o}return{found:c!==1/0,fromStart:c,total:p}}export function normalizeRouteDirection(t,s,f){const r=t.map(o=>g(o.p0,o.p1)),a=y(s,t,r),c=a.found?a:y(f,t,r);if(!c.found)return t;const p=c.fromStart,e=c.total-c.fromStart;return(a.found?e<p:p<e)?t.slice().reverse().map(o=>({...o,p0:o.p1,p1:o.p0})):t}
@@ -1,11 +0,0 @@
1
- import { Box } from '@expofp/geometry';
2
- /**
3
- * Computes the axis-aligned bounding box of a set of points.
4
- * Always returns a {@link Box}. An empty array returns `Box.fromPoints([])` — a zero-size
5
- * box at the origin — which is distinguished from a real route bbox via `.isEmpty()`.
6
- */
7
- export declare function computeBoundingBox(points: readonly {
8
- x: number;
9
- y: number;
10
- }[]): Box;
11
- //# sourceMappingURL=routeGeometry.d.ts.map
@@ -1 +0,0 @@
1
- import{Box as n}from"@expofp/geometry";export function computeBoundingBox(o){return n.fromPoints(o)}
@@ -1,11 +0,0 @@
1
- import { type GraphInstance, type RoutePoint, type RouteResult } from '../types';
2
- /**
3
- * Builds a route through an ordered sequence of pre-resolved candidate groups.
4
- * Each group is a `RoutePoint[]` — the candidate graph points for one waypoint.
5
- *
6
- * Intermediate groups with no candidates (empty arrays) are silently skipped —
7
- * adjacent groups are connected directly. This matches the legacy behavior
8
- * where unreachable waypoints were omitted.
9
- */
10
- export declare function buildMultiPointRoute(graph: GraphInstance, candidateGroups: RoutePoint[][]): RouteResult;
11
- //# sourceMappingURL=buildMultiPointRoute.d.ts.map
@@ -1 +0,0 @@
1
- import{buildRoute as u}from"./buildRoute";import{emptyResult as o}from"./routeResult";export function buildMultiPointRoute(i,r){if(r.length<2)return o();const e=r.filter((t,l)=>l===0||l===r.length-1?!0:t.length>0);if(e.length<2)return o();if(e.length===2)return u(i,e[0],e[1]);const n=[];for(let t=0;t<e.length-1;t++)n.push(u(i,e[t],e[t+1]));n.reverse();const s=n.flatMap(t=>t.lines),f=n.reduce((t,l)=>t+l.totalDistance,0);return{lines:s,totalDistance:f}}
@@ -1,9 +0,0 @@
1
- import { type GraphInstance, type RoutePoint, type RouteResult } from '../types';
2
- /**
3
- * Builds a route between two sets of candidate graph points.
4
- *
5
- * This is pure pathfinding — it does not resolve waypoints to graph points.
6
- * Resolution is the caller's responsibility (see `getGraphLines`).
7
- */
8
- export declare function buildRoute(graph: GraphInstance, fromCandidates: RoutePoint[], toCandidates: RoutePoint[]): RouteResult;
9
- //# sourceMappingURL=buildRoute.d.ts.map
@@ -1 +0,0 @@
1
- import{findShortestPath as l}from"../graph/findShortestPath";import{emptyResult as n}from"./routeResult";export function buildRoute(i,e,r){if(!e.length||!r.length)return n();const t=l(i,e,r);return t?{lines:t.lines,totalDistance:t.distance}:n()}
@@ -1,3 +0,0 @@
1
- import { type RouteLine } from '../types';
2
- export declare function getRouteLength(routeLines: RouteLine[]): number;
3
- //# sourceMappingURL=getRouteLength.d.ts.map
@@ -1 +0,0 @@
1
- import{pointDistance as r}from"@expofp/geometry";export function getRouteLength(e){return e.reduce((o,t)=>o+r(t.p0,t.p1),0)}
@@ -1,4 +0,0 @@
1
- import { type GraphDataSource, type PolygonVertex, type RoutePoint } from '../types';
2
- /** Graph endpoints inside a convex polygon (e.g. booth rect), filtered by layer. */
3
- export declare function findGraphPointsInPolygon(dataSource: GraphDataSource, polygon: readonly PolygonVertex[], layer?: string): RoutePoint[];
4
- //# sourceMappingURL=graphPointResolvers.d.ts.map
@@ -1 +0,0 @@
1
- import{computePolygonArea as i,pointInPolygon as p}from"../geometry/pointInPolygon";export function findGraphPointsInPolygon(r,o,n){const e=i(o);return r.getLineEnds().filter(t=>(!n||t.layer===n)&&p(t,o,e))}
@@ -1,19 +0,0 @@
1
- interface Point {
2
- cx: number;
3
- cy: number;
4
- }
5
- /**
6
- * Optimizes waypoint ordering to minimize total travel distance.
7
- * Nearest neighbor O(n²) + 2-opt refinement O(k·n²), k ≤ 100.
8
- */
9
- export declare function optimizeWaypointOrder(data: [string, Point][]): string[];
10
- /**
11
- * Reorders waypoints for fastest traversal.
12
- * First and last stay fixed (from/to), only middle waypoints are reordered.
13
- */
14
- export declare function reorderWaypoints<T extends {
15
- x: number;
16
- y: number;
17
- }>(waypoints: T[]): T[];
18
- export {};
19
- //# sourceMappingURL=optimizeWaypointOrder.d.ts.map
@@ -1 +0,0 @@
1
- const x=100,b=-.01;export function optimizeWaypointOrder(e){const c=new Map(e),t=Array.from(c.keys());if(t.length<=2)return t;const r=M(t,c);return r.length<4?r:u(r,c)}export function reorderWaypoints(e){if(e.length<=3)return e;const c=e[0],t=e[e.length-1],r=e.slice(1,-1),i=r.map((o,a)=>[String(a),{cx:o.x,cy:o.y}]),n=optimizeWaypointOrder(i).map(o=>r[Number(o)]);return[c,...n,t]}function M(e,c){const t=[e[0]],r=new Set(e);let i=e[0];for(r.delete(e[0]);r.size>0;){const s=c.get(i);let n="",o=1/0;for(const a of r){const l=c.get(a),d=Math.abs(s.cx-l.cx)+Math.abs(s.cy-l.cy);d<o&&(o=d,n=a)}if(!n)break;t.push(n),r.delete(n),i=n}return t}function u(e,c){const t=[...e];let r=!0;for(let i=0;r&&i<100;i++){r=!1;t:for(let s=1;s<t.length-2;s++)for(let n=s+1;n<t.length-1;n++){const o=c.get(t[s-1]),a=c.get(t[s]),l=c.get(t[n]),d=c.get(t[n+1]);if(Math.abs(o.cx-l.cx)+Math.abs(o.cy-l.cy)+Math.abs(a.cx-d.cx)+Math.abs(a.cy-d.cy)-(Math.abs(o.cx-a.cx)+Math.abs(o.cy-a.cy))-(Math.abs(l.cx-d.cx)+Math.abs(l.cy-d.cy))<-.01){for(let f=s,h=n;f<h;f++,h--)[t[f],t[h]]=[t[h],t[f]];r=!0;break t}}}return t}
@@ -1,18 +0,0 @@
1
- import type { GraphInstance, RouteEndpoint, RouteLine, RoutePoint } from '../types';
2
- export interface OffGraphEntry {
3
- readonly segment: RouteLine;
4
- readonly projection: RoutePoint;
5
- }
6
- /** A* candidates plus an optional `offGraphEntry` — set when the route's entry needs perpendicular
7
- * trim to land on a point inside a segment instead of at a graph node. */
8
- export interface ResolvedCandidates {
9
- readonly candidates: RoutePoint[];
10
- readonly offGraphEntry: OffGraphEntry | null;
11
- }
12
- /** Turns a route endpoint into A* candidates.
13
- * - Booth (has `bounds`) → graph nodes inside the polygon.
14
- * - Off-graph point → nearest segment on its layer; both ends are candidates and `offGraphEntry`
15
- * holds the perpendicular foot to trim to. If the foot falls off the segment, attach at its node.
16
- * */
17
- export declare function resolveWaypointCandidates(graph: GraphInstance, endpoint: RouteEndpoint): ResolvedCandidates;
18
- //# sourceMappingURL=resolveWaypointCandidates.d.ts.map
@@ -1 +0,0 @@
1
- import{projectPointOnSegment as l}from"../geometry/projectPointOnSegment";import{findGraphPointsInPolygon as p}from"./graphPointResolvers";export function resolveWaypointCandidates(i,e){if(e.bounds?.length)return{candidates:p(i.dataSource,e.bounds,e.layer),offGraphEntry:null};let a=null,f=1/0;for(const t of i.dataSource.getLines()){if(t.virtual||e.layer&&t.p0.layer!==e.layer||t.p0.x===t.p1.x&&t.p0.y===t.p1.y)continue;const o=l(e,t.p0,t.p1);o.distance<f&&(f=o.distance,a={segment:t,proj:o})}if(!a)return{candidates:[],offGraphEntry:null};const{segment:n,proj:r}=a;return r.t===0?{candidates:[n.p0],offGraphEntry:null}:r.t===1?{candidates:[n.p1],offGraphEntry:null}:{candidates:[n.p0,n.p1],offGraphEntry:{segment:n,projection:{layer:n.p0.layer,x:r.projected.x,y:r.projected.y}}}}
@@ -1,4 +0,0 @@
1
- import { type RouteResult } from '../types';
2
- /** Returns a fresh empty result each call to avoid shared-mutable-object bugs at runtime. */
3
- export declare const emptyResult: () => RouteResult;
4
- //# sourceMappingURL=routeResult.d.ts.map
@@ -1 +0,0 @@
1
- export const emptyResult=()=>({lines:[],totalDistance:0});