@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,89 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* An instant a place records, read as the client reads a timestamp and handed to the caller's
|
|
3
|
+
* formatter: a cut-off and a `date` field alike.
|
|
4
|
+
*
|
|
5
|
+
* A wall-clock time needs a time zone, and only the application holds the reader's, so the words a
|
|
6
|
+
* cut-off is printed in are the caller's formatter's. What reaches that formatter is the instant
|
|
7
|
+
* itself, never its text: a formatter handed text parses it again, and two formatters parse one
|
|
8
|
+
* text two ways. The reading is the contract's, the one `@mountaya/client` decodes a declared
|
|
9
|
+
* instant by. This package takes the client as a type-only peer, so it states the grammar here
|
|
10
|
+
* rather than importing the client's.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* A timestamp carrying a zone, as the contract writes one, capturing the fields the calendar check
|
|
15
|
+
* reads: year, month, day, hour, minute, second, and the offset's hours and minutes.
|
|
16
|
+
*/
|
|
17
|
+
const timestamp =
|
|
18
|
+
/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.\d+)?(?:Z|[+-](\d{2}):(\d{2}))$/;
|
|
19
|
+
|
|
20
|
+
/** The days in each month of a common year, January first. */
|
|
21
|
+
const MONTH_DAYS = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
|
22
|
+
|
|
23
|
+
/** isLeapYear reports whether a year of the proleptic Gregorian calendar has a leap day. */
|
|
24
|
+
const isLeapYear = (year: number): boolean =>
|
|
25
|
+
(year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;
|
|
26
|
+
|
|
27
|
+
/** daysIn answers how many days a month of a year has, January being 1. */
|
|
28
|
+
const daysIn = (year: number, month: number): number =>
|
|
29
|
+
month === 2 && isLeapYear(year) ? 29 : (MONTH_DAYS[month - 1] ?? 0);
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* readInstant answers the instant a text names, or null where it names none: a date with no time,
|
|
33
|
+
* a time with no zone, a lowercase `t` or `z`, an offset without its colon, a second of 60, an
|
|
34
|
+
* hour of 24 and a day the month does not have each name none.
|
|
35
|
+
*/
|
|
36
|
+
const readInstant = (value: string): Date | null => {
|
|
37
|
+
const fields = timestamp.exec(value);
|
|
38
|
+
if (fields === null) {
|
|
39
|
+
return null;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// An offset of `Z` captures nothing, which reads as zero hours and zero minutes.
|
|
43
|
+
const field = (index: number): number => Number(fields[index] ?? 0);
|
|
44
|
+
const year = field(1);
|
|
45
|
+
const month = field(2);
|
|
46
|
+
const day = field(3);
|
|
47
|
+
const named =
|
|
48
|
+
month >= 1 &&
|
|
49
|
+
month <= 12 &&
|
|
50
|
+
day >= 1 &&
|
|
51
|
+
day <= daysIn(year, month) &&
|
|
52
|
+
field(4) <= 23 &&
|
|
53
|
+
field(5) <= 59 &&
|
|
54
|
+
field(6) <= 59 &&
|
|
55
|
+
field(7) <= 23 &&
|
|
56
|
+
field(8) <= 59;
|
|
57
|
+
if (!named) {
|
|
58
|
+
return null;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
const instant = new Date(value);
|
|
62
|
+
|
|
63
|
+
return Number.isNaN(instant.getTime()) ? null : instant;
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* formattedInstant writes an instant a place records through the caller's formatter: it hands
|
|
68
|
+
* `format` the instant `value` names, read as the client reads a timestamp, and answers `value` as
|
|
69
|
+
* it stands where it names none.
|
|
70
|
+
*
|
|
71
|
+
* @param value The instant as the place records it, an RFC 3339 timestamp with its zone.
|
|
72
|
+
* @param format The caller's formatter, which writes an instant in the reader's zone and language.
|
|
73
|
+
* @returns What the formatter writes, or `value` itself where it names no instant.
|
|
74
|
+
*
|
|
75
|
+
* @example
|
|
76
|
+
* ```ts
|
|
77
|
+
* import { formattedInstant } from "@mountaya/elements/profile";
|
|
78
|
+
*
|
|
79
|
+
* const time = new Intl.DateTimeFormat("fr", { timeStyle: "short", timeZone: "Europe/Paris" });
|
|
80
|
+
*
|
|
81
|
+
* formattedInstant("2026-07-14T09:00:00.000Z", (instant) => time.format(instant)); // "11:00"
|
|
82
|
+
* formattedInstant("at dawn", (instant) => time.format(instant)); // "at dawn"
|
|
83
|
+
* ```
|
|
84
|
+
*/
|
|
85
|
+
export const formattedInstant = (value: string, format: (instant: Date) => string): string => {
|
|
86
|
+
const instant = readInstant(value);
|
|
87
|
+
|
|
88
|
+
return instant === null ? value : format(instant);
|
|
89
|
+
};
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One bounded cache for every `Intl` formatter this family constructs.
|
|
3
|
+
*
|
|
4
|
+
* Constructing an `Intl.*Format` is expensive (the runtime resolves a locale, loads its data,
|
|
5
|
+
* and builds a pattern), and these run on a scrub: once per readout, per pointer move, once per
|
|
6
|
+
* row of a list that re-renders on every frame of a drag. A memo written beside each surface
|
|
7
|
+
* would carry its own key, its own growth policy, and its own idea of which options belong in
|
|
8
|
+
* the key, and a key that is too loose cannot tell two formatters apart.
|
|
9
|
+
*
|
|
10
|
+
* It is BOUNDED. A cache keyed on a locale and an options object is keyed on something a caller
|
|
11
|
+
* can vary without limit (a per-itinerary time zone, a per-row fraction digit count), so an
|
|
12
|
+
* unbounded map in a long-lived studio session is a leak with no ceiling. The eviction is the
|
|
13
|
+
* crudest one that works: full at the cap, clear, refill. Every entry is reconstructible and
|
|
14
|
+
* none of them is expensive enough to justify tracking use.
|
|
15
|
+
*
|
|
16
|
+
* It lives in `@mountaya/elements` rather than one level up because `@mountaya/studio` and both
|
|
17
|
+
* React packages all format, and a second copy beside this one would be a second answer to
|
|
18
|
+
* "is this the same formatter?".
|
|
19
|
+
*
|
|
20
|
+
* **`format` results are not cached, only the formatters.** The output of one is a pure
|
|
21
|
+
* function of its input; what is worth keeping is the construction.
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* CACHE_LIMIT is how many entries are held before the cache is emptied.
|
|
26
|
+
*
|
|
27
|
+
* Sized for the real shape of the demand rather than guessed: a studio session formats in one
|
|
28
|
+
* locale, with a handful of option shapes per kind, and a time zone per itinerary it has open.
|
|
29
|
+
* A ceiling this far above that is never reached in a session; one that IS reached is a caller
|
|
30
|
+
* varying options per render, which the reset then bounds.
|
|
31
|
+
*/
|
|
32
|
+
const CACHE_LIMIT = 64;
|
|
33
|
+
|
|
34
|
+
const cache = new Map<string, unknown>();
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* resolve returns the cached entry for a key, building one when there is none.
|
|
38
|
+
*
|
|
39
|
+
* An entry is a formatter, or the language tag one is built for: `upperCase` holds the tag a
|
|
40
|
+
* language resolves to, which is a string and no formatter. The construction is passed as a
|
|
41
|
+
* thunk rather than a value so a hit never builds one, which is the whole point. The cast on
|
|
42
|
+
* the way out is the one this module cannot avoid, since a single map holds entries of
|
|
43
|
+
* unrelated kinds, and it is safe because the KEY carries the kind: every caller below prefixes
|
|
44
|
+
* its own, so two kinds can never collide on one entry.
|
|
45
|
+
*/
|
|
46
|
+
const resolve = <T>(key: string, build: () => T): T => {
|
|
47
|
+
const cached = cache.get(key);
|
|
48
|
+
if (cached !== undefined) {
|
|
49
|
+
return cached as T;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// Full, so empty it. Every entry is reconstructible and none is expensive enough to justify
|
|
53
|
+
// tracking which was used last: an LRU here would cost more bookkeeping than it saves.
|
|
54
|
+
if (cache.size >= CACHE_LIMIT) {
|
|
55
|
+
cache.clear();
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
const created = build();
|
|
59
|
+
cache.set(key, created);
|
|
60
|
+
|
|
61
|
+
return created;
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* FALLBACK_LOCALE is the language a formatter is built in where the tag asked for is one `Intl`
|
|
66
|
+
* refuses: English, the language `defaultUnits` holds.
|
|
67
|
+
*/
|
|
68
|
+
const FALLBACK_LOCALE = "en";
|
|
69
|
+
|
|
70
|
+
/** Whether `Intl` takes a string as a language tag, which it decides by the tag's form alone. */
|
|
71
|
+
const isLanguageTag = (tag: string): boolean => {
|
|
72
|
+
try {
|
|
73
|
+
Intl.getCanonicalLocales(tag);
|
|
74
|
+
|
|
75
|
+
return true;
|
|
76
|
+
} catch {
|
|
77
|
+
// A `RangeError` is how `Intl` says the string is no tag. That is the answer asked for.
|
|
78
|
+
return false;
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* localeFor reads a language as a tag `Intl` builds a formatter for.
|
|
84
|
+
*
|
|
85
|
+
* `Intl` throws a `RangeError` for a string that is not a well-formed tag, and it would throw
|
|
86
|
+
* it out of whichever render formats first, outside this package's error family. So a language
|
|
87
|
+
* `Intl` refuses is read the way every other preference outside its vocabulary is: as one it
|
|
88
|
+
* knows. An underscore reads as the hyphen BCP 47 writes, so the POSIX spelling `fr_CA` is
|
|
89
|
+
* `fr-CA`, and a string that is still no tag is {@link FALLBACK_LOCALE}.
|
|
90
|
+
*
|
|
91
|
+
* A well-formed tag is handed over as given, for `Intl` to resolve as it always has. It runs
|
|
92
|
+
* where a formatter is built, never on a cache hit.
|
|
93
|
+
*/
|
|
94
|
+
const localeFor = (locale: string): string => {
|
|
95
|
+
if (isLanguageTag(locale)) {
|
|
96
|
+
return locale;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
const hyphenated = locale.replaceAll("_", "-");
|
|
100
|
+
|
|
101
|
+
return isLanguageTag(hyphenated) ? hyphenated : FALLBACK_LOCALE;
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* upperCase folds text to capitals by the rules of a language: Turkish `iptal` reads `İPTAL`,
|
|
106
|
+
* with the dot its capital keeps, where a fold by no language's rules reads `IPTAL`.
|
|
107
|
+
*
|
|
108
|
+
* A language `Intl` refuses as a tag folds as the tag it spells with hyphens, or as English,
|
|
109
|
+
* the way every formatter here reads one. The tag is resolved once and kept with the
|
|
110
|
+
* formatters, since a label is folded once a frame.
|
|
111
|
+
*
|
|
112
|
+
* @param text The text as it is written.
|
|
113
|
+
* @param language The BCP 47 tag of the language the text is in.
|
|
114
|
+
*/
|
|
115
|
+
export const upperCase = (text: string, language: string): string =>
|
|
116
|
+
text.toLocaleUpperCase(resolve(`tag|${language}`, () => localeFor(language)));
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* A memoized `Intl.Segmenter` that splits a text into graphemes: what a reader sees as its
|
|
120
|
+
* characters, a letter with the marks written over it, and an emoji with the joiners and
|
|
121
|
+
* modifiers that make it one. Where a text breaks into characters is the same in every language,
|
|
122
|
+
* so it is built in the fallback language alone.
|
|
123
|
+
*/
|
|
124
|
+
export const graphemeSegmenter = (): Intl.Segmenter =>
|
|
125
|
+
resolve(
|
|
126
|
+
"segmenter|grapheme",
|
|
127
|
+
() => new Intl.Segmenter(FALLBACK_LOCALE, { granularity: "grapheme" }),
|
|
128
|
+
);
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* A memoized `Intl.NumberFormat` for one locale and option shape.
|
|
132
|
+
*
|
|
133
|
+
* A language `Intl` refuses as a tag formats as the tag it spells with hyphens, or in English.
|
|
134
|
+
* An option `Intl` refuses still throws its `RangeError`.
|
|
135
|
+
*/
|
|
136
|
+
export const numberFormat = (
|
|
137
|
+
locale: string,
|
|
138
|
+
options: Intl.NumberFormatOptions = {},
|
|
139
|
+
): Intl.NumberFormat =>
|
|
140
|
+
resolve(
|
|
141
|
+
`number|${locale}|${JSON.stringify(options)}`,
|
|
142
|
+
() => new Intl.NumberFormat(localeFor(locale), options),
|
|
143
|
+
);
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* Whether the runtime's zone data holds a time zone: `Intl` refuses a zone it does not hold with a
|
|
147
|
+
* `RangeError`, which is the answer asked for. Kept with the formatters, since a zone is asked of
|
|
148
|
+
* every date a surface writes.
|
|
149
|
+
*/
|
|
150
|
+
const holdsTimeZone = (timeZone: string): boolean =>
|
|
151
|
+
resolve(`timeZone|${timeZone}`, () => {
|
|
152
|
+
try {
|
|
153
|
+
return (
|
|
154
|
+
new Intl.DateTimeFormat(FALLBACK_LOCALE, { timeZone }).resolvedOptions().timeZone !== ""
|
|
155
|
+
);
|
|
156
|
+
} catch {
|
|
157
|
+
return false;
|
|
158
|
+
}
|
|
159
|
+
});
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* A memoized `Intl.DateTimeFormat` for one locale and option shape, writing dates in the
|
|
163
|
+
* Gregorian calendar.
|
|
164
|
+
*
|
|
165
|
+
* The calendar is Gregorian whatever calendar the locale keeps, its tag names (`-u-ca-buddhist`)
|
|
166
|
+
* or the options ask for, so a Thai reader's date carries the year 2026 and never the Buddhist
|
|
167
|
+
* year 2569: every Mountaya SDK writes a date so, the one calendar each platform's locale services
|
|
168
|
+
* all write. The fields, their order, their words and their digits stay the locale's own.
|
|
169
|
+
*
|
|
170
|
+
* A language `Intl` refuses as a tag formats as the tag it spells with hyphens, or in English.
|
|
171
|
+
*
|
|
172
|
+
* @param locale The BCP 47 tag of the locale a date is written for.
|
|
173
|
+
* @param options The options `Intl.DateTimeFormat` takes: `dateStyle` for the locale's own date
|
|
174
|
+
* of a length, `timeStyle` (`short` or `medium`, the lengths every SDK writes alike) for its own
|
|
175
|
+
* time of day on the locale's own clock, both joined as the locale joins them, and `timeZone` for
|
|
176
|
+
* the IANA zone a date is placed in.
|
|
177
|
+
* @returns The formatter, or `null` where `options.timeZone` names a zone the runtime's zone data
|
|
178
|
+
* does not hold, which writes no date.
|
|
179
|
+
*
|
|
180
|
+
* @example
|
|
181
|
+
* ```ts
|
|
182
|
+
* import { dateTimeFormat } from "@mountaya/elements/profile";
|
|
183
|
+
*
|
|
184
|
+
* dateTimeFormat("th-TH", { dateStyle: "long", timeZone: "UTC" })?.format(new Date(0));
|
|
185
|
+
* // "1 มกราคม ค.ศ. 1970"
|
|
186
|
+
* ```
|
|
187
|
+
*/
|
|
188
|
+
export const dateTimeFormat = (
|
|
189
|
+
locale: string,
|
|
190
|
+
options: Intl.DateTimeFormatOptions = {},
|
|
191
|
+
): Intl.DateTimeFormat | null =>
|
|
192
|
+
options.timeZone === undefined || holdsTimeZone(options.timeZone)
|
|
193
|
+
? resolve(
|
|
194
|
+
`dateTime|${locale}|${JSON.stringify(options)}`,
|
|
195
|
+
() => new Intl.DateTimeFormat(localeFor(locale), { ...options, calendar: "gregory" }),
|
|
196
|
+
)
|
|
197
|
+
: null;
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* A memoized `Intl.RelativeTimeFormat` for one locale and option shape.
|
|
201
|
+
*
|
|
202
|
+
* A language `Intl` refuses as a tag formats as the tag it spells with hyphens, or in English.
|
|
203
|
+
*/
|
|
204
|
+
export const relativeTimeFormat = (
|
|
205
|
+
locale: string,
|
|
206
|
+
options: Intl.RelativeTimeFormatOptions = {},
|
|
207
|
+
): Intl.RelativeTimeFormat =>
|
|
208
|
+
resolve(
|
|
209
|
+
`relativeTime|${locale}|${JSON.stringify(options)}`,
|
|
210
|
+
() => new Intl.RelativeTimeFormat(localeFor(locale), options),
|
|
211
|
+
);
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* A memoized `Intl.DisplayNames` for one locale and option shape.
|
|
215
|
+
*
|
|
216
|
+
* A language `Intl` refuses as a tag names things as the tag it spells with hyphens does, or in
|
|
217
|
+
* English.
|
|
218
|
+
*/
|
|
219
|
+
export const displayNames = (
|
|
220
|
+
locale: string,
|
|
221
|
+
options: Intl.DisplayNamesOptions,
|
|
222
|
+
): Intl.DisplayNames =>
|
|
223
|
+
resolve(
|
|
224
|
+
`displayNames|${locale}|${JSON.stringify(options)}`,
|
|
225
|
+
() => new Intl.DisplayNames([localeFor(locale)], options),
|
|
226
|
+
);
|
|
227
|
+
|
|
228
|
+
/**
|
|
229
|
+
* clearIntlCache empties the cache.
|
|
230
|
+
*
|
|
231
|
+
* Published for one reader: a suite asserting that a formatter is constructed once, which
|
|
232
|
+
* cannot observe that without a way to start from empty. Nothing in the shipped source calls
|
|
233
|
+
* it, and `boundary.test.ts` is what keeps that true.
|
|
234
|
+
*/
|
|
235
|
+
export const clearIntlCache = (): void => {
|
|
236
|
+
cache.clear();
|
|
237
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The leg a reader points at, lit on the map beside a profile or a table.
|
|
3
|
+
*
|
|
4
|
+
* The map holds one emphasis slot, written by whichever element a pointer is over, so which
|
|
5
|
+
* element may write it and which may clear it is decided here, against the emphasis calls a map
|
|
6
|
+
* answers. The stretch lit is the series cut between the leg's two ends (`lineBetween`), the same
|
|
7
|
+
* line the chart drew. It renders nothing.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import type { Feature, Geometry } from "geojson";
|
|
11
|
+
|
|
12
|
+
/** The emphasis calls of a map an element lights a leg through. */
|
|
13
|
+
export interface LegEmphasisMap {
|
|
14
|
+
setEmphasis(
|
|
15
|
+
feature: Feature | null,
|
|
16
|
+
options?: { readonly color?: string | undefined } | undefined,
|
|
17
|
+
): void;
|
|
18
|
+
clearEmphasis(): void;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* writeLegEmphasis lights the stretch an element points at on the map's emphasis slot, or takes
|
|
23
|
+
* down what the element lit where it points at none, and answers whether the slot holds the
|
|
24
|
+
* element's stretch afterwards.
|
|
25
|
+
*
|
|
26
|
+
* An element clears only a slot it wrote: two elements over one map would otherwise take turns
|
|
27
|
+
* clearing each other's stretch as a pointer left one for the other, and an element that never
|
|
28
|
+
* pointed at a leg leaves the slot as it found it.
|
|
29
|
+
*
|
|
30
|
+
* @param map The map whose emphasis slot is written.
|
|
31
|
+
* @param lit Whether the slot holds this element's stretch.
|
|
32
|
+
* @param stretch The stretch pointed at, or `null` where the element points at none.
|
|
33
|
+
* @param color The colour the stretch is lit in, or `undefined` for the map's own.
|
|
34
|
+
* @returns Whether the slot holds this element's stretch after the write.
|
|
35
|
+
*/
|
|
36
|
+
export const writeLegEmphasis = (
|
|
37
|
+
map: LegEmphasisMap,
|
|
38
|
+
lit: boolean,
|
|
39
|
+
stretch: Geometry | null,
|
|
40
|
+
color?: string,
|
|
41
|
+
): boolean => {
|
|
42
|
+
if (stretch === null) {
|
|
43
|
+
if (lit) {
|
|
44
|
+
map.clearEmphasis();
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
return false;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
map.setEmphasis({ geometry: stretch, properties: {}, type: "Feature" }, { color });
|
|
51
|
+
|
|
52
|
+
return true;
|
|
53
|
+
};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import type { SurfaceType, WayType } from "@mountaya/client";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The classification palettes an elevation profile's bars are filled from: one colour per surface
|
|
5
|
+
* and one per way type, for the stretches a routed segment's analysis classifies.
|
|
6
|
+
*
|
|
7
|
+
* Each is keyed by the contract's own enum, `SurfaceType` and `WayType` from `@mountaya/client`,
|
|
8
|
+
* so every value has a colour and a value the contract adds fails to type-check until it is given
|
|
9
|
+
* one. They are a fixed data-visualization scale of hex literals rather than theme tokens, so a
|
|
10
|
+
* legend reads the same under every organization's branding. The slope ramp is not one of them: it
|
|
11
|
+
* is `slopeRampColor`, a continuous blend rather than a lookup.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* surfaceColors maps every surface classification to the hex colour the elevation profile's
|
|
16
|
+
* surface bar fills that stretch with.
|
|
17
|
+
*
|
|
18
|
+
* Grouped by material family, so the bar reads as a material legend at a glance: slate and stone
|
|
19
|
+
* greys for hard surfaces (asphalt, concrete, paving), browns and ambers for loose ground (dirt,
|
|
20
|
+
* gravel, sand), greens for vegetation (grass, grass paver). An unclassified stretch (`unknown`)
|
|
21
|
+
* takes the neutral grey {@link wayTypeColors} gives it too.
|
|
22
|
+
*/
|
|
23
|
+
export const surfaceColors: Readonly<Record<SurfaceType, string>> = {
|
|
24
|
+
asphalt: "#334155",
|
|
25
|
+
cobblestone: "#a8a29e",
|
|
26
|
+
"compacted-gravel": "#b45309",
|
|
27
|
+
concrete: "#64748b",
|
|
28
|
+
dirt: "#92400e",
|
|
29
|
+
"fine-gravel": "#ca8a04",
|
|
30
|
+
grass: "#22c55e",
|
|
31
|
+
"grass-paver": "#65a30d",
|
|
32
|
+
gravel: "#d4a574",
|
|
33
|
+
ground: "#78716c",
|
|
34
|
+
ice: "#bfdbfe",
|
|
35
|
+
metal: "#71717a",
|
|
36
|
+
paved: "#475569",
|
|
37
|
+
"paving-stones": "#6b7280",
|
|
38
|
+
sand: "#fbbf24",
|
|
39
|
+
unknown: "#94a3b8",
|
|
40
|
+
unpaved: "#d97706",
|
|
41
|
+
wood: "#a16207",
|
|
42
|
+
woodchips: "#854d0e",
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* wayTypeColors maps every way-type classification to the hex colour the elevation profile's
|
|
47
|
+
* way-type bar fills that stretch with.
|
|
48
|
+
*
|
|
49
|
+
* Grouped by who the way is built for, so the bar reads as a way-type legend at a glance: blues
|
|
50
|
+
* for cycle infrastructure, greens for natural paths, oranges and reds for vehicle roads, purples
|
|
51
|
+
* and indigos for pedestrian ways. An unclassified stretch (`unknown`) takes the neutral grey
|
|
52
|
+
* {@link surfaceColors} gives it too.
|
|
53
|
+
*/
|
|
54
|
+
export const wayTypeColors: Readonly<Record<WayType, string>> = {
|
|
55
|
+
construction: "#f43f5e",
|
|
56
|
+
cycleway: "#3b82f6",
|
|
57
|
+
ferry: "#06b6d4",
|
|
58
|
+
footway: "#8b5cf6",
|
|
59
|
+
path: "#22c55e",
|
|
60
|
+
road: "#f97316",
|
|
61
|
+
"state-road": "#ef4444",
|
|
62
|
+
steps: "#6366f1",
|
|
63
|
+
street: "#eab308",
|
|
64
|
+
track: "#a16207",
|
|
65
|
+
unknown: "#94a3b8",
|
|
66
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The box the elevation profile is drawn in, not the projections it is drawn with.
|
|
3
|
+
*
|
|
4
|
+
* The rest of this directory owns those: the 0..100 unit space, its insets, the elevation
|
|
5
|
+
* domain a curve is fitted to. Nothing here restates them. What lives here is the frame around
|
|
6
|
+
* the plot (the gutter the analysis bars' captions occupy, the inset their right edge stops
|
|
7
|
+
* at, the height the unit space is stretched into) and the one map from a distance to a
|
|
8
|
+
* position along it.
|
|
9
|
+
*
|
|
10
|
+
* It is here rather than in `@mountaya/elements-react` because two surfaces lay out against
|
|
11
|
+
* these numbers and only one of them is the chart: the React elevation element draws the curve,
|
|
12
|
+
* and the studio's analysis bars draw coloured bands underneath it that have to start and stop
|
|
13
|
+
* on the same pixels. A constant two packages measure against is a rule, and a port writing its
|
|
14
|
+
* own bar strip needs it before it has written a single widget.
|
|
15
|
+
*
|
|
16
|
+
* No colour lives here. The tint of the bars' cursor line is written in Mantine's custom
|
|
17
|
+
* properties, so it names a design system, which this package's `boundary.test.ts` refuses
|
|
18
|
+
* outright: geometry ports, and a tint expressed in somebody else's custom properties does not.
|
|
19
|
+
* It lives in `@mountaya/studio-react`, the package that brings Mantine.
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* PROFILE_LABEL_COLUMN is the pixel gutter the analysis bars' captions occupy. It matches the
|
|
24
|
+
* elevation element's own axis gutter (`--mtya-profile-axis-size`, restated in that element's
|
|
25
|
+
* stylesheet because CSS cannot import a constant), so the bars' strips start exactly where the
|
|
26
|
+
* curve does and a surface band sits under the stretch of route it describes. Widening one
|
|
27
|
+
* without the other slides the two apart, and nothing renders wrong enough to notice, so
|
|
28
|
+
* `elementTokens.test.ts` in `@mountaya/elements-react` holds this number against the token the
|
|
29
|
+
* sheet declares. Sized so a four-digit metric elevation label ("2,600 m") and a two-word
|
|
30
|
+
* caption ("Way type") each fit on one line.
|
|
31
|
+
*/
|
|
32
|
+
export const PROFILE_LABEL_COLUMN = 68;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* PROFILE_PLOT_RIGHT_INSET is the pixel inset at the right of the chart and the analysis
|
|
36
|
+
* bars alike: breathing room so the curve's last sample and the final band do not run into
|
|
37
|
+
* the panel's edge. Shared for the same reason as the gutter above: both plots have to end
|
|
38
|
+
* on the same x or a band stops describing the stretch above it.
|
|
39
|
+
*/
|
|
40
|
+
export const PROFILE_PLOT_RIGHT_INSET = 12;
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* PROFILE_CHART_HEIGHT is the plot's height in CSS pixels, handed to the elevation element
|
|
44
|
+
* as its `height`. The curve is drawn in a stretched unit space rather than in pixels, so
|
|
45
|
+
* this is the box that space is stretched into and nothing else reads it: a mark placed on
|
|
46
|
+
* the curve is placed by percentage, so the waypoint overlay does not read it. A starting value
|
|
47
|
+
* tuned visually by the caller.
|
|
48
|
+
*/
|
|
49
|
+
export const PROFILE_CHART_HEIGHT = 80;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* distanceToFraction maps a cumulative distance (km) to its fraction along the profile's
|
|
53
|
+
* full distance, clamped to [0, 1] so a value at (or just past) the curve's extent still
|
|
54
|
+
* resolves inside the plot rather than off its edge. A non-positive total collapses to 0.
|
|
55
|
+
* The analysis bars' cells and their synced cursor line both call it, so a band and the line
|
|
56
|
+
* at the same distance land on the same x fraction the curve is drawn against.
|
|
57
|
+
*/
|
|
58
|
+
export const distanceToFraction = (km: number, totalKm: number): number =>
|
|
59
|
+
totalKm > 0 ? Math.min(1, Math.max(0, km / totalKm)) : 0;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { ElevationPoint, ProfileRange } from "./elevation.js";
|
|
2
|
+
import { nearestPointIndexAt } from "./elevation.js";
|
|
3
|
+
import { PROFILE_VIEWBOX } from "./scale.js";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* How many buckets a scrub is quantized into.
|
|
7
|
+
*
|
|
8
|
+
* On an eight-hundred-pixel chart that is a little over three pixels a bucket, which is finer
|
|
9
|
+
* than a pointer is read and far finer than a curve drawn from five hundred samples can
|
|
10
|
+
* distinguish. The count is fixed rather than derived from the element's width because
|
|
11
|
+
* deriving it would mean measuring the element, which is the whole thing this design avoids.
|
|
12
|
+
*/
|
|
13
|
+
export const HIT_SLICES = 240;
|
|
14
|
+
|
|
15
|
+
/** SLICE_WIDTH is the width of one of the {@link HIT_SLICES} columns, in the chart's unit space. */
|
|
16
|
+
export const SLICE_WIDTH = PROFILE_VIEWBOX / HIT_SLICES;
|
|
17
|
+
|
|
18
|
+
/** One column of the invisible grid a pointer is read through. */
|
|
19
|
+
export interface HitSlice {
|
|
20
|
+
readonly slice: number;
|
|
21
|
+
/** Unit-space x of the column's left edge, which is also a CSS percentage. */
|
|
22
|
+
readonly x: number;
|
|
23
|
+
/** The sample this column resolves to, or `-1` where the series has none. */
|
|
24
|
+
readonly index: number;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* buildSlices resolves the whole grid once, rather than binary-searching per pointer move.
|
|
29
|
+
*
|
|
30
|
+
* The geometry depends only on the series and the window, so these columns are stable across
|
|
31
|
+
* an entire scrub, and a bucket index is exactly what an arrow key steps, which is why
|
|
32
|
+
* keyboard scrubbing is the same code path as the pointer.
|
|
33
|
+
*
|
|
34
|
+
* The navigator drags through the same grid as the chart. Two grids with two ways of reading a
|
|
35
|
+
* pointer would be two interaction models, and the second one is always the one nobody tested.
|
|
36
|
+
*/
|
|
37
|
+
export const buildSlices = (points: readonly ElevationPoint[], range: ProfileRange): HitSlice[] => {
|
|
38
|
+
const span = range.to - range.from;
|
|
39
|
+
|
|
40
|
+
return Array.from({ length: HIT_SLICES }, (_, slice) => ({
|
|
41
|
+
index: nearestPointIndexAt(points, range.from + ((slice + 0.5) / HIT_SLICES) * span),
|
|
42
|
+
slice,
|
|
43
|
+
x: slice * SLICE_WIDTH,
|
|
44
|
+
}));
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* distanceForSlice reads the distance a column stands for.
|
|
49
|
+
*
|
|
50
|
+
* The navigator needs the distance rather than the sample: a window edge is a place on the
|
|
51
|
+
* axis, not a point on the curve, and snapping it to the nearest sample would make a drag
|
|
52
|
+
* jump by a sample's width on a coarsely-sampled itinerary.
|
|
53
|
+
*/
|
|
54
|
+
export const distanceForSlice = (slice: number, range: ProfileRange): number =>
|
|
55
|
+
range.from + ((slice + 0.5) / HIT_SLICES) * (range.to - range.from);
|