@mountaya/elements 0.0.0-stage → 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 (828) hide show
  1. package/CHANGELOG.md +273 -0
  2. package/LICENCE.fr.txt +280 -0
  3. package/LICENSE.txt +262 -0
  4. package/README.md +1510 -2
  5. package/THIRD-PARTY-NOTICES.txt +103 -0
  6. package/dist/agent/index.cjs +1211 -0
  7. package/dist/agent/index.cjs.map +1 -0
  8. package/dist/agent/index.d.cts +1966 -0
  9. package/dist/agent/index.d.ts +1966 -0
  10. package/dist/agent/index.js +1181 -0
  11. package/dist/agent/index.js.map +1 -0
  12. package/dist/camera/index.cjs +2512 -0
  13. package/dist/camera/index.cjs.map +1 -0
  14. package/dist/camera/index.d.cts +1723 -0
  15. package/dist/camera/index.d.ts +1723 -0
  16. package/dist/camera/index.js +2443 -0
  17. package/dist/camera/index.js.map +1 -0
  18. package/dist/chunk-5pTPpv4v.d.cts +897 -0
  19. package/dist/chunk-5pTPpv4v.d.ts +897 -0
  20. package/dist/chunk-6JzFMFHh.d.ts +119 -0
  21. package/dist/chunk-6qyuJVvt.d.ts +513 -0
  22. package/dist/chunk-9fp0lDic.cjs +583 -0
  23. package/dist/chunk-9fp0lDic.cjs.map +1 -0
  24. package/dist/chunk-A48H1rDg.d.cts +73 -0
  25. package/dist/chunk-A48H1rDg.d.ts +73 -0
  26. package/dist/chunk-B-m1AchR.cjs +57 -0
  27. package/dist/chunk-B-m1AchR.cjs.map +1 -0
  28. package/dist/chunk-B-qFTf04.d.ts +216 -0
  29. package/dist/chunk-B0YROiZh.d.cts +1475 -0
  30. package/dist/chunk-B14wgOvH.d.cts +68 -0
  31. package/dist/chunk-B19l3j9r.cjs +150 -0
  32. package/dist/chunk-B19l3j9r.cjs.map +1 -0
  33. package/dist/chunk-B2PtjVKg.cjs +86 -0
  34. package/dist/chunk-B2PtjVKg.cjs.map +1 -0
  35. package/dist/chunk-B56Oyb7W.cjs +70 -0
  36. package/dist/chunk-B56Oyb7W.cjs.map +1 -0
  37. package/dist/chunk-B5WGMQwK.cjs +113 -0
  38. package/dist/chunk-B5WGMQwK.cjs.map +1 -0
  39. package/dist/chunk-B98mKrdu.d.cts +302 -0
  40. package/dist/chunk-BB0PmqIM.d.cts +44 -0
  41. package/dist/chunk-BBikve0Z.cjs +269 -0
  42. package/dist/chunk-BBikve0Z.cjs.map +1 -0
  43. package/dist/chunk-BHeXmM0X.js +37 -0
  44. package/dist/chunk-BHeXmM0X.js.map +1 -0
  45. package/dist/chunk-BI8WZLpU.cjs +281 -0
  46. package/dist/chunk-BI8WZLpU.cjs.map +1 -0
  47. package/dist/chunk-BIEc_SkR.cjs +29 -0
  48. package/dist/chunk-BIEc_SkR.cjs.map +1 -0
  49. package/dist/chunk-BJ6L6_W9.cjs +553 -0
  50. package/dist/chunk-BJ6L6_W9.cjs.map +1 -0
  51. package/dist/chunk-BJ91UCbB.js +11 -0
  52. package/dist/chunk-BJ91UCbB.js.map +1 -0
  53. package/dist/chunk-BJEZWTKj.cjs +166 -0
  54. package/dist/chunk-BJEZWTKj.cjs.map +1 -0
  55. package/dist/chunk-BJz54mfg.cjs +10 -0
  56. package/dist/chunk-BJz54mfg.cjs.map +1 -0
  57. package/dist/chunk-BNX5LAfN.d.cts +912 -0
  58. package/dist/chunk-BP6KgA86.js +35 -0
  59. package/dist/chunk-BP6KgA86.js.map +1 -0
  60. package/dist/chunk-BRnjQq6K.d.cts +157 -0
  61. package/dist/chunk-BSiMEwPS.js +46 -0
  62. package/dist/chunk-BSiMEwPS.js.map +1 -0
  63. package/dist/chunk-BTPjDw_y.cjs +16 -0
  64. package/dist/chunk-BTPjDw_y.cjs.map +1 -0
  65. package/dist/chunk-BTUUABGI.js +17 -0
  66. package/dist/chunk-BTUUABGI.js.map +1 -0
  67. package/dist/chunk-BUeL9y7s.cjs +45 -0
  68. package/dist/chunk-BUeL9y7s.cjs.map +1 -0
  69. package/dist/chunk-BWMuCNc9.cjs +172 -0
  70. package/dist/chunk-BWMuCNc9.cjs.map +1 -0
  71. package/dist/chunk-BWjRfhpF.js +126 -0
  72. package/dist/chunk-BWjRfhpF.js.map +1 -0
  73. package/dist/chunk-BZ5KyZXI.d.ts +302 -0
  74. package/dist/chunk-B_4SVmvh.js +94 -0
  75. package/dist/chunk-B_4SVmvh.js.map +1 -0
  76. package/dist/chunk-BcTUuZQ3.js +95 -0
  77. package/dist/chunk-BcTUuZQ3.js.map +1 -0
  78. package/dist/chunk-BdkqSsJe.cjs +140 -0
  79. package/dist/chunk-BdkqSsJe.cjs.map +1 -0
  80. package/dist/chunk-BfktMVmI.js +70 -0
  81. package/dist/chunk-BfktMVmI.js.map +1 -0
  82. package/dist/chunk-BfzQb0EK.cjs +6 -0
  83. package/dist/chunk-BhWfT-22.d.cts +808 -0
  84. package/dist/chunk-BjJcqX5J.cjs +60 -0
  85. package/dist/chunk-BjJcqX5J.cjs.map +1 -0
  86. package/dist/chunk-Bk0L8g5J.d.cts +77 -0
  87. package/dist/chunk-Bk0L8g5J.d.ts +77 -0
  88. package/dist/chunk-Bl4_uVa6.cjs +11 -0
  89. package/dist/chunk-Bl4_uVa6.cjs.map +1 -0
  90. package/dist/chunk-BlKF4lrp.js +43 -0
  91. package/dist/chunk-BlKF4lrp.js.map +1 -0
  92. package/dist/chunk-Bm1FieGR.js +4 -0
  93. package/dist/chunk-Bm1FieGR.js.map +1 -0
  94. package/dist/chunk-Bn6ZbxkS.cjs +27 -0
  95. package/dist/chunk-BpN3hr6a.cjs +541 -0
  96. package/dist/chunk-BpN3hr6a.cjs.map +1 -0
  97. package/dist/chunk-Bq_WHTfd.d.cts +119 -0
  98. package/dist/chunk-Bqt4LBBz.cjs +648 -0
  99. package/dist/chunk-Bqt4LBBz.cjs.map +1 -0
  100. package/dist/chunk-Bqt97zwf.d.cts +54 -0
  101. package/dist/chunk-Bqt97zwf.d.ts +54 -0
  102. package/dist/chunk-BsBiN4w6.d.cts +245 -0
  103. package/dist/chunk-BvTpOUoC.cjs +207 -0
  104. package/dist/chunk-BvTpOUoC.cjs.map +1 -0
  105. package/dist/chunk-BwK6Hl3q.cjs +446 -0
  106. package/dist/chunk-BwK6Hl3q.cjs.map +1 -0
  107. package/dist/chunk-BxDQZDXR.d.cts +76 -0
  108. package/dist/chunk-BxDQZDXR.d.ts +76 -0
  109. package/dist/chunk-BxUio8kX.js +20 -0
  110. package/dist/chunk-BxUio8kX.js.map +1 -0
  111. package/dist/chunk-BxaocpFi.d.cts +1 -0
  112. package/dist/chunk-Bywi0K1N.js +36 -0
  113. package/dist/chunk-Bywi0K1N.js.map +1 -0
  114. package/dist/chunk-C-IlmkDl.js +59 -0
  115. package/dist/chunk-C-IlmkDl.js.map +1 -0
  116. package/dist/chunk-C5PtVewq.d.ts +389 -0
  117. package/dist/chunk-C5dpC7mQ.js +19 -0
  118. package/dist/chunk-C5dpC7mQ.js.map +1 -0
  119. package/dist/chunk-C5q1sgSa.js +46 -0
  120. package/dist/chunk-C5q1sgSa.js.map +1 -0
  121. package/dist/chunk-C6fU9G5I.cjs +221 -0
  122. package/dist/chunk-C6fU9G5I.cjs.map +1 -0
  123. package/dist/chunk-C71dpWUK.js +5 -0
  124. package/dist/chunk-C71dpWUK.js.map +1 -0
  125. package/dist/chunk-C82N1gQX.d.ts +1831 -0
  126. package/dist/chunk-C8HdaHpu.js +118 -0
  127. package/dist/chunk-C8HdaHpu.js.map +1 -0
  128. package/dist/chunk-C8ZGryck.js +236 -0
  129. package/dist/chunk-C8ZGryck.js.map +1 -0
  130. package/dist/chunk-C95NG0oD.cjs +43 -0
  131. package/dist/chunk-C95NG0oD.cjs.map +1 -0
  132. package/dist/chunk-C9aR8DXb.js +9 -0
  133. package/dist/chunk-C9aR8DXb.js.map +1 -0
  134. package/dist/chunk-CAUZnoCs.d.ts +525 -0
  135. package/dist/chunk-CBXWWuM9.cjs +82 -0
  136. package/dist/chunk-CBXWWuM9.cjs.map +1 -0
  137. package/dist/chunk-CC_Kquu7.d.cts +125 -0
  138. package/dist/chunk-CC_Kquu7.d.ts +125 -0
  139. package/dist/chunk-CCp85vXg.cjs +60 -0
  140. package/dist/chunk-CCp85vXg.cjs.map +1 -0
  141. package/dist/chunk-CEcB1_uK.js +39 -0
  142. package/dist/chunk-CEcB1_uK.js.map +1 -0
  143. package/dist/chunk-CFIo021l.d.cts +216 -0
  144. package/dist/chunk-CH_IZoJE.js +33 -0
  145. package/dist/chunk-CH_IZoJE.js.map +1 -0
  146. package/dist/chunk-CHrasH_g.cjs +25 -0
  147. package/dist/chunk-CHrasH_g.cjs.map +1 -0
  148. package/dist/chunk-CJVoSaAE.cjs +3 -0
  149. package/dist/chunk-CJp8nGcb.js +96 -0
  150. package/dist/chunk-CJp8nGcb.js.map +1 -0
  151. package/dist/chunk-CJwUtkOt.js +112 -0
  152. package/dist/chunk-CJwUtkOt.js.map +1 -0
  153. package/dist/chunk-CKhCOVIf.d.cts +751 -0
  154. package/dist/chunk-CKiVSRYg.js +50 -0
  155. package/dist/chunk-CKiVSRYg.js.map +1 -0
  156. package/dist/chunk-CKtd19eD.cjs +59 -0
  157. package/dist/chunk-CKtd19eD.cjs.map +1 -0
  158. package/dist/chunk-CL92KE3j.d.ts +3188 -0
  159. package/dist/chunk-CLqUlkAe.js +54 -0
  160. package/dist/chunk-CLqUlkAe.js.map +1 -0
  161. package/dist/chunk-CMG5OV0q.cjs +4741 -0
  162. package/dist/chunk-CMG5OV0q.cjs.map +1 -0
  163. package/dist/chunk-CN_TKSgm.js +10 -0
  164. package/dist/chunk-CN_TKSgm.js.map +1 -0
  165. package/dist/chunk-CNe6MtqV.cjs +29 -0
  166. package/dist/chunk-CNe6MtqV.cjs.map +1 -0
  167. package/dist/chunk-COQkDTC5.js +83 -0
  168. package/dist/chunk-COQkDTC5.js.map +1 -0
  169. package/dist/chunk-CPBl6K4M.cjs +168 -0
  170. package/dist/chunk-CPBl6K4M.cjs.map +1 -0
  171. package/dist/chunk-CPx0ZYFB.d.ts +3 -0
  172. package/dist/chunk-CQQhcP_C.d.ts +197 -0
  173. package/dist/chunk-CTNoajFh.d.cts +389 -0
  174. package/dist/chunk-CTd-qgJc.cjs +384 -0
  175. package/dist/chunk-CTd-qgJc.cjs.map +1 -0
  176. package/dist/chunk-CW80YYtU.cjs +1056 -0
  177. package/dist/chunk-CW80YYtU.cjs.map +1 -0
  178. package/dist/chunk-CWpqBgkF.d.cts +24 -0
  179. package/dist/chunk-CWpqBgkF.d.ts +24 -0
  180. package/dist/chunk-CXjRArgy.d.ts +3 -0
  181. package/dist/chunk-CXonfH3-.cjs +14 -0
  182. package/dist/chunk-CXonfH3-.cjs.map +1 -0
  183. package/dist/chunk-CYcouGXN.d.ts +825 -0
  184. package/dist/chunk-CZDAzEBw.cjs +1621 -0
  185. package/dist/chunk-CZDAzEBw.cjs.map +1 -0
  186. package/dist/chunk-C_fQFr70.d.cts +159 -0
  187. package/dist/chunk-C_fQFr70.d.ts +159 -0
  188. package/dist/chunk-CbOtHnnB.cjs +359 -0
  189. package/dist/chunk-CbOtHnnB.cjs.map +1 -0
  190. package/dist/chunk-CdA6ZMGk.d.cts +825 -0
  191. package/dist/chunk-Ce1_thm7.js +146 -0
  192. package/dist/chunk-Ce1_thm7.js.map +1 -0
  193. package/dist/chunk-CeD8Hw0j.d.cts +3188 -0
  194. package/dist/chunk-CeiTuMyt.d.cts +525 -0
  195. package/dist/chunk-Ch1OLzLi.js +1 -0
  196. package/dist/chunk-Cizu_j1N.cjs +87 -0
  197. package/dist/chunk-Cizu_j1N.cjs.map +1 -0
  198. package/dist/chunk-CjDe9z6A.d.cts +427 -0
  199. package/dist/chunk-Cl1etdlu.js +63 -0
  200. package/dist/chunk-Cl1etdlu.js.map +1 -0
  201. package/dist/chunk-CmoVJDoz.js +4 -0
  202. package/dist/chunk-CmoVJDoz.js.map +1 -0
  203. package/dist/chunk-CnLucxjG.cjs +197 -0
  204. package/dist/chunk-CnLucxjG.cjs.map +1 -0
  205. package/dist/chunk-CsWjBmdi.cjs +56 -0
  206. package/dist/chunk-CsWjBmdi.cjs.map +1 -0
  207. package/dist/chunk-CuseO5MZ.d.cts +3 -0
  208. package/dist/chunk-CvMHibbA.d.ts +427 -0
  209. package/dist/chunk-CwDeiN5U.js +870 -0
  210. package/dist/chunk-CwDeiN5U.js.map +1 -0
  211. package/dist/chunk-Cwdmx4tG.js +1 -0
  212. package/dist/chunk-D-4MxHTt.d.cts +105 -0
  213. package/dist/chunk-D-4MxHTt.d.ts +105 -0
  214. package/dist/chunk-D0LF-99V.js +1093 -0
  215. package/dist/chunk-D0LF-99V.js.map +1 -0
  216. package/dist/chunk-D1fe-0c_.js +367 -0
  217. package/dist/chunk-D1fe-0c_.js.map +1 -0
  218. package/dist/chunk-D21fEI6A.d.ts +1926 -0
  219. package/dist/chunk-D39gAxya.cjs +89 -0
  220. package/dist/chunk-D39gAxya.cjs.map +1 -0
  221. package/dist/chunk-D6KdIW5e.cjs +228 -0
  222. package/dist/chunk-D6KdIW5e.cjs.map +1 -0
  223. package/dist/chunk-D6qHYbgW.d.cts +36 -0
  224. package/dist/chunk-D89E-w70.d.ts +44 -0
  225. package/dist/chunk-D8bdTysL.js +552 -0
  226. package/dist/chunk-D8bdTysL.js.map +1 -0
  227. package/dist/chunk-D96QJT24.cjs +109 -0
  228. package/dist/chunk-D96QJT24.cjs.map +1 -0
  229. package/dist/chunk-DAmkQl-i.js +119 -0
  230. package/dist/chunk-DAmkQl-i.js.map +1 -0
  231. package/dist/chunk-DEfsb2lc.cjs +10 -0
  232. package/dist/chunk-DEfsb2lc.cjs.map +1 -0
  233. package/dist/chunk-DIFjT5-V.d.cts +66 -0
  234. package/dist/chunk-DJpUw8TN.d.ts +912 -0
  235. package/dist/chunk-DK6lm2IZ.cjs +11 -0
  236. package/dist/chunk-DK6lm2IZ.cjs.map +1 -0
  237. package/dist/chunk-DKqgr31j.cjs +61 -0
  238. package/dist/chunk-DKqgr31j.cjs.map +1 -0
  239. package/dist/chunk-DLZ0QYm9.js +37 -0
  240. package/dist/chunk-DLZ0QYm9.js.map +1 -0
  241. package/dist/chunk-DLjS0uaC.js +4 -0
  242. package/dist/chunk-DLjS0uaC.js.map +1 -0
  243. package/dist/chunk-DMokwmOV.cjs +49 -0
  244. package/dist/chunk-DMokwmOV.cjs.map +1 -0
  245. package/dist/chunk-DMvWgBZL.d.cts +1831 -0
  246. package/dist/chunk-DNfGfIF3.js +31 -0
  247. package/dist/chunk-DNfGfIF3.js.map +1 -0
  248. package/dist/chunk-DQbSRe8D.d.ts +245 -0
  249. package/dist/chunk-DSGkP8_y.js +45 -0
  250. package/dist/chunk-DSGkP8_y.js.map +1 -0
  251. package/dist/chunk-DTctvfSd.d.cts +197 -0
  252. package/dist/chunk-DWe7igyw.cjs +206 -0
  253. package/dist/chunk-DWe7igyw.cjs.map +1 -0
  254. package/dist/chunk-DWsMP5JR.d.ts +68 -0
  255. package/dist/chunk-DWsm3HIW.d.cts +120 -0
  256. package/dist/chunk-DWsm3HIW.d.ts +120 -0
  257. package/dist/chunk-DXABHjLa.cjs +3 -0
  258. package/dist/chunk-D_BeqSbc.cjs +42 -0
  259. package/dist/chunk-D_BeqSbc.cjs.map +1 -0
  260. package/dist/chunk-D_svQNdW.d.ts +66 -0
  261. package/dist/chunk-Dav4xWrp.js +330 -0
  262. package/dist/chunk-Dav4xWrp.js.map +1 -0
  263. package/dist/chunk-DbCPhepL.js +293 -0
  264. package/dist/chunk-DbCPhepL.js.map +1 -0
  265. package/dist/chunk-DcrTy-y2.cjs +43 -0
  266. package/dist/chunk-DcrTy-y2.cjs.map +1 -0
  267. package/dist/chunk-Ddv484ld.js +487 -0
  268. package/dist/chunk-Ddv484ld.js.map +1 -0
  269. package/dist/chunk-De0bjnhY.cjs +88 -0
  270. package/dist/chunk-De0bjnhY.cjs.map +1 -0
  271. package/dist/chunk-De2FmNPu.cjs +32 -0
  272. package/dist/chunk-De2FmNPu.cjs.map +1 -0
  273. package/dist/chunk-DeSjQXiI.d.ts +157 -0
  274. package/dist/chunk-Den0Ta6C.js +132 -0
  275. package/dist/chunk-Den0Ta6C.js.map +1 -0
  276. package/dist/chunk-DiDKEeEa.js +8 -0
  277. package/dist/chunk-DiDKEeEa.js.map +1 -0
  278. package/dist/chunk-Dj60k5PU.js +197 -0
  279. package/dist/chunk-Dj60k5PU.js.map +1 -0
  280. package/dist/chunk-DjnYQBCN.js +4705 -0
  281. package/dist/chunk-DjnYQBCN.js.map +1 -0
  282. package/dist/chunk-Dk9VKvyq.d.ts +1 -0
  283. package/dist/chunk-Dor1ERI9.cjs +85 -0
  284. package/dist/chunk-Dor1ERI9.cjs.map +1 -0
  285. package/dist/chunk-DpMouOoH.js +451 -0
  286. package/dist/chunk-DpMouOoH.js.map +1 -0
  287. package/dist/chunk-DposgdNL.cjs +52 -0
  288. package/dist/chunk-DposgdNL.cjs.map +1 -0
  289. package/dist/chunk-DqLTG_5Q.d.cts +3 -0
  290. package/dist/chunk-Dr5MCIpS.d.cts +63 -0
  291. package/dist/chunk-Dr5MCIpS.d.ts +63 -0
  292. package/dist/chunk-DrudttCC.cjs +4 -0
  293. package/dist/chunk-DsDYVJQC.js +173 -0
  294. package/dist/chunk-DsDYVJQC.js.map +1 -0
  295. package/dist/chunk-Dw8ur6FJ.js +27 -0
  296. package/dist/chunk-Dw8ur6FJ.js.map +1 -0
  297. package/dist/chunk-DwG6M_0v.js +64 -0
  298. package/dist/chunk-DwG6M_0v.js.map +1 -0
  299. package/dist/chunk-Dy9a5ibO.js +284 -0
  300. package/dist/chunk-Dy9a5ibO.js.map +1 -0
  301. package/dist/chunk-DyayZlQJ.js +157 -0
  302. package/dist/chunk-DyayZlQJ.js.map +1 -0
  303. package/dist/chunk-DyhJZC2i.js +126 -0
  304. package/dist/chunk-DyhJZC2i.js.map +1 -0
  305. package/dist/chunk-F9zBzmmG.cjs +45 -0
  306. package/dist/chunk-F9zBzmmG.cjs.map +1 -0
  307. package/dist/chunk-FyCYofv2.js +116 -0
  308. package/dist/chunk-FyCYofv2.js.map +1 -0
  309. package/dist/chunk-GHJRjAk2.js +1 -0
  310. package/dist/chunk-H14isiSf.d.ts +751 -0
  311. package/dist/chunk-HIJzXoN4.js +7 -0
  312. package/dist/chunk-HIJzXoN4.js.map +1 -0
  313. package/dist/chunk-Id_8kRtu.d.ts +36 -0
  314. package/dist/chunk-KN60yxBQ.js +5 -0
  315. package/dist/chunk-KN60yxBQ.js.map +1 -0
  316. package/dist/chunk-NM5yg6bh.cjs +82 -0
  317. package/dist/chunk-NM5yg6bh.cjs.map +1 -0
  318. package/dist/chunk-OXr3zJfM.cjs +119 -0
  319. package/dist/chunk-OXr3zJfM.cjs.map +1 -0
  320. package/dist/chunk-QGqgNC4z.d.ts +928 -0
  321. package/dist/chunk-QJBtJrZ0.js +36 -0
  322. package/dist/chunk-QJBtJrZ0.js.map +1 -0
  323. package/dist/chunk-QKWhxfPv.d.cts +361 -0
  324. package/dist/chunk-QKWhxfPv.d.ts +361 -0
  325. package/dist/chunk-QXW7b4Ev.d.cts +410 -0
  326. package/dist/chunk-RHZrxUrM.cjs +39 -0
  327. package/dist/chunk-RHZrxUrM.cjs.map +1 -0
  328. package/dist/chunk-RTxe2i66.js +91 -0
  329. package/dist/chunk-RTxe2i66.js.map +1 -0
  330. package/dist/chunk-RrKkJb6P.js +16 -0
  331. package/dist/chunk-RrKkJb6P.js.map +1 -0
  332. package/dist/chunk-VOJqpcnM.cjs +181 -0
  333. package/dist/chunk-VOJqpcnM.cjs.map +1 -0
  334. package/dist/chunk-VljGTrid.js +1 -0
  335. package/dist/chunk-X3UVwUEK.d.cts +513 -0
  336. package/dist/chunk-X9K2WChn.cjs +28 -0
  337. package/dist/chunk-X9K2WChn.cjs.map +1 -0
  338. package/dist/chunk-YrtOx6oy.js +251 -0
  339. package/dist/chunk-YrtOx6oy.js.map +1 -0
  340. package/dist/chunk-bY7ySujI.d.cts +928 -0
  341. package/dist/chunk-bYf1sBz5.d.cts +11 -0
  342. package/dist/chunk-bYf1sBz5.d.ts +11 -0
  343. package/dist/chunk-blfknWoM.d.cts +1926 -0
  344. package/dist/chunk-blqsohAb.js +113 -0
  345. package/dist/chunk-blqsohAb.js.map +1 -0
  346. package/dist/chunk-cDMCjodI.cjs +58 -0
  347. package/dist/chunk-cDMCjodI.cjs.map +1 -0
  348. package/dist/chunk-cWjE3qd6.cjs +10 -0
  349. package/dist/chunk-cWjE3qd6.cjs.map +1 -0
  350. package/dist/chunk-dfOgV3fu.js +26 -0
  351. package/dist/chunk-dfOgV3fu.js.map +1 -0
  352. package/dist/chunk-f9cTwUX1.cjs +125 -0
  353. package/dist/chunk-f9cTwUX1.cjs.map +1 -0
  354. package/dist/chunk-fHVYEZs4.cjs +28 -0
  355. package/dist/chunk-fHVYEZs4.cjs.map +1 -0
  356. package/dist/chunk-fWRUMgRI.js +22 -0
  357. package/dist/chunk-fWRUMgRI.js.map +1 -0
  358. package/dist/chunk-fozLXfHY.d.cts +55 -0
  359. package/dist/chunk-fozLXfHY.d.ts +55 -0
  360. package/dist/chunk-gWmB1l3A.cjs +3122 -0
  361. package/dist/chunk-gWmB1l3A.cjs.map +1 -0
  362. package/dist/chunk-gbj2R-_w.js +58 -0
  363. package/dist/chunk-gbj2R-_w.js.map +1 -0
  364. package/dist/chunk-iIWxsAXd.js +59 -0
  365. package/dist/chunk-iIWxsAXd.js.map +1 -0
  366. package/dist/chunk-lItIuOIS.cjs +137 -0
  367. package/dist/chunk-lItIuOIS.cjs.map +1 -0
  368. package/dist/chunk-m6Rh4PCe.cjs +798 -0
  369. package/dist/chunk-m6Rh4PCe.cjs.map +1 -0
  370. package/dist/chunk-o3IRANDf.cjs +99 -0
  371. package/dist/chunk-o3IRANDf.cjs.map +1 -0
  372. package/dist/chunk-obUcg3Sk.d.ts +808 -0
  373. package/dist/chunk-ohsf-6Rn.js +600 -0
  374. package/dist/chunk-ohsf-6Rn.js.map +1 -0
  375. package/dist/chunk-pBleU6Nv.js +3061 -0
  376. package/dist/chunk-pBleU6Nv.js.map +1 -0
  377. package/dist/chunk-px4e99cy.js +71 -0
  378. package/dist/chunk-px4e99cy.js.map +1 -0
  379. package/dist/chunk-qwYDLeXc.cjs +99 -0
  380. package/dist/chunk-qwYDLeXc.cjs.map +1 -0
  381. package/dist/chunk-rF_859Qk.cjs +101 -0
  382. package/dist/chunk-rF_859Qk.cjs.map +1 -0
  383. package/dist/chunk-rLJkqJ5j.d.ts +1475 -0
  384. package/dist/chunk-twQItIRg.cjs +338 -0
  385. package/dist/chunk-twQItIRg.cjs.map +1 -0
  386. package/dist/chunk-vnPrMVjY.js +10 -0
  387. package/dist/chunk-vnPrMVjY.js.map +1 -0
  388. package/dist/chunk-ws3bVwaS.d.ts +410 -0
  389. package/dist/chunk-xh3UkuVs.cjs +246 -0
  390. package/dist/chunk-xh3UkuVs.cjs.map +1 -0
  391. package/dist/chunk-yMzRr26E.js +153 -0
  392. package/dist/chunk-yMzRr26E.js.map +1 -0
  393. package/dist/collab/index.cjs +831 -0
  394. package/dist/collab/index.cjs.map +1 -0
  395. package/dist/collab/index.d.cts +824 -0
  396. package/dist/collab/index.d.ts +824 -0
  397. package/dist/collab/index.js +819 -0
  398. package/dist/collab/index.js.map +1 -0
  399. package/dist/data/index.cjs +39 -0
  400. package/dist/data/index.d.cts +6 -0
  401. package/dist/data/index.d.ts +6 -0
  402. package/dist/data/index.js +7 -0
  403. package/dist/editor/index.cjs +2713 -0
  404. package/dist/editor/index.cjs.map +1 -0
  405. package/dist/editor/index.d.cts +10 -0
  406. package/dist/editor/index.d.ts +10 -0
  407. package/dist/editor/index.js +2702 -0
  408. package/dist/editor/index.js.map +1 -0
  409. package/dist/errors/index.cjs +11 -0
  410. package/dist/errors/index.d.cts +2 -0
  411. package/dist/errors/index.d.ts +2 -0
  412. package/dist/errors/index.js +1 -0
  413. package/dist/geo/index.cjs +68 -0
  414. package/dist/geo/index.d.cts +6 -0
  415. package/dist/geo/index.d.ts +6 -0
  416. package/dist/geo/index.js +11 -0
  417. package/dist/i18n/fr/index.cjs +333 -0
  418. package/dist/i18n/fr/index.cjs.map +1 -0
  419. package/dist/i18n/fr/index.d.cts +18 -0
  420. package/dist/i18n/fr/index.d.ts +18 -0
  421. package/dist/i18n/fr/index.js +328 -0
  422. package/dist/i18n/fr/index.js.map +1 -0
  423. package/dist/i18n/index.cjs +451 -0
  424. package/dist/i18n/index.cjs.map +1 -0
  425. package/dist/i18n/index.d.cts +268 -0
  426. package/dist/i18n/index.d.ts +268 -0
  427. package/dist/i18n/index.js +430 -0
  428. package/dist/i18n/index.js.map +1 -0
  429. package/dist/icons/index.cjs +37 -0
  430. package/dist/icons/index.d.cts +4 -0
  431. package/dist/icons/index.d.ts +4 -0
  432. package/dist/icons/index.js +8 -0
  433. package/dist/index.cjs +517 -0
  434. package/dist/index.cjs.map +1 -0
  435. package/dist/index.d.cts +174 -0
  436. package/dist/index.d.ts +174 -0
  437. package/dist/index.js +54 -0
  438. package/dist/index.js.map +1 -0
  439. package/dist/layers/index.cjs +83 -0
  440. package/dist/layers/index.d.cts +3 -0
  441. package/dist/layers/index.d.ts +3 -0
  442. package/dist/layers/index.js +5 -0
  443. package/dist/map-client/index.cjs +5 -0
  444. package/dist/map-client/index.d.cts +6 -0
  445. package/dist/map-client/index.d.ts +6 -0
  446. package/dist/map-client/index.js +0 -0
  447. package/dist/maplibre-worker.mjs +12 -0
  448. package/dist/navigation/index.cjs +612 -0
  449. package/dist/navigation/index.cjs.map +1 -0
  450. package/dist/navigation/index.d.cts +551 -0
  451. package/dist/navigation/index.d.ts +551 -0
  452. package/dist/navigation/index.js +599 -0
  453. package/dist/navigation/index.js.map +1 -0
  454. package/dist/profile/index.cjs +177 -0
  455. package/dist/profile/index.d.cts +8 -0
  456. package/dist/profile/index.d.ts +8 -0
  457. package/dist/profile/index.js +10 -0
  458. package/dist/seams/index.cjs +15 -0
  459. package/dist/seams/index.d.cts +4 -0
  460. package/dist/seams/index.d.ts +4 -0
  461. package/dist/seams/index.js +4 -0
  462. package/dist/search/index.cjs +39 -0
  463. package/dist/search/index.d.cts +6 -0
  464. package/dist/search/index.d.ts +6 -0
  465. package/dist/search/index.js +3 -0
  466. package/dist/style/index.cjs +34 -0
  467. package/dist/style/index.d.cts +5 -0
  468. package/dist/style/index.d.ts +5 -0
  469. package/dist/style/index.js +5 -0
  470. package/dist/styles.css +11 -0
  471. package/dist/testing/index.cjs +444 -0
  472. package/dist/testing/index.cjs.map +1 -0
  473. package/dist/testing/index.d.cts +217 -0
  474. package/dist/testing/index.d.ts +217 -0
  475. package/dist/testing/index.js +435 -0
  476. package/dist/testing/index.js.map +1 -0
  477. package/dist/timezone/index.cjs +1953 -0
  478. package/dist/timezone/index.cjs.map +1 -0
  479. package/dist/timezone/index.d.cts +28 -0
  480. package/dist/timezone/index.d.ts +28 -0
  481. package/dist/timezone/index.js +1948 -0
  482. package/dist/timezone/index.js.map +1 -0
  483. package/dist/units/index.cjs +29 -0
  484. package/dist/units/index.d.cts +3 -0
  485. package/dist/units/index.d.ts +3 -0
  486. package/dist/units/index.js +3 -0
  487. package/dist/video/index.cjs +1713 -0
  488. package/dist/video/index.cjs.map +1 -0
  489. package/dist/video/index.d.cts +846 -0
  490. package/dist/video/index.d.ts +846 -0
  491. package/dist/video/index.js +1689 -0
  492. package/dist/video/index.js.map +1 -0
  493. package/dist/view/index.cjs +7 -0
  494. package/dist/view/index.d.cts +3 -0
  495. package/dist/view/index.d.ts +3 -0
  496. package/dist/view/index.js +1 -0
  497. package/package.json +433 -4
  498. package/src/agent/engines/session.ts +2255 -0
  499. package/src/agent/index.ts +109 -0
  500. package/src/agent/rules/agentError.ts +128 -0
  501. package/src/agent/rules/boundedInputJson.ts +53 -0
  502. package/src/agent/rules/conversation.ts +629 -0
  503. package/src/agent/rules/conversationFaults.ts +349 -0
  504. package/src/agent/rules/conversationHost.ts +390 -0
  505. package/src/agent/rules/dispatcher.ts +102 -0
  506. package/src/agent/rules/errorCodes.ts +78 -0
  507. package/src/agent/rules/errorStatus.ts +65 -0
  508. package/src/agent/rules/scriptedTransport.ts +390 -0
  509. package/src/agent/rules/stickToBottom.ts +38 -0
  510. package/src/agent/rules/toolResultPayload.ts +197 -0
  511. package/src/auth/rules/clientHeader.ts +22 -0
  512. package/src/auth/rules/sentCredential.ts +76 -0
  513. package/src/auth/rules/transformRequest.ts +803 -0
  514. package/src/camera/engines/videoFlight.ts +1758 -0
  515. package/src/camera/index.ts +157 -0
  516. package/src/camera/rules/clearance.ts +1099 -0
  517. package/src/camera/rules/fit.ts +132 -0
  518. package/src/camera/rules/modes.ts +1019 -0
  519. package/src/camera/rules/plan.ts +478 -0
  520. package/src/camera/rules/planner.ts +129 -0
  521. package/src/camera/rules/poseRanges.ts +38 -0
  522. package/src/camera/rules/presets.ts +185 -0
  523. package/src/camera/rules/profileSamples.ts +243 -0
  524. package/src/camera/rules/route.ts +596 -0
  525. package/src/camera/rules/routeContent.ts +105 -0
  526. package/src/camera/rules/spline.ts +765 -0
  527. package/src/camera/rules/sweptViewports.ts +39 -0
  528. package/src/camera/rules/track.ts +1412 -0
  529. package/src/camera/rules/vocabulary.ts +130 -0
  530. package/src/camera/rules/zoom.ts +216 -0
  531. package/src/collab/engines/session.ts +1902 -0
  532. package/src/collab/engines/trailingThrottle.ts +151 -0
  533. package/src/collab/index.ts +52 -0
  534. package/src/collab/rules/dispatch.ts +143 -0
  535. package/src/collab/rules/peerNames.ts +51 -0
  536. package/src/collab/rules/scriptedTransport.ts +244 -0
  537. package/src/compose/engines/baseMapSwitch.ts +1136 -0
  538. package/src/compose/engines/events.ts +962 -0
  539. package/src/compose/engines/mountayaMap.ts +5648 -0
  540. package/src/compose/engines/sentCredentials.ts +146 -0
  541. package/src/compose/engines/slotRequests.ts +413 -0
  542. package/src/compose/rules/accessRefusal.ts +109 -0
  543. package/src/compose/rules/accessStanding.ts +75 -0
  544. package/src/compose/rules/analysisKinds.ts +331 -0
  545. package/src/compose/rules/analysisLayers.ts +176 -0
  546. package/src/compose/rules/cameraMoves.ts +38 -0
  547. package/src/compose/rules/carriedLayers.ts +87 -0
  548. package/src/compose/rules/developmentWarnings.ts +167 -0
  549. package/src/compose/rules/fitBox.ts +67 -0
  550. package/src/compose/rules/fitCamera.ts +54 -0
  551. package/src/compose/rules/geoJsonSlot.ts +61 -0
  552. package/src/compose/rules/geometrySlots.ts +155 -0
  553. package/src/compose/rules/glyphNode.ts +62 -0
  554. package/src/compose/rules/layerKeys.ts +92 -0
  555. package/src/compose/rules/layerOrder.ts +85 -0
  556. package/src/compose/rules/layersManifest.ts +26 -0
  557. package/src/compose/rules/mapOptions.ts +300 -0
  558. package/src/compose/rules/maplibreWorkerVersion.gen.ts +8 -0
  559. package/src/compose/rules/markerPin.ts +122 -0
  560. package/src/compose/rules/markerRegistry.ts +85 -0
  561. package/src/compose/rules/markerSprite.ts +382 -0
  562. package/src/compose/rules/maxBounds.ts +120 -0
  563. package/src/compose/rules/overlayLookup.ts +49 -0
  564. package/src/compose/rules/paintDiff.ts +38 -0
  565. package/src/compose/rules/panLock.ts +77 -0
  566. package/src/compose/rules/patch.ts +124 -0
  567. package/src/compose/rules/queriedFeature.ts +55 -0
  568. package/src/compose/rules/queryLayers.ts +46 -0
  569. package/src/compose/rules/searchHighlight.ts +313 -0
  570. package/src/compose/rules/slotNames.ts +19 -0
  571. package/src/compose/rules/stripeImage.ts +253 -0
  572. package/src/compose/rules/swapMarker.ts +66 -0
  573. package/src/compose/rules/terrainVariant.ts +88 -0
  574. package/src/compose/rules/types.ts +559 -0
  575. package/src/compose/rules/urlHash.ts +19 -0
  576. package/src/compose/rules/viewOptions.ts +451 -0
  577. package/src/compose/rules/workerUrl.ts +131 -0
  578. package/src/data/engines/itineraryResource.ts +643 -0
  579. package/src/data/index.ts +78 -0
  580. package/src/data/rules/adapt.ts +473 -0
  581. package/src/data/rules/editModes.ts +51 -0
  582. package/src/data/rules/itinerary.ts +168 -0
  583. package/src/data/rules/nullable.ts +63 -0
  584. package/src/data/rules/roadAccess.ts +169 -0
  585. package/src/data/rules/segmentGroups.ts +309 -0
  586. package/src/data/rules/selectors.ts +95 -0
  587. package/src/data/rules/zones.ts +79 -0
  588. package/src/draw/engines/boundaryEngine.ts +1003 -0
  589. package/src/draw/engines/framedAdapter.ts +198 -0
  590. package/src/draw/engines/pointerCursor.ts +205 -0
  591. package/src/draw/engines/segmentEngine.ts +1405 -0
  592. package/src/draw/engines/snapIndex.ts +254 -0
  593. package/src/draw/engines/waypointEngine.ts +574 -0
  594. package/src/draw/engines/zoneEngine.ts +1137 -0
  595. package/src/draw/rules/drawFrame.ts +123 -0
  596. package/src/draw/rules/insertVertex.ts +226 -0
  597. package/src/draw/rules/screenSpace.ts +62 -0
  598. package/src/draw/rules/seeds.ts +185 -0
  599. package/src/draw/rules/snap.ts +115 -0
  600. package/src/draw/rules/snapCameraKey.ts +50 -0
  601. package/src/draw/rules/terraDrawShared.ts +214 -0
  602. package/src/draw/rules/zoneOutline.ts +213 -0
  603. package/src/editing/engines/cursor.ts +505 -0
  604. package/src/editing/engines/draftMarker.ts +149 -0
  605. package/src/editing/rules/accent.ts +11 -0
  606. package/src/editing/rules/engine.ts +288 -0
  607. package/src/editing/rules/placement.ts +22 -0
  608. package/src/editing/rules/positions.ts +89 -0
  609. package/src/editing/rules/sources.ts +9 -0
  610. package/src/editing/rules/types.ts +457 -0
  611. package/src/editing/rules/vocabulary.ts +10 -0
  612. package/src/editing/rules/waypointCursor.ts +228 -0
  613. package/src/editor/engines/directionArrows.ts +459 -0
  614. package/src/editor/engines/directions.ts +1383 -0
  615. package/src/editor/engines/editorClient.ts +134 -0
  616. package/src/editor/engines/eventScope.ts +59 -0
  617. package/src/editor/engines/frameLoop.ts +159 -0
  618. package/src/editor/engines/itineraryPreview.ts +272 -0
  619. package/src/editor/engines/mapLockGuard.ts +66 -0
  620. package/src/editor/engines/overlayRenderer.ts +2696 -0
  621. package/src/editor/engines/peerDraft.ts +760 -0
  622. package/src/editor/engines/poiPick.ts +305 -0
  623. package/src/editor/engines/pointPick.ts +84 -0
  624. package/src/editor/engines/roadAccessLine.ts +140 -0
  625. package/src/editor/engines/searchHighlight.ts +183 -0
  626. package/src/editor/engines/viewClient.ts +4091 -0
  627. package/src/editor/engines/zoneBadges.ts +503 -0
  628. package/src/editor/index.ts +97 -0
  629. package/src/editor/rules/accentColor.ts +116 -0
  630. package/src/editor/rules/camera.ts +121 -0
  631. package/src/editor/rules/contract.ts +120 -0
  632. package/src/editor/rules/icons.ts +825 -0
  633. package/src/editor/rules/markerElements.ts +244 -0
  634. package/src/editor/rules/style.ts +51 -0
  635. package/src/editor/rules/terrain.ts +98 -0
  636. package/src/editor/rules/tileWarm.ts +191 -0
  637. package/src/editor/rules/tilesReload.ts +158 -0
  638. package/src/editor/rules/zoneBadgePlacement.ts +1832 -0
  639. package/src/editor/rules/zoneTimeStyling.ts +119 -0
  640. package/src/errors/index.ts +25 -0
  641. package/src/errors/rules/errors.ts +158 -0
  642. package/src/errors/rules/print.ts +129 -0
  643. package/src/geo/index.ts +89 -0
  644. package/src/geo/rules/boundaries.ts +105 -0
  645. package/src/geo/rules/camera.ts +496 -0
  646. package/src/geo/rules/corridor.ts +242 -0
  647. package/src/geo/rules/elevationTiles.ts +269 -0
  648. package/src/geo/rules/formatLngLat.ts +63 -0
  649. package/src/geo/rules/geodesy.ts +125 -0
  650. package/src/geo/rules/geometry.ts +362 -0
  651. package/src/geo/rules/lineWalk.ts +77 -0
  652. package/src/geo/rules/longitude.ts +99 -0
  653. package/src/geo/rules/searchLimits.ts +22 -0
  654. package/src/geo/rules/segmentGeometry.ts +80 -0
  655. package/src/geo/rules/terrain.ts +107 -0
  656. package/src/geo/rules/tuples.ts +124 -0
  657. package/src/geo/rules/types.ts +54 -0
  658. package/src/geo/rules/webMercator.ts +57 -0
  659. package/src/i18n/fr/index.ts +17 -0
  660. package/src/i18n/fr/rules/fr.ts +85 -0
  661. package/src/i18n/fr/rules/words.gen.ts +277 -0
  662. package/src/i18n/index.ts +82 -0
  663. package/src/i18n/rules/bundle.ts +378 -0
  664. package/src/i18n/rules/config.ts +71 -0
  665. package/src/i18n/rules/dates.ts +165 -0
  666. package/src/i18n/rules/endonyms.gen.ts +19 -0
  667. package/src/i18n/rules/language.ts +92 -0
  668. package/src/i18n/rules/localizedName.ts +33 -0
  669. package/src/i18n/rules/merge.ts +106 -0
  670. package/src/i18n/rules/scope.ts +127 -0
  671. package/src/i18n/rules/strings.ts +632 -0
  672. package/src/i18n/rules/videoOverlay.ts +121 -0
  673. package/src/i18n/rules/wordForms.ts +95 -0
  674. package/src/i18n/rules/words.gen.ts +277 -0
  675. package/src/icons/index.ts +54 -0
  676. package/src/icons/rules/activities.ts +40 -0
  677. package/src/icons/rules/amenities.ts +250 -0
  678. package/src/icons/rules/artwork.gen.ts +83 -0
  679. package/src/icons/rules/artwork.ts +47 -0
  680. package/src/icons/rules/fallback.ts +21 -0
  681. package/src/icons/rules/lucideMarkers.gen.ts +112 -0
  682. package/src/icons/rules/lucideUi.gen.ts +197 -0
  683. package/src/icons/rules/paint.ts +107 -0
  684. package/src/icons/rules/parse.ts +475 -0
  685. package/src/icons/rules/provider.ts +373 -0
  686. package/src/icons/rules/sprites.ts +54 -0
  687. package/src/icons/rules/ui.ts +348 -0
  688. package/src/icons/rules/waypoints.ts +215 -0
  689. package/src/index.ts +993 -0
  690. package/src/layers/engines/layersSelection.ts +515 -0
  691. package/src/layers/engines/readoutEngine.ts +131 -0
  692. package/src/layers/index.ts +151 -0
  693. package/src/layers/rules/analysis.ts +135 -0
  694. package/src/layers/rules/enrichment.ts +30 -0
  695. package/src/layers/rules/geoJson.ts +270 -0
  696. package/src/layers/rules/hover.ts +67 -0
  697. package/src/layers/rules/itineraries.ts +182 -0
  698. package/src/layers/rules/layersPanel.ts +237 -0
  699. package/src/layers/rules/order.ts +194 -0
  700. package/src/layers/rules/overlayInstant.ts +49 -0
  701. package/src/layers/rules/overlays.ts +52 -0
  702. package/src/layers/rules/poiPanel.ts +119 -0
  703. package/src/layers/rules/pois.ts +114 -0
  704. package/src/layers/rules/readout.ts +340 -0
  705. package/src/layers/rules/streetView.ts +16 -0
  706. package/src/layers/rules/tileTimestamp.ts +146 -0
  707. package/src/layers/rules/timeSlider.ts +192 -0
  708. package/src/layers/rules/timeWindow.ts +123 -0
  709. package/src/layers/rules/zones.ts +43 -0
  710. package/src/layers/rules/zoom.ts +77 -0
  711. package/src/map-client/index.ts +71 -0
  712. package/src/map-client/rules/mapClient.ts +1945 -0
  713. package/src/navigation/engines/navigation.ts +493 -0
  714. package/src/navigation/index.ts +51 -0
  715. package/src/navigation/rules/followedRoute.ts +78 -0
  716. package/src/navigation/rules/instructions.ts +89 -0
  717. package/src/navigation/rules/itineraryRoute.ts +232 -0
  718. package/src/navigation/rules/offRoute.ts +41 -0
  719. package/src/navigation/rules/progress.ts +230 -0
  720. package/src/navigation/rules/prompts.ts +217 -0
  721. package/src/navigation/rules/routeRequest.ts +98 -0
  722. package/src/navigation/rules/status.ts +142 -0
  723. package/src/navigation/rules/steps.ts +234 -0
  724. package/src/navigation/rules/types.ts +83 -0
  725. package/src/profile/index.ts +307 -0
  726. package/src/profile/rules/amenityBadge.ts +35 -0
  727. package/src/profile/rules/amenityFilter.ts +74 -0
  728. package/src/profile/rules/amenityStacks.ts +66 -0
  729. package/src/profile/rules/axis.ts +89 -0
  730. package/src/profile/rules/axisCulling.ts +83 -0
  731. package/src/profile/rules/axisLookup.ts +180 -0
  732. package/src/profile/rules/climbs.ts +292 -0
  733. package/src/profile/rules/cursorMarker.ts +122 -0
  734. package/src/profile/rules/cursorReadout.ts +104 -0
  735. package/src/profile/rules/curvePlacement.ts +216 -0
  736. package/src/profile/rules/dock.ts +293 -0
  737. package/src/profile/rules/elevation.ts +1263 -0
  738. package/src/profile/rules/instant.ts +89 -0
  739. package/src/profile/rules/intl.ts +237 -0
  740. package/src/profile/rules/legEmphasis.ts +53 -0
  741. package/src/profile/rules/profileColors.ts +66 -0
  742. package/src/profile/rules/profileLayout.ts +59 -0
  743. package/src/profile/rules/profileSlices.ts +55 -0
  744. package/src/profile/rules/routeProfile.ts +475 -0
  745. package/src/profile/rules/rowMatch.ts +50 -0
  746. package/src/profile/rules/scale.ts +646 -0
  747. package/src/profile/rules/scaleFrame.ts +171 -0
  748. package/src/profile/rules/sectionChips.ts +83 -0
  749. package/src/profile/rules/sections.ts +923 -0
  750. package/src/profile/rules/slopeRamp.ts +160 -0
  751. package/src/profile/rules/statStrip.ts +103 -0
  752. package/src/profile/rules/steepness.ts +51 -0
  753. package/src/profile/rules/tableCells.ts +269 -0
  754. package/src/profile/rules/tableCursor.ts +87 -0
  755. package/src/profile/rules/unitPatterns.ts +335 -0
  756. package/src/profile/rules/units.ts +1025 -0
  757. package/src/profile/rules/waypointCard.ts +590 -0
  758. package/src/profile/rules/webAddress.ts +130 -0
  759. package/src/profile/rules/windowSpans.ts +65 -0
  760. package/src/rules/asciiFold.ts +17 -0
  761. package/src/rules/inDevelopment.ts +54 -0
  762. package/src/rules/listeners.ts +62 -0
  763. package/src/rules/timers.ts +9 -0
  764. package/src/rules/types.ts +22 -0
  765. package/src/rules/uuid.ts +87 -0
  766. package/src/seams/engines/geolocateControl.ts +286 -0
  767. package/src/seams/index.ts +50 -0
  768. package/src/seams/rules/clock.ts +169 -0
  769. package/src/seams/rules/geolocation.ts +165 -0
  770. package/src/seams/rules/segmentRoute.ts +187 -0
  771. package/src/search/engines/search.ts +1093 -0
  772. package/src/search/index.ts +99 -0
  773. package/src/search/rules/describe.ts +383 -0
  774. package/src/search/rules/filters.ts +195 -0
  775. package/src/search/rules/highlight.ts +270 -0
  776. package/src/search/rules/pick.ts +90 -0
  777. package/src/search/rules/rows.ts +258 -0
  778. package/src/search/rules/searchFocus.ts +27 -0
  779. package/src/search/rules/searchViewport.ts +44 -0
  780. package/src/search/rules/shown.ts +77 -0
  781. package/src/search/rules/types.ts +340 -0
  782. package/src/stream/rules/reconnectSchedule.ts +83 -0
  783. package/src/style/engines/organizationRead.ts +80 -0
  784. package/src/style/index.ts +63 -0
  785. package/src/style/rules/apply.ts +268 -0
  786. package/src/style/rules/attribution.ts +119 -0
  787. package/src/style/rules/itineraryLine.ts +142 -0
  788. package/src/style/rules/language.ts +668 -0
  789. package/src/style/rules/layout.gen.ts +27 -0
  790. package/src/style/rules/organization.ts +96 -0
  791. package/src/style/rules/paint.ts +143 -0
  792. package/src/style/rules/panelLayout.ts +51 -0
  793. package/src/style/rules/roadAccessColors.ts +29 -0
  794. package/src/style/rules/roadAccessLine.ts +267 -0
  795. package/src/style/rules/segmentColors.ts +207 -0
  796. package/src/testing/catalogs.ts +103 -0
  797. package/src/testing/index.ts +30 -0
  798. package/src/testing/mapClient.ts +241 -0
  799. package/src/testing/mountayaMap.ts +741 -0
  800. package/src/timezone/index.ts +14 -0
  801. package/src/timezone/rules/viewport.ts +875 -0
  802. package/src/units/index.ts +55 -0
  803. package/src/units/rules/conversions.ts +620 -0
  804. package/src/units/rules/preferenceChoices.ts +124 -0
  805. package/src/units/rules/preferences.ts +77 -0
  806. package/src/units/rules/rounding.ts +69 -0
  807. package/src/video/engines/videoRun.ts +654 -0
  808. package/src/video/engines/viewClient.ts +6 -0
  809. package/src/video/index.ts +83 -0
  810. package/src/video/profileOverlay/rules/contract.ts +210 -0
  811. package/src/video/profileOverlay/rules/curve.ts +216 -0
  812. package/src/video/profileOverlay/rules/draw.ts +410 -0
  813. package/src/video/profileOverlay/rules/fonts.ts +54 -0
  814. package/src/video/profileOverlay/rules/graphDesign.ts +690 -0
  815. package/src/video/profileOverlay/rules/minimalDesign.ts +144 -0
  816. package/src/video/profileOverlay/rules/registry.ts +23 -0
  817. package/src/video/profileOverlay/rules/staticLayer.ts +582 -0
  818. package/src/video/profileOverlay/rules/stripDesign.ts +327 -0
  819. package/src/video/profileOverlay/rules/types.ts +78 -0
  820. package/src/video/rules/videoConstants.ts +250 -0
  821. package/src/video/rules/videoEncoder.ts +277 -0
  822. package/src/video/rules/videoFrames.ts +99 -0
  823. package/src/video/rules/videoPreview.ts +185 -0
  824. package/src/video/rules/videoRecorder.ts +746 -0
  825. package/src/video/rules/videoWatermark.ts +155 -0
  826. package/src/video/rules/watermarkMark.ts +40 -0
  827. package/src/view/engines/viewClient.ts +6 -0
  828. package/src/view/index.ts +20 -0
package/README.md CHANGED
@@ -1,3 +1,1511 @@
1
- # Temporary Holding Version
1
+ # @mountaya/elements
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Render Mountaya data on [MapLibre GL JS](https://maplibre.org/): the map, and the pure maths the
4
+ elements around it share. It never calls `fetch`: it reads through the client you hand it.
5
+
6
+ ```bash
7
+ npm install @mountaya/elements maplibre-gl@6.20.0 @mountaya/client
8
+ ```
9
+
10
+ `maplibre-gl` is named at the release `@mountaya/elements` builds its map worker from, so the
11
+ renderer and the worker agree. The peer range is `^6.10.0`, for an application that already
12
+ holds a renderer; the elements warn on the first map where the two differ.
13
+
14
+ A map needs a container with a size of its own, the stylesheet, and a client whose publishable
15
+ key carries the `tiles` scope, which reads the layers manifest and every tile, and the
16
+ `publishing` scope as well for `fit` alone, which reads the itinerary's geometry:
17
+
18
+ ```html
19
+ <div id="map" style="height: 400px"></div>
20
+ ```
21
+
22
+ ```ts
23
+ import { Mountaya } from "@mountaya/client";
24
+ import { MountayaMap } from "@mountaya/elements";
25
+ import "@mountaya/elements/styles.css";
26
+
27
+ const client = new Mountaya({ credential: { publishableKey: "pk_…" } });
28
+ const map = new MountayaMap({ container: "map", client });
29
+
30
+ await map.setItinerary("itin_…", { fit: true }); // drawn, and framed
31
+ ```
32
+
33
+ A container with no height draws nothing and throws nothing, and in development the map says so
34
+ on the console. For React, use
35
+ [`@mountaya/elements-react`](https://www.npmjs.com/package/@mountaya/elements-react).
36
+
37
+ The base map, the overlays and the enrichments come from the layers manifest, the Tile API's own
38
+ catalog (`client.tiles.getTileLayers`), by slug:
39
+
40
+ ```ts
41
+ await map.setTerrainVariant("dark"); // the terrain's own dark rendition, apart from any UI theme
42
+ map.setOverlay("aspectslope"); // exclusive: replaces the overlay drawn before
43
+ map.addEnrichment("hillshade"); // additive: stacks, and lands underneath
44
+
45
+ // One layer of a drawn overlay, by its manifest id. The choice survives a base-map switch.
46
+ map.setLayerVisibility("poi_food", false);
47
+ ```
48
+
49
+ `map.raw` is the MapLibre instance and the `maplibregl` export is the namespace, for anything the
50
+ façade does not wrap.
51
+
52
+ The map is one element, not the whole package: `@mountaya/elements/profile` reads an itinerary's
53
+ elevations with no canvas at all, and is published beside the map rather than behind it. The
54
+ package holds the client you hand it and lets it fetch, which is what lets the same rendering code
55
+ serve data you fetched, cached or rendered on a server.
56
+
57
+ ## Drawing a specification you already hold
58
+
59
+ `setItinerary(id)` fetches. An application that reads through its own cache (a query
60
+ client, a store, a payload rendered on a server) holds the specification before the map
61
+ asks for it, and `setSpecification` draws it under a name of your choosing with no second
62
+ request:
63
+
64
+ ```ts
65
+ // However you already read it. The map does not read it again.
66
+ const { data: specification } = await mountaya.tiles.getItinerarySpecification({ itinerary_id });
67
+ if (specification === undefined) {
68
+ return; // every envelope's `data` is optional: no body, nothing to draw
69
+ }
70
+
71
+ await map.setSpecification("itinerary", specification);
72
+ map.easeIntoZoomRange(specification); // only when a user asked to see it: it moves the camera
73
+
74
+ map.removeSpecification("itinerary");
75
+ ```
76
+
77
+ The name is yours and cannot collide with anything the façade draws: the slot above is
78
+ called `itinerary` and `setItinerary`'s own is untouched. Mounting the same name again
79
+ replaces what it held rather than stacking a second copy, so this is safe to call on every
80
+ render. `getSpecifications()` lists what is drawn, `clearSpecifications()` removes all of it.
81
+
82
+ **This is not `applySpecification` with extra steps.** The two things you would otherwise
83
+ write yourself are the two that are easy to miss. Every layer lands at its `LayerRank`, so
84
+ an overlay draws beneath the itinerary rather than over it whichever arrived first. And the
85
+ intent is remembered rather than only the layers, so `setTerrain` replays it, where a
86
+ specification applied directly is destroyed by the next base-map switch and never comes
87
+ back, silently, because nothing errors when a layer simply is not there any more.
88
+
89
+ `easeIntoZoomRange` is separate because it moves the camera, and a map following your own
90
+ camera should not be overruled by a layer arriving. Reach for it when a user switched
91
+ something on: a layer draws over a zoom window and renders **nothing** outside it (no error,
92
+ no empty tile), so an overlay mounted from too far out reads as a dead control rather than as a
93
+ zoom problem. The window is the layers' own, which `paintZoomRange` reads: a source's
94
+ `zoom_max` is only where its tiles stop being served, and the map overzooms past it, so the
95
+ points of interest served to 15 still paint at 18.
96
+
97
+ ### An overlay you already hold keeps its slot
98
+
99
+ `setOverlay("aspectslope")` and `addEnrichment("hillshade")` read the `/v1/tile-layers` manifest
100
+ to resolve the slug. An application that already holds the manifest passes the resolved entry
101
+ instead, and nothing is fetched:
102
+
103
+ ```ts
104
+ import { findOverlay } from "@mountaya/elements/layers";
105
+
106
+ const { data: layers } = await mountaya.tiles.getTileLayers(); // or your cache
107
+
108
+ const aspectSlope = findOverlay(layers, "aspectslope", "classic");
109
+ const hillshade = findOverlay(layers, "hillshade", "enrichment");
110
+
111
+ if (aspectSlope !== null) {
112
+ await map.setOverlaySpecification(aspectSlope); // exclusive, as setOverlay("aspectslope") is
113
+ }
114
+ if (hillshade !== null) {
115
+ await map.addEnrichmentSpecification(hillshade); // stacks, as addEnrichment does
116
+ }
117
+ ```
118
+
119
+ `setSpecification` also draws bytes you hold and is the wrong tool for an overlay: it mounts
120
+ under a name of yours, beside the overlay slot rather than in it. What that costs is every
121
+ behaviour attached to the slot: `clearOverlay()` and `setOverlay(null)` stop clearing it, a
122
+ later overlay stacks instead of replacing it, and an enrichment mounted by name is invisible
123
+ to `removeEnrichment`, `getEnrichments` and `clearEnrichments`. These two keep all of it. The
124
+ slot is named from `overlay.slug`, so there is no slug to pass and no way for the two to
125
+ disagree.
126
+
127
+ ### Finishing a mount, and keeping it finished
128
+
129
+ Layers you add yourself are not replayed across a base-map switch, because they draw from
130
+ sources this package did not create. `onMounted` is how the two are reconciled: it fires when
131
+ the slot's layers go live, and again every time a style swap replays them.
132
+
133
+ ```ts
134
+ // The same options bag on setSpecification, setOverlaySpecification and
135
+ // addEnrichmentSpecification.
136
+ await map.setSpecification("aspectslope", specification, {
137
+ onMounted: ({ layerIds }) => {
138
+ for (const id of layerIds) {
139
+ map.raw.setPaintProperty(id, "fill-opacity", 0.45);
140
+ }
141
+ },
142
+ });
143
+ ```
144
+
145
+ The ids are the payload because you cannot spell them in advance: a manifest assigns them a
146
+ per-source prefix that is not stable. `onMounted` may return a promise, which is awaited, so
147
+ a swap resolves once the folds are back. Throwing at the call site rejects that `set`;
148
+ throwing during a replay is emitted on the map's `error` event instead, so one broken fold
149
+ cannot cost every other slot its own.
150
+
151
+ ## Drawing your own layers into the same stack
152
+
153
+ `addLayer` puts a layer of yours at a Mountaya rank instead of on top of everything:
154
+
155
+ ```ts
156
+ import { LayerRank } from "@mountaya/elements/layers";
157
+
158
+ map.addLayer({ id: "corridor", source: "my-src", type: "line" }, LayerRank.STREETVIEW_CORRIDOR);
159
+ map.editLayer("corridor", { paint: { "line-color": "#e64980", "line-opacity": 0.8 } });
160
+ map.removeLayer("corridor");
161
+ ```
162
+
163
+ `map.raw.addLayer` also works, and appends above the itinerary, above the labels, above
164
+ everything. The reason to come through here is the **shared registry**. Anchoring reads the
165
+ ranks of the layers already placed and returns "on top" when it finds nothing ranked higher,
166
+ so a caller keeping its own registry orders correctly within its own set and wrongly against
167
+ this one. That renders as an itinerary drawn under its own overlay: a wrong-looking map, not an
168
+ error. Layers added here are also visible to `featuresAt` and to `setLayerVisibility`.
169
+
170
+ The source is yours, so the layer is **not replayed** across a style swap: re-add it once
171
+ the swap resolves. Adding an id that is already present re-ranks it rather than throwing,
172
+ which is what makes that re-add a single call. On a map whose style has loaded the layer is in
173
+ the style in the step of the call, whether or not that style's tiles have loaded. A layer added
174
+ before any style has loaded is placed as the first one loads, ahead of `styleload`, and
175
+ `removeLayer` withdraws it meanwhile.
176
+
177
+ `editLayer` merges an edit onto a layer's paint and layout in its place: a property the edit
178
+ states replaces the one the layer holds, one stated as `undefined` keeps it, and one stated as
179
+ `null` goes back to MapLibre's default. It edits a layer of yours and a layer of a drawing the map
180
+ makes, and throws `MountayaElementsNotFoundError` for an id the map places no layer under.
181
+
182
+ ## Swapping the base style yourself
183
+
184
+ `setTerrain` covers the catalogue. `setStyle` covers everything else: your own cartography,
185
+ a third-party base map, or a catalogue style you need to amend as it arrives:
186
+
187
+ ```ts
188
+ await map.setStyle("https://example.com/style.json", {
189
+ transformStyle: (previous, next) => ({ ...next, sources: { ...next.sources, dem } }),
190
+ });
191
+ ```
192
+
193
+ `transformStyle` is MapLibre's own hook. It runs after the style is
194
+ fetched and before it is committed, which is the only point at which a source can be added to
195
+ the style *document* rather than to the map on top of it. Injecting a DEM for 3D relief is
196
+ that case, and it cannot be done afterwards. Its `previous` is the style on the map as MapLibre
197
+ serializes it, less the one source the map marks a swap with. A hook that throws rejects the
198
+ call with what it threw, and the style on the map stays, with everything drawn on it.
199
+
200
+ Prefer this to `map.raw.setStyle`, which destroys every source and layer and leaves your
201
+ itinerary and overlays gone with nothing raised. This one announces the swap, waits for the
202
+ new style and replays what it drew.
203
+
204
+ A swap to the document already on the map resolves like any other. While a swap is fetching
205
+ its document the base map before it is still the one shown. A clear made then leaves it in the
206
+ same step. A slot set or added then, and a preview, a highlight or an emphasis set then, is
207
+ drawn on it at once when that base map reports loaded (`map.raw.isStyleLoaded()`), and waits
208
+ for the swap to end while its tiles are still loading. What is drawn is replayed onto the new
209
+ style as it lands. A terrain asked for after an earlier switch was given up on is the
210
+ one that stands: the map asks MapLibre for it again, which drops the document still on its way.
211
+
212
+ `map.events` is the map's `MapEvents`: MapLibre's own events, typed by their payload, and the
213
+ deferral the façade uses for its own work. `afterStyleLoad(fn)` runs `fn` at once when the map is
214
+ ready, and holds it until the new style lands while a swap is in flight. A second
215
+ `MapEventEngine` over the same map never learns of a swap the map announced, so work deferred on
216
+ it runs against the style being torn down.
217
+
218
+ ## A layers picker, in any framework
219
+
220
+ A picker over the layers manifest follows the catalogue's rules rather than the caller's: a
221
+ classic overlay such as slope replaces the one drawn before it and a second press clears it,
222
+ while an enrichment such as hillshade stacks. `LayersSelectionEngine` holds those rules, reads
223
+ the manifest and drives the map's slots, and names no framework:
224
+
225
+ ```ts
226
+ import { LayersSelectionEngine } from "@mountaya/elements/layers";
227
+
228
+ const picker = new LayersSelectionEngine({ map });
229
+
230
+ // Subscribing reads the manifest and states the terrain the map reports it shows, redrawing nothing.
231
+ const stop = picker.subscribe(() => {
232
+ const { classicCategories, enrichmentCategories, error, overlay } = picker.getSnapshot();
233
+ });
234
+
235
+ picker.setOverlay("aspectslope"); // replaces the classic overlay drawn before it
236
+ picker.setOverlay("aspectslope"); // a second press clears it
237
+ picker.toggleEnrichment("hillshade"); // stacks on whatever is drawn
238
+ picker.setInstant(new Date("2026-03-14T09:00:00Z")); // the time the stamped overlays show
239
+ picker.setInstant(null); // back to the server's present
240
+ stop();
241
+ ```
242
+
243
+ The selection is what was asked for and the map is what is drawn, and the engine never copies
244
+ one into the other: a slot the map refuses keeps its selection, with the refusal in `error`. A
245
+ replaced map starts a fresh selection, because it draws nothing the previous one did, with no
246
+ instant pinned. A pin is a command like any other: the map draws the classic overlay the server
247
+ stamps for it, its tiles asked again in place, and `overlayInstant`, `timeSliderWindow` and the
248
+ slider rules beside them in `./layers` say what a time slider shows and pins. The map is
249
+ anything shaped like `LayersSelectionTarget`, which `MountayaMap` is, and `useMountayaLayers` in
250
+ `@mountaya/elements-react` is a binding over this engine rather than a second implementation.
251
+
252
+ ## Driving a map you constructed yourself
253
+
254
+ The lower-level pieces the façade composes stay exported, for a consumer who wants their own
255
+ `maplibregl.Map` rather than one of ours:
256
+
257
+ ```ts
258
+ import * as maplibregl from "maplibre-gl";
259
+ import { applySpecification, createTransformRequest, ensureMapLibreWorker } from "@mountaya/elements";
260
+
261
+ ensureMapLibreWorker();
262
+
263
+ const map = new maplibregl.Map({
264
+ container,
265
+ style: "https://demotiles.maplibre.org/style.json",
266
+ transformRequest: createTransformRequest({ publishableKey: "pk_…" }),
267
+ });
268
+
269
+ map.on("load", () => applySpecification(map, specification));
270
+ ```
271
+
272
+ This is the one path where you call MapLibre's own constructor. It needs `maplibre-gl` in your
273
+ tree, which the install line at the top of this page puts there: the renderer is an optional
274
+ peer of this package, so npm fetches it because you named it and not because this package did.
275
+ The instance is yours, and so is the ranking and the style-reload replay: `applySpecification`
276
+ registers sources and layers and stops there. On a `MountayaMap`, use `setSpecification`
277
+ instead: same bytes, both behaviours kept.
278
+
279
+ `ensureMapLibreWorker` is the one line a `MountayaMap` would have run for you: it points MapLibre
280
+ at the tile worker this package publishes, and does nothing if you have already chosen one. It is
281
+ idempotent and safe to call beside every map you build.
282
+
283
+ A pan lock on a map you build takes a rule that a `MountayaMap` applies for you. MapLibre's
284
+ `maxBounds` throws on a lock exactly a turn wide, because it wraps both edges into one world
285
+ before it measures the lock and the two meet. `maxBoundsLongitudes` writes the west and east
286
+ edges it takes: the lock's own while it is narrower than a turn, and the whole world a hair under
287
+ a turn wide, centred on the lock, from a turn up.
288
+
289
+ ```ts
290
+ import * as maplibregl from "maplibre-gl";
291
+ import { maxBoundsLongitudes } from "@mountaya/elements/geo";
292
+
293
+ const [west, east] = maxBoundsLongitudes(-200, 200); // [-179.9999999999, 179.9999999999]
294
+
295
+ const map = new maplibregl.Map({
296
+ container,
297
+ maxBounds: [west, -60, east, 70],
298
+ style: "https://demotiles.maplibre.org/style.json",
299
+ });
300
+ ```
301
+
302
+ `setConstraints` on a `MountayaMap`, the editor client's `setConstraints` and `paddedMaxBounds`
303
+ write their locks through the same rule, so one lock reaches MapLibre with the same edges
304
+ whichever of them writes it.
305
+
306
+ ## `transformRequest` is derived, not required
307
+
308
+ The Tile API takes its credentials as headers, and MapLibre fetches tiles itself, so a request
309
+ transform is where a credential is attached. A `MountayaMap` derives one from the client it
310
+ holds, so the credential is stated once:
311
+
312
+ ```ts
313
+ const map = new MountayaMap({ client: mountaya, container });
314
+ ```
315
+
316
+ The derived transform sends the client's credential to the client's own tile base, and to no
317
+ other origin, with the client's language. It reads a session token held as a function on every
318
+ request, so one map lives through every refresh, and a client built on a secret key projects no
319
+ map credential at all. Which requests count as Mountaya's, what a relative request resolves
320
+ against and when the page's cookies ride are `createTransformRequest`'s rules, stated on it.
321
+
322
+ `transformRequest` is an optional override, on the map and on every surface above it (`MapView`
323
+ in `@mountaya/elements-react`, `MountayaStudio` in `@mountaya/studio-react`), for what the
324
+ client's credential cannot know: an origin the client does not speak to, a published-surface
325
+ opt-in, a share token. It is an option of its own and never a key of `maplibre`, which adds to the
326
+ map's own options and cannot replace them.
327
+
328
+ ```ts
329
+ const map = new MountayaMap({
330
+ client: mountaya,
331
+ container,
332
+ transformRequest: createTransformRequest({
333
+ publishableKey: "pk_…",
334
+ origins: ["http://localhost:8083"], // a local stack, or your own proxy
335
+ }),
336
+ });
337
+ ```
338
+
339
+ A share-link visitor's share token replaces the key rather than accompanying it, and reaches every
340
+ tile a share view draws, its overlays and terrains included:
341
+
342
+ ```ts
343
+ createTransformRequest({ shareToken: "share_…" });
344
+ ```
345
+
346
+ ## Reading the platform's geometry
347
+
348
+ An itinerary's geometry comes in more than one shape. A waypoint is a bare `Point`. A
349
+ linestring segment is a bare `LineString`, or a `GeometryCollection` of that line and a
350
+ `MultiPoint` of the vertices drawn when resampling added positions and the vertices drawn
351
+ number fewer than the line's sample budget (one position per 50 m of its distance, plus two,
352
+ between 400 and 4,000); a dense recorded track is a bare `LineString` even when resampling
353
+ filled a gap in it. A directions segment is a `GeometryCollection` of the routed `LineString`
354
+ and a `MultiPoint` of the vias it was routed through. Flatten before reading `geometry.type`, which differs from one segment to the next.
355
+
356
+ ```ts
357
+ import { boundsOf, extractLineStrings, extractVias } from "@mountaya/elements/geo";
358
+
359
+ const lines = extractLineStrings(itinerary.geojson); // what the itinerary looks like
360
+ const vias = extractVias(itinerary.geojson); // what was asked for
361
+
362
+ const bounds = boundsOf([itinerary.geojson]); // BoundingBox is fitBounds' tuple
363
+ if (bounds !== null) {
364
+ map.fitBounds(bounds); // null when there was nothing to bound
365
+ }
366
+ ```
367
+
368
+ ## Resolving an itinerary by id
369
+
370
+ An element handed an id rather than geometry reads the itinerary through a client you pass in.
371
+ `ItineraryResourceEngine` does that once per client, id and surface however many elements ask,
372
+ and projects the answer into what they draw: the geometry to profile, the server's own figures,
373
+ the authored chain and the waypoints.
374
+
375
+ ```ts
376
+ import { ItineraryResourceEngine } from "@mountaya/elements/data";
377
+
378
+ const resource = new ItineraryResourceEngine({ itineraryId, source: mountaya });
379
+
380
+ const stop = resource.subscribe(() => {
381
+ // The projections are null together while resolving, after a failure and with no id.
382
+ const { characteristics, error, geojson, resolving, segments, waypoints } = resource.getSnapshot();
383
+ });
384
+
385
+ // A new id reads as resolving until it lands, and never shows the previous itinerary under it.
386
+ resource.configure({ itineraryId: "itin_def", source: mountaya });
387
+ stop();
388
+ ```
389
+
390
+ Every engine in the page shares one cache, so a chart and a table over one itinerary make one
391
+ request. It keeps the answers each client read most recently and drops a failure at once, so the
392
+ next question asks again. Once your application has changed an itinerary,
393
+ `invalidateItineraryResource(mountaya, itineraryId)` drops its answers and every element over it
394
+ reads it again. `useItineraryResource` in `@mountaya/elements-react` is a binding over this
395
+ engine.
396
+
397
+ ## Profiling an itinerary
398
+
399
+ `buildElevationSeries` walks any GeoJSON that carries lines and returns meters-from-start
400
+ against meters-above-sea-level, reading elevation from each position's third coordinate. It
401
+ takes `Feature`, `FeatureCollection` and bare `Geometry` alike, expands `MultiLineString`,
402
+ and ignores anything that is not a line, so a directions segment profiles correctly without
403
+ being unwrapped first.
404
+
405
+ ```ts
406
+ import { buildElevationSeries, formatElevation, profileTotals } from "@mountaya/elements/profile";
407
+
408
+ const series = buildElevationSeries(itinerary.geojson);
409
+ const totals = profileTotals(series);
410
+
411
+ formatElevation(totals.ascent, { language: "fr", length: "metric" });
412
+ ```
413
+
414
+ `profileTotals` applies a noise hysteresis, because ascent summed straight from
415
+ DEM-sampled coordinates counts every meter of sampling error twice. Treat it as an estimate
416
+ and prefer server-computed metrics when you hold them.
417
+
418
+ None of this touches MapLibre, which is the point: `@mountaya/elements-react` draws
419
+ `<ItineraryProfile>` on top of it with no map in sight.
420
+
421
+ ## Converting units
422
+
423
+ Every unit factor and conversion the SDK makes lives in `@mountaya/elements/units`, which the
424
+ package root mirrors. A conversion runs through the exact value that defines each unit, so a mile
425
+ is 5,280 feet rather than whatever a rounded factor makes of it, and the unit ids are ECMA-402's,
426
+ so a value converted into a unit formats under the same id. An amount of data takes the decimal
427
+ prefixes ECMA-402 and every bit rate mean (a megabit is 1,000,000 bits, never 1,048,576), and a
428
+ proportion converts between the bare ratio a fraction is computed as and the percent a reader
429
+ reads.
430
+
431
+ `kibibyte` and `mebibyte` are the binary data units, 1,024 bytes and 1,024 kibibytes, and the
432
+ units the API states its body ceilings in. They are the IEC names (KiB, MiB) and the ids
433
+ ECMA-402 does not list, so `Intl.NumberFormat` throws a `RangeError` for either as a `unit`, and
434
+ a size in one is formatted as a plain number.
435
+
436
+ ```ts
437
+ import {
438
+ convertDataSize,
439
+ convertLength,
440
+ convertProportion,
441
+ convertSlope,
442
+ convertSpeed,
443
+ convertTemperature,
444
+ } from "@mountaya/elements/units";
445
+
446
+ convertLength(1, "mile", "foot"); // 5280
447
+ convertSpeed(36, "kilometer-per-hour", "meter-per-second"); // 10
448
+ convertSpeed(4.5, "kilometer-per-hour", "minute-per-kilometer"); // 13.33…, a 13:20 pace
449
+ convertTemperature(-40, "celsius", "fahrenheit"); // -40
450
+ convertSlope(100, "percentage", "degrees"); // 45
451
+ convertDataSize(12 * 20, "megabit", "megabyte"); // 30, twenty seconds at 12 Mbps
452
+ convertDataSize(25, "mebibyte", "byte"); // 26214400, a ceiling stated as 25 MiB
453
+ convertProportion(0.585, "ratio", "percent"); // 58.5
454
+ ```
455
+
456
+ A unit is checked and a value is not. An unknown unit throws `MountayaElementsError` naming the
457
+ conversion, the parameter and the units it accepts; a value converts as IEEE arithmetic does, so
458
+ NaN stays NaN and a rate of zero is an infinite pace. What a reader sees is `./profile`'s to
459
+ decide: `distanceUnitFor`, `elevationUnitFor` and `speedUnitFor` resolve the unit a reader's
460
+ preferences ask for, and every formatter states an absent value as an empty string and reads a
461
+ preference outside its union (a stale stored scale, say) as the member `defaultUnits` holds.
462
+
463
+ ```ts
464
+ import { distanceUnitFor } from "@mountaya/elements/profile";
465
+ import { convertLength } from "@mountaya/elements/units";
466
+
467
+ const miles = convertLength(12_430, "meter", distanceUnitFor("imperial")); // 7.72…
468
+ ```
469
+
470
+ ## Words in a language
471
+
472
+ `@mountaya/elements/i18n` holds the elements' copy in English, built in. Every other language
473
+ Mountaya translates is an entry of its own, `@mountaya/elements/i18n/fr` for French, so a page
474
+ that reads in English loads no other language. Hand what you imported to
475
+ `resolveElementsStrings`, keyed by language; a language asked for and not handed over reads in
476
+ English and says so once in development. `translatedLanguages` answers what a language picker
477
+ offers: English, then each language handed over.
478
+
479
+ ```ts
480
+ import { resolveElementsStrings, translatedLanguages } from "@mountaya/elements/i18n";
481
+ import { frElementsStrings } from "@mountaya/elements/i18n/fr";
482
+
483
+ const translations = { fr: frElementsStrings };
484
+ const words = resolveElementsStrings("fr", undefined, translations);
485
+ const offered = translatedLanguages(translations); // ["en", "fr"]
486
+ ```
487
+
488
+ ## Painting like the platform does
489
+
490
+ The layer constants are what the served tiles are drawn with, so an itinerary you render
491
+ yourself (a preview, a proposed alternative, an unsaved draft) looks like the itineraries the
492
+ platform serves rather than like a debug overlay.
493
+
494
+ ```ts
495
+ import {
496
+ ITINERARY_LINE_SOURCE_LAYER, // the stable name to query features by
497
+ ITINERARY_LINE_WIDTH_STOPS, // the zoom-to-width ramp, as interpolate stops
498
+ zoneLevelColors, // the severity palette, exhaustive over the enum
499
+ poiCategoryStyles, // glyph + colour per POI category
500
+ } from "@mountaya/elements/layers";
501
+ ```
502
+
503
+ Match on `source_layer`, never on a layer's `id`: the `/v1/tile-layers` manifest assigns
504
+ ids a per-source prefix that is not stable.
505
+
506
+ Analysis results have a palette of their own, and it is the one `isochronesToGeoJson` and its
507
+ siblings, the converters `@mountaya/elements/layers` publishes, already stamp onto the features
508
+ they hand back. Reach for it when you draw those
509
+ features from your own layer stack, or when you draw a legend beside them:
510
+
511
+ ```ts
512
+ import {
513
+ DIRECTIONS_LINE_COLOR, // the computed-itinerary blue, distinct from a saved itinerary's
514
+ ISOCHRONE_RAMP, // the band scale, light to dark, nearest first
515
+ isochroneColor, // a stop by band index, cycling rather than inventing a colour
516
+ matrixLineWidth, // one cell's cost scaled onto the connector width range
517
+ } from "@mountaya/elements/layers";
518
+ ```
519
+
520
+ Bands are coloured by their position in the requested sequence, not by their value, so three
521
+ bands read as three bands whether the ranges are seconds or meters.
522
+
523
+ For the camera, `effectiveZoomBounds` turns an organization's configured zoom range into
524
+ one MapLibre accepts. That is not a pass-through: MapLibre requires a maximum strictly
525
+ greater than the minimum, and a narrowly configured range would otherwise throw at
526
+ construction.
527
+
528
+ ## Marker glyphs
529
+
530
+ Markers ship with **Lucide** glyphs (ISC, with MIT for the icons it derives from Feather;
531
+ bundled, no install). That is a licensing decision, not a design one: Mountaya's own studio
532
+ uses the Nucleo Core family, whose licence does not permit redistributing derived path data in a
533
+ public package.
534
+
535
+ If you hold a Nucleo licence and want pixel parity with the studio, supply your own set:
536
+ the path data stays in your tree, where your licence covers it:
537
+
538
+ <!-- typecheck:skip imports the reader's own licensed glyph table, which exists only in their tree -->
539
+
540
+ ```ts
541
+ import { createIconProvider } from "@mountaya/elements/icons";
542
+ import { MARKER_ICON_MARKUP } from "./my-licensed-nucleo-glyphs";
543
+
544
+ const nucleo = createIconProvider({
545
+ name: "nucleo",
546
+ paint: "fill", // Nucleo glyphs are filled shapes
547
+ markup: MARKER_ICON_MARKUP,
548
+ });
549
+ ```
550
+
551
+ `paint` is the field to get right. Lucide glyphs are open strokes with `fill="none"`;
552
+ Nucleo's are filled shapes. Painting one the other's way renders **nothing at all**, and
553
+ nothing throws, so the provider declares its mode rather than leaving the renderer to
554
+ guess.
555
+
556
+ What a set states is read once, where it is declared. `createIconProvider` throws a
557
+ `MountayaElementsError` naming the option it refuses: a `paint` that is neither `"fill"` nor
558
+ `"stroke"`, a `viewBox` that is not a number above 0, a `strokeWidth` no stroke can be drawn
559
+ with, a glyph whose markup is no string. `fallbackProvider` chains a partial set over another
560
+ when the two share a paint mode, a `viewBox` and, under `"stroke"`, a `strokeWidth`, because a
561
+ chain draws every glyph with the first set's. It refuses any other chain the same way.
562
+
563
+ Glyph names are Mountaya's semantic ones (`mountain`, `hut`, `camping`, `cutlery`, …), so
564
+ swapping sets changes nothing else. Third-party attribution is in `THIRD-PARTY-NOTICES.txt`.
565
+
566
+ ## Searching
567
+
568
+ `map.search(input)` is the Data API's full-text search, passed straight through: places,
569
+ POIs and ways from OpenStreetMap, plus the itineraries, collections and zones your credential
570
+ may see. It draws nothing, so what you do with the answer is yours. Like every Data API call it
571
+ needs a session token beside the key, so the map's client is built with
572
+ `{ publishableKey, sessionToken }`, the token minted by your server and passed as a function
573
+ where it rotates (`@mountaya/client`'s README shows how); a client holding the key alone is
574
+ refused before anything is sent.
575
+
576
+ What is *not* yours to write is the mapping from six wire shapes to one list. That is here:
577
+
578
+ ```ts
579
+ import { placeRow, SECTION_ORDER, splitByRanges } from "@mountaya/elements/search";
580
+
581
+ const result = await map.search({ query, targets: { places: true } }, { signal });
582
+ const rows = (result.places?.places ?? []).flatMap((place) => placeRow(place, query) ?? []);
583
+
584
+ // A row carries a stable id, a title, the ranges of it that matched, a one-line description
585
+ // and the payload picking it hands back, so a renderer draws it without knowing what a
586
+ // geocoded place is.
587
+ splitByRanges(rows[0].title, rows[0].matched ?? []);
588
+ ```
589
+
590
+ A mapper returns `null` for a result whose centroid did not survive narrowing, because a row
591
+ with nowhere to fly to does nothing when clicked. No mapper takes copy: every kind of result
592
+ carries its own name, a zone's included, and a zone's description is its secondary line.
593
+
594
+ `@mountaya/elements-react` draws these rows as `<SearchControl>`. The mapping is the same one.
595
+
596
+ A title's matched ranges are found without regard to case or accents, and always index the title
597
+ as written: `evian` emphasizes `Évian`. The filters a result list offers are here as well:
598
+ `SEARCH_FILTERS` in the order a list shows them, `searchFilterTargets` for the branches each one
599
+ shows, and `sectionsForFilter` to apply one, which is what `<SearchControl>`'s filter chips run.
600
+ `searchListState` reads the rest of what a list shows under a filter: its rows, a line for each
601
+ branch that failed, whether to say nothing was found, the note that a round fell back from the
602
+ visible area, and what its status line announces.
603
+
604
+ ### Showing what a reader picked
605
+
606
+ `pickTarget` answers what a pick does to the map: the camera frames the result's extent, or flies
607
+ to its point where it has none, and the map's search highlight marks it, above everything else
608
+ and in your accent. A collection has no place of its own and moves nothing.
609
+
610
+ ```ts
611
+ import { pickTarget, placeRow } from "@mountaya/elements/search";
612
+
613
+ const result = await map.search({ query, targets: { places: true } }, { signal });
614
+ const [row] = (result.places?.places ?? []).flatMap((place) => placeRow(place, query) ?? []);
615
+
616
+ if (row !== undefined) {
617
+ const { camera, mark } = pickTarget(row.payload);
618
+ if (camera?.kind === "fit") {
619
+ map.fitBounds(camera.bounds);
620
+ } else if (camera?.kind === "fly") {
621
+ map.flyTo({ center: camera.center, zoom: camera.zoom });
622
+ }
623
+ // One result is marked at a time, and `null` takes the mark down.
624
+ map.setSearchHighlight(mark);
625
+ }
626
+ ```
627
+
628
+ ### The box, not just the rows
629
+
630
+ Above the rows sits a state machine, and it is the part a search surface gets subtly wrong: the
631
+ pause before a round fires, aborting the round a newer keystroke replaced, re-running as the map
632
+ pans but not while the list is closed, and widening to the whole world once when the visible area
633
+ came back with nothing. `SearchEngine` owns all of it and names no framework.
634
+
635
+ ```ts
636
+ import { everySectionEmpty, SearchEngine } from "@mountaya/elements/search";
637
+
638
+ const search = new SearchEngine({
639
+ fetch: (input, options) => map.search(input, options),
640
+ viewport: {
641
+ read: () => map.getCamera(),
642
+ subscribe: (listener) => map.on("moveend", listener),
643
+ },
644
+ });
645
+
646
+ // Subscribing is what starts the work, and the last unsubscribe is what stops it: the round is
647
+ // aborted and the camera listener released, so a surface that goes away takes its requests with it.
648
+ const stop = search.subscribe(() => {
649
+ const snapshot = search.getSnapshot();
650
+ // What "nothing found" is gated on, rather than the sections being empty: a scoped round that
651
+ // finds nothing widens and asks again, and in between every section is settled and holding none.
652
+ const nothingFound = everySectionEmpty(snapshot);
653
+ // Through a typing pause the snapshot answers the query it settled on, not the text in the box.
654
+ const answersTheBox = snapshot.query === query.trim();
655
+ });
656
+
657
+ search.setOpen(true);
658
+ search.setViewportScope(true);
659
+ search.setQuery(query);
660
+ stop();
661
+ ```
662
+
663
+ `getSnapshot` and `subscribe` are React's `useSyncExternalStore` arguments exactly, which is why
664
+ `useSearch` in `@mountaya/elements-react` is a binding rather than a second implementation. A Vue
665
+ `shallowRef` or a Svelte store wraps the same pair. A snapshot names the query it answers
666
+ (`snapshot.query`, trimmed as a round asks it), so a binding that draws the typed text shows a
667
+ skeleton until the two agree, and nothing for a blank query or with no transport to ask through:
668
+ `shownSearchSnapshot` makes that choice, over the stand-in `unansweredSearchSnapshot` builds.
669
+ `fetch` is the seam: the default reaches `map.search`, and an application with its own mutation
670
+ surface supplies it instead and keeps everything above it.
671
+
672
+ `viewport` is the camera a scoped round reads its area from. It is written by hand above, over
673
+ the map's own events. A surface that holds a map client, the command surface an editor's tools
674
+ drive, builds it with `createSearchViewport(client)`: the client's live camera, and its move
675
+ stream with the values dropped, since the engine reads the camera when it acts.
676
+
677
+ A listener that throws stops neither the round nor the listeners after it. Every listener is
678
+ told, no command throws what a listener threw, and the first fault of a notification reaches
679
+ the runtime as an uncaught error on a microtask.
680
+
681
+ ## Following a route
682
+
683
+ `@mountaya/elements/navigation` tells a traveller what to do next, how far and how long is left,
684
+ and when they have left the route. It draws nothing and calls no network: the route comes from
685
+ a source you write, and each position from wherever your application reads one.
686
+
687
+ ```ts
688
+ import { extractLineStrings } from "@mountaya/elements/geo";
689
+ import {
690
+ NavigationEngine,
691
+ readDirectionsSteps,
692
+ stepInstruction,
693
+ } from "@mountaya/elements/navigation";
694
+
695
+ const navigation = new NavigationEngine({
696
+ // Your route source: one Data API request, its steps read into the one vocabulary the
697
+ // navigation reads. The signal aborts when the navigation stops.
698
+ route: async (waypoints: [number, number][], { signal }) => {
699
+ const { routes } = await mountaya.data.directions(
700
+ { activity: "HIKING_AND_TRAIL", waypoints },
701
+ { signal },
702
+ );
703
+ const route = routes[0];
704
+ if (route === undefined) {
705
+ throw new Error("No route joins these waypoints.");
706
+ }
707
+ const line = extractLineStrings(route.geometry)[0]?.coordinates ?? [];
708
+
709
+ return {
710
+ duration: route.duration,
711
+ line,
712
+ steps: readDirectionsSteps(route.steps, line.length).steps,
713
+ };
714
+ },
715
+ });
716
+
717
+ const stop = navigation.subscribe(() => {
718
+ const { progress, route, status } = navigation.getSnapshot();
719
+ const ahead = progress === null || progress.next === null ? undefined : route?.steps[progress.next];
720
+ // A copy key and its arguments, never a sentence: your strings say it in every language.
721
+ const instruction = ahead === undefined ? null : stepInstruction(ahead);
722
+ // How far and how long to that maneuver, and to the arrival.
723
+ const remaining = progress?.toManeuver;
724
+ });
725
+
726
+ navigation.start([
727
+ [6.8652, 45.9237],
728
+ [6.9106, 45.901],
729
+ ]);
730
+ navigation.setPosition([6.8655, 45.9239]); // each position your location source reports
731
+ stop();
732
+ ```
733
+
734
+ A step list is read from the surface that wrote it: `readDirectionsSteps` for the Data API and
735
+ `readItineraryDirectionsSteps` for a REST directions segment. A maneuver this release does not
736
+ know reads as `unknown` rather than dropping the step, and a list whose vertex ranges do not cover
737
+ the route once, in order, is refused whole: the route is then followed as one with no steps, a
738
+ departure over the whole line and an arrival on its last vertex. A turn announced at the wrong
739
+ junction is worse than none.
740
+
741
+ An instruction is `stepInstruction(step)`: a key and the arguments it takes, `turn-left` with the
742
+ way's `name`, `turn-leftPlain` where no way is named, and `roundaboutExit` with the `exit` at a
743
+ roundabout. `NAVIGATION_INSTRUCTION_KEYS` is every key there is, so a test of your own strings
744
+ can hold a sentence for each.
745
+
746
+ The status moves through a closed set, `NAVIGATION_STATUSES`. A position more than 50 m from the
747
+ route is `off-route`, a fixed distance in every app and every SDK, and back within it is
748
+ `navigating`; a traveller on the route whose progress reaches its end has `arrived`. Off the route,
749
+ `navigation.reroute(request)` asks for a new route from where the traveller is, and does nothing in
750
+ any other status. At most one request is in flight: a start or a reroute made meanwhile waits for
751
+ its answer, and only the newest waits. A new route that fails leaves the traveller `off-route` on
752
+ the route they hold, with the reason in `error`.
753
+
754
+ The rules under the engine are published too, for a machine of your own: `followedRouteOf(route)`
755
+ answers the steps a route is followed by, and `navigationProgressAt(route, position, previous)`
756
+ where a traveller stands on it and what is left. Distances are measured along the route's own
757
+ geometry, a vertex that names no place measured across, and times are the steps' own durations,
758
+ prorated within the current step.
759
+
760
+ ## Changing how it paints
761
+
762
+ Three layers of "make it ours", and they do not overlap. `--mtya-*` custom properties theme the
763
+ chrome in `@mountaya/elements-react`; a `strings` override renames what it says; and `paint`
764
+ changes what is drawn on the canvas:
765
+
766
+ ```ts
767
+ const map = new MountayaMap({
768
+ client: mountaya,
769
+ container,
770
+ paint: { itinerary: { casingColor: "#f8f9fa" } },
771
+ });
772
+ ```
773
+
774
+ A PATCH, folded over the shipped defaults with the same merge a strings bundle resolves through.
775
+ The line above changes the halo under an itinerary and leaves every width stop, dash pattern and
776
+ stacking rank exactly where it was, which is the thing the other two routes could not do: replace
777
+ the style and you own the whole basemap, re-assemble the layer specifications from the published
778
+ constants and you own every number in them.
779
+
780
+ `paint.layerRanks` is the other half, and it answers what paints over what. Your own tiles carry
781
+ source-layer names this package has never heard of, and an unranked one draws in the generic
782
+ overlay band, under the itinerary line:
783
+
784
+ ```ts
785
+ const map = new MountayaMap({
786
+ client: mountaya,
787
+ container,
788
+ paint: { layerRanks: { acme_avalanche: LayerRank.ZONE } },
789
+ });
790
+ ```
791
+
792
+ **A `--mtya-*` property can never be the answer here**, and it is worth knowing why rather than
793
+ discovering it. MapLibre evaluates paint expressions inside its own renderer, against no DOM
794
+ element, so `var(--mtya-accent)` reaches it as a string it cannot read and the layer draws in
795
+ MapLibre's fallback. `resolveMapPaint` and `defaultMapPaint` are exported for a caller
796
+ assembling a layer by hand with the same palette.
797
+
798
+ ## Constructing a map
799
+
800
+ Everything `new MountayaMap({ … })` takes. A container and a client are the whole ask; every
801
+ other row is an absence with a behaviour, which is the same promise the studio above this
802
+ package makes: a line you did not write is not a line you have to go and find.
803
+
804
+ <!-- props:start -->
805
+
806
+ <!-- Generated by scripts/generate-readme-props.mjs. Run `npm run generate:readme`. -->
807
+
808
+ #### `MountayaMapOptions`
809
+
810
+ | Prop | Type | |
811
+ | --- | --- | --- |
812
+ | `container` **(required)** | `string \| HTMLElement` | The element to render into, or its id. |
813
+ | `client` **(required)** | `Mountaya` | The client this map fetches its specifications through. |
814
+ | `credential` | `MapCredential` | Overrides the credential MapLibre attaches to its own tile, sprite and glyph requests. |
815
+ | `transformRequest` | `(url: string, resourceType?: string) => TransformedRequest \| undefined` | Replaces the transform the map derives from its client and its `credential`. |
816
+ | `center` | `[number, number]` | Where the camera opens, as `[longitude, latitude]`. |
817
+ | `zoom` | `number` | The zoom the camera opens at. |
818
+ | `bearing` | `number` | The compass bearing the camera opens at, in degrees clockwise from north. |
819
+ | `pitch` | `number` | The tilt the camera opens at, in degrees off vertical. |
820
+ | `terrain` | `string` | The slug of the catalogue terrain the base map starts on. |
821
+ | `terrainVariant` | `TerrainVariant` | The rendition of a catalogue terrain the base map draws, as the layers manifest lists it. |
822
+ | `language` | `MapLanguage` | The language labels are drawn in. |
823
+ | `geolocation` | `GeolocationSeam` | Where a device fix comes from. |
824
+ | `icons` | `IconProvider` | Glyphs for markers and, in `@mountaya/elements-react`, for controls. |
825
+ | `constraints` | `CameraConstraints` | The limits the camera may not leave: a zoom floor and ceiling, and a boundary. |
826
+ | `compactAttribution` | `boolean \| "collapsed"` | Whether the map's credit line is drawn in its compact form: a button at the canvas's corner that opens the credits. |
827
+ | `style` | `string \| StyleSpecification` | A complete style to start on, instead of a terrain from the manifest. |
828
+ | `paint` | `MapPaintOverrides` | Changes how the map PAINTS, without re-assembling a style. |
829
+ | `maplibre` | `MapLibreOptions` | MapLibre's own options, for anything this façade does not wrap. |
830
+
831
+ <!-- props:end -->
832
+
833
+ `setTerrain`, `setTerrainVariant`, `setConstraints`, `setStyle` and `setLanguage` change
834
+ afterwards what the matching rows seed at construction, and `jumpTo`, `easeTo` and `flyTo` move
835
+ the camera the pose rows open on. The rows with no setter beside them (`container`, `client`,
836
+ `credential`, `icons`, `geolocation`, `paint`, `transformRequest`, `maplibre`) are read once,
837
+ because the object they configure is built once.
838
+
839
+ `setStreetviewCoverage` draws Google's Street View coverage raster, read with no key from the
840
+ address `STREETVIEW_COVERAGE_TILES` names; showing it is subject to Google's terms, which are
841
+ yours to meet.
842
+
843
+ `getCredits()` answers what the map credits: Mountaya first, then each source a layer draws at the
844
+ camera's zoom, by the credit it states. A host that turns MapLibre's credit line off with
845
+ `maplibre: { attributionControl: false }` and draws its own reads the credits it owes there.
846
+
847
+ ## What a map reports
848
+
849
+ `map.on(event, handler)` returns its own unsubscribe. `accessrequired` and `error` carry what no
850
+ call of yours could reject, because the request behind them was the map's own:
851
+
852
+ ```ts
853
+ const map = new MountayaMap({ client: mountaya, container });
854
+
855
+ // Attached as soon as the map is built: the layers manifest is read before the style loads.
856
+ map.on("accessrequired", ({ status, url }) => {
857
+ console.warn(`The API refused ${url} with a ${status}.`);
858
+ });
859
+ map.on("accessrestored", () => {
860
+ console.info("Every refusal of access the map heard is over.");
861
+ });
862
+ map.on("error", ({ error }) => {
863
+ console.error(error);
864
+ });
865
+ ```
866
+
867
+ `accessrequired` is a 401, a 402 or a 403 on a tile, a sprite, a glyph, a style or the layers
868
+ manifest, with the address refused: a session token that expired, an entitlement the agreement
869
+ does not include ([talk to us](https://mountaya.com/en/contact/) to add one), a resource the
870
+ credential may not read, or a page the organization's allowed domains do not list. `error` is
871
+ every other failure MapLibre
872
+ raised or the base map not arriving. A refusal is never also an `error`, and an event emitted
873
+ while no handler is attached is not kept. `<MapView>` in `@mountaya/elements-react` attaches
874
+ both for you, as `onAccessRequired` and `onError`.
875
+
876
+ A 402 on the layers manifest (`GET /v1/tile-layers` on the Tile API) means the organization's
877
+ agreement does not include the Tile API, and a 403 that the key lacks `tiles`; the agreement is
878
+ asked first, so a key lacking both is told the 402. A page the organization's allowed domains do
879
+ not list is refused with a 403 before either is asked. Under a publishable key or a share token
880
+ the manifest lists only the overlays the organization's allowlist admits.
881
+
882
+ A refusal stands for the source it came from until a tile of that source loads, and a refusal of a
883
+ style, a sprite or the manifest until the next style loads, so a tile refused with a session token
884
+ that had just expired is answered by the next tile sent with the fresh one. `accessrestored` is
885
+ told once as the last standing refusal ends, which is when to lower a notice `accessrequired`
886
+ raised, and `isAccessRequired()` answers whether one stands now: read it as you attach, since the
887
+ first refusal can land before you do.
888
+
889
+ A 401 or a 403 answering a request that left with a session token your client has replaced since,
890
+ or under the key alone before its first token arrived, is told to nobody: neither `accessrequired`
891
+ nor `error` hears it, and no refusal stands for it, since the next request carries the token the
892
+ client sends now. A style refused that way is asked for again. The map holds a refusal against the
893
+ credential its own transform attached, so under a `transformRequest` of your own every refusal is
894
+ told. A share-link visitor's cookie is the browser's, and the page cannot read it, so a refusal of
895
+ a cookie the visitor's session has changed since is told too: that is this SDK's divergence from
896
+ the contract's rule that such a refusal is told to nobody.
897
+
898
+ `featurehover` reports the itinerary's features under the pointer, routed lines and waypoints,
899
+ at most once per animation frame, and an empty list while the pointer is off them and as it
900
+ leaves the map. `featureclick` reports every feature of ours a click landed on. Each feature is a
901
+ `QueriedFeature`, as `featuresAt` answers it: a GeoJSON feature naming the `layer` that drew it
902
+ and the `sourceLayer` it was read from, once for each layer that drew it. `click`,
903
+ `featureclick` and `contextmenu` are told once every listener of the gesture has run, and never
904
+ for a gesture an edit engine took with `preventDefault`.
905
+
906
+ `displaychange` says that what the map draws from its tile slots, or shows of it, changed: a
907
+ slot asked for, replaced or cleared, a layer of your own added, removed or placed at another
908
+ rank, a layer or a key hidden or shown. It is emitted once per change and never for a call that
909
+ changed nothing, and `drawnLayerKeys`, `getSpecifications`, `isLayerVisible` and their siblings
910
+ already answer the change as a handler hears of it. A base-map switch replays the same content
911
+ and is reported as `styleload` alone.
912
+
913
+ `getTerrain()` answers the slug of the catalogue terrain the base map is on, from the moment
914
+ `setTerrain` finds it in the manifest, and `null` before the first terrain is found and under a
915
+ style of your own. `setItinerary(itinerary, { fit, signal })` resolves `{ drawn }`: `true` when
916
+ this call's itinerary is the one on the map, and `false` when a later call or a clear superseded
917
+ it. `fit` frames the camera on the itinerary as this call's drawing reaches the map, and never
918
+ for a call that drew nothing: the map reads the itinerary's geometry through the client beside
919
+ its specification, and only when `fit` is asked for. `fit` takes the itinerary's id, and a
920
+ specification handed over with it is refused, since an itinerary's specification states no
921
+ bounds. A signal that aborts before the itinerary is drawn rejects the call with the signal's
922
+ reason as it aborts, whether or not the style the call waited on ever loads, and leaves the slot
923
+ as it was.
924
+
925
+ `setCollection(collection, { fit, signal })` resolves `{ drawn }` the same way. A collection's
926
+ specification carries `bbox`, the extent of the itineraries its tiles draw, so `fit` frames that
927
+ box as the drawing reaches the map, read off the specification it fetched or the one you hand
928
+ over, with no other read. One whose `bbox` is null, since its tiles draw no itinerary, is drawn
929
+ and frames nothing.
930
+
931
+ ```ts
932
+ await map.setCollection("col_…", { fit: { duration: 0, padding: 48 } }); // opens on all of it
933
+ ```
934
+
935
+ `addMatrix` takes the matrix's input, whose locations its connectors run between. A result you
936
+ already hold for that input rides in its options, `addMatrix(input, { result })`, and is drawn
937
+ with no query. An `edit`, of a marker or of a Data API result, keeps every member its patch
938
+ states as `undefined`, as it keeps the ones the patch leaves out: `{ color: props.color }`
939
+ forwards a value you may not have, and a member is cleared by the value its own type gives for
940
+ that.
941
+
942
+ A handler that throws stops neither the handlers after it nor the call that reported the event.
943
+ Every handler of the event is told, and the first error of that round is thrown again on a
944
+ microtask, where the page's own handling of an uncaught error sees it. It never becomes the
945
+ outcome of a `set`, an `add` or a base-map switch.
946
+
947
+ A lost WebGL context is reported on `error`, and the canvas is blank until the browser gives the
948
+ context back. What the map is asked to draw or to clear meanwhile is on the style once it is
949
+ back, and `styleload` says so. A layer of your own removed meanwhile stays off that style, and
950
+ one added meanwhile is yours to add again on that `styleload`, as after a base-map switch. An
951
+ `error` always carries an `Error`: a value a hook or a seam of your own threw, or one the
952
+ renderer reported, that is none arrives as a `MountayaElementsRejectionError`, with that value as
953
+ its `cause`.
954
+
955
+ A destroyed map is inert. No method reaches the renderer or is left pending, a call waiting on its
956
+ style settles, `setItinerary` resolves `{ drawn: false }`, and a getter keeps answering what the
957
+ map showed. `loadLayers` answers the catalogue the map held, and rejects where it held none, since
958
+ a destroyed map reads nothing.
959
+
960
+ ## Driving a map by command, with no editor
961
+
962
+ `@mountaya/elements/view` publishes `MapLibreViewClient`, the `MapClient` that
963
+ `@mountaya/elements/map-client` types, over a `MountayaMap` you hold. It frames the camera,
964
+ answers clicks and queries, draws the tile layers and drives a recording, and it refuses an
965
+ edit. Its entry loads none of the editor's peers:
966
+
967
+ ```ts
968
+ import { MapLibreViewClient } from "@mountaya/elements/view";
969
+
970
+ const client = new MapLibreViewClient(map);
971
+
972
+ client.fitBounds([6.8, 45.8, 6.9, 45.9], 40);
973
+ const stopListening = client.onMapClick(([longitude, latitude]) => {
974
+ console.log(longitude, latitude);
975
+ });
976
+
977
+ stopListening();
978
+ client.dispose();
979
+ ```
980
+
981
+ `dispose` removes the client's own listeners and leaves the map, so a new client over the same
982
+ map listens. A host that edits takes `MapLibreClient` from `@mountaya/elements/editor`, the same
983
+ class with its edit engines.
984
+
985
+ ## Recording a fly-through
986
+
987
+ A camera plan flies over a route and records, with no studio and no framework. `VideoFlightEngine`,
988
+ from the renderer-free `@mountaya/elements/camera`, holds the flight: `getSnapshot` and `subscribe`
989
+ are what a UI reads, `preview`, `play`, `pause`, `seek`, `stop` and `record` are what it writes, and
990
+ `dispose` ends every run. The map it drives comes from `@mountaya/elements/video`, built for
991
+ recording, with a drawing buffer that survives the browser's present step, which MapLibre reads once
992
+ at construction:
993
+
994
+ ```ts
995
+ import { MountayaMap } from "@mountaya/elements";
996
+ import {
997
+ cameraPlanGenerators,
998
+ type RouteGeometry,
999
+ VideoFlightEngine,
1000
+ } from "@mountaya/elements/camera";
1001
+ import { MapLibreViewClient, VideoRunEngine } from "@mountaya/elements/video";
1002
+
1003
+ declare const route: RouteGeometry;
1004
+
1005
+ const recordingMap = new MountayaMap({
1006
+ client: mountaya,
1007
+ container,
1008
+ maplibre: { canvasContextAttributes: { preserveDrawingBuffer: true } },
1009
+ });
1010
+ const client = new MapLibreViewClient(recordingMap, {
1011
+ video: new VideoRunEngine(recordingMap.raw, recordingMap.events, () =>
1012
+ recordingMap.loadOrganization(),
1013
+ ),
1014
+ });
1015
+
1016
+ const flight = new VideoFlightEngine({
1017
+ map: client,
1018
+ plan: cameraPlanGenerators.overview(route, { targetDurationMs: 20_000 }),
1019
+ });
1020
+ flight.setRoute(route);
1021
+
1022
+ const result = await flight.record();
1023
+ if (result.ok) {
1024
+ console.log(`flight.${result.extension}`, result.blob.size);
1025
+ }
1026
+
1027
+ flight.dispose();
1028
+ client.dispose();
1029
+ ```
1030
+
1031
+ A recording loads the optional `mediabunny` peer as it starts, and answers an outcome rather than
1032
+ rejecting. Every recording carries the Mountaya watermark unless the map's organization holds
1033
+ white label: `VideoRunEngine` reads the organization it is built with as a recording starts, and
1034
+ no option takes the mark off.
1035
+ `examples/elements-video` is the same flight as a page.
1036
+
1037
+ ## Following a collaboration stream
1038
+
1039
+ `CollabEngine` follows one itinerary's editor stream and hands every change to a dispatch of
1040
+ yours, by the tool name `tools` states for it. Its transport is `createCollabTransport` of
1041
+ `@mountaya/client/events`; a studio host passes `studioCollabTools` of `@mountaya/studio` as
1042
+ `tools`:
1043
+
1044
+ ```ts
1045
+ import { createCollabTransport } from "@mountaya/client/events";
1046
+ import { CollabEngine, type CollabDispatch, type CollabTools } from "@mountaya/elements/collab";
1047
+
1048
+ declare const tools: CollabTools;
1049
+ declare const apply: (name: string, input: unknown) => void;
1050
+ // Whether the signed-in member holds a write role in the organization that owns the itinerary.
1051
+ declare const holdsWriteRole: () => boolean;
1052
+
1053
+ const bus: CollabDispatch<{ viewer: { getUserId(): string | null } }> = {
1054
+ dispatchUnsafe: (_context, name, input) => apply(name, input),
1055
+ };
1056
+
1057
+ const session = new CollabEngine({
1058
+ bus,
1059
+ canEdit: holdsWriteRole,
1060
+ ctx: { viewer: { getUserId: () => "user_123" } },
1061
+ onError: (error) => console.error("The collaboration stream stopped.", error),
1062
+ resource: { id: "itinerary_123", kind: "itineraries" },
1063
+ tools,
1064
+ transport: createCollabTransport(mountaya.transport),
1065
+ });
1066
+
1067
+ session.start();
1068
+ // On the way out:
1069
+ session.dispose();
1070
+ ```
1071
+
1072
+ The API re-checks an open stream's access. A stream it ends for a member who lost access reaches
1073
+ `onError` once its reopen is refused, and the session reads no more. A member who only watches
1074
+ is refused every signal with a 403, a selection as much as a lock, so `canEdit` answers whether
1075
+ the member holds a write role, and while it answers false the session sends nothing and
1076
+ `acquireLock` rejects without asking, with a `MountayaElementsForbiddenError`: report it as you
1077
+ report the API's 403 for the same lock. A member who loses the write role mid-session keeps
1078
+ watching: a lock or draft signal already on its way is refused, which reaches `onEditRefused`
1079
+ with the entity the signal named, so you close the edit that can no longer be saved.
1080
+
1081
+ A release that rejects for want of an answer, or on a fault of the server's, is asked again in
1082
+ the background until the API lets the lock go, so do not repeat a rejected `releaseLock`
1083
+ yourself. An acquire that rejects the same way may have taken the lock, and is given back the
1084
+ same way.
1085
+
1086
+ ## Driving a co-pilot run
1087
+
1088
+ `AgentEngine` starts an agent run, reads its stream, and answers the tools the model calls
1089
+ through a dispatcher of yours: `manifest` lists what the model may call and `dispatchFromModel`
1090
+ runs one. Its transport is `createAgentTransport` of `@mountaya/client/events`:
1091
+
1092
+ ```ts
1093
+ import { createAgentTransport } from "@mountaya/client/events";
1094
+ import { AgentEngine, type ToolDispatcher } from "@mountaya/elements/agent";
1095
+
1096
+ const tools: ToolDispatcher<{ capabilities: ReadonlySet<string> }> = {
1097
+ dispatchFromModel: async (_context, name) => ({ ok: true, summary: `Ran ${name}` }),
1098
+ manifest: () => [],
1099
+ };
1100
+
1101
+ const engine = new AgentEngine({
1102
+ bus: tools,
1103
+ confirmServerTool: async ({ name }) => window.confirm(`Run ${name}?`),
1104
+ ctx: { capabilities: new Set<string>() },
1105
+ observer: {
1106
+ onMessage: (content) => console.log(content),
1107
+ onStateChange: (state) => console.log(state),
1108
+ },
1109
+ transport: createAgentTransport(mountaya.transport),
1110
+ });
1111
+
1112
+ // A start rejects when the run fails for good, and a send when no run is open: both report.
1113
+ const report = (error: unknown): void => console.error(error);
1114
+
1115
+ engine.start("Plan a loop around the lake", "org_123").catch(report);
1116
+ // Later, on the user's next message, and on the way out:
1117
+ engine.send("Make it shorter").catch(report);
1118
+ void engine.close().finally(() => engine.dispose());
1119
+ ```
1120
+
1121
+ ## Testing your own surfaces
1122
+
1123
+ `@mountaya/elements/testing` holds the doubles this package's own suites stand on.
1124
+ `createMapClientSpy` builds a map client whose every command is a spy of your test runner's, so a
1125
+ surface handed it is asserted by the commands it issued:
1126
+
1127
+ ```ts
1128
+ import { createMapClientSpy, createMountayaMapDouble } from "@mountaya/elements/testing";
1129
+ import { vi } from "vitest";
1130
+
1131
+ declare const fakeMap: Parameters<typeof createMountayaMapDouble>[0];
1132
+
1133
+ const client = createMapClientSpy(vi.fn);
1134
+ client.applyCursor("crosshair");
1135
+ // expect(client.applyCursor).toHaveBeenCalledWith("crosshair");
1136
+
1137
+ const double = createMountayaMapDouble(fakeMap, { client: mountaya });
1138
+ double.setLanguage("fr");
1139
+ ```
1140
+
1141
+ `createMountayaMapDouble` stands a `MountayaMap` over a fake MapLibre map: the layers, the
1142
+ slots and the language it models read and write the fake, and a member outside that slice throws
1143
+ a `MountayaElementsError` that names it. It models a map whose WebGL context is never lost: a
1144
+ style switch is handed to the fake at once. A suite that holds a lost context holds it on a real
1145
+ canvas.
1146
+
1147
+ ## Installing and bundling
1148
+
1149
+ `maplibre-gl` and `@mountaya/client` are optional peers: npm fetches neither unless the install
1150
+ line names it, and a map needs both. A peer is what keeps one copy of MapLibre in an
1151
+ application, so its workers answer and its `instanceof` holds; two copies fail as a worker that
1152
+ never answers rather than as an error.
1153
+
1154
+ The tile worker needs no configuration. MapLibre 6 loads its worker from an address it derives
1155
+ from its own module, which after bundling names a file the build never wrote. This package
1156
+ publishes the worker and points MapLibre at it unless `setWorkerUrl` was called first, which is
1157
+ how you run your own copy.
1158
+
1159
+ The renderer stays out of every entry that does not draw: every subpath except `./editor`,
1160
+ `./testing`, `./video` and `./view` is renderer-free, in its JavaScript and in its
1161
+ declarations, so a worker computing bounds or a server deciding a layer's paint fetches no
1162
+ WebGL. `./style` is the one exception in the declarations: its builders return MapLibre's style
1163
+ objects, so type-checking it needs `maplibre-gl` installed. `./map-client`
1164
+ publishes types alone. The other optional peers are reached by the entries that need them and by
1165
+ no other:
1166
+
1167
+ | Optional peer | Reached by | Resolved |
1168
+ | --- | --- | --- |
1169
+ | `maplibre-gl` | the package root, `./editor`, `./testing`, `./video`, `./view` | when the entry is imported |
1170
+ | `terra-draw`, `terra-draw-maplibre-gl-adapter` | `./editor` | when the entry is imported |
1171
+ | `@maplibre/maplibre-gl-directions` | `./editor` | when the entry is imported |
1172
+ | `mediabunny` | `./video` | when a recording starts |
1173
+
1174
+ "When the entry is imported" means the entry's bundle names the peer at its top, so the peer is
1175
+ installed or the build fails. `./video` asks for `mediabunny` with `import()` as a recording
1176
+ starts, and a recorder handed its own `encoderFactory` never asks. `./view` publishes
1177
+ `MapLibreViewClient`, the map client with no edit engine, so a host that shows a map installs
1178
+ none of the editor's peers, and `./video` publishes it again beside the flight it drives;
1179
+ `./editor` publishes `MapLibreClient`, the same class with its edit engines.
1180
+
1181
+ In development the package warns once on the console for three setups that build, report ready and
1182
+ throw nothing: a worker address no bundler resolved, a map whose stylesheet is not loaded, and a
1183
+ container with no height or width. Each warning is a probe that reads a fact the browser holds and
1184
+ makes no request, so it proves nothing about a setup it does not recognise: a worker address a
1185
+ bundler rewrote that your server does not answer, a page that positions the map's canvas absolutely
1186
+ by a rule of its own, a container hidden as the map loads (a closed dialog, a tab panel not shown)
1187
+ and shown later with no size, and a production build served where no `process` exists and whose
1188
+ bundler writes nothing over `process.env.NODE_ENV`, which is read as development. `inDevelopment` is
1189
+ that reading, published for a package above this one.
1190
+
1191
+ ## Troubleshooting
1192
+
1193
+ ### The map mounts and draws no tile, with nothing thrown
1194
+
1195
+ MapLibre parses tiles in a worker, and this package points it at the worker file it publishes,
1196
+ by an address a bundler is expected to resolve. Where nothing resolves it, the browser asks your
1197
+ own server for an address it does not serve, and the map waits on a worker that never answers.
1198
+ In development the console says so once and names the address. Vite resolves it, and so do
1199
+ both of Next.js's bundlers, which is how `examples/studio-vite`, `examples/elements-video` and
1200
+ `examples/next-app` build. The package's files served as they are published, from a CDN, need
1201
+ nothing: the worker is beside them. For a build that does not resolve it, serve
1202
+ `@mountaya/elements/maplibre-worker.mjs` from an address of your own and pass that address to
1203
+ MapLibre's `setWorkerUrl` before the first map is built.
1204
+
1205
+ ### The canvas, the attribution or a popup is laid out wrongly
1206
+
1207
+ The map's stylesheet is not loaded. It is what places the canvas inside its container, so
1208
+ without it the canvas sits in the document's flow, the attribution is unstyled and a popup
1209
+ renders as an unpositioned block. Import `@mountaya/elements/styles.css` once. The
1210
+ `styles.css` of `@mountaya/elements-react` and of `@mountaya/studio-react` each contain it, so
1211
+ an application that imports one of those imports nothing more. In development the console says
1212
+ so once the map has loaded.
1213
+
1214
+ ### The base map never arrives, or tiles stop arriving
1215
+
1216
+ The API refused one of the map's own requests, or one failed, and no call of yours rejects for
1217
+ it. A refusal is an `accessrequired` event with the status and the address: a `401` for a
1218
+ session token that expired or a key the API does not know, a `402` for an entitlement the
1219
+ agreement does not include ([talk to us](https://mountaya.com/en/contact/) to add one), a `403`
1220
+ for a resource the credential may not read. Every other failure is an `error` event. Attach both as
1221
+ soon as the map is built ([What a map reports](#what-a-map-reports)): the layers manifest is
1222
+ read before the style loads, and an event emitted while no handler is attached is not kept.
1223
+ A 402 on the manifest (`GET /v1/tile-layers` on the Tile API) means the organization's agreement
1224
+ does not include the Tile API, and a 403 that the key lacks `tiles`, or that the page is not one
1225
+ of the organization's allowed domains. The API accepts a publishable key from a browser only on a
1226
+ listed site, so a 403 on every request of a page names the page: list its host under
1227
+ **Organization → Security** in the Mountaya app, and `localhost` with its port, such as
1228
+ `localhost:5173`, while you develop. Under an agreement, Mountaya lists the sites, so
1229
+ [tell us](https://mountaya.com/en/contact/) each host, and an owner or admin adds
1230
+ `localhost` entries there themself.
1231
+
1232
+ ### A build cannot resolve `terra-draw`, `@maplibre/maplibre-gl-directions` or `maplibre-gl`
1233
+
1234
+ The application imports an entry whose bundle names that package, and the package is an
1235
+ optional peer, which npm does not fetch unasked. The table of optional peers under
1236
+ [Installing and bundling](#installing-and-bundling) says which entry reaches which peer: install
1237
+ the peers of the entries you import. An
1238
+ application that draws nothing imports the renderer-free entries (`./geo`, `./profile`,
1239
+ `./units` and the rest) and installs none of them. One that shows a map and never edits it takes
1240
+ its map client from `./view` rather than `./editor`, and installs `maplibre-gl` alone.
1241
+
1242
+ ### A type-check with `skipLibCheck: false` cannot find `@mountaya/client`
1243
+
1244
+ An entry whose declarations take wire types takes them from `@mountaya/client`: the itinerary
1245
+ a profile reads, the locales a name is localized from, the shapes a search answers. The client
1246
+ is an optional peer of this package, which npm does not fetch unasked, and with
1247
+ `skipLibCheck: false` your compiler reads those declarations and reports the module it cannot
1248
+ find. Install `@mountaya/client` at this package's version. Every one of those imports is
1249
+ type-only, so none of the client reaches your bundle.
1250
+
1251
+ ### A type-check with `skipLibCheck: false` cannot find `HTMLElement`
1252
+
1253
+ `./map-client`, the one renderer-free entry that reaches the map's shared types, names one DOM
1254
+ type in its declarations: a marker's `render` answers the element a host builds, an
1255
+ `HTMLElement`. With
1256
+ `skipLibCheck: false` your compiler reads those declarations, and a program whose `lib` names
1257
+ no DOM library, as a Node service's does, reports the name it cannot find. Add `"DOM"` to
1258
+ `lib` in that program's `tsconfig.json`.
1259
+
1260
+ ### A tile request leaves with no credential, or with one you did not expect
1261
+
1262
+ The transform attaches a credential to the requests it claims and to no other, and it claims by
1263
+ origin and path, both parsed. A tile source on another host, or under a sibling path of the
1264
+ tile-API base, is not claimed and leaves as MapLibre wrote it. Read the claim off the client:
1265
+ `baseUrls.tiles` is the base the map hands the transform, and a map on a hand-built
1266
+ `transformRequest` claims what its `origins` and `baseUrls` say. A claimed request that should
1267
+ carry the page's session cookie needs a credential that asks for it, the client's cookie
1268
+ credential or `cookie: true` on a hand-built transform: every other sends
1269
+ `credentials: "omit"`, whatever a transform chained through `next` stated.
1270
+
1271
+ A base written as a path or as `""` claims requests on the page's own origin and no other. On a
1272
+ page whose `<base>` element names another host, and in a frame at `about:blank`, a relative
1273
+ request leaves for a host the page's address does not name: write the base as an absolute URL
1274
+ there.
1275
+
1276
+ ### A recording resolves with no `blob` and an `error` naming `mediabunny`
1277
+
1278
+ A recording never rejects: a run that fails resolves a result with `blob: null`,
1279
+ `cancelled: false` and the `error` it stopped on, and here that `error` is a
1280
+ `MountayaElementsError`. `./video` asks for its muxer as a recording starts, and `mediabunny`
1281
+ is not installed. Install it, or pass the recorder an `encoderFactory` of your own.
1282
+
1283
+ ### A recording resolves `cancelled: true` with `reason: "unavailable"`
1284
+
1285
+ Nobody cancelled it: the run could not start. A recording reads frames off the map's own
1286
+ canvas, so it needs a pose to fly, a canvas of the minimum size, a 2D context to draw the
1287
+ overlay on and a first frame that is not black. A black first frame is a map built without a
1288
+ preserved drawing buffer: construct it with
1289
+ `maplibre: { canvasContextAttributes: { preserveDrawingBuffer: true } }`. `recordPoses` states
1290
+ the reason beside `cancelled: true`, `VideoFlightEngine.record()` answers
1291
+ `{ ok: false, reason: "unavailable" }`, and a cancel states no reason.
1292
+
1293
+ ### A recording goes out with no brand mark
1294
+
1295
+ The mark is an SVG `data:` URI, and a Content-Security-Policy whose `img-src` omits
1296
+ `data:` blocks it: the recorder cannot load the image and records without it. Add `data:` to
1297
+ `img-src`.
1298
+
1299
+ ### A type-check rejects `import "@mountaya/elements/styles.css"` with `TS2882`
1300
+
1301
+ TypeScript checks a side-effect import, and has no declaration for a stylesheet. Vite and Next.js
1302
+ declare one for the application; an application bundled by esbuild alone, or by another bundler
1303
+ that ships no such declaration, states it in a `.d.ts` file of its own:
1304
+ `declare module "*.css";`.
1305
+
1306
+ ### A type-check rejects `placesToGeoJson` as a GeoJSON source's `data`
1307
+
1308
+ `placesToGeoJson`, `poisToGeoJson` and `matrixToGeoJson` answer a feature for every datum, and
1309
+ one whose point names no place carries no geometry, as RFC 7946 allows, so the geometry they type
1310
+ admits `null`. MapLibre's `GeoJSON.GeoJSON` type takes no feature without a geometry, and its
1311
+ renderer draws nothing for one. Hand the source the features that have a geometry, each still
1312
+ carrying its `mtyaIndex`: for places,
1313
+ `features.filter((feature): feature is Feature<Point> => feature.geometry !== null)`.
1314
+
1315
+ ### `npm install` fails with `ERESOLVE`
1316
+
1317
+ A peer cannot be satisfied by a single version. `@mountaya/client` is pinned to this package's
1318
+ own version, since every `@mountaya/*` package is published together at one version: install
1319
+ them all at the same one. `maplibre-gl` is a range, and a second package asking for a release
1320
+ outside it (or a `maplibre-gl` you pinned yourself) fails the same way. That failure is the
1321
+ guarantee working: two copies of the renderer would install cleanly and then fail as a worker
1322
+ that never answers.
1323
+
1324
+ ## Exports
1325
+
1326
+ Each table is one entry point, and every name in it is imported from that entry point; the first
1327
+ column says where the package declares it, not a second import path. The subpaths the root does
1328
+ not mirror are opt-in: the root publishes none of their names.
1329
+
1330
+ <!-- exports:start -->
1331
+
1332
+ <!-- Generated by scripts/generate-readme-exports.mjs. Run `npm run generate:readme`. -->
1333
+
1334
+ #### `@mountaya/elements`
1335
+
1336
+ The root also publishes every export of `@mountaya/elements/data`, `@mountaya/elements/errors`, `@mountaya/elements/geo`, `@mountaya/elements/icons`, `@mountaya/elements/layers`, `@mountaya/elements/profile`, `@mountaya/elements/seams`, `@mountaya/elements/search`, `@mountaya/elements/style` and `@mountaya/elements/units`, listed under their own headings.
1337
+
1338
+ | Declared under | Values | Types |
1339
+ | --- | --- | --- |
1340
+ | engines | `CURSOR_LOCK_DATA_ATTRIBUTE`, `EDIT_CROSS_CURSOR`, `EDIT_GRAB_CURSOR`, `EDIT_GRABBING_CURSOR`, `EDIT_MOVE_CURSOR`, `MapEventEngine`, `MountayaMap`, `STREETVIEW_COVERAGE_LAYER`, `STREETVIEW_COVERAGE_SOURCE`, `STREETVIEW_COVERAGE_TILES`, `ZONE_CREATE_CURSOR`, `ZOOM_EASE_MS` | `MapEvents` |
1341
+ | rules | `appendGlyph`, `beforeIdForRank`, `createTransformRequest`, `currentMapHash`, `ensureMapLibreWorker`, `inDevelopment` | `AnalysisHandle`, `AnalysisId`, `BoundaryDraft`, `BoundaryEditOptions`, `Camera`, `CameraConstraints`, `CameraPose`, `CategoryOverlays`, `CollectionDrawOptions`, `DataActivitySlug`, `DataLanguage`, `DataRangeType`, `DirectionsInput`, `DraftPhase`, `DrawOptions`, `FitBoundsOptions`, `GeocodeInput`, `GeometrySlot`, `IsochronesInput`, `ItineraryDrawOptions`, `LayerPatch`, `Layers`, `MapCredential`, `MapLibreOptions`, `MarkerOptions`, `MatrixDrawOptions`, `MatrixInput`, `MatrixMetric`, `MountayaMapEvent`, `MountayaMapEvents`, `MountayaMapOptions`, `MountedSpecification`, `MountOptions`, `Overlay`, `PoiCategory`, `PoisInput`, `QueriedFeature`, `RasterPaint`, `RawMap`, `Renderable`, `RequestTransform`, `RouteHazard`, `SearchInput`, `SearchTargetsInput`, `SegmentDraft`, `SegmentEditOptions`, `SegmentViaPromptEvent`, `SuggestionDrawOptions`, `SuggestionsInput`, `Terrain`, `TerrainVariant`, `TileLayer`, `TileSource`, `TileSourceType`, `TransformedRequest`, `TransformRequestOptions`, `Unsubscribe`, `WaypointDraftSnapshot`, `WaypointEditOptions`, `WaypointEngineDraftChange`, `WaypointPoiCapture`, `WaypointPoiSeed`, `ZoneDraft`, `ZoneEditOptions`, `ZoomRange` |
1342
+ | `@mountaya/client` | none | `DirectionsResult`, `GeocodeResult`, `IsochronesResult`, `MatrixResult`, `PoisResult`, `SearchResult`, `SuggestionsResult` |
1343
+ | `maplibre-gl` | `maplibregl` | none |
1344
+
1345
+ #### `@mountaya/elements/agent`
1346
+
1347
+ | Declared under | Values | Types |
1348
+ | --- | --- | --- |
1349
+ | engines | `AgentEngine` | `AgentEngineConfig`, `AgentEngineState`, `AgentObserver`, `AgentStreamPosition`, `ServerToolConfirmation`, `ToolActivityOutcome` |
1350
+ | rules | `accumulateAssistant`, `answerQuestionEntry`, `appendActivityEntry`, `appendErrorEntry`, `appendQuestionEntry`, `appendSuggestionsEntry`, `appendUserEntry`, `appendWarningEntry`, `boundedInputJson`, `buildToolResultPayload`, `chooseSuggestionEntry`, `createAgentScriptedTransport`, `createConversationFaults`, `createConversationHost`, `isPinnedToBottom`, `MAX_TOOL_INPUT_CHARS`, `MAX_TOOL_RESULT_DATA_BYTES`, `mintEntryId`, `replaceAssistant`, `resolveAgentError`, `settleActivityEntry`, `settleOpenQuestionEntries`, `settleOpenSuggestionEntries`, `STICK_TO_BOTTOM_THRESHOLD_PX`, `toWireErrorCode` | `ActivityEntry`, `ActivityStatus`, `AgentBudgetCopy`, `AgentDraftWarning`, `AgentErrorCopy`, `AgentScriptedTransport`, `AgentToolContext`, `AssistantTurn`, `ConversationFaultCopy`, `ConversationFaults`, `ConversationFaultsConfig`, `ConversationHost`, `ConversationHostConfig`, `ConversationState`, `ConversationWriter`, `MessageEntry`, `PendingConfirmation`, `QuestionEntry`, `QuestionOption`, `RecoveryLookup`, `ScrollViewportGeometry`, `StateDelta`, `SuggestionCardCandidate`, `SuggestionsEntry`, `ToolDispatcher`, `ToolDispatchResult`, `ToolManifestEntry`, `ToolResultPayload`, `TranscriptEntry`, `TranscriptRole`, `WarningEntry` |
1351
+
1352
+ #### `@mountaya/elements/camera`
1353
+
1354
+ | Declared under | Values | Types |
1355
+ | --- | --- | --- |
1356
+ | engines | `defaultVideoFlightProfile`, `VideoFlightEngine` | `VideoFlight`, `VideoFlightMap`, `VideoFlightOptions`, `VideoFlightOutcome`, `VideoFlightProfile`, `VideoFlightRecording`, `VideoFlightStatus` |
1357
+ | rules | `altitudeToZoom`, `aspectRatio`, `bearingDegBetween`, `BITRATE_MBPS_MAX`, `BITRATE_MBPS_MIN`, `bitrateForOutput`, `CAMERA_ASPECTS`, `CAMERA_BEARING_MODES`, `CAMERA_FPS`, `CAMERA_MODES`, `CAMERA_OUTPUT_FORMATS`, `CAMERA_RESOLUTIONS`, `cameraForBounds`, `cameraPlanGenerators`, `capturesSweptViewports`, `CINEMATIC_EYE_HEIGHT_METERS`, `clearanceStrideFor`, `createCameraPlan`, `cumulativeMeters`, `cursorAtFraction`, `DEFAULT_TARGET_DURATION_MS`, `DEFAULT_VIEWPORT_HEIGHT_PX`, `defaultCameraOutput`, `defaultCameraShot`, `elevationAtFraction`, `estimatedVideoSizeMb`, `generateChasePlan`, `generateCinematicPlan`, `generateDronePlan`, `generateHelicopterPlan`, `generateOverviewPlan`, `generateSmartPlan`, `groundMetersPerPixel`, `insertShotSorted`, `itineraryToRouteGeometry`, `measuredCameraPlanner`, `modeEyeHeightMeters`, `neutralDirectorPlan`, `planDurationMs`, `POINT_ZOOM`, `pointAtMeters`, `posePlanSignature`, `PROFILE_DESIGNS`, `QUALITY_TIERS`, `representativeStillFraction`, `resolveCameraTrack`, `resolveClearanceAdjustments`, `resolveFrameProgressions`, `resolveProfileSamples`, `resolveRouteMarkers`, `routeLengthMeters`, `sameRouteContent`, `slopeDegAtFraction`, `suggestVideoLengthMs`, `synchronousCameraPlanner`, `tangentBearingAtMeters`, `VIDEO_PRESETS_AVAILABLE`, `VIDEO_RECORDING_PHASES`, `videoPresets`, `viewportGroundSpanMeters`, `zoomControlsDisabled`, `zoomLimitReached`, `zoomToAltitude` | `BoundingBox`, `BoundsCamera`, `BoundsCameraOptions`, `CameraAspect`, `CameraBearingMode`, `CameraFps`, `CameraMode`, `CameraOutput`, `CameraOutputFormat`, `CameraPlan`, `CameraPlanGenerator`, `CameraPlanInput`, `CameraPlanner`, `CameraResolution`, `CameraShot`, `ClearanceAdjustment`, `ClearanceFrame`, `ClearanceOptions`, `GeneratorParams`, `LngLat`, `ProfileDesign`, `ProfileSample`, `ProfileSource`, `Quality`, `RecordingCamera`, `RecordOutput`, `RecordProfile`, `RouteCursor`, `RouteGeometry`, `SegmentSpan`, `ShotCamera`, `TerrainSampler`, `UnitFormatOptions`, `VideoPreset`, `VideoPresetTemplate`, `VideoProgress`, `VideoRecordingPhase`, `VideoRecordingResult`, `ZoomLimitReached` |
1358
+
1359
+ #### `@mountaya/elements/collab`
1360
+
1361
+ | Declared under | Values | Types |
1362
+ | --- | --- | --- |
1363
+ | engines | `CollabEngine`, `CollabListEngine`, `LIVE_SEGMENT_THROTTLE_MS`, `TrailingThrottle` | `CollabEngineConfig`, `CollabListEngineConfig`, `TrailingThrottleOptions` |
1364
+ | rules | `COLLAB_RESOURCE_KINDS`, `createCollabScriptedTransport`, `emailLocalPart`, `peerDraftInitials` | `CollabApplyInput`, `CollabContext`, `CollabDispatch`, `CollabListTools`, `CollabResourceKind`, `CollabResourceRef`, `CollabScriptedTransport`, `CollabTools`, `PeerNameResolver`, `RecordedSignal`, `RecordedSubscribe`, `SignalResponder` |
1365
+
1366
+ #### `@mountaya/elements/data`
1367
+
1368
+ | Declared under | Values | Types |
1369
+ | --- | --- | --- |
1370
+ | engines | `invalidateItineraryResource`, `ItineraryResourceEngine` | `ItineraryResource`, `ItineraryResourceEngineOptions` |
1371
+ | rules | `applySegmentGroups`, `fetchItinerary`, `groupIdForSegment`, `itineraryCharacteristics`, `itineraryGeometry`, `itinerarySegments`, `itineraryWaypoint`, `itineraryWaypoints`, `maxOrNull`, `minOrNull`, `ROAD_ACCESS_KINDS`, `roadAccessFeatures`, `roadAccessKindOf`, `SEGMENT_EDIT_MODES`, `SEGMENT_GROUP_ID_PREFIX`, `SEGMENT_GROUP_MIN_MEMBERS`, `segmentGeometries`, `segmentGroupOptionId`, `segmentIdsForOption`, `segmentsForSelection`, `sumOrNull`, `WAYPOINT_EDIT_MODES`, `waypointGeometries`, `waypointsForSelection`, `ZONE_LEVELS`, `ZONE_MODES` | `FetchItineraryOptions`, `ItineraryCharacteristics`, `ItinerarySegment`, `ItinerarySegmentGroup`, `ItinerarySegmentInput`, `ItinerarySource`, `ItineraryWaypoint`, `ItineraryWithDetails`, `ProfileCharacteristics`, `ProfileInput`, `RoadAccessKind`, `SegmentEditMode`, `Waypoint`, `WaypointEditMode`, `ZoneLevel`, `ZoneMode` |
1372
+
1373
+ #### `@mountaya/elements/editor`
1374
+
1375
+ | Declared under | Values | Types |
1376
+ | --- | --- | --- |
1377
+ | engines | `MapLibreClient` | `MapLibreClientOptions` |
1378
+ | rules | `blankStyle`, `SEGMENT_ROUTE_REFUSED`, `ZONE_LEVELS`, `ZONE_MODES` | `BaseTerrainConfig`, `BoundaryDraft`, `BoundaryEditOptions`, `BoundingBox`, `ContextMenuZone`, `DraftPhase`, `FeatureHit`, `FeatureHoverHandlers`, `FeatureSubscriptionOptions`, `FitBoundsPadding`, `GeolocateResult`, `ItineraryEmphasis`, `ItineraryExclusions`, `ItineraryPreviewLine`, `ItineraryPreviewRender`, `ItineraryPreviewWaypoint`, `MapClient`, `MapConstraints`, `MapContextMenuEvent`, `MapPointerMove`, `MapViewport`, `MapViewportChange`, `OverlayFeature`, `OverlayZoomRange`, `PeerDraftEntity`, `PeerDraftKind`, `PoiInfo`, `PointPickChange`, `PointPickOptions`, `ProfileMarkerIcon`, `RecordingCamera`, `RecordOutput`, `RecordProfile`, `SearchHighlight`, `SegmentAnalyzeFn`, `SegmentDraft`, `SegmentEditMode`, `SegmentEditOptions`, `SegmentRoute`, `SegmentRouteAnalysis`, `SegmentRouteAnalysisEntry`, `SegmentRouteElevation`, `SegmentRouteFn`, `SegmentRouteOptions`, `SegmentRouteResult`, `SegmentViaPromptEvent`, `TileRequest`, `TileRequestTransform`, `VideoProgress`, `VideoRecordingPhase`, `VideoRecordingResult`, `VideoSeam`, `WaypointCursorOptions`, `WaypointDraftSnapshot`, `WaypointEditMode`, `WaypointEditOptions`, `WaypointEngineDraftChange`, `WaypointPoiCapture`, `ZoneDraft`, `ZoneEditOptions`, `ZoneLevel`, `ZoneMode` |
1379
+
1380
+ #### `@mountaya/elements/errors`
1381
+
1382
+ | Declared under | Values | Types |
1383
+ | --- | --- | --- |
1384
+ | rules | `errorFrom`, `MountayaElementsError`, `MountayaElementsForbiddenError`, `MountayaElementsNotFoundError`, `MountayaElementsRejectionError` | none |
1385
+
1386
+ #### `@mountaya/elements/geo`
1387
+
1388
+ | Declared under | Values | Types |
1389
+ | --- | --- | --- |
1390
+ | rules | `aspectCardinal`, `boundaryToBoundingBox`, `boundingBoxSpanMeters`, `boundingBoxToBoundary`, `boundingBoxToPolygon`, `boundsOf`, `boundsTuple`, `boundsWithPixelPadding`, `buildGeometryCollection`, `buildSegmentGeometry`, `decodeElevation`, `DIRECTIONS_VIA_COUNTER_THRESHOLD`, `DIRECTIONS_VIA_MAX`, `DIRECTIONS_VIA_MIN`, `distanceToSegmentMeters`, `EARTH_RADIUS_METERS`, `EFFECTIVE_MIN_ZOOM_FLOOR`, `EFFECTIVE_ZOOM_MIN_SPAN`, `effectiveZoomBounds`, `elevationTilesAt`, `extractLines`, `extractLineStrings`, `extractPoint`, `extractVias`, `flattenGeometries`, `formatLngLat`, `geometriesEqual`, `haversineMeters`, `LATITUDE_LIMIT`, `LONGITUDE_LIMIT`, `longitudeDelta`, `MAX_BOUNDS_MIN_PAD_DEG`, `MAX_BOUNDS_PAD_FRACTION`, `maxBoundsLongitudes`, `metersToRoute`, `normalizeBoundingBox`, `paddedMaxBounds`, `pointTuple`, `routeLines`, `SEARCH_LIMIT_MAX`, `SEGMENT_MIN_VIAS`, `segmentLineCoordinates`, `selectBoundary`, `slopeAspectFromNeighbours`, `specificationBounds`, `terrainFromElevationTiles`, `TILE_ZOOM_MAX`, `TILE_ZOOM_MIN`, `viewportBoundsFrom`, `WEB_MERCATOR_MAX_LAT`, `wrapLongitude`, `wrapLongitudePastRange`, `ZOOM_BUFFER` | `AspectCardinal`, `BoundingBox`, `ElevationEncoding`, `ElevationSource`, `ElevationTile`, `FitBoundsPadding`, `LngLat`, `MapViewport`, `SlopeAspect`, `TerrainNeighbours`, `TerrainReading`, `ZoomBounds` |
1391
+
1392
+ #### `@mountaya/elements/i18n`
1393
+
1394
+ | Declared under | Values | Types |
1395
+ | --- | --- | --- |
1396
+ | rules | `clampMapLanguage`, `dataLanguageFor`, `elementsStrings`, `elementsStringsPartial`, `formatDate`, `formatDateRange`, `inheritsWords`, `isPerLanguage`, `languageEndonym`, `localizedName`, `MAP_LANGUAGES`, `mergeSection`, `resolveBundle`, `resolveElementsStrings`, `scopeOf`, `translatedLanguages`, `videoOverlayStringsFor` | `AmenityStrings`, `Bundle`, `BundleLanguageOverrides`, `BundleOverrides`, `CardStrings`, `ControlStrings`, `DataLanguage`, `ElementsScope`, `ElementsScopeStatement`, `ElementsStrings`, `ElementsStringsOverrides`, `LayersStrings`, `MapLanguage`, `MountayaI18n`, `PartialDeep`, `PartialElementsStrings`, `PoiStrings`, `PreferencesStrings`, `ProfileStrings`, `ReadoutStrings`, `SearchStrings`, `StreetViewStrings`, `TableStrings`, `TooltipStrings`, `Translations`, `VideoOverlayStrings`, `WatermarkStrings`, `WaypointStrings` |
1397
+
1398
+ #### `@mountaya/elements/i18n/fr`
1399
+
1400
+ | Declared under | Values | Types |
1401
+ | --- | --- | --- |
1402
+ | rules | `frElementsStrings` | none |
1403
+
1404
+ #### `@mountaya/elements/icons`
1405
+
1406
+ | Declared under | Values | Types |
1407
+ | --- | --- | --- |
1408
+ | rules | `ACTIVITY_MARKER_PREFIX`, `activityMarkerIcon`, `allowedAttributes`, `AMENITY_GLYPHS`, `amenityGlyph`, `createIconProvider`, `DEFAULT_WAYPOINT_COLOR`, `DEFAULT_WAYPOINT_ICON`, `fallbackProvider`, `glyphPaint`, `lucideIconProvider`, `lucideUiIconProvider`, `parseGlyph`, `placeGlyph`, `UI_GLYPHS`, `USER_WAYPOINT_ICONS`, `watermarkArtwork`, `WAYPOINT_AMENITIES`, `WAYPOINT_AMENITY_GROUPS`, `WAYPOINT_FALLBACK_GLYPH`, `WAYPOINT_GLYPHS`, `WAYPOINT_ICON_GROUPS`, `WAYPOINT_ICON_PREFIX`, `WAYPOINT_PROPERTY_FORMATS`, `waypointIconImageId` | `AmenityGlyph`, `Artwork`, `GlyphElement`, `GlyphPaint`, `IconProvider`, `IconProviderOptions`, `ShapePaint`, `UiGlyph`, `UserWaypointIcon`, `WaypointAmenity`, `WaypointAmenityGroupId`, `WaypointGlyph`, `WaypointIconGroupId`, `WaypointPropertyFormat` |
1409
+
1410
+ #### `@mountaya/elements/layers`
1411
+
1412
+ | Declared under | Values | Types |
1413
+ | --- | --- | --- |
1414
+ | engines | `LayersSelectionEngine`, `ReadoutEngine` | `LayersSelectionEngineOptions`, `LayersSelectionSnapshot`, `LayersSelectionTarget`, `ReadoutEngineOptions`, `ReadoutOpen` |
1415
+ | rules | `analysisProps`, `DIRECTIONS_LINE_COLOR`, `directionsToGeoJson`, `ENRICHMENT_CATEGORY_SLUG`, `findOverlay`, `hoveredItinerary`, `isEnrichmentCategory`, `isItineraryCasingLayer`, `ISOCHRONE_FILL_OPACITY`, `ISOCHRONE_LINE_COLOR`, `ISOCHRONE_LINE_WIDTH`, `ISOCHRONE_RAMP`, `isochroneColor`, `isochronesToGeoJson`, `ITINERARY_CASING_COLOR`, `ITINERARY_CASING_LAYER_SUFFIX`, `ITINERARY_CASING_OPACITY`, `ITINERARY_CASING_WIDTH_STOPS`, `ITINERARY_DASHED_OPACITY`, `ITINERARY_ENDPOINT_ICONS`, `ITINERARY_LINE_DASHARRAY`, `ITINERARY_LINE_SOURCE_LAYER`, `ITINERARY_LINE_WIDTH_STOPS`, `ITINERARY_POINT_SOURCE_LAYER`, `ITINERARY_RESTRICTION_SOURCE_LAYER`, `itineraryLineLayout`, `LayerRank`, `layersPanelPress`, `layersPanelSections`, `MATRIX_LINE_COLOR`, `MATRIX_LINE_MAX_WIDTH`, `MATRIX_LINE_MIN_WIDTH`, `MATRIX_LINE_OPACITY`, `matrixLineWidth`, `matrixToGeoJson`, `omtCategoryToPoiEnum`, `overlayInstant`, `paintZoomRange`, `PLACE_POINT_COLOR`, `placesToGeoJson`, `POI_RESULT_POINT_COLOR`, `POI_SOURCE_LAYER_NAMES`, `poiCategoryStyles`, `poiPanelNoteZoom`, `poiPanelRows`, `POIS_OVERLAY_SLUG`, `poiSourceLayers`, `poisToGeoJson`, `rankForTileLayer`, `readoutRows`, `RESULT_POINT_RADIUS`, `RESULT_POINT_STROKE_COLOR`, `RESULT_POINT_STROKE_WIDTH`, `roadAccessIconLayerIdOf`, `STREETVIEW_MIN_ZOOM`, `SUGGESTION_ALTERNATIVE_COLOR`, `SUGGESTION_ALTERNATIVE_DASHARRAY`, `SUGGESTION_ALTERNATIVE_OPACITY`, `SUGGESTION_CHOSEN_COLOR`, `suggestionsToGeoJson`, `tileSourceLayerRanks`, `TIME_WINDOW_FUTURE_HOURS`, `TIME_WINDOW_PAST_HOURS`, `timeSliderReadout`, `timeSliderRelease`, `timeSliderTicks`, `timeSliderWindow`, `timestampedSources`, `ZONE_DEFAULT_COLOR`, `ZONE_FILL_SOURCE_LAYER`, `zoneLevelColors`, `zoomIntoRange` | `HoveredItinerary`, `LayersPanelCategory`, `LayersPanelChoice`, `LayersPanelInput`, `LayersPanelPress`, `LayersPanelRow`, `LayersPanelSection`, `OverlayKind`, `PaintedLayers`, `PoiCategoryStyle`, `PoiPanelRow`, `PoiPanelRows`, `PoiPanelRowsInput`, `ReadoutCategoryLabel`, `ReadoutInput`, `ReadoutMeasure`, `ReadoutReading`, `ReadoutRow`, `TimeSliderReadout`, `TimeSliderTick`, `TimeSliderWindow`, `TimestampedSource` |
1416
+
1417
+ #### `@mountaya/elements/map-client`
1418
+
1419
+ | Declared under | Values | Types |
1420
+ | --- | --- | --- |
1421
+ | rules | none | `BaseTerrainConfig`, `BoundaryDraft`, `BoundaryEditOptions`, `BoundingBox`, `CameraPose`, `ContextMenuZone`, `DraftPhase`, `FeatureHit`, `FeatureHoverHandlers`, `FeatureSubscriptionOptions`, `FitBoundsPadding`, `GeolocateResult`, `ItineraryEmphasis`, `ItineraryExclusions`, `ItineraryPreviewLine`, `ItineraryPreviewRender`, `ItineraryPreviewWaypoint`, `MapClient`, `MapConstraints`, `MapContextMenuEvent`, `MapPointerMove`, `MapViewport`, `MapViewportChange`, `Overlay`, `OverlayFeature`, `OverlayZoomRange`, `PeerDraftEntity`, `PeerDraftKind`, `PoiInfo`, `PointPickChange`, `PointPickOptions`, `ProfileMarkerIcon`, `RecordingCamera`, `RecordOutput`, `RecordProfile`, `SearchHighlight`, `SegmentDraft`, `SegmentEditOptions`, `SegmentViaPromptEvent`, `TileRequest`, `TileRequestTransform`, `VideoProgress`, `VideoRecordingResult`, `VideoSeam`, `WaypointCursorOptions`, `WaypointDraftSnapshot`, `WaypointEditOptions`, `WaypointEngineDraftChange`, `ZoneDraft`, `ZoneEditOptions` |
1422
+
1423
+ #### `@mountaya/elements/navigation`
1424
+
1425
+ | Declared under | Values | Types |
1426
+ | --- | --- | --- |
1427
+ | engines | `NavigationEngine` | `NavigationEngineOptions`, `NavigationRouteSource`, `NavigationSnapshot` |
1428
+ | rules | `followedRouteOf`, `NAVIGATION_INSTRUCTION_KEYS`, `NAVIGATION_STATUSES`, `navigationProgressAt`, `readDirectionsSteps`, `readItineraryDirectionsSteps`, `readItineraryRoute`, `stepInstruction` | `FollowedRoute`, `LngLat`, `ManeuverType`, `NavigationInstruction`, `NavigationInstructionKey`, `NavigationProgress`, `NavigationRemainder`, `NavigationRoute`, `NavigationStatus`, `NavigationStep`, `NavigationStepsReading` |
1429
+
1430
+ #### `@mountaya/elements/profile`
1431
+
1432
+ | Declared under | Values | Types |
1433
+ | --- | --- | --- |
1434
+ | rules | `activePointAt`, `amenityFilter`, `amenityName`, `amenityStacks`, `anchoredDomain`, `ASCENT_RAMP_STOPS`, `badgeFallback`, `bandValueAt`, `buildElevationPoints`, `buildElevationSeries`, `buildInfoBands`, `buildSlices`, `carriesElevation`, `chainGeometry`, `clampRange`, `classAt`, `classifySteepness`, `clearIntlCache`, `CLIMB_CATEGORIES`, `climbAt`, `climbCategoryFor`, `committedPaceOf`, `cullCrowdedLabels`, `cumulativeElevation`, `CURSOR_MARKER_GLYPH`, `cursorMarkerIds`, `curveSpans`, `curveStops`, `dateTimeFormat`, `DEFAULT_AMENITY_STACK_MAX`, `DEFAULT_READOUT_STATS`, `DEFAULT_SECTION_CHIP_STATS`, `DEFAULT_SEGMENT_TABLE_COLUMNS`, `DEFAULT_STAT_STRIP_STATS`, `DEFAULT_WAYPOINT_TABLE_COLUMNS`, `defaultUnits`, `DESCENT_RAMP_STOPS`, `detectClimbs`, `displayNames`, `displayToKilometersPerHour`, `distanceForSlice`, `distanceTicks`, `distanceToFraction`, `distanceUnitFor`, `dividesRoute`, `domainTicks`, `downsampleElevation`, `durationForSpeed`, `ELEVATION_NOISE_THRESHOLD_METERS`, `elevationAt`, `elevationUnitFor`, `EMBED_FIT_BASE_MARGIN`, `EMBED_PROFILE_ANALYSIS_HEIGHT`, `EMBED_PROFILE_ANCHOR_INSET`, `EMBED_PROFILE_CHARACTERISTICS_HEIGHT`, `EMBED_PROFILE_PANEL_CHROME`, `EMBED_PROFILE_SECTION_GAP`, `embedFitPadding`, `estimateProfileHeight`, `formatAltitudeRange`, `formatDistance`, `formatDuration`, `formatElevation`, `formatHumidity`, `formatNavDistance`, `formatNumber`, `formatPaceClock`, `formatProportion`, `formatSlope`, `formatSnowDepth`, `formatSnowfall`, `formatSpeed`, `formattedInstant`, `formatTemperature`, `GRADE_WINDOW_METERS`, `gradeAt`, `haversineMeters`, `hideCursorMarker`, `HIT_SLICES`, `isSegmentRowLit`, `isWebAddress`, `itinerarySegmentRows`, `itineraryWaypointRows`, `kilometersPerHourToDisplay`, `lineBetween`, `litSegmentId`, `MARKER_BELONGING_METERS`, `MARKER_PROXIMITY_METERS`, `MAX_PROFILE_POINTS`, `MIN_RANGE_SPAN_METERS`, `nearestPointIndexAt`, `nearestRoutePointIndexAt`, `numberFormat`, `paceClockNumberToMinutes`, `paceMinutesToClockNumber`, `parseAscentToMeters`, `parseDistanceToMeters`, `parsePaceClock`, `parseSpeedToKmh`, `placeOnCurve`, `placeSpans`, `PROFILE_BASELINE`, `PROFILE_BOTTOM_INSET`, `PROFILE_CHART_HEIGHT`, `PROFILE_LABEL_COLUMN`, `PROFILE_PANEL_MIN_GAP`, `PROFILE_PLOT_RIGHT_INSET`, `PROFILE_TOP_INSET`, `PROFILE_VIEWBOX`, `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`, `SLICE_WIDTH`, `SLOPE_COLOR_STOPS`, `slopeColors`, `slopeRampColor`, `speedUnitFor`, `splitDuration`, `statStripCells`, `STEEPNESS_OVERLAY_SLUG`, `STEEPNESS_THRESHOLDS`, `surfaceColors`, `toggleAmenity`, `trailDifficultyRank`, `WAYPOINT_PROXIMITY_METERS`, `waypointCard`, `waypointContactRows`, `waypointDeclaresNothing`, `waypointHeadline`, `waypointMediaLinkIsLink`, `waypointMediaLinks`, `waypointMediaPhotos`, `waypointPropertyIsLink`, `waypointPropertyValue`, `waypointRowCell`, `waypointRowCursor`, `waypointSummary`, `waypointTimingRows`, `wayTypeColors`, `writeLegEmphasis` | `AmenityFilter`, `AmenityStack`, `AxisLabelBox`, `BadgeSurface`, `ClimbCategory`, `ClimbSpan`, `CumulativeElevation`, `CursorMarkerMap`, `CursorMarkerPin`, `CursorMarkerPoint`, `CurveColor`, `CurveStop`, `DistanceTick`, `DurationForSpeedInput`, `ElevationDomain`, `ElevationPoint`, `ElevationSeries`, `EmbedProfileSections`, `FitBoundsPadding`, `HitSlice`, `IndexedInfo`, `InfoBand`, `ItineraryCharacteristics`, `ItinerarySegmentInput`, `ItinerarySegmentRow`, `ItinerarySegmentRowMetrics`, `ItinerarySegmentRowOverride`, `ItineraryWaypointRow`, `ItineraryWaypointRowMetrics`, `LegEmphasisMap`, `MarkerToProject`, `MeasurementFormatOptions`, `PlacedCutoff`, `PlacedDivider`, `PlacedSpan`, `PlacedWaypoint`, `PlacedWaypointMark`, `PlaceOnCurveInput`, `PlaceOnCurveValue`, `ProfileAnchor`, `ProfileCharacteristics`, `ProfileClass`, `ProfileInput`, `ProfileRange`, `ProfileReadout`, `ProfileReadoutOptions`, `ProfileSpan`, `ProfileTotals`, `ProfileVisibility`, `ProfileVisibilityInput`, `ProjectedMarker`, `ReadoutCell`, `ReadoutStat`, `ResolvedCharacteristics`, `RouteProfilePoint`, `SectionChipCell`, `SectionChipStat`, `SegmentRowCell`, `SegmentTableColumn`, `SlopeColorStop`, `SlopeRampStop`, `StatStripCell`, `StatStripCursor`, `StatStripStat`, `SteepnessClass`, `TableCursor`, `UnitFormatOptions`, `Waypoint`, `WaypointAt`, `WaypointCardFacts`, `WaypointCardField`, `WaypointCardRow`, `WaypointCardService`, `WaypointCardStringsLike`, `WaypointContactDetail`, `WaypointContactRow`, `WaypointDetails`, `WaypointLinkDetail`, `WaypointMediaDetail`, `WaypointMediaLink`, `WaypointOn`, `WaypointPhotoDetail`, `WaypointProjection`, `WaypointPropertyDetail`, `WaypointPropertyFormatDetail`, `WaypointRowCell`, `WaypointRowCellOptions`, `WaypointTableColumn`, `WaypointTimingDetail` |
1435
+
1436
+ #### `@mountaya/elements/seams`
1437
+
1438
+ | Declared under | Values | Types |
1439
+ | --- | --- | --- |
1440
+ | engines | `GeolocateControlEngine` | `GeolocateControlEngineOptions`, `GeolocateControlSnapshot`, `GeolocateControlTarget` |
1441
+ | rules | `browserGeolocation`, `inertGeolocation`, `manualClock`, `repeatEvery`, `SEGMENT_ROUTE_REFUSED`, `systemClock` | `Clock`, `GeolocationFix`, `GeolocationFixOptions`, `GeolocationPermission`, `GeolocationSeam`, `SegmentAnalyzeFn`, `SegmentRoute`, `SegmentRouteAnalysis`, `SegmentRouteAnalysisEntry`, `SegmentRouteElevation`, `SegmentRouteFn`, `SegmentRouteOptions`, `SegmentRouteResult` |
1442
+
1443
+ #### `@mountaya/elements/search`
1444
+
1445
+ | Declared under | Values | Types |
1446
+ | --- | --- | --- |
1447
+ | engines | `SEARCH_DEBOUNCE_MS`, `SEARCH_TARGETS`, `SEARCH_VIEWPORT_REFRESH_MS`, `SearchEngine` | `SearchConfig`, `SearchEngineOptions`, `SearchFetch`, `SearchUnsubscribe`, `SearchViewport` |
1448
+ | rules | `collectionRow`, `createSearchViewport`, `describePlace`, `describePoi`, `describeWay`, `describeZone`, `everySectionEmpty`, `firstActiveSection`, `highlightRanges`, `itineraryRow`, `pickTarget`, `placeRow`, `placeTitle`, `poiRow`, `poiTitle`, `SEARCH_FILTERS`, `SEARCH_LIMIT_MAX`, `searchFilterTargets`, `searchListState`, `SECTION_ORDER`, `sectionHasRows`, `sectionsForFilter`, `shownSearchSnapshot`, `splitByRanges`, `unansweredSearchSnapshot`, `wayRow`, `wayTitle`, `zoneRow` | `BoundingBox`, `CollectionRow`, `DataZoneLevel`, `FailedSearchSection`, `HighlightPart`, `ItineraryRow`, `MapViewport`, `MatchedRange`, `PlaceRow`, `PoiRow`, `SearchCameraSource`, `SearchFilter`, `SearchHighlight`, `SearchLabel`, `SearchLabelResolver`, `SearchListState`, `SearchListStatus`, `SearchOwed`, `SearchPick`, `SearchPickCamera`, `SearchRow`, `SearchRowPayload`, `SearchRowPayloadCollection`, `SearchRowPayloadItinerary`, `SearchRowPayloadPlace`, `SearchRowPayloadPoi`, `SearchRowPayloadWay`, `SearchRowPayloadZone`, `SearchRowSecondary`, `SearchSection`, `SearchSectionState`, `SearchSnapshot`, `SearchTargetName`, `SearchWording`, `UnitFormatOptions`, `WayRow`, `ZoneRow` |
1449
+
1450
+ #### `@mountaya/elements/style`
1451
+
1452
+ | Declared under | Values | Types |
1453
+ | --- | --- | --- |
1454
+ | engines | `OrganizationReadEngine` | none |
1455
+ | rules | `applyLanguageToStyle`, `applySpecification`, `assignDistinctColors`, `BASEMAP_ATTRIBUTION`, `clampMapLanguage`, `DEFAULT_SEGMENT_COLOR`, `defaultMapPaint`, `itineraryCasingSpec`, `itineraryDashedLineSpec`, `itineraryLineSpec`, `languageEndonym`, `LIVELY_PALETTE`, `MAP_LANGUAGES`, `organizationWatermark`, `panelLayout`, `pickLivelyColor`, `removeSpecification`, `resolveMapPaint`, `roadAccessColors`, `roadAccessGlyph`, `segmentColorAt`, `tileLayerSpec`, `tileSourceSpec`, `zoomInterpolatedWidth` | `ApplySpecificationOptions`, `ItineraryLineOptions`, `LanguageStyleTarget`, `MapLanguage`, `MapPaint`, `MapPaintOverrides`, `OrganizationReadState`, `PanelFrame`, `PanelLayout`, `StyleTarget`, `TileSpecification`, `WatermarkPage`, `WatermarkPlacement` |
1456
+
1457
+ #### `@mountaya/elements/testing`
1458
+
1459
+ | Declared under | Values | Types |
1460
+ | --- | --- | --- |
1461
+ | testing | `activityCatalog`, `createMapClientSpy`, `createMapClientStub`, `createMountayaMapDouble`, `emptyLocales` | `ActivityCatalogEntry`, `MapFeatureHit`, `MountayaMapDoubleOptions`, `SpyFactory` |
1462
+
1463
+ #### `@mountaya/elements/timezone`
1464
+
1465
+ | Declared under | Values | Types |
1466
+ | --- | --- | --- |
1467
+ | rules | `timezoneViewport` | `MapViewport` |
1468
+
1469
+ #### `@mountaya/elements/units`
1470
+
1471
+ | Declared under | Values | Types |
1472
+ | --- | --- | --- |
1473
+ | rules | `convertDataSize`, `convertDuration`, `convertLength`, `convertProportion`, `convertSlope`, `convertSpeed`, `convertTemperature`, `DEGREES_PER_TURN`, `DEGREES_TO_RADIANS`, `isPaceUnit`, `METERS_PER_KILOMETER`, `MILLISECONDS_PER_SECOND`, `MINUTES_PER_HOUR`, `preferenceChoices`, `preferencePress`, `RADIANS_TO_DEGREES`, `SECONDS_PER_HOUR`, `SECONDS_PER_MINUTE`, `UNIT_LENGTHS`, `UNIT_PACES`, `UNIT_SLOPES`, `UNIT_TEMPERATURES` | `DataSizeUnit`, `DurationUnit`, `LengthUnit`, `PreferenceChoice`, `PreferenceField`, `PreferenceOption`, `PreferencePress`, `ProportionUnit`, `SlopeUnit`, `SpeedUnit`, `UnitLength`, `UnitPace`, `UnitSlope`, `UnitTemperature` |
1474
+
1475
+ #### `@mountaya/elements/video`
1476
+
1477
+ | Declared under | Values | Types |
1478
+ | --- | --- | --- |
1479
+ | engines | `buildVideoFocusMarkerElement`, `MapLibreViewClient`, `VideoRunEngine` | `MapLibreClientOptions` |
1480
+ | rules | `alongFlight`, `buildProfileCurve`, `createCanvasFrameCapture`, `createCanvasSurface`, `ensureOverlayFonts`, `MAX_TILE_CACHE_SIZE`, `OVERLAY_FONT_FAMILY`, `previewPoses`, `profileOverlayDesigns`, `recordPoses`, `resolveBitrateBps`, `resolveDimensions`, `videoOverlayStringsFor`, `WATERMARK_INSET_PX`, `WATERMARK_REFERENCE_SHORT_SIDE`, `WATERMARK_URL`, `WATERMARK_WIDTH_PX` | `CanvasSurfaceOptions`, `FrameCapture`, `MarkerPixel`, `NormalizedPoint`, `PreviewMap`, `PreviewPosesArgs`, `ProfileCurve`, `ProfileRenderer`, `RecorderSeams`, `RecorderSurface`, `RecordingMap`, `RecordPosesArgs`, `VideoDimensions`, `VideoOverlayStrings` |
1481
+
1482
+ #### `@mountaya/elements/view`
1483
+
1484
+ | Declared under | Values | Types |
1485
+ | --- | --- | --- |
1486
+ | engines | `MapLibreViewClient` | `MapLibreClientOptions` |
1487
+
1488
+ <!-- exports:end -->
1489
+
1490
+ ## Contributing
1491
+
1492
+ Published from
1493
+ [`mountaya/sdk-typescript`](https://github.com/mountaya/sdk-typescript).
1494
+ `src/icons/rules/lucideMarkers.gen.ts`, `src/icons/rules/lucideUi.gen.ts` and the exports table
1495
+ above are generated: run
1496
+ `npm run generate:glyphs` and `npm run generate:readme` rather than editing them. Both are
1497
+ checked by `npm run lint`.
1498
+
1499
+ [CONTRIBUTING.md](../../CONTRIBUTING.md) covers the setup, the rest
1500
+ of the gates, and what the guard tests are guarding. [CHANGELOG.md](CHANGELOG.md) is what
1501
+ changed. A security issue goes to the address in [SECURITY.md](../../SECURITY.md), not to an
1502
+ issue.
1503
+
1504
+ ## Licence
1505
+
1506
+ Published under the Mountaya SDK License: source-available, for use with the Mountaya services
1507
+ while an agreement with Mountaya is in force. The terms are in [LICENSE.txt](LICENSE.txt), with a
1508
+ French translation in [LICENCE.fr.txt](LICENCE.fr.txt).
1509
+
1510
+ The work this package bundles from other projects is listed, with each project's licence, in
1511
+ [THIRD-PARTY-NOTICES.txt](THIRD-PARTY-NOTICES.txt).