@mountaya/elements 0.0.0-stage → 0.1.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 +235 -0
- package/LICENCE.fr.txt +280 -0
- package/LICENSE.txt +262 -0
- package/README.md +1509 -2
- package/THIRD-PARTY-NOTICES.txt +103 -0
- package/dist/accentColor-GNKBD2CW.js +4 -0
- package/dist/accentColor-GNKBD2CW.js.map +1 -0
- package/dist/accentColor-VX2JSMGE.cjs +17 -0
- package/dist/accentColor-VX2JSMGE.cjs.map +1 -0
- package/dist/agent/index.cjs +1964 -0
- package/dist/agent/index.cjs.map +1 -0
- package/dist/agent/index.d.cts +2016 -0
- package/dist/agent/index.d.ts +2016 -0
- package/dist/agent/index.js +1937 -0
- package/dist/agent/index.js.map +1 -0
- package/dist/amenities-B3-qAjxu.d.cts +160 -0
- package/dist/amenities-B3-qAjxu.d.ts +160 -0
- package/dist/bundle-Je5zsRFg.d.cts +222 -0
- package/dist/bundle-xYrrbJTH.d.ts +222 -0
- package/dist/camera/index.cjs +3477 -0
- package/dist/camera/index.cjs.map +1 -0
- package/dist/camera/index.d.cts +1751 -0
- package/dist/camera/index.d.ts +1751 -0
- package/dist/camera/index.js +3328 -0
- package/dist/camera/index.js.map +1 -0
- package/dist/camera-BrFLU1DH.d.cts +549 -0
- package/dist/camera-C48Ykaxv.d.ts +549 -0
- package/dist/chunk-23PFRRB6.js +3 -0
- package/dist/chunk-23PFRRB6.js.map +1 -0
- package/dist/chunk-2GI5SAH2.js +71 -0
- package/dist/chunk-2GI5SAH2.js.map +1 -0
- package/dist/chunk-2MQK6A74.js +39 -0
- package/dist/chunk-2MQK6A74.js.map +1 -0
- package/dist/chunk-2RE7R4LD.js +73 -0
- package/dist/chunk-2RE7R4LD.js.map +1 -0
- package/dist/chunk-3JZQKN4O.js +6 -0
- package/dist/chunk-3JZQKN4O.js.map +1 -0
- package/dist/chunk-3NDXVUUI.js +50 -0
- package/dist/chunk-3NDXVUUI.js.map +1 -0
- package/dist/chunk-3R4GFTUM.cjs +59 -0
- package/dist/chunk-3R4GFTUM.cjs.map +1 -0
- package/dist/chunk-3RVUQ6JN.cjs +22 -0
- package/dist/chunk-3RVUQ6JN.cjs.map +1 -0
- package/dist/chunk-4F6BJMJC.cjs +49 -0
- package/dist/chunk-4F6BJMJC.cjs.map +1 -0
- package/dist/chunk-4NWQD4BX.js +132 -0
- package/dist/chunk-4NWQD4BX.js.map +1 -0
- package/dist/chunk-5K2MH3R6.js +10 -0
- package/dist/chunk-5K2MH3R6.js.map +1 -0
- package/dist/chunk-6ACRNQQQ.cjs +8 -0
- package/dist/chunk-6ACRNQQQ.cjs.map +1 -0
- package/dist/chunk-6D26E3IA.js +66 -0
- package/dist/chunk-6D26E3IA.js.map +1 -0
- package/dist/chunk-6ESAW35P.cjs +80 -0
- package/dist/chunk-6ESAW35P.cjs.map +1 -0
- package/dist/chunk-6LIW2A5M.cjs +1176 -0
- package/dist/chunk-6LIW2A5M.cjs.map +1 -0
- package/dist/chunk-6OTTWVCA.js +57 -0
- package/dist/chunk-6OTTWVCA.js.map +1 -0
- package/dist/chunk-6VROJ4UG.js +862 -0
- package/dist/chunk-6VROJ4UG.js.map +1 -0
- package/dist/chunk-6Y7FTGO4.js +23 -0
- package/dist/chunk-6Y7FTGO4.js.map +1 -0
- package/dist/chunk-75I4CG64.js +104 -0
- package/dist/chunk-75I4CG64.js.map +1 -0
- package/dist/chunk-7CUBXHAH.cjs +14 -0
- package/dist/chunk-7CUBXHAH.cjs.map +1 -0
- package/dist/chunk-7GTCURVY.js +52 -0
- package/dist/chunk-7GTCURVY.js.map +1 -0
- package/dist/chunk-7IWOL6AM.cjs +100 -0
- package/dist/chunk-7IWOL6AM.cjs.map +1 -0
- package/dist/chunk-7QN7M667.cjs +151 -0
- package/dist/chunk-7QN7M667.cjs.map +1 -0
- package/dist/chunk-A6KQDKLM.cjs +1197 -0
- package/dist/chunk-A6KQDKLM.cjs.map +1 -0
- package/dist/chunk-A77EA67G.js +354 -0
- package/dist/chunk-A77EA67G.js.map +1 -0
- package/dist/chunk-AFKOABJ4.cjs +7194 -0
- package/dist/chunk-AFKOABJ4.cjs.map +1 -0
- package/dist/chunk-AG6JV5Z2.cjs +183 -0
- package/dist/chunk-AG6JV5Z2.cjs.map +1 -0
- package/dist/chunk-APBK7NMS.js +30 -0
- package/dist/chunk-APBK7NMS.js.map +1 -0
- package/dist/chunk-AWO5YA7A.cjs +33 -0
- package/dist/chunk-AWO5YA7A.cjs.map +1 -0
- package/dist/chunk-AZATU6QW.js +108 -0
- package/dist/chunk-AZATU6QW.js.map +1 -0
- package/dist/chunk-BD2U3WST.cjs +623 -0
- package/dist/chunk-BD2U3WST.cjs.map +1 -0
- package/dist/chunk-BHBEOU6L.cjs +65 -0
- package/dist/chunk-BHBEOU6L.cjs.map +1 -0
- package/dist/chunk-CNOSNYNE.js +8 -0
- package/dist/chunk-CNOSNYNE.js.map +1 -0
- package/dist/chunk-CW3EFR4O.js +12 -0
- package/dist/chunk-CW3EFR4O.js.map +1 -0
- package/dist/chunk-DASVRNBK.js +7187 -0
- package/dist/chunk-DASVRNBK.js.map +1 -0
- package/dist/chunk-DJ6LCKYP.js +42 -0
- package/dist/chunk-DJ6LCKYP.js.map +1 -0
- package/dist/chunk-E5FHQAIO.cjs +45 -0
- package/dist/chunk-E5FHQAIO.cjs.map +1 -0
- package/dist/chunk-EOML5OTY.cjs +360 -0
- package/dist/chunk-EOML5OTY.cjs.map +1 -0
- package/dist/chunk-EP5CASHL.js +613 -0
- package/dist/chunk-EP5CASHL.js.map +1 -0
- package/dist/chunk-EP5OEEVZ.cjs +14 -0
- package/dist/chunk-EP5OEEVZ.cjs.map +1 -0
- package/dist/chunk-EUXI3FGQ.js +150 -0
- package/dist/chunk-EUXI3FGQ.js.map +1 -0
- package/dist/chunk-EWFSHCOS.js +40 -0
- package/dist/chunk-EWFSHCOS.js.map +1 -0
- package/dist/chunk-EX2C5K2T.cjs +25 -0
- package/dist/chunk-EX2C5K2T.cjs.map +1 -0
- package/dist/chunk-FEXWDQIZ.cjs +8 -0
- package/dist/chunk-FEXWDQIZ.cjs.map +1 -0
- package/dist/chunk-FEYBFY7H.cjs +358 -0
- package/dist/chunk-FEYBFY7H.cjs.map +1 -0
- package/dist/chunk-FRGAV6N6.cjs +34 -0
- package/dist/chunk-FRGAV6N6.cjs.map +1 -0
- package/dist/chunk-G5DHP5VF.js +6 -0
- package/dist/chunk-G5DHP5VF.js.map +1 -0
- package/dist/chunk-G5W2UHV2.js +99 -0
- package/dist/chunk-G5W2UHV2.js.map +1 -0
- package/dist/chunk-G7OP7O2C.cjs +39 -0
- package/dist/chunk-G7OP7O2C.cjs.map +1 -0
- package/dist/chunk-GE6CFCAM.cjs +25 -0
- package/dist/chunk-GE6CFCAM.cjs.map +1 -0
- package/dist/chunk-GIFALLHI.cjs +111 -0
- package/dist/chunk-GIFALLHI.cjs.map +1 -0
- package/dist/chunk-GLFET5GM.js +129 -0
- package/dist/chunk-GLFET5GM.js.map +1 -0
- package/dist/chunk-GQ6UFPFM.js +22 -0
- package/dist/chunk-GQ6UFPFM.js.map +1 -0
- package/dist/chunk-GQJWVMXS.js +129 -0
- package/dist/chunk-GQJWVMXS.js.map +1 -0
- package/dist/chunk-GVVJPUKC.js +80 -0
- package/dist/chunk-GVVJPUKC.js.map +1 -0
- package/dist/chunk-GZ2HOCQ2.cjs +134 -0
- package/dist/chunk-GZ2HOCQ2.cjs.map +1 -0
- package/dist/chunk-HCBOHXWP.js +37 -0
- package/dist/chunk-HCBOHXWP.js.map +1 -0
- package/dist/chunk-IBQJDVHF.cjs +281 -0
- package/dist/chunk-IBQJDVHF.cjs.map +1 -0
- package/dist/chunk-ISLB6Y5Q.cjs +106 -0
- package/dist/chunk-ISLB6Y5Q.cjs.map +1 -0
- package/dist/chunk-J55CRR4F.js +105 -0
- package/dist/chunk-J55CRR4F.js.map +1 -0
- package/dist/chunk-JBG6Z6MQ.cjs +28 -0
- package/dist/chunk-JBG6Z6MQ.cjs.map +1 -0
- package/dist/chunk-K3RQOZRU.js +61 -0
- package/dist/chunk-K3RQOZRU.js.map +1 -0
- package/dist/chunk-KDJYS4GB.cjs +703 -0
- package/dist/chunk-KDJYS4GB.cjs.map +1 -0
- package/dist/chunk-KMCAHUZM.cjs +4 -0
- package/dist/chunk-KMCAHUZM.cjs.map +1 -0
- package/dist/chunk-KUCBNPC6.js +87 -0
- package/dist/chunk-KUCBNPC6.js.map +1 -0
- package/dist/chunk-KV6UE5A4.js +50 -0
- package/dist/chunk-KV6UE5A4.js.map +1 -0
- package/dist/chunk-L6TZ2HQR.cjs +18 -0
- package/dist/chunk-L6TZ2HQR.cjs.map +1 -0
- package/dist/chunk-L7QHHGG2.cjs +141 -0
- package/dist/chunk-L7QHHGG2.cjs.map +1 -0
- package/dist/chunk-LHK3Y2AL.js +271 -0
- package/dist/chunk-LHK3Y2AL.js.map +1 -0
- package/dist/chunk-LO5RYRBH.cjs +6317 -0
- package/dist/chunk-LO5RYRBH.cjs.map +1 -0
- package/dist/chunk-LS5SJMUO.cjs +194 -0
- package/dist/chunk-LS5SJMUO.cjs.map +1 -0
- package/dist/chunk-LUGTMZFN.cjs +42 -0
- package/dist/chunk-LUGTMZFN.cjs.map +1 -0
- package/dist/chunk-LVUQU6D5.js +32 -0
- package/dist/chunk-LVUQU6D5.js.map +1 -0
- package/dist/chunk-M2QRC2GZ.js +166 -0
- package/dist/chunk-M2QRC2GZ.js.map +1 -0
- package/dist/chunk-M6QJYQIM.cjs +53 -0
- package/dist/chunk-M6QJYQIM.cjs.map +1 -0
- package/dist/chunk-MGCPH5EO.js +12 -0
- package/dist/chunk-MGCPH5EO.js.map +1 -0
- package/dist/chunk-MLVUWEZR.cjs +474 -0
- package/dist/chunk-MLVUWEZR.cjs.map +1 -0
- package/dist/chunk-MTAMJMZL.cjs +707 -0
- package/dist/chunk-MTAMJMZL.cjs.map +1 -0
- package/dist/chunk-MXL5AT3N.js +48 -0
- package/dist/chunk-MXL5AT3N.js.map +1 -0
- package/dist/chunk-MYEQSESM.cjs +75 -0
- package/dist/chunk-MYEQSESM.cjs.map +1 -0
- package/dist/chunk-N3VPF6ZD.js +427 -0
- package/dist/chunk-N3VPF6ZD.js.map +1 -0
- package/dist/chunk-N6VUAIGI.js +7 -0
- package/dist/chunk-N6VUAIGI.js.map +1 -0
- package/dist/chunk-N6XRLUN6.js +6286 -0
- package/dist/chunk-N6XRLUN6.js.map +1 -0
- package/dist/chunk-NOGDOZIT.cjs +114 -0
- package/dist/chunk-NOGDOZIT.cjs.map +1 -0
- package/dist/chunk-NUWXEISH.cjs +10 -0
- package/dist/chunk-NUWXEISH.cjs.map +1 -0
- package/dist/chunk-NZCZHXYN.cjs +161 -0
- package/dist/chunk-NZCZHXYN.cjs.map +1 -0
- package/dist/chunk-ODROSWQX.cjs +53 -0
- package/dist/chunk-ODROSWQX.cjs.map +1 -0
- package/dist/chunk-OE36AYKG.cjs +82 -0
- package/dist/chunk-OE36AYKG.cjs.map +1 -0
- package/dist/chunk-OLON7MO6.cjs +437 -0
- package/dist/chunk-OLON7MO6.cjs.map +1 -0
- package/dist/chunk-PBUOR2IT.js +277 -0
- package/dist/chunk-PBUOR2IT.js.map +1 -0
- package/dist/chunk-PC2ELXFF.cjs +225 -0
- package/dist/chunk-PC2ELXFF.cjs.map +1 -0
- package/dist/chunk-PCSGXLOC.js +71 -0
- package/dist/chunk-PCSGXLOC.js.map +1 -0
- package/dist/chunk-PFNMP6FQ.js +56 -0
- package/dist/chunk-PFNMP6FQ.js.map +1 -0
- package/dist/chunk-PIWSZTIP.js +690 -0
- package/dist/chunk-PIWSZTIP.js.map +1 -0
- package/dist/chunk-PKWHJ2GI.js +136 -0
- package/dist/chunk-PKWHJ2GI.js.map +1 -0
- package/dist/chunk-PLMVBX2A.cjs +76 -0
- package/dist/chunk-PLMVBX2A.cjs.map +1 -0
- package/dist/chunk-PM3XCD2G.cjs +113 -0
- package/dist/chunk-PM3XCD2G.cjs.map +1 -0
- package/dist/chunk-QAL4GZO7.cjs +143 -0
- package/dist/chunk-QAL4GZO7.cjs.map +1 -0
- package/dist/chunk-QDB2SEA2.js +74 -0
- package/dist/chunk-QDB2SEA2.js.map +1 -0
- package/dist/chunk-QOV7UNUN.js +25 -0
- package/dist/chunk-QOV7UNUN.js.map +1 -0
- package/dist/chunk-QQUWYLSF.cjs +50 -0
- package/dist/chunk-QQUWYLSF.cjs.map +1 -0
- package/dist/chunk-QUMBH3U4.cjs +9 -0
- package/dist/chunk-QUMBH3U4.cjs.map +1 -0
- package/dist/chunk-R4KA7OFQ.js +12 -0
- package/dist/chunk-R4KA7OFQ.js.map +1 -0
- package/dist/chunk-RBSGAZQQ.js +17 -0
- package/dist/chunk-RBSGAZQQ.js.map +1 -0
- package/dist/chunk-RM5YJWZI.js +46 -0
- package/dist/chunk-RM5YJWZI.js.map +1 -0
- package/dist/chunk-ROKNKXA4.cjs +8 -0
- package/dist/chunk-ROKNKXA4.cjs.map +1 -0
- package/dist/chunk-RQG6D546.cjs +75 -0
- package/dist/chunk-RQG6D546.cjs.map +1 -0
- package/dist/chunk-SG4YDD5L.cjs +74 -0
- package/dist/chunk-SG4YDD5L.cjs.map +1 -0
- package/dist/chunk-SNRCA7EO.js +56 -0
- package/dist/chunk-SNRCA7EO.js.map +1 -0
- package/dist/chunk-SO75R4WW.cjs +22 -0
- package/dist/chunk-SO75R4WW.cjs.map +1 -0
- package/dist/chunk-SP34NHFI.js +45 -0
- package/dist/chunk-SP34NHFI.js.map +1 -0
- package/dist/chunk-SSKSSBWJ.cjs +179 -0
- package/dist/chunk-SSKSSBWJ.cjs.map +1 -0
- package/dist/chunk-TB5663C2.js +1108 -0
- package/dist/chunk-TB5663C2.js.map +1 -0
- package/dist/chunk-TGH4NRES.js +220 -0
- package/dist/chunk-TGH4NRES.js.map +1 -0
- package/dist/chunk-TJ6ZPNID.js +189 -0
- package/dist/chunk-TJ6ZPNID.js.map +1 -0
- package/dist/chunk-U45T35N2.cjs +90 -0
- package/dist/chunk-U45T35N2.cjs.map +1 -0
- package/dist/chunk-UKVOPEZ2.js +442 -0
- package/dist/chunk-UKVOPEZ2.js.map +1 -0
- package/dist/chunk-UTB4NROA.cjs +887 -0
- package/dist/chunk-UTB4NROA.cjs.map +1 -0
- package/dist/chunk-UTW33B5V.js +6 -0
- package/dist/chunk-UTW33B5V.js.map +1 -0
- package/dist/chunk-UYUBSD2V.cjs +33 -0
- package/dist/chunk-UYUBSD2V.cjs.map +1 -0
- package/dist/chunk-V3JEP5AG.cjs +59 -0
- package/dist/chunk-V3JEP5AG.cjs.map +1 -0
- package/dist/chunk-VFAGJXHR.js +18 -0
- package/dist/chunk-VFAGJXHR.js.map +1 -0
- package/dist/chunk-VMEE57E5.cjs +58 -0
- package/dist/chunk-VMEE57E5.cjs.map +1 -0
- package/dist/chunk-VQVBEX3Y.cjs +113 -0
- package/dist/chunk-VQVBEX3Y.cjs.map +1 -0
- package/dist/chunk-VZDXX7TT.cjs +64 -0
- package/dist/chunk-VZDXX7TT.cjs.map +1 -0
- package/dist/chunk-WE5ZTI4D.js +346 -0
- package/dist/chunk-WE5ZTI4D.js.map +1 -0
- package/dist/chunk-WEFUVABP.js +19 -0
- package/dist/chunk-WEFUVABP.js.map +1 -0
- package/dist/chunk-WMU4LRKC.js +28 -0
- package/dist/chunk-WMU4LRKC.js.map +1 -0
- package/dist/chunk-WQ24RRHL.cjs +354 -0
- package/dist/chunk-WQ24RRHL.cjs.map +1 -0
- package/dist/chunk-WW4CGS7G.cjs +26 -0
- package/dist/chunk-WW4CGS7G.cjs.map +1 -0
- package/dist/chunk-WXE5WCTM.js +1144 -0
- package/dist/chunk-WXE5WCTM.js.map +1 -0
- package/dist/chunk-X23BGIYA.cjs +37 -0
- package/dist/chunk-X23BGIYA.cjs.map +1 -0
- package/dist/chunk-XEW4FTR2.js +98 -0
- package/dist/chunk-XEW4FTR2.js.map +1 -0
- package/dist/chunk-XIOI4IYW.js +167 -0
- package/dist/chunk-XIOI4IYW.js.map +1 -0
- package/dist/chunk-XLVPJ37V.cjs +44 -0
- package/dist/chunk-XLVPJ37V.cjs.map +1 -0
- package/dist/chunk-XOHAXXZA.cjs +51 -0
- package/dist/chunk-XOHAXXZA.cjs.map +1 -0
- package/dist/chunk-Y4NRIHK6.cjs +313 -0
- package/dist/chunk-Y4NRIHK6.cjs.map +1 -0
- package/dist/chunk-Y4YMMKL3.js +23 -0
- package/dist/chunk-Y4YMMKL3.js.map +1 -0
- package/dist/chunk-YJNYBVE3.cjs +14 -0
- package/dist/chunk-YJNYBVE3.cjs.map +1 -0
- package/dist/chunk-Z762QNQP.cjs +60 -0
- package/dist/chunk-Z762QNQP.cjs.map +1 -0
- package/dist/chunk-ZG5KMBOF.js +669 -0
- package/dist/chunk-ZG5KMBOF.js.map +1 -0
- package/dist/chunk-ZKONQEFA.js +344 -0
- package/dist/chunk-ZKONQEFA.js.map +1 -0
- package/dist/chunk-ZR5X7QMH.js +39 -0
- package/dist/chunk-ZR5X7QMH.js.map +1 -0
- package/dist/chunk-ZW4BJQ26.js +84 -0
- package/dist/chunk-ZW4BJQ26.js.map +1 -0
- package/dist/climbs-BhlWuu0x.d.ts +70 -0
- package/dist/climbs-DgBFwySV.d.cts +70 -0
- package/dist/collab/index.cjs +1283 -0
- package/dist/collab/index.cjs.map +1 -0
- package/dist/collab/index.d.cts +850 -0
- package/dist/collab/index.d.ts +850 -0
- package/dist/collab/index.js +1274 -0
- package/dist/collab/index.js.map +1 -0
- package/dist/data/index.cjs +132 -0
- package/dist/data/index.cjs.map +1 -0
- package/dist/data/index.d.cts +468 -0
- package/dist/data/index.d.ts +468 -0
- package/dist/data/index.js +15 -0
- package/dist/data/index.js.map +1 -0
- package/dist/editor/index.cjs +4506 -0
- package/dist/editor/index.cjs.map +1 -0
- package/dist/editor/index.d.cts +59 -0
- package/dist/editor/index.d.ts +59 -0
- package/dist/editor/index.js +4486 -0
- package/dist/editor/index.js.map +1 -0
- package/dist/elevationTiles-pmsb9wnU.d.cts +77 -0
- package/dist/elevationTiles-pmsb9wnU.d.ts +77 -0
- package/dist/errors/index.cjs +28 -0
- package/dist/errors/index.cjs.map +1 -0
- package/dist/errors/index.d.cts +125 -0
- package/dist/errors/index.d.ts +125 -0
- package/dist/errors/index.js +3 -0
- package/dist/errors/index.js.map +1 -0
- package/dist/geo/index.cjs +232 -0
- package/dist/geo/index.cjs.map +1 -0
- package/dist/geo/index.d.cts +821 -0
- package/dist/geo/index.d.ts +821 -0
- package/dist/geo/index.js +15 -0
- package/dist/geo/index.js.map +1 -0
- package/dist/geodesy-543qXKtI.d.cts +78 -0
- package/dist/geodesy-543qXKtI.d.ts +78 -0
- package/dist/geolocation-DDkQdWMN.d.cts +106 -0
- package/dist/geolocation-DDkQdWMN.d.ts +106 -0
- package/dist/i18n/fr/index.cjs +338 -0
- package/dist/i18n/fr/index.cjs.map +1 -0
- package/dist/i18n/fr/index.d.cts +25 -0
- package/dist/i18n/fr/index.d.ts +25 -0
- package/dist/i18n/fr/index.js +336 -0
- package/dist/i18n/fr/index.js.map +1 -0
- package/dist/i18n/index.cjs +464 -0
- package/dist/i18n/index.cjs.map +1 -0
- package/dist/i18n/index.d.cts +227 -0
- package/dist/i18n/index.d.ts +227 -0
- package/dist/i18n/index.js +430 -0
- package/dist/i18n/index.js.map +1 -0
- package/dist/icons/index.cjs +116 -0
- package/dist/icons/index.cjs.map +1 -0
- package/dist/icons/index.d.cts +457 -0
- package/dist/icons/index.d.ts +457 -0
- package/dist/icons/index.js +11 -0
- package/dist/icons/index.js.map +1 -0
- package/dist/index.cjs +1869 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +251 -0
- package/dist/index.d.ts +251 -0
- package/dist/index.js +67 -0
- package/dist/index.js.map +1 -0
- package/dist/itinerary-Dp2ZnqgD.d.cts +178 -0
- package/dist/itinerary-Dp2ZnqgD.d.ts +178 -0
- package/dist/language-CEWQ5uYw.d.cts +69 -0
- package/dist/language-CEWQ5uYw.d.ts +69 -0
- package/dist/layers/index.cjs +318 -0
- package/dist/layers/index.cjs.map +1 -0
- package/dist/layers/index.d.cts +1555 -0
- package/dist/layers/index.d.ts +1555 -0
- package/dist/layers/index.js +17 -0
- package/dist/layers/index.js.map +1 -0
- package/dist/map-client/index.cjs +4 -0
- package/dist/map-client/index.cjs.map +1 -0
- package/dist/map-client/index.d.cts +1856 -0
- package/dist/map-client/index.d.ts +1856 -0
- package/dist/map-client/index.js +3 -0
- package/dist/map-client/index.js.map +1 -0
- package/dist/maplibre-worker.mjs +12 -0
- package/dist/markerSprite-DGBQF6PO.cjs +49 -0
- package/dist/markerSprite-DGBQF6PO.cjs.map +1 -0
- package/dist/markerSprite-DZLTR6F6.js +8 -0
- package/dist/markerSprite-DZLTR6F6.js.map +1 -0
- package/dist/mountayaMap-C9mxRFib.d.cts +3277 -0
- package/dist/mountayaMap-DgnlQ2fE.d.ts +3277 -0
- package/dist/navigation/index.cjs +699 -0
- package/dist/navigation/index.cjs.map +1 -0
- package/dist/navigation/index.d.cts +632 -0
- package/dist/navigation/index.d.ts +632 -0
- package/dist/navigation/index.js +689 -0
- package/dist/navigation/index.js.map +1 -0
- package/dist/order-BLhsGsH8.d.ts +132 -0
- package/dist/order-BZkUwMou.d.cts +132 -0
- package/dist/paint-BgUcj8l7.d.cts +118 -0
- package/dist/paint-Dx_qGNE_.d.ts +118 -0
- package/dist/profile/index.cjs +675 -0
- package/dist/profile/index.cjs.map +1 -0
- package/dist/profile/index.d.cts +2086 -0
- package/dist/profile/index.d.ts +2086 -0
- package/dist/profile/index.js +18 -0
- package/dist/profile/index.js.map +1 -0
- package/dist/provider-DM71XnLX.d.cts +121 -0
- package/dist/provider-DM71XnLX.d.ts +121 -0
- package/dist/roadAccess-D_rOE4xW.d.cts +86 -0
- package/dist/roadAccess-D_rOE4xW.d.ts +86 -0
- package/dist/routeProfile-BKfSfxx6.d.ts +210 -0
- package/dist/routeProfile-BsSUABXv.d.cts +210 -0
- package/dist/seams/index.cjs +39 -0
- package/dist/seams/index.cjs.map +1 -0
- package/dist/seams/index.d.cts +254 -0
- package/dist/seams/index.d.ts +254 -0
- package/dist/seams/index.js +6 -0
- package/dist/seams/index.js.map +1 -0
- package/dist/search/index.cjs +147 -0
- package/dist/search/index.cjs.map +1 -0
- package/dist/search/index.d.cts +888 -0
- package/dist/search/index.d.ts +888 -0
- package/dist/search/index.js +14 -0
- package/dist/search/index.js.map +1 -0
- package/dist/searchHighlight-DFE7LVIL.cjs +33 -0
- package/dist/searchHighlight-DFE7LVIL.cjs.map +1 -0
- package/dist/searchHighlight-MHAQZVWG.js +12 -0
- package/dist/searchHighlight-MHAQZVWG.js.map +1 -0
- package/dist/searchLimits-j99-NTXR.d.cts +24 -0
- package/dist/searchLimits-j99-NTXR.d.ts +24 -0
- package/dist/sections-CVlc2Inr.d.cts +953 -0
- package/dist/sections-CmtaduLc.d.ts +953 -0
- package/dist/segmentRoute-C5UL_5bp.d.ts +172 -0
- package/dist/segmentRoute-CIo6dR8Y.d.cts +172 -0
- package/dist/strings-30RSdIat.d.cts +552 -0
- package/dist/strings-DPTIbzT5.d.ts +552 -0
- package/dist/stripeImage-CQUXM2YI.js +14 -0
- package/dist/stripeImage-CQUXM2YI.js.map +1 -0
- package/dist/stripeImage-R43OPA6U.cjs +39 -0
- package/dist/stripeImage-R43OPA6U.cjs.map +1 -0
- package/dist/style/index.cjs +116 -0
- package/dist/style/index.cjs.map +1 -0
- package/dist/style/index.d.cts +538 -0
- package/dist/style/index.d.ts +538 -0
- package/dist/style/index.js +11 -0
- package/dist/style/index.js.map +1 -0
- package/dist/styles.css +11 -0
- package/dist/testing/index.cjs +629 -0
- package/dist/testing/index.cjs.map +1 -0
- package/dist/testing/index.d.cts +265 -0
- package/dist/testing/index.d.ts +265 -0
- package/dist/testing/index.js +623 -0
- package/dist/testing/index.js.map +1 -0
- package/dist/timezone/index.cjs +759 -0
- package/dist/timezone/index.cjs.map +1 -0
- package/dist/timezone/index.d.cts +53 -0
- package/dist/timezone/index.d.ts +53 -0
- package/dist/timezone/index.js +757 -0
- package/dist/timezone/index.js.map +1 -0
- package/dist/types-B034JMjl.d.ts +973 -0
- package/dist/types-B2NDLxQA.d.cts +21 -0
- package/dist/types-B2NDLxQA.d.ts +21 -0
- package/dist/types-BEv8V_8V.d.cts +55 -0
- package/dist/types-BEv8V_8V.d.ts +55 -0
- package/dist/types-C8aX5KMU.d.cts +973 -0
- package/dist/types-CTQwbSdA.d.cts +321 -0
- package/dist/types-nO2joeRk.d.ts +321 -0
- package/dist/units/index.cjs +99 -0
- package/dist/units/index.cjs.map +1 -0
- package/dist/units/index.d.cts +75 -0
- package/dist/units/index.d.ts +75 -0
- package/dist/units/index.js +6 -0
- package/dist/units/index.js.map +1 -0
- package/dist/units-D9mBrusY.d.cts +900 -0
- package/dist/units-D9mBrusY.d.ts +900 -0
- package/dist/video/index.cjs +2198 -0
- package/dist/video/index.cjs.map +1 -0
- package/dist/video/index.d.cts +873 -0
- package/dist/video/index.d.ts +873 -0
- package/dist/video/index.js +2173 -0
- package/dist/video/index.js.map +1 -0
- package/dist/videoOverlay-Dh_D5_Zs.d.cts +44 -0
- package/dist/videoOverlay-Dh_D5_Zs.d.ts +44 -0
- package/dist/view/index.cjs +43 -0
- package/dist/view/index.cjs.map +1 -0
- package/dist/view/index.d.cts +836 -0
- package/dist/view/index.d.ts +836 -0
- package/dist/view/index.js +34 -0
- package/dist/view/index.js.map +1 -0
- package/dist/zones-B05QA8fy.d.cts +75 -0
- package/dist/zones-B05QA8fy.d.ts +75 -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 +1023 -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 +104 -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 +56 -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 +5674 -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 +166 -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 +566 -0
- package/src/compose/rules/urlHash.ts +19 -0
- package/src/compose/rules/viewOptions.ts +451 -0
- package/src/compose/rules/workerUrl.ts +96 -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 +286 -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 +4083 -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 +125 -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 +157 -0
- package/src/errors/rules/print.ts +129 -0
- package/src/geo/index.ts +94 -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 +81 -0
- package/src/i18n/rules/bundle.ts +378 -0
- package/src/i18n/rules/config.ts +71 -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 +1012 -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 +1943 -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 +650 -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 +593 -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 +114 -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 +212 -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,125 @@
|
|
|
1
|
+
import type { Position } from "geojson";
|
|
2
|
+
|
|
3
|
+
import { DEGREES_TO_RADIANS } from "../../units/rules/conversions.js";
|
|
4
|
+
import { walkLine } from "./lineWalk.js";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The mean Earth sphere, the one formula that measures a great-circle distance on it, and the
|
|
8
|
+
* length of its degree.
|
|
9
|
+
*
|
|
10
|
+
* Not a convenience. A repeated constant is a repeated DECISION: `EARTH_RADIUS_KM = 6371` and
|
|
11
|
+
* `EARTH_RADIUS_METERS = 6371000` are the same sphere until somebody improves one of them, and
|
|
12
|
+
* then a circle drawn by the zone builder and a distance measured by the elevation profile stop
|
|
13
|
+
* agreeing about where a point is. The numeric-literal half of `scripts/one-declaration.test.mjs`
|
|
14
|
+
* holds the radius to this file.
|
|
15
|
+
*
|
|
16
|
+
* It is the contract's `geo.geodesy.haversine`. A distance along a line (the elevation profile's
|
|
17
|
+
* distance axis, a camera path's arc length, a studio segment's length) is
|
|
18
|
+
* {@link haversineMeters} or a sum of it, and a span measured on the ground across a small
|
|
19
|
+
* area (a leg of the profile, a corridor's width in `metersToRoute`, a box's span in
|
|
20
|
+
* `boundingBoxSpanMeters`) is planar in {@link METERS_PER_DEGREE_MEAN_SPHERE}, so all of them are
|
|
21
|
+
* on this sphere. A span the camera projects (a framing, a screen padding, the frustum a zoom
|
|
22
|
+
* places) is measured in the Web Mercator degree instead, `METERS_PER_DEGREE_WEB_MERCATOR` in
|
|
23
|
+
* `geo/rules/webMercator.ts`, because the projection resolves pixels on its own sphere.
|
|
24
|
+
*
|
|
25
|
+
* It lives under `geo` rather than `profile` because a port implements `geo` straight after
|
|
26
|
+
* `units` and before anything that measures: `profile` and `camera` import it, and
|
|
27
|
+
* `@mountaya/studio` names it at runtime. The unit factors it multiplies by are not geodesy, and
|
|
28
|
+
* it imports them from `./units`.
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* EARTH_RADIUS_METERS is the mean Earth radius, the sphere {@link haversineMeters} and
|
|
33
|
+
* {@link METERS_PER_DEGREE_MEAN_SPHERE} measure on.
|
|
34
|
+
*
|
|
35
|
+
* The IUGG mean radius, which is what a haversine wants: a sphere whose surface area matches the
|
|
36
|
+
* ellipsoid's, so a great-circle distance is right on average in every direction rather than
|
|
37
|
+
* right along one meridian. A port implementing `haversineMeters` uses this number and not a
|
|
38
|
+
* WGS-84 semi-major axis, or its distances will read consistently long.
|
|
39
|
+
*/
|
|
40
|
+
export const EARTH_RADIUS_METERS = 6_371_000;
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* METERS_PER_DEGREE_MEAN_SPHERE is the ground length of one degree of arc on the sphere
|
|
44
|
+
* {@link EARTH_RADIUS_METERS} describes, about 111,194.93 m: a degree of latitude anywhere, and a
|
|
45
|
+
* degree of longitude at the equator.
|
|
46
|
+
*
|
|
47
|
+
* Derived from the radius rather than written, so the two cannot disagree. Every planar span
|
|
48
|
+
* measured on the ground is in it (a leg of the elevation profile, a corridor's width, a box's
|
|
49
|
+
* span), on the sphere {@link haversineMeters} measures along the line on. The Web Mercator
|
|
50
|
+
* degree, `METERS_PER_DEGREE_WEB_MERCATOR` in `geo/rules/webMercator.ts`, belongs to the sphere the
|
|
51
|
+
* projection resolves pixels on; each module reads the degree of the sphere it measures on.
|
|
52
|
+
*/
|
|
53
|
+
export const METERS_PER_DEGREE_MEAN_SPHERE = EARTH_RADIUS_METERS * DEGREES_TO_RADIANS;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* haversineMeters is the great-circle distance between two `[lng, lat]` positions, in meters on
|
|
57
|
+
* the sphere {@link EARTH_RADIUS_METERS} describes.
|
|
58
|
+
*
|
|
59
|
+
* Declared beside the radius so that everything measuring a distance reaches the one formula
|
|
60
|
+
* without the elevation profile's module. `@mountaya/elements/geo` publishes it, and
|
|
61
|
+
* `@mountaya/elements/profile` publishes it as well, beside the distances it measures.
|
|
62
|
+
*
|
|
63
|
+
* Two finite positions always measure a finite distance, between zero and half the
|
|
64
|
+
* circumference. A latitude is read as an angle, so one written past a pole names the place over
|
|
65
|
+
* it: `[180, 91]` is `[0, 89]`. A position that names no place, short of a longitude or a
|
|
66
|
+
* latitude or with either not finite, measures no number: the distance is NaN.
|
|
67
|
+
*
|
|
68
|
+
* @example
|
|
69
|
+
* ```ts
|
|
70
|
+
* import { haversineMeters } from "@mountaya/elements/geo";
|
|
71
|
+
*
|
|
72
|
+
* haversineMeters([0, 0], [1, 0]); // about 111,194.93: one degree of the equator, in meters
|
|
73
|
+
* ```
|
|
74
|
+
*/
|
|
75
|
+
export const haversineMeters = (a: Position, b: Position): number => {
|
|
76
|
+
// A coordinate a position leaves out is no zero, which would place it on the equator or the
|
|
77
|
+
// prime meridian: it is NaN, and so is the distance. One that is not finite reaches NaN
|
|
78
|
+
// through the sines and cosines below.
|
|
79
|
+
const [lngA = Number.NaN, latA = Number.NaN] = a;
|
|
80
|
+
const [lngB = Number.NaN, latB = Number.NaN] = b;
|
|
81
|
+
const dLat = (latB - latA) * DEGREES_TO_RADIANS;
|
|
82
|
+
const dLng = (lngB - lngA) * DEGREES_TO_RADIANS;
|
|
83
|
+
const sinLat = Math.sin(dLat / 2);
|
|
84
|
+
const sinLng = Math.sin(dLng / 2);
|
|
85
|
+
const h =
|
|
86
|
+
sinLat * sinLat +
|
|
87
|
+
Math.cos(latA * DEGREES_TO_RADIANS) * Math.cos(latB * DEGREES_TO_RADIANS) * sinLng * sinLng;
|
|
88
|
+
|
|
89
|
+
// The term lies in 0 to 1 for any two angles, and rounding can leave it a hair outside: past
|
|
90
|
+
// one for two antipodes, and under zero for one place written on both sides of a pole, where
|
|
91
|
+
// the two cosines differ in sign. The root and the arcsine have no answer out there.
|
|
92
|
+
return 2 * EARTH_RADIUS_METERS * Math.asin(Math.sqrt(Math.min(1, Math.max(0, h))));
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* cumulativeMeters returns the running arc-length in meters at each vertex of a
|
|
97
|
+
* line: index 0 is 0, and each later entry adds the great-circle distance from
|
|
98
|
+
* the previous vertex. The result has one entry per input vertex, so the total
|
|
99
|
+
* itinerary length is its last element. A line of fewer than two vertices yields a
|
|
100
|
+
* single 0 (or an empty array for an empty line). This is the one length pass
|
|
101
|
+
* the fraction lookups share, so the itinerary is measured identically everywhere.
|
|
102
|
+
*
|
|
103
|
+
* A vertex that names no place (a hole, a position written short, or a longitude or latitude
|
|
104
|
+
* that is not finite) keeps its index and stands at the distance of the last vertex that did, 0
|
|
105
|
+
* before any, and the vertex after it is measured from that one, as every walk of a line reads
|
|
106
|
+
* it. One such vertex never turns the distances after it into `NaN`.
|
|
107
|
+
*/
|
|
108
|
+
export const cumulativeMeters = (line: readonly Position[]): number[] => {
|
|
109
|
+
const out = new Array<number>(line.length);
|
|
110
|
+
walkLine(line, 0, haversineMeters, (distance, _vertex, index) => {
|
|
111
|
+
out[index] = distance;
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
return out;
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* routeLengthMeters is the total great-circle length of a line in meters: the
|
|
119
|
+
* last cumulative-distance entry, or 0 for a line that cannot describe a length.
|
|
120
|
+
*/
|
|
121
|
+
export const routeLengthMeters = (line: readonly Position[]): number => {
|
|
122
|
+
const cumulative = cumulativeMeters(line);
|
|
123
|
+
|
|
124
|
+
return cumulative[cumulative.length - 1] ?? 0;
|
|
125
|
+
};
|
|
@@ -0,0 +1,362 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GeoJSON helpers for the shapes the Mountaya API sends.
|
|
3
|
+
*
|
|
4
|
+
* The API sends an itinerary's geometry in one of two shapes, and never as a collection of one
|
|
5
|
+
* member: a waypoint is a bare `Point`, a linestring segment is a bare `LineString` (or a
|
|
6
|
+
* `GeometryCollection` of that line and a `MultiPoint` of the vertices drawn, where resampling
|
|
7
|
+
* added positions between them), and a directions segment is a `GeometryCollection` of the
|
|
8
|
+
* routed `LineString` and a `MultiPoint` of the vias it was routed through. Every reader here
|
|
9
|
+
* flattens first, so a bare geometry and a collection holding it read alike: a caller asks for
|
|
10
|
+
* the leaf it wants and never branches on the shape.
|
|
11
|
+
*
|
|
12
|
+
* All of it is pure. Nothing here touches a renderer, so it runs in a worker, on a server,
|
|
13
|
+
* or beside a map.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
import type { Geometry, GeometryCollection, LineString, Point, Polygon, Position } from "geojson";
|
|
17
|
+
|
|
18
|
+
import { DEGREES_PER_TURN } from "../../units/rules/conversions.js";
|
|
19
|
+
import { LONGITUDE_LIMIT } from "./longitude.js";
|
|
20
|
+
import type { BoundingBox } from "./types.js";
|
|
21
|
+
|
|
22
|
+
/** LeafGeometry is any GeoJSON geometry other than a GeometryCollection. */
|
|
23
|
+
type LeafGeometry = Exclude<Geometry, GeometryCollection>;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* CoordinateTree is what a leaf geometry's `coordinates` holds: a number, or a list of trees to
|
|
27
|
+
* any depth, which is a position, a line, a ring or a list of either.
|
|
28
|
+
*/
|
|
29
|
+
type CoordinateTree = number | readonly CoordinateTree[];
|
|
30
|
+
|
|
31
|
+
/** isCoordinateList reports whether a coordinate tree is a list rather than a single number. */
|
|
32
|
+
const isCoordinateList = (tree: CoordinateTree | undefined): tree is readonly CoordinateTree[] =>
|
|
33
|
+
Array.isArray(tree);
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* flattenGeometries expands a geometry into its leaf geometries, unwrapping a
|
|
37
|
+
* `GeometryCollection` of any nesting depth.
|
|
38
|
+
*
|
|
39
|
+
* A leaf geometry returns as a single-element list; a null or empty input returns an empty
|
|
40
|
+
* list. This is the first call in almost any read of Mountaya geometry: inspecting
|
|
41
|
+
* `geometry.type` without it sees `"GeometryCollection"` and nothing else.
|
|
42
|
+
*/
|
|
43
|
+
export const flattenGeometries = (geometry: Geometry | null | undefined): LeafGeometry[] => {
|
|
44
|
+
if (!geometry) {
|
|
45
|
+
return [];
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
if (geometry.type === "GeometryCollection") {
|
|
49
|
+
const leaves: LeafGeometry[] = [];
|
|
50
|
+
for (const child of geometry.geometries) {
|
|
51
|
+
leaves.push(...flattenGeometries(child));
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
return leaves;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
return [geometry];
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* buildGeometryCollection wraps leaf geometries into the single-level `GeometryCollection` the
|
|
62
|
+
* Mountaya API's wire contract uses.
|
|
63
|
+
*
|
|
64
|
+
* The inverse of {@link flattenGeometries}: build on save, flatten on load. The leaves are
|
|
65
|
+
* placed directly because the input is already flat, so a round trip through
|
|
66
|
+
* `flattenGeometries` returns them unchanged.
|
|
67
|
+
*
|
|
68
|
+
* @param leaves The leaves, in the order the collection holds them. The list is read and not
|
|
69
|
+
* kept, so one held `readonly` is taken as it is.
|
|
70
|
+
* @returns A collection over a list of its own, holding the caller's own leaves: a leaf added to
|
|
71
|
+
* the caller's list afterwards is no part of it.
|
|
72
|
+
*/
|
|
73
|
+
export const buildGeometryCollection = (leaves: readonly LeafGeometry[]): GeometryCollection => ({
|
|
74
|
+
geometries: [...leaves],
|
|
75
|
+
type: "GeometryCollection",
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* extractLineStrings returns every leaf `LineString` of a geometry.
|
|
80
|
+
*
|
|
81
|
+
* A bare `LineString`, a linestring segment as the API sends it, yields itself. A directions
|
|
82
|
+
* segment yields its single routed line: the `MultiPoint` of vias beside it is not a
|
|
83
|
+
* `LineString` and is dropped, which is usually what a caller drawing the itinerary wants. Use
|
|
84
|
+
* {@link extractVias} for the other half.
|
|
85
|
+
*/
|
|
86
|
+
export const extractLineStrings = (geometry: Geometry | null | undefined): LineString[] => {
|
|
87
|
+
const lines: LineString[] = [];
|
|
88
|
+
for (const leaf of flattenGeometries(geometry)) {
|
|
89
|
+
if (leaf.type === "LineString") {
|
|
90
|
+
lines.push(leaf);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
return lines;
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* extractLines returns every line a geometry holds as a `LineString`, in the order written.
|
|
99
|
+
*
|
|
100
|
+
* Each `LineString` leaf comes back as it is, and each line of a `MultiLineString` leaf as a
|
|
101
|
+
* `LineString` over that line's own coordinates, at any depth of a `GeometryCollection`. Nothing
|
|
102
|
+
* is copied, so a reader that memoizes on a line or on its coordinates keeps the identity it
|
|
103
|
+
* had. A leaf that is no line (a directions segment's `MultiPoint` of vias, a waypoint's
|
|
104
|
+
* `Point`) is left out.
|
|
105
|
+
*
|
|
106
|
+
* Every reader of a segment's geometry walks these lines: the flight's route, the profile's
|
|
107
|
+
* points and bands, a collapsed group and a corridor. {@link extractLineStrings} answers the
|
|
108
|
+
* narrower question of which leaves are `LineString` features, and reads a segment drawn as
|
|
109
|
+
* tracks, the `MultiLineString` most GPX converters write, as one with no line.
|
|
110
|
+
*
|
|
111
|
+
* @param geometry The geometry, or nothing.
|
|
112
|
+
* @returns The lines in document order, empty for a geometry that holds none.
|
|
113
|
+
*/
|
|
114
|
+
export const extractLines = (geometry: Geometry | null | undefined): LineString[] => {
|
|
115
|
+
const lines: LineString[] = [];
|
|
116
|
+
for (const leaf of flattenGeometries(geometry)) {
|
|
117
|
+
if (leaf.type === "LineString") {
|
|
118
|
+
lines.push(leaf);
|
|
119
|
+
} else if (leaf.type === "MultiLineString") {
|
|
120
|
+
for (const coordinates of leaf.coordinates) {
|
|
121
|
+
lines.push({ coordinates, type: "LineString" });
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
return lines;
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* extractPoint returns the first leaf `Point` of a geometry, or null when it carries none.
|
|
131
|
+
*
|
|
132
|
+
* A waypoint arrives as a bare `Point`, which is the case this exists for; a collection holding
|
|
133
|
+
* one reads the same.
|
|
134
|
+
*/
|
|
135
|
+
export const extractPoint = (geometry: Geometry | null | undefined): Point | null => {
|
|
136
|
+
for (const leaf of flattenGeometries(geometry)) {
|
|
137
|
+
if (leaf.type === "Point") {
|
|
138
|
+
return leaf;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
return null;
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* extractVias returns the via coordinates of a directions segment: the points the router was
|
|
147
|
+
* asked to route through, stored as the segment's `MultiPoint` leaf.
|
|
148
|
+
*
|
|
149
|
+
* This is what seeds a draggable-waypoint editor from saved geometry: the routed line says where
|
|
150
|
+
* the itinerary went, and only the vias say what was asked for.
|
|
151
|
+
*
|
|
152
|
+
* @param geometry The segment's geometry, or nothing.
|
|
153
|
+
* @returns The vias in a list of its own, so a via pushed onto it or taken off it leaves the
|
|
154
|
+
* segment as it was. Each position is the segment's own. Empty for a geometry carrying no
|
|
155
|
+
* `MultiPoint`: a freehand linestring, a waypoint.
|
|
156
|
+
*/
|
|
157
|
+
export const extractVias = (geometry: Geometry | null | undefined): Position[] => {
|
|
158
|
+
for (const leaf of flattenGeometries(geometry)) {
|
|
159
|
+
if (leaf.type === "MultiPoint") {
|
|
160
|
+
return [...leaf.coordinates];
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
return [];
|
|
165
|
+
};
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* geometriesEqual reports whether two geometries are structurally identical (the same
|
|
169
|
+
* `type` and a deep-equal coordinate tree), treating two nulls as equal and a
|
|
170
|
+
* null-versus-present pair as unequal.
|
|
171
|
+
*
|
|
172
|
+
* The comparison is a structural walk rather than a reference check on purpose. Geometry
|
|
173
|
+
* handed to a renderer is typically rebuilt each frame or each render, so identity never
|
|
174
|
+
* holds even when the shape has not moved, and a reference check would report every
|
|
175
|
+
* unchanged shape as changed.
|
|
176
|
+
*/
|
|
177
|
+
export const geometriesEqual = (
|
|
178
|
+
a: Geometry | null | undefined,
|
|
179
|
+
b: Geometry | null | undefined,
|
|
180
|
+
): boolean => {
|
|
181
|
+
if (!a || !b) {
|
|
182
|
+
return !a && !b;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
if (a.type === "GeometryCollection" || b.type === "GeometryCollection") {
|
|
186
|
+
return (
|
|
187
|
+
a.type === "GeometryCollection" &&
|
|
188
|
+
b.type === "GeometryCollection" &&
|
|
189
|
+
a.geometries.length === b.geometries.length &&
|
|
190
|
+
a.geometries.every((child, index) => geometriesEqual(child, b.geometries[index]))
|
|
191
|
+
);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
return a.type === b.type && coordinatesEqual(a.coordinates, b.coordinates);
|
|
195
|
+
};
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* coordinatesEqual deep-compares two GeoJSON coordinate trees (a number, or an
|
|
199
|
+
* arbitrarily nested array of numbers) by value then length and element-wise. The
|
|
200
|
+
* recursive core geometriesEqual walks coordinates with.
|
|
201
|
+
*/
|
|
202
|
+
const coordinatesEqual = (
|
|
203
|
+
a: CoordinateTree | undefined,
|
|
204
|
+
b: CoordinateTree | undefined,
|
|
205
|
+
): boolean => {
|
|
206
|
+
if (isCoordinateList(a) && isCoordinateList(b)) {
|
|
207
|
+
if (a.length !== b.length) {
|
|
208
|
+
return false;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
return a.every((child, index) => coordinatesEqual(child, b[index]));
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
return a === b;
|
|
215
|
+
};
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* boundsOf computes a bounding box covering every position of the given geometries,
|
|
219
|
+
* flattening any `GeometryCollection` nesting so a directions segment contributes its itinerary
|
|
220
|
+
* line and its vias alike. Returns null when there is nothing to bound.
|
|
221
|
+
*
|
|
222
|
+
* Longitude is read in two frames, as written and across the antimeridian, and the box is the
|
|
223
|
+
* narrower of the two, which is not always the narrowest arc covering the set. A set whose
|
|
224
|
+
* positions straddle the antimeridian (an itinerary on either side of 180 degrees, or a shape cut
|
|
225
|
+
* in two there, as the GeoJSON specification asks) is framed the short way round, with `east`
|
|
226
|
+
* above 180: `[179.5, s, 180.5, n]` rather than the 359-degree box the same longitudes span as
|
|
227
|
+
* written. Every other set keeps its longitudes as written: a box only reads across the
|
|
228
|
+
* antimeridian when the set as written spans more than half the world and that reading is
|
|
229
|
+
* narrower. Positions alone cannot tell such a set from a shape drawn wider than half the world
|
|
230
|
+
* across the prime meridian, which therefore reads the narrow way too. The exception is a set
|
|
231
|
+
* whose every position lies on the antimeridian, written as both 180 and -180 as the whole-world
|
|
232
|
+
* rectangle is: across it, the box would be one meridian wide, so it keeps its written width.
|
|
233
|
+
*
|
|
234
|
+
* The box is the one MapLibre's own `fitBounds` takes, and MapLibre frames a box whose `east`
|
|
235
|
+
* runs past 180 across the line. `MountayaMap.fitBounds`, and a drawing's `fit` through it,
|
|
236
|
+
* keep that form, so through the façade a set straddling the line is framed across it too.
|
|
237
|
+
*
|
|
238
|
+
* A position missing a coordinate, or holding a non-finite one, bounds nothing: read as zero,
|
|
239
|
+
* it would stretch the box to the equator or the prime meridian, and a NaN would make the whole
|
|
240
|
+
* box NaN. The elevation, where there is one, is ignored.
|
|
241
|
+
*/
|
|
242
|
+
export const boundsOf = (geometries: readonly Geometry[]): BoundingBox | null => {
|
|
243
|
+
let south = Number.POSITIVE_INFINITY;
|
|
244
|
+
let north = Number.NEGATIVE_INFINITY;
|
|
245
|
+
// Longitude in two frames at once: as written, and with the western hemisphere turned a full
|
|
246
|
+
// circle east, where a set straddling the antimeridian is one short run.
|
|
247
|
+
let west = Number.POSITIVE_INFINITY;
|
|
248
|
+
let east = Number.NEGATIVE_INFINITY;
|
|
249
|
+
let turnedWest = Number.POSITIVE_INFINITY;
|
|
250
|
+
let turnedEast = Number.NEGATIVE_INFINITY;
|
|
251
|
+
|
|
252
|
+
const visit = (lng: CoordinateTree | undefined, lat: CoordinateTree | undefined) => {
|
|
253
|
+
if (
|
|
254
|
+
typeof lng !== "number" ||
|
|
255
|
+
typeof lat !== "number" ||
|
|
256
|
+
!Number.isFinite(lng) ||
|
|
257
|
+
!Number.isFinite(lat)
|
|
258
|
+
) {
|
|
259
|
+
return;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
const turned = lng < 0 ? lng + DEGREES_PER_TURN : lng;
|
|
263
|
+
west = Math.min(west, lng);
|
|
264
|
+
east = Math.max(east, lng);
|
|
265
|
+
turnedWest = Math.min(turnedWest, turned);
|
|
266
|
+
turnedEast = Math.max(turnedEast, turned);
|
|
267
|
+
south = Math.min(south, lat);
|
|
268
|
+
north = Math.max(north, lat);
|
|
269
|
+
};
|
|
270
|
+
|
|
271
|
+
const walk = (coords: CoordinateTree) => {
|
|
272
|
+
if (!isCoordinateList(coords)) {
|
|
273
|
+
return;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
// A list that opens on a number is a position: its longitude, then its latitude.
|
|
277
|
+
if (typeof coords[0] === "number") {
|
|
278
|
+
visit(coords[0], coords[1]);
|
|
279
|
+
|
|
280
|
+
return;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
for (const child of coords) {
|
|
284
|
+
walk(child);
|
|
285
|
+
}
|
|
286
|
+
};
|
|
287
|
+
|
|
288
|
+
for (const geometry of geometries) {
|
|
289
|
+
// Flatten first so a GeometryCollection of any depth, including a doubly nested input,
|
|
290
|
+
// contributes every leaf's coordinates.
|
|
291
|
+
for (const leaf of flattenGeometries(geometry)) {
|
|
292
|
+
walk(leaf.coordinates);
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
if (south === Number.POSITIVE_INFINITY) {
|
|
297
|
+
return null;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
// The turned frame can only be narrower for a set spanning more than half the world as
|
|
301
|
+
// written, and it is then narrower exactly when the set straddles the antimeridian rather than
|
|
302
|
+
// wrapping the globe. Asking only then keeps a turn's rounding (a tiny negative longitude plus
|
|
303
|
+
// 360 is 360) from reading a small set the long way round. A turned frame of no width on the
|
|
304
|
+
// antimeridian is a set lying wholly on it, written from both sides, and it keeps its written
|
|
305
|
+
// width. The turned box's west edge is brought back within [-180, 180], so only its east edge
|
|
306
|
+
// runs past 180.
|
|
307
|
+
const turnedSpan = turnedEast - turnedWest;
|
|
308
|
+
const onAntimeridian = turnedSpan === 0 && turnedWest === LONGITUDE_LIMIT;
|
|
309
|
+
if (east - west > LONGITUDE_LIMIT && !onAntimeridian && turnedSpan < east - west) {
|
|
310
|
+
const shift = turnedWest > LONGITUDE_LIMIT ? DEGREES_PER_TURN : 0;
|
|
311
|
+
|
|
312
|
+
return [turnedWest - shift, south, turnedEast - shift, north];
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
return [west, south, east, north];
|
|
316
|
+
};
|
|
317
|
+
|
|
318
|
+
/**
|
|
319
|
+
* boundingBoxToPolygon turns a bounding box into the axis-aligned rectangle `Polygon` a
|
|
320
|
+
* draw surface renders it as: one counter-clockwise ring of five positions starting at the
|
|
321
|
+
* south-west corner, with the first repeated last to close it as GeoJSON requires.
|
|
322
|
+
*
|
|
323
|
+
* {@link boundsOf} over the result gives the box back for a box at most 180 degrees wide, one
|
|
324
|
+
* whose `east` runs past 180 included, and for the whole-world box. A wider box whose edges lie
|
|
325
|
+
* on either side of the prime meridian does not survive the round trip: its corners alone read
|
|
326
|
+
* the narrow way round, so `[-170, s, 170, n]` comes back as `[170, s, 190, n]`. A reader of a
|
|
327
|
+
* drawn rectangle that may be wider takes its extent from the ring's own corners instead.
|
|
328
|
+
*/
|
|
329
|
+
export const boundingBoxToPolygon = (bounds: BoundingBox): Polygon => {
|
|
330
|
+
const [west, south, east, north] = bounds;
|
|
331
|
+
|
|
332
|
+
return {
|
|
333
|
+
coordinates: [
|
|
334
|
+
[
|
|
335
|
+
[west, south],
|
|
336
|
+
[east, south],
|
|
337
|
+
[east, north],
|
|
338
|
+
[west, north],
|
|
339
|
+
[west, south],
|
|
340
|
+
],
|
|
341
|
+
],
|
|
342
|
+
type: "Polygon",
|
|
343
|
+
};
|
|
344
|
+
};
|
|
345
|
+
|
|
346
|
+
/**
|
|
347
|
+
* segmentLineCoordinates lays the coordinates of every line a geometry holds end to end, in the
|
|
348
|
+
* order written: the path a segment is walked along.
|
|
349
|
+
*
|
|
350
|
+
* The lines are the ones {@link extractLines} answers: a `LineString` at any depth of a
|
|
351
|
+
* `GeometryCollection` and each line of a `MultiLineString`. A directions segment's via
|
|
352
|
+
* `MultiPoint` is no line and is left out. The index of a coordinate in the list is the index a
|
|
353
|
+
* segment's stored analysis addresses it by (`from_index` and `to_index`).
|
|
354
|
+
*
|
|
355
|
+
* @param geometry The segment's geometry, or nothing.
|
|
356
|
+
* @returns A list of the caller's own positions, empty for a geometry that holds no line.
|
|
357
|
+
*/
|
|
358
|
+
export const segmentLineCoordinates = (geometry: Geometry | null | undefined): Position[] =>
|
|
359
|
+
// `flatMap`, not `push(...line.coordinates)`: a spread becomes an argument list, and an
|
|
360
|
+
// argument list has an engine ceiling, around 125,000 in V8, that one imported GPX track of a
|
|
361
|
+
// long ride reaches. It fails as a `RangeError` far from the import that produced the geometry.
|
|
362
|
+
extractLines(geometry).flatMap((line) => line.coordinates);
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import type { Position } from "geojson";
|
|
2
|
+
|
|
3
|
+
/** PlacedPosition is a position {@link namesPlace} accepts: a longitude and a latitude first. */
|
|
4
|
+
export type PlacedPosition = [number, number, ...number[]];
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* namesPlace reports whether a position names a place: it states a longitude and a latitude,
|
|
8
|
+
* and both are finite numbers.
|
|
9
|
+
*
|
|
10
|
+
* The one statement of the rule every walk of a line reads. A vertex that names no place is a
|
|
11
|
+
* hole in the array, a position written short, or one whose longitude or latitude is `NaN` or
|
|
12
|
+
* infinite. It is measured from nothing and to nothing: a distance summed through it is `NaN`
|
|
13
|
+
* from there to the end of the itinerary. The elevation is no part of the place, so a vertex
|
|
14
|
+
* with none still names one.
|
|
15
|
+
*
|
|
16
|
+
* @param position The vertex as it is written, or `undefined` for a hole in the array.
|
|
17
|
+
*/
|
|
18
|
+
export const namesPlace = (position: Readonly<Position> | undefined): position is PlacedPosition =>
|
|
19
|
+
position !== undefined && Number.isFinite(position[0]) && Number.isFinite(position[1]);
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* LineVisitor is what {@link walkLine} calls at each entry of a line, in order.
|
|
23
|
+
*
|
|
24
|
+
* `distance` is where the entry stands, in the unit the walk measures in. `vertex` is the
|
|
25
|
+
* position, or `null` for an entry that names no place, which stands at the distance of the
|
|
26
|
+
* last one that did. `index` is the entry's own place in the line, so a caller that addresses
|
|
27
|
+
* vertices by index reads the same index whether or not an entry before it names a place.
|
|
28
|
+
*/
|
|
29
|
+
type LineVisitor = (distance: number, vertex: Position | null, index: number) => void;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* walkLine walks one line from `start` and answers the distance at its last vertex.
|
|
33
|
+
*
|
|
34
|
+
* The one statement of how a line's length is summed along a profile: the elevation series,
|
|
35
|
+
* `profileLength` with the spans that read it, and a route's points and bands all read it, and
|
|
36
|
+
* so does `cumulativeMeters`, which measures a flight's route and a followed one. A flight's
|
|
37
|
+
* route holds no vertex to bridge: `itineraryToRouteGeometry` leaves out the vertices
|
|
38
|
+
* {@link namesPlace} refuses before it is measured.
|
|
39
|
+
*
|
|
40
|
+
* Distance accumulates from each vertex that names a place to the next one that does, so a
|
|
41
|
+
* vertex that names none charges nothing and the line is measured across it. Nothing is
|
|
42
|
+
* charged to reach the first vertex: the jump from the line before it is ground nobody covers,
|
|
43
|
+
* which is why `start` is handed in and not measured.
|
|
44
|
+
*
|
|
45
|
+
* @param coordinates The line's vertices, as they are written.
|
|
46
|
+
* @param start The distance the line's first vertex stands at.
|
|
47
|
+
* @param legLength Measures one leg, from a vertex to the next. Its unit is the walk's.
|
|
48
|
+
* @param visit Called at every entry of the line, placed or not.
|
|
49
|
+
* @returns The distance at the last vertex, which is `start` for a line with no leg.
|
|
50
|
+
*/
|
|
51
|
+
export const walkLine = (
|
|
52
|
+
coordinates: readonly Position[],
|
|
53
|
+
start: number,
|
|
54
|
+
legLength: (from: Position, to: Position) => number,
|
|
55
|
+
visit?: LineVisitor,
|
|
56
|
+
): number => {
|
|
57
|
+
let distance = start;
|
|
58
|
+
let previous: Position | null = null;
|
|
59
|
+
|
|
60
|
+
for (let index = 0; index < coordinates.length; index += 1) {
|
|
61
|
+
const vertex = coordinates[index];
|
|
62
|
+
if (!namesPlace(vertex)) {
|
|
63
|
+
visit?.(distance, null, index);
|
|
64
|
+
|
|
65
|
+
continue;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
if (previous !== null) {
|
|
69
|
+
distance += legLength(previous, vertex);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
previous = vertex;
|
|
73
|
+
visit?.(distance, vertex, index);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
return distance;
|
|
77
|
+
};
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A longitude is an angle: the range it is written in, the wrap that brings one back into that
|
|
3
|
+
* range, and the short way between two of them.
|
|
4
|
+
*
|
|
5
|
+
* A map that pans across the antimeridian keeps counting, and a line that crosses it is written
|
|
6
|
+
* 179.9 then -179.9, so two spellings of one meridian sit a whole turn apart as numbers. Every
|
|
7
|
+
* rule that subtracts, interpolates or bounds longitudes reads the angle through this module, so
|
|
8
|
+
* a point across the line from a route measures the few meters it is from it and a route across
|
|
9
|
+
* the line is followed the short way.
|
|
10
|
+
*
|
|
11
|
+
* Pure arithmetic. Nothing here touches a renderer.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
import { DEGREES_PER_TURN } from "../../units/rules/conversions.js";
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* LONGITUDE_LIMIT is the longitude of the antimeridian, east and west, in degrees: the edge of
|
|
18
|
+
* the range the wire writes a longitude in.
|
|
19
|
+
*
|
|
20
|
+
* A longitude is within the range when its magnitude is at most this. Every `@mountaya/*`
|
|
21
|
+
* package that bounds, wraps or validates a longitude reads it here, so the antimeridian is
|
|
22
|
+
* stated once.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```ts
|
|
26
|
+
* import { LATITUDE_LIMIT, LONGITUDE_LIMIT } from "@mountaya/elements/geo";
|
|
27
|
+
*
|
|
28
|
+
* const onTheGlobe = ([lng, lat]: [number, number]): boolean =>
|
|
29
|
+
* Math.abs(lng) <= LONGITUDE_LIMIT && Math.abs(lat) <= LATITUDE_LIMIT;
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
export const LONGITUDE_LIMIT = 180;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* LATITUDE_LIMIT is the latitude of each pole, in degrees: the edge of the range a latitude is
|
|
36
|
+
* written in.
|
|
37
|
+
*
|
|
38
|
+
* A latitude is within the range when its magnitude is at most this, and no place lies past
|
|
39
|
+
* it: where a longitude past its limit is the same meridian a turn away, a latitude past this
|
|
40
|
+
* one names nothing.
|
|
41
|
+
*/
|
|
42
|
+
export const LATITUDE_LIMIT = 90;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* wrapLongitude brings a longitude into [-180, 180), the range the wire writes one in.
|
|
46
|
+
*
|
|
47
|
+
* A map that pans across the antimeridian keeps counting, so a camera centre can read 197.5
|
|
48
|
+
* where the same place is -162.5, and the wire refuses the first.
|
|
49
|
+
*
|
|
50
|
+
* @param longitude A longitude in degrees, any number of turns from the range.
|
|
51
|
+
* @returns The same meridian within [-180, 180), so the antimeridian is written -180. `NaN` for
|
|
52
|
+
* a longitude that names no meridian: `NaN` or an infinity.
|
|
53
|
+
*/
|
|
54
|
+
export const wrapLongitude = (longitude: number): number =>
|
|
55
|
+
((((longitude + LONGITUDE_LIMIT) % DEGREES_PER_TURN) + DEGREES_PER_TURN) % DEGREES_PER_TURN) -
|
|
56
|
+
LONGITUDE_LIMIT;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* wrapLongitudePastRange writes a longitude within [-180, 180], and keeps one already there as it
|
|
60
|
+
* is written.
|
|
61
|
+
*
|
|
62
|
+
* {@link wrapLongitude}'s arithmetic costs a value already in the range its last digits and
|
|
63
|
+
* writes the antimeridian -180 whichever side it was written on. A position read back for a
|
|
64
|
+
* reader, sent to the API or handed to a drawing engine keeps the digits it holds, so the wrap
|
|
65
|
+
* is taken only where the longitude is past the range.
|
|
66
|
+
*
|
|
67
|
+
* @param longitude A longitude in degrees, any number of turns from the range.
|
|
68
|
+
* @returns `longitude` itself where it is within [-180, 180], 180 included, and
|
|
69
|
+
* {@link wrapLongitude}'s answer otherwise. `NaN` for a longitude that names no meridian.
|
|
70
|
+
*
|
|
71
|
+
* @example
|
|
72
|
+
* ```ts
|
|
73
|
+
* import { wrapLongitudePastRange } from "@mountaya/elements/geo";
|
|
74
|
+
*
|
|
75
|
+
* wrapLongitudePastRange(6.8652); // 6.8652
|
|
76
|
+
* wrapLongitudePastRange(180); // 180
|
|
77
|
+
* wrapLongitudePastRange(190); // -170
|
|
78
|
+
* ```
|
|
79
|
+
*/
|
|
80
|
+
export const wrapLongitudePastRange = (longitude: number): number =>
|
|
81
|
+
Math.abs(longitude) <= LONGITUDE_LIMIT ? longitude : wrapLongitude(longitude);
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* longitudeDelta is the signed short way from one longitude to another, in degrees: positive
|
|
85
|
+
* eastward, never longer than half a turn.
|
|
86
|
+
*
|
|
87
|
+
* From 179.9 to -179.9 it answers 0.2, where the plain difference reads -359.8 and sends an
|
|
88
|
+
* interpolation or a distance the long way round the planet. A difference that is already the
|
|
89
|
+
* short way is answered as the subtraction gives it, digit for digit, so a line that never
|
|
90
|
+
* crosses the antimeridian is measured exactly as plain arithmetic measures it.
|
|
91
|
+
*
|
|
92
|
+
* @param from The longitude measured from, in degrees.
|
|
93
|
+
* @param to The longitude measured to, in degrees.
|
|
94
|
+
* @returns The difference within [-180, 180]. Two meridians exactly half a turn apart are as far
|
|
95
|
+
* one way as the other: the plain difference is kept where it is half a turn, and a longer one
|
|
96
|
+
* answers -180. `NaN` where either longitude names no meridian.
|
|
97
|
+
*/
|
|
98
|
+
export const longitudeDelta = (from: number, to: number): number =>
|
|
99
|
+
wrapLongitudePastRange(to - from);
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SEARCH_LIMIT_MAX is the most results one branch answers with: the ceiling the Data API sets on
|
|
3
|
+
* a search's `limit`.
|
|
4
|
+
*
|
|
5
|
+
* A whole number of results. `SearchEngine` of `@mountaya/elements/search` refuses a `limit`
|
|
6
|
+
* past it at construction, and a contract that states a search's `limit` reads this constant,
|
|
7
|
+
* so the two refuse the same values.
|
|
8
|
+
*
|
|
9
|
+
* It is declared here, beside the box a search is asked over, and published by this entry and
|
|
10
|
+
* by `@mountaya/elements/search`. A module that needs the bound and no search reads it from
|
|
11
|
+
* `@mountaya/elements/geo`, which holds no engine: the search entry brings the engine, its rows
|
|
12
|
+
* and its focus with it.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* import { SEARCH_LIMIT_MAX } from "@mountaya/elements/geo";
|
|
17
|
+
*
|
|
18
|
+
* const withinTheCeiling = (limit: number): boolean =>
|
|
19
|
+
* Number.isInteger(limit) && limit >= 1 && limit <= SEARCH_LIMIT_MAX;
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
export const SEARCH_LIMIT_MAX = 50;
|