@mountaya/elements 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (862) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/README.md +4 -3
  3. package/THIRD-PARTY-NOTICES.txt +1 -1
  4. package/dist/agent/index.cjs +1152 -1905
  5. package/dist/agent/index.cjs.map +1 -1
  6. package/dist/agent/index.d.cts +1152 -1202
  7. package/dist/agent/index.d.ts +1152 -1202
  8. package/dist/agent/index.js +1147 -1903
  9. package/dist/agent/index.js.map +1 -1
  10. package/dist/camera/index.cjs +2470 -3435
  11. package/dist/camera/index.cjs.map +1 -1
  12. package/dist/camera/index.d.cts +716 -744
  13. package/dist/camera/index.d.ts +716 -744
  14. package/dist/camera/index.js +2438 -3323
  15. package/dist/camera/index.js.map +1 -1
  16. package/dist/{units-D9mBrusY.d.cts → chunk-5pTPpv4v.d.cts} +38 -41
  17. package/dist/{units-D9mBrusY.d.ts → chunk-5pTPpv4v.d.ts} +38 -41
  18. package/dist/{order-BLhsGsH8.d.ts → chunk-6JzFMFHh.d.ts} +15 -28
  19. package/dist/chunk-6qyuJVvt.d.ts +513 -0
  20. package/dist/chunk-9fp0lDic.cjs +583 -0
  21. package/dist/chunk-9fp0lDic.cjs.map +1 -0
  22. package/dist/{zones-B05QA8fy.d.ts → chunk-A48H1rDg.d.cts} +2 -4
  23. package/dist/{zones-B05QA8fy.d.cts → chunk-A48H1rDg.d.ts} +2 -4
  24. package/dist/chunk-B-m1AchR.cjs +57 -0
  25. package/dist/chunk-B-m1AchR.cjs.map +1 -0
  26. package/dist/{bundle-xYrrbJTH.d.ts → chunk-B-qFTf04.d.ts} +51 -57
  27. package/dist/chunk-B0YROiZh.d.cts +1475 -0
  28. package/dist/chunk-B14wgOvH.d.cts +68 -0
  29. package/dist/chunk-B19l3j9r.cjs +150 -0
  30. package/dist/chunk-B19l3j9r.cjs.map +1 -0
  31. package/dist/chunk-B2PtjVKg.cjs +86 -0
  32. package/dist/chunk-B2PtjVKg.cjs.map +1 -0
  33. package/dist/chunk-B56Oyb7W.cjs +70 -0
  34. package/dist/chunk-B56Oyb7W.cjs.map +1 -0
  35. package/dist/chunk-B5WGMQwK.cjs +113 -0
  36. package/dist/chunk-B5WGMQwK.cjs.map +1 -0
  37. package/dist/{types-nO2joeRk.d.ts → chunk-B98mKrdu.d.cts} +103 -122
  38. package/dist/{videoOverlay-Dh_D5_Zs.d.ts → chunk-BB0PmqIM.d.cts} +10 -10
  39. package/dist/chunk-BBikve0Z.cjs +269 -0
  40. package/dist/chunk-BBikve0Z.cjs.map +1 -0
  41. package/dist/chunk-BHeXmM0X.js +37 -0
  42. package/dist/chunk-BHeXmM0X.js.map +1 -0
  43. package/dist/chunk-BI8WZLpU.cjs +281 -0
  44. package/dist/chunk-BI8WZLpU.cjs.map +1 -0
  45. package/dist/chunk-BIEc_SkR.cjs +29 -0
  46. package/dist/chunk-BIEc_SkR.cjs.map +1 -0
  47. package/dist/chunk-BJ6L6_W9.cjs +553 -0
  48. package/dist/chunk-BJ6L6_W9.cjs.map +1 -0
  49. package/dist/chunk-BJ91UCbB.js +11 -0
  50. package/dist/chunk-BJ91UCbB.js.map +1 -0
  51. package/dist/chunk-BJEZWTKj.cjs +166 -0
  52. package/dist/chunk-BJEZWTKj.cjs.map +1 -0
  53. package/dist/chunk-BJz54mfg.cjs +10 -0
  54. package/dist/chunk-BJz54mfg.cjs.map +1 -0
  55. package/dist/{sections-CVlc2Inr.d.cts → chunk-BNX5LAfN.d.cts} +289 -330
  56. package/dist/chunk-BP6KgA86.js +35 -0
  57. package/dist/chunk-BP6KgA86.js.map +1 -0
  58. package/dist/{segmentRoute-C5UL_5bp.d.ts → chunk-BRnjQq6K.d.cts} +44 -59
  59. package/dist/chunk-BSiMEwPS.js +46 -0
  60. package/dist/chunk-BSiMEwPS.js.map +1 -0
  61. package/dist/chunk-BTPjDw_y.cjs +16 -0
  62. package/dist/chunk-BTPjDw_y.cjs.map +1 -0
  63. package/dist/chunk-BTUUABGI.js +17 -0
  64. package/dist/chunk-BTUUABGI.js.map +1 -0
  65. package/dist/chunk-BUeL9y7s.cjs +45 -0
  66. package/dist/chunk-BUeL9y7s.cjs.map +1 -0
  67. package/dist/chunk-BWMuCNc9.cjs +172 -0
  68. package/dist/chunk-BWMuCNc9.cjs.map +1 -0
  69. package/dist/chunk-BWjRfhpF.js +126 -0
  70. package/dist/chunk-BWjRfhpF.js.map +1 -0
  71. package/dist/{types-CTQwbSdA.d.cts → chunk-BZ5KyZXI.d.ts} +103 -122
  72. package/dist/chunk-B_4SVmvh.js +94 -0
  73. package/dist/chunk-B_4SVmvh.js.map +1 -0
  74. package/dist/chunk-BcTUuZQ3.js +95 -0
  75. package/dist/chunk-BcTUuZQ3.js.map +1 -0
  76. package/dist/chunk-BdkqSsJe.cjs +140 -0
  77. package/dist/chunk-BdkqSsJe.cjs.map +1 -0
  78. package/dist/chunk-BfktMVmI.js +70 -0
  79. package/dist/chunk-BfktMVmI.js.map +1 -0
  80. package/dist/chunk-BfzQb0EK.cjs +6 -0
  81. package/dist/chunk-BhWfT-22.d.cts +808 -0
  82. package/dist/chunk-BjJcqX5J.cjs +60 -0
  83. package/dist/chunk-BjJcqX5J.cjs.map +1 -0
  84. package/dist/{geodesy-543qXKtI.d.ts → chunk-Bk0L8g5J.d.cts} +3 -4
  85. package/dist/{geodesy-543qXKtI.d.cts → chunk-Bk0L8g5J.d.ts} +3 -4
  86. package/dist/chunk-Bl4_uVa6.cjs +11 -0
  87. package/dist/chunk-Bl4_uVa6.cjs.map +1 -0
  88. package/dist/chunk-BlKF4lrp.js +43 -0
  89. package/dist/chunk-BlKF4lrp.js.map +1 -0
  90. package/dist/chunk-Bm1FieGR.js +4 -0
  91. package/dist/chunk-Bm1FieGR.js.map +1 -0
  92. package/dist/chunk-Bn6ZbxkS.cjs +27 -0
  93. package/dist/chunk-BpN3hr6a.cjs +541 -0
  94. package/dist/chunk-BpN3hr6a.cjs.map +1 -0
  95. package/dist/{order-BZkUwMou.d.cts → chunk-Bq_WHTfd.d.cts} +15 -28
  96. package/dist/chunk-Bqt4LBBz.cjs +648 -0
  97. package/dist/chunk-Bqt4LBBz.cjs.map +1 -0
  98. package/dist/{language-CEWQ5uYw.d.cts → chunk-Bqt97zwf.d.cts} +3 -18
  99. package/dist/{language-CEWQ5uYw.d.ts → chunk-Bqt97zwf.d.ts} +3 -18
  100. package/dist/chunk-BsBiN4w6.d.cts +245 -0
  101. package/dist/chunk-BvTpOUoC.cjs +207 -0
  102. package/dist/chunk-BvTpOUoC.cjs.map +1 -0
  103. package/dist/chunk-BwK6Hl3q.cjs +446 -0
  104. package/dist/chunk-BwK6Hl3q.cjs.map +1 -0
  105. package/dist/{elevationTiles-pmsb9wnU.d.cts → chunk-BxDQZDXR.d.cts} +26 -27
  106. package/dist/{elevationTiles-pmsb9wnU.d.ts → chunk-BxDQZDXR.d.ts} +26 -27
  107. package/dist/chunk-BxUio8kX.js +20 -0
  108. package/dist/chunk-BxUio8kX.js.map +1 -0
  109. package/dist/chunk-BxaocpFi.d.cts +1 -0
  110. package/dist/chunk-Bywi0K1N.js +36 -0
  111. package/dist/chunk-Bywi0K1N.js.map +1 -0
  112. package/dist/chunk-C-IlmkDl.js +59 -0
  113. package/dist/chunk-C-IlmkDl.js.map +1 -0
  114. package/dist/chunk-C5PtVewq.d.ts +389 -0
  115. package/dist/chunk-C5dpC7mQ.js +19 -0
  116. package/dist/chunk-C5dpC7mQ.js.map +1 -0
  117. package/dist/chunk-C5q1sgSa.js +46 -0
  118. package/dist/chunk-C5q1sgSa.js.map +1 -0
  119. package/dist/chunk-C6fU9G5I.cjs +221 -0
  120. package/dist/chunk-C6fU9G5I.cjs.map +1 -0
  121. package/dist/chunk-C71dpWUK.js +5 -0
  122. package/dist/chunk-C71dpWUK.js.map +1 -0
  123. package/dist/chunk-C82N1gQX.d.ts +1831 -0
  124. package/dist/chunk-C8HdaHpu.js +118 -0
  125. package/dist/chunk-C8HdaHpu.js.map +1 -0
  126. package/dist/chunk-C8ZGryck.js +236 -0
  127. package/dist/chunk-C8ZGryck.js.map +1 -0
  128. package/dist/chunk-C95NG0oD.cjs +43 -0
  129. package/dist/chunk-C95NG0oD.cjs.map +1 -0
  130. package/dist/chunk-C9aR8DXb.js +9 -0
  131. package/dist/chunk-C9aR8DXb.js.map +1 -0
  132. package/dist/{camera-C48Ykaxv.d.ts → chunk-CAUZnoCs.d.ts} +135 -159
  133. package/dist/chunk-CBXWWuM9.cjs +82 -0
  134. package/dist/chunk-CBXWWuM9.cjs.map +1 -0
  135. package/dist/chunk-CC_Kquu7.d.cts +125 -0
  136. package/dist/chunk-CC_Kquu7.d.ts +125 -0
  137. package/dist/chunk-CCp85vXg.cjs +60 -0
  138. package/dist/chunk-CCp85vXg.cjs.map +1 -0
  139. package/dist/chunk-CEcB1_uK.js +39 -0
  140. package/dist/chunk-CEcB1_uK.js.map +1 -0
  141. package/dist/{bundle-Je5zsRFg.d.cts → chunk-CFIo021l.d.cts} +51 -57
  142. package/dist/chunk-CH_IZoJE.js +33 -0
  143. package/dist/chunk-CH_IZoJE.js.map +1 -0
  144. package/dist/chunk-CHrasH_g.cjs +25 -0
  145. package/dist/chunk-CHrasH_g.cjs.map +1 -0
  146. package/dist/chunk-CJVoSaAE.cjs +3 -0
  147. package/dist/chunk-CJp8nGcb.js +96 -0
  148. package/dist/chunk-CJp8nGcb.js.map +1 -0
  149. package/dist/chunk-CJwUtkOt.js +112 -0
  150. package/dist/chunk-CJwUtkOt.js.map +1 -0
  151. package/dist/chunk-CKhCOVIf.d.cts +751 -0
  152. package/dist/chunk-CKiVSRYg.js +50 -0
  153. package/dist/chunk-CKiVSRYg.js.map +1 -0
  154. package/dist/chunk-CKtd19eD.cjs +59 -0
  155. package/dist/chunk-CKtd19eD.cjs.map +1 -0
  156. package/dist/chunk-CL92KE3j.d.ts +3188 -0
  157. package/dist/chunk-CLqUlkAe.js +54 -0
  158. package/dist/chunk-CLqUlkAe.js.map +1 -0
  159. package/dist/chunk-CMG5OV0q.cjs +4741 -0
  160. package/dist/chunk-CMG5OV0q.cjs.map +1 -0
  161. package/dist/chunk-CN_TKSgm.js +10 -0
  162. package/dist/chunk-CN_TKSgm.js.map +1 -0
  163. package/dist/chunk-CNe6MtqV.cjs +29 -0
  164. package/dist/chunk-CNe6MtqV.cjs.map +1 -0
  165. package/dist/chunk-COQkDTC5.js +83 -0
  166. package/dist/chunk-COQkDTC5.js.map +1 -0
  167. package/dist/chunk-CPBl6K4M.cjs +168 -0
  168. package/dist/chunk-CPBl6K4M.cjs.map +1 -0
  169. package/dist/chunk-CPx0ZYFB.d.ts +3 -0
  170. package/dist/chunk-CQQhcP_C.d.ts +197 -0
  171. package/dist/chunk-CTNoajFh.d.cts +389 -0
  172. package/dist/chunk-CTd-qgJc.cjs +384 -0
  173. package/dist/chunk-CTd-qgJc.cjs.map +1 -0
  174. package/dist/chunk-CW80YYtU.cjs +1056 -0
  175. package/dist/chunk-CW80YYtU.cjs.map +1 -0
  176. package/dist/{searchLimits-j99-NTXR.d.ts → chunk-CWpqBgkF.d.cts} +2 -2
  177. package/dist/{searchLimits-j99-NTXR.d.cts → chunk-CWpqBgkF.d.ts} +2 -2
  178. package/dist/chunk-CXjRArgy.d.ts +3 -0
  179. package/dist/chunk-CXonfH3-.cjs +14 -0
  180. package/dist/chunk-CXonfH3-.cjs.map +1 -0
  181. package/dist/chunk-CYcouGXN.d.ts +825 -0
  182. package/dist/chunk-CZDAzEBw.cjs +1621 -0
  183. package/dist/chunk-CZDAzEBw.cjs.map +1 -0
  184. package/dist/{amenities-B3-qAjxu.d.cts → chunk-C_fQFr70.d.cts} +40 -41
  185. package/dist/{amenities-B3-qAjxu.d.ts → chunk-C_fQFr70.d.ts} +40 -41
  186. package/dist/chunk-CbOtHnnB.cjs +359 -0
  187. package/dist/chunk-CbOtHnnB.cjs.map +1 -0
  188. package/dist/chunk-CdA6ZMGk.d.cts +825 -0
  189. package/dist/chunk-Ce1_thm7.js +146 -0
  190. package/dist/chunk-Ce1_thm7.js.map +1 -0
  191. package/dist/chunk-CeD8Hw0j.d.cts +3188 -0
  192. package/dist/{camera-BrFLU1DH.d.cts → chunk-CeiTuMyt.d.cts} +135 -159
  193. package/dist/chunk-Ch1OLzLi.js +1 -0
  194. package/dist/chunk-Cizu_j1N.cjs +87 -0
  195. package/dist/chunk-Cizu_j1N.cjs.map +1 -0
  196. package/dist/chunk-CjDe9z6A.d.cts +427 -0
  197. package/dist/chunk-Cl1etdlu.js +63 -0
  198. package/dist/chunk-Cl1etdlu.js.map +1 -0
  199. package/dist/chunk-CmoVJDoz.js +4 -0
  200. package/dist/chunk-CmoVJDoz.js.map +1 -0
  201. package/dist/chunk-CnLucxjG.cjs +197 -0
  202. package/dist/chunk-CnLucxjG.cjs.map +1 -0
  203. package/dist/chunk-CsWjBmdi.cjs +56 -0
  204. package/dist/chunk-CsWjBmdi.cjs.map +1 -0
  205. package/dist/chunk-CuseO5MZ.d.cts +3 -0
  206. package/dist/chunk-CvMHibbA.d.ts +427 -0
  207. package/dist/chunk-CwDeiN5U.js +870 -0
  208. package/dist/chunk-CwDeiN5U.js.map +1 -0
  209. package/dist/chunk-Cwdmx4tG.js +1 -0
  210. package/dist/{geolocation-DDkQdWMN.d.cts → chunk-D-4MxHTt.d.cts} +33 -34
  211. package/dist/{geolocation-DDkQdWMN.d.ts → chunk-D-4MxHTt.d.ts} +33 -34
  212. package/dist/chunk-D0LF-99V.js +1093 -0
  213. package/dist/chunk-D0LF-99V.js.map +1 -0
  214. package/dist/chunk-D1fe-0c_.js +367 -0
  215. package/dist/chunk-D1fe-0c_.js.map +1 -0
  216. package/dist/chunk-D21fEI6A.d.ts +1926 -0
  217. package/dist/chunk-D39gAxya.cjs +89 -0
  218. package/dist/chunk-D39gAxya.cjs.map +1 -0
  219. package/dist/chunk-D6KdIW5e.cjs +228 -0
  220. package/dist/chunk-D6KdIW5e.cjs.map +1 -0
  221. package/dist/chunk-D6qHYbgW.d.cts +36 -0
  222. package/dist/{videoOverlay-Dh_D5_Zs.d.cts → chunk-D89E-w70.d.ts} +10 -10
  223. package/dist/chunk-D8bdTysL.js +552 -0
  224. package/dist/chunk-D8bdTysL.js.map +1 -0
  225. package/dist/chunk-D96QJT24.cjs +109 -0
  226. package/dist/chunk-D96QJT24.cjs.map +1 -0
  227. package/dist/chunk-DAmkQl-i.js +119 -0
  228. package/dist/chunk-DAmkQl-i.js.map +1 -0
  229. package/dist/chunk-DEfsb2lc.cjs +10 -0
  230. package/dist/chunk-DEfsb2lc.cjs.map +1 -0
  231. package/dist/chunk-DIFjT5-V.d.cts +66 -0
  232. package/dist/{sections-CmtaduLc.d.ts → chunk-DJpUw8TN.d.ts} +289 -330
  233. package/dist/chunk-DK6lm2IZ.cjs +11 -0
  234. package/dist/chunk-DK6lm2IZ.cjs.map +1 -0
  235. package/dist/chunk-DKqgr31j.cjs +61 -0
  236. package/dist/chunk-DKqgr31j.cjs.map +1 -0
  237. package/dist/chunk-DLZ0QYm9.js +37 -0
  238. package/dist/chunk-DLZ0QYm9.js.map +1 -0
  239. package/dist/chunk-DLjS0uaC.js +4 -0
  240. package/dist/chunk-DLjS0uaC.js.map +1 -0
  241. package/dist/chunk-DMokwmOV.cjs +49 -0
  242. package/dist/chunk-DMokwmOV.cjs.map +1 -0
  243. package/dist/chunk-DMvWgBZL.d.cts +1831 -0
  244. package/dist/chunk-DNfGfIF3.js +31 -0
  245. package/dist/chunk-DNfGfIF3.js.map +1 -0
  246. package/dist/chunk-DQbSRe8D.d.ts +245 -0
  247. package/dist/chunk-DSGkP8_y.js +45 -0
  248. package/dist/chunk-DSGkP8_y.js.map +1 -0
  249. package/dist/chunk-DTctvfSd.d.cts +197 -0
  250. package/dist/chunk-DWe7igyw.cjs +206 -0
  251. package/dist/chunk-DWe7igyw.cjs.map +1 -0
  252. package/dist/chunk-DWsMP5JR.d.ts +68 -0
  253. package/dist/{provider-DM71XnLX.d.cts → chunk-DWsm3HIW.d.cts} +37 -38
  254. package/dist/{provider-DM71XnLX.d.ts → chunk-DWsm3HIW.d.ts} +37 -38
  255. package/dist/chunk-DXABHjLa.cjs +3 -0
  256. package/dist/chunk-D_BeqSbc.cjs +42 -0
  257. package/dist/chunk-D_BeqSbc.cjs.map +1 -0
  258. package/dist/chunk-D_svQNdW.d.ts +66 -0
  259. package/dist/chunk-Dav4xWrp.js +330 -0
  260. package/dist/chunk-Dav4xWrp.js.map +1 -0
  261. package/dist/chunk-DbCPhepL.js +293 -0
  262. package/dist/chunk-DbCPhepL.js.map +1 -0
  263. package/dist/chunk-DcrTy-y2.cjs +43 -0
  264. package/dist/chunk-DcrTy-y2.cjs.map +1 -0
  265. package/dist/chunk-Ddv484ld.js +487 -0
  266. package/dist/chunk-Ddv484ld.js.map +1 -0
  267. package/dist/chunk-De0bjnhY.cjs +88 -0
  268. package/dist/chunk-De0bjnhY.cjs.map +1 -0
  269. package/dist/chunk-De2FmNPu.cjs +32 -0
  270. package/dist/chunk-De2FmNPu.cjs.map +1 -0
  271. package/dist/{segmentRoute-CIo6dR8Y.d.cts → chunk-DeSjQXiI.d.ts} +44 -59
  272. package/dist/chunk-Den0Ta6C.js +132 -0
  273. package/dist/chunk-Den0Ta6C.js.map +1 -0
  274. package/dist/chunk-DiDKEeEa.js +8 -0
  275. package/dist/chunk-DiDKEeEa.js.map +1 -0
  276. package/dist/chunk-Dj60k5PU.js +197 -0
  277. package/dist/chunk-Dj60k5PU.js.map +1 -0
  278. package/dist/chunk-DjnYQBCN.js +4705 -0
  279. package/dist/chunk-DjnYQBCN.js.map +1 -0
  280. package/dist/chunk-Dk9VKvyq.d.ts +1 -0
  281. package/dist/chunk-Dor1ERI9.cjs +85 -0
  282. package/dist/chunk-Dor1ERI9.cjs.map +1 -0
  283. package/dist/chunk-DpMouOoH.js +451 -0
  284. package/dist/chunk-DpMouOoH.js.map +1 -0
  285. package/dist/chunk-DposgdNL.cjs +52 -0
  286. package/dist/chunk-DposgdNL.cjs.map +1 -0
  287. package/dist/chunk-DqLTG_5Q.d.cts +3 -0
  288. package/dist/{roadAccess-D_rOE4xW.d.cts → chunk-Dr5MCIpS.d.cts} +5 -28
  289. package/dist/{roadAccess-D_rOE4xW.d.ts → chunk-Dr5MCIpS.d.ts} +5 -28
  290. package/dist/chunk-DrudttCC.cjs +4 -0
  291. package/dist/chunk-DsDYVJQC.js +173 -0
  292. package/dist/chunk-DsDYVJQC.js.map +1 -0
  293. package/dist/chunk-Dw8ur6FJ.js +27 -0
  294. package/dist/chunk-Dw8ur6FJ.js.map +1 -0
  295. package/dist/chunk-DwG6M_0v.js +64 -0
  296. package/dist/chunk-DwG6M_0v.js.map +1 -0
  297. package/dist/chunk-Dy9a5ibO.js +284 -0
  298. package/dist/chunk-Dy9a5ibO.js.map +1 -0
  299. package/dist/chunk-DyayZlQJ.js +157 -0
  300. package/dist/chunk-DyayZlQJ.js.map +1 -0
  301. package/dist/chunk-DyhJZC2i.js +126 -0
  302. package/dist/chunk-DyhJZC2i.js.map +1 -0
  303. package/dist/chunk-F9zBzmmG.cjs +45 -0
  304. package/dist/chunk-F9zBzmmG.cjs.map +1 -0
  305. package/dist/chunk-FyCYofv2.js +116 -0
  306. package/dist/chunk-FyCYofv2.js.map +1 -0
  307. package/dist/chunk-GHJRjAk2.js +1 -0
  308. package/dist/chunk-H14isiSf.d.ts +751 -0
  309. package/dist/chunk-HIJzXoN4.js +7 -0
  310. package/dist/chunk-HIJzXoN4.js.map +1 -0
  311. package/dist/chunk-Id_8kRtu.d.ts +36 -0
  312. package/dist/chunk-KN60yxBQ.js +5 -0
  313. package/dist/chunk-KN60yxBQ.js.map +1 -0
  314. package/dist/chunk-NM5yg6bh.cjs +82 -0
  315. package/dist/chunk-NM5yg6bh.cjs.map +1 -0
  316. package/dist/chunk-OXr3zJfM.cjs +119 -0
  317. package/dist/chunk-OXr3zJfM.cjs.map +1 -0
  318. package/dist/chunk-QGqgNC4z.d.ts +928 -0
  319. package/dist/chunk-QJBtJrZ0.js +36 -0
  320. package/dist/chunk-QJBtJrZ0.js.map +1 -0
  321. package/dist/{routeProfile-BsSUABXv.d.cts → chunk-QKWhxfPv.d.cts} +196 -45
  322. package/dist/{routeProfile-BKfSfxx6.d.ts → chunk-QKWhxfPv.d.ts} +196 -45
  323. package/dist/chunk-QXW7b4Ev.d.cts +410 -0
  324. package/dist/chunk-RHZrxUrM.cjs +39 -0
  325. package/dist/chunk-RHZrxUrM.cjs.map +1 -0
  326. package/dist/chunk-RTxe2i66.js +91 -0
  327. package/dist/chunk-RTxe2i66.js.map +1 -0
  328. package/dist/chunk-RrKkJb6P.js +16 -0
  329. package/dist/chunk-RrKkJb6P.js.map +1 -0
  330. package/dist/chunk-VOJqpcnM.cjs +181 -0
  331. package/dist/chunk-VOJqpcnM.cjs.map +1 -0
  332. package/dist/chunk-VljGTrid.js +1 -0
  333. package/dist/chunk-X3UVwUEK.d.cts +513 -0
  334. package/dist/chunk-X9K2WChn.cjs +28 -0
  335. package/dist/chunk-X9K2WChn.cjs.map +1 -0
  336. package/dist/chunk-YrtOx6oy.js +251 -0
  337. package/dist/chunk-YrtOx6oy.js.map +1 -0
  338. package/dist/chunk-bY7ySujI.d.cts +928 -0
  339. package/dist/chunk-bYf1sBz5.d.cts +11 -0
  340. package/dist/chunk-bYf1sBz5.d.ts +11 -0
  341. package/dist/chunk-blfknWoM.d.cts +1926 -0
  342. package/dist/chunk-blqsohAb.js +113 -0
  343. package/dist/chunk-blqsohAb.js.map +1 -0
  344. package/dist/chunk-cDMCjodI.cjs +58 -0
  345. package/dist/chunk-cDMCjodI.cjs.map +1 -0
  346. package/dist/chunk-cWjE3qd6.cjs +10 -0
  347. package/dist/chunk-cWjE3qd6.cjs.map +1 -0
  348. package/dist/chunk-dfOgV3fu.js +26 -0
  349. package/dist/chunk-dfOgV3fu.js.map +1 -0
  350. package/dist/chunk-f9cTwUX1.cjs +125 -0
  351. package/dist/chunk-f9cTwUX1.cjs.map +1 -0
  352. package/dist/chunk-fHVYEZs4.cjs +28 -0
  353. package/dist/chunk-fHVYEZs4.cjs.map +1 -0
  354. package/dist/chunk-fWRUMgRI.js +22 -0
  355. package/dist/chunk-fWRUMgRI.js.map +1 -0
  356. package/dist/{types-BEv8V_8V.d.cts → chunk-fozLXfHY.d.cts} +8 -8
  357. package/dist/{types-BEv8V_8V.d.ts → chunk-fozLXfHY.d.ts} +8 -8
  358. package/dist/chunk-gWmB1l3A.cjs +3122 -0
  359. package/dist/chunk-gWmB1l3A.cjs.map +1 -0
  360. package/dist/chunk-gbj2R-_w.js +58 -0
  361. package/dist/chunk-gbj2R-_w.js.map +1 -0
  362. package/dist/chunk-iIWxsAXd.js +59 -0
  363. package/dist/chunk-iIWxsAXd.js.map +1 -0
  364. package/dist/chunk-lItIuOIS.cjs +137 -0
  365. package/dist/chunk-lItIuOIS.cjs.map +1 -0
  366. package/dist/chunk-m6Rh4PCe.cjs +798 -0
  367. package/dist/chunk-m6Rh4PCe.cjs.map +1 -0
  368. package/dist/chunk-o3IRANDf.cjs +99 -0
  369. package/dist/chunk-o3IRANDf.cjs.map +1 -0
  370. package/dist/chunk-obUcg3Sk.d.ts +808 -0
  371. package/dist/chunk-ohsf-6Rn.js +600 -0
  372. package/dist/chunk-ohsf-6Rn.js.map +1 -0
  373. package/dist/chunk-pBleU6Nv.js +3061 -0
  374. package/dist/chunk-pBleU6Nv.js.map +1 -0
  375. package/dist/chunk-px4e99cy.js +71 -0
  376. package/dist/chunk-px4e99cy.js.map +1 -0
  377. package/dist/chunk-qwYDLeXc.cjs +99 -0
  378. package/dist/chunk-qwYDLeXc.cjs.map +1 -0
  379. package/dist/chunk-rF_859Qk.cjs +101 -0
  380. package/dist/chunk-rF_859Qk.cjs.map +1 -0
  381. package/dist/chunk-rLJkqJ5j.d.ts +1475 -0
  382. package/dist/chunk-twQItIRg.cjs +338 -0
  383. package/dist/chunk-twQItIRg.cjs.map +1 -0
  384. package/dist/chunk-vnPrMVjY.js +10 -0
  385. package/dist/chunk-vnPrMVjY.js.map +1 -0
  386. package/dist/chunk-ws3bVwaS.d.ts +410 -0
  387. package/dist/chunk-xh3UkuVs.cjs +246 -0
  388. package/dist/chunk-xh3UkuVs.cjs.map +1 -0
  389. package/dist/chunk-yMzRr26E.js +153 -0
  390. package/dist/chunk-yMzRr26E.js.map +1 -0
  391. package/dist/collab/index.cjs +802 -1254
  392. package/dist/collab/index.cjs.map +1 -1
  393. package/dist/collab/index.d.cts +518 -544
  394. package/dist/collab/index.d.ts +518 -544
  395. package/dist/collab/index.js +797 -1252
  396. package/dist/collab/index.js.map +1 -1
  397. package/dist/data/index.cjs +39 -132
  398. package/dist/data/index.d.cts +6 -468
  399. package/dist/data/index.d.ts +6 -468
  400. package/dist/data/index.js +7 -15
  401. package/dist/editor/index.cjs +2631 -4424
  402. package/dist/editor/index.cjs.map +1 -1
  403. package/dist/editor/index.d.cts +10 -59
  404. package/dist/editor/index.d.ts +10 -59
  405. package/dist/editor/index.js +2619 -4403
  406. package/dist/editor/index.js.map +1 -1
  407. package/dist/errors/index.cjs +11 -28
  408. package/dist/errors/index.d.cts +2 -125
  409. package/dist/errors/index.d.ts +2 -125
  410. package/dist/errors/index.js +1 -3
  411. package/dist/geo/index.cjs +68 -232
  412. package/dist/geo/index.d.cts +6 -821
  413. package/dist/geo/index.d.ts +6 -821
  414. package/dist/geo/index.js +11 -15
  415. package/dist/i18n/fr/index.cjs +329 -334
  416. package/dist/i18n/fr/index.cjs.map +1 -1
  417. package/dist/i18n/fr/index.d.cts +3 -10
  418. package/dist/i18n/fr/index.d.ts +3 -10
  419. package/dist/i18n/fr/index.js +324 -332
  420. package/dist/i18n/fr/index.js.map +1 -1
  421. package/dist/i18n/index.cjs +434 -447
  422. package/dist/i18n/index.cjs.map +1 -1
  423. package/dist/i18n/index.d.cts +152 -111
  424. package/dist/i18n/index.d.ts +152 -111
  425. package/dist/i18n/index.js +420 -420
  426. package/dist/i18n/index.js.map +1 -1
  427. package/dist/icons/index.cjs +37 -116
  428. package/dist/icons/index.d.cts +4 -457
  429. package/dist/icons/index.d.ts +4 -457
  430. package/dist/icons/index.js +8 -11
  431. package/dist/index.cjs +515 -1867
  432. package/dist/index.cjs.map +1 -1
  433. package/dist/index.d.cts +44 -121
  434. package/dist/index.d.ts +44 -121
  435. package/dist/index.js +52 -65
  436. package/dist/index.js.map +1 -1
  437. package/dist/layers/index.cjs +83 -318
  438. package/dist/layers/index.d.cts +3 -1555
  439. package/dist/layers/index.d.ts +3 -1555
  440. package/dist/layers/index.js +5 -17
  441. package/dist/map-client/index.cjs +5 -4
  442. package/dist/map-client/index.d.cts +6 -1856
  443. package/dist/map-client/index.d.ts +6 -1856
  444. package/dist/map-client/index.js +0 -3
  445. package/dist/maplibre-worker.mjs +4 -4
  446. package/dist/navigation/index.cjs +584 -671
  447. package/dist/navigation/index.cjs.map +1 -1
  448. package/dist/navigation/index.d.cts +191 -272
  449. package/dist/navigation/index.d.ts +191 -272
  450. package/dist/navigation/index.js +579 -669
  451. package/dist/navigation/index.js.map +1 -1
  452. package/dist/profile/index.cjs +177 -675
  453. package/dist/profile/index.d.cts +8 -2086
  454. package/dist/profile/index.d.ts +8 -2086
  455. package/dist/profile/index.js +10 -18
  456. package/dist/seams/index.cjs +15 -39
  457. package/dist/seams/index.d.cts +4 -254
  458. package/dist/seams/index.d.ts +4 -254
  459. package/dist/seams/index.js +4 -6
  460. package/dist/search/index.cjs +39 -147
  461. package/dist/search/index.d.cts +6 -888
  462. package/dist/search/index.d.ts +6 -888
  463. package/dist/search/index.js +3 -14
  464. package/dist/style/index.cjs +34 -116
  465. package/dist/style/index.d.cts +5 -538
  466. package/dist/style/index.d.ts +5 -538
  467. package/dist/style/index.js +5 -11
  468. package/dist/testing/index.cjs +432 -617
  469. package/dist/testing/index.cjs.map +1 -1
  470. package/dist/testing/index.d.cts +61 -109
  471. package/dist/testing/index.d.ts +61 -109
  472. package/dist/testing/index.js +427 -615
  473. package/dist/testing/index.js.map +1 -1
  474. package/dist/timezone/index.cjs +1946 -752
  475. package/dist/timezone/index.cjs.map +1 -1
  476. package/dist/timezone/index.d.cts +4 -29
  477. package/dist/timezone/index.d.ts +4 -29
  478. package/dist/timezone/index.js +1941 -750
  479. package/dist/timezone/index.js.map +1 -1
  480. package/dist/units/index.cjs +29 -99
  481. package/dist/units/index.d.cts +3 -75
  482. package/dist/units/index.d.ts +3 -75
  483. package/dist/units/index.js +3 -6
  484. package/dist/video/index.cjs +1684 -2169
  485. package/dist/video/index.cjs.map +1 -1
  486. package/dist/video/index.d.cts +386 -413
  487. package/dist/video/index.d.ts +386 -413
  488. package/dist/video/index.js +1678 -2162
  489. package/dist/video/index.js.map +1 -1
  490. package/dist/view/index.cjs +6 -42
  491. package/dist/view/index.d.cts +3 -836
  492. package/dist/view/index.d.ts +3 -836
  493. package/dist/view/index.js +1 -34
  494. package/package.json +12 -12
  495. package/src/auth/rules/clientHeader.ts +1 -1
  496. package/src/camera/rules/modes.ts +38 -42
  497. package/src/camera/rules/routeContent.ts +1 -0
  498. package/src/collab/index.ts +1 -5
  499. package/src/compose/engines/mountayaMap.ts +16 -42
  500. package/src/compose/rules/developmentWarnings.ts +4 -3
  501. package/src/compose/rules/fitBox.ts +67 -0
  502. package/src/compose/rules/maplibreWorkerVersion.gen.ts +1 -1
  503. package/src/compose/rules/maxBounds.ts +5 -5
  504. package/src/compose/rules/types.ts +4 -11
  505. package/src/compose/rules/workerUrl.ts +41 -6
  506. package/src/editing/rules/engine.ts +4 -2
  507. package/src/editor/engines/viewClient.ts +8 -0
  508. package/src/editor/rules/contract.ts +1 -6
  509. package/src/errors/rules/errors.ts +1 -0
  510. package/src/geo/index.ts +1 -6
  511. package/src/i18n/index.ts +1 -0
  512. package/src/i18n/rules/dates.ts +165 -0
  513. package/src/index.ts +5 -24
  514. package/src/map-client/rules/mapClient.ts +4 -2
  515. package/src/profile/rules/scale.ts +1 -5
  516. package/src/profile/rules/waypointCard.ts +8 -11
  517. package/src/search/index.ts +3 -18
  518. package/src/video/index.ts +1 -1
  519. package/src/video/profileOverlay/rules/contract.ts +1 -3
  520. package/src/video/rules/videoEncoder.ts +1 -1
  521. package/dist/accentColor-GNKBD2CW.js +0 -4
  522. package/dist/accentColor-GNKBD2CW.js.map +0 -1
  523. package/dist/accentColor-VX2JSMGE.cjs +0 -17
  524. package/dist/accentColor-VX2JSMGE.cjs.map +0 -1
  525. package/dist/chunk-23PFRRB6.js +0 -3
  526. package/dist/chunk-23PFRRB6.js.map +0 -1
  527. package/dist/chunk-2GI5SAH2.js +0 -71
  528. package/dist/chunk-2GI5SAH2.js.map +0 -1
  529. package/dist/chunk-2MQK6A74.js +0 -39
  530. package/dist/chunk-2MQK6A74.js.map +0 -1
  531. package/dist/chunk-2RE7R4LD.js +0 -73
  532. package/dist/chunk-2RE7R4LD.js.map +0 -1
  533. package/dist/chunk-3JZQKN4O.js +0 -6
  534. package/dist/chunk-3JZQKN4O.js.map +0 -1
  535. package/dist/chunk-3NDXVUUI.js +0 -50
  536. package/dist/chunk-3NDXVUUI.js.map +0 -1
  537. package/dist/chunk-3R4GFTUM.cjs +0 -59
  538. package/dist/chunk-3R4GFTUM.cjs.map +0 -1
  539. package/dist/chunk-3RVUQ6JN.cjs +0 -22
  540. package/dist/chunk-3RVUQ6JN.cjs.map +0 -1
  541. package/dist/chunk-4F6BJMJC.cjs +0 -49
  542. package/dist/chunk-4F6BJMJC.cjs.map +0 -1
  543. package/dist/chunk-4NWQD4BX.js +0 -132
  544. package/dist/chunk-4NWQD4BX.js.map +0 -1
  545. package/dist/chunk-5K2MH3R6.js +0 -10
  546. package/dist/chunk-5K2MH3R6.js.map +0 -1
  547. package/dist/chunk-6ACRNQQQ.cjs +0 -8
  548. package/dist/chunk-6ACRNQQQ.cjs.map +0 -1
  549. package/dist/chunk-6D26E3IA.js +0 -66
  550. package/dist/chunk-6D26E3IA.js.map +0 -1
  551. package/dist/chunk-6ESAW35P.cjs +0 -80
  552. package/dist/chunk-6ESAW35P.cjs.map +0 -1
  553. package/dist/chunk-6LIW2A5M.cjs +0 -1176
  554. package/dist/chunk-6LIW2A5M.cjs.map +0 -1
  555. package/dist/chunk-6OTTWVCA.js +0 -57
  556. package/dist/chunk-6OTTWVCA.js.map +0 -1
  557. package/dist/chunk-6VROJ4UG.js +0 -862
  558. package/dist/chunk-6VROJ4UG.js.map +0 -1
  559. package/dist/chunk-6Y7FTGO4.js +0 -23
  560. package/dist/chunk-6Y7FTGO4.js.map +0 -1
  561. package/dist/chunk-75I4CG64.js +0 -104
  562. package/dist/chunk-75I4CG64.js.map +0 -1
  563. package/dist/chunk-7CUBXHAH.cjs +0 -14
  564. package/dist/chunk-7CUBXHAH.cjs.map +0 -1
  565. package/dist/chunk-7GTCURVY.js +0 -52
  566. package/dist/chunk-7GTCURVY.js.map +0 -1
  567. package/dist/chunk-7IWOL6AM.cjs +0 -100
  568. package/dist/chunk-7IWOL6AM.cjs.map +0 -1
  569. package/dist/chunk-7QN7M667.cjs +0 -151
  570. package/dist/chunk-7QN7M667.cjs.map +0 -1
  571. package/dist/chunk-A6KQDKLM.cjs +0 -1197
  572. package/dist/chunk-A6KQDKLM.cjs.map +0 -1
  573. package/dist/chunk-A77EA67G.js +0 -354
  574. package/dist/chunk-A77EA67G.js.map +0 -1
  575. package/dist/chunk-AFKOABJ4.cjs +0 -7194
  576. package/dist/chunk-AFKOABJ4.cjs.map +0 -1
  577. package/dist/chunk-AG6JV5Z2.cjs +0 -183
  578. package/dist/chunk-AG6JV5Z2.cjs.map +0 -1
  579. package/dist/chunk-APBK7NMS.js +0 -30
  580. package/dist/chunk-APBK7NMS.js.map +0 -1
  581. package/dist/chunk-AWO5YA7A.cjs +0 -33
  582. package/dist/chunk-AWO5YA7A.cjs.map +0 -1
  583. package/dist/chunk-AZATU6QW.js +0 -108
  584. package/dist/chunk-AZATU6QW.js.map +0 -1
  585. package/dist/chunk-BD2U3WST.cjs +0 -623
  586. package/dist/chunk-BD2U3WST.cjs.map +0 -1
  587. package/dist/chunk-BHBEOU6L.cjs +0 -65
  588. package/dist/chunk-BHBEOU6L.cjs.map +0 -1
  589. package/dist/chunk-CNOSNYNE.js +0 -8
  590. package/dist/chunk-CNOSNYNE.js.map +0 -1
  591. package/dist/chunk-CW3EFR4O.js +0 -12
  592. package/dist/chunk-CW3EFR4O.js.map +0 -1
  593. package/dist/chunk-DASVRNBK.js +0 -7187
  594. package/dist/chunk-DASVRNBK.js.map +0 -1
  595. package/dist/chunk-DJ6LCKYP.js +0 -42
  596. package/dist/chunk-DJ6LCKYP.js.map +0 -1
  597. package/dist/chunk-E5FHQAIO.cjs +0 -45
  598. package/dist/chunk-E5FHQAIO.cjs.map +0 -1
  599. package/dist/chunk-EOML5OTY.cjs +0 -360
  600. package/dist/chunk-EOML5OTY.cjs.map +0 -1
  601. package/dist/chunk-EP5CASHL.js +0 -613
  602. package/dist/chunk-EP5CASHL.js.map +0 -1
  603. package/dist/chunk-EP5OEEVZ.cjs +0 -14
  604. package/dist/chunk-EP5OEEVZ.cjs.map +0 -1
  605. package/dist/chunk-EUXI3FGQ.js +0 -150
  606. package/dist/chunk-EUXI3FGQ.js.map +0 -1
  607. package/dist/chunk-EWFSHCOS.js +0 -40
  608. package/dist/chunk-EWFSHCOS.js.map +0 -1
  609. package/dist/chunk-EX2C5K2T.cjs +0 -25
  610. package/dist/chunk-EX2C5K2T.cjs.map +0 -1
  611. package/dist/chunk-FEXWDQIZ.cjs +0 -8
  612. package/dist/chunk-FEXWDQIZ.cjs.map +0 -1
  613. package/dist/chunk-FEYBFY7H.cjs +0 -358
  614. package/dist/chunk-FEYBFY7H.cjs.map +0 -1
  615. package/dist/chunk-FRGAV6N6.cjs +0 -34
  616. package/dist/chunk-FRGAV6N6.cjs.map +0 -1
  617. package/dist/chunk-G5DHP5VF.js +0 -6
  618. package/dist/chunk-G5DHP5VF.js.map +0 -1
  619. package/dist/chunk-G5W2UHV2.js +0 -99
  620. package/dist/chunk-G5W2UHV2.js.map +0 -1
  621. package/dist/chunk-G7OP7O2C.cjs +0 -39
  622. package/dist/chunk-G7OP7O2C.cjs.map +0 -1
  623. package/dist/chunk-GE6CFCAM.cjs +0 -25
  624. package/dist/chunk-GE6CFCAM.cjs.map +0 -1
  625. package/dist/chunk-GIFALLHI.cjs +0 -111
  626. package/dist/chunk-GIFALLHI.cjs.map +0 -1
  627. package/dist/chunk-GLFET5GM.js +0 -129
  628. package/dist/chunk-GLFET5GM.js.map +0 -1
  629. package/dist/chunk-GQ6UFPFM.js +0 -22
  630. package/dist/chunk-GQ6UFPFM.js.map +0 -1
  631. package/dist/chunk-GQJWVMXS.js +0 -129
  632. package/dist/chunk-GQJWVMXS.js.map +0 -1
  633. package/dist/chunk-GVVJPUKC.js +0 -80
  634. package/dist/chunk-GVVJPUKC.js.map +0 -1
  635. package/dist/chunk-GZ2HOCQ2.cjs +0 -134
  636. package/dist/chunk-GZ2HOCQ2.cjs.map +0 -1
  637. package/dist/chunk-HCBOHXWP.js +0 -37
  638. package/dist/chunk-HCBOHXWP.js.map +0 -1
  639. package/dist/chunk-IBQJDVHF.cjs +0 -281
  640. package/dist/chunk-IBQJDVHF.cjs.map +0 -1
  641. package/dist/chunk-ISLB6Y5Q.cjs +0 -106
  642. package/dist/chunk-ISLB6Y5Q.cjs.map +0 -1
  643. package/dist/chunk-J55CRR4F.js +0 -105
  644. package/dist/chunk-J55CRR4F.js.map +0 -1
  645. package/dist/chunk-JBG6Z6MQ.cjs +0 -28
  646. package/dist/chunk-JBG6Z6MQ.cjs.map +0 -1
  647. package/dist/chunk-K3RQOZRU.js +0 -61
  648. package/dist/chunk-K3RQOZRU.js.map +0 -1
  649. package/dist/chunk-KDJYS4GB.cjs +0 -703
  650. package/dist/chunk-KDJYS4GB.cjs.map +0 -1
  651. package/dist/chunk-KMCAHUZM.cjs +0 -4
  652. package/dist/chunk-KMCAHUZM.cjs.map +0 -1
  653. package/dist/chunk-KUCBNPC6.js +0 -87
  654. package/dist/chunk-KUCBNPC6.js.map +0 -1
  655. package/dist/chunk-KV6UE5A4.js +0 -50
  656. package/dist/chunk-KV6UE5A4.js.map +0 -1
  657. package/dist/chunk-L6TZ2HQR.cjs +0 -18
  658. package/dist/chunk-L6TZ2HQR.cjs.map +0 -1
  659. package/dist/chunk-L7QHHGG2.cjs +0 -141
  660. package/dist/chunk-L7QHHGG2.cjs.map +0 -1
  661. package/dist/chunk-LHK3Y2AL.js +0 -271
  662. package/dist/chunk-LHK3Y2AL.js.map +0 -1
  663. package/dist/chunk-LO5RYRBH.cjs +0 -6317
  664. package/dist/chunk-LO5RYRBH.cjs.map +0 -1
  665. package/dist/chunk-LS5SJMUO.cjs +0 -194
  666. package/dist/chunk-LS5SJMUO.cjs.map +0 -1
  667. package/dist/chunk-LUGTMZFN.cjs +0 -42
  668. package/dist/chunk-LUGTMZFN.cjs.map +0 -1
  669. package/dist/chunk-LVUQU6D5.js +0 -32
  670. package/dist/chunk-LVUQU6D5.js.map +0 -1
  671. package/dist/chunk-M2QRC2GZ.js +0 -166
  672. package/dist/chunk-M2QRC2GZ.js.map +0 -1
  673. package/dist/chunk-M6QJYQIM.cjs +0 -53
  674. package/dist/chunk-M6QJYQIM.cjs.map +0 -1
  675. package/dist/chunk-MGCPH5EO.js +0 -12
  676. package/dist/chunk-MGCPH5EO.js.map +0 -1
  677. package/dist/chunk-MLVUWEZR.cjs +0 -474
  678. package/dist/chunk-MLVUWEZR.cjs.map +0 -1
  679. package/dist/chunk-MTAMJMZL.cjs +0 -707
  680. package/dist/chunk-MTAMJMZL.cjs.map +0 -1
  681. package/dist/chunk-MXL5AT3N.js +0 -48
  682. package/dist/chunk-MXL5AT3N.js.map +0 -1
  683. package/dist/chunk-MYEQSESM.cjs +0 -75
  684. package/dist/chunk-MYEQSESM.cjs.map +0 -1
  685. package/dist/chunk-N3VPF6ZD.js +0 -427
  686. package/dist/chunk-N3VPF6ZD.js.map +0 -1
  687. package/dist/chunk-N6VUAIGI.js +0 -7
  688. package/dist/chunk-N6VUAIGI.js.map +0 -1
  689. package/dist/chunk-N6XRLUN6.js +0 -6286
  690. package/dist/chunk-N6XRLUN6.js.map +0 -1
  691. package/dist/chunk-NOGDOZIT.cjs +0 -114
  692. package/dist/chunk-NOGDOZIT.cjs.map +0 -1
  693. package/dist/chunk-NUWXEISH.cjs +0 -10
  694. package/dist/chunk-NUWXEISH.cjs.map +0 -1
  695. package/dist/chunk-NZCZHXYN.cjs +0 -161
  696. package/dist/chunk-NZCZHXYN.cjs.map +0 -1
  697. package/dist/chunk-ODROSWQX.cjs +0 -53
  698. package/dist/chunk-ODROSWQX.cjs.map +0 -1
  699. package/dist/chunk-OE36AYKG.cjs +0 -82
  700. package/dist/chunk-OE36AYKG.cjs.map +0 -1
  701. package/dist/chunk-OLON7MO6.cjs +0 -437
  702. package/dist/chunk-OLON7MO6.cjs.map +0 -1
  703. package/dist/chunk-PBUOR2IT.js +0 -277
  704. package/dist/chunk-PBUOR2IT.js.map +0 -1
  705. package/dist/chunk-PC2ELXFF.cjs +0 -225
  706. package/dist/chunk-PC2ELXFF.cjs.map +0 -1
  707. package/dist/chunk-PCSGXLOC.js +0 -71
  708. package/dist/chunk-PCSGXLOC.js.map +0 -1
  709. package/dist/chunk-PFNMP6FQ.js +0 -56
  710. package/dist/chunk-PFNMP6FQ.js.map +0 -1
  711. package/dist/chunk-PIWSZTIP.js +0 -690
  712. package/dist/chunk-PIWSZTIP.js.map +0 -1
  713. package/dist/chunk-PKWHJ2GI.js +0 -136
  714. package/dist/chunk-PKWHJ2GI.js.map +0 -1
  715. package/dist/chunk-PLMVBX2A.cjs +0 -76
  716. package/dist/chunk-PLMVBX2A.cjs.map +0 -1
  717. package/dist/chunk-PM3XCD2G.cjs +0 -113
  718. package/dist/chunk-PM3XCD2G.cjs.map +0 -1
  719. package/dist/chunk-QAL4GZO7.cjs +0 -143
  720. package/dist/chunk-QAL4GZO7.cjs.map +0 -1
  721. package/dist/chunk-QDB2SEA2.js +0 -74
  722. package/dist/chunk-QDB2SEA2.js.map +0 -1
  723. package/dist/chunk-QOV7UNUN.js +0 -25
  724. package/dist/chunk-QOV7UNUN.js.map +0 -1
  725. package/dist/chunk-QQUWYLSF.cjs +0 -50
  726. package/dist/chunk-QQUWYLSF.cjs.map +0 -1
  727. package/dist/chunk-QUMBH3U4.cjs +0 -9
  728. package/dist/chunk-QUMBH3U4.cjs.map +0 -1
  729. package/dist/chunk-R4KA7OFQ.js +0 -12
  730. package/dist/chunk-R4KA7OFQ.js.map +0 -1
  731. package/dist/chunk-RBSGAZQQ.js +0 -17
  732. package/dist/chunk-RBSGAZQQ.js.map +0 -1
  733. package/dist/chunk-RM5YJWZI.js +0 -46
  734. package/dist/chunk-RM5YJWZI.js.map +0 -1
  735. package/dist/chunk-ROKNKXA4.cjs +0 -8
  736. package/dist/chunk-ROKNKXA4.cjs.map +0 -1
  737. package/dist/chunk-RQG6D546.cjs +0 -75
  738. package/dist/chunk-RQG6D546.cjs.map +0 -1
  739. package/dist/chunk-SG4YDD5L.cjs +0 -74
  740. package/dist/chunk-SG4YDD5L.cjs.map +0 -1
  741. package/dist/chunk-SNRCA7EO.js +0 -56
  742. package/dist/chunk-SNRCA7EO.js.map +0 -1
  743. package/dist/chunk-SO75R4WW.cjs +0 -22
  744. package/dist/chunk-SO75R4WW.cjs.map +0 -1
  745. package/dist/chunk-SP34NHFI.js +0 -45
  746. package/dist/chunk-SP34NHFI.js.map +0 -1
  747. package/dist/chunk-SSKSSBWJ.cjs +0 -179
  748. package/dist/chunk-SSKSSBWJ.cjs.map +0 -1
  749. package/dist/chunk-TB5663C2.js +0 -1108
  750. package/dist/chunk-TB5663C2.js.map +0 -1
  751. package/dist/chunk-TGH4NRES.js +0 -220
  752. package/dist/chunk-TGH4NRES.js.map +0 -1
  753. package/dist/chunk-TJ6ZPNID.js +0 -189
  754. package/dist/chunk-TJ6ZPNID.js.map +0 -1
  755. package/dist/chunk-U45T35N2.cjs +0 -90
  756. package/dist/chunk-U45T35N2.cjs.map +0 -1
  757. package/dist/chunk-UKVOPEZ2.js +0 -442
  758. package/dist/chunk-UKVOPEZ2.js.map +0 -1
  759. package/dist/chunk-UTB4NROA.cjs +0 -887
  760. package/dist/chunk-UTB4NROA.cjs.map +0 -1
  761. package/dist/chunk-UTW33B5V.js +0 -6
  762. package/dist/chunk-UTW33B5V.js.map +0 -1
  763. package/dist/chunk-UYUBSD2V.cjs +0 -33
  764. package/dist/chunk-UYUBSD2V.cjs.map +0 -1
  765. package/dist/chunk-V3JEP5AG.cjs +0 -59
  766. package/dist/chunk-V3JEP5AG.cjs.map +0 -1
  767. package/dist/chunk-VFAGJXHR.js +0 -18
  768. package/dist/chunk-VFAGJXHR.js.map +0 -1
  769. package/dist/chunk-VMEE57E5.cjs +0 -58
  770. package/dist/chunk-VMEE57E5.cjs.map +0 -1
  771. package/dist/chunk-VQVBEX3Y.cjs +0 -113
  772. package/dist/chunk-VQVBEX3Y.cjs.map +0 -1
  773. package/dist/chunk-VZDXX7TT.cjs +0 -64
  774. package/dist/chunk-VZDXX7TT.cjs.map +0 -1
  775. package/dist/chunk-WE5ZTI4D.js +0 -346
  776. package/dist/chunk-WE5ZTI4D.js.map +0 -1
  777. package/dist/chunk-WEFUVABP.js +0 -19
  778. package/dist/chunk-WEFUVABP.js.map +0 -1
  779. package/dist/chunk-WMU4LRKC.js +0 -28
  780. package/dist/chunk-WMU4LRKC.js.map +0 -1
  781. package/dist/chunk-WQ24RRHL.cjs +0 -354
  782. package/dist/chunk-WQ24RRHL.cjs.map +0 -1
  783. package/dist/chunk-WW4CGS7G.cjs +0 -26
  784. package/dist/chunk-WW4CGS7G.cjs.map +0 -1
  785. package/dist/chunk-WXE5WCTM.js +0 -1144
  786. package/dist/chunk-WXE5WCTM.js.map +0 -1
  787. package/dist/chunk-X23BGIYA.cjs +0 -37
  788. package/dist/chunk-X23BGIYA.cjs.map +0 -1
  789. package/dist/chunk-XEW4FTR2.js +0 -98
  790. package/dist/chunk-XEW4FTR2.js.map +0 -1
  791. package/dist/chunk-XIOI4IYW.js +0 -167
  792. package/dist/chunk-XIOI4IYW.js.map +0 -1
  793. package/dist/chunk-XLVPJ37V.cjs +0 -44
  794. package/dist/chunk-XLVPJ37V.cjs.map +0 -1
  795. package/dist/chunk-XOHAXXZA.cjs +0 -51
  796. package/dist/chunk-XOHAXXZA.cjs.map +0 -1
  797. package/dist/chunk-Y4NRIHK6.cjs +0 -313
  798. package/dist/chunk-Y4NRIHK6.cjs.map +0 -1
  799. package/dist/chunk-Y4YMMKL3.js +0 -23
  800. package/dist/chunk-Y4YMMKL3.js.map +0 -1
  801. package/dist/chunk-YJNYBVE3.cjs +0 -14
  802. package/dist/chunk-YJNYBVE3.cjs.map +0 -1
  803. package/dist/chunk-Z762QNQP.cjs +0 -60
  804. package/dist/chunk-Z762QNQP.cjs.map +0 -1
  805. package/dist/chunk-ZG5KMBOF.js +0 -669
  806. package/dist/chunk-ZG5KMBOF.js.map +0 -1
  807. package/dist/chunk-ZKONQEFA.js +0 -344
  808. package/dist/chunk-ZKONQEFA.js.map +0 -1
  809. package/dist/chunk-ZR5X7QMH.js +0 -39
  810. package/dist/chunk-ZR5X7QMH.js.map +0 -1
  811. package/dist/chunk-ZW4BJQ26.js +0 -84
  812. package/dist/chunk-ZW4BJQ26.js.map +0 -1
  813. package/dist/climbs-BhlWuu0x.d.ts +0 -70
  814. package/dist/climbs-DgBFwySV.d.cts +0 -70
  815. package/dist/data/index.cjs.map +0 -1
  816. package/dist/data/index.js.map +0 -1
  817. package/dist/errors/index.cjs.map +0 -1
  818. package/dist/errors/index.js.map +0 -1
  819. package/dist/geo/index.cjs.map +0 -1
  820. package/dist/geo/index.js.map +0 -1
  821. package/dist/icons/index.cjs.map +0 -1
  822. package/dist/icons/index.js.map +0 -1
  823. package/dist/itinerary-Dp2ZnqgD.d.cts +0 -178
  824. package/dist/itinerary-Dp2ZnqgD.d.ts +0 -178
  825. package/dist/layers/index.cjs.map +0 -1
  826. package/dist/layers/index.js.map +0 -1
  827. package/dist/map-client/index.cjs.map +0 -1
  828. package/dist/map-client/index.js.map +0 -1
  829. package/dist/markerSprite-DGBQF6PO.cjs +0 -49
  830. package/dist/markerSprite-DGBQF6PO.cjs.map +0 -1
  831. package/dist/markerSprite-DZLTR6F6.js +0 -8
  832. package/dist/markerSprite-DZLTR6F6.js.map +0 -1
  833. package/dist/mountayaMap-C9mxRFib.d.cts +0 -3277
  834. package/dist/mountayaMap-DgnlQ2fE.d.ts +0 -3277
  835. package/dist/paint-BgUcj8l7.d.cts +0 -118
  836. package/dist/paint-Dx_qGNE_.d.ts +0 -118
  837. package/dist/profile/index.cjs.map +0 -1
  838. package/dist/profile/index.js.map +0 -1
  839. package/dist/seams/index.cjs.map +0 -1
  840. package/dist/seams/index.js.map +0 -1
  841. package/dist/search/index.cjs.map +0 -1
  842. package/dist/search/index.js.map +0 -1
  843. package/dist/searchHighlight-DFE7LVIL.cjs +0 -33
  844. package/dist/searchHighlight-DFE7LVIL.cjs.map +0 -1
  845. package/dist/searchHighlight-MHAQZVWG.js +0 -12
  846. package/dist/searchHighlight-MHAQZVWG.js.map +0 -1
  847. package/dist/strings-30RSdIat.d.cts +0 -552
  848. package/dist/strings-DPTIbzT5.d.ts +0 -552
  849. package/dist/stripeImage-CQUXM2YI.js +0 -14
  850. package/dist/stripeImage-CQUXM2YI.js.map +0 -1
  851. package/dist/stripeImage-R43OPA6U.cjs +0 -39
  852. package/dist/stripeImage-R43OPA6U.cjs.map +0 -1
  853. package/dist/style/index.cjs.map +0 -1
  854. package/dist/style/index.js.map +0 -1
  855. package/dist/types-B034JMjl.d.ts +0 -973
  856. package/dist/types-B2NDLxQA.d.cts +0 -21
  857. package/dist/types-B2NDLxQA.d.ts +0 -21
  858. package/dist/types-C8aX5KMU.d.cts +0 -973
  859. package/dist/units/index.cjs.map +0 -1
  860. package/dist/units/index.js.map +0 -1
  861. package/dist/view/index.cjs.map +0 -1
  862. package/dist/view/index.js.map +0 -1
@@ -1,2086 +1,8 @@
1
- import { s as WaypointDetails, n as ProfileRange, b as ElevationSeries, C as CumulativeElevation, a as ElevationPoint, m as ProfileInput, W as Waypoint, P as PlacedWaypoint, d as ItinerarySegmentRow, e as ItinerarySegmentRowMetrics, R as ResolvedCharacteristics, g as ItineraryWaypointRow, t as WaypointLinkDetail, w as WaypointPhotoDetail, x as WaypointPropertyDetail } from '../sections-CmtaduLc.js';
2
- export { E as ELEVATION_NOISE_THRESHOLD_METERS, G as GRADE_WINDOW_METERS, I as ItineraryCharacteristics, c as ItinerarySegmentInput, f as ItinerarySegmentRowOverride, h as ItineraryWaypointRowMetrics, M as MARKER_BELONGING_METERS, i as MARKER_PROXIMITY_METERS, j as MAX_PROFILE_POINTS, k as MIN_RANGE_SPAN_METERS, l as MarkerToProject, o as ProfileTotals, p as ProjectedMarker, q as WaypointAt, r as WaypointContactDetail, u as WaypointMediaDetail, v as WaypointOn, y as WaypointPropertyFormatDetail, z as WaypointTimingDetail, A as activePointAt, B as buildElevationSeries, D as chainGeometry, F as clampRange, H as cumulativeElevation, J as dividesRoute, K as downsampleElevation, L as elevationAt, N as gradeAt, O as itinerarySegmentRows, Q as itineraryWaypointRows, S as lineBetween, T as nearestPointIndexAt, U as profileLength, V as profileLines, X as profileTotals, Y as projectMarkers, Z as rangeTotals, _ as resolveCharacteristics, $ as resolveWaypoints } from '../sections-CmtaduLc.js';
3
- import { Geometry, Feature, LineString } from 'geojson';
4
- export { a as CLIMB_CATEGORIES, C as ClimbCategory, b as ClimbSpan, c as climbAt, d as climbCategoryFor, e as detectClimbs } from '../climbs-BhlWuu0x.js';
5
- import { U as UnitFormatOptions } from '../units-D9mBrusY.js';
6
- export { c as DurationForSpeedInput, g as MeasurementFormatOptions, z as defaultUnits, A as displayToKilometersPerHour, B as distanceUnitFor, C as durationForSpeed, E as elevationUnitFor, F as formatAltitudeRange, G as formatDistance, H as formatDuration, I as formatElevation, J as formatHumidity, K as formatNavDistance, N as formatNumber, O as formatPaceClock, Q as formatProportion, T as formatSlope, V as formatSnowDepth, W as formatSnowfall, X as formatSpeed, Y as formatTemperature, _ as kilometersPerHourToDisplay, $ as paceClockNumberToMinutes, a0 as paceMinutesToClockNumber, a1 as parseAscentToMeters, a2 as parseDistanceToMeters, a3 as parsePaceClock, a4 as parseSpeedToKmh, a5 as resolveSpeedKmh, a6 as speedUnitFor, a7 as splitDuration } from '../units-D9mBrusY.js';
7
- import { F as FitBoundsPadding } from '../types-BEv8V_8V.js';
8
- import { SurfaceType, WayType } from '@mountaya/client';
9
- export { I as IndexedInfo, P as ProfileCharacteristics, W as WAYPOINT_PROXIMITY_METERS, a as WaypointProjection, b as buildElevationPoints, c as buildInfoBands, d as committedPaceOf, p as profileCharacteristics, e as projectWaypoints, t as trailDifficultyRank } from '../routeProfile-BKfSfxx6.js';
10
- import { IconProvider } from '../icons/index.js';
11
- export { a as InfoBand, R as RouteProfilePoint, f as bandValueAt, n as nearestRoutePointIndexAt } from '../itinerary-Dp2ZnqgD.js';
12
- export { h as haversineMeters } from '../geodesy-543qXKtI.js';
13
- import '../amenities-B3-qAjxu.js';
14
-
15
- /**
16
- * The text an amenity's badge is written as where the installed glyph set cannot draw its glyph.
17
- *
18
- * A badge stands for a service the itinerary genuinely carries, so a set with no `amenity-*`
19
- * family must not leave it empty: where a table cell has room for the word it is written as the
20
- * service's name, and where a badge stands in a profile's narrow stack, as its first letter.
21
- * Beside a label of its own it says nothing the label does not, and is written as nothing.
22
- */
23
- /**
24
- * BadgeSurface is where an amenity's badge stands: in a table's cell, in a profile's stack, or
25
- * beside a label that names the amenity already.
26
- */
27
- type BadgeSurface = "cell" | "labelled" | "stack";
28
- /**
29
- * badgeFallback answers the text that stands in an amenity's badge where the set cannot draw its
30
- * glyph: the amenity's name in a table cell, that name's first letter in capitals in a profile's
31
- * stack, and nothing beside a label of its own, which already says it.
32
- *
33
- * The first letter is the first character a reader sees, never the first code unit: a letter
34
- * written with a combining accent keeps its accent, and an emoji is never cut in half.
35
- *
36
- * @param name The amenity's name, in the reader's language.
37
- * @param surface Where the badge stands.
38
- * @returns The text to write in place of the glyph, or `null` for nothing.
39
- */
40
- declare const badgeFallback: (name: string, surface: BadgeSurface) => string | null;
41
-
42
- /**
43
- * Filtering a waypoint table by the services its places offer: the chips a reader presses, and
44
- * the rows a choice of them leaves.
45
- *
46
- * The chips are a vocabulary the table derives from the itinerary it shows, so a reader who never
47
- * sees the list of services can still filter by them. It renders nothing.
48
- */
49
-
50
- /** The services a table can be filtered by, and the rows a choice of them leaves. */
51
- interface AmenityFilter<T> {
52
- /** Each service the places offer, once, ordered by the reader's name for it. */
53
- readonly available: readonly string[];
54
- /** The rows offering every service picked, in their order. */
55
- readonly shown: readonly T[];
56
- }
57
- /**
58
- * amenityFilter answers the chips a waypoint table offers and the rows a choice of them leaves.
59
- *
60
- * A chip stands for each service any place offers, once, sorted by the reader's name for it in
61
- * the reader's locale, so a filter row does not reshuffle itself between itineraries. A row stays
62
- * only where its place offers every service picked: a reader picking water and a hot meal is
63
- * asking where they can have both, and no service picked leaves every row.
64
- *
65
- * @param rows The table's rows, in their order.
66
- * @param picked The services picked.
67
- * @param names The reader's name for each service, keyed by the wire's own vocabulary; a service
68
- * with none is named by its own value.
69
- * @param locale The reader's locale, which the names are collated in. A tag `Intl` cannot read is
70
- * read as the formatters read it.
71
- * @returns The chips and the rows left.
72
- */
73
- declare const amenityFilter: <T extends {
74
- readonly details?: Pick<WaypointDetails, "amenities"> | undefined;
75
- }>(rows: readonly T[], picked: readonly string[], names: Readonly<Record<string, string>>, locale: string) => AmenityFilter<T>;
76
- /**
77
- * toggleAmenity answers the services picked after a reader presses a service's chip: the service
78
- * taken out where it was picked, and added at the end of the choice where it was not.
79
- *
80
- * @param picked The services picked before the press.
81
- * @param amenity The service whose chip was pressed.
82
- * @returns The services picked after it.
83
- */
84
- declare const toggleAmenity: (picked: readonly string[], amenity: string) => string[];
85
-
86
- /**
87
- * The services a place offers, stacked above its pin on a profile, as a model before any badge is
88
- * drawn.
89
- *
90
- * A row of a fixed width per place, so two checkpoints a kilometer apart do not run into each
91
- * other: the first few services are shown and the rest counted. Which are shown, how many are
92
- * counted and what the one label names are the rule; the badges are the renderer's. It renders
93
- * nothing.
94
- */
95
-
96
- /**
97
- * DEFAULT_AMENITY_STACK_MAX is how many badges a stack shows before it counts the rest, where its
98
- * caller names no other: four and a count, narrow enough that two checkpoints a kilometer apart
99
- * on a long course do not touch.
100
- */
101
- declare const DEFAULT_AMENITY_STACK_MAX = 4;
102
- /** One place's stack: the place, the services shown, how many are counted and what it names. */
103
- interface AmenityStack<T> {
104
- /** The place, as the caller gave it. */
105
- readonly place: T;
106
- /** The services drawn as badges, the first ones in the order the place states them. */
107
- readonly shown: readonly string[];
108
- /** How many services follow the ones shown, drawn as one count. */
109
- readonly counted: number;
110
- /** Every service the place offers, in its order: the one label the stack is read by. */
111
- readonly named: readonly string[];
112
- }
113
- /**
114
- * amenityStacks answers the stack of services above each pinned place that offers any.
115
- *
116
- * The services stack in the order the place states them. The first ones up to the maximum are
117
- * shown, the maximum rounded down and none shown below zero or for a maximum that is no number,
118
- * and the rest are counted. Every service is named in the stack's one label, the counted ones
119
- * included, so a reader hears the whole list once rather than a badge at a time. A place that
120
- * offers no service takes no stack.
121
- *
122
- * @param places The pinned places, in the order they are drawn.
123
- * @param max How many badges a stack shows before it counts the rest.
124
- * @default max {@link DEFAULT_AMENITY_STACK_MAX}
125
- * @returns One stack per place that offers a service, in the order given.
126
- */
127
- declare const amenityStacks: <T extends {
128
- readonly details?: Pick<WaypointDetails, "amenities"> | undefined;
129
- }>(places: readonly T[], max?: number) => AmenityStack<T>[];
130
-
131
- /**
132
- * The profile's distance axis, and placing things on it.
133
- *
134
- * `<ItineraryProfile>` walks every line it is handed head-to-tail onto one axis, so a route
135
- * stored as several segments profiles as one curve. Anything that wants to say something
136
- * about a place on that route (colour one segment's stretch of the curve, pin a waypoint to
137
- * it, read out where the cursor is) has to be measured against the axis the element actually
138
- * built, not against a second walk that agrees with it today.
139
- *
140
- * That is the whole reason this module exists rather than each caller measuring its own. A
141
- * second walk is easy to write (sum `haversineMeters` down a coordinate list), and it agrees
142
- * with the element until the two disagree about what a route's lines ARE: which segments are
143
- * included, in which order, and whether a shared vertex is counted once or twice. Every such
144
- * difference puts each mark a fraction of a percent off the curve it is drawn over, which
145
- * reads as a rendering bug and is not one. Everything here walks `profileLines`, which is the
146
- * same function the element walks.
147
- *
148
- * It renders nothing and holds no map: it is arithmetic over coordinates, published from
149
- * `@mountaya/elements/profile`. The rest of the profile maths maps a distance onto the unit space
150
- * the chart is drawn in; this answers the prior question of which stretch of the axis each part
151
- * of a route occupies.
152
- */
153
-
154
- /**
155
- * One part of a route's stretch of the distance axis, in meters from the route's start.
156
- *
157
- * A {@link ProfileRange}, the one shape a stretch of the axis has, under the name a caller that
158
- * places parts on the axis reads it by.
159
- */
160
- type ProfileSpan = ProfileRange;
161
- /**
162
- * carriesElevation answers whether a route has a curve to draw at all.
163
- *
164
- * Elevation is the third coordinate of a position, so this is the cheapest honest form of the
165
- * question: it stops at the first vertex the series would read a sample off, and builds no
166
- * series to find out. That is a vertex that names a place and states a finite elevation, the
167
- * rule `buildElevationSeries` reads by, so the answer is the series' own `hasElevation`. A
168
- * partially 3D route counts: the profile bridges the gap with a straight line, which is a
169
- * curve, where a fully 2D one has nothing to plot at any distance.
170
- */
171
- declare const carriesElevation: (parts: readonly (readonly Geometry[])[]) => boolean;
172
- /**
173
- * profileSpans lays one geometry list per part of a route onto the axis.
174
- *
175
- * A part is given as its own list of geometries, the shape `flattenGeometries` produces for a
176
- * segment, so a part carrying several lines is measured as the sum of them. The jump from one
177
- * line to the next costs no distance, which is what the profile does with them too: the gap
178
- * between two lines is not ground anybody covered.
179
- *
180
- * Each geometry is measured by {@link profileLength}, the series' own walk, and not by a
181
- * segment's server-computed `distance`, for two reasons. The boundaries have to agree with the
182
- * curve exactly, or every colour change lands beside the stretch it describes. And the studio
183
- * plots an edit in progress through `substituteLiveSegment`, whose geometry is live while its
184
- * stored distance is not, so the geometry is the only thing that describes what is drawn.
185
- *
186
- * A part with no line still gets a span. It is a zero-length one at the running total, so the
187
- * parts stay index-aligned with what was passed in: a caller zipping colours or labels onto the
188
- * result must not have them slide by one because a segment happened to hold only a point.
189
- */
190
- declare const profileSpans: (parts: readonly (readonly Geometry[])[]) => ProfileSpan[];
191
-
192
- /**
193
- * Deciding which place names under the distance axis are drawn.
194
- *
195
- * Every dividing waypoint gets a label, positioned at the meter it names. On an itinerary with
196
- * a handful of places that is the whole design; on one with seventeen it is a row of names lying
197
- * on top of each other, which states nothing at all.
198
- *
199
- * So the labels are laid out in full and then thinned, rather than laid out differently. Their
200
- * positions carry the meaning (a name sits under the meter it belongs to), and every alternative
201
- * that fits more of them (staggering rows, rotating the text, elbowing neighbours aside) breaks
202
- * exactly that. Dropping the crowded ones keeps every remaining label truthful.
203
- *
204
- * Nothing is lost by dropping one. Each place is also a pin on the curve, carrying its own name,
205
- * and the pins are what a reader hovers and what a screen reader walks: the axis row is the
206
- * second statement of the same set, and the second statement is the one that can afford to thin.
207
- */
208
- /** One laid-out label, in whatever unit the caller measured. */
209
- interface AxisLabelBox {
210
- readonly key: string;
211
- readonly left: number;
212
- readonly right: number;
213
- }
214
- /**
215
- * cullCrowdedLabels answers which labels to leave undrawn.
216
- *
217
- * The ends are kept whatever happens. They are the itinerary's own two extremities, they are
218
- * where a reader looks first, and a chart that dropped its finish to fit a col in the middle
219
- * would have thinned the wrong thing. Everything between them is greedy left to right: a label
220
- * is kept when it clears the last kept one AND clears the finish, so the walk cannot paint
221
- * itself into a collision at the far end.
222
- *
223
- * Boxes arrive in itinerary order, which is what makes "first" the start and "last" the finish
224
- * on a loop where both sit on the same meter: `resolveWaypoints` breaks that tie on the
225
- * authored order for this reason.
226
- *
227
- * @param boxes The laid-out labels, in itinerary order.
228
- * @param gutter The clear space a kept label keeps from its neighbours, in the boxes' unit.
229
- * @default gutter 8
230
- * @returns The keys of the labels to leave undrawn.
231
- */
232
- declare const cullCrowdedLabels: (boxes: readonly AxisLabelBox[], gutter?: number) => ReadonlySet<string>;
233
-
234
- /**
235
- * The map marker an element's cursor stands under: a profile's, and each table's.
236
- *
237
- * An element that a reader scrubs pins the point it stands on to the map beside it, as one marker
238
- * under an id of its own. Which write the marker takes as the cursor moves, and which marker the
239
- * element may take down, are decided here, against the marker calls a map answers. The cadence
240
- * of the writes is the binding's own. It renders nothing.
241
- */
242
- /**
243
- * CURSOR_MARKER_GLYPH is the glyph an element's cursor marker is drawn with where its caller names
244
- * none: the filled pin.
245
- */
246
- declare const CURSOR_MARKER_GLYPH = "pin-filled";
247
- /**
248
- * cursorMarkerIds are the ids each element pins its cursor marker under, unless its caller names
249
- * another: one each, so a profile and two tables over one map never move or take down each
250
- * other's pin.
251
- */
252
- declare const cursorMarkerIds: {
253
- readonly profile: "mtya-profile-cursor";
254
- readonly segmentTable: "mtya-segment-table-cursor";
255
- readonly waypointTable: "mtya-waypoint-table-cursor";
256
- };
257
- /** The marker calls of a map an element's cursor writes through. */
258
- interface CursorMarkerMap {
259
- addMarker(marker: {
260
- readonly color?: string | undefined;
261
- readonly glyph: string;
262
- readonly id: string;
263
- readonly lngLat: [number, number];
264
- }): void;
265
- /**
266
- * Moves the marker pinned under `id`.
267
- *
268
- * @throws {MountayaElementsNotFoundError} When no marker is pinned under `id`.
269
- */
270
- editMarker(id: string, patch: {
271
- readonly lngLat: [number, number];
272
- }): void;
273
- removeMarker(id: string): void;
274
- }
275
- /** What the marker an element added is drawn with. */
276
- interface CursorMarkerPin {
277
- readonly color: string | undefined;
278
- readonly glyph: string;
279
- }
280
- /** Where an element's cursor stands, and how its marker is drawn. */
281
- interface CursorMarkerPoint {
282
- /** The colour of the pin, or `undefined` for the map's own. */
283
- readonly color: string | undefined;
284
- readonly glyph: string;
285
- /** The id the marker is pinned under. */
286
- readonly id: string;
287
- /** Where the cursor stands, as `[longitude, latitude]`. */
288
- readonly lngLat: readonly [number, number];
289
- }
290
- /**
291
- * showCursorMarker pins an element's cursor marker where the cursor stands, and answers what the
292
- * pin is drawn with.
293
- *
294
- * A marker the element already added is moved by editing its position, so a popup opened on it
295
- * stays open; one whose colour or glyph changed is added again, since an edit cannot take a colour
296
- * off. A marker something else took down (another holder of the id, a host clearing the map) is
297
- * added again where the edit finds none.
298
- *
299
- * @param map The map the marker is pinned to.
300
- * @param pinned What the marker this element added is drawn with, or `null` where it added none.
301
- * @param point Where the cursor stands, and how its marker is drawn.
302
- * @returns What the marker is drawn with now.
303
- * @throws What the map throws for a write it refuses, but a missing marker on an edit.
304
- */
305
- declare const showCursorMarker: (map: CursorMarkerMap, pinned: CursorMarkerPin | null, point: CursorMarkerPoint) => CursorMarkerPin;
306
- /**
307
- * hideCursorMarker takes an element's cursor marker down where the cursor no longer stands, and
308
- * only where the element added it: a marker another holder of the id pinned is never its to take.
309
- *
310
- * @param map The map the marker is pinned to.
311
- * @param pinned What the marker this element added is drawn with, or `null` where it added none.
312
- * @param id The id the marker is pinned under.
313
- * @returns `null`: the element holds no marker after it.
314
- */
315
- declare const hideCursorMarker: (map: Pick<CursorMarkerMap, "removeMarker">, pinned: CursorMarkerPin | null, id: string) => null;
316
-
317
- /**
318
- * What a profile says about the sample its cursor stands on: the hover card and the readout a
319
- * screen reader hears, as figures before any of them is written.
320
- *
321
- * Both state one reading of one sample, so it is answered once: the card shows it and the chart
322
- * speaks it, and neither can say a figure the other does not. It renders nothing.
323
- */
324
-
325
- /** One figure a cursor's readout can state. */
326
- type ReadoutStat = "ascent" | "descent" | "distance" | "elevation";
327
- /**
328
- * DEFAULT_READOUT_STATS is what a readout states where its caller names nothing: where the cursor
329
- * stands, then what it took to get there.
330
- */
331
- declare const DEFAULT_READOUT_STATS: readonly ReadoutStat[];
332
- /** One figure a readout states: which it is, and its value in meters. */
333
- interface ReadoutCell {
334
- readonly key: ReadoutStat;
335
- readonly value: number;
336
- }
337
- /** What a readout states about the sample a cursor stands on. */
338
- interface ProfileReadout<T> {
339
- /** The figures asked for, in the order asked, each with a value. */
340
- readonly cells: readonly ReadoutCell[];
341
- /** The grade at the sample, in degrees, negative for a descent, or `null` where none reads. */
342
- readonly grade: number | null;
343
- /** The stretch the sample stands in, which names it and colours it, or `null` in none. */
344
- readonly stretch: T | null;
345
- }
346
- /** What a readout reads beside the sample: the figures asked for and the stretches it names. */
347
- interface ProfileReadoutOptions<T> {
348
- /**
349
- * The figures asked for, in the order the readout states them.
350
- *
351
- * @default {@link DEFAULT_READOUT_STATS}
352
- */
353
- readonly stats?: readonly ReadoutStat[] | undefined;
354
- /** The stretches the curve is classified into, one of which may hold the sample. */
355
- readonly stretches?: readonly T[] | undefined;
356
- }
357
- /**
358
- * profileReadout answers what a readout states about the sample a cursor stands on.
359
- *
360
- * Its distance and its altitude are the sample's own, never a point read between two samples. The
361
- * ascent and the descent are cumulative from the itinerary's start, read off the one scan of the
362
- * whole series (`rangeTotals`), so the figure and the last row of a table beside it are the same
363
- * number. The grade is the slope across the 100 m centred on the sample (`gradeAt`), and the
364
- * stretch is the one the sample's distance reads (`classAt`), the later of two at the meter they
365
- * share. A figure with no value is left out.
366
- *
367
- * @param series The series the cursor stands on.
368
- * @param cumulative The series' one cumulative scan.
369
- * @param point The sample the cursor stands on.
370
- * @param options The figures asked for, and the stretches the curve is classified into.
371
- * @returns The readout.
372
- */
373
- declare const profileReadout: <T extends ProfileRange>(series: ElevationSeries, cumulative: CumulativeElevation, point: ElevationPoint, { stats, stretches }?: ProfileReadoutOptions<T>) => ProfileReadout<T>;
374
-
375
- /**
376
- * The frame a scale is laid against: the elevation range a stated extent is drawn in, and the
377
- * stops a distance range is labelled at.
378
- *
379
- * These are the two rules of the profile's scale that read no series. They stand apart from
380
- * `scale.ts`, which projects and colours one, and import nothing of the elevation series' maths:
381
- * the bundler groups modules by the entries that reach them, so a rule declared beside a series'
382
- * projection brings the series, and all it imports, into every entry that only frames a curve of
383
- * its own. `./video` frames its overlay through this module and carries no series maths for it.
384
- */
385
-
386
- /** The elevation range a curve is drawn against, in meters. */
387
- interface ElevationDomain {
388
- readonly min: number;
389
- readonly max: number;
390
- }
391
- /** One labelled stop on the distance scale. */
392
- interface DistanceTick {
393
- /** Fraction digits the label needs for neighbouring stops to read as different numbers. */
394
- readonly fractionDigits: number;
395
- /** Meters from the start of the itinerary: the position `profileX` projects. */
396
- readonly meters: number;
397
- /** The same stop in the display unit, exact on the 1/2/5 lattice. */
398
- readonly value: number;
399
- }
400
- /**
401
- * distanceTicks picks the distances a scale is labelled at, on a 1/2/5 step.
402
- *
403
- * Takes a range rather than a total, so a zoomed chart gets a scale for what it shows rather
404
- * than a scale for an itinerary most of which is off-frame.
405
- *
406
- * The step is chosen from a 1/2/5 sequence because those are the intervals a reader adds up
407
- * without thinking: a 25 km tick is arithmetic, a 20 km tick is a glance. `target` is a
408
- * target and not a count: rounding the step is what makes the labels legible, and it moves
409
- * how many of them fit.
410
- *
411
- * **The lattice is laid in the display unit, which is why `units` is not optional.** A step
412
- * rounded in meters is only round in meters: 1 000 m stops under an imperial reader become
413
- * 0.62, 1.24, 1.86 miles, and a label asking for whole miles renders them as 1, 1, 2: a
414
- * scale that skips numbers and repeats others while every individual label is correct. The
415
- * same happens metric-side under a zoom window narrow enough for a sub-kilometer step. So the
416
- * lattice is computed in whatever unit the reader is being shown, and `meters` carries the
417
- * position back for `profileX`, which knows only distance.
418
- *
419
- * `fractionDigits` travels with each stop rather than being left to the caller because it is
420
- * a property of the step, not of the reader: a 0.5 mile step needs one digit or half its
421
- * labels collide, and a 20 km step needs none.
422
- */
423
- declare const distanceTicks: (range: ProfileRange, units: Pick<UnitFormatOptions, "length">, target?: number) => DistanceTick[];
424
-
425
- /**
426
- * The one scale a profile and everything laid over it agree on.
427
- *
428
- * The chart is drawn in a fixed **0..100 unit space** and stretched into whatever box the
429
- * caller gave it, with `viewBox="0 0 100 100"` and `preserveAspectRatio="none"`. That is not
430
- * a stylistic choice: it is what removes measurement from the problem entirely.
431
- *
432
- * The alternative is to read the rendered element's width and convert pixels to distances,
433
- * and it fails three ways at once. It needs a `ResizeObserver` and a layout pass before the
434
- * first correct frame. It puts every overlaid pin's position downstream of a measurement, so
435
- * a chart and its markers can disagree for a frame after a resize. And under a DOM
436
- * implementation that reports every element as zero-sized (which is every headless test
437
- * environment worth using), it renders an empty box, so the tests that were supposed to
438
- * catch the first two problems pass vacuously instead.
439
- *
440
- * With a unit space the browser does the user-space-to-pixel mapping, and the same numbers
441
- * these functions return are **also CSS percentages**: a marker at `profileX(d, total)` is
442
- * `left: ${x}%`, a cursor dot at `profileY(e, domain)` is `top: ${y}%`. Pins, bands and curve
443
- * align by construction rather than through a shared constant that can drift.
444
- */
445
-
446
- /** The width and height of the unit space. Both axes, because it is stretched on both. */
447
- declare const PROFILE_VIEWBOX = 100;
448
- /** Headroom above the highest sample, so a summit is not flush against the frame. */
449
- declare const PROFILE_TOP_INSET = 6;
450
- /** Room below the lowest sample, so a valley floor reads as a floor rather than a crop. */
451
- declare const PROFILE_BOTTOM_INSET = 4;
452
- /** The unit-space y of the lowest sample. */
453
- declare const PROFILE_BASELINE: number;
454
- /**
455
- * profileDomain chooses the elevation range a series is drawn against.
456
- *
457
- * Anchored on the itinerary's own minimum rather than on sea level, because the shape of the
458
- * climb is what a profile is read for and a zero-based axis flattens exactly the itineraries
459
- * people most want to see: a ridge traverse between 2,400 m and 2,600 m is a ridge, not a
460
- * flat line four fifths of the way up an empty chart. The absolute altitudes are stated in
461
- * the stat strip, where a number belongs.
462
- *
463
- * A window frames the stretch it holds: the lowest and the highest the curve stands between the
464
- * window's two ends, read at each end on the line between the two samples either side of it and
465
- * at every sample between them. So a window narrower than the gap between two samples frames the
466
- * line that crosses it. A window that holds the whole curve is no zoom and reads the series'
467
- * stated extent, as no window does. A window the samples do not reach reads that extent too, so
468
- * the frame keeps its scale with no curve in it.
469
- *
470
- * A series with no elevation gets a nominal domain rather than a degenerate one, so a caller
471
- * that draws the frame before the data arrives gets the frame it will keep.
472
- *
473
- * @param series The series to frame. Its `minElevation` and `maxElevation` are the stated extent.
474
- * @param range The window the chart is drawn in, in meters from the start of the itinerary, its
475
- * two ends in either order. Omitted, the domain frames the whole series.
476
- * @returns The domain in meters above sea level, rounded outward at both ends and never narrower
477
- * than the floor a flat itinerary is drawn against.
478
- */
479
- declare const profileDomain: (series: ElevationSeries, range?: ProfileRange) => ElevationDomain;
480
- /**
481
- * What a chart's elevation scale is anchored on: the itinerary's own extent, sea level, or the
482
- * stretch the window drawn holds.
483
- */
484
- type ProfileAnchor = "route" | "sea-level" | "window";
485
- /**
486
- * anchoredDomain chooses the elevation range a chart is drawn against, by what its scale is
487
- * anchored on.
488
- *
489
- * `route` frames the whole itinerary whatever the window, so a zoomed curve keeps the height it
490
- * had. `window` frames the stretch the window holds, as {@link profileDomain} reads a window, so
491
- * zooming into a section rescales to its own relief. `sea-level` moves only the floor, to zero:
492
- * the ceiling stays the one the itinerary's own extent was rounded to, so a sea-level scale is the
493
- * itinerary's scale extended downward rather than a second rounding rule.
494
- *
495
- * @param series The series the chart draws.
496
- * @param anchor What the scale is anchored on.
497
- * @param range The window drawn, its two ends in either order. Read only where the scale is
498
- * anchored on it, and the whole itinerary where omitted.
499
- * @returns The domain in meters above sea level.
500
- */
501
- declare const anchoredDomain: (series: ElevationSeries, anchor: ProfileAnchor, range?: ProfileRange) => ElevationDomain;
502
- /**
503
- * domainTicks answers the elevations a chart's scale is labelled at, low to high: the domain's
504
- * floor, its middle and its ceiling.
505
- *
506
- * Three, because that is what a short plot holds without its labels touching, and enough to read
507
- * a curve against: the two bounds, and the halfway mark that says whether a climb is in the top
508
- * or the bottom half of its range. They need no rounded lattice the way the distance axis does,
509
- * because they are not a scale of chosen intervals: each states one of the frame's own bounds, so
510
- * an unround figure is the honest reading of a summit, and rounding it would move the frame.
511
- */
512
- declare const domainTicks: (domain: ElevationDomain) => readonly [number, number, number];
513
- /**
514
- * profileX maps a distance along the itinerary to the unit space, and to a CSS percentage.
515
- *
516
- * A zero-length itinerary collapses to the origin rather than dividing by zero.
517
- *
518
- * `range` narrows the frame to a stretch of the itinerary: the window's start becomes 0 and its
519
- * end becomes 100, which is the whole of what zooming a profile is. It is an optional trailing
520
- * parameter rather than a replacement for `totalDistance` because an omitted window IS the
521
- * whole itinerary, so a call that never zooms states no window, and the two paths cannot drift.
522
- *
523
- * The result stays clamped to the frame in both cases, so a pin placed outside the window
524
- * lands on the edge rather than off it. A caller that wants it truly gone filters the pin out;
525
- * a mark hidden by clipping would still be in the tab order.
526
- */
527
- declare const profileX: (meters: number, totalDistance: number, range?: ProfileRange) => number;
528
- /**
529
- * profileY maps an elevation to the unit space, inverted, and to a CSS percentage.
530
- *
531
- * A domain with no span centres its samples instead of pinning them to the floor, so a
532
- * hand-built degenerate domain draws a line through the middle rather than along the edge.
533
- */
534
- declare const profileY: (elevation: number, domain: ElevationDomain) => number;
535
- /**
536
- * profilePolyline renders a series as the `points` attribute of an SVG `<polyline>`.
537
- *
538
- * `range` draws only the stretch a zoomed chart shows. It projects through the unclamped
539
- * mapping so the curve runs off-frame at both ends and the `<svg>` clips it, rather than
540
- * standing every off-window sample upright against the edge.
541
- */
542
- declare const profilePolyline: (points: readonly ElevationPoint[], totalDistance: number, domain: ElevationDomain, range?: ProfileRange) => string;
543
- /** A stretch of the itinerary, drawn in a colour of its own. */
544
- interface CurveColor {
545
- /** Meters from the start of the itinerary. */
546
- readonly from: number;
547
- /** Meters from the start of the itinerary. */
548
- readonly to: number;
549
- /** Any CSS colour, painted as given. This is data, not a theme token. */
550
- readonly color: string;
551
- }
552
- /** One stop of the gradient a multi-coloured curve is painted with. */
553
- interface CurveStop {
554
- /** A 0..1 fraction of the itinerary, which is what an SVG `<stop offset>` takes. */
555
- readonly offset: number;
556
- /**
557
- * The caller's colour for the stretch, or null where the caller coloured nothing.
558
- *
559
- * Null rather than a colour of this module's choosing, because a stretch nobody coloured is
560
- * painted with the renderer's own accent, and a theme token is the renderer's to name: this
561
- * entry renders nothing. `@mountaya/elements-react` paints null with `var(--mtya-accent)`, so
562
- * an uncoloured stretch follows the theme it would have followed with no colours at all.
563
- */
564
- readonly color: string | null;
565
- }
566
- /**
567
- * A stretch of the itinerary the caller has classified: a colour, and the word it reads as.
568
- *
569
- * The label is what a tooltip's dot says. Deliberately untyped as to meaning, exactly like the
570
- * band strip: surface, way type, technicality, avalanche exposure, a sponsor's sectors. This
571
- * module paints `from` to `to` in `color` and hands the word back, and never learns the
572
- * taxonomy. A vocabulary baked in here would be Mountaya's imposed on every consumer, and
573
- * would need a release to extend.
574
- */
575
- interface ProfileClass extends CurveColor {
576
- readonly label: string;
577
- }
578
- /**
579
- * curveSpans normalizes stretches into distance order with no overlap.
580
- *
581
- * {@link curveStops} reads it, and so does the lookup, so the rule (where two stretches would
582
- * share ground, the EARLIER one keeps it) is stated once for the gradient and the tooltip. A
583
- * tooltip that resolved overlap the other way would name a colour the curve is not painted in,
584
- * which is a disagreement no type can catch.
585
- *
586
- * Generic, so a classified span keeps its label through the pass, and a table's row its own
587
- * members. A stretch given backwards is read in order, and one of no length is left out.
588
- */
589
- declare const curveSpans: <T extends ProfileRange>(stretches: readonly T[]) => T[];
590
- /**
591
- * classAt finds the stretch a distance falls in, or `null` where none does.
592
- *
593
- * Half-open at the top, so a distance exactly on a boundary reads as the stretch that starts
594
- * there rather than the one that ends there, the same way a cursor moving forward reads it.
595
- * Where no stretch starts on a boundary, the one that ends there keeps it: its own last meter
596
- * before a gap, and the last meter of the itinerary.
597
- *
598
- * The one reading of a distance against stretches: the word a hover card names, the colour it
599
- * shows and the leg a cursor lights on a map are each this answer, so two of them can never name
600
- * two neighbours at the meter they share. Read through {@link curveSpans}, so an overlap is
601
- * resolved as the curve is painted and a stretch of no length is never the answer.
602
- *
603
- * @param classes The stretches, in any order.
604
- * @param distance Meters from the start of the itinerary.
605
- * @returns The stretch, as {@link curveSpans} states it, or `null` in a gap, before the first
606
- * stretch and past the last.
607
- */
608
- declare const classAt: <T extends ProfileRange>(classes: readonly T[], distance: number) => T | null;
609
- /**
610
- * One bucket of the slope ramp: everything from `grade` up to the next stop, painted in
611
- * `color`.
612
- *
613
- * `key` rather than a label, because a label is a word and words belong to the renderer:
614
- * this entry point ships no strings runtime and must not grow one. `@mountaya/elements-react`
615
- * maps the key onto its own translatable table.
616
- */
617
- interface SlopeColorStop {
618
- /** Degrees. Signed, so a descent bucket is negative. */
619
- readonly grade: number;
620
- readonly color: string;
621
- readonly key: string;
622
- }
623
- /**
624
- * The default slope ramp: steep descent, descent, flat, ascent, steep ascent.
625
- *
626
- * Five buckets rather than a continuous gradient, because a reader compares a stretch against
627
- * a category and not against a hue. The boundaries are in degrees (roughly ±3° for the flat
628
- * band and ±10° for steep), which are the angles a walker feels the difference at, and the
629
- * colours run green through orange in the direction difficulty runs.
630
- */
631
- declare const SLOPE_COLOR_STOPS: readonly SlopeColorStop[];
632
- /**
633
- * slopeColors buckets an itinerary's own steepness into coloured, labelled stretches.
634
- *
635
- * Grade is read with `gradeAt` where the sampling supports it, so a bucket boundary is a real
636
- * change in the terrain rather than a change between two adjacent DEM samples, and is the
637
- * sample interval's own where it does not: see {@link stretchGrade}. Adjacent samples in the
638
- * same bucket coalesce into one stretch, which is what keeps the gradient a handful of stops
639
- * rather than one per sample: a five-hundred-sample itinerary would otherwise mount a
640
- * thousand-stop gradient and repaint it on every hover.
641
- *
642
- * The result is a {@link ProfileClass} list, which is the same shape a caller's own
643
- * classification takes: one colouring pipeline, whether the stretches were computed or stated.
644
- *
645
- * @param points The series' samples, ascending by distance.
646
- * @param stops The ramp's buckets, ascending by grade.
647
- * @default stops {@link SLOPE_COLOR_STOPS}
648
- */
649
- declare const slopeColors: (points: readonly ElevationPoint[], stops?: readonly SlopeColorStop[]) => ProfileClass[];
650
- /**
651
- * curveStops turns coloured stretches of itinerary into the gradient that paints the curve.
652
- *
653
- * A gradient rather than one path per stretch, for two reasons that both come down to the
654
- * joins. Separate paths meet at a seam that antialiases into a hairline of background at
655
- * every boundary, and each one needs its own clip in a space the caller can resize; a single
656
- * path filled with a gradient has no boundary to seam. **Every colour change is a hard edge**
657
- * (two stops at the same offset), because these are stretches of itinerary, not a blend.
658
- *
659
- * Stretches are taken in distance order and cannot overlap: where two would, the earlier one
660
- * keeps the shared ground. Overlap is the one case a gradient genuinely cannot express (a
661
- * stop offset can only move forward), so it is resolved here, in the open, rather than
662
- * emitting stops that go backwards and render as a colour nobody asked for.
663
- *
664
- * Ground no stretch covers is emitted as stops whose `color` is null, which the renderer paints
665
- * with its own accent. The stops never name a colour the caller did not pass.
666
- *
667
- * @returns The stops in offset order, or nothing at all when no stretch survives, which is the
668
- * signal to paint the curve with the plain CSS fill and mount no gradient: the common case,
669
- * and free.
670
- */
671
- declare const curveStops: (colors: readonly CurveColor[], totalDistance: number, range?: ProfileRange) => CurveStop[];
672
- /**
673
- * profileAreaPath renders a series as the filled region under its curve.
674
- *
675
- * Closed against the bottom of the viewBox rather than against the baseline, so the fill
676
- * reads as ground under the itinerary rather than as a band floating above the frame.
677
- */
678
- declare const profileAreaPath: (points: readonly ElevationPoint[], totalDistance: number, domain: ElevationDomain, range?: ProfileRange) => string;
679
-
680
- /**
681
- * Placing an itinerary's waypoints, dividers and cut-offs onto the elevation curve.
682
- *
683
- * One projection, done once, so the pin layer, the axis labels, the drop lines and the section
684
- * chips all read the same numbers rather than three of their own. Every input is a value (a
685
- * series, a domain, a range, a waypoint list), and every output is a position in the chart's
686
- * 0..100 unit space, which is also a CSS percentage.
687
- *
688
- * It is built entirely out of this directory's primitives: `profileX`, `profileY`,
689
- * `resolveWaypoints`, `elevationAt`, `dividesRoute`. A Vue or Flutter binding drawing its own
690
- * profile calls exactly this and writes its own markup, which is the test this repository
691
- * states for where a rule belongs.
692
- *
693
- * `PlacedWaypointMark` is declared here, beside the rule that produces it, and not in the
694
- * component that draws the pins: a `rules/` module that imported its own output type from a
695
- * `components/` one would depend on the markup. A type checker does not see that dependency;
696
- * it shows only as a binding that cannot reimplement the markup without also reimplementing the
697
- * placement.
698
- */
699
-
700
- /**
701
- * A waypoint resolved to a position in the chart's unit space.
702
- *
703
- * The placement is done once, below, so the pin layer, the axis labels and the section chips
704
- * all read the same projection rather than three of their own. It is declared beside the rule
705
- * that places it, so the rule does not depend on the component that draws the pins.
706
- */
707
- interface PlacedWaypointMark {
708
- readonly key: string;
709
- readonly id: string;
710
- readonly label?: string | undefined;
711
- readonly glyph?: string | undefined;
712
- readonly color?: string | undefined;
713
- readonly x: number;
714
- readonly y: number;
715
- /**
716
- * What the waypoint says about the place it marks, carried through from the itinerary.
717
- *
718
- * On the mark rather than looked up by id, because a lookup would need the caller's waypoint
719
- * array threaded into every renderer that draws one, and because an itinerary that doubles
720
- * back past a place has two marks for one id, so the id is not a key here.
721
- */
722
- readonly details?: WaypointDetails | undefined;
723
- /**
724
- * Meters above sea level where the curve sits under this mark, read on the line between the
725
- * two samples either side of it.
726
- */
727
- readonly altitude: number;
728
- /** Meters from the itinerary's start. */
729
- readonly distance: number;
730
- }
731
- /** A dividing waypoint resolved to its label position on the distance axis. */
732
- interface PlacedDivider {
733
- readonly key: string;
734
- readonly id: string;
735
- readonly name: string;
736
- readonly color?: string | undefined;
737
- /** Meters from the itinerary's start. */
738
- readonly distance: number;
739
- /** Unit-space x, which is also a CSS percentage. */
740
- readonly x: number;
741
- /**
742
- * Where the curve sits at that distance, for the drop line's far end. `null` on a 2D
743
- * itinerary.
744
- */
745
- readonly y: number | null;
746
- }
747
- /**
748
- * What placing waypoints on the curve reads: the itinerary, its series, the window and the
749
- * places.
750
- */
751
- interface PlaceOnCurveInput {
752
- /** The same value the element takes, `undefined` included, so a caller passes theirs through. */
753
- readonly geojson: ProfileInput | null | undefined;
754
- readonly series: ElevationSeries;
755
- readonly domain: ElevationDomain;
756
- readonly range: ProfileRange;
757
- readonly waypoints: readonly Waypoint[];
758
- }
759
- /**
760
- * A waypoint that publishes a cut-off, resolved to its mark on the distance axis.
761
- *
762
- * The cut-off is carried as the instant the place publishes, unformatted: printing it needs a
763
- * time zone, which the renderer holds and this module does not.
764
- */
765
- interface PlacedCutoff {
766
- readonly key: string;
767
- readonly id: string;
768
- /** The place's name, for the label's accessible description. */
769
- readonly name?: string | undefined;
770
- /** Meters from the itinerary's start. */
771
- readonly distance: number;
772
- /** Unit-space x, which is also a CSS percentage. */
773
- readonly x: number;
774
- /** RFC 3339 instant by which the place must be left, where one is published. */
775
- readonly cutoffAt?: string | undefined;
776
- }
777
- /** The waypoints placed on the curve, sorted by what each is drawn as. */
778
- interface PlaceOnCurveValue {
779
- /** Every waypoint, in itinerary order, whatever it is drawn as. */
780
- readonly placed: readonly PlacedWaypoint[];
781
- /** The ones drawn as pins on the curve, already filtered to the window. */
782
- readonly pins: PlacedWaypointMark[];
783
- /** The ones that divide the itinerary, already filtered to the window. */
784
- readonly dividers: PlacedDivider[];
785
- /**
786
- * The ones publishing a cut-off, already filtered to the window.
787
- *
788
- * Falls out of the same walk rather than being a second pass: a cut-off belongs to a waypoint,
789
- * and the waypoint has already been projected onto the axis by the time it is read.
790
- */
791
- readonly cutoffs: PlacedCutoff[];
792
- }
793
- /**
794
- * placeOnCurve resolves every waypoint once, and hands each renderer the slice it draws.
795
- *
796
- * One projection, three readers: the pin layer, the axis labels and the drop lines. Not
797
- * tidiness: `resolveWaypoints` walks the geometry, and calling it once per renderer would
798
- * walk a recorded track three times on every geometry change.
799
- *
800
- * **Anything outside the window is filtered out rather than clipped.** Pins and axis labels are
801
- * focusable or semantic: `overflow: hidden` would leave an off-screen `<button>` in the tab
802
- * order, and it would clip the two pins at the very ends of the itinerary, which sit half outside
803
- * the frame by design (`translate(-50%, -100%)`). Clipping is for the curve, which the `<svg>`
804
- * does for itself.
805
- */
806
- declare const placeOnCurve: ({ geojson, series, domain, range, waypoints, }: PlaceOnCurveInput) => PlaceOnCurveValue;
807
-
808
- /**
809
- * A docked elevation panel: how tall it is, what a camera must clear to avoid it, and which
810
- * tier of it fits the surface it is docked to.
811
- *
812
- * Every constant here is a height in CSS pixels and every function is arithmetic over them:
813
- * how tall the panel is with a given set of sections enabled, and the per-edge padding a fit
814
- * has to keep so the framed route never ends up behind it. Nothing reads a canvas, a DOM node
815
- * or a React tree: a measurement arrives as a number, from whatever measured it.
816
- *
817
- * It names no React, which is the test this repository states for where a rule lives: a Dart,
818
- * Swift or Kotlin port draws its own panel and needs exactly this arithmetic to keep the camera
819
- * off it. Under `./profile` rather than `./camera` because every INPUT is a profile-panel
820
- * measurement and `PROFILE_CHART_HEIGHT` is already here; the one function that speaks camera
821
- * does so only by returning a `FitBoundsPadding`, which is `./geo`'s type rather than
822
- * `./camera`'s.
823
- *
824
- * The constants are the values Mountaya's own embed uses. A port whose panel chrome measures
825
- * differently substitutes its own and keeps the rule, which is the direction that matters:
826
- * the structure (base margin, anchor inset, chrome, sections, gaps) is the contract, and the
827
- * numbers are this product's answer to it.
828
- *
829
- * Each name says what it measures rather than which component draws it:
830
- * `EMBED_PROFILE_PANEL_CHROME` is "the panel's own padding and border", and no identifier here
831
- * names a design system's component, as no import of this package does.
832
- */
833
-
834
- /**
835
- * EMBED_FIT_BASE_MARGIN is the breathing room (CSS pixels) the embed keeps on every
836
- * side between the framed route and the viewport edge, so the route sits clear of the
837
- * edges, the top-left watermark, and the top-right controls rather than running up
838
- * against them. Sized for the short embed frame (a 480px preview): a heavier margin
839
- * pushes the fit to zoom further out to leave the inset, which in a small viewport can
840
- * force the route past the organization's minimum zoom and overflow, so it stays modest
841
- * here while the bottom side adds the docked-profile inset on top of it.
842
- */
843
- declare const EMBED_FIT_BASE_MARGIN = 56;
844
- /**
845
- * EMBED_PROFILE_ANCHOR_INSET is the docked profile's bottom offset from the viewport
846
- * edge, the gap the embed positions the panel with.
847
- * The profile's reserved bottom inset starts from this gap, so the camera clears the
848
- * panel AND the gap beneath it.
849
- */
850
- declare const EMBED_PROFILE_ANCHOR_INSET = 16;
851
- /**
852
- * EMBED_PROFILE_PANEL_CHROME is the docked panel's own vertical chrome (its padding, top
853
- * and bottom, plus its border), reserved once whenever any profile section shows, so the
854
- * camera clears the panel's full painted box rather than just its inner content.
855
- */
856
- declare const EMBED_PROFILE_PANEL_CHROME = 24;
857
- /**
858
- * EMBED_PROFILE_CHARACTERISTICS_HEIGHT is the height the characteristics row occupies:
859
- * the activity badge (36px) and the single-line key-figures / segment-chooser row fit
860
- * within it. Reserved when the characteristics section is enabled.
861
- */
862
- declare const EMBED_PROFILE_CHARACTERISTICS_HEIGHT = 40;
863
- /**
864
- * EMBED_PROFILE_ANALYSIS_HEIGHT is the height the two analysis bars (way type +
865
- * surface) and the gap between them occupy. Reserved when the analysis section is
866
- * enabled. A route with neither classified renders no bar at all and comes in under
867
- * the reservation, which is the safe direction: the padding is a floor for fitting
868
- * the map around the profile, so over-reserving leaves a little slack rather than
869
- * clipping the bars.
870
- */
871
- declare const EMBED_PROFILE_ANALYSIS_HEIGHT = 36;
872
- /**
873
- * EMBED_PROFILE_SECTION_GAP is the vertical gap between two stacked sections, added once
874
- * per gap between the enabled sections so the reserved height tracks the rendered layout.
875
- */
876
- declare const EMBED_PROFILE_SECTION_GAP = 12;
877
- /**
878
- * PROFILE_PANEL_MIN_GAP is the breathing gap (CSS pixels) kept between an open floating
879
- * panel's bottom edge and the docked profile's top edge, so the profile never butts
880
- * directly against the panel. The visibility resolver subtracts it from the room beneath
881
- * an open panel before deciding which profile tier fits.
882
- */
883
- declare const PROFILE_PANEL_MIN_GAP = 12;
884
- /**
885
- * EmbedProfileSections is which profile sections the embed config enables: the same
886
- * three flags the docked panel renders from. They decide how tall the reserved bottom
887
- * inset is: an embed showing only the characteristics row reserves far less than one
888
- * showing the chart and the analysis bars.
889
- */
890
- interface EmbedProfileSections {
891
- showAnalysis: boolean;
892
- showCharacteristics: boolean;
893
- showElevation: boolean;
894
- }
895
- /**
896
- * estimateProfileHeight estimates the docked profile panel's rendered box height (CSS
897
- * pixels) for a section combination: its inner content plus the panel's own chrome,
898
- * excluding the anchor inset beneath it and the base breathing margin above it.
899
- *
900
- * Which sections contribute follows the docked profile's collapse rules: the characteristics
901
- * row renders whenever it is enabled; the elevation chart renders when it is enabled AND
902
- * is not collapsed away (a panel hides the chart only while the characteristics row stays
903
- * as the visible summary); the analysis bars render only while no panel collapses them.
904
- * With `collapsed` false the estimate is the full profile; with it true the estimate is
905
- * the stat bar an open panel shrinks the profile to. Pure: it reads only the section flags
906
- * and the layout constants.
907
- *
908
- * @returns 0 when nothing renders (the panel is not mounted), otherwise the panel chrome plus
909
- * the enabled section heights and the gaps between them.
910
- */
911
- declare const estimateProfileHeight: (sections: EmbedProfileSections, options?: {
912
- collapsed?: boolean | undefined;
913
- }) => number;
914
- /**
915
- * embedFitPadding derives the camera padding the embed frames its route with: the base
916
- * breathing margin on every side, plus a BOTTOM inset sized to the docked profile so
917
- * the framed route never hides behind it.
918
- *
919
- * When `measuredPanelHeight` is supplied (the docked panel's real rendered box height,
920
- * measured via a ResizeObserver on its anchor container), the bottom inset is that
921
- * height plus the panel's anchor offset and the base margin, so the fit tracks the
922
- * actual panel at every profile-section combination rather than a constant estimate. A
923
- * zero/negative measurement (a 2D itinerary whose profile renders nothing, or a
924
- * not-yet-laid-out box) means no visible panel, so the bottom keeps only the base
925
- * margin.
926
- *
927
- * When no measurement exists yet (the first tick before the observer fires, or a
928
- * render-free/test context) it falls back to the shared full-profile estimate
929
- * ({@link estimateProfileHeight}): the enabled sections' heights, the gaps between them, and
930
- * the panel's own chrome, plus its anchor offset. With no section enabled the estimate is
931
- * zero (the profile is suppressed entirely), so the bottom side keeps only the base margin.
932
- *
933
- * Pure: it reads the section flags, the optional measured height, and the profile layout
934
- * constants and returns the per-edge padding, with no store, map, or DOM access.
935
- */
936
- declare const embedFitPadding: (sections: EmbedProfileSections, measuredPanelHeight?: number | null) => FitBoundsPadding;
937
- /**
938
- * ProfileVisibility is the docked profile's three-state visibility on the embed: the full
939
- * area chart ("chart"), the collapsed stat bar an open floating panel shrinks it to
940
- * ("bar"), or fully removed ("hidden") when even the stat bar cannot clear an open panel
941
- * on a short surface.
942
- */
943
- type ProfileVisibility = "chart" | "bar" | "hidden";
944
- /**
945
- * ProfileVisibilityInput is the measured geometry {@link resolveProfileVisibility} reads.
946
- *
947
- * Every length is in CSS pixels, in the embed root's own coordinate space, so a root that is
948
- * offset on its page measures the same as one that is not. A caller measures the root and the
949
- * open panel, fills this, and hands it over: the rule reads it and never writes to it.
950
- */
951
- interface ProfileVisibilityInput {
952
- /**
953
- * The open panel's bottom edge, measured down from the root's top edge. Read only while
954
- * `panelOpen` is true.
955
- */
956
- readonly panelBottom: number;
957
- /** Whether a floating panel is open over the surface, which the profile has to clear. */
958
- readonly panelOpen: boolean;
959
- /**
960
- * The root's rendered height. Zero or less reads as a surface not laid out yet, which shows
961
- * the full chart.
962
- */
963
- readonly rootHeight: number;
964
- /** The profile sections the embed's configuration enables. */
965
- readonly sections: EmbedProfileSections;
966
- }
967
- /**
968
- * resolveProfileVisibility picks the docked profile's visibility tier from the measured
969
- * surface geometry, so the profile stays out of an open floating panel's way on a short
970
- * surface.
971
- *
972
- * An unmeasured or degenerate layout (rootHeight <= 0) fails open to the full chart, so the
973
- * profile never flashes to hidden before the first real measurement lands. For a real
974
- * (positive) height it computes the vertical room below any open panel (the root height less
975
- * the anchor inset and, when a panel is open, the panel's bottom plus a breathing gap) and
976
- * compares it against the profile's estimated full and collapsed heights: with no panel open
977
- * the full chart shows when it fits, else the stat bar, else nothing; with a panel open the
978
- * chart stays hidden (preserving the collapse UX), so it resolves to the stat bar when that
979
- * fits and hidden otherwise. A panel taller than the surface yields a negative capacity,
980
- * which every comparison treats as "hidden".
981
- *
982
- * Pure geometry: no store, map, or DOM access.
983
- */
984
- declare const resolveProfileVisibility: (input: ProfileVisibilityInput) => ProfileVisibility;
985
-
986
- /**
987
- * An instant a place records, read as the client reads a timestamp and handed to the caller's
988
- * formatter: a cut-off and a `date` field alike.
989
- *
990
- * A wall-clock time needs a time zone, and only the application holds the reader's, so the words a
991
- * cut-off is printed in are the caller's formatter's. What reaches that formatter is the instant
992
- * itself, never its text: a formatter handed text parses it again, and two formatters parse one
993
- * text two ways. The reading is the contract's, the one `@mountaya/client` decodes a declared
994
- * instant by. This package takes the client as a type-only peer, so it states the grammar here
995
- * rather than importing the client's.
996
- */
997
- /**
998
- * formattedInstant writes an instant a place records through the caller's formatter: it hands
999
- * `format` the instant `value` names, read as the client reads a timestamp, and answers `value` as
1000
- * it stands where it names none.
1001
- *
1002
- * @param value The instant as the place records it, an RFC 3339 timestamp with its zone.
1003
- * @param format The caller's formatter, which writes an instant in the reader's zone and language.
1004
- * @returns What the formatter writes, or `value` itself where it names no instant.
1005
- *
1006
- * @example
1007
- * ```ts
1008
- * import { formattedInstant } from "@mountaya/elements/profile";
1009
- *
1010
- * const time = new Intl.DateTimeFormat("fr", { timeStyle: "short", timeZone: "Europe/Paris" });
1011
- *
1012
- * formattedInstant("2026-07-14T09:00:00.000Z", (instant) => time.format(instant)); // "11:00"
1013
- * formattedInstant("at dawn", (instant) => time.format(instant)); // "at dawn"
1014
- * ```
1015
- */
1016
- declare const formattedInstant: (value: string, format: (instant: Date) => string) => string;
1017
-
1018
- /**
1019
- * A memoized `Intl.NumberFormat` for one locale and option shape.
1020
- *
1021
- * A language `Intl` refuses as a tag formats as the tag it spells with hyphens, or in English.
1022
- * An option `Intl` refuses still throws its `RangeError`.
1023
- */
1024
- declare const numberFormat: (locale: string, options?: Intl.NumberFormatOptions) => Intl.NumberFormat;
1025
- /**
1026
- * A memoized `Intl.DateTimeFormat` for one locale and option shape, writing dates in the
1027
- * Gregorian calendar.
1028
- *
1029
- * The calendar is Gregorian whatever calendar the locale keeps, its tag names (`-u-ca-buddhist`)
1030
- * or the options ask for, so a Thai reader's date carries the year 2026 and never the Buddhist
1031
- * year 2569: every Mountaya SDK writes a date so, the one calendar each platform's locale services
1032
- * all write. The fields, their order, their words and their digits stay the locale's own.
1033
- *
1034
- * A language `Intl` refuses as a tag formats as the tag it spells with hyphens, or in English.
1035
- *
1036
- * @param locale The BCP 47 tag of the locale a date is written for.
1037
- * @param options The options `Intl.DateTimeFormat` takes: `dateStyle` for the locale's own date
1038
- * of a length, `timeStyle` (`short` or `medium`, the lengths every SDK writes alike) for its own
1039
- * time of day on the locale's own clock, both joined as the locale joins them, and `timeZone` for
1040
- * the IANA zone a date is placed in.
1041
- * @returns The formatter, or `null` where `options.timeZone` names a zone the runtime's zone data
1042
- * does not hold, which writes no date.
1043
- *
1044
- * @example
1045
- * ```ts
1046
- * import { dateTimeFormat } from "@mountaya/elements/profile";
1047
- *
1048
- * dateTimeFormat("th-TH", { dateStyle: "long", timeZone: "UTC" })?.format(new Date(0));
1049
- * // "1 มกราคม ค.ศ. 1970"
1050
- * ```
1051
- */
1052
- declare const dateTimeFormat: (locale: string, options?: Intl.DateTimeFormatOptions) => Intl.DateTimeFormat | null;
1053
- /**
1054
- * A memoized `Intl.RelativeTimeFormat` for one locale and option shape.
1055
- *
1056
- * A language `Intl` refuses as a tag formats as the tag it spells with hyphens, or in English.
1057
- */
1058
- declare const relativeTimeFormat: (locale: string, options?: Intl.RelativeTimeFormatOptions) => Intl.RelativeTimeFormat;
1059
- /**
1060
- * A memoized `Intl.DisplayNames` for one locale and option shape.
1061
- *
1062
- * A language `Intl` refuses as a tag names things as the tag it spells with hyphens does, or in
1063
- * English.
1064
- */
1065
- declare const displayNames: (locale: string, options: Intl.DisplayNamesOptions) => Intl.DisplayNames;
1066
- /**
1067
- * clearIntlCache empties the cache.
1068
- *
1069
- * Published for one reader: a suite asserting that a formatter is constructed once, which
1070
- * cannot observe that without a way to start from empty. Nothing in the shipped source calls
1071
- * it, and `boundary.test.ts` is what keeps that true.
1072
- */
1073
- declare const clearIntlCache: () => void;
1074
-
1075
- /**
1076
- * The leg a reader points at, lit on the map beside a profile or a table.
1077
- *
1078
- * The map holds one emphasis slot, written by whichever element a pointer is over, so which
1079
- * element may write it and which may clear it is decided here, against the emphasis calls a map
1080
- * answers. The stretch lit is the series cut between the leg's two ends (`lineBetween`), the same
1081
- * line the chart drew. It renders nothing.
1082
- */
1083
-
1084
- /** The emphasis calls of a map an element lights a leg through. */
1085
- interface LegEmphasisMap {
1086
- setEmphasis(feature: Feature | null, options?: {
1087
- readonly color?: string | undefined;
1088
- } | undefined): void;
1089
- clearEmphasis(): void;
1090
- }
1091
- /**
1092
- * writeLegEmphasis lights the stretch an element points at on the map's emphasis slot, or takes
1093
- * down what the element lit where it points at none, and answers whether the slot holds the
1094
- * element's stretch afterwards.
1095
- *
1096
- * An element clears only a slot it wrote: two elements over one map would otherwise take turns
1097
- * clearing each other's stretch as a pointer left one for the other, and an element that never
1098
- * pointed at a leg leaves the slot as it found it.
1099
- *
1100
- * @param map The map whose emphasis slot is written.
1101
- * @param lit Whether the slot holds this element's stretch.
1102
- * @param stretch The stretch pointed at, or `null` where the element points at none.
1103
- * @param color The colour the stretch is lit in, or `undefined` for the map's own.
1104
- * @returns Whether the slot holds this element's stretch after the write.
1105
- */
1106
- declare const writeLegEmphasis: (map: LegEmphasisMap, lit: boolean, stretch: Geometry | null, color?: string) => boolean;
1107
-
1108
- /**
1109
- * The classification palettes an elevation profile's bars are filled from: one colour per surface
1110
- * and one per way type, for the stretches a routed segment's analysis classifies.
1111
- *
1112
- * Each is keyed by the contract's own enum, `SurfaceType` and `WayType` from `@mountaya/client`,
1113
- * so every value has a colour and a value the contract adds fails to type-check until it is given
1114
- * one. They are a fixed data-visualization scale of hex literals rather than theme tokens, so a
1115
- * legend reads the same under every organization's branding. The slope ramp is not one of them: it
1116
- * is `slopeRampColor`, a continuous blend rather than a lookup.
1117
- */
1118
- /**
1119
- * surfaceColors maps every surface classification to the hex colour the elevation profile's
1120
- * surface bar fills that stretch with.
1121
- *
1122
- * Grouped by material family, so the bar reads as a material legend at a glance: slate and stone
1123
- * greys for hard surfaces (asphalt, concrete, paving), browns and ambers for loose ground (dirt,
1124
- * gravel, sand), greens for vegetation (grass, grass paver). An unclassified stretch (`unknown`)
1125
- * takes the neutral grey {@link wayTypeColors} gives it too.
1126
- */
1127
- declare const surfaceColors: Readonly<Record<SurfaceType, string>>;
1128
- /**
1129
- * wayTypeColors maps every way-type classification to the hex colour the elevation profile's
1130
- * way-type bar fills that stretch with.
1131
- *
1132
- * Grouped by who the way is built for, so the bar reads as a way-type legend at a glance: blues
1133
- * for cycle infrastructure, greens for natural paths, oranges and reds for vehicle roads, purples
1134
- * and indigos for pedestrian ways. An unclassified stretch (`unknown`) takes the neutral grey
1135
- * {@link surfaceColors} gives it too.
1136
- */
1137
- declare const wayTypeColors: Readonly<Record<WayType, string>>;
1138
-
1139
- /**
1140
- * The box the elevation profile is drawn in, not the projections it is drawn with.
1141
- *
1142
- * The rest of this directory owns those: the 0..100 unit space, its insets, the elevation
1143
- * domain a curve is fitted to. Nothing here restates them. What lives here is the frame around
1144
- * the plot (the gutter the analysis bars' captions occupy, the inset their right edge stops
1145
- * at, the height the unit space is stretched into) and the one map from a distance to a
1146
- * position along it.
1147
- *
1148
- * It is here rather than in `@mountaya/elements-react` because two surfaces lay out against
1149
- * these numbers and only one of them is the chart: the React elevation element draws the curve,
1150
- * and the studio's analysis bars draw coloured bands underneath it that have to start and stop
1151
- * on the same pixels. A constant two packages measure against is a rule, and a port writing its
1152
- * own bar strip needs it before it has written a single widget.
1153
- *
1154
- * No colour lives here. The tint of the bars' cursor line is written in Mantine's custom
1155
- * properties, so it names a design system, which this package's `boundary.test.ts` refuses
1156
- * outright: geometry ports, and a tint expressed in somebody else's custom properties does not.
1157
- * It lives in `@mountaya/studio-react`, the package that brings Mantine.
1158
- */
1159
- /**
1160
- * PROFILE_LABEL_COLUMN is the pixel gutter the analysis bars' captions occupy. It matches the
1161
- * elevation element's own axis gutter (`--mtya-profile-axis-size`, restated in that element's
1162
- * stylesheet because CSS cannot import a constant), so the bars' strips start exactly where the
1163
- * curve does and a surface band sits under the stretch of route it describes. Widening one
1164
- * without the other slides the two apart, and nothing renders wrong enough to notice, so
1165
- * `elementTokens.test.ts` in `@mountaya/elements-react` holds this number against the token the
1166
- * sheet declares. Sized so a four-digit metric elevation label ("2,600 m") and a two-word
1167
- * caption ("Way type") each fit on one line.
1168
- */
1169
- declare const PROFILE_LABEL_COLUMN = 68;
1170
- /**
1171
- * PROFILE_PLOT_RIGHT_INSET is the pixel inset at the right of the chart and the analysis
1172
- * bars alike: breathing room so the curve's last sample and the final band do not run into
1173
- * the panel's edge. Shared for the same reason as the gutter above: both plots have to end
1174
- * on the same x or a band stops describing the stretch above it.
1175
- */
1176
- declare const PROFILE_PLOT_RIGHT_INSET = 12;
1177
- /**
1178
- * PROFILE_CHART_HEIGHT is the plot's height in CSS pixels, handed to the elevation element
1179
- * as its `height`. The curve is drawn in a stretched unit space rather than in pixels, so
1180
- * this is the box that space is stretched into and nothing else reads it: a mark placed on
1181
- * the curve is placed by percentage, so the waypoint overlay does not read it. A starting value
1182
- * tuned visually by the caller.
1183
- */
1184
- declare const PROFILE_CHART_HEIGHT = 80;
1185
- /**
1186
- * distanceToFraction maps a cumulative distance (km) to its fraction along the profile's
1187
- * full distance, clamped to [0, 1] so a value at (or just past) the curve's extent still
1188
- * resolves inside the plot rather than off its edge. A non-positive total collapses to 0.
1189
- * The analysis bars' cells and their synced cursor line both call it, so a band and the line
1190
- * at the same distance land on the same x fraction the curve is drawn against.
1191
- */
1192
- declare const distanceToFraction: (km: number, totalKm: number) => number;
1193
-
1194
- /**
1195
- * How many buckets a scrub is quantized into.
1196
- *
1197
- * On an eight-hundred-pixel chart that is a little over three pixels a bucket, which is finer
1198
- * than a pointer is read and far finer than a curve drawn from five hundred samples can
1199
- * distinguish. The count is fixed rather than derived from the element's width because
1200
- * deriving it would mean measuring the element, which is the whole thing this design avoids.
1201
- */
1202
- declare const HIT_SLICES = 240;
1203
- /** SLICE_WIDTH is the width of one of the {@link HIT_SLICES} columns, in the chart's unit space. */
1204
- declare const SLICE_WIDTH: number;
1205
- /** One column of the invisible grid a pointer is read through. */
1206
- interface HitSlice {
1207
- readonly slice: number;
1208
- /** Unit-space x of the column's left edge, which is also a CSS percentage. */
1209
- readonly x: number;
1210
- /** The sample this column resolves to, or `-1` where the series has none. */
1211
- readonly index: number;
1212
- }
1213
- /**
1214
- * buildSlices resolves the whole grid once, rather than binary-searching per pointer move.
1215
- *
1216
- * The geometry depends only on the series and the window, so these columns are stable across
1217
- * an entire scrub, and a bucket index is exactly what an arrow key steps, which is why
1218
- * keyboard scrubbing is the same code path as the pointer.
1219
- *
1220
- * The navigator drags through the same grid as the chart. Two grids with two ways of reading a
1221
- * pointer would be two interaction models, and the second one is always the one nobody tested.
1222
- */
1223
- declare const buildSlices: (points: readonly ElevationPoint[], range: ProfileRange) => HitSlice[];
1224
- /**
1225
- * distanceForSlice reads the distance a column stands for.
1226
- *
1227
- * The navigator needs the distance rather than the sample: a window edge is a place on the
1228
- * axis, not a point on the curve, and snapping it to the nearest sample would make a drag
1229
- * jump by a sample's width on a coarsely-sampled itinerary.
1230
- */
1231
- declare const distanceForSlice: (slice: number, range: ProfileRange) => number;
1232
-
1233
- /**
1234
- * Which table row a reader is pointing at, from a segment the map names or from a profile's
1235
- * cursor.
1236
- *
1237
- * A map names the segment its tiles carry, and a profile's cursor stands at a distance; both light
1238
- * one row of a segment table and one leg on the map, so each is answered once here. It renders
1239
- * nothing.
1240
- */
1241
-
1242
- /**
1243
- * rowStandsFor reports whether a row answers to a segment's id: its own, or, where the row is a
1244
- * collapsed group, one of the segments it stands for.
1245
- *
1246
- * A map reports the segment its tiles carry, which for a group is always a member and never the id
1247
- * the row was given, so a row matched on its own id alone would light nothing on exactly the
1248
- * itineraries that most need it.
1249
- *
1250
- * @param row The row.
1251
- * @param id The segment's id, or nothing.
1252
- */
1253
- declare const rowStandsFor: (row: Pick<ItinerarySegmentRow, "id" | "memberIds">, id: string | null | undefined) => boolean;
1254
- /**
1255
- * rowAt answers the row a profile's cursor stands in: the one whose span holds the cursor's
1256
- * distance, read as {@link classAt} reads a stretch.
1257
- *
1258
- * So the later of two rows holds the meter they share, the last meter of a row nothing follows
1259
- * stays in that row, a row of no length holds nothing, and a distance in no row answers none. The
1260
- * row the map lights and the stretch the hover card names are then one answer.
1261
- *
1262
- * @param rows The rows, each spanning its stretch of the distance axis.
1263
- * @param distance Meters from the start of the itinerary.
1264
- * @returns The row as given, or `null`.
1265
- */
1266
- declare const rowAt: <T extends ProfileRange>(rows: readonly T[], distance: number) => T | null;
1267
-
1268
- /**
1269
- * What a section chip under a profile states about its leg, as figures before any of them is
1270
- * written for a reader.
1271
- *
1272
- * A chip is as wide as its leg and says a few figures about it; which figures, in which order, and
1273
- * what its grade is are the rule, and how each is written is the formatters'. It renders nothing.
1274
- */
1275
-
1276
- /** One figure a section chip can state, each about its leg alone. */
1277
- type SectionChipStat = "ascent" | "descent" | "distance" | "grade";
1278
- /**
1279
- * DEFAULT_SECTION_CHIP_STATS is what a chip states where its caller names nothing: its leg's
1280
- * length and climb, the two a reader compares two legs on.
1281
- */
1282
- declare const DEFAULT_SECTION_CHIP_STATS: readonly SectionChipStat[];
1283
- /** One figure a chip states: which it is, and its value in meters or degrees. */
1284
- interface SectionChipCell {
1285
- readonly key: SectionChipStat;
1286
- readonly value: number;
1287
- }
1288
- /** The figures of a leg a chip reads. */
1289
- type SectionFigures = Pick<ItinerarySegmentRowMetrics, "sectionAscent" | "sectionDescent" | "sectionDistance">;
1290
- /**
1291
- * sectionGrade states a leg's average slope, in degrees: its climb less its loss, over its
1292
- * length.
1293
- *
1294
- * The average rather than the steepest meter: a chip a few characters wide is read as "how hard
1295
- * is this leg", and a maximum stated in that space reads as an average anyway. The itinerary's
1296
- * true maximum is the stat strip's, where there is room to name it.
1297
- *
1298
- * @returns The grade, or `null` where a figure is missing or the leg has no length.
1299
- */
1300
- declare const sectionGrade: ({ sectionAscent, sectionDescent, sectionDistance, }: SectionFigures) => number | null;
1301
- /**
1302
- * sectionChipCells answers the figures a section chip states about its leg, in the order asked.
1303
- *
1304
- * Each is the leg's own: its length, its climb and its loss, stated positive as the wire states
1305
- * them, and its average grade ({@link sectionGrade}). A figure with no value takes no cell, so a
1306
- * leg of an itinerary with no elevation states its length alone.
1307
- *
1308
- * @param metrics The leg's figures, as a segment row states them.
1309
- * @param stats The figures asked for, in the order the chip states them.
1310
- * @default stats {@link DEFAULT_SECTION_CHIP_STATS}
1311
- * @returns One cell per figure asked that has a value.
1312
- */
1313
- declare const sectionChipCells: (metrics: SectionFigures, stats?: readonly SectionChipStat[]) => SectionChipCell[];
1314
-
1315
- /**
1316
- * The continuous slope colour ramp: a signed grade in, a hex colour out.
1317
- *
1318
- * The third of three slope-colouring rules this family ships, and the reason all three are
1319
- * named apart rather than spelled the same: they answer different questions and a reader who
1320
- * reaches the wrong one gets a plausible colour. {@link slopeColors} buckets a whole itinerary
1321
- * into coloured STRETCHES for a gradient; `slopeBandColor` in `@mountaya/elements/video` paints
1322
- * one sample by its avalanche steepness BAND, symmetrically, because a 30° descent is as steep
1323
- * as a 30° climb; this one paints one sample on a CONTINUOUS ramp that is asymmetric on purpose
1324
- * (warm reds climbing, cool blues descending), so a reader tells the direction from the hue
1325
- * before they read the number.
1326
- *
1327
- * A bare `slopeColor` would name any of the three, and two published declarations under one name
1328
- * with two different palettes are a choice a reader cannot see; `slopeRampColor` names this one.
1329
- * It is here because nothing in it is about React or about a studio: it is arithmetic over a
1330
- * colour table, which is the same reason the projections and the formatters are here, and the
1331
- * reason a Flutter port finds it.
1332
- */
1333
- /**
1334
- * One anchor on the ramp: a slope magnitude in degrees and the hex colour at exactly that
1335
- * steepness. The ramp interpolates between adjacent stops, so a slope between two thresholds
1336
- * reads a blended colour rather than snapping to a band.
1337
- */
1338
- interface SlopeRampStop {
1339
- readonly color: string;
1340
- /** Degrees, unsigned: each half of the ramp is read by magnitude. */
1341
- readonly degrees: number;
1342
- }
1343
- /**
1344
- * The uphill half, from flat green through yellow and orange to deep red at the steepest.
1345
- *
1346
- * The stops are the thresholds an uphill gradient is coloured against; a slope between two is a
1347
- * linear blend of their colours.
1348
- */
1349
- declare const ASCENT_RAMP_STOPS: readonly SlopeRampStop[];
1350
- /**
1351
- * The downhill half, from flat through light to deep blue at the steepest.
1352
- *
1353
- * It mirrors {@link ASCENT_RAMP_STOPS} at the same degree thresholds, so a downhill stretch
1354
- * reads cool blues against the uphill warm reds at matching steepness.
1355
- */
1356
- declare const DESCENT_RAMP_STOPS: readonly SlopeRampStop[];
1357
- /**
1358
- * slopeRampColor resolves a SIGNED slope angle in degrees to its colour on the ramp.
1359
- *
1360
- * A positive (uphill) angle reads the warm ascent half, a negative (downhill) angle the cool
1361
- * descent half by its magnitude, and a flat slope the green floor the two share. Angles steeper
1362
- * than the last stop clamp to its colour.
1363
- *
1364
- * The result is lowercased, and that is not cosmetic: an at-stop colour is returned verbatim
1365
- * from the table above while a blended one is built channel-by-channel in lowercase, so without
1366
- * this a caller comparing two colours for equality (a chart deciding whether a stretch needs a
1367
- * new gradient stop) sees `#FF9800` and `#ff9800` as different paints.
1368
- *
1369
- * A slope that is no number (`NaN`, or a value of another type from a caller the compiler does
1370
- * not check) is neither uphill, downhill nor flat. It reads the neutral `#94a3b8` and never the
1371
- * green floor, which would paint a stretch with no grade as level ground.
1372
- *
1373
- * @param degrees The slope angle, in degrees: positive uphill, negative downhill.
1374
- * @returns A lowercase `#rrggbb` colour.
1375
- */
1376
- declare const slopeRampColor: (degrees: number) => string;
1377
-
1378
- /**
1379
- * What the stat strip over a profile states, as figures before any of them is written for a
1380
- * reader.
1381
- *
1382
- * The strip is one row that states the whole itinerary and follows the cursor while a scrub
1383
- * stands, rather than a second row that appears beside it. Which figures, in which order, and
1384
- * which of them the cursor takes over are the rule; how each is written is the formatters'. It
1385
- * renders nothing.
1386
- */
1387
-
1388
- /** One figure the stat strip can state. */
1389
- type StatStripStat = "ascent" | "descent" | "difficulty" | "distance" | "duration" | "elevation" | "grade";
1390
- /**
1391
- * DEFAULT_STAT_STRIP_STATS is what the strip states where its caller names nothing: the
1392
- * itinerary's length, its climb, its loss and its highest point.
1393
- *
1394
- * The steepest grade is not among them, since a maximum stated beside three totals reads as an
1395
- * average, and neither is the duration nor the difficulty, which no geometry implies.
1396
- */
1397
- declare const DEFAULT_STAT_STRIP_STATS: readonly StatStripStat[];
1398
- /**
1399
- * One figure the strip states: which it is, and its value in meters, seconds or degrees, but the
1400
- * difficulty, which is the itinerary's own word as written.
1401
- */
1402
- type StatStripCell = {
1403
- readonly key: Exclude<StatStripStat, "difficulty">;
1404
- readonly value: number;
1405
- } | {
1406
- readonly key: "difficulty";
1407
- readonly value: string;
1408
- };
1409
- /** Where a scrub stands, as the strip reads it. */
1410
- interface StatStripCursor {
1411
- /** Meters from the start of the itinerary, of the sample the cursor stands on. */
1412
- readonly distance: number;
1413
- /** Meters above sea level, of that sample. */
1414
- readonly elevation: number;
1415
- /** The grade there, in degrees, or `null` where none reads. */
1416
- readonly grade: number | null;
1417
- }
1418
- /**
1419
- * statStripCells answers the figures the stat strip states, in the order asked.
1420
- *
1421
- * Each is the itinerary's: its length, its duration, its climb and its loss, its highest
1422
- * altitude, its steepest grade and its hardest difficulty. While a scrub stands the cursor takes
1423
- * over three of them, the distance, the altitude and the grade, each the cursor's own and never
1424
- * the itinerary's in its place. A figure with no value takes no cell, so a 2D itinerary states no
1425
- * climb rather than a climb of zero.
1426
- *
1427
- * @param characteristics The itinerary's figures, stated over derived.
1428
- * @param cursor Where a scrub stands, or `null` where none does.
1429
- * @param stats The figures asked for, in the order the strip states them.
1430
- * @default stats {@link DEFAULT_STAT_STRIP_STATS}
1431
- * @returns One cell per figure asked that has a value.
1432
- */
1433
- declare const statStripCells: (characteristics: ResolvedCharacteristics, cursor: StatStripCursor | null, stats?: readonly StatStripStat[]) => StatStripCell[];
1434
-
1435
- /**
1436
- * STEEPNESS_OVERLAY_SLUG is the slug of the platform's steepness overlay. The studio
1437
- * uses this single identifier wherever it branches on which surface overlay is
1438
- * active, never the layer type or the display name.
1439
- */
1440
- declare const STEEPNESS_OVERLAY_SLUG = "steepness";
1441
- /**
1442
- * SteepnessClass is the discrete five-band slope-angle classification the right-
1443
- * click readout shows when the slope steepness overlay is active. The band
1444
- * thresholds are the ones the platform's steepness overlay draws.
1445
- */
1446
- type SteepnessClass = "25-30" | "30-35" | "35-40" | "40-45" | "45+";
1447
- /**
1448
- * STEEPNESS_THRESHOLDS are the degree breakpoints the right-click classifier
1449
- * walks, the breakpoints of the platform's steepness overlay.
1450
- */
1451
- declare const STEEPNESS_THRESHOLDS: readonly [25, 30, 35, 40, 45];
1452
- /**
1453
- * classifySteepness buckets a slope angle in degrees into its steepness band
1454
- * label, or null when the slope is below the lowest threshold (the overlay
1455
- * paints transparent there, so there's nothing to classify).
1456
- *
1457
- * A slope that is no number has no band and answers null: `NaN`, or what a caller the compiler
1458
- * does not check hands over for a point with no slope. Every comparison with `NaN` is false, so
1459
- * the first threshold is asked as what the slope reaches and never as what it falls short of,
1460
- * or such a slope would fall through to the steepest band.
1461
- *
1462
- * @param slope The slope angle, in degrees.
1463
- */
1464
- declare const classifySteepness: (slope: number) => SteepnessClass | null;
1465
-
1466
- /**
1467
- * What each cell of an itinerary's tables states, as a model before any of it is written or drawn:
1468
- * the segment table, a row per leg, and the waypoint table, a row per place.
1469
- *
1470
- * A cell's figures are numbers and its words are keys, so a table in any language, and a binding
1471
- * in any framework, states the same facts in the same column. Formatting each figure is the
1472
- * formatters'. It renders nothing.
1473
- */
1474
-
1475
- /** One column the segment table draws for itself. */
1476
- type SegmentTableColumn = "altitude" | "difficulty" | "distance" | "duration" | "elevation" | "profile" | "segment";
1477
- /**
1478
- * DEFAULT_SEGMENT_TABLE_COLUMNS is the columns a segment table draws where its caller names
1479
- * none: the leg's name, its shape, how far and how much, which is what a roadbook is read for.
1480
- */
1481
- declare const DEFAULT_SEGMENT_TABLE_COLUMNS: readonly SegmentTableColumn[];
1482
- /**
1483
- * What one cell of a segment row states. Figures are in meters and seconds, stated positive as
1484
- * the wire states them, and `null` where the row has none.
1485
- */
1486
- type SegmentRowCell = {
1487
- readonly column: "segment";
1488
- readonly name: string;
1489
- } | {
1490
- readonly column: "profile";
1491
- /** The leg's stretch of the whole itinerary's sparkline, lit. */
1492
- readonly lit: ProfileRange;
1493
- /** The colour the stretch is lit in, or `null` for the table's own. */
1494
- readonly color: string | null;
1495
- } | {
1496
- readonly column: "distance";
1497
- /** The leg's own length. */
1498
- readonly leg: number | null;
1499
- /** The running distance at the leg's end, under it. */
1500
- readonly total: number | null;
1501
- } | {
1502
- readonly column: "elevation";
1503
- readonly ascent: number | null;
1504
- readonly descent: number | null;
1505
- /** The running ascent at the leg's end, under them: the climb alone. */
1506
- readonly totalAscent: number | null;
1507
- } | {
1508
- readonly column: "altitude";
1509
- /** The leg's altitude band, where both its ends are known. */
1510
- readonly band: {
1511
- readonly min: number;
1512
- readonly max: number;
1513
- } | null;
1514
- /** The one end known, the lower first, where the band is not. */
1515
- readonly single: number | null;
1516
- } | {
1517
- readonly column: "duration";
1518
- readonly seconds: number | null;
1519
- } | {
1520
- readonly column: "difficulty";
1521
- readonly text: string | null;
1522
- };
1523
- /**
1524
- * segmentRowCell answers what one of the segment table's own columns states about a leg.
1525
- *
1526
- * The name; the whole itinerary's sparkline with the leg's own stretch lit in its colour; the
1527
- * leg's distance over the running distance; its ascent and descent over the running ascent alone;
1528
- * its altitude band, or the one end known where the other is not; its duration; and its
1529
- * difficulty as the itinerary writes it, never translated, since the taxonomy is the itinerary's.
1530
- *
1531
- * @param row The leg's row.
1532
- * @param column The column.
1533
- * @returns The cell's model.
1534
- */
1535
- declare const segmentRowCell: (row: ItinerarySegmentRow, column: SegmentTableColumn) => SegmentRowCell;
1536
- /** One column the waypoint table draws for itself. */
1537
- type WaypointTableColumn = "altitude" | "amenities" | "cutoff" | "distance" | "elevation" | "profile" | "properties" | "waypoint";
1538
- /**
1539
- * DEFAULT_WAYPOINT_TABLE_COLUMNS is the columns a waypoint table draws where its caller names
1540
- * none: the place, its shape, how far, how much climb, and what is there.
1541
- */
1542
- declare const DEFAULT_WAYPOINT_TABLE_COLUMNS: readonly WaypointTableColumn[];
1543
- /**
1544
- * What one cell of a waypoint row states. Figures are in meters, stated positive as the wire
1545
- * states them, and `null` where the row has none.
1546
- */
1547
- type WaypointRowCell = {
1548
- readonly column: "waypoint";
1549
- /** The glyph the place is marked with: its own where the set draws it, else the pin. */
1550
- readonly glyph: string;
1551
- /** The place's name, or the `profile` word an unnamed place is listed under. */
1552
- readonly label: {
1553
- readonly name: string;
1554
- } | {
1555
- readonly word: "unlabelledWaypoint";
1556
- };
1557
- } | {
1558
- readonly column: "profile";
1559
- /** The stretch reaching the place, lit on the whole itinerary's sparkline. */
1560
- readonly lit: ProfileRange;
1561
- } | {
1562
- readonly column: "distance";
1563
- readonly total: number;
1564
- } | {
1565
- readonly column: "elevation";
1566
- /** The climb since the previous place. */
1567
- readonly ascent: number | null;
1568
- /** The loss since the previous place. */
1569
- readonly descent: number | null;
1570
- } | {
1571
- readonly column: "altitude";
1572
- readonly altitude: number | null;
1573
- } | {
1574
- readonly column: "amenities";
1575
- /** The services the place offers, in the order it states them. */
1576
- readonly services: readonly string[];
1577
- } | {
1578
- readonly column: "cutoff";
1579
- /** The place's cut-off as the caller's formatter writes it, or `null`. */
1580
- readonly moment: string | null;
1581
- } | {
1582
- readonly column: "properties";
1583
- /** The custom fields: each key, its author's label and its value by its declared format. */
1584
- readonly fields: readonly {
1585
- readonly key: string;
1586
- readonly label: string;
1587
- readonly value: string;
1588
- }[];
1589
- };
1590
- /** What a waypoint row's cells read beside the row. */
1591
- interface WaypointRowCellOptions {
1592
- /**
1593
- * Writes a cut-off's instant, and a `date` field's, handed the instant each names. Without it
1594
- * neither is stated; a value that names no instant is stated as it stands.
1595
- */
1596
- readonly formatCutoffAt?: ((instant: Date) => string) | undefined;
1597
- /** The glyph set the table marks its places with. */
1598
- readonly icons: Pick<IconProvider, "has">;
1599
- /** The reader's language and length unit, which a custom field's value is written in. */
1600
- readonly units: Pick<UnitFormatOptions, "language" | "length">;
1601
- }
1602
- /**
1603
- * waypointRowCell answers what one of the waypoint table's own columns states about a place.
1604
- *
1605
- * The place's glyph, the fallback pin where the set cannot draw its own, and its name, or the
1606
- * word an unnamed place is listed under; the whole itinerary's sparkline with the stretch reaching
1607
- * the place lit; its running distance; the ascent and descent since the previous place; its
1608
- * altitude; its services in the order it states them; its cut-off only through the caller's
1609
- * formatter, since an instant needs a time zone only the caller holds; and its custom fields, each
1610
- * written by the format its author declared.
1611
- *
1612
- * @param row The place's row.
1613
- * @param column The column.
1614
- * @param options The glyph set, the cut-off's formatter and the reader's units.
1615
- * @returns The cell's model.
1616
- */
1617
- declare const waypointRowCell: (row: ItineraryWaypointRow, column: WaypointTableColumn, { formatCutoffAt, icons, units }: WaypointRowCellOptions) => WaypointRowCell;
1618
-
1619
- /**
1620
- * What an itinerary's tables write to the map beside them, and which of their rows they light.
1621
- *
1622
- * A table is read a row at a time. The row a reader points at pins the table's cursor marker on
1623
- * the map: a segment row at the sample nearest the end of its leg, lighting the leg on the map's
1624
- * emphasis slot, and a waypoint row at the sample nearest the place's pass, lighting none. The
1625
- * map's own cursor lights the segment row of the leg it is over, unless the app names the row lit.
1626
- * Each answer is given once here, for every binding of the tables. It renders nothing.
1627
- */
1628
-
1629
- /** What a table writes to its map for the row a reader points at. */
1630
- interface TableCursor {
1631
- /** The sample the table's cursor marker is pinned at, or `null` where none is pinned. */
1632
- readonly marker: ElevationPoint | null;
1633
- /** The stretch lit on the map's emphasis slot, or `null` where none is lit. */
1634
- readonly stretch: LineString | null;
1635
- }
1636
- /**
1637
- * segmentRowCursor answers what a segment table writes to its map for the row a reader points at:
1638
- * its cursor marker at the sample of the series nearest the end of the row's leg, the earlier of
1639
- * two as near, and the leg lit, the series cut between the leg's two ends.
1640
- *
1641
- * The stretch is cut out of the series rather than read off the leg's geometry, so a collapsed
1642
- * group, one row standing for several legs, lights the run it stands for.
1643
- *
1644
- * @param points The itinerary's series.
1645
- * @param row The row pointed at, or `null` for none.
1646
- */
1647
- declare const segmentRowCursor: (points: readonly ElevationPoint[], row: ProfileRange | null) => TableCursor;
1648
- /**
1649
- * waypointRowCursor answers what a waypoint table writes to its map for the row a reader points
1650
- * at: its cursor marker at the sample of the series nearest the place's pass, the earlier of two
1651
- * as near, and no leg lit.
1652
- *
1653
- * @param points The itinerary's series.
1654
- * @param row The row pointed at, its `to` the meter the itinerary passes the place at, or `null`.
1655
- */
1656
- declare const waypointRowCursor: (points: readonly ElevationPoint[], row: Pick<ProfileRange, "to"> | null) => TableCursor;
1657
- /**
1658
- * litSegmentId answers the segment whose row a segment table lights for its map: the one the app
1659
- * names, which it goes on naming, and otherwise the one the map's cursor is over.
1660
- *
1661
- * @param highlighted The segment the app names, `null` where it names none to light, or
1662
- * `undefined` where it leaves the row to the map's cursor.
1663
- * @param hovered The segment the map's cursor is over, or `null`.
1664
- */
1665
- declare const litSegmentId: (highlighted: string | null | undefined, hovered: string | null) => string | null;
1666
- /**
1667
- * isSegmentRowLit reports whether a segment table lights a row: the reader points at it, or it
1668
- * stands for the lit segment ({@link litSegmentId}), a collapsed group's row standing for each of
1669
- * its members.
1670
- *
1671
- * @param row The row.
1672
- * @param pointedKey The key of the row the reader points at, or `null`.
1673
- * @param litId The lit segment, or `null`.
1674
- */
1675
- declare const isSegmentRowLit: (row: Pick<ItinerarySegmentRow, "id" | "key" | "memberIds">, pointedKey: string | null, litId: string | null) => boolean;
1676
-
1677
- /**
1678
- * WaypointCardStringsLike is the copy this module reads, stated structurally.
1679
- *
1680
- * A local interface rather than an import from `../../i18n`: this entry point is the one a port
1681
- * reimplements and a renderer-free consumer installs, and a maths module that imported the copy
1682
- * bundle would put every language's strings into the graph of a formatting rule. The shipped
1683
- * bundle satisfies this shape; a consumer passing their own only has to match it.
1684
- */
1685
- interface WaypointCardStringsLike {
1686
- /** One name per service, keyed by the wire's own vocabulary. */
1687
- readonly amenities: Readonly<Record<string, string>>;
1688
- readonly waypointCard: {
1689
- readonly address: string;
1690
- readonly amenities: string;
1691
- readonly booking: string;
1692
- readonly contact: string;
1693
- readonly cutoff: string;
1694
- readonly email: string;
1695
- readonly empty: string;
1696
- readonly emptyHint: string;
1697
- readonly media: string;
1698
- readonly openingHours: string;
1699
- readonly phone: string;
1700
- readonly properties: string;
1701
- readonly stop: string;
1702
- /** The clauses the one-line summary is assembled from. */
1703
- readonly summary: {
1704
- readonly cutoffAt: (moment: string) => string;
1705
- readonly openingHours: (hours: string) => string;
1706
- readonly stop: (elapsed: string) => string;
1707
- };
1708
- readonly timing: string;
1709
- readonly website: string;
1710
- };
1711
- }
1712
- /**
1713
- * amenityName names a service for a reader, and answers the value the itinerary carries where
1714
- * the names hold none for it.
1715
- *
1716
- * The lookup can miss by design. A waypoint's `amenities` is a list of plain strings: the
1717
- * vocabulary is named and not closed, so an itinerary served by a deployment newer than the
1718
- * names carries a value with no translation, and `hot-meal` is a better label than nothing.
1719
- *
1720
- * It is the one lookup behind every surface that names a service: a badge stack, a table's cell
1721
- * and its filter chips, and a card.
1722
- *
1723
- * @param names One name per service, keyed by the wire's own vocabulary: the `amenities`
1724
- * section of a strings bundle.
1725
- * @param amenity The value the itinerary carries.
1726
- * @returns The name `names` holds under `amenity` as an entry of its own, so a value spelled as
1727
- * an inherited property (`constructor`, `toString`) is answered as itself, and `amenity` where
1728
- * it holds none.
1729
- *
1730
- * @example
1731
- * ```ts
1732
- * import { amenityName } from "@mountaya/elements/profile";
1733
- *
1734
- * amenityName({ water: "Water" }, "water"); // "Water"
1735
- * amenityName({ water: "Water" }, "hot-meal"); // "hot-meal"
1736
- * ```
1737
- */
1738
- declare const amenityName: (names: Readonly<Record<string, string>>, amenity: string) => string;
1739
- /**
1740
- * waypointSummary is what a place says about itself in one line, when its author wrote no
1741
- * description.
1742
- *
1743
- * **It exists because the description is optional and the header is not.** A card about a place
1744
- * states its name and then a line under it; with no description, the fallback for that line is
1745
- * the word "details", which tells a reader nothing they did not already know from having clicked
1746
- * the pin.
1747
- *
1748
- * **Two clauses at most: whether it is EQUIPPED, and WHEN it can be used.** Naming the services
1749
- * one by one ("Water, Hot meal and Medical post and 6 more") spends the whole line on a list
1750
- * the card repeats as badges directly underneath, in the same order, with the glyphs. The word
1751
- * alone answers what a reader scanning a dozen places is actually asking, and leaves room for
1752
- * the fact they cannot get anywhere else at a glance.
1753
- *
1754
- * `formatCutoffAt` is the caller's, on `ItineraryProfileCutoffs`' precedent: a wall-clock instant
1755
- * needs a time zone, and an element cannot know the reader's. Without it the summary states no
1756
- * cut-off and the clause falls through to the stop.
1757
- */
1758
- declare const waypointSummary: (details: WaypointDetails | undefined, copy: WaypointCardStringsLike, units: Pick<UnitFormatOptions, "language">, formatCutoffAt?: (instant: Date) => string) => string | null;
1759
- /**
1760
- * waypointHeadline is the line a card states under a place's name: what its author WROTE about
1761
- * it, or failing that what the place's own record says.
1762
- *
1763
- * The precedence runs one way only. A description is the author's own sentence and always wins,
1764
- * even a terse one, because an author who wrote "closed in winter" chose that over anything a
1765
- * summary could have assembled. The summary stands in when they wrote nothing, which is the
1766
- * common case for a place captured from a POI rather than typed out by hand.
1767
- */
1768
- declare const waypointHeadline: (details: WaypointDetails | undefined, copy: WaypointCardStringsLike, units: Pick<UnitFormatOptions, "language">, formatCutoffAt?: (instant: Date) => string) => string | null;
1769
- /** One labelled fact a card states: the reader's noun, and the value beside it. */
1770
- interface WaypointCardRow {
1771
- readonly label: string;
1772
- readonly value: string;
1773
- }
1774
- /**
1775
- * waypointTimingRows is when a place can be used, as labelled lines.
1776
- *
1777
- * Every duration arrives in seconds and leaves in the reader's own units through
1778
- * `formatDuration`, which is the same seam the tables print a leg's duration with, so a stop of
1779
- * 1200 reads the same here as everywhere else in the product rather than as a second convention.
1780
- *
1781
- * A stop of no time, or of under thirty seconds, rounds to no minute and takes no row, as it
1782
- * takes no clause in {@link waypointSummary}: a label beside an empty value states nothing.
1783
- */
1784
- declare const waypointTimingRows: (details: WaypointDetails | undefined, copy: WaypointCardStringsLike, units: Pick<UnitFormatOptions, "language">, formatCutoffAt?: (instant: Date) => string) => readonly WaypointCardRow[];
1785
- /** WaypointContactRow is a contact line, plus the href a reader can act on it through. */
1786
- interface WaypointContactRow extends WaypointCardRow {
1787
- /** Set where the value is actionable: a phone, an email, a URL. */
1788
- readonly href?: string | undefined;
1789
- /** True for an href that leaves the page, which a renderer opens in a new context. */
1790
- readonly external?: boolean | undefined;
1791
- }
1792
- /**
1793
- * waypointContactRows is how to reach a place, as labelled lines that can be acted on.
1794
- *
1795
- * A phone and an email carry their scheme, because a card read on a phone is a card somebody
1796
- * taps; the two URLs are marked external, because a reader following one is mid-route in a map
1797
- * and must not lose it. The renderer decides what to do with that: this layer states what the
1798
- * value IS rather than what a link policy should be.
1799
- *
1800
- * A website or a booking address carries its `href` only where it is an absolute `http` or
1801
- * `https` address. Any other value, `javascript:` and `data:` among them, is stated as text with
1802
- * no `href` and no `external`, so no renderer anchors it.
1803
- */
1804
- declare const waypointContactRows: (details: WaypointDetails | undefined, copy: WaypointCardStringsLike) => readonly WaypointContactRow[];
1805
- /**
1806
- * waypointPropertyValue renders one customer-defined field according to the format its author
1807
- * declared.
1808
- *
1809
- * The format is why `WaypointPropertyDetail` carries one at all: `3600` is a duration, a distance
1810
- * or a number depending on what the author meant, and a renderer guessing from the digits would
1811
- * be right two times in three. Anything unrecognised prints the text it already is.
1812
- *
1813
- * The same rule `ItineraryWaypointTable` prints a property with, stated once so a field reads
1814
- * identically in a table row and on a card.
1815
- *
1816
- * A `number` is stated through {@link formatNumber}, as a `distance` and a `duration` are through
1817
- * their own formatters: grouped as the language groups, with no sign on a value that rounds to
1818
- * zero, and in a language `Intl` refuses read as the card's other rows read it.
1819
- *
1820
- * @param property The field, with the format its author declared.
1821
- * @param units The reader's language and units.
1822
- * @param formatInstant Spells a `date` field's instant, handed the instant its RFC 3339 value
1823
- * names. Omitted, or for a value that names none, the string is shown as written.
1824
- * @returns The text to print: the value as written where the format cannot interpret it.
1825
- */
1826
- declare const waypointPropertyValue: (property: WaypointPropertyDetail, units: Pick<UnitFormatOptions, "language" | "length">, formatInstant?: (instant: Date) => string) => string;
1827
- /**
1828
- * waypointPropertyIsLink reports a customer field a renderer may draw as an anchor.
1829
- *
1830
- * **The declared format is not enough on its own, and that is a security rule rather than a
1831
- * tidiness one.** A renderer told a value is a link draws `<a href={value}>`, so a field declared
1832
- * `url` carrying `javascript:…` is a clickable script on every surface that draws a waypoint card,
1833
- * including the published embed an anonymous visitor sees. The API refuses that value on write;
1834
- * this refuses it on read, because a record written before the rule existed, or by a client that
1835
- * reached the column another way, still arrives here.
1836
- *
1837
- * So the format says what the author MEANT and the value says what it IS, and a link needs both.
1838
- * A `url` field whose value is not a web address renders as the text it is, which is the same
1839
- * thing every other format does with a value it cannot interpret.
1840
- */
1841
- declare const waypointPropertyIsLink: (property: WaypointPropertyDetail) => boolean;
1842
- /**
1843
- * waypointMediaLinkIsLink reports a media link a renderer may draw as an anchor.
1844
- *
1845
- * A place's media links are the one list its author fills freely, and each `url` reaches a card
1846
- * as written. The rule is the one {@link waypointPropertyIsLink} and a contact's website follow:
1847
- * a link is a link only where its address, read past the white space around it, is one
1848
- * {@link isWebAddress} accepts. Any other entry is stated as its `label` in text, so a
1849
- * `javascript:` or a `data:` address is never an `href`.
1850
- *
1851
- * @param link One entry of `WaypointDetails.media.links`.
1852
- * @returns `true` where a renderer may draw `<a href={link.url}>`, `false` where it prints
1853
- * `link.label` alone.
1854
- *
1855
- * @example
1856
- * ```ts
1857
- * import { waypointMediaLinkIsLink } from "@mountaya/elements/profile";
1858
- *
1859
- * waypointMediaLinkIsLink({ label: "Topo", url: "https://refuge.example/topo" }); // true
1860
- * waypointMediaLinkIsLink({ label: "Notes", url: "ask at the bar" }); // false
1861
- * ```
1862
- */
1863
- declare const waypointMediaLinkIsLink: (link: WaypointLinkDetail) => boolean;
1864
- /**
1865
- * WaypointMediaLink is one media link of a place, with the address a renderer may anchor.
1866
- *
1867
- * `label` and `url` are the author's own, as written. `url` is text to read and never an
1868
- * address to anchor: the one a renderer links is `href`.
1869
- */
1870
- interface WaypointMediaLink extends WaypointLinkDetail {
1871
- /**
1872
- * The address a renderer anchors: `url`, read past the white space around it.
1873
- *
1874
- * Set only where {@link waypointMediaLinkIsLink} calls the entry a link, which is an absolute
1875
- * `http` or `https` address. Any other entry, a `javascript:` or a `data:` address among them,
1876
- * states no `href`, and a renderer prints its `label` in text.
1877
- */
1878
- readonly href?: string | undefined;
1879
- }
1880
- /**
1881
- * waypointMediaLinks is every media link a place records, each with the address a renderer may
1882
- * anchor it by.
1883
- *
1884
- * The rule a card draws its links by, stated once so every binding anchors the same entries: an
1885
- * entry {@link waypointMediaLinkIsLink} calls a link states its `href`, the address read past
1886
- * the white space around it, and any other entry is handed back as it is, with none.
1887
- *
1888
- * @param details The place's details, or `undefined` for a place that records none.
1889
- * @returns The links in the author's order, never fewer than the place records: an entry that
1890
- * is no link is still a line a card prints.
1891
- *
1892
- * @example
1893
- * ```ts
1894
- * import { waypointMediaLinks } from "@mountaya/elements/profile";
1895
- *
1896
- * waypointMediaLinks({
1897
- * media: {
1898
- * links: [
1899
- * { label: "Topo", url: " https://refuge.example/topo " },
1900
- * { label: "Notes", url: "ask at the bar" },
1901
- * ],
1902
- * },
1903
- * });
1904
- * // [
1905
- * // {
1906
- * // href: "https://refuge.example/topo",
1907
- * // label: "Topo",
1908
- * // url: " https://refuge.example/topo ",
1909
- * // },
1910
- * // { label: "Notes", url: "ask at the bar" },
1911
- * // ]
1912
- * ```
1913
- */
1914
- declare const waypointMediaLinks: (details: WaypointDetails | undefined) => readonly WaypointMediaLink[];
1915
- /**
1916
- * waypointMediaPhotos is the photos of a place a renderer may load.
1917
- *
1918
- * A photo's `url` reaches an image source, so it is held to the rule a link's address is: only
1919
- * a photo whose address, read past the white space around it, is one {@link isWebAddress}
1920
- * accepts is stated, with that address as its `url`. A photo with any other address has nothing
1921
- * to show and is left out, and the place still counts as recording something
1922
- * ({@link waypointDeclaresNothing}).
1923
- *
1924
- * @param details The place's details, or `undefined` for a place that records none.
1925
- * @returns The photos in the author's order, each with a `url` an image source takes. A photo
1926
- * whose address needs no reading is the entry itself.
1927
- *
1928
- * @example
1929
- * ```ts
1930
- * import { waypointMediaPhotos } from "@mountaya/elements/profile";
1931
- *
1932
- * waypointMediaPhotos({
1933
- * media: {
1934
- * photos: [{ url: " https://refuge.example/hut.jpg" }, { url: "javascript:alert(1)" }],
1935
- * },
1936
- * });
1937
- * // [{ url: "https://refuge.example/hut.jpg" }]
1938
- * ```
1939
- */
1940
- declare const waypointMediaPhotos: (details: WaypointDetails | undefined) => readonly WaypointPhotoDetail[];
1941
- /**
1942
- * waypointDeclaresNothing reports a place that has no facts to state.
1943
- *
1944
- * The description is deliberately NOT part of it. A card states the place's facts under a header
1945
- * that already carries the description, so a place whose only record is its sentence has nothing
1946
- * left for the body, and saying "nothing recorded yet" under a description is the honest answer
1947
- * rather than a contradiction.
1948
- */
1949
- declare const waypointDeclaresNothing: (details: WaypointDetails | undefined) => boolean;
1950
- /** One service a place offers, keyed for its glyph and named for a reader. */
1951
- interface WaypointCardService {
1952
- /** The wire's own value, which `amenityGlyph` turns into the glyph a set draws. */
1953
- readonly amenity: string;
1954
- /** The reader's name for it, or the value itself where the names hold none. */
1955
- readonly name: string;
1956
- }
1957
- /** One custom field of a place, written by the format its author declared. */
1958
- interface WaypointCardField extends WaypointCardRow {
1959
- /**
1960
- * The address a renderer anchors: the field's value, read past the white space around it.
1961
- *
1962
- * Set only where {@link waypointPropertyIsLink} calls the field a link. Any other field states
1963
- * no `href`, and a renderer prints its `value` as the text it is.
1964
- */
1965
- readonly href?: string | undefined;
1966
- readonly key: string;
1967
- }
1968
- /** Everything a card about one place states, before any of it is drawn. */
1969
- interface WaypointCardFacts {
1970
- /** The services, in the order the place states them, each named. */
1971
- readonly amenities: readonly WaypointCardService[];
1972
- /** How to reach the place, as {@link waypointContactRows} states it. */
1973
- readonly contact: readonly WaypointContactRow[];
1974
- /** Whether the place states no fact at all, as {@link waypointDeclaresNothing} reads it. */
1975
- readonly empty: boolean;
1976
- /** The author's description, or the summary {@link waypointHeadline} assembles. */
1977
- readonly headline: string | null;
1978
- /** The media links, as {@link waypointMediaLinks} states them. */
1979
- readonly links: readonly WaypointMediaLink[];
1980
- /** The photos a renderer may load, as {@link waypointMediaPhotos} states them. */
1981
- readonly photos: readonly WaypointPhotoDetail[];
1982
- /** The custom fields, in their order, each written by its declared format. */
1983
- readonly properties: readonly WaypointCardField[];
1984
- /** When the place can be used, as {@link waypointTimingRows} states it. */
1985
- readonly timing: readonly WaypointCardRow[];
1986
- }
1987
- /**
1988
- * waypointCard states everything a card about one place says, in the order a card says it.
1989
- *
1990
- * Its services by name, a service the names hold none for named by its own value. Its timing: the
1991
- * cut-off only through the caller's formatter, since an instant needs a time zone only the caller
1992
- * holds, then the planned stop. Its contact lines as opening hours, address, phone, email, website
1993
- * and booking page, a phone and an email carrying their scheme. Its custom fields by their
1994
- * declared format, a `url` field anchored only where its value is a web address. A section with no
1995
- * line states nothing, and a place with no fact says so.
1996
- *
1997
- * It is the derivation behind every binding's card, stated once so each states the same facts in
1998
- * the same order with the same fallbacks.
1999
- *
2000
- * @param details What the place records, or `undefined` for a place that records nothing.
2001
- * @param copy The words the card is written in.
2002
- * @param units The reader's language and units, which a duration, a distance and a number are
2003
- * written in.
2004
- * @param formatCutoffAt Writes a cut-off's instant, and a `date` field's. Omitted, no cut-off is
2005
- * stated and a `date` field reads as written.
2006
- * @returns The card's facts.
2007
- */
2008
- declare const waypointCard: (details: WaypointDetails | undefined, copy: WaypointCardStringsLike, units: Pick<UnitFormatOptions, "language" | "length">, formatCutoffAt?: (instant: Date) => string) => WaypointCardFacts;
2009
-
2010
- /**
2011
- * isWebAddress reports an absolute `http` or `https` address the API accepts: the scheme in lower
2012
- * case, two slashes, then a host, and no character the API's parser refuses.
2013
- *
2014
- * It is the one predicate for the rule. Every address a place records is drawn as something a
2015
- * reader acts on (an anchor, an image source), so `javascript:` and `data:` are refused here, in
2016
- * the API, and in the contract's own pattern, because a value reaches a renderer through any of
2017
- * the three. A form shows its field error by it and a card anchors an address by it, so a value
2018
- * with no error is a value the save takes and the card links.
2019
- *
2020
- * It answers by {@link webAddressShape}, then by where the host stands, then by the characters the
2021
- * API's parser refuses (a control character, a percent sign that opens no escape outside the
2022
- * query), then by a name ending in another script's decimal digits, which a runtime's parser reads
2023
- * as its Unicode version does, then by the platform's URL parser, which is called in a `try`
2024
- * because it throws on an address it cannot read.
2025
- *
2026
- * The value is read as written: white space at either end is no part of an address, and a caller
2027
- * that reads a stored value trims it first.
2028
- *
2029
- * @param value The address, as written.
2030
- * @returns `true` where a renderer may link `value` and the API takes it on a write.
2031
- *
2032
- * @example
2033
- * ```ts
2034
- * import { isWebAddress } from "@mountaya/elements/profile";
2035
- *
2036
- * isWebAddress("https://refuge.example/topo"); // true
2037
- * isWebAddress("javascript:alert(1)"); // false
2038
- * isWebAddress("https:refuge.example"); // false, no host after two slashes
2039
- * ```
2040
- */
2041
- declare const isWebAddress: (value: string) => boolean;
2042
-
2043
- /**
2044
- * Placing stretches of the itinerary under a chart: the band strip and the section chips.
2045
- *
2046
- * Both lay a list of stretches along the chart's distance axis, and both are read aloud as a list,
2047
- * so one rule decides which of them a chart draws and where, and the two cannot disagree about a
2048
- * stretch at the edge of a zoomed window. It renders nothing: the positions it answers are the
2049
- * chart's 0..100 unit space, which is also a CSS percentage.
2050
- */
2051
-
2052
- /** A stretch placed under a chart, with where it stands in the chart's unit space. */
2053
- interface PlacedSpan<T> {
2054
- /** The stretch as the caller gave it. */
2055
- readonly span: T;
2056
- /** Its place in the list the caller gave, from zero. */
2057
- readonly index: number;
2058
- /** Where the stretch starts, in meters from the start of the itinerary: the lower of its ends. */
2059
- readonly from: number;
2060
- /** Where the stretch ends: the higher of its ends. */
2061
- readonly to: number;
2062
- /** Unit-space x of its start, held to the frame, which is also a CSS percentage. */
2063
- readonly start: number;
2064
- /** Unit-space x of its end, held to the frame. Always past {@link PlacedSpan.start}. */
2065
- readonly end: number;
2066
- }
2067
- /**
2068
- * placeSpans answers the stretches a chart draws under itself, each where it stands.
2069
- *
2070
- * A stretch is drawn only where it overlaps the window, and cut at the window's ends, so a band
2071
- * stays under the stretch of curve it describes at any zoom. A stretch the window does not reach
2072
- * is left out rather than clamped onto the window's edge, and so is one of no length, given or
2073
- * cut: a sliver of no width is still announced to a screen reader, as a stretch that is not there.
2074
- *
2075
- * The stretches keep the order they are given in, since that is the order a renderer paints and a
2076
- * reader hears them, and a stretch given backwards is read in order.
2077
- *
2078
- * @param spans The stretches, each its two ends in meters from the start of the itinerary.
2079
- * @param totalDistance The itinerary's length, in meters.
2080
- * @param range The window the chart is drawn over. Omitted, the whole itinerary.
2081
- * @returns The stretches drawn, in the order given.
2082
- */
2083
- declare const placeSpans: <T extends ProfileRange>(spans: readonly T[], totalDistance: number, range?: ProfileRange) => PlacedSpan<T>[];
2084
-
2085
- export { ASCENT_RAMP_STOPS, CURSOR_MARKER_GLYPH, CumulativeElevation, DEFAULT_AMENITY_STACK_MAX, DEFAULT_READOUT_STATS, DEFAULT_SECTION_CHIP_STATS, DEFAULT_SEGMENT_TABLE_COLUMNS, DEFAULT_STAT_STRIP_STATS, DEFAULT_WAYPOINT_TABLE_COLUMNS, DESCENT_RAMP_STOPS, EMBED_FIT_BASE_MARGIN, EMBED_PROFILE_ANALYSIS_HEIGHT, EMBED_PROFILE_ANCHOR_INSET, EMBED_PROFILE_CHARACTERISTICS_HEIGHT, EMBED_PROFILE_PANEL_CHROME, EMBED_PROFILE_SECTION_GAP, ElevationPoint, ElevationSeries, FitBoundsPadding, HIT_SLICES, ItinerarySegmentRow, ItinerarySegmentRowMetrics, ItineraryWaypointRow, PROFILE_BASELINE, PROFILE_BOTTOM_INSET, PROFILE_CHART_HEIGHT, PROFILE_LABEL_COLUMN, PROFILE_PANEL_MIN_GAP, PROFILE_PLOT_RIGHT_INSET, PROFILE_TOP_INSET, PROFILE_VIEWBOX, PlacedWaypoint, ProfileInput, ProfileRange, ResolvedCharacteristics, SLICE_WIDTH, SLOPE_COLOR_STOPS, STEEPNESS_OVERLAY_SLUG, STEEPNESS_THRESHOLDS, UnitFormatOptions, Waypoint, WaypointDetails, WaypointLinkDetail, WaypointPhotoDetail, WaypointPropertyDetail, amenityFilter, amenityName, amenityStacks, anchoredDomain, badgeFallback, buildSlices, carriesElevation, classAt, classifySteepness, clearIntlCache, cullCrowdedLabels, cursorMarkerIds, curveSpans, curveStops, dateTimeFormat, displayNames, distanceForSlice, distanceTicks, distanceToFraction, domainTicks, embedFitPadding, estimateProfileHeight, formattedInstant, hideCursorMarker, isSegmentRowLit, isWebAddress, litSegmentId, numberFormat, placeOnCurve, placeSpans, profileAreaPath, profileDomain, profilePolyline, profileReadout, profileSpans, profileX, profileY, relativeTimeFormat, resolveProfileVisibility, rowAt, rowStandsFor, sectionChipCells, sectionGrade, segmentRowCell, segmentRowCursor, showCursorMarker, slopeColors, slopeRampColor, statStripCells, surfaceColors, toggleAmenity, wayTypeColors, waypointCard, waypointContactRows, waypointDeclaresNothing, waypointHeadline, waypointMediaLinkIsLink, waypointMediaLinks, waypointMediaPhotos, waypointPropertyIsLink, waypointPropertyValue, waypointRowCell, waypointRowCursor, waypointSummary, waypointTimingRows, writeLegEmphasis };
2086
- export type { AmenityFilter, AmenityStack, AxisLabelBox, BadgeSurface, CursorMarkerMap, CursorMarkerPin, CursorMarkerPoint, CurveColor, CurveStop, DistanceTick, ElevationDomain, EmbedProfileSections, HitSlice, LegEmphasisMap, PlaceOnCurveInput, PlaceOnCurveValue, PlacedCutoff, PlacedDivider, PlacedSpan, PlacedWaypointMark, ProfileAnchor, ProfileClass, ProfileReadout, ProfileReadoutOptions, ProfileSpan, ProfileVisibility, ProfileVisibilityInput, ReadoutCell, ReadoutStat, SectionChipCell, SectionChipStat, SegmentRowCell, SegmentTableColumn, SlopeColorStop, SlopeRampStop, StatStripCell, StatStripCursor, StatStripStat, SteepnessClass, TableCursor, WaypointCardFacts, WaypointCardField, WaypointCardRow, WaypointCardService, WaypointCardStringsLike, WaypointContactRow, WaypointMediaLink, WaypointRowCell, WaypointRowCellOptions, WaypointTableColumn };
1
+ import { a as buildElevationPoints, b as bandValueAt, c as profileCharacteristics, i as WaypointProjection, l as projectWaypoints, n as ProfileCharacteristics, o as buildInfoBands, r as WAYPOINT_PROXIMITY_METERS, s as committedPaceOf, t as IndexedInfo, u as trailDifficultyRank, v as InfoBand, x as nearestRoutePointIndexAt, y as RouteProfilePoint } from "../chunk-QKWhxfPv.js";
2
+ import { $ as sectionChipCells, $t as curveSpans, A as SegmentRowCell, An as DEFAULT_AMENITY_STACK_MAX, At as ProfileVisibility, B as classifySteepness, Bn as climbAt, Bt as placeOnCurve, C as TableCursor, Cn as showCursorMarker, Ct as EMBED_PROFILE_ANALYSIS_HEIGHT, D as waypointRowCursor, Dn as carriesElevation, Dt as EMBED_PROFILE_SECTION_GAP, E as segmentRowCursor, En as ProfileSpan, Et as EMBED_PROFILE_PANEL_CHROME, F as segmentRowCell, Fn as BadgeSurface, Ft as PlaceOnCurveInput, G as statStripCells, Gt as PROFILE_TOP_INSET, H as StatStripCell, Hn as detectClimbs, Ht as CurveStop, I as waypointRowCell, In as badgeFallback, It as PlaceOnCurveValue, J as SlopeRampStop, Jt as ProfileClass, K as ASCENT_RAMP_STOPS, Kt as PROFILE_VIEWBOX, L as STEEPNESS_OVERLAY_SLUG, Ln as CLIMB_CATEGORIES, Lt as PlacedCutoff, M as WaypointRowCell, Mn as AmenityFilter, Mt as embedFitPadding, N as WaypointRowCellOptions, Nn as amenityFilter, Nt as estimateProfileHeight, O as DEFAULT_SEGMENT_TABLE_COLUMNS, On as profileSpans, Ot as EmbedProfileSections, P as WaypointTableColumn, Pn as toggleAmenity, Pt as resolveProfileVisibility, Q as SectionChipStat, Qt as classAt, R as STEEPNESS_THRESHOLDS, Rn as ClimbCategory, Rt as PlacedDivider, S as waypointTimingRows, Sn as hideCursorMarker, St as EMBED_FIT_BASE_MARGIN, T as litSegmentId, Tn as cullCrowdedLabels, Tt as EMBED_PROFILE_CHARACTERISTICS_HEIGHT, U as StatStripCursor, Ut as PROFILE_BASELINE, V as DEFAULT_STAT_STRIP_STATS, Vn as climbCategoryFor, Vt as CurveColor, W as StatStripStat, Wt as PROFILE_BOTTOM_INSET, X as DEFAULT_SECTION_CHIP_STATS, Xt as SlopeColorStop, Y as slopeRampColor, Yt as SLOPE_COLOR_STOPS, Z as SectionChipCell, Zt as anchoredDomain, _ as waypointMediaLinks, _n as CURSOR_MARKER_GLYPH, _t as dateTimeFormat, a as WaypointCardField, an as profileX, at as SLICE_WIDTH, b as waypointPropertyValue, bn as CursorMarkerPoint, bt as relativeTimeFormat, c as WaypointCardStringsLike, cn as DistanceTick, ct as PROFILE_CHART_HEIGHT, d as amenityName, dn as DEFAULT_READOUT_STATS, dt as distanceToFraction, en as curveStops, et as sectionGrade, f as waypointCard, fn as ProfileReadout, ft as surfaceColors, g as waypointMediaLinkIsLink, gn as profileReadout, gt as clearIntlCache, h as waypointHeadline, hn as ReadoutStat, ht as writeLegEmphasis, i as WaypointCardFacts, in as profilePolyline, it as HitSlice, j as SegmentTableColumn, jn as amenityStacks, jt as ProfileVisibilityInput, k as DEFAULT_WAYPOINT_TABLE_COLUMNS, kn as AmenityStack, kt as PROFILE_PANEL_MIN_GAP, l as WaypointContactRow, ln as ElevationDomain, lt as PROFILE_LABEL_COLUMN, m as waypointDeclaresNothing, mn as ReadoutCell, mt as LegEmphasisMap, n as placeSpans, nn as profileAreaPath, nt as rowStandsFor, o as WaypointCardRow, on as profileY, ot as buildSlices, p as waypointContactRows, pn as ProfileReadoutOptions, pt as wayTypeColors, q as DESCENT_RAMP_STOPS, qt as ProfileAnchor, r as isWebAddress, rn as profileDomain, rt as HIT_SLICES, s as WaypointCardService, sn as slopeColors, st as distanceForSlice, t as PlacedSpan, tn as domainTicks, tt as rowAt, u as WaypointMediaLink, un as distanceTicks, ut as PROFILE_PLOT_RIGHT_INSET, v as waypointMediaPhotos, vn as CursorMarkerMap, vt as displayNames, w as isSegmentRowLit, wn as AxisLabelBox, wt as EMBED_PROFILE_ANCHOR_INSET, x as waypointSummary, xn as cursorMarkerIds, xt as formattedInstant, y as waypointPropertyIsLink, yn as CursorMarkerPin, yt as numberFormat, z as SteepnessClass, zn as ClimbSpan, zt as PlacedWaypointMark } from "../chunk-D21fEI6A.js";
3
+ import { r as haversineMeters } from "../chunk-Bk0L8g5J.js";
4
+ import { $ as projectMarkers, A as ElevationSeries, B as ProjectedMarker, C as itinerarySegmentRows, D as CumulativeElevation, E as resolveWaypoints, F as MIN_RANGE_SPAN_METERS, G as downsampleElevation, H as buildElevationSeries, I as MarkerToProject, J as lineBetween, K as elevationAt, L as ProfileInput, M as MARKER_BELONGING_METERS, N as MARKER_PROXIMITY_METERS, O as ELEVATION_NOISE_THRESHOLD_METERS, P as MAX_PROFILE_POINTS, Q as profileTotals, R as ProfileRange, S as dividesRoute, T as resolveCharacteristics, U as clampRange, V as activePointAt, W as cumulativeElevation, X as profileLength, Y as nearestPointIndexAt, Z as profileLines, _ as WaypointPhotoDetail, a as ItinerarySegmentRowOverride, b as WaypointTimingDetail, c as PlacedWaypoint, d as WaypointAt, et as rangeTotals, f as WaypointContactDetail, g as WaypointOn, h as WaypointMediaDetail, i as ItinerarySegmentRowMetrics, j as GRADE_WINDOW_METERS, k as ElevationPoint, l as ResolvedCharacteristics, m as WaypointLinkDetail, n as ItinerarySegmentInput, o as ItineraryWaypointRow, p as WaypointDetails, q as gradeAt, r as ItinerarySegmentRow, s as ItineraryWaypointRowMetrics, t as ItineraryCharacteristics, u as Waypoint, v as WaypointPropertyDetail, w as itineraryWaypointRows, x as chainGeometry, y as WaypointPropertyFormatDetail, z as ProfileTotals } from "../chunk-DJpUw8TN.js";
5
+ import { A as resolveSpeedKmh, C as kilometersPerHourToDisplay, D as parseDistanceToMeters, E as parseAscentToMeters, M as splitDuration, O as parsePaceClock, S as formatTemperature, T as paceMinutesToClockNumber, _ as formatProportion, a as displayToKilometersPerHour, b as formatSnowfall, c as elevationUnitFor, d as formatDuration, f as formatElevation, g as formatPaceClock, h as formatNumber, i as defaultUnits, j as speedUnitFor, k as parseSpeedToKmh, l as formatAltitudeRange, m as formatNavDistance, n as MeasurementFormatOptions, o as distanceUnitFor, p as formatHumidity, r as UnitFormatOptions, s as durationForSpeed, t as DurationForSpeedInput, u as formatDistance, v as formatSlope, w as paceClockNumberToMinutes, x as formatSpeed, y as formatSnowDepth } from "../chunk-5pTPpv4v.js";
6
+ import { n as FitBoundsPadding } from "../chunk-fozLXfHY.js";
7
+ import "../chunk-CXjRArgy.js";
8
+ export { ASCENT_RAMP_STOPS, type AmenityFilter, type AmenityStack, type AxisLabelBox, type BadgeSurface, CLIMB_CATEGORIES, CURSOR_MARKER_GLYPH, type ClimbCategory, type ClimbSpan, type CumulativeElevation, type CursorMarkerMap, type CursorMarkerPin, type CursorMarkerPoint, type CurveColor, type CurveStop, DEFAULT_AMENITY_STACK_MAX, DEFAULT_READOUT_STATS, DEFAULT_SECTION_CHIP_STATS, DEFAULT_SEGMENT_TABLE_COLUMNS, DEFAULT_STAT_STRIP_STATS, DEFAULT_WAYPOINT_TABLE_COLUMNS, DESCENT_RAMP_STOPS, type DistanceTick, type DurationForSpeedInput, ELEVATION_NOISE_THRESHOLD_METERS, EMBED_FIT_BASE_MARGIN, EMBED_PROFILE_ANALYSIS_HEIGHT, EMBED_PROFILE_ANCHOR_INSET, EMBED_PROFILE_CHARACTERISTICS_HEIGHT, EMBED_PROFILE_PANEL_CHROME, EMBED_PROFILE_SECTION_GAP, type ElevationDomain, type ElevationPoint, type ElevationSeries, type EmbedProfileSections, type FitBoundsPadding, GRADE_WINDOW_METERS, HIT_SLICES, type HitSlice, type IndexedInfo, type InfoBand, type ItineraryCharacteristics, type ItinerarySegmentInput, type ItinerarySegmentRow, type ItinerarySegmentRowMetrics, type ItinerarySegmentRowOverride, type ItineraryWaypointRow, type ItineraryWaypointRowMetrics, type LegEmphasisMap, MARKER_BELONGING_METERS, MARKER_PROXIMITY_METERS, MAX_PROFILE_POINTS, MIN_RANGE_SPAN_METERS, type MarkerToProject, type MeasurementFormatOptions, PROFILE_BASELINE, PROFILE_BOTTOM_INSET, PROFILE_CHART_HEIGHT, PROFILE_LABEL_COLUMN, PROFILE_PANEL_MIN_GAP, PROFILE_PLOT_RIGHT_INSET, PROFILE_TOP_INSET, PROFILE_VIEWBOX, type PlaceOnCurveInput, type PlaceOnCurveValue, type PlacedCutoff, type PlacedDivider, type PlacedSpan, type PlacedWaypoint, type PlacedWaypointMark, type ProfileAnchor, type ProfileCharacteristics, type ProfileClass, type ProfileInput, type ProfileRange, type ProfileReadout, type ProfileReadoutOptions, type ProfileSpan, type ProfileTotals, type ProfileVisibility, type ProfileVisibilityInput, type ProjectedMarker, type ReadoutCell, type ReadoutStat, type ResolvedCharacteristics, type RouteProfilePoint, SLICE_WIDTH, SLOPE_COLOR_STOPS, STEEPNESS_OVERLAY_SLUG, STEEPNESS_THRESHOLDS, type SectionChipCell, type SectionChipStat, type SegmentRowCell, type SegmentTableColumn, type SlopeColorStop, type SlopeRampStop, type StatStripCell, type StatStripCursor, type StatStripStat, type SteepnessClass, type TableCursor, type UnitFormatOptions, WAYPOINT_PROXIMITY_METERS, type Waypoint, type WaypointAt, type WaypointCardFacts, type WaypointCardField, type WaypointCardRow, type WaypointCardService, type WaypointCardStringsLike, type WaypointContactDetail, type WaypointContactRow, type WaypointDetails, type WaypointLinkDetail, type WaypointMediaDetail, type WaypointMediaLink, type WaypointOn, type WaypointPhotoDetail, type WaypointProjection, type WaypointPropertyDetail, type WaypointPropertyFormatDetail, type WaypointRowCell, type WaypointRowCellOptions, type WaypointTableColumn, type WaypointTimingDetail, activePointAt, amenityFilter, amenityName, amenityStacks, anchoredDomain, badgeFallback, bandValueAt, buildElevationPoints, buildElevationSeries, buildInfoBands, buildSlices, carriesElevation, chainGeometry, clampRange, classAt, classifySteepness, clearIntlCache, climbAt, climbCategoryFor, committedPaceOf, cullCrowdedLabels, cumulativeElevation, cursorMarkerIds, curveSpans, curveStops, dateTimeFormat, defaultUnits, detectClimbs, displayNames, displayToKilometersPerHour, distanceForSlice, distanceTicks, distanceToFraction, distanceUnitFor, dividesRoute, domainTicks, downsampleElevation, durationForSpeed, elevationAt, elevationUnitFor, embedFitPadding, estimateProfileHeight, formatAltitudeRange, formatDistance, formatDuration, formatElevation, formatHumidity, formatNavDistance, formatNumber, formatPaceClock, formatProportion, formatSlope, formatSnowDepth, formatSnowfall, formatSpeed, formatTemperature, formattedInstant, gradeAt, haversineMeters, hideCursorMarker, isSegmentRowLit, isWebAddress, itinerarySegmentRows, itineraryWaypointRows, kilometersPerHourToDisplay, lineBetween, litSegmentId, nearestPointIndexAt, nearestRoutePointIndexAt, numberFormat, paceClockNumberToMinutes, paceMinutesToClockNumber, parseAscentToMeters, parseDistanceToMeters, parsePaceClock, parseSpeedToKmh, placeOnCurve, placeSpans, profileAreaPath, profileCharacteristics, profileDomain, profileLength, profileLines, profilePolyline, profileReadout, profileSpans, profileTotals, profileX, profileY, projectMarkers, projectWaypoints, rangeTotals, relativeTimeFormat, resolveCharacteristics, resolveProfileVisibility, resolveSpeedKmh, resolveWaypoints, rowAt, rowStandsFor, sectionChipCells, sectionGrade, segmentRowCell, segmentRowCursor, showCursorMarker, slopeColors, slopeRampColor, speedUnitFor, splitDuration, statStripCells, surfaceColors, toggleAmenity, trailDifficultyRank, wayTypeColors, waypointCard, waypointContactRows, waypointDeclaresNothing, waypointHeadline, waypointMediaLinkIsLink, waypointMediaLinks, waypointMediaPhotos, waypointPropertyIsLink, waypointPropertyValue, waypointRowCell, waypointRowCursor, waypointSummary, waypointTimingRows, writeLegEmphasis };