@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.
- package/CHANGELOG.md +273 -0
- package/LICENCE.fr.txt +280 -0
- package/LICENSE.txt +262 -0
- package/README.md +1510 -2
- package/THIRD-PARTY-NOTICES.txt +103 -0
- package/dist/agent/index.cjs +1211 -0
- package/dist/agent/index.cjs.map +1 -0
- package/dist/agent/index.d.cts +1966 -0
- package/dist/agent/index.d.ts +1966 -0
- package/dist/agent/index.js +1181 -0
- package/dist/agent/index.js.map +1 -0
- package/dist/camera/index.cjs +2512 -0
- package/dist/camera/index.cjs.map +1 -0
- package/dist/camera/index.d.cts +1723 -0
- package/dist/camera/index.d.ts +1723 -0
- package/dist/camera/index.js +2443 -0
- package/dist/camera/index.js.map +1 -0
- package/dist/chunk-5pTPpv4v.d.cts +897 -0
- package/dist/chunk-5pTPpv4v.d.ts +897 -0
- package/dist/chunk-6JzFMFHh.d.ts +119 -0
- package/dist/chunk-6qyuJVvt.d.ts +513 -0
- package/dist/chunk-9fp0lDic.cjs +583 -0
- package/dist/chunk-9fp0lDic.cjs.map +1 -0
- package/dist/chunk-A48H1rDg.d.cts +73 -0
- package/dist/chunk-A48H1rDg.d.ts +73 -0
- package/dist/chunk-B-m1AchR.cjs +57 -0
- package/dist/chunk-B-m1AchR.cjs.map +1 -0
- package/dist/chunk-B-qFTf04.d.ts +216 -0
- package/dist/chunk-B0YROiZh.d.cts +1475 -0
- package/dist/chunk-B14wgOvH.d.cts +68 -0
- package/dist/chunk-B19l3j9r.cjs +150 -0
- package/dist/chunk-B19l3j9r.cjs.map +1 -0
- package/dist/chunk-B2PtjVKg.cjs +86 -0
- package/dist/chunk-B2PtjVKg.cjs.map +1 -0
- package/dist/chunk-B56Oyb7W.cjs +70 -0
- package/dist/chunk-B56Oyb7W.cjs.map +1 -0
- package/dist/chunk-B5WGMQwK.cjs +113 -0
- package/dist/chunk-B5WGMQwK.cjs.map +1 -0
- package/dist/chunk-B98mKrdu.d.cts +302 -0
- package/dist/chunk-BB0PmqIM.d.cts +44 -0
- package/dist/chunk-BBikve0Z.cjs +269 -0
- package/dist/chunk-BBikve0Z.cjs.map +1 -0
- package/dist/chunk-BHeXmM0X.js +37 -0
- package/dist/chunk-BHeXmM0X.js.map +1 -0
- package/dist/chunk-BI8WZLpU.cjs +281 -0
- package/dist/chunk-BI8WZLpU.cjs.map +1 -0
- package/dist/chunk-BIEc_SkR.cjs +29 -0
- package/dist/chunk-BIEc_SkR.cjs.map +1 -0
- package/dist/chunk-BJ6L6_W9.cjs +553 -0
- package/dist/chunk-BJ6L6_W9.cjs.map +1 -0
- package/dist/chunk-BJ91UCbB.js +11 -0
- package/dist/chunk-BJ91UCbB.js.map +1 -0
- package/dist/chunk-BJEZWTKj.cjs +166 -0
- package/dist/chunk-BJEZWTKj.cjs.map +1 -0
- package/dist/chunk-BJz54mfg.cjs +10 -0
- package/dist/chunk-BJz54mfg.cjs.map +1 -0
- package/dist/chunk-BNX5LAfN.d.cts +912 -0
- package/dist/chunk-BP6KgA86.js +35 -0
- package/dist/chunk-BP6KgA86.js.map +1 -0
- package/dist/chunk-BRnjQq6K.d.cts +157 -0
- package/dist/chunk-BSiMEwPS.js +46 -0
- package/dist/chunk-BSiMEwPS.js.map +1 -0
- package/dist/chunk-BTPjDw_y.cjs +16 -0
- package/dist/chunk-BTPjDw_y.cjs.map +1 -0
- package/dist/chunk-BTUUABGI.js +17 -0
- package/dist/chunk-BTUUABGI.js.map +1 -0
- package/dist/chunk-BUeL9y7s.cjs +45 -0
- package/dist/chunk-BUeL9y7s.cjs.map +1 -0
- package/dist/chunk-BWMuCNc9.cjs +172 -0
- package/dist/chunk-BWMuCNc9.cjs.map +1 -0
- package/dist/chunk-BWjRfhpF.js +126 -0
- package/dist/chunk-BWjRfhpF.js.map +1 -0
- package/dist/chunk-BZ5KyZXI.d.ts +302 -0
- package/dist/chunk-B_4SVmvh.js +94 -0
- package/dist/chunk-B_4SVmvh.js.map +1 -0
- package/dist/chunk-BcTUuZQ3.js +95 -0
- package/dist/chunk-BcTUuZQ3.js.map +1 -0
- package/dist/chunk-BdkqSsJe.cjs +140 -0
- package/dist/chunk-BdkqSsJe.cjs.map +1 -0
- package/dist/chunk-BfktMVmI.js +70 -0
- package/dist/chunk-BfktMVmI.js.map +1 -0
- package/dist/chunk-BfzQb0EK.cjs +6 -0
- package/dist/chunk-BhWfT-22.d.cts +808 -0
- package/dist/chunk-BjJcqX5J.cjs +60 -0
- package/dist/chunk-BjJcqX5J.cjs.map +1 -0
- package/dist/chunk-Bk0L8g5J.d.cts +77 -0
- package/dist/chunk-Bk0L8g5J.d.ts +77 -0
- package/dist/chunk-Bl4_uVa6.cjs +11 -0
- package/dist/chunk-Bl4_uVa6.cjs.map +1 -0
- package/dist/chunk-BlKF4lrp.js +43 -0
- package/dist/chunk-BlKF4lrp.js.map +1 -0
- package/dist/chunk-Bm1FieGR.js +4 -0
- package/dist/chunk-Bm1FieGR.js.map +1 -0
- package/dist/chunk-Bn6ZbxkS.cjs +27 -0
- package/dist/chunk-BpN3hr6a.cjs +541 -0
- package/dist/chunk-BpN3hr6a.cjs.map +1 -0
- package/dist/chunk-Bq_WHTfd.d.cts +119 -0
- package/dist/chunk-Bqt4LBBz.cjs +648 -0
- package/dist/chunk-Bqt4LBBz.cjs.map +1 -0
- package/dist/chunk-Bqt97zwf.d.cts +54 -0
- package/dist/chunk-Bqt97zwf.d.ts +54 -0
- package/dist/chunk-BsBiN4w6.d.cts +245 -0
- package/dist/chunk-BvTpOUoC.cjs +207 -0
- package/dist/chunk-BvTpOUoC.cjs.map +1 -0
- package/dist/chunk-BwK6Hl3q.cjs +446 -0
- package/dist/chunk-BwK6Hl3q.cjs.map +1 -0
- package/dist/chunk-BxDQZDXR.d.cts +76 -0
- package/dist/chunk-BxDQZDXR.d.ts +76 -0
- package/dist/chunk-BxUio8kX.js +20 -0
- package/dist/chunk-BxUio8kX.js.map +1 -0
- package/dist/chunk-BxaocpFi.d.cts +1 -0
- package/dist/chunk-Bywi0K1N.js +36 -0
- package/dist/chunk-Bywi0K1N.js.map +1 -0
- package/dist/chunk-C-IlmkDl.js +59 -0
- package/dist/chunk-C-IlmkDl.js.map +1 -0
- package/dist/chunk-C5PtVewq.d.ts +389 -0
- package/dist/chunk-C5dpC7mQ.js +19 -0
- package/dist/chunk-C5dpC7mQ.js.map +1 -0
- package/dist/chunk-C5q1sgSa.js +46 -0
- package/dist/chunk-C5q1sgSa.js.map +1 -0
- package/dist/chunk-C6fU9G5I.cjs +221 -0
- package/dist/chunk-C6fU9G5I.cjs.map +1 -0
- package/dist/chunk-C71dpWUK.js +5 -0
- package/dist/chunk-C71dpWUK.js.map +1 -0
- package/dist/chunk-C82N1gQX.d.ts +1831 -0
- package/dist/chunk-C8HdaHpu.js +118 -0
- package/dist/chunk-C8HdaHpu.js.map +1 -0
- package/dist/chunk-C8ZGryck.js +236 -0
- package/dist/chunk-C8ZGryck.js.map +1 -0
- package/dist/chunk-C95NG0oD.cjs +43 -0
- package/dist/chunk-C95NG0oD.cjs.map +1 -0
- package/dist/chunk-C9aR8DXb.js +9 -0
- package/dist/chunk-C9aR8DXb.js.map +1 -0
- package/dist/chunk-CAUZnoCs.d.ts +525 -0
- package/dist/chunk-CBXWWuM9.cjs +82 -0
- package/dist/chunk-CBXWWuM9.cjs.map +1 -0
- package/dist/chunk-CC_Kquu7.d.cts +125 -0
- package/dist/chunk-CC_Kquu7.d.ts +125 -0
- package/dist/chunk-CCp85vXg.cjs +60 -0
- package/dist/chunk-CCp85vXg.cjs.map +1 -0
- package/dist/chunk-CEcB1_uK.js +39 -0
- package/dist/chunk-CEcB1_uK.js.map +1 -0
- package/dist/chunk-CFIo021l.d.cts +216 -0
- package/dist/chunk-CH_IZoJE.js +33 -0
- package/dist/chunk-CH_IZoJE.js.map +1 -0
- package/dist/chunk-CHrasH_g.cjs +25 -0
- package/dist/chunk-CHrasH_g.cjs.map +1 -0
- package/dist/chunk-CJVoSaAE.cjs +3 -0
- package/dist/chunk-CJp8nGcb.js +96 -0
- package/dist/chunk-CJp8nGcb.js.map +1 -0
- package/dist/chunk-CJwUtkOt.js +112 -0
- package/dist/chunk-CJwUtkOt.js.map +1 -0
- package/dist/chunk-CKhCOVIf.d.cts +751 -0
- package/dist/chunk-CKiVSRYg.js +50 -0
- package/dist/chunk-CKiVSRYg.js.map +1 -0
- package/dist/chunk-CKtd19eD.cjs +59 -0
- package/dist/chunk-CKtd19eD.cjs.map +1 -0
- package/dist/chunk-CL92KE3j.d.ts +3188 -0
- package/dist/chunk-CLqUlkAe.js +54 -0
- package/dist/chunk-CLqUlkAe.js.map +1 -0
- package/dist/chunk-CMG5OV0q.cjs +4741 -0
- package/dist/chunk-CMG5OV0q.cjs.map +1 -0
- package/dist/chunk-CN_TKSgm.js +10 -0
- package/dist/chunk-CN_TKSgm.js.map +1 -0
- package/dist/chunk-CNe6MtqV.cjs +29 -0
- package/dist/chunk-CNe6MtqV.cjs.map +1 -0
- package/dist/chunk-COQkDTC5.js +83 -0
- package/dist/chunk-COQkDTC5.js.map +1 -0
- package/dist/chunk-CPBl6K4M.cjs +168 -0
- package/dist/chunk-CPBl6K4M.cjs.map +1 -0
- package/dist/chunk-CPx0ZYFB.d.ts +3 -0
- package/dist/chunk-CQQhcP_C.d.ts +197 -0
- package/dist/chunk-CTNoajFh.d.cts +389 -0
- package/dist/chunk-CTd-qgJc.cjs +384 -0
- package/dist/chunk-CTd-qgJc.cjs.map +1 -0
- package/dist/chunk-CW80YYtU.cjs +1056 -0
- package/dist/chunk-CW80YYtU.cjs.map +1 -0
- package/dist/chunk-CWpqBgkF.d.cts +24 -0
- package/dist/chunk-CWpqBgkF.d.ts +24 -0
- package/dist/chunk-CXjRArgy.d.ts +3 -0
- package/dist/chunk-CXonfH3-.cjs +14 -0
- package/dist/chunk-CXonfH3-.cjs.map +1 -0
- package/dist/chunk-CYcouGXN.d.ts +825 -0
- package/dist/chunk-CZDAzEBw.cjs +1621 -0
- package/dist/chunk-CZDAzEBw.cjs.map +1 -0
- package/dist/chunk-C_fQFr70.d.cts +159 -0
- package/dist/chunk-C_fQFr70.d.ts +159 -0
- package/dist/chunk-CbOtHnnB.cjs +359 -0
- package/dist/chunk-CbOtHnnB.cjs.map +1 -0
- package/dist/chunk-CdA6ZMGk.d.cts +825 -0
- package/dist/chunk-Ce1_thm7.js +146 -0
- package/dist/chunk-Ce1_thm7.js.map +1 -0
- package/dist/chunk-CeD8Hw0j.d.cts +3188 -0
- package/dist/chunk-CeiTuMyt.d.cts +525 -0
- package/dist/chunk-Ch1OLzLi.js +1 -0
- package/dist/chunk-Cizu_j1N.cjs +87 -0
- package/dist/chunk-Cizu_j1N.cjs.map +1 -0
- package/dist/chunk-CjDe9z6A.d.cts +427 -0
- package/dist/chunk-Cl1etdlu.js +63 -0
- package/dist/chunk-Cl1etdlu.js.map +1 -0
- package/dist/chunk-CmoVJDoz.js +4 -0
- package/dist/chunk-CmoVJDoz.js.map +1 -0
- package/dist/chunk-CnLucxjG.cjs +197 -0
- package/dist/chunk-CnLucxjG.cjs.map +1 -0
- package/dist/chunk-CsWjBmdi.cjs +56 -0
- package/dist/chunk-CsWjBmdi.cjs.map +1 -0
- package/dist/chunk-CuseO5MZ.d.cts +3 -0
- package/dist/chunk-CvMHibbA.d.ts +427 -0
- package/dist/chunk-CwDeiN5U.js +870 -0
- package/dist/chunk-CwDeiN5U.js.map +1 -0
- package/dist/chunk-Cwdmx4tG.js +1 -0
- package/dist/chunk-D-4MxHTt.d.cts +105 -0
- package/dist/chunk-D-4MxHTt.d.ts +105 -0
- package/dist/chunk-D0LF-99V.js +1093 -0
- package/dist/chunk-D0LF-99V.js.map +1 -0
- package/dist/chunk-D1fe-0c_.js +367 -0
- package/dist/chunk-D1fe-0c_.js.map +1 -0
- package/dist/chunk-D21fEI6A.d.ts +1926 -0
- package/dist/chunk-D39gAxya.cjs +89 -0
- package/dist/chunk-D39gAxya.cjs.map +1 -0
- package/dist/chunk-D6KdIW5e.cjs +228 -0
- package/dist/chunk-D6KdIW5e.cjs.map +1 -0
- package/dist/chunk-D6qHYbgW.d.cts +36 -0
- package/dist/chunk-D89E-w70.d.ts +44 -0
- package/dist/chunk-D8bdTysL.js +552 -0
- package/dist/chunk-D8bdTysL.js.map +1 -0
- package/dist/chunk-D96QJT24.cjs +109 -0
- package/dist/chunk-D96QJT24.cjs.map +1 -0
- package/dist/chunk-DAmkQl-i.js +119 -0
- package/dist/chunk-DAmkQl-i.js.map +1 -0
- package/dist/chunk-DEfsb2lc.cjs +10 -0
- package/dist/chunk-DEfsb2lc.cjs.map +1 -0
- package/dist/chunk-DIFjT5-V.d.cts +66 -0
- package/dist/chunk-DJpUw8TN.d.ts +912 -0
- package/dist/chunk-DK6lm2IZ.cjs +11 -0
- package/dist/chunk-DK6lm2IZ.cjs.map +1 -0
- package/dist/chunk-DKqgr31j.cjs +61 -0
- package/dist/chunk-DKqgr31j.cjs.map +1 -0
- package/dist/chunk-DLZ0QYm9.js +37 -0
- package/dist/chunk-DLZ0QYm9.js.map +1 -0
- package/dist/chunk-DLjS0uaC.js +4 -0
- package/dist/chunk-DLjS0uaC.js.map +1 -0
- package/dist/chunk-DMokwmOV.cjs +49 -0
- package/dist/chunk-DMokwmOV.cjs.map +1 -0
- package/dist/chunk-DMvWgBZL.d.cts +1831 -0
- package/dist/chunk-DNfGfIF3.js +31 -0
- package/dist/chunk-DNfGfIF3.js.map +1 -0
- package/dist/chunk-DQbSRe8D.d.ts +245 -0
- package/dist/chunk-DSGkP8_y.js +45 -0
- package/dist/chunk-DSGkP8_y.js.map +1 -0
- package/dist/chunk-DTctvfSd.d.cts +197 -0
- package/dist/chunk-DWe7igyw.cjs +206 -0
- package/dist/chunk-DWe7igyw.cjs.map +1 -0
- package/dist/chunk-DWsMP5JR.d.ts +68 -0
- package/dist/chunk-DWsm3HIW.d.cts +120 -0
- package/dist/chunk-DWsm3HIW.d.ts +120 -0
- package/dist/chunk-DXABHjLa.cjs +3 -0
- package/dist/chunk-D_BeqSbc.cjs +42 -0
- package/dist/chunk-D_BeqSbc.cjs.map +1 -0
- package/dist/chunk-D_svQNdW.d.ts +66 -0
- package/dist/chunk-Dav4xWrp.js +330 -0
- package/dist/chunk-Dav4xWrp.js.map +1 -0
- package/dist/chunk-DbCPhepL.js +293 -0
- package/dist/chunk-DbCPhepL.js.map +1 -0
- package/dist/chunk-DcrTy-y2.cjs +43 -0
- package/dist/chunk-DcrTy-y2.cjs.map +1 -0
- package/dist/chunk-Ddv484ld.js +487 -0
- package/dist/chunk-Ddv484ld.js.map +1 -0
- package/dist/chunk-De0bjnhY.cjs +88 -0
- package/dist/chunk-De0bjnhY.cjs.map +1 -0
- package/dist/chunk-De2FmNPu.cjs +32 -0
- package/dist/chunk-De2FmNPu.cjs.map +1 -0
- package/dist/chunk-DeSjQXiI.d.ts +157 -0
- package/dist/chunk-Den0Ta6C.js +132 -0
- package/dist/chunk-Den0Ta6C.js.map +1 -0
- package/dist/chunk-DiDKEeEa.js +8 -0
- package/dist/chunk-DiDKEeEa.js.map +1 -0
- package/dist/chunk-Dj60k5PU.js +197 -0
- package/dist/chunk-Dj60k5PU.js.map +1 -0
- package/dist/chunk-DjnYQBCN.js +4705 -0
- package/dist/chunk-DjnYQBCN.js.map +1 -0
- package/dist/chunk-Dk9VKvyq.d.ts +1 -0
- package/dist/chunk-Dor1ERI9.cjs +85 -0
- package/dist/chunk-Dor1ERI9.cjs.map +1 -0
- package/dist/chunk-DpMouOoH.js +451 -0
- package/dist/chunk-DpMouOoH.js.map +1 -0
- package/dist/chunk-DposgdNL.cjs +52 -0
- package/dist/chunk-DposgdNL.cjs.map +1 -0
- package/dist/chunk-DqLTG_5Q.d.cts +3 -0
- package/dist/chunk-Dr5MCIpS.d.cts +63 -0
- package/dist/chunk-Dr5MCIpS.d.ts +63 -0
- package/dist/chunk-DrudttCC.cjs +4 -0
- package/dist/chunk-DsDYVJQC.js +173 -0
- package/dist/chunk-DsDYVJQC.js.map +1 -0
- package/dist/chunk-Dw8ur6FJ.js +27 -0
- package/dist/chunk-Dw8ur6FJ.js.map +1 -0
- package/dist/chunk-DwG6M_0v.js +64 -0
- package/dist/chunk-DwG6M_0v.js.map +1 -0
- package/dist/chunk-Dy9a5ibO.js +284 -0
- package/dist/chunk-Dy9a5ibO.js.map +1 -0
- package/dist/chunk-DyayZlQJ.js +157 -0
- package/dist/chunk-DyayZlQJ.js.map +1 -0
- package/dist/chunk-DyhJZC2i.js +126 -0
- package/dist/chunk-DyhJZC2i.js.map +1 -0
- package/dist/chunk-F9zBzmmG.cjs +45 -0
- package/dist/chunk-F9zBzmmG.cjs.map +1 -0
- package/dist/chunk-FyCYofv2.js +116 -0
- package/dist/chunk-FyCYofv2.js.map +1 -0
- package/dist/chunk-GHJRjAk2.js +1 -0
- package/dist/chunk-H14isiSf.d.ts +751 -0
- package/dist/chunk-HIJzXoN4.js +7 -0
- package/dist/chunk-HIJzXoN4.js.map +1 -0
- package/dist/chunk-Id_8kRtu.d.ts +36 -0
- package/dist/chunk-KN60yxBQ.js +5 -0
- package/dist/chunk-KN60yxBQ.js.map +1 -0
- package/dist/chunk-NM5yg6bh.cjs +82 -0
- package/dist/chunk-NM5yg6bh.cjs.map +1 -0
- package/dist/chunk-OXr3zJfM.cjs +119 -0
- package/dist/chunk-OXr3zJfM.cjs.map +1 -0
- package/dist/chunk-QGqgNC4z.d.ts +928 -0
- package/dist/chunk-QJBtJrZ0.js +36 -0
- package/dist/chunk-QJBtJrZ0.js.map +1 -0
- package/dist/chunk-QKWhxfPv.d.cts +361 -0
- package/dist/chunk-QKWhxfPv.d.ts +361 -0
- package/dist/chunk-QXW7b4Ev.d.cts +410 -0
- package/dist/chunk-RHZrxUrM.cjs +39 -0
- package/dist/chunk-RHZrxUrM.cjs.map +1 -0
- package/dist/chunk-RTxe2i66.js +91 -0
- package/dist/chunk-RTxe2i66.js.map +1 -0
- package/dist/chunk-RrKkJb6P.js +16 -0
- package/dist/chunk-RrKkJb6P.js.map +1 -0
- package/dist/chunk-VOJqpcnM.cjs +181 -0
- package/dist/chunk-VOJqpcnM.cjs.map +1 -0
- package/dist/chunk-VljGTrid.js +1 -0
- package/dist/chunk-X3UVwUEK.d.cts +513 -0
- package/dist/chunk-X9K2WChn.cjs +28 -0
- package/dist/chunk-X9K2WChn.cjs.map +1 -0
- package/dist/chunk-YrtOx6oy.js +251 -0
- package/dist/chunk-YrtOx6oy.js.map +1 -0
- package/dist/chunk-bY7ySujI.d.cts +928 -0
- package/dist/chunk-bYf1sBz5.d.cts +11 -0
- package/dist/chunk-bYf1sBz5.d.ts +11 -0
- package/dist/chunk-blfknWoM.d.cts +1926 -0
- package/dist/chunk-blqsohAb.js +113 -0
- package/dist/chunk-blqsohAb.js.map +1 -0
- package/dist/chunk-cDMCjodI.cjs +58 -0
- package/dist/chunk-cDMCjodI.cjs.map +1 -0
- package/dist/chunk-cWjE3qd6.cjs +10 -0
- package/dist/chunk-cWjE3qd6.cjs.map +1 -0
- package/dist/chunk-dfOgV3fu.js +26 -0
- package/dist/chunk-dfOgV3fu.js.map +1 -0
- package/dist/chunk-f9cTwUX1.cjs +125 -0
- package/dist/chunk-f9cTwUX1.cjs.map +1 -0
- package/dist/chunk-fHVYEZs4.cjs +28 -0
- package/dist/chunk-fHVYEZs4.cjs.map +1 -0
- package/dist/chunk-fWRUMgRI.js +22 -0
- package/dist/chunk-fWRUMgRI.js.map +1 -0
- package/dist/chunk-fozLXfHY.d.cts +55 -0
- package/dist/chunk-fozLXfHY.d.ts +55 -0
- package/dist/chunk-gWmB1l3A.cjs +3122 -0
- package/dist/chunk-gWmB1l3A.cjs.map +1 -0
- package/dist/chunk-gbj2R-_w.js +58 -0
- package/dist/chunk-gbj2R-_w.js.map +1 -0
- package/dist/chunk-iIWxsAXd.js +59 -0
- package/dist/chunk-iIWxsAXd.js.map +1 -0
- package/dist/chunk-lItIuOIS.cjs +137 -0
- package/dist/chunk-lItIuOIS.cjs.map +1 -0
- package/dist/chunk-m6Rh4PCe.cjs +798 -0
- package/dist/chunk-m6Rh4PCe.cjs.map +1 -0
- package/dist/chunk-o3IRANDf.cjs +99 -0
- package/dist/chunk-o3IRANDf.cjs.map +1 -0
- package/dist/chunk-obUcg3Sk.d.ts +808 -0
- package/dist/chunk-ohsf-6Rn.js +600 -0
- package/dist/chunk-ohsf-6Rn.js.map +1 -0
- package/dist/chunk-pBleU6Nv.js +3061 -0
- package/dist/chunk-pBleU6Nv.js.map +1 -0
- package/dist/chunk-px4e99cy.js +71 -0
- package/dist/chunk-px4e99cy.js.map +1 -0
- package/dist/chunk-qwYDLeXc.cjs +99 -0
- package/dist/chunk-qwYDLeXc.cjs.map +1 -0
- package/dist/chunk-rF_859Qk.cjs +101 -0
- package/dist/chunk-rF_859Qk.cjs.map +1 -0
- package/dist/chunk-rLJkqJ5j.d.ts +1475 -0
- package/dist/chunk-twQItIRg.cjs +338 -0
- package/dist/chunk-twQItIRg.cjs.map +1 -0
- package/dist/chunk-vnPrMVjY.js +10 -0
- package/dist/chunk-vnPrMVjY.js.map +1 -0
- package/dist/chunk-ws3bVwaS.d.ts +410 -0
- package/dist/chunk-xh3UkuVs.cjs +246 -0
- package/dist/chunk-xh3UkuVs.cjs.map +1 -0
- package/dist/chunk-yMzRr26E.js +153 -0
- package/dist/chunk-yMzRr26E.js.map +1 -0
- package/dist/collab/index.cjs +831 -0
- package/dist/collab/index.cjs.map +1 -0
- package/dist/collab/index.d.cts +824 -0
- package/dist/collab/index.d.ts +824 -0
- package/dist/collab/index.js +819 -0
- package/dist/collab/index.js.map +1 -0
- package/dist/data/index.cjs +39 -0
- package/dist/data/index.d.cts +6 -0
- package/dist/data/index.d.ts +6 -0
- package/dist/data/index.js +7 -0
- package/dist/editor/index.cjs +2713 -0
- package/dist/editor/index.cjs.map +1 -0
- package/dist/editor/index.d.cts +10 -0
- package/dist/editor/index.d.ts +10 -0
- package/dist/editor/index.js +2702 -0
- package/dist/editor/index.js.map +1 -0
- package/dist/errors/index.cjs +11 -0
- package/dist/errors/index.d.cts +2 -0
- package/dist/errors/index.d.ts +2 -0
- package/dist/errors/index.js +1 -0
- package/dist/geo/index.cjs +68 -0
- package/dist/geo/index.d.cts +6 -0
- package/dist/geo/index.d.ts +6 -0
- package/dist/geo/index.js +11 -0
- package/dist/i18n/fr/index.cjs +333 -0
- package/dist/i18n/fr/index.cjs.map +1 -0
- package/dist/i18n/fr/index.d.cts +18 -0
- package/dist/i18n/fr/index.d.ts +18 -0
- package/dist/i18n/fr/index.js +328 -0
- package/dist/i18n/fr/index.js.map +1 -0
- package/dist/i18n/index.cjs +451 -0
- package/dist/i18n/index.cjs.map +1 -0
- package/dist/i18n/index.d.cts +268 -0
- package/dist/i18n/index.d.ts +268 -0
- package/dist/i18n/index.js +430 -0
- package/dist/i18n/index.js.map +1 -0
- package/dist/icons/index.cjs +37 -0
- package/dist/icons/index.d.cts +4 -0
- package/dist/icons/index.d.ts +4 -0
- package/dist/icons/index.js +8 -0
- package/dist/index.cjs +517 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +174 -0
- package/dist/index.d.ts +174 -0
- package/dist/index.js +54 -0
- package/dist/index.js.map +1 -0
- package/dist/layers/index.cjs +83 -0
- package/dist/layers/index.d.cts +3 -0
- package/dist/layers/index.d.ts +3 -0
- package/dist/layers/index.js +5 -0
- package/dist/map-client/index.cjs +5 -0
- package/dist/map-client/index.d.cts +6 -0
- package/dist/map-client/index.d.ts +6 -0
- package/dist/map-client/index.js +0 -0
- package/dist/maplibre-worker.mjs +12 -0
- package/dist/navigation/index.cjs +612 -0
- package/dist/navigation/index.cjs.map +1 -0
- package/dist/navigation/index.d.cts +551 -0
- package/dist/navigation/index.d.ts +551 -0
- package/dist/navigation/index.js +599 -0
- package/dist/navigation/index.js.map +1 -0
- package/dist/profile/index.cjs +177 -0
- package/dist/profile/index.d.cts +8 -0
- package/dist/profile/index.d.ts +8 -0
- package/dist/profile/index.js +10 -0
- package/dist/seams/index.cjs +15 -0
- package/dist/seams/index.d.cts +4 -0
- package/dist/seams/index.d.ts +4 -0
- package/dist/seams/index.js +4 -0
- package/dist/search/index.cjs +39 -0
- package/dist/search/index.d.cts +6 -0
- package/dist/search/index.d.ts +6 -0
- package/dist/search/index.js +3 -0
- package/dist/style/index.cjs +34 -0
- package/dist/style/index.d.cts +5 -0
- package/dist/style/index.d.ts +5 -0
- package/dist/style/index.js +5 -0
- package/dist/styles.css +11 -0
- package/dist/testing/index.cjs +444 -0
- package/dist/testing/index.cjs.map +1 -0
- package/dist/testing/index.d.cts +217 -0
- package/dist/testing/index.d.ts +217 -0
- package/dist/testing/index.js +435 -0
- package/dist/testing/index.js.map +1 -0
- package/dist/timezone/index.cjs +1953 -0
- package/dist/timezone/index.cjs.map +1 -0
- package/dist/timezone/index.d.cts +28 -0
- package/dist/timezone/index.d.ts +28 -0
- package/dist/timezone/index.js +1948 -0
- package/dist/timezone/index.js.map +1 -0
- package/dist/units/index.cjs +29 -0
- package/dist/units/index.d.cts +3 -0
- package/dist/units/index.d.ts +3 -0
- package/dist/units/index.js +3 -0
- package/dist/video/index.cjs +1713 -0
- package/dist/video/index.cjs.map +1 -0
- package/dist/video/index.d.cts +846 -0
- package/dist/video/index.d.ts +846 -0
- package/dist/video/index.js +1689 -0
- package/dist/video/index.js.map +1 -0
- package/dist/view/index.cjs +7 -0
- package/dist/view/index.d.cts +3 -0
- package/dist/view/index.d.ts +3 -0
- package/dist/view/index.js +1 -0
- package/package.json +433 -4
- package/src/agent/engines/session.ts +2255 -0
- package/src/agent/index.ts +109 -0
- package/src/agent/rules/agentError.ts +128 -0
- package/src/agent/rules/boundedInputJson.ts +53 -0
- package/src/agent/rules/conversation.ts +629 -0
- package/src/agent/rules/conversationFaults.ts +349 -0
- package/src/agent/rules/conversationHost.ts +390 -0
- package/src/agent/rules/dispatcher.ts +102 -0
- package/src/agent/rules/errorCodes.ts +78 -0
- package/src/agent/rules/errorStatus.ts +65 -0
- package/src/agent/rules/scriptedTransport.ts +390 -0
- package/src/agent/rules/stickToBottom.ts +38 -0
- package/src/agent/rules/toolResultPayload.ts +197 -0
- package/src/auth/rules/clientHeader.ts +22 -0
- package/src/auth/rules/sentCredential.ts +76 -0
- package/src/auth/rules/transformRequest.ts +803 -0
- package/src/camera/engines/videoFlight.ts +1758 -0
- package/src/camera/index.ts +157 -0
- package/src/camera/rules/clearance.ts +1099 -0
- package/src/camera/rules/fit.ts +132 -0
- package/src/camera/rules/modes.ts +1019 -0
- package/src/camera/rules/plan.ts +478 -0
- package/src/camera/rules/planner.ts +129 -0
- package/src/camera/rules/poseRanges.ts +38 -0
- package/src/camera/rules/presets.ts +185 -0
- package/src/camera/rules/profileSamples.ts +243 -0
- package/src/camera/rules/route.ts +596 -0
- package/src/camera/rules/routeContent.ts +105 -0
- package/src/camera/rules/spline.ts +765 -0
- package/src/camera/rules/sweptViewports.ts +39 -0
- package/src/camera/rules/track.ts +1412 -0
- package/src/camera/rules/vocabulary.ts +130 -0
- package/src/camera/rules/zoom.ts +216 -0
- package/src/collab/engines/session.ts +1902 -0
- package/src/collab/engines/trailingThrottle.ts +151 -0
- package/src/collab/index.ts +52 -0
- package/src/collab/rules/dispatch.ts +143 -0
- package/src/collab/rules/peerNames.ts +51 -0
- package/src/collab/rules/scriptedTransport.ts +244 -0
- package/src/compose/engines/baseMapSwitch.ts +1136 -0
- package/src/compose/engines/events.ts +962 -0
- package/src/compose/engines/mountayaMap.ts +5648 -0
- package/src/compose/engines/sentCredentials.ts +146 -0
- package/src/compose/engines/slotRequests.ts +413 -0
- package/src/compose/rules/accessRefusal.ts +109 -0
- package/src/compose/rules/accessStanding.ts +75 -0
- package/src/compose/rules/analysisKinds.ts +331 -0
- package/src/compose/rules/analysisLayers.ts +176 -0
- package/src/compose/rules/cameraMoves.ts +38 -0
- package/src/compose/rules/carriedLayers.ts +87 -0
- package/src/compose/rules/developmentWarnings.ts +167 -0
- package/src/compose/rules/fitBox.ts +67 -0
- package/src/compose/rules/fitCamera.ts +54 -0
- package/src/compose/rules/geoJsonSlot.ts +61 -0
- package/src/compose/rules/geometrySlots.ts +155 -0
- package/src/compose/rules/glyphNode.ts +62 -0
- package/src/compose/rules/layerKeys.ts +92 -0
- package/src/compose/rules/layerOrder.ts +85 -0
- package/src/compose/rules/layersManifest.ts +26 -0
- package/src/compose/rules/mapOptions.ts +300 -0
- package/src/compose/rules/maplibreWorkerVersion.gen.ts +8 -0
- package/src/compose/rules/markerPin.ts +122 -0
- package/src/compose/rules/markerRegistry.ts +85 -0
- package/src/compose/rules/markerSprite.ts +382 -0
- package/src/compose/rules/maxBounds.ts +120 -0
- package/src/compose/rules/overlayLookup.ts +49 -0
- package/src/compose/rules/paintDiff.ts +38 -0
- package/src/compose/rules/panLock.ts +77 -0
- package/src/compose/rules/patch.ts +124 -0
- package/src/compose/rules/queriedFeature.ts +55 -0
- package/src/compose/rules/queryLayers.ts +46 -0
- package/src/compose/rules/searchHighlight.ts +313 -0
- package/src/compose/rules/slotNames.ts +19 -0
- package/src/compose/rules/stripeImage.ts +253 -0
- package/src/compose/rules/swapMarker.ts +66 -0
- package/src/compose/rules/terrainVariant.ts +88 -0
- package/src/compose/rules/types.ts +559 -0
- package/src/compose/rules/urlHash.ts +19 -0
- package/src/compose/rules/viewOptions.ts +451 -0
- package/src/compose/rules/workerUrl.ts +131 -0
- package/src/data/engines/itineraryResource.ts +643 -0
- package/src/data/index.ts +78 -0
- package/src/data/rules/adapt.ts +473 -0
- package/src/data/rules/editModes.ts +51 -0
- package/src/data/rules/itinerary.ts +168 -0
- package/src/data/rules/nullable.ts +63 -0
- package/src/data/rules/roadAccess.ts +169 -0
- package/src/data/rules/segmentGroups.ts +309 -0
- package/src/data/rules/selectors.ts +95 -0
- package/src/data/rules/zones.ts +79 -0
- package/src/draw/engines/boundaryEngine.ts +1003 -0
- package/src/draw/engines/framedAdapter.ts +198 -0
- package/src/draw/engines/pointerCursor.ts +205 -0
- package/src/draw/engines/segmentEngine.ts +1405 -0
- package/src/draw/engines/snapIndex.ts +254 -0
- package/src/draw/engines/waypointEngine.ts +574 -0
- package/src/draw/engines/zoneEngine.ts +1137 -0
- package/src/draw/rules/drawFrame.ts +123 -0
- package/src/draw/rules/insertVertex.ts +226 -0
- package/src/draw/rules/screenSpace.ts +62 -0
- package/src/draw/rules/seeds.ts +185 -0
- package/src/draw/rules/snap.ts +115 -0
- package/src/draw/rules/snapCameraKey.ts +50 -0
- package/src/draw/rules/terraDrawShared.ts +214 -0
- package/src/draw/rules/zoneOutline.ts +213 -0
- package/src/editing/engines/cursor.ts +505 -0
- package/src/editing/engines/draftMarker.ts +149 -0
- package/src/editing/rules/accent.ts +11 -0
- package/src/editing/rules/engine.ts +288 -0
- package/src/editing/rules/placement.ts +22 -0
- package/src/editing/rules/positions.ts +89 -0
- package/src/editing/rules/sources.ts +9 -0
- package/src/editing/rules/types.ts +457 -0
- package/src/editing/rules/vocabulary.ts +10 -0
- package/src/editing/rules/waypointCursor.ts +228 -0
- package/src/editor/engines/directionArrows.ts +459 -0
- package/src/editor/engines/directions.ts +1383 -0
- package/src/editor/engines/editorClient.ts +134 -0
- package/src/editor/engines/eventScope.ts +59 -0
- package/src/editor/engines/frameLoop.ts +159 -0
- package/src/editor/engines/itineraryPreview.ts +272 -0
- package/src/editor/engines/mapLockGuard.ts +66 -0
- package/src/editor/engines/overlayRenderer.ts +2696 -0
- package/src/editor/engines/peerDraft.ts +760 -0
- package/src/editor/engines/poiPick.ts +305 -0
- package/src/editor/engines/pointPick.ts +84 -0
- package/src/editor/engines/roadAccessLine.ts +140 -0
- package/src/editor/engines/searchHighlight.ts +183 -0
- package/src/editor/engines/viewClient.ts +4091 -0
- package/src/editor/engines/zoneBadges.ts +503 -0
- package/src/editor/index.ts +97 -0
- package/src/editor/rules/accentColor.ts +116 -0
- package/src/editor/rules/camera.ts +121 -0
- package/src/editor/rules/contract.ts +120 -0
- package/src/editor/rules/icons.ts +825 -0
- package/src/editor/rules/markerElements.ts +244 -0
- package/src/editor/rules/style.ts +51 -0
- package/src/editor/rules/terrain.ts +98 -0
- package/src/editor/rules/tileWarm.ts +191 -0
- package/src/editor/rules/tilesReload.ts +158 -0
- package/src/editor/rules/zoneBadgePlacement.ts +1832 -0
- package/src/editor/rules/zoneTimeStyling.ts +119 -0
- package/src/errors/index.ts +25 -0
- package/src/errors/rules/errors.ts +158 -0
- package/src/errors/rules/print.ts +129 -0
- package/src/geo/index.ts +89 -0
- package/src/geo/rules/boundaries.ts +105 -0
- package/src/geo/rules/camera.ts +496 -0
- package/src/geo/rules/corridor.ts +242 -0
- package/src/geo/rules/elevationTiles.ts +269 -0
- package/src/geo/rules/formatLngLat.ts +63 -0
- package/src/geo/rules/geodesy.ts +125 -0
- package/src/geo/rules/geometry.ts +362 -0
- package/src/geo/rules/lineWalk.ts +77 -0
- package/src/geo/rules/longitude.ts +99 -0
- package/src/geo/rules/searchLimits.ts +22 -0
- package/src/geo/rules/segmentGeometry.ts +80 -0
- package/src/geo/rules/terrain.ts +107 -0
- package/src/geo/rules/tuples.ts +124 -0
- package/src/geo/rules/types.ts +54 -0
- package/src/geo/rules/webMercator.ts +57 -0
- package/src/i18n/fr/index.ts +17 -0
- package/src/i18n/fr/rules/fr.ts +85 -0
- package/src/i18n/fr/rules/words.gen.ts +277 -0
- package/src/i18n/index.ts +82 -0
- package/src/i18n/rules/bundle.ts +378 -0
- package/src/i18n/rules/config.ts +71 -0
- package/src/i18n/rules/dates.ts +165 -0
- package/src/i18n/rules/endonyms.gen.ts +19 -0
- package/src/i18n/rules/language.ts +92 -0
- package/src/i18n/rules/localizedName.ts +33 -0
- package/src/i18n/rules/merge.ts +106 -0
- package/src/i18n/rules/scope.ts +127 -0
- package/src/i18n/rules/strings.ts +632 -0
- package/src/i18n/rules/videoOverlay.ts +121 -0
- package/src/i18n/rules/wordForms.ts +95 -0
- package/src/i18n/rules/words.gen.ts +277 -0
- package/src/icons/index.ts +54 -0
- package/src/icons/rules/activities.ts +40 -0
- package/src/icons/rules/amenities.ts +250 -0
- package/src/icons/rules/artwork.gen.ts +83 -0
- package/src/icons/rules/artwork.ts +47 -0
- package/src/icons/rules/fallback.ts +21 -0
- package/src/icons/rules/lucideMarkers.gen.ts +112 -0
- package/src/icons/rules/lucideUi.gen.ts +197 -0
- package/src/icons/rules/paint.ts +107 -0
- package/src/icons/rules/parse.ts +475 -0
- package/src/icons/rules/provider.ts +373 -0
- package/src/icons/rules/sprites.ts +54 -0
- package/src/icons/rules/ui.ts +348 -0
- package/src/icons/rules/waypoints.ts +215 -0
- package/src/index.ts +993 -0
- package/src/layers/engines/layersSelection.ts +515 -0
- package/src/layers/engines/readoutEngine.ts +131 -0
- package/src/layers/index.ts +151 -0
- package/src/layers/rules/analysis.ts +135 -0
- package/src/layers/rules/enrichment.ts +30 -0
- package/src/layers/rules/geoJson.ts +270 -0
- package/src/layers/rules/hover.ts +67 -0
- package/src/layers/rules/itineraries.ts +182 -0
- package/src/layers/rules/layersPanel.ts +237 -0
- package/src/layers/rules/order.ts +194 -0
- package/src/layers/rules/overlayInstant.ts +49 -0
- package/src/layers/rules/overlays.ts +52 -0
- package/src/layers/rules/poiPanel.ts +119 -0
- package/src/layers/rules/pois.ts +114 -0
- package/src/layers/rules/readout.ts +340 -0
- package/src/layers/rules/streetView.ts +16 -0
- package/src/layers/rules/tileTimestamp.ts +146 -0
- package/src/layers/rules/timeSlider.ts +192 -0
- package/src/layers/rules/timeWindow.ts +123 -0
- package/src/layers/rules/zones.ts +43 -0
- package/src/layers/rules/zoom.ts +77 -0
- package/src/map-client/index.ts +71 -0
- package/src/map-client/rules/mapClient.ts +1945 -0
- package/src/navigation/engines/navigation.ts +493 -0
- package/src/navigation/index.ts +51 -0
- package/src/navigation/rules/followedRoute.ts +78 -0
- package/src/navigation/rules/instructions.ts +89 -0
- package/src/navigation/rules/itineraryRoute.ts +232 -0
- package/src/navigation/rules/offRoute.ts +41 -0
- package/src/navigation/rules/progress.ts +230 -0
- package/src/navigation/rules/prompts.ts +217 -0
- package/src/navigation/rules/routeRequest.ts +98 -0
- package/src/navigation/rules/status.ts +142 -0
- package/src/navigation/rules/steps.ts +234 -0
- package/src/navigation/rules/types.ts +83 -0
- package/src/profile/index.ts +307 -0
- package/src/profile/rules/amenityBadge.ts +35 -0
- package/src/profile/rules/amenityFilter.ts +74 -0
- package/src/profile/rules/amenityStacks.ts +66 -0
- package/src/profile/rules/axis.ts +89 -0
- package/src/profile/rules/axisCulling.ts +83 -0
- package/src/profile/rules/axisLookup.ts +180 -0
- package/src/profile/rules/climbs.ts +292 -0
- package/src/profile/rules/cursorMarker.ts +122 -0
- package/src/profile/rules/cursorReadout.ts +104 -0
- package/src/profile/rules/curvePlacement.ts +216 -0
- package/src/profile/rules/dock.ts +293 -0
- package/src/profile/rules/elevation.ts +1263 -0
- package/src/profile/rules/instant.ts +89 -0
- package/src/profile/rules/intl.ts +237 -0
- package/src/profile/rules/legEmphasis.ts +53 -0
- package/src/profile/rules/profileColors.ts +66 -0
- package/src/profile/rules/profileLayout.ts +59 -0
- package/src/profile/rules/profileSlices.ts +55 -0
- package/src/profile/rules/routeProfile.ts +475 -0
- package/src/profile/rules/rowMatch.ts +50 -0
- package/src/profile/rules/scale.ts +646 -0
- package/src/profile/rules/scaleFrame.ts +171 -0
- package/src/profile/rules/sectionChips.ts +83 -0
- package/src/profile/rules/sections.ts +923 -0
- package/src/profile/rules/slopeRamp.ts +160 -0
- package/src/profile/rules/statStrip.ts +103 -0
- package/src/profile/rules/steepness.ts +51 -0
- package/src/profile/rules/tableCells.ts +269 -0
- package/src/profile/rules/tableCursor.ts +87 -0
- package/src/profile/rules/unitPatterns.ts +335 -0
- package/src/profile/rules/units.ts +1025 -0
- package/src/profile/rules/waypointCard.ts +590 -0
- package/src/profile/rules/webAddress.ts +130 -0
- package/src/profile/rules/windowSpans.ts +65 -0
- package/src/rules/asciiFold.ts +17 -0
- package/src/rules/inDevelopment.ts +54 -0
- package/src/rules/listeners.ts +62 -0
- package/src/rules/timers.ts +9 -0
- package/src/rules/types.ts +22 -0
- package/src/rules/uuid.ts +87 -0
- package/src/seams/engines/geolocateControl.ts +286 -0
- package/src/seams/index.ts +50 -0
- package/src/seams/rules/clock.ts +169 -0
- package/src/seams/rules/geolocation.ts +165 -0
- package/src/seams/rules/segmentRoute.ts +187 -0
- package/src/search/engines/search.ts +1093 -0
- package/src/search/index.ts +99 -0
- package/src/search/rules/describe.ts +383 -0
- package/src/search/rules/filters.ts +195 -0
- package/src/search/rules/highlight.ts +270 -0
- package/src/search/rules/pick.ts +90 -0
- package/src/search/rules/rows.ts +258 -0
- package/src/search/rules/searchFocus.ts +27 -0
- package/src/search/rules/searchViewport.ts +44 -0
- package/src/search/rules/shown.ts +77 -0
- package/src/search/rules/types.ts +340 -0
- package/src/stream/rules/reconnectSchedule.ts +83 -0
- package/src/style/engines/organizationRead.ts +80 -0
- package/src/style/index.ts +63 -0
- package/src/style/rules/apply.ts +268 -0
- package/src/style/rules/attribution.ts +119 -0
- package/src/style/rules/itineraryLine.ts +142 -0
- package/src/style/rules/language.ts +668 -0
- package/src/style/rules/layout.gen.ts +27 -0
- package/src/style/rules/organization.ts +96 -0
- package/src/style/rules/paint.ts +143 -0
- package/src/style/rules/panelLayout.ts +51 -0
- package/src/style/rules/roadAccessColors.ts +29 -0
- package/src/style/rules/roadAccessLine.ts +267 -0
- package/src/style/rules/segmentColors.ts +207 -0
- package/src/testing/catalogs.ts +103 -0
- package/src/testing/index.ts +30 -0
- package/src/testing/mapClient.ts +241 -0
- package/src/testing/mountayaMap.ts +741 -0
- package/src/timezone/index.ts +14 -0
- package/src/timezone/rules/viewport.ts +875 -0
- package/src/units/index.ts +55 -0
- package/src/units/rules/conversions.ts +620 -0
- package/src/units/rules/preferenceChoices.ts +124 -0
- package/src/units/rules/preferences.ts +77 -0
- package/src/units/rules/rounding.ts +69 -0
- package/src/video/engines/videoRun.ts +654 -0
- package/src/video/engines/viewClient.ts +6 -0
- package/src/video/index.ts +83 -0
- package/src/video/profileOverlay/rules/contract.ts +210 -0
- package/src/video/profileOverlay/rules/curve.ts +216 -0
- package/src/video/profileOverlay/rules/draw.ts +410 -0
- package/src/video/profileOverlay/rules/fonts.ts +54 -0
- package/src/video/profileOverlay/rules/graphDesign.ts +690 -0
- package/src/video/profileOverlay/rules/minimalDesign.ts +144 -0
- package/src/video/profileOverlay/rules/registry.ts +23 -0
- package/src/video/profileOverlay/rules/staticLayer.ts +582 -0
- package/src/video/profileOverlay/rules/stripDesign.ts +327 -0
- package/src/video/profileOverlay/rules/types.ts +78 -0
- package/src/video/rules/videoConstants.ts +250 -0
- package/src/video/rules/videoEncoder.ts +277 -0
- package/src/video/rules/videoFrames.ts +99 -0
- package/src/video/rules/videoPreview.ts +185 -0
- package/src/video/rules/videoRecorder.ts +746 -0
- package/src/video/rules/videoWatermark.ts +155 -0
- package/src/video/rules/watermarkMark.ts +40 -0
- package/src/view/engines/viewClient.ts +6 -0
- package/src/view/index.ts +20 -0
|
@@ -0,0 +1,646 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The one scale a profile and everything laid over it agree on.
|
|
3
|
+
*
|
|
4
|
+
* The chart is drawn in a fixed **0..100 unit space** and stretched into whatever box the
|
|
5
|
+
* caller gave it, with `viewBox="0 0 100 100"` and `preserveAspectRatio="none"`. That is not
|
|
6
|
+
* a stylistic choice: it is what removes measurement from the problem entirely.
|
|
7
|
+
*
|
|
8
|
+
* The alternative is to read the rendered element's width and convert pixels to distances,
|
|
9
|
+
* and it fails three ways at once. It needs a `ResizeObserver` and a layout pass before the
|
|
10
|
+
* first correct frame. It puts every overlaid pin's position downstream of a measurement, so
|
|
11
|
+
* a chart and its markers can disagree for a frame after a resize. And under a DOM
|
|
12
|
+
* implementation that reports every element as zero-sized (which is every headless test
|
|
13
|
+
* environment worth using), it renders an empty box, so the tests that were supposed to
|
|
14
|
+
* catch the first two problems pass vacuously instead.
|
|
15
|
+
*
|
|
16
|
+
* With a unit space the browser does the user-space-to-pixel mapping, and the same numbers
|
|
17
|
+
* these functions return are **also CSS percentages**: a marker at `profileX(d, total)` is
|
|
18
|
+
* `left: ${x}%`, a cursor dot at `profileY(e, domain)` is `top: ${y}%`. Pins, bands and curve
|
|
19
|
+
* align by construction rather than through a shared constant that can drift.
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
import { convertSlope } from "../../units/rules/conversions.js";
|
|
23
|
+
import {
|
|
24
|
+
altitudeBand,
|
|
25
|
+
type ElevationPoint,
|
|
26
|
+
type ElevationSeries,
|
|
27
|
+
GRADE_WINDOW_METERS,
|
|
28
|
+
gradeAt,
|
|
29
|
+
type ProfileRange,
|
|
30
|
+
} from "./elevation.js";
|
|
31
|
+
import { type ElevationDomain, extentDomain } from "./scaleFrame.js";
|
|
32
|
+
|
|
33
|
+
// Declared in `scaleFrame.ts`, which an entry that frames a curve of its own reaches without the
|
|
34
|
+
// series this module draws, and published from here beside the projections that read them.
|
|
35
|
+
export { type DistanceTick, distanceTicks, type ElevationDomain } from "./scaleFrame.js";
|
|
36
|
+
|
|
37
|
+
/** The width and height of the unit space. Both axes, because it is stretched on both. */
|
|
38
|
+
export const PROFILE_VIEWBOX = 100;
|
|
39
|
+
|
|
40
|
+
/** Headroom above the highest sample, so a summit is not flush against the frame. */
|
|
41
|
+
export const PROFILE_TOP_INSET = 6;
|
|
42
|
+
|
|
43
|
+
/** Room below the lowest sample, so a valley floor reads as a floor rather than a crop. */
|
|
44
|
+
export const PROFILE_BOTTOM_INSET = 4;
|
|
45
|
+
|
|
46
|
+
/** The unit-space y of the lowest sample. */
|
|
47
|
+
export const PROFILE_BASELINE = PROFILE_VIEWBOX - PROFILE_BOTTOM_INSET;
|
|
48
|
+
|
|
49
|
+
const clamp01 = (value: number): number => Math.min(1, Math.max(0, value));
|
|
50
|
+
|
|
51
|
+
/** Rounds a unit-space coordinate to a precision finer than any screen can resolve. */
|
|
52
|
+
const unit = (value: number): number => Math.round(value * 1000) / 1000;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* profileDomain chooses the elevation range a series is drawn against.
|
|
56
|
+
*
|
|
57
|
+
* Anchored on the itinerary's own minimum rather than on sea level, because the shape of the
|
|
58
|
+
* climb is what a profile is read for and a zero-based axis flattens exactly the itineraries
|
|
59
|
+
* people most want to see: a ridge traverse between 2,400 m and 2,600 m is a ridge, not a
|
|
60
|
+
* flat line four fifths of the way up an empty chart. The absolute altitudes are stated in
|
|
61
|
+
* the stat strip, where a number belongs.
|
|
62
|
+
*
|
|
63
|
+
* A window frames the stretch it holds: the lowest and the highest the curve stands between the
|
|
64
|
+
* window's two ends, read at each end on the line between the two samples either side of it and
|
|
65
|
+
* at every sample between them. So a window narrower than the gap between two samples frames the
|
|
66
|
+
* line that crosses it. A window that holds the whole curve is no zoom and reads the series'
|
|
67
|
+
* stated extent, as no window does. A window the samples do not reach reads that extent too, so
|
|
68
|
+
* the frame keeps its scale with no curve in it.
|
|
69
|
+
*
|
|
70
|
+
* A series with no elevation gets a nominal domain rather than a degenerate one, so a caller
|
|
71
|
+
* that draws the frame before the data arrives gets the frame it will keep.
|
|
72
|
+
*
|
|
73
|
+
* @param series The series to frame. Its `minElevation` and `maxElevation` are the stated extent.
|
|
74
|
+
* @param range The window the chart is drawn in, in meters from the start of the itinerary, its
|
|
75
|
+
* two ends in either order. Omitted, the domain frames the whole series.
|
|
76
|
+
* @returns The domain in meters above sea level, rounded outward at both ends and never narrower
|
|
77
|
+
* than the floor a flat itinerary is drawn against.
|
|
78
|
+
*/
|
|
79
|
+
export const profileDomain = (series: ElevationSeries, range?: ProfileRange): ElevationDomain => {
|
|
80
|
+
const { maxElevation, minElevation } = windowedExtent(series, range);
|
|
81
|
+
|
|
82
|
+
return extentDomain(minElevation, maxElevation);
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* What a chart's elevation scale is anchored on: the itinerary's own extent, sea level, or the
|
|
87
|
+
* stretch the window drawn holds.
|
|
88
|
+
*/
|
|
89
|
+
export type ProfileAnchor = "route" | "sea-level" | "window";
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* anchoredDomain chooses the elevation range a chart is drawn against, by what its scale is
|
|
93
|
+
* anchored on.
|
|
94
|
+
*
|
|
95
|
+
* `route` frames the whole itinerary whatever the window, so a zoomed curve keeps the height it
|
|
96
|
+
* had. `window` frames the stretch the window holds, as {@link profileDomain} reads a window, so
|
|
97
|
+
* zooming into a section rescales to its own relief. `sea-level` moves only the floor, to zero:
|
|
98
|
+
* the ceiling stays the one the itinerary's own extent was rounded to, so a sea-level scale is the
|
|
99
|
+
* itinerary's scale extended downward rather than a second rounding rule.
|
|
100
|
+
*
|
|
101
|
+
* @param series The series the chart draws.
|
|
102
|
+
* @param anchor What the scale is anchored on.
|
|
103
|
+
* @param range The window drawn, its two ends in either order. Read only where the scale is
|
|
104
|
+
* anchored on it, and the whole itinerary where omitted.
|
|
105
|
+
* @returns The domain in meters above sea level.
|
|
106
|
+
*/
|
|
107
|
+
export const anchoredDomain = (
|
|
108
|
+
series: ElevationSeries,
|
|
109
|
+
anchor: ProfileAnchor,
|
|
110
|
+
range?: ProfileRange,
|
|
111
|
+
): ElevationDomain => {
|
|
112
|
+
if (anchor === "sea-level") {
|
|
113
|
+
return { max: profileDomain(series).max, min: 0 };
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
return anchor === "window" ? profileDomain(series, range) : profileDomain(series);
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* domainTicks answers the elevations a chart's scale is labelled at, low to high: the domain's
|
|
121
|
+
* floor, its middle and its ceiling.
|
|
122
|
+
*
|
|
123
|
+
* Three, because that is what a short plot holds without its labels touching, and enough to read
|
|
124
|
+
* a curve against: the two bounds, and the halfway mark that says whether a climb is in the top
|
|
125
|
+
* or the bottom half of its range. They need no rounded lattice the way the distance axis does,
|
|
126
|
+
* because they are not a scale of chosen intervals: each states one of the frame's own bounds, so
|
|
127
|
+
* an unround figure is the honest reading of a summit, and rounding it would move the frame.
|
|
128
|
+
*/
|
|
129
|
+
export const domainTicks = (domain: ElevationDomain): readonly [number, number, number] => [
|
|
130
|
+
domain.min,
|
|
131
|
+
(domain.min + domain.max) / 2,
|
|
132
|
+
domain.max,
|
|
133
|
+
];
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* windowedExtent reads a series' elevation range over the window a chart is drawn in.
|
|
137
|
+
*
|
|
138
|
+
* With no window the series' own stated extent is returned untouched, so the unwindowed path
|
|
139
|
+
* costs nothing and cannot round differently from what `buildElevationSeries` recorded. A window
|
|
140
|
+
* that holds the whole curve is no zoom, and reads that same extent: the samples are thinned and
|
|
141
|
+
* the stated extent is not, so the two would otherwise frame one itinerary two ways.
|
|
142
|
+
*
|
|
143
|
+
* Any other window reads the band of the stretch it holds, at its own two ends and at the
|
|
144
|
+
* samples between them, so a window narrower than the gap between two samples frames the line
|
|
145
|
+
* that crosses it.
|
|
146
|
+
*/
|
|
147
|
+
const windowedExtent = (
|
|
148
|
+
series: ElevationSeries,
|
|
149
|
+
range: ProfileRange | undefined,
|
|
150
|
+
): Pick<ElevationSeries, "maxElevation" | "minElevation"> => {
|
|
151
|
+
const whole = { maxElevation: series.maxElevation, minElevation: series.minElevation };
|
|
152
|
+
if (range === undefined) {
|
|
153
|
+
return whole;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
const from = Math.min(range.from, range.to);
|
|
157
|
+
const to = Math.max(range.from, range.to);
|
|
158
|
+
const first = series.points[0];
|
|
159
|
+
const last = series.points.at(-1);
|
|
160
|
+
if (
|
|
161
|
+
first === undefined ||
|
|
162
|
+
last === undefined ||
|
|
163
|
+
(from <= first.distance && to >= last.distance)
|
|
164
|
+
) {
|
|
165
|
+
return whole;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
// A window the samples do not reach holds none of the curve. Falling back to the whole
|
|
169
|
+
// itinerary's extent draws the right frame with no curve in it, where a null extent would
|
|
170
|
+
// swap in the nominal domain and rescale the chart mid-drag.
|
|
171
|
+
const band = altitudeBand(series.points, from, to);
|
|
172
|
+
|
|
173
|
+
return band === null ? whole : { maxElevation: band.max, minElevation: band.min };
|
|
174
|
+
};
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* rangeOf resolves the window a projection is measured against.
|
|
178
|
+
*
|
|
179
|
+
* An omitted range is the whole itinerary, which is why `totalDistance` is still the parameter
|
|
180
|
+
* every projection takes: the default window's end IS the itinerary's length, so a call site
|
|
181
|
+
* that never zooms states no window.
|
|
182
|
+
*/
|
|
183
|
+
const rangeOf = (totalDistance: number, range: ProfileRange | undefined): ProfileRange =>
|
|
184
|
+
range === undefined
|
|
185
|
+
? { from: 0, to: totalDistance }
|
|
186
|
+
: { from: Math.min(range.from, range.to), to: Math.max(range.from, range.to) };
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* projectX maps a distance into the unit space WITHOUT clamping it to the frame.
|
|
190
|
+
*
|
|
191
|
+
* Internal, and used only by the path builders. A curve zoomed into a window needs the sample
|
|
192
|
+
* just outside each end to be projected honestly (off-frame, where the `<svg>` clips it), so
|
|
193
|
+
* the line enters and leaves the frame at the slope the terrain actually has. Clamping those
|
|
194
|
+
* two samples instead would stand them upright against the edges and draw a wall at each end
|
|
195
|
+
* of every zoomed chart.
|
|
196
|
+
*/
|
|
197
|
+
const projectX = (meters: number, range: ProfileRange): number => {
|
|
198
|
+
const span = range.to - range.from;
|
|
199
|
+
|
|
200
|
+
return span > 0 ? unit(((meters - range.from) / span) * PROFILE_VIEWBOX) : 0;
|
|
201
|
+
};
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* profileX maps a distance along the itinerary to the unit space, and to a CSS percentage.
|
|
205
|
+
*
|
|
206
|
+
* A zero-length itinerary collapses to the origin rather than dividing by zero.
|
|
207
|
+
*
|
|
208
|
+
* `range` narrows the frame to a stretch of the itinerary: the window's start becomes 0 and its
|
|
209
|
+
* end becomes 100, which is the whole of what zooming a profile is. It is an optional trailing
|
|
210
|
+
* parameter rather than a replacement for `totalDistance` because an omitted window IS the
|
|
211
|
+
* whole itinerary, so a call that never zooms states no window, and the two paths cannot drift.
|
|
212
|
+
*
|
|
213
|
+
* The result stays clamped to the frame in both cases, so a pin placed outside the window
|
|
214
|
+
* lands on the edge rather than off it. A caller that wants it truly gone filters the pin out;
|
|
215
|
+
* a mark hidden by clipping would still be in the tab order.
|
|
216
|
+
*/
|
|
217
|
+
export const profileX = (meters: number, totalDistance: number, range?: ProfileRange): number => {
|
|
218
|
+
const span = rangeOf(totalDistance, range);
|
|
219
|
+
|
|
220
|
+
return span.to > span.from
|
|
221
|
+
? unit(clamp01((meters - span.from) / (span.to - span.from)) * PROFILE_VIEWBOX)
|
|
222
|
+
: 0;
|
|
223
|
+
};
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* profileY maps an elevation to the unit space, inverted, and to a CSS percentage.
|
|
227
|
+
*
|
|
228
|
+
* A domain with no span centres its samples instead of pinning them to the floor, so a
|
|
229
|
+
* hand-built degenerate domain draws a line through the middle rather than along the edge.
|
|
230
|
+
*/
|
|
231
|
+
export const profileY = (elevation: number, domain: ElevationDomain): number => {
|
|
232
|
+
const span = domain.max - domain.min;
|
|
233
|
+
const fraction = span > 0 ? clamp01((elevation - domain.min) / span) : 0.5;
|
|
234
|
+
|
|
235
|
+
return unit(PROFILE_TOP_INSET + (1 - fraction) * (PROFILE_BASELINE - PROFILE_TOP_INSET));
|
|
236
|
+
};
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* drawn narrows a series to the samples a windowed curve has to draw.
|
|
240
|
+
*
|
|
241
|
+
* The window's own samples, plus the one immediately outside each end. Those two straddling
|
|
242
|
+
* samples are what make the line enter and leave the frame at the terrain's real slope: the
|
|
243
|
+
* `<svg>` clips whatever runs past its viewport, so drawing them costs nothing and omitting
|
|
244
|
+
* them would cut the curve off vertically at both edges.
|
|
245
|
+
*
|
|
246
|
+
* With no window the array passes through by identity, so nothing that never zooms pays for
|
|
247
|
+
* a copy.
|
|
248
|
+
*/
|
|
249
|
+
const drawn = (
|
|
250
|
+
points: readonly ElevationPoint[],
|
|
251
|
+
range: ProfileRange | undefined,
|
|
252
|
+
): readonly ElevationPoint[] => {
|
|
253
|
+
if (range === undefined) {
|
|
254
|
+
return points;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
const from = Math.min(range.from, range.to);
|
|
258
|
+
const to = Math.max(range.from, range.to);
|
|
259
|
+
let first = points.findIndex((point) => point.distance >= from);
|
|
260
|
+
if (first === -1) {
|
|
261
|
+
return [];
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
let last = points.length - 1;
|
|
265
|
+
while (last > first && (points[last]?.distance ?? 0) > to) {
|
|
266
|
+
last -= 1;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
// One straddling sample on each side, where there is one.
|
|
270
|
+
first = Math.max(0, first - 1);
|
|
271
|
+
last = Math.min(points.length - 1, last + 1);
|
|
272
|
+
|
|
273
|
+
return points.slice(first, last + 1);
|
|
274
|
+
};
|
|
275
|
+
|
|
276
|
+
/**
|
|
277
|
+
* profilePolyline renders a series as the `points` attribute of an SVG `<polyline>`.
|
|
278
|
+
*
|
|
279
|
+
* `range` draws only the stretch a zoomed chart shows. It projects through the unclamped
|
|
280
|
+
* mapping so the curve runs off-frame at both ends and the `<svg>` clips it, rather than
|
|
281
|
+
* standing every off-window sample upright against the edge.
|
|
282
|
+
*/
|
|
283
|
+
export const profilePolyline = (
|
|
284
|
+
points: readonly ElevationPoint[],
|
|
285
|
+
totalDistance: number,
|
|
286
|
+
domain: ElevationDomain,
|
|
287
|
+
range?: ProfileRange,
|
|
288
|
+
): string => {
|
|
289
|
+
const span = rangeOf(totalDistance, range);
|
|
290
|
+
|
|
291
|
+
return drawn(points, range)
|
|
292
|
+
.map((point) => `${projectX(point.distance, span)},${profileY(point.elevation, domain)}`)
|
|
293
|
+
.join(" ");
|
|
294
|
+
};
|
|
295
|
+
|
|
296
|
+
/** A stretch of the itinerary, drawn in a colour of its own. */
|
|
297
|
+
export interface CurveColor {
|
|
298
|
+
/** Meters from the start of the itinerary. */
|
|
299
|
+
readonly from: number;
|
|
300
|
+
/** Meters from the start of the itinerary. */
|
|
301
|
+
readonly to: number;
|
|
302
|
+
/** Any CSS colour, painted as given. This is data, not a theme token. */
|
|
303
|
+
readonly color: string;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
/** One stop of the gradient a multi-coloured curve is painted with. */
|
|
307
|
+
export interface CurveStop {
|
|
308
|
+
/** A 0..1 fraction of the itinerary, which is what an SVG `<stop offset>` takes. */
|
|
309
|
+
readonly offset: number;
|
|
310
|
+
/**
|
|
311
|
+
* The caller's colour for the stretch, or null where the caller coloured nothing.
|
|
312
|
+
*
|
|
313
|
+
* Null rather than a colour of this module's choosing, because a stretch nobody coloured is
|
|
314
|
+
* painted with the renderer's own accent, and a theme token is the renderer's to name: this
|
|
315
|
+
* entry renders nothing. `@mountaya/elements-react` paints null with `var(--mtya-accent)`, so
|
|
316
|
+
* an uncoloured stretch follows the theme it would have followed with no colours at all.
|
|
317
|
+
*/
|
|
318
|
+
readonly color: string | null;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
/**
|
|
322
|
+
* A stretch of the itinerary the caller has classified: a colour, and the word it reads as.
|
|
323
|
+
*
|
|
324
|
+
* The label is what a tooltip's dot says. Deliberately untyped as to meaning, exactly like the
|
|
325
|
+
* band strip: surface, way type, technicality, avalanche exposure, a sponsor's sectors. This
|
|
326
|
+
* module paints `from` to `to` in `color` and hands the word back, and never learns the
|
|
327
|
+
* taxonomy. A vocabulary baked in here would be Mountaya's imposed on every consumer, and
|
|
328
|
+
* would need a release to extend.
|
|
329
|
+
*/
|
|
330
|
+
export interface ProfileClass extends CurveColor {
|
|
331
|
+
readonly label: string;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
/**
|
|
335
|
+
* curveSpans normalizes stretches into distance order with no overlap.
|
|
336
|
+
*
|
|
337
|
+
* {@link curveStops} reads it, and so does the lookup, so the rule (where two stretches would
|
|
338
|
+
* share ground, the EARLIER one keeps it) is stated once for the gradient and the tooltip. A
|
|
339
|
+
* tooltip that resolved overlap the other way would name a colour the curve is not painted in,
|
|
340
|
+
* which is a disagreement no type can catch.
|
|
341
|
+
*
|
|
342
|
+
* Generic, so a classified span keeps its label through the pass, and a table's row its own
|
|
343
|
+
* members. A stretch given backwards is read in order, and one of no length is left out.
|
|
344
|
+
*/
|
|
345
|
+
export const curveSpans = <T extends ProfileRange>(stretches: readonly T[]): T[] => {
|
|
346
|
+
const ordered = stretches
|
|
347
|
+
.map((entry) => ({
|
|
348
|
+
...entry,
|
|
349
|
+
from: Math.min(entry.from, entry.to),
|
|
350
|
+
to: Math.max(entry.from, entry.to),
|
|
351
|
+
}))
|
|
352
|
+
.filter((span) => span.to > span.from)
|
|
353
|
+
.sort((a, b) => a.from - b.from);
|
|
354
|
+
|
|
355
|
+
const resolved: T[] = [];
|
|
356
|
+
let cursor = Number.NEGATIVE_INFINITY;
|
|
357
|
+
for (const span of ordered) {
|
|
358
|
+
const from = Math.max(span.from, cursor);
|
|
359
|
+
if (span.to <= from) {
|
|
360
|
+
continue;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
resolved.push({ ...span, from });
|
|
364
|
+
cursor = span.to;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
return resolved;
|
|
368
|
+
};
|
|
369
|
+
|
|
370
|
+
/**
|
|
371
|
+
* classAt finds the stretch a distance falls in, or `null` where none does.
|
|
372
|
+
*
|
|
373
|
+
* Half-open at the top, so a distance exactly on a boundary reads as the stretch that starts
|
|
374
|
+
* there rather than the one that ends there, the same way a cursor moving forward reads it.
|
|
375
|
+
* Where no stretch starts on a boundary, the one that ends there keeps it: its own last meter
|
|
376
|
+
* before a gap, and the last meter of the itinerary.
|
|
377
|
+
*
|
|
378
|
+
* The one reading of a distance against stretches: the word a hover card names, the colour it
|
|
379
|
+
* shows and the leg a cursor lights on a map are each this answer, so two of them can never name
|
|
380
|
+
* two neighbours at the meter they share. Read through {@link curveSpans}, so an overlap is
|
|
381
|
+
* resolved as the curve is painted and a stretch of no length is never the answer.
|
|
382
|
+
*
|
|
383
|
+
* @param classes The stretches, in any order.
|
|
384
|
+
* @param distance Meters from the start of the itinerary.
|
|
385
|
+
* @returns The stretch, as {@link curveSpans} states it, or `null` in a gap, before the first
|
|
386
|
+
* stretch and past the last.
|
|
387
|
+
*/
|
|
388
|
+
export const classAt = <T extends ProfileRange>(
|
|
389
|
+
classes: readonly T[],
|
|
390
|
+
distance: number,
|
|
391
|
+
): T | null => {
|
|
392
|
+
// The stretch that ends exactly here, kept for the case that none starts here.
|
|
393
|
+
let ending: T | null = null;
|
|
394
|
+
for (const span of curveSpans(classes)) {
|
|
395
|
+
if (distance >= span.from && distance < span.to) {
|
|
396
|
+
return span;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
if (distance === span.to) {
|
|
400
|
+
ending = span;
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
// The final meter of a stretch nothing follows is not a gap: a cursor at the very end of the
|
|
405
|
+
// itinerary still stands on the last stretch, and reading `null` there would blank the
|
|
406
|
+
// tooltip at exactly one position.
|
|
407
|
+
return ending;
|
|
408
|
+
};
|
|
409
|
+
|
|
410
|
+
/**
|
|
411
|
+
* One bucket of the slope ramp: everything from `grade` up to the next stop, painted in
|
|
412
|
+
* `color`.
|
|
413
|
+
*
|
|
414
|
+
* `key` rather than a label, because a label is a word and words belong to the renderer:
|
|
415
|
+
* this entry point ships no strings runtime and must not grow one. `@mountaya/elements-react`
|
|
416
|
+
* maps the key onto its own translatable table.
|
|
417
|
+
*/
|
|
418
|
+
export interface SlopeColorStop {
|
|
419
|
+
/** Degrees. Signed, so a descent bucket is negative. */
|
|
420
|
+
readonly grade: number;
|
|
421
|
+
readonly color: string;
|
|
422
|
+
readonly key: string;
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
/**
|
|
426
|
+
* The default slope ramp: steep descent, descent, flat, ascent, steep ascent.
|
|
427
|
+
*
|
|
428
|
+
* Five buckets rather than a continuous gradient, because a reader compares a stretch against
|
|
429
|
+
* a category and not against a hue. The boundaries are in degrees (roughly ±3° for the flat
|
|
430
|
+
* band and ±10° for steep), which are the angles a walker feels the difference at, and the
|
|
431
|
+
* colours run green through orange in the direction difficulty runs.
|
|
432
|
+
*/
|
|
433
|
+
export const SLOPE_COLOR_STOPS: readonly SlopeColorStop[] = [
|
|
434
|
+
{ color: "#e8590c", grade: Number.NEGATIVE_INFINITY, key: "steepDescent" },
|
|
435
|
+
{ color: "#f59f00", grade: -10, key: "descent" },
|
|
436
|
+
{ color: "#2f9e44", grade: -3, key: "flat" },
|
|
437
|
+
{ color: "#f59f00", grade: 3, key: "ascent" },
|
|
438
|
+
{ color: "#e8590c", grade: 10, key: "steepAscent" },
|
|
439
|
+
];
|
|
440
|
+
|
|
441
|
+
/**
|
|
442
|
+
* bucketFor resolves which ramp stop a grade falls in.
|
|
443
|
+
*
|
|
444
|
+
* The last stop whose threshold the grade has reached, so the table reads top to bottom the
|
|
445
|
+
* way it is written and a stop added in the middle needs no other edit.
|
|
446
|
+
*/
|
|
447
|
+
const bucketFor = (
|
|
448
|
+
stops: readonly SlopeColorStop[],
|
|
449
|
+
degrees: number,
|
|
450
|
+
): SlopeColorStop | undefined => {
|
|
451
|
+
let found: SlopeColorStop | undefined;
|
|
452
|
+
for (const stop of stops) {
|
|
453
|
+
if (degrees >= stop.grade) {
|
|
454
|
+
found = stop;
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
return found ?? stops[0];
|
|
459
|
+
};
|
|
460
|
+
|
|
461
|
+
/**
|
|
462
|
+
* stretchGrade reads the slope of the stretch that ends at a sample, in degrees.
|
|
463
|
+
*
|
|
464
|
+
* Where the sample before it stands at least {@link GRADE_WINDOW_METERS} back, the stretch is
|
|
465
|
+
* one straight line and its slope is its own. That is most long itineraries:
|
|
466
|
+
* `buildElevationSeries` thins to five hundred samples, so a 170 km course carries one every
|
|
467
|
+
* 340 m, and the window `gradeAt` centres on a sample would straddle the stretch before it and
|
|
468
|
+
* the one after, and paint a climb that tops out there as level ground.
|
|
469
|
+
*
|
|
470
|
+
* Where the samples are denser the window is the reading, for the reason it exists: two noisy
|
|
471
|
+
* samples a few meters apart are no cliff.
|
|
472
|
+
*
|
|
473
|
+
* The first sample ends no stretch, so it reads the one it starts.
|
|
474
|
+
*/
|
|
475
|
+
const stretchGrade = (points: readonly ElevationPoint[], index: number): number | null => {
|
|
476
|
+
const start = points[Math.max(0, index - 1)];
|
|
477
|
+
const end = points[Math.max(1, index)];
|
|
478
|
+
const point = points[index];
|
|
479
|
+
if (start === undefined || end === undefined || point === undefined) {
|
|
480
|
+
return null;
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
const run = end.distance - start.distance;
|
|
484
|
+
|
|
485
|
+
return run >= GRADE_WINDOW_METERS
|
|
486
|
+
? convertSlope((end.elevation - start.elevation) / run, "ratio", "degrees")
|
|
487
|
+
: gradeAt(points, point.distance);
|
|
488
|
+
};
|
|
489
|
+
|
|
490
|
+
/**
|
|
491
|
+
* slopeColors buckets an itinerary's own steepness into coloured, labelled stretches.
|
|
492
|
+
*
|
|
493
|
+
* Grade is read with `gradeAt` where the sampling supports it, so a bucket boundary is a real
|
|
494
|
+
* change in the terrain rather than a change between two adjacent DEM samples, and is the
|
|
495
|
+
* sample interval's own where it does not: see {@link stretchGrade}. Adjacent samples in the
|
|
496
|
+
* same bucket coalesce into one stretch, which is what keeps the gradient a handful of stops
|
|
497
|
+
* rather than one per sample: a five-hundred-sample itinerary would otherwise mount a
|
|
498
|
+
* thousand-stop gradient and repaint it on every hover.
|
|
499
|
+
*
|
|
500
|
+
* The result is a {@link ProfileClass} list, which is the same shape a caller's own
|
|
501
|
+
* classification takes: one colouring pipeline, whether the stretches were computed or stated.
|
|
502
|
+
*
|
|
503
|
+
* @param points The series' samples, ascending by distance.
|
|
504
|
+
* @param stops The ramp's buckets, ascending by grade.
|
|
505
|
+
* @default stops {@link SLOPE_COLOR_STOPS}
|
|
506
|
+
*/
|
|
507
|
+
export const slopeColors = (
|
|
508
|
+
points: readonly ElevationPoint[],
|
|
509
|
+
stops: readonly SlopeColorStop[] = SLOPE_COLOR_STOPS,
|
|
510
|
+
): ProfileClass[] => {
|
|
511
|
+
if (points.length < 2 || stops.length === 0) {
|
|
512
|
+
return [];
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
const spans: ProfileClass[] = [];
|
|
516
|
+
for (const [index, point] of points.entries()) {
|
|
517
|
+
const grade = stretchGrade(points, index);
|
|
518
|
+
if (grade === null) {
|
|
519
|
+
continue;
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
const bucket = bucketFor(stops, grade);
|
|
523
|
+
if (bucket === undefined) {
|
|
524
|
+
continue;
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
const open = spans.at(-1);
|
|
528
|
+
if (open !== undefined && open.label === bucket.key) {
|
|
529
|
+
spans[spans.length - 1] = { ...open, to: point.distance };
|
|
530
|
+
continue;
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
spans.push({
|
|
534
|
+
color: bucket.color,
|
|
535
|
+
// Butted against the stretch before it, so the ramp has no unpainted seams.
|
|
536
|
+
from: open?.to ?? point.distance,
|
|
537
|
+
label: bucket.key,
|
|
538
|
+
to: point.distance,
|
|
539
|
+
});
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
return spans.filter((span) => span.to > span.from);
|
|
543
|
+
};
|
|
544
|
+
|
|
545
|
+
/**
|
|
546
|
+
* curveStops turns coloured stretches of itinerary into the gradient that paints the curve.
|
|
547
|
+
*
|
|
548
|
+
* A gradient rather than one path per stretch, for two reasons that both come down to the
|
|
549
|
+
* joins. Separate paths meet at a seam that antialiases into a hairline of background at
|
|
550
|
+
* every boundary, and each one needs its own clip in a space the caller can resize; a single
|
|
551
|
+
* path filled with a gradient has no boundary to seam. **Every colour change is a hard edge**
|
|
552
|
+
* (two stops at the same offset), because these are stretches of itinerary, not a blend.
|
|
553
|
+
*
|
|
554
|
+
* Stretches are taken in distance order and cannot overlap: where two would, the earlier one
|
|
555
|
+
* keeps the shared ground. Overlap is the one case a gradient genuinely cannot express (a
|
|
556
|
+
* stop offset can only move forward), so it is resolved here, in the open, rather than
|
|
557
|
+
* emitting stops that go backwards and render as a colour nobody asked for.
|
|
558
|
+
*
|
|
559
|
+
* Ground no stretch covers is emitted as stops whose `color` is null, which the renderer paints
|
|
560
|
+
* with its own accent. The stops never name a colour the caller did not pass.
|
|
561
|
+
*
|
|
562
|
+
* @returns The stops in offset order, or nothing at all when no stretch survives, which is the
|
|
563
|
+
* signal to paint the curve with the plain CSS fill and mount no gradient: the common case,
|
|
564
|
+
* and free.
|
|
565
|
+
*/
|
|
566
|
+
export const curveStops = (
|
|
567
|
+
colors: readonly CurveColor[],
|
|
568
|
+
totalDistance: number,
|
|
569
|
+
range?: ProfileRange,
|
|
570
|
+
): CurveStop[] => {
|
|
571
|
+
const spans = curveSpans(colors);
|
|
572
|
+
|
|
573
|
+
const stops: CurveStop[] = [];
|
|
574
|
+
let cursor = 0;
|
|
575
|
+
|
|
576
|
+
for (const span of spans) {
|
|
577
|
+
// Clamped to the cursor rather than skipped: a stretch that starts inside the previous
|
|
578
|
+
// one still paints the ground the previous one did not reach.
|
|
579
|
+
const start = Math.max(profileX(span.from, totalDistance, range), cursor);
|
|
580
|
+
const end = profileX(span.to, totalDistance, range);
|
|
581
|
+
if (end <= start) {
|
|
582
|
+
continue;
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
if (start > cursor) {
|
|
586
|
+
stops.push({ color: null, offset: cursor }, { color: null, offset: start });
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
stops.push({ color: span.color, offset: start }, { color: span.color, offset: end });
|
|
590
|
+
cursor = end;
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
if (stops.length === 0) {
|
|
594
|
+
return [];
|
|
595
|
+
}
|
|
596
|
+
|
|
597
|
+
if (cursor < PROFILE_VIEWBOX) {
|
|
598
|
+
stops.push({ color: null, offset: cursor }, { color: null, offset: PROFILE_VIEWBOX });
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
return (
|
|
602
|
+
stops
|
|
603
|
+
// Two stretches of the same colour meeting at a boundary emit that boundary twice, which
|
|
604
|
+
// is a hard edge between a colour and itself: nothing to see, and two stops a renderer
|
|
605
|
+
// cannot tell apart. Dropping the repeat is what makes (offset, colour) an identity, with
|
|
606
|
+
// null a colour of its own. Offsets only ever move forward, so a repeat is always adjacent.
|
|
607
|
+
.filter((stop, index) => {
|
|
608
|
+
const previous = stops[index - 1];
|
|
609
|
+
|
|
610
|
+
return (
|
|
611
|
+
previous === undefined || previous.color !== stop.color || previous.offset !== stop.offset
|
|
612
|
+
);
|
|
613
|
+
})
|
|
614
|
+
.map((stop) => ({ color: stop.color, offset: stop.offset / PROFILE_VIEWBOX }))
|
|
615
|
+
);
|
|
616
|
+
};
|
|
617
|
+
|
|
618
|
+
/**
|
|
619
|
+
* profileAreaPath renders a series as the filled region under its curve.
|
|
620
|
+
*
|
|
621
|
+
* Closed against the bottom of the viewBox rather than against the baseline, so the fill
|
|
622
|
+
* reads as ground under the itinerary rather than as a band floating above the frame.
|
|
623
|
+
*/
|
|
624
|
+
export const profileAreaPath = (
|
|
625
|
+
points: readonly ElevationPoint[],
|
|
626
|
+
totalDistance: number,
|
|
627
|
+
domain: ElevationDomain,
|
|
628
|
+
range?: ProfileRange,
|
|
629
|
+
): string => {
|
|
630
|
+
const span = rangeOf(totalDistance, range);
|
|
631
|
+
const visible = drawn(points, range);
|
|
632
|
+
const first = visible[0];
|
|
633
|
+
const last = visible.at(-1);
|
|
634
|
+
if (first === undefined || last === undefined) {
|
|
635
|
+
return "";
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
const body = visible
|
|
639
|
+
.map((point) => `L${projectX(point.distance, span)},${profileY(point.elevation, domain)}`)
|
|
640
|
+
.join("");
|
|
641
|
+
|
|
642
|
+
return `M${projectX(first.distance, span)},${PROFILE_VIEWBOX}${body}L${projectX(
|
|
643
|
+
last.distance,
|
|
644
|
+
span,
|
|
645
|
+
)},${PROFILE_VIEWBOX}Z`;
|
|
646
|
+
};
|