@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,451 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The numbers a map's view is stated in, read before they reach the renderer.
|
|
3
|
+
*
|
|
4
|
+
* MapLibre takes a camera pose, the options of a fit and a zoom window as they are handed to it.
|
|
5
|
+
* A member stated as `undefined` replaces the default it stands over, a bearing that is no
|
|
6
|
+
* number gives a projection of `NaN` and a blank canvas with nothing thrown, and a centre or a
|
|
7
|
+
* zoom limit it cannot hold is refused with an `Error` of its own that names no option. So each
|
|
8
|
+
* is read here first: a member left out, or stated as `undefined`, is left out of what the
|
|
9
|
+
* renderer receives, and one the renderer cannot hold is refused in words that name the call and
|
|
10
|
+
* the member.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import { MountayaElementsError } from "../../errors/rules/errors.js";
|
|
14
|
+
import { printValue } from "../../errors/rules/print.js";
|
|
15
|
+
import { LATITUDE_LIMIT } from "../../geo/rules/longitude.js";
|
|
16
|
+
import type { CameraConstraints } from "./mapOptions.js";
|
|
17
|
+
import type { CameraPose, DrawOptions, FitBoundsOptions } from "./types.js";
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* MAP_ZOOM_FLOOR is the lowest zoom a map's floor may be set to: MapLibre's own, under which its
|
|
21
|
+
* `setMinZoom` throws.
|
|
22
|
+
*/
|
|
23
|
+
export const MAP_ZOOM_FLOOR = -2;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* MAP_ZOOM_DEFAULT_CEILING is the zoom ceiling a map is built with when it is given none:
|
|
27
|
+
* MapLibre's own default.
|
|
28
|
+
*/
|
|
29
|
+
export const MAP_ZOOM_DEFAULT_CEILING = 22;
|
|
30
|
+
|
|
31
|
+
/** The members of a pose that are one number each, in the order a refusal checks them. */
|
|
32
|
+
const POSE_SCALARS = ["zoom", "bearing", "pitch"] as const;
|
|
33
|
+
|
|
34
|
+
/** isFiniteNumber tells a number MapLibre can place a camera with from every other value. */
|
|
35
|
+
const isFiniteNumber = (value: unknown): value is number =>
|
|
36
|
+
typeof value === "number" && Number.isFinite(value);
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* readLngLat reads a position the renderer places something at: two finite numbers, the latitude
|
|
40
|
+
* from -90 to 90. The longitude is not held, since MapLibre wraps one past the antimeridian.
|
|
41
|
+
*
|
|
42
|
+
* MapLibre refuses any other value from inside its `LngLat`, with an `Error` that names no
|
|
43
|
+
* option, often after the call has changed something: a marker's position is read once the
|
|
44
|
+
* marker it replaces is off the map. So it is read here first.
|
|
45
|
+
*
|
|
46
|
+
* @param lngLat The position as the caller wrote it.
|
|
47
|
+
* @param operation The call it was handed to, which a refusal names first.
|
|
48
|
+
* @param member The option it was handed as, which a refusal names next.
|
|
49
|
+
* @param absence What the refusal adds for a member the caller may leave out.
|
|
50
|
+
* @returns The position.
|
|
51
|
+
* @throws {MountayaElementsError} When the position is not two finite numbers with a latitude
|
|
52
|
+
* from -90 to 90.
|
|
53
|
+
*/
|
|
54
|
+
export const readLngLat = (
|
|
55
|
+
lngLat: unknown,
|
|
56
|
+
operation: string,
|
|
57
|
+
member: string,
|
|
58
|
+
absence = "",
|
|
59
|
+
): [number, number] => {
|
|
60
|
+
if (
|
|
61
|
+
Array.isArray(lngLat) &&
|
|
62
|
+
lngLat.length === 2 &&
|
|
63
|
+
isFiniteNumber(lngLat[0]) &&
|
|
64
|
+
isFiniteNumber(lngLat[1]) &&
|
|
65
|
+
Math.abs(lngLat[1]) <= LATITUDE_LIMIT
|
|
66
|
+
) {
|
|
67
|
+
return [lngLat[0], lngLat[1]];
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
throw new MountayaElementsError(
|
|
71
|
+
`${operation}: ${member} is ${printValue(lngLat)}; pass [longitude, latitude] as two finite ` +
|
|
72
|
+
`numbers, the latitude from -90 to 90${absence}.`,
|
|
73
|
+
);
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* readMarkerLngLat reads the position a marker is pinned at: a GeoJSON position, its longitude and
|
|
78
|
+
* latitude two finite numbers with the latitude from -90 to 90, and an altitude after them where
|
|
79
|
+
* the caller holds one, which a marker, drawn flat on the map, ignores.
|
|
80
|
+
*
|
|
81
|
+
* A camera's centre is read by {@link readLngLat} and takes no third number: a camera has no
|
|
82
|
+
* altitude to give it.
|
|
83
|
+
*
|
|
84
|
+
* @param lngLat The position as the caller wrote it.
|
|
85
|
+
* @param operation The call it was handed to, which a refusal names first.
|
|
86
|
+
* @param member The option it was handed as, which a refusal names next.
|
|
87
|
+
* @returns The longitude and the latitude.
|
|
88
|
+
* @throws {MountayaElementsError} When the position is not two finite numbers with a latitude
|
|
89
|
+
* from -90 to 90, alone or followed by a number.
|
|
90
|
+
*/
|
|
91
|
+
export const readMarkerLngLat = (
|
|
92
|
+
lngLat: unknown,
|
|
93
|
+
operation: string,
|
|
94
|
+
member: string,
|
|
95
|
+
): [number, number] => {
|
|
96
|
+
if (Array.isArray(lngLat) && lngLat.length === 3 && typeof lngLat[2] === "number") {
|
|
97
|
+
const [longitude, latitude] = lngLat;
|
|
98
|
+
if (
|
|
99
|
+
isFiniteNumber(longitude) &&
|
|
100
|
+
isFiniteNumber(latitude) &&
|
|
101
|
+
Math.abs(latitude) <= LATITUDE_LIMIT
|
|
102
|
+
) {
|
|
103
|
+
return [longitude, latitude];
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
return readLngLat(lngLat, operation, member, ", with its altitude after them if you hold one");
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* readCameraPose reads a camera pose into the members it states.
|
|
112
|
+
*
|
|
113
|
+
* A member left out, or stated as `undefined`, is absent from the answer, so the renderer keeps
|
|
114
|
+
* what it has for it. Latitude is held to the poles and longitude is not held at all: a centre
|
|
115
|
+
* past the antimeridian is one a panned map reports, and the renderer wraps it.
|
|
116
|
+
*
|
|
117
|
+
* @param pose The pose as the caller states it.
|
|
118
|
+
* @param operation The call the pose was handed to, which a refusal names first.
|
|
119
|
+
* @returns A pose holding the stated members alone.
|
|
120
|
+
* @throws {MountayaElementsError} When `center` is not two finite numbers with a latitude from
|
|
121
|
+
* -90 to 90, and when `zoom`, `bearing` or `pitch` is not a finite number.
|
|
122
|
+
*/
|
|
123
|
+
export const readCameraPose = (pose: CameraPose, operation: string): CameraPose => {
|
|
124
|
+
const { center } = pose;
|
|
125
|
+
if (center !== undefined) {
|
|
126
|
+
readLngLat(center, operation, "center", ", or leave it out");
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
for (const member of POSE_SCALARS) {
|
|
130
|
+
const value = pose[member];
|
|
131
|
+
if (value !== undefined && !isFiniteNumber(value)) {
|
|
132
|
+
throw new MountayaElementsError(
|
|
133
|
+
`${operation}: ${member} is ${printValue(value)}; pass a finite number, or leave it out.`,
|
|
134
|
+
);
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
return {
|
|
139
|
+
...(pose.bearing === undefined ? {} : { bearing: pose.bearing }),
|
|
140
|
+
...(center === undefined ? {} : { center }),
|
|
141
|
+
...(pose.pitch === undefined ? {} : { pitch: pose.pitch }),
|
|
142
|
+
...(pose.zoom === undefined ? {} : { zoom: pose.zoom }),
|
|
143
|
+
};
|
|
144
|
+
};
|
|
145
|
+
|
|
146
|
+
/** isPlainObject tells an object written as a literal from an instance of a class. */
|
|
147
|
+
const isPlainObject = (value: object): value is Record<string, unknown> => {
|
|
148
|
+
const prototype: unknown = Object.getPrototypeOf(value);
|
|
149
|
+
|
|
150
|
+
return prototype === Object.prototype || prototype === null;
|
|
151
|
+
};
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* pathOfNonFinite finds the first number that is not finite among a value's members, `NaN` or an
|
|
155
|
+
* infinity, in the order they are written, and answers the path it was written at with the value,
|
|
156
|
+
* or `undefined` where there is none.
|
|
157
|
+
*
|
|
158
|
+
* A list and an object written as a literal are read member by member. Every other value is
|
|
159
|
+
* read past: an instance of a class reads its own numbers, and a value met again on the way
|
|
160
|
+
* down holds itself.
|
|
161
|
+
*/
|
|
162
|
+
const pathOfNonFinite = (
|
|
163
|
+
value: unknown,
|
|
164
|
+
path: string,
|
|
165
|
+
within: Set<object>,
|
|
166
|
+
): { readonly path: string; readonly value: number } | undefined => {
|
|
167
|
+
if (typeof value === "number") {
|
|
168
|
+
return Number.isFinite(value) ? undefined : { path, value };
|
|
169
|
+
}
|
|
170
|
+
if (typeof value !== "object" || value === null || within.has(value)) {
|
|
171
|
+
return undefined;
|
|
172
|
+
}
|
|
173
|
+
if (!(Array.isArray(value) || isPlainObject(value))) {
|
|
174
|
+
return undefined;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
within.add(value);
|
|
178
|
+
try {
|
|
179
|
+
const members: readonly (readonly [string, unknown])[] = Array.isArray(value)
|
|
180
|
+
? value.map((member: unknown, index): [string, unknown] => [`${path}[${index}]`, member])
|
|
181
|
+
: Object.entries(value).map(([key, member]): [string, unknown] => [`${path}.${key}`, member]);
|
|
182
|
+
for (const [memberPath, member] of members) {
|
|
183
|
+
const found = pathOfNonFinite(member, memberPath, within);
|
|
184
|
+
if (found !== undefined) {
|
|
185
|
+
return found;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
return undefined;
|
|
190
|
+
} finally {
|
|
191
|
+
within.delete(value);
|
|
192
|
+
}
|
|
193
|
+
};
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* refuseNonFiniteAmong refuses a number that is not finite anywhere among the options a caller
|
|
197
|
+
* hands on to the renderer as written.
|
|
198
|
+
*
|
|
199
|
+
* MapLibre answers `NaN` and an infinity with an error of its own that names no option, thrown
|
|
200
|
+
* from inside its constructor (`Invalid LngLat object: (NaN, NaN)` for a `maxPitch`, a failed
|
|
201
|
+
* read of `null` for a `bearing` of `Infinity`), or builds a map over it with nothing thrown. So
|
|
202
|
+
* a number no option holds is refused here, ahead of the renderer, by the path it was written at.
|
|
203
|
+
* Every other value is the renderer's to read.
|
|
204
|
+
*
|
|
205
|
+
* @param options The options as the caller states them, or `undefined` for none.
|
|
206
|
+
* @param operation The call the options were handed to, which a refusal names first.
|
|
207
|
+
* @param member The name the options are stated under, which every path starts with.
|
|
208
|
+
* @throws {MountayaElementsError} When a member, at any depth of the lists and the object
|
|
209
|
+
* literals among the options, is `NaN`, `Infinity` or `-Infinity`. The message names the path
|
|
210
|
+
* and the value.
|
|
211
|
+
*/
|
|
212
|
+
export const refuseNonFiniteAmong = (options: unknown, operation: string, member: string): void => {
|
|
213
|
+
const found = pathOfNonFinite(options, member, new Set());
|
|
214
|
+
if (found !== undefined) {
|
|
215
|
+
throw new MountayaElementsError(
|
|
216
|
+
`${operation}: ${found.path} is ${printValue(found.value)}; pass a finite number, or leave ` +
|
|
217
|
+
`it out. Every other rule of an option under ${member} is MapLibre's own.`,
|
|
218
|
+
);
|
|
219
|
+
}
|
|
220
|
+
};
|
|
221
|
+
|
|
222
|
+
/** isInset tells a number of pixels a fit can keep clear from every other value. */
|
|
223
|
+
const isInset = (value: unknown): value is number => isFiniteNumber(value) && value >= 0;
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* readFitBoundsOptions reads the options of a fit into the members they state.
|
|
227
|
+
*
|
|
228
|
+
* A member left out, or stated as `undefined`, is absent from the answer, so the renderer takes
|
|
229
|
+
* its own default for it.
|
|
230
|
+
*
|
|
231
|
+
* @param options The options as the caller states them.
|
|
232
|
+
* @param operation The call the options were handed to, which a refusal names first.
|
|
233
|
+
* @returns Options holding the stated members alone.
|
|
234
|
+
* @throws {MountayaElementsError} When `maxZoom` is not a finite number, when `duration` is not a
|
|
235
|
+
* finite number of milliseconds from 0 up, and when `padding`, or one of its four sides, is not
|
|
236
|
+
* a finite number of pixels from 0 up.
|
|
237
|
+
*/
|
|
238
|
+
export const readFitBoundsOptions = (
|
|
239
|
+
options: FitBoundsOptions,
|
|
240
|
+
operation: string,
|
|
241
|
+
): FitBoundsOptions => {
|
|
242
|
+
const { duration, maxZoom, padding } = options;
|
|
243
|
+
|
|
244
|
+
if (maxZoom !== undefined && !isFiniteNumber(maxZoom)) {
|
|
245
|
+
throw new MountayaElementsError(
|
|
246
|
+
`${operation}: maxZoom is ${printValue(maxZoom)}; pass a finite number, or leave it out.`,
|
|
247
|
+
);
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
if (duration !== undefined && !isInset(duration)) {
|
|
251
|
+
throw new MountayaElementsError(
|
|
252
|
+
`${operation}: duration is ${printValue(duration)}; pass a finite number of milliseconds from ` +
|
|
253
|
+
"0 up, or leave it out.",
|
|
254
|
+
);
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
if (padding !== undefined) {
|
|
258
|
+
const sides =
|
|
259
|
+
typeof padding === "object" && padding !== null
|
|
260
|
+
? [padding.bottom, padding.left, padding.right, padding.top]
|
|
261
|
+
: [padding];
|
|
262
|
+
|
|
263
|
+
if (!sides.every(isInset)) {
|
|
264
|
+
throw new MountayaElementsError(
|
|
265
|
+
`${operation}: padding is ${printValue(padding)}; pass a finite number of pixels from 0 up, ` +
|
|
266
|
+
"for every side or as { bottom, left, right, top }, or leave it out.",
|
|
267
|
+
);
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
return {
|
|
272
|
+
...(duration === undefined ? {} : { duration }),
|
|
273
|
+
...(maxZoom === undefined ? {} : { maxZoom }),
|
|
274
|
+
...(padding === undefined ? {} : { padding }),
|
|
275
|
+
};
|
|
276
|
+
};
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* readFit reads a drawing call's `fit` into the options of the fit it asks for.
|
|
280
|
+
*
|
|
281
|
+
* Read as the call is made, so options the renderer cannot frame with are refused before the
|
|
282
|
+
* call reads or draws anything.
|
|
283
|
+
*
|
|
284
|
+
* @param fit The option as the caller states it.
|
|
285
|
+
* @param operation The call the option was handed to, which a refusal names first.
|
|
286
|
+
* @returns The options to frame with, none of them stated for `true`, or undefined when the call
|
|
287
|
+
* asks for no fit: `fit` left out, or stated as `undefined` or `false`.
|
|
288
|
+
* @throws {MountayaElementsError} When `fit` is neither a boolean nor an object of options, and
|
|
289
|
+
* when it states options {@link readFitBoundsOptions} refuses.
|
|
290
|
+
*/
|
|
291
|
+
export const readFit = (
|
|
292
|
+
fit: DrawOptions["fit"],
|
|
293
|
+
operation: string,
|
|
294
|
+
): FitBoundsOptions | undefined => {
|
|
295
|
+
if (fit === undefined || fit === false) {
|
|
296
|
+
return undefined;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
if (fit === true) {
|
|
300
|
+
return {};
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
// The type leaves the options alone here. A JavaScript caller is free to state anything, and
|
|
304
|
+
// `null`, read as options, would throw the runtime's own error where a member is read off it.
|
|
305
|
+
if (typeof fit !== "object" || fit === null || Array.isArray(fit)) {
|
|
306
|
+
throw new MountayaElementsError(
|
|
307
|
+
`${operation}: fit is ${printValue(fit)}; pass true, false or the options to frame with, or ` +
|
|
308
|
+
"leave it out.",
|
|
309
|
+
);
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
return readFitBoundsOptions(fit, operation);
|
|
313
|
+
};
|
|
314
|
+
|
|
315
|
+
/** ZoomLimits is the zoom window a map holds: its floor and its ceiling. */
|
|
316
|
+
interface ZoomLimits {
|
|
317
|
+
/** The lowest zoom the camera reaches. */
|
|
318
|
+
readonly min: number;
|
|
319
|
+
/** The highest zoom the camera reaches. */
|
|
320
|
+
readonly max: number;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
/**
|
|
324
|
+
* RendererZoomLimits is what a renderer holds every zoom window to: the lowest floor it takes, and
|
|
325
|
+
* the ceiling it builds a map with when it is given none.
|
|
326
|
+
*/
|
|
327
|
+
interface RendererZoomLimits {
|
|
328
|
+
/** The lowest floor a window may state, and the one a released floor goes back to. */
|
|
329
|
+
readonly floor: number;
|
|
330
|
+
/** The ceiling a released ceiling goes back to. */
|
|
331
|
+
readonly ceiling: number;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
/** The limits MapLibre GL JS holds a zoom window to. */
|
|
335
|
+
const maplibreZoomLimits: RendererZoomLimits = {
|
|
336
|
+
ceiling: MAP_ZOOM_DEFAULT_CEILING,
|
|
337
|
+
floor: MAP_ZOOM_FLOOR,
|
|
338
|
+
};
|
|
339
|
+
|
|
340
|
+
/**
|
|
341
|
+
* ZoomLimitsWrite is the zoom limits a call names, as they are to be handed to the renderer.
|
|
342
|
+
*
|
|
343
|
+
* MapLibre refuses a floor above the ceiling it holds and a ceiling under the floor it holds, so
|
|
344
|
+
* a window that moves past the one in place is written far limit first: `ceilingFirst` says
|
|
345
|
+
* which.
|
|
346
|
+
*/
|
|
347
|
+
export interface ZoomLimitsWrite {
|
|
348
|
+
/** The floor to set, or undefined to keep the one the map holds. */
|
|
349
|
+
readonly min: number | undefined;
|
|
350
|
+
/** The ceiling to set, or undefined to keep the one the map holds. */
|
|
351
|
+
readonly max: number | undefined;
|
|
352
|
+
/** Whether the ceiling is set before the floor: true when the floor lies above the held ceiling. */
|
|
353
|
+
readonly ceilingFirst: boolean;
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
/**
|
|
357
|
+
* readZoomLimits reads the zoom window a call names against the one the map holds, and answers
|
|
358
|
+
* the limits to write and the order to write them in.
|
|
359
|
+
*
|
|
360
|
+
* A member left out, or stated as `undefined`, keeps the limit the map holds. A member stated as
|
|
361
|
+
* `null` releases its limit: the floor goes back to the renderer's floor and the ceiling to its
|
|
362
|
+
* default ceiling, each the limit a map is built with when it is given none, which are
|
|
363
|
+
* {@link MAP_ZOOM_FLOOR} and {@link MAP_ZOOM_DEFAULT_CEILING} on MapLibre GL JS. A window whose
|
|
364
|
+
* floor is at or under its ceiling is always writable, whatever window is in place.
|
|
365
|
+
*
|
|
366
|
+
* @param zoom The window as the caller states it, or undefined for none.
|
|
367
|
+
* @param held The window the map holds as the call is made.
|
|
368
|
+
* @param operation The call the window was handed to, which a refusal names first.
|
|
369
|
+
* @param renderer The renderer's floor and default ceiling, MapLibre GL JS's unless stated.
|
|
370
|
+
* @returns The limits to write, undefined for each one kept, and their order.
|
|
371
|
+
* @throws {MountayaElementsError} When a limit is not a finite number, when the floor is under
|
|
372
|
+
* the renderer's floor, and when the floor lies above the ceiling: the one stated beside it,
|
|
373
|
+
* or the one the map holds when the call states one limit alone.
|
|
374
|
+
*/
|
|
375
|
+
export const readZoomLimits = (
|
|
376
|
+
zoom: CameraConstraints["zoom"],
|
|
377
|
+
held: ZoomLimits,
|
|
378
|
+
operation: string,
|
|
379
|
+
renderer: RendererZoomLimits = maplibreZoomLimits,
|
|
380
|
+
): ZoomLimitsWrite => {
|
|
381
|
+
// A limit stated as `null` is released: it goes back to the one a map is built with when it
|
|
382
|
+
// is given none, and is read, checked and written as that number from here on.
|
|
383
|
+
const min = zoom?.min === null ? renderer.floor : zoom?.min;
|
|
384
|
+
const max = zoom?.max === null ? renderer.ceiling : zoom?.max;
|
|
385
|
+
const statedMin = zoom?.min === null ? `null, which lifts the floor to ${min}` : `${min}`;
|
|
386
|
+
const statedMax = zoom?.max === null ? `null, which lifts the ceiling to ${max}` : `${max}`;
|
|
387
|
+
|
|
388
|
+
if (min !== undefined && !isFiniteNumber(min)) {
|
|
389
|
+
throw new MountayaElementsError(
|
|
390
|
+
`${operation}: zoom.min is ${printValue(min)}; pass a finite number, or leave it out to keep ` +
|
|
391
|
+
"the floor the map has.",
|
|
392
|
+
);
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
if (min !== undefined && min < renderer.floor) {
|
|
396
|
+
throw new MountayaElementsError(
|
|
397
|
+
`${operation}: zoom.min is ${statedMin}, under the renderer's floor of ${renderer.floor}; ` +
|
|
398
|
+
`pass a floor from ${renderer.floor} up, or leave it out to keep the floor the map has.`,
|
|
399
|
+
);
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
if (max !== undefined && !isFiniteNumber(max)) {
|
|
403
|
+
throw new MountayaElementsError(
|
|
404
|
+
`${operation}: zoom.max is ${printValue(max)}; pass a finite number, or leave it out to keep ` +
|
|
405
|
+
"the ceiling the map has.",
|
|
406
|
+
);
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
if (min !== undefined && max !== undefined && min > max) {
|
|
410
|
+
throw new MountayaElementsError(
|
|
411
|
+
`${operation}: zoom.min is ${statedMin}, above zoom.max, which is ${statedMax}; pass a ` +
|
|
412
|
+
"floor at or under the ceiling.",
|
|
413
|
+
);
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
if (min !== undefined && max === undefined && min > held.max) {
|
|
417
|
+
throw new MountayaElementsError(
|
|
418
|
+
`${operation}: zoom.min is ${statedMin}, above the ceiling of ${held.max} the map holds; ` +
|
|
419
|
+
`pass zoom.max beside it, or a floor at or under ${held.max}.`,
|
|
420
|
+
);
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
if (max !== undefined && min === undefined && max < held.min) {
|
|
424
|
+
throw new MountayaElementsError(
|
|
425
|
+
`${operation}: zoom.max is ${statedMax}, under the floor of ${held.min} the map holds; ` +
|
|
426
|
+
`pass zoom.min beside it, or a ceiling at or above ${held.min}.`,
|
|
427
|
+
);
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
return { ceilingFirst: min !== undefined && min > held.max, max, min };
|
|
431
|
+
};
|
|
432
|
+
|
|
433
|
+
/**
|
|
434
|
+
* zoomWindowAfter answers the zoom window a write leaves, each limit it states over the one held,
|
|
435
|
+
* and whether that window moved, which is what decides whether the change is told.
|
|
436
|
+
*
|
|
437
|
+
* A write that restates the window held, as a base-map switch does, leaves it where it was, and
|
|
438
|
+
* so does one that states no limit at all.
|
|
439
|
+
*
|
|
440
|
+
* @param held The window the map holds before the write.
|
|
441
|
+
* @param write The limits a call names, as {@link readZoomLimits} reads them.
|
|
442
|
+
* @returns The window after the write, and whether either of its limits moved.
|
|
443
|
+
*/
|
|
444
|
+
export const zoomWindowAfter = (
|
|
445
|
+
held: ZoomLimits,
|
|
446
|
+
write: ZoomLimitsWrite,
|
|
447
|
+
): { readonly moved: boolean; readonly window: ZoomLimits } => {
|
|
448
|
+
const window = { max: write.max ?? held.max, min: write.min ?? held.min };
|
|
449
|
+
|
|
450
|
+
return { moved: window.max !== held.max || window.min !== held.min, window };
|
|
451
|
+
};
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { getVersion, getWorkerUrl, setWorkerUrl } from "maplibre-gl";
|
|
2
|
+
|
|
3
|
+
import { warnOnUnrewrittenWorker } from "./developmentWarnings.js";
|
|
4
|
+
import { MAPLIBRE_WORKER_VERSION } from "./maplibreWorkerVersion.gen.js";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Whether the answer has already been given, so a page holding several maps asks once.
|
|
8
|
+
*
|
|
9
|
+
* Module scope rather than a field, because what it guards is module-global: MapLibre keeps ONE
|
|
10
|
+
* worker URL for the document, so the second caller would only ever write what the first wrote.
|
|
11
|
+
*/
|
|
12
|
+
let settled = false;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* An address on which the package's own specifier sits as it is written, beside a file of the
|
|
16
|
+
* package's own build: `dist` of a directory named `elements`, or of `elements@<version>`, which is
|
|
17
|
+
* how a CDN spells it.
|
|
18
|
+
*/
|
|
19
|
+
const specifierBesideOurBuild =
|
|
20
|
+
/(\/elements(?:@[^/]+)?\/dist\/)@mountaya\/elements\/(maplibre-worker\.mjs)$/;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* workerBesideBuild answers the address of the worker a script of the package's own build stands
|
|
24
|
+
* beside, for an address that is the package's specifier joined onto that script's.
|
|
25
|
+
*
|
|
26
|
+
* Two readers of the package leave the specifier as it is written and keep the address of the file
|
|
27
|
+
* that names it. Vite 8's dependency optimizer, which its development server runs over every
|
|
28
|
+
* installed package, joins the specifier onto the published file's directory as if it were a path
|
|
29
|
+
* (vitejs/vite#23045). A browser handed the published files themselves, by a CDN or a server of
|
|
30
|
+
* plain modules, does the same. Either way the worker is in that directory, so the address differs
|
|
31
|
+
* from the right one by the specifier's own scope and name, and those come out.
|
|
32
|
+
*
|
|
33
|
+
* A `./` written into the built file would not do instead. The optimizers of Vite 5, 6 and 7 move that
|
|
34
|
+
* file into `node_modules/.vite/deps`, where they resolve the package name and a `./` names a worker
|
|
35
|
+
* nobody put beside it.
|
|
36
|
+
*
|
|
37
|
+
* An address a bundler resolved is answered as it is, and so is the specifier joined onto a script
|
|
38
|
+
* that is none of the package's: beside a bundle of the consumer's own there is no worker to name,
|
|
39
|
+
* and `warnOnUnrewrittenWorker` says so.
|
|
40
|
+
*
|
|
41
|
+
* @param href The address the package's specifier resolved to.
|
|
42
|
+
* @returns The worker's address beside the build, or `href` where no file of the build is.
|
|
43
|
+
*/
|
|
44
|
+
export const workerBesideBuild = (href: string): string =>
|
|
45
|
+
href.replace(specifierBesideOurBuild, "$1$2");
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* ensureMapLibreWorker points MapLibre at the tile worker this package publishes, unless the
|
|
49
|
+
* consumer has already pointed it somewhere themselves.
|
|
50
|
+
*
|
|
51
|
+
* **What it is for.** MapLibre 6 loads its worker from a URL instead of inlining it, and derives
|
|
52
|
+
* one from its own `import.meta.url` when nobody supplies it. After bundling that is the
|
|
53
|
+
* consumer's emitted chunk rather than the installed package, so it asks for a worker beside
|
|
54
|
+
* their hashed assets and gets a 404. Nothing throws: the canvas mounts, the controls work, and
|
|
55
|
+
* no tile ever loads. Upstream's answer is a one-time `setWorkerUrl()` per application, spelled
|
|
56
|
+
* differently for every bundler: a setup step with a silent failure mode, which is exactly the
|
|
57
|
+
* kind of step this package exists to absorb.
|
|
58
|
+
*
|
|
59
|
+
* **Why a bare self-reference.** `new URL(…, import.meta.url)` is the one asset form every
|
|
60
|
+
* bundler resolves and emits, and it is matched SYNTACTICALLY: the specifier and
|
|
61
|
+
* `import.meta.url` have to sit in the expression literally, which is why neither is lifted into
|
|
62
|
+
* a variable here however much tidier that would read. Naming the package rather than a relative
|
|
63
|
+
* path is what makes it survive the layouts this module is read under: the build may place this
|
|
64
|
+
* code in any chunk at any depth, and the `@mountaya/source` condition resolves it straight out
|
|
65
|
+
* of `src/`, so any `./` is right in one layout and wrong in another. A package name is the same
|
|
66
|
+
* string from all of them.
|
|
67
|
+
*
|
|
68
|
+
* **Why the worker is this package's and not the consumer's copy.** Pointing at
|
|
69
|
+
* `maplibre-gl/dist/maplibre-gl-worker.mjs` is worse than doing nothing: that file imports a far
|
|
70
|
+
* larger sibling by literal filename, bundlers hash asset names, and the emitted result is a stub
|
|
71
|
+
* whose first import 404s. `scripts/build-worker.mjs` inlines the sibling so the published
|
|
72
|
+
* artifact is a plain self-contained asset. The cost is that it is built against the maplibre-gl
|
|
73
|
+
* this package pins while the peer admits any `^6`, which is what the version check below is
|
|
74
|
+
* for.
|
|
75
|
+
*
|
|
76
|
+
* **A consumer who chose always wins.** The URL is only written when nothing holds one, so
|
|
77
|
+
* calling `setWorkerUrl` yourself (the exact-version escape hatch, and the CDN case where
|
|
78
|
+
* MapLibre's own detection is already right) keeps working and is never second-guessed.
|
|
79
|
+
*
|
|
80
|
+
* **A build that resolves nothing is told so.** A bundler with no asset handling leaves the
|
|
81
|
+
* expression to the browser, which joins the specifier onto the chunk's own address. In development
|
|
82
|
+
* `warnOnUnrewrittenWorker` says so once, naming the address and the `setWorkerUrl` call that
|
|
83
|
+
* replaces it.
|
|
84
|
+
*/
|
|
85
|
+
export const ensureMapLibreWorker = (): void => {
|
|
86
|
+
if (settled) {
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
settled = true;
|
|
91
|
+
|
|
92
|
+
// Somebody already chose. That includes MapLibre's own detection only when the consumer wrote
|
|
93
|
+
// the URL down: the derived fallback is computed at worker-creation time and is not readable
|
|
94
|
+
// here, which is precisely why an empty value cannot be read as "no bundler".
|
|
95
|
+
if (getWorkerUrl()) {
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
let workerUrl: string;
|
|
100
|
+
|
|
101
|
+
try {
|
|
102
|
+
workerUrl = workerBesideBuild(
|
|
103
|
+
new URL("@mountaya/elements/maplibre-worker.mjs", import.meta.url).href,
|
|
104
|
+
);
|
|
105
|
+
setWorkerUrl(workerUrl);
|
|
106
|
+
} catch {
|
|
107
|
+
// The CJS build has no `import.meta.url`, so this throws there and nowhere else. A worker is
|
|
108
|
+
// a browser concern and the browser build is ESM, so the catch is the Node path declining to
|
|
109
|
+
// answer a question Node never asks, and no failure worth reporting.
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
// A bundler that resolves the expression above writes an emitted asset's address in its place.
|
|
114
|
+
// One that leaves it alone hands the browser an address beside the chunk that no server
|
|
115
|
+
// answers, and the map then draws no tile with nothing thrown, so it is said here instead.
|
|
116
|
+
warnOnUnrewrittenWorker(workerUrl);
|
|
117
|
+
|
|
118
|
+
// The worker and the main thread talk over a protocol that is MapLibre's private business, so
|
|
119
|
+
// two different versions of it is a real thing to say out loud. Reported rather than refused:
|
|
120
|
+
// a mismatch across a patch release is almost always fine, and refusing would turn a warning
|
|
121
|
+
// into the blank map this whole module exists to prevent.
|
|
122
|
+
const resolved = getVersion();
|
|
123
|
+
|
|
124
|
+
if (resolved !== MAPLIBRE_WORKER_VERSION) {
|
|
125
|
+
console.warn(
|
|
126
|
+
`[@mountaya/elements] bundled MapLibre worker is ${MAPLIBRE_WORKER_VERSION} but maplibre-gl ` +
|
|
127
|
+
`resolved to ${resolved}. Tiles should still render; if they do not, either align the ` +
|
|
128
|
+
"versions or call maplibre-gl's setWorkerUrl() yourself to use your own copy.",
|
|
129
|
+
);
|
|
130
|
+
}
|
|
131
|
+
};
|