@mountaya/elements 0.1.0 → 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 +38 -0
- package/README.md +4 -3
- package/THIRD-PARTY-NOTICES.txt +1 -1
- package/dist/agent/index.cjs +1152 -1905
- package/dist/agent/index.cjs.map +1 -1
- package/dist/agent/index.d.cts +1152 -1202
- package/dist/agent/index.d.ts +1152 -1202
- package/dist/agent/index.js +1147 -1903
- package/dist/agent/index.js.map +1 -1
- package/dist/camera/index.cjs +2470 -3435
- package/dist/camera/index.cjs.map +1 -1
- package/dist/camera/index.d.cts +716 -744
- package/dist/camera/index.d.ts +716 -744
- package/dist/camera/index.js +2438 -3323
- package/dist/camera/index.js.map +1 -1
- package/dist/{units-D9mBrusY.d.cts → chunk-5pTPpv4v.d.cts} +38 -41
- package/dist/{units-D9mBrusY.d.ts → chunk-5pTPpv4v.d.ts} +38 -41
- package/dist/{order-BLhsGsH8.d.ts → chunk-6JzFMFHh.d.ts} +15 -28
- 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/{zones-B05QA8fy.d.ts → chunk-A48H1rDg.d.cts} +2 -4
- package/dist/{zones-B05QA8fy.d.cts → chunk-A48H1rDg.d.ts} +2 -4
- package/dist/chunk-B-m1AchR.cjs +57 -0
- package/dist/chunk-B-m1AchR.cjs.map +1 -0
- package/dist/{bundle-xYrrbJTH.d.ts → chunk-B-qFTf04.d.ts} +51 -57
- 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/{types-nO2joeRk.d.ts → chunk-B98mKrdu.d.cts} +103 -122
- package/dist/{videoOverlay-Dh_D5_Zs.d.ts → chunk-BB0PmqIM.d.cts} +10 -10
- 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/{sections-CVlc2Inr.d.cts → chunk-BNX5LAfN.d.cts} +289 -330
- package/dist/chunk-BP6KgA86.js +35 -0
- package/dist/chunk-BP6KgA86.js.map +1 -0
- package/dist/{segmentRoute-C5UL_5bp.d.ts → chunk-BRnjQq6K.d.cts} +44 -59
- 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/{types-CTQwbSdA.d.cts → chunk-BZ5KyZXI.d.ts} +103 -122
- 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/{geodesy-543qXKtI.d.ts → chunk-Bk0L8g5J.d.cts} +3 -4
- package/dist/{geodesy-543qXKtI.d.cts → chunk-Bk0L8g5J.d.ts} +3 -4
- 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/{order-BZkUwMou.d.cts → chunk-Bq_WHTfd.d.cts} +15 -28
- package/dist/chunk-Bqt4LBBz.cjs +648 -0
- package/dist/chunk-Bqt4LBBz.cjs.map +1 -0
- package/dist/{language-CEWQ5uYw.d.cts → chunk-Bqt97zwf.d.cts} +3 -18
- package/dist/{language-CEWQ5uYw.d.ts → chunk-Bqt97zwf.d.ts} +3 -18
- 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/{elevationTiles-pmsb9wnU.d.cts → chunk-BxDQZDXR.d.cts} +26 -27
- package/dist/{elevationTiles-pmsb9wnU.d.ts → chunk-BxDQZDXR.d.ts} +26 -27
- 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/{camera-C48Ykaxv.d.ts → chunk-CAUZnoCs.d.ts} +135 -159
- 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/{bundle-Je5zsRFg.d.cts → chunk-CFIo021l.d.cts} +51 -57
- 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/{searchLimits-j99-NTXR.d.ts → chunk-CWpqBgkF.d.cts} +2 -2
- package/dist/{searchLimits-j99-NTXR.d.cts → chunk-CWpqBgkF.d.ts} +2 -2
- 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/{amenities-B3-qAjxu.d.cts → chunk-C_fQFr70.d.cts} +40 -41
- package/dist/{amenities-B3-qAjxu.d.ts → chunk-C_fQFr70.d.ts} +40 -41
- 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/{camera-BrFLU1DH.d.cts → chunk-CeiTuMyt.d.cts} +135 -159
- 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/{geolocation-DDkQdWMN.d.cts → chunk-D-4MxHTt.d.cts} +33 -34
- package/dist/{geolocation-DDkQdWMN.d.ts → chunk-D-4MxHTt.d.ts} +33 -34
- 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/{videoOverlay-Dh_D5_Zs.d.cts → chunk-D89E-w70.d.ts} +10 -10
- 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/{sections-CmtaduLc.d.ts → chunk-DJpUw8TN.d.ts} +289 -330
- 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/{provider-DM71XnLX.d.cts → chunk-DWsm3HIW.d.cts} +37 -38
- package/dist/{provider-DM71XnLX.d.ts → chunk-DWsm3HIW.d.ts} +37 -38
- 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/{segmentRoute-CIo6dR8Y.d.cts → chunk-DeSjQXiI.d.ts} +44 -59
- 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/{roadAccess-D_rOE4xW.d.cts → chunk-Dr5MCIpS.d.cts} +5 -28
- package/dist/{roadAccess-D_rOE4xW.d.ts → chunk-Dr5MCIpS.d.ts} +5 -28
- 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/{routeProfile-BsSUABXv.d.cts → chunk-QKWhxfPv.d.cts} +196 -45
- package/dist/{routeProfile-BKfSfxx6.d.ts → chunk-QKWhxfPv.d.ts} +196 -45
- 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/{types-BEv8V_8V.d.cts → chunk-fozLXfHY.d.cts} +8 -8
- package/dist/{types-BEv8V_8V.d.ts → chunk-fozLXfHY.d.ts} +8 -8
- 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 +802 -1254
- package/dist/collab/index.cjs.map +1 -1
- package/dist/collab/index.d.cts +518 -544
- package/dist/collab/index.d.ts +518 -544
- package/dist/collab/index.js +797 -1252
- package/dist/collab/index.js.map +1 -1
- package/dist/data/index.cjs +39 -132
- package/dist/data/index.d.cts +6 -468
- package/dist/data/index.d.ts +6 -468
- package/dist/data/index.js +7 -15
- package/dist/editor/index.cjs +2631 -4424
- package/dist/editor/index.cjs.map +1 -1
- package/dist/editor/index.d.cts +10 -59
- package/dist/editor/index.d.ts +10 -59
- package/dist/editor/index.js +2619 -4403
- package/dist/editor/index.js.map +1 -1
- package/dist/errors/index.cjs +11 -28
- package/dist/errors/index.d.cts +2 -125
- package/dist/errors/index.d.ts +2 -125
- package/dist/errors/index.js +1 -3
- package/dist/geo/index.cjs +68 -232
- package/dist/geo/index.d.cts +6 -821
- package/dist/geo/index.d.ts +6 -821
- package/dist/geo/index.js +11 -15
- package/dist/i18n/fr/index.cjs +329 -334
- package/dist/i18n/fr/index.cjs.map +1 -1
- package/dist/i18n/fr/index.d.cts +3 -10
- package/dist/i18n/fr/index.d.ts +3 -10
- package/dist/i18n/fr/index.js +324 -332
- package/dist/i18n/fr/index.js.map +1 -1
- package/dist/i18n/index.cjs +434 -447
- package/dist/i18n/index.cjs.map +1 -1
- package/dist/i18n/index.d.cts +152 -111
- package/dist/i18n/index.d.ts +152 -111
- package/dist/i18n/index.js +420 -420
- package/dist/i18n/index.js.map +1 -1
- package/dist/icons/index.cjs +37 -116
- package/dist/icons/index.d.cts +4 -457
- package/dist/icons/index.d.ts +4 -457
- package/dist/icons/index.js +8 -11
- package/dist/index.cjs +515 -1867
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +44 -121
- package/dist/index.d.ts +44 -121
- package/dist/index.js +52 -65
- package/dist/index.js.map +1 -1
- package/dist/layers/index.cjs +83 -318
- package/dist/layers/index.d.cts +3 -1555
- package/dist/layers/index.d.ts +3 -1555
- package/dist/layers/index.js +5 -17
- package/dist/map-client/index.cjs +5 -4
- package/dist/map-client/index.d.cts +6 -1856
- package/dist/map-client/index.d.ts +6 -1856
- package/dist/map-client/index.js +0 -3
- package/dist/maplibre-worker.mjs +4 -4
- package/dist/navigation/index.cjs +584 -671
- package/dist/navigation/index.cjs.map +1 -1
- package/dist/navigation/index.d.cts +191 -272
- package/dist/navigation/index.d.ts +191 -272
- package/dist/navigation/index.js +579 -669
- package/dist/navigation/index.js.map +1 -1
- package/dist/profile/index.cjs +177 -675
- package/dist/profile/index.d.cts +8 -2086
- package/dist/profile/index.d.ts +8 -2086
- package/dist/profile/index.js +10 -18
- package/dist/seams/index.cjs +15 -39
- package/dist/seams/index.d.cts +4 -254
- package/dist/seams/index.d.ts +4 -254
- package/dist/seams/index.js +4 -6
- package/dist/search/index.cjs +39 -147
- package/dist/search/index.d.cts +6 -888
- package/dist/search/index.d.ts +6 -888
- package/dist/search/index.js +3 -14
- package/dist/style/index.cjs +34 -116
- package/dist/style/index.d.cts +5 -538
- package/dist/style/index.d.ts +5 -538
- package/dist/style/index.js +5 -11
- package/dist/testing/index.cjs +432 -617
- package/dist/testing/index.cjs.map +1 -1
- package/dist/testing/index.d.cts +61 -109
- package/dist/testing/index.d.ts +61 -109
- package/dist/testing/index.js +427 -615
- package/dist/testing/index.js.map +1 -1
- package/dist/timezone/index.cjs +1946 -752
- package/dist/timezone/index.cjs.map +1 -1
- package/dist/timezone/index.d.cts +4 -29
- package/dist/timezone/index.d.ts +4 -29
- package/dist/timezone/index.js +1941 -750
- package/dist/timezone/index.js.map +1 -1
- package/dist/units/index.cjs +29 -99
- package/dist/units/index.d.cts +3 -75
- package/dist/units/index.d.ts +3 -75
- package/dist/units/index.js +3 -6
- package/dist/video/index.cjs +1684 -2169
- package/dist/video/index.cjs.map +1 -1
- package/dist/video/index.d.cts +386 -413
- package/dist/video/index.d.ts +386 -413
- package/dist/video/index.js +1678 -2162
- package/dist/video/index.js.map +1 -1
- package/dist/view/index.cjs +6 -42
- package/dist/view/index.d.cts +3 -836
- package/dist/view/index.d.ts +3 -836
- package/dist/view/index.js +1 -34
- package/package.json +12 -12
- package/src/auth/rules/clientHeader.ts +1 -1
- package/src/camera/rules/modes.ts +38 -42
- package/src/camera/rules/routeContent.ts +1 -0
- package/src/collab/index.ts +1 -5
- package/src/compose/engines/mountayaMap.ts +16 -42
- package/src/compose/rules/developmentWarnings.ts +4 -3
- package/src/compose/rules/fitBox.ts +67 -0
- package/src/compose/rules/maplibreWorkerVersion.gen.ts +1 -1
- package/src/compose/rules/maxBounds.ts +5 -5
- package/src/compose/rules/types.ts +4 -11
- package/src/compose/rules/workerUrl.ts +41 -6
- package/src/editing/rules/engine.ts +4 -2
- package/src/editor/engines/viewClient.ts +8 -0
- package/src/editor/rules/contract.ts +1 -6
- package/src/errors/rules/errors.ts +1 -0
- package/src/geo/index.ts +1 -6
- package/src/i18n/index.ts +1 -0
- package/src/i18n/rules/dates.ts +165 -0
- package/src/index.ts +5 -24
- package/src/map-client/rules/mapClient.ts +4 -2
- package/src/profile/rules/scale.ts +1 -5
- package/src/profile/rules/waypointCard.ts +8 -11
- package/src/search/index.ts +3 -18
- package/src/video/index.ts +1 -1
- package/src/video/profileOverlay/rules/contract.ts +1 -3
- package/src/video/rules/videoEncoder.ts +1 -1
- package/dist/accentColor-GNKBD2CW.js +0 -4
- package/dist/accentColor-GNKBD2CW.js.map +0 -1
- package/dist/accentColor-VX2JSMGE.cjs +0 -17
- package/dist/accentColor-VX2JSMGE.cjs.map +0 -1
- package/dist/chunk-23PFRRB6.js +0 -3
- package/dist/chunk-23PFRRB6.js.map +0 -1
- package/dist/chunk-2GI5SAH2.js +0 -71
- package/dist/chunk-2GI5SAH2.js.map +0 -1
- package/dist/chunk-2MQK6A74.js +0 -39
- package/dist/chunk-2MQK6A74.js.map +0 -1
- package/dist/chunk-2RE7R4LD.js +0 -73
- package/dist/chunk-2RE7R4LD.js.map +0 -1
- package/dist/chunk-3JZQKN4O.js +0 -6
- package/dist/chunk-3JZQKN4O.js.map +0 -1
- package/dist/chunk-3NDXVUUI.js +0 -50
- package/dist/chunk-3NDXVUUI.js.map +0 -1
- package/dist/chunk-3R4GFTUM.cjs +0 -59
- package/dist/chunk-3R4GFTUM.cjs.map +0 -1
- package/dist/chunk-3RVUQ6JN.cjs +0 -22
- package/dist/chunk-3RVUQ6JN.cjs.map +0 -1
- package/dist/chunk-4F6BJMJC.cjs +0 -49
- package/dist/chunk-4F6BJMJC.cjs.map +0 -1
- package/dist/chunk-4NWQD4BX.js +0 -132
- package/dist/chunk-4NWQD4BX.js.map +0 -1
- package/dist/chunk-5K2MH3R6.js +0 -10
- package/dist/chunk-5K2MH3R6.js.map +0 -1
- package/dist/chunk-6ACRNQQQ.cjs +0 -8
- package/dist/chunk-6ACRNQQQ.cjs.map +0 -1
- package/dist/chunk-6D26E3IA.js +0 -66
- package/dist/chunk-6D26E3IA.js.map +0 -1
- package/dist/chunk-6ESAW35P.cjs +0 -80
- package/dist/chunk-6ESAW35P.cjs.map +0 -1
- package/dist/chunk-6LIW2A5M.cjs +0 -1176
- package/dist/chunk-6LIW2A5M.cjs.map +0 -1
- package/dist/chunk-6OTTWVCA.js +0 -57
- package/dist/chunk-6OTTWVCA.js.map +0 -1
- package/dist/chunk-6VROJ4UG.js +0 -862
- package/dist/chunk-6VROJ4UG.js.map +0 -1
- package/dist/chunk-6Y7FTGO4.js +0 -23
- package/dist/chunk-6Y7FTGO4.js.map +0 -1
- package/dist/chunk-75I4CG64.js +0 -104
- package/dist/chunk-75I4CG64.js.map +0 -1
- package/dist/chunk-7CUBXHAH.cjs +0 -14
- package/dist/chunk-7CUBXHAH.cjs.map +0 -1
- package/dist/chunk-7GTCURVY.js +0 -52
- package/dist/chunk-7GTCURVY.js.map +0 -1
- package/dist/chunk-7IWOL6AM.cjs +0 -100
- package/dist/chunk-7IWOL6AM.cjs.map +0 -1
- package/dist/chunk-7QN7M667.cjs +0 -151
- package/dist/chunk-7QN7M667.cjs.map +0 -1
- package/dist/chunk-A6KQDKLM.cjs +0 -1197
- package/dist/chunk-A6KQDKLM.cjs.map +0 -1
- package/dist/chunk-A77EA67G.js +0 -354
- package/dist/chunk-A77EA67G.js.map +0 -1
- package/dist/chunk-AFKOABJ4.cjs +0 -7194
- package/dist/chunk-AFKOABJ4.cjs.map +0 -1
- package/dist/chunk-AG6JV5Z2.cjs +0 -183
- package/dist/chunk-AG6JV5Z2.cjs.map +0 -1
- package/dist/chunk-APBK7NMS.js +0 -30
- package/dist/chunk-APBK7NMS.js.map +0 -1
- package/dist/chunk-AWO5YA7A.cjs +0 -33
- package/dist/chunk-AWO5YA7A.cjs.map +0 -1
- package/dist/chunk-AZATU6QW.js +0 -108
- package/dist/chunk-AZATU6QW.js.map +0 -1
- package/dist/chunk-BD2U3WST.cjs +0 -623
- package/dist/chunk-BD2U3WST.cjs.map +0 -1
- package/dist/chunk-BHBEOU6L.cjs +0 -65
- package/dist/chunk-BHBEOU6L.cjs.map +0 -1
- package/dist/chunk-CNOSNYNE.js +0 -8
- package/dist/chunk-CNOSNYNE.js.map +0 -1
- package/dist/chunk-CW3EFR4O.js +0 -12
- package/dist/chunk-CW3EFR4O.js.map +0 -1
- package/dist/chunk-DASVRNBK.js +0 -7187
- package/dist/chunk-DASVRNBK.js.map +0 -1
- package/dist/chunk-DJ6LCKYP.js +0 -42
- package/dist/chunk-DJ6LCKYP.js.map +0 -1
- package/dist/chunk-E5FHQAIO.cjs +0 -45
- package/dist/chunk-E5FHQAIO.cjs.map +0 -1
- package/dist/chunk-EOML5OTY.cjs +0 -360
- package/dist/chunk-EOML5OTY.cjs.map +0 -1
- package/dist/chunk-EP5CASHL.js +0 -613
- package/dist/chunk-EP5CASHL.js.map +0 -1
- package/dist/chunk-EP5OEEVZ.cjs +0 -14
- package/dist/chunk-EP5OEEVZ.cjs.map +0 -1
- package/dist/chunk-EUXI3FGQ.js +0 -150
- package/dist/chunk-EUXI3FGQ.js.map +0 -1
- package/dist/chunk-EWFSHCOS.js +0 -40
- package/dist/chunk-EWFSHCOS.js.map +0 -1
- package/dist/chunk-EX2C5K2T.cjs +0 -25
- package/dist/chunk-EX2C5K2T.cjs.map +0 -1
- package/dist/chunk-FEXWDQIZ.cjs +0 -8
- package/dist/chunk-FEXWDQIZ.cjs.map +0 -1
- package/dist/chunk-FEYBFY7H.cjs +0 -358
- package/dist/chunk-FEYBFY7H.cjs.map +0 -1
- package/dist/chunk-FRGAV6N6.cjs +0 -34
- package/dist/chunk-FRGAV6N6.cjs.map +0 -1
- package/dist/chunk-G5DHP5VF.js +0 -6
- package/dist/chunk-G5DHP5VF.js.map +0 -1
- package/dist/chunk-G5W2UHV2.js +0 -99
- package/dist/chunk-G5W2UHV2.js.map +0 -1
- package/dist/chunk-G7OP7O2C.cjs +0 -39
- package/dist/chunk-G7OP7O2C.cjs.map +0 -1
- package/dist/chunk-GE6CFCAM.cjs +0 -25
- package/dist/chunk-GE6CFCAM.cjs.map +0 -1
- package/dist/chunk-GIFALLHI.cjs +0 -111
- package/dist/chunk-GIFALLHI.cjs.map +0 -1
- package/dist/chunk-GLFET5GM.js +0 -129
- package/dist/chunk-GLFET5GM.js.map +0 -1
- package/dist/chunk-GQ6UFPFM.js +0 -22
- package/dist/chunk-GQ6UFPFM.js.map +0 -1
- package/dist/chunk-GQJWVMXS.js +0 -129
- package/dist/chunk-GQJWVMXS.js.map +0 -1
- package/dist/chunk-GVVJPUKC.js +0 -80
- package/dist/chunk-GVVJPUKC.js.map +0 -1
- package/dist/chunk-GZ2HOCQ2.cjs +0 -134
- package/dist/chunk-GZ2HOCQ2.cjs.map +0 -1
- package/dist/chunk-HCBOHXWP.js +0 -37
- package/dist/chunk-HCBOHXWP.js.map +0 -1
- package/dist/chunk-IBQJDVHF.cjs +0 -281
- package/dist/chunk-IBQJDVHF.cjs.map +0 -1
- package/dist/chunk-ISLB6Y5Q.cjs +0 -106
- package/dist/chunk-ISLB6Y5Q.cjs.map +0 -1
- package/dist/chunk-J55CRR4F.js +0 -105
- package/dist/chunk-J55CRR4F.js.map +0 -1
- package/dist/chunk-JBG6Z6MQ.cjs +0 -28
- package/dist/chunk-JBG6Z6MQ.cjs.map +0 -1
- package/dist/chunk-K3RQOZRU.js +0 -61
- package/dist/chunk-K3RQOZRU.js.map +0 -1
- package/dist/chunk-KDJYS4GB.cjs +0 -703
- package/dist/chunk-KDJYS4GB.cjs.map +0 -1
- package/dist/chunk-KMCAHUZM.cjs +0 -4
- package/dist/chunk-KMCAHUZM.cjs.map +0 -1
- package/dist/chunk-KUCBNPC6.js +0 -87
- package/dist/chunk-KUCBNPC6.js.map +0 -1
- package/dist/chunk-KV6UE5A4.js +0 -50
- package/dist/chunk-KV6UE5A4.js.map +0 -1
- package/dist/chunk-L6TZ2HQR.cjs +0 -18
- package/dist/chunk-L6TZ2HQR.cjs.map +0 -1
- package/dist/chunk-L7QHHGG2.cjs +0 -141
- package/dist/chunk-L7QHHGG2.cjs.map +0 -1
- package/dist/chunk-LHK3Y2AL.js +0 -271
- package/dist/chunk-LHK3Y2AL.js.map +0 -1
- package/dist/chunk-LO5RYRBH.cjs +0 -6317
- package/dist/chunk-LO5RYRBH.cjs.map +0 -1
- package/dist/chunk-LS5SJMUO.cjs +0 -194
- package/dist/chunk-LS5SJMUO.cjs.map +0 -1
- package/dist/chunk-LUGTMZFN.cjs +0 -42
- package/dist/chunk-LUGTMZFN.cjs.map +0 -1
- package/dist/chunk-LVUQU6D5.js +0 -32
- package/dist/chunk-LVUQU6D5.js.map +0 -1
- package/dist/chunk-M2QRC2GZ.js +0 -166
- package/dist/chunk-M2QRC2GZ.js.map +0 -1
- package/dist/chunk-M6QJYQIM.cjs +0 -53
- package/dist/chunk-M6QJYQIM.cjs.map +0 -1
- package/dist/chunk-MGCPH5EO.js +0 -12
- package/dist/chunk-MGCPH5EO.js.map +0 -1
- package/dist/chunk-MLVUWEZR.cjs +0 -474
- package/dist/chunk-MLVUWEZR.cjs.map +0 -1
- package/dist/chunk-MTAMJMZL.cjs +0 -707
- package/dist/chunk-MTAMJMZL.cjs.map +0 -1
- package/dist/chunk-MXL5AT3N.js +0 -48
- package/dist/chunk-MXL5AT3N.js.map +0 -1
- package/dist/chunk-MYEQSESM.cjs +0 -75
- package/dist/chunk-MYEQSESM.cjs.map +0 -1
- package/dist/chunk-N3VPF6ZD.js +0 -427
- package/dist/chunk-N3VPF6ZD.js.map +0 -1
- package/dist/chunk-N6VUAIGI.js +0 -7
- package/dist/chunk-N6VUAIGI.js.map +0 -1
- package/dist/chunk-N6XRLUN6.js +0 -6286
- package/dist/chunk-N6XRLUN6.js.map +0 -1
- package/dist/chunk-NOGDOZIT.cjs +0 -114
- package/dist/chunk-NOGDOZIT.cjs.map +0 -1
- package/dist/chunk-NUWXEISH.cjs +0 -10
- package/dist/chunk-NUWXEISH.cjs.map +0 -1
- package/dist/chunk-NZCZHXYN.cjs +0 -161
- package/dist/chunk-NZCZHXYN.cjs.map +0 -1
- package/dist/chunk-ODROSWQX.cjs +0 -53
- package/dist/chunk-ODROSWQX.cjs.map +0 -1
- package/dist/chunk-OE36AYKG.cjs +0 -82
- package/dist/chunk-OE36AYKG.cjs.map +0 -1
- package/dist/chunk-OLON7MO6.cjs +0 -437
- package/dist/chunk-OLON7MO6.cjs.map +0 -1
- package/dist/chunk-PBUOR2IT.js +0 -277
- package/dist/chunk-PBUOR2IT.js.map +0 -1
- package/dist/chunk-PC2ELXFF.cjs +0 -225
- package/dist/chunk-PC2ELXFF.cjs.map +0 -1
- package/dist/chunk-PCSGXLOC.js +0 -71
- package/dist/chunk-PCSGXLOC.js.map +0 -1
- package/dist/chunk-PFNMP6FQ.js +0 -56
- package/dist/chunk-PFNMP6FQ.js.map +0 -1
- package/dist/chunk-PIWSZTIP.js +0 -690
- package/dist/chunk-PIWSZTIP.js.map +0 -1
- package/dist/chunk-PKWHJ2GI.js +0 -136
- package/dist/chunk-PKWHJ2GI.js.map +0 -1
- package/dist/chunk-PLMVBX2A.cjs +0 -76
- package/dist/chunk-PLMVBX2A.cjs.map +0 -1
- package/dist/chunk-PM3XCD2G.cjs +0 -113
- package/dist/chunk-PM3XCD2G.cjs.map +0 -1
- package/dist/chunk-QAL4GZO7.cjs +0 -143
- package/dist/chunk-QAL4GZO7.cjs.map +0 -1
- package/dist/chunk-QDB2SEA2.js +0 -74
- package/dist/chunk-QDB2SEA2.js.map +0 -1
- package/dist/chunk-QOV7UNUN.js +0 -25
- package/dist/chunk-QOV7UNUN.js.map +0 -1
- package/dist/chunk-QQUWYLSF.cjs +0 -50
- package/dist/chunk-QQUWYLSF.cjs.map +0 -1
- package/dist/chunk-QUMBH3U4.cjs +0 -9
- package/dist/chunk-QUMBH3U4.cjs.map +0 -1
- package/dist/chunk-R4KA7OFQ.js +0 -12
- package/dist/chunk-R4KA7OFQ.js.map +0 -1
- package/dist/chunk-RBSGAZQQ.js +0 -17
- package/dist/chunk-RBSGAZQQ.js.map +0 -1
- package/dist/chunk-RM5YJWZI.js +0 -46
- package/dist/chunk-RM5YJWZI.js.map +0 -1
- package/dist/chunk-ROKNKXA4.cjs +0 -8
- package/dist/chunk-ROKNKXA4.cjs.map +0 -1
- package/dist/chunk-RQG6D546.cjs +0 -75
- package/dist/chunk-RQG6D546.cjs.map +0 -1
- package/dist/chunk-SG4YDD5L.cjs +0 -74
- package/dist/chunk-SG4YDD5L.cjs.map +0 -1
- package/dist/chunk-SNRCA7EO.js +0 -56
- package/dist/chunk-SNRCA7EO.js.map +0 -1
- package/dist/chunk-SO75R4WW.cjs +0 -22
- package/dist/chunk-SO75R4WW.cjs.map +0 -1
- package/dist/chunk-SP34NHFI.js +0 -45
- package/dist/chunk-SP34NHFI.js.map +0 -1
- package/dist/chunk-SSKSSBWJ.cjs +0 -179
- package/dist/chunk-SSKSSBWJ.cjs.map +0 -1
- package/dist/chunk-TB5663C2.js +0 -1108
- package/dist/chunk-TB5663C2.js.map +0 -1
- package/dist/chunk-TGH4NRES.js +0 -220
- package/dist/chunk-TGH4NRES.js.map +0 -1
- package/dist/chunk-TJ6ZPNID.js +0 -189
- package/dist/chunk-TJ6ZPNID.js.map +0 -1
- package/dist/chunk-U45T35N2.cjs +0 -90
- package/dist/chunk-U45T35N2.cjs.map +0 -1
- package/dist/chunk-UKVOPEZ2.js +0 -442
- package/dist/chunk-UKVOPEZ2.js.map +0 -1
- package/dist/chunk-UTB4NROA.cjs +0 -887
- package/dist/chunk-UTB4NROA.cjs.map +0 -1
- package/dist/chunk-UTW33B5V.js +0 -6
- package/dist/chunk-UTW33B5V.js.map +0 -1
- package/dist/chunk-UYUBSD2V.cjs +0 -33
- package/dist/chunk-UYUBSD2V.cjs.map +0 -1
- package/dist/chunk-V3JEP5AG.cjs +0 -59
- package/dist/chunk-V3JEP5AG.cjs.map +0 -1
- package/dist/chunk-VFAGJXHR.js +0 -18
- package/dist/chunk-VFAGJXHR.js.map +0 -1
- package/dist/chunk-VMEE57E5.cjs +0 -58
- package/dist/chunk-VMEE57E5.cjs.map +0 -1
- package/dist/chunk-VQVBEX3Y.cjs +0 -113
- package/dist/chunk-VQVBEX3Y.cjs.map +0 -1
- package/dist/chunk-VZDXX7TT.cjs +0 -64
- package/dist/chunk-VZDXX7TT.cjs.map +0 -1
- package/dist/chunk-WE5ZTI4D.js +0 -346
- package/dist/chunk-WE5ZTI4D.js.map +0 -1
- package/dist/chunk-WEFUVABP.js +0 -19
- package/dist/chunk-WEFUVABP.js.map +0 -1
- package/dist/chunk-WMU4LRKC.js +0 -28
- package/dist/chunk-WMU4LRKC.js.map +0 -1
- package/dist/chunk-WQ24RRHL.cjs +0 -354
- package/dist/chunk-WQ24RRHL.cjs.map +0 -1
- package/dist/chunk-WW4CGS7G.cjs +0 -26
- package/dist/chunk-WW4CGS7G.cjs.map +0 -1
- package/dist/chunk-WXE5WCTM.js +0 -1144
- package/dist/chunk-WXE5WCTM.js.map +0 -1
- package/dist/chunk-X23BGIYA.cjs +0 -37
- package/dist/chunk-X23BGIYA.cjs.map +0 -1
- package/dist/chunk-XEW4FTR2.js +0 -98
- package/dist/chunk-XEW4FTR2.js.map +0 -1
- package/dist/chunk-XIOI4IYW.js +0 -167
- package/dist/chunk-XIOI4IYW.js.map +0 -1
- package/dist/chunk-XLVPJ37V.cjs +0 -44
- package/dist/chunk-XLVPJ37V.cjs.map +0 -1
- package/dist/chunk-XOHAXXZA.cjs +0 -51
- package/dist/chunk-XOHAXXZA.cjs.map +0 -1
- package/dist/chunk-Y4NRIHK6.cjs +0 -313
- package/dist/chunk-Y4NRIHK6.cjs.map +0 -1
- package/dist/chunk-Y4YMMKL3.js +0 -23
- package/dist/chunk-Y4YMMKL3.js.map +0 -1
- package/dist/chunk-YJNYBVE3.cjs +0 -14
- package/dist/chunk-YJNYBVE3.cjs.map +0 -1
- package/dist/chunk-Z762QNQP.cjs +0 -60
- package/dist/chunk-Z762QNQP.cjs.map +0 -1
- package/dist/chunk-ZG5KMBOF.js +0 -669
- package/dist/chunk-ZG5KMBOF.js.map +0 -1
- package/dist/chunk-ZKONQEFA.js +0 -344
- package/dist/chunk-ZKONQEFA.js.map +0 -1
- package/dist/chunk-ZR5X7QMH.js +0 -39
- package/dist/chunk-ZR5X7QMH.js.map +0 -1
- package/dist/chunk-ZW4BJQ26.js +0 -84
- package/dist/chunk-ZW4BJQ26.js.map +0 -1
- package/dist/climbs-BhlWuu0x.d.ts +0 -70
- package/dist/climbs-DgBFwySV.d.cts +0 -70
- package/dist/data/index.cjs.map +0 -1
- package/dist/data/index.js.map +0 -1
- package/dist/errors/index.cjs.map +0 -1
- package/dist/errors/index.js.map +0 -1
- package/dist/geo/index.cjs.map +0 -1
- package/dist/geo/index.js.map +0 -1
- package/dist/icons/index.cjs.map +0 -1
- package/dist/icons/index.js.map +0 -1
- package/dist/itinerary-Dp2ZnqgD.d.cts +0 -178
- package/dist/itinerary-Dp2ZnqgD.d.ts +0 -178
- package/dist/layers/index.cjs.map +0 -1
- package/dist/layers/index.js.map +0 -1
- package/dist/map-client/index.cjs.map +0 -1
- package/dist/map-client/index.js.map +0 -1
- package/dist/markerSprite-DGBQF6PO.cjs +0 -49
- package/dist/markerSprite-DGBQF6PO.cjs.map +0 -1
- package/dist/markerSprite-DZLTR6F6.js +0 -8
- package/dist/markerSprite-DZLTR6F6.js.map +0 -1
- package/dist/mountayaMap-C9mxRFib.d.cts +0 -3277
- package/dist/mountayaMap-DgnlQ2fE.d.ts +0 -3277
- package/dist/paint-BgUcj8l7.d.cts +0 -118
- package/dist/paint-Dx_qGNE_.d.ts +0 -118
- package/dist/profile/index.cjs.map +0 -1
- package/dist/profile/index.js.map +0 -1
- package/dist/seams/index.cjs.map +0 -1
- package/dist/seams/index.js.map +0 -1
- package/dist/search/index.cjs.map +0 -1
- package/dist/search/index.js.map +0 -1
- package/dist/searchHighlight-DFE7LVIL.cjs +0 -33
- package/dist/searchHighlight-DFE7LVIL.cjs.map +0 -1
- package/dist/searchHighlight-MHAQZVWG.js +0 -12
- package/dist/searchHighlight-MHAQZVWG.js.map +0 -1
- package/dist/strings-30RSdIat.d.cts +0 -552
- package/dist/strings-DPTIbzT5.d.ts +0 -552
- package/dist/stripeImage-CQUXM2YI.js +0 -14
- package/dist/stripeImage-CQUXM2YI.js.map +0 -1
- package/dist/stripeImage-R43OPA6U.cjs +0 -39
- package/dist/stripeImage-R43OPA6U.cjs.map +0 -1
- package/dist/style/index.cjs.map +0 -1
- package/dist/style/index.js.map +0 -1
- package/dist/types-B034JMjl.d.ts +0 -973
- package/dist/types-B2NDLxQA.d.cts +0 -21
- package/dist/types-B2NDLxQA.d.ts +0 -21
- package/dist/types-C8aX5KMU.d.cts +0 -973
- package/dist/units/index.cjs.map +0 -1
- package/dist/units/index.js.map +0 -1
- package/dist/view/index.cjs.map +0 -1
- package/dist/view/index.js.map +0 -1
|
@@ -0,0 +1,1475 @@
|
|
|
1
|
+
import { i as TerrainReading, n as ElevationSource, r as ElevationTile } from "./chunk-BxDQZDXR.cjs";
|
|
2
|
+
import { DataSchema, DirectionsResult, GeocodeResult, IsochronesResult, MatrixResult, PoisResult, RestSchema, SuggestionsResult } from "@mountaya/client";
|
|
3
|
+
import { FeatureCollection, LineString, Point } from "geojson";
|
|
4
|
+
/**
|
|
5
|
+
* LayersSelectionTarget is the map a {@link LayersSelectionEngine} drives: the layers manifest,
|
|
6
|
+
* the terrain, overlay and enrichment slots a selection draws into, and the instant it draws the
|
|
7
|
+
* time-aware overlays for.
|
|
8
|
+
*
|
|
9
|
+
* Structural, so `MountayaMap` satisfies it without being named and a double satisfies it with no
|
|
10
|
+
* renderer behind it. That is also what keeps `@mountaya/elements/layers` free of `maplibre-gl`:
|
|
11
|
+
* the entry names the members a selection calls, never the map class. The test beside this
|
|
12
|
+
* module asserts that the map satisfies it, so a slot signature that drifts fails there.
|
|
13
|
+
*/
|
|
14
|
+
interface LayersSelectionTarget {
|
|
15
|
+
/** Reads the layers manifest: every terrain and overlay the credential may draw. */
|
|
16
|
+
readonly loadLayers: () => Promise<RestSchema.Layers>;
|
|
17
|
+
/** Switches the base map to the terrain with this slug. */
|
|
18
|
+
readonly setTerrain: (slug: string) => Promise<void>;
|
|
19
|
+
/** Draws the classic overlay with this slug in place of the one drawn before; null clears it. */
|
|
20
|
+
readonly setOverlay: (slug: string | null) => Promise<void>;
|
|
21
|
+
/** Draws the enrichment overlay with this slug on top of whatever is drawn. */
|
|
22
|
+
readonly addEnrichment: (slug: string) => Promise<void>;
|
|
23
|
+
/** Removes the enrichment overlay with this slug. */
|
|
24
|
+
readonly removeEnrichment: (slug: string) => void;
|
|
25
|
+
/**
|
|
26
|
+
* Pins the instant the map draws the classic overlay the server stamps for, or none with null,
|
|
27
|
+
* which draws the catalogue's own addresses, the server's present.
|
|
28
|
+
*/
|
|
29
|
+
readonly setInstant: (instant: Date | null) => Promise<void>;
|
|
30
|
+
/**
|
|
31
|
+
* Reports the slug of the catalogue terrain the map shows, or null when it shows none: before
|
|
32
|
+
* one is up, or under a style of the host's own. Read once per manifest, as it lands, and
|
|
33
|
+
* never to drive the map.
|
|
34
|
+
*
|
|
35
|
+
* Optional, because a target with no way to report a terrain is a target that reports none:
|
|
36
|
+
* the selection then states no terrain until one is selected.
|
|
37
|
+
*/
|
|
38
|
+
readonly getTerrain?: (() => string | null) | undefined;
|
|
39
|
+
}
|
|
40
|
+
/** LayersSelectionEngineOptions names the map a {@link LayersSelectionEngine} drives. */
|
|
41
|
+
interface LayersSelectionEngineOptions {
|
|
42
|
+
/**
|
|
43
|
+
* The map the selection draws into, or null while there is none. Without a map the commands
|
|
44
|
+
* still record what was asked for and drive nothing, and no manifest is read.
|
|
45
|
+
*/
|
|
46
|
+
readonly map: LayersSelectionTarget | null;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* LayersSelectionSnapshot is what a {@link LayersSelectionEngine} holds: the manifest, the
|
|
50
|
+
* catalogue split into the categories that replace and the ones that stack, the current
|
|
51
|
+
* selection, and the instant pinned.
|
|
52
|
+
*/
|
|
53
|
+
interface LayersSelectionSnapshot {
|
|
54
|
+
/** The manifest, or null until it has been read from the current map. */
|
|
55
|
+
readonly manifest: RestSchema.Layers | null;
|
|
56
|
+
/** The manifest's terrains, in its order; empty until it has been read. */
|
|
57
|
+
readonly terrains: readonly RestSchema.Terrain[];
|
|
58
|
+
/** The categories whose overlays replace one another, in the manifest's order. */
|
|
59
|
+
readonly classicCategories: readonly RestSchema.CategoryOverlays[];
|
|
60
|
+
/** The categories whose overlays stack, in the manifest's order. */
|
|
61
|
+
readonly enrichmentCategories: readonly RestSchema.CategoryOverlays[];
|
|
62
|
+
/**
|
|
63
|
+
* The selected terrain's slug, or null while none is selected. When the manifest is read and
|
|
64
|
+
* nothing is selected yet, it states the terrain the map reports it shows
|
|
65
|
+
* ({@link LayersSelectionTarget.getTerrain}), and stays null for a map that reports none, so a
|
|
66
|
+
* picker marks what the map draws and never a guess; a terrain selected earlier is kept.
|
|
67
|
+
*/
|
|
68
|
+
readonly terrain: string | null;
|
|
69
|
+
/** The selected classic overlay's slug, or null while none is selected. */
|
|
70
|
+
readonly overlay: string | null;
|
|
71
|
+
/** The selected enrichments' slugs, in the order they were turned on. */
|
|
72
|
+
readonly enrichments: readonly string[];
|
|
73
|
+
/**
|
|
74
|
+
* The instant pinned for the time-aware overlays, or null with none pinned, which is the clock's
|
|
75
|
+
* reading. A replaced map starts with none.
|
|
76
|
+
*/
|
|
77
|
+
readonly instant: Date | null;
|
|
78
|
+
/**
|
|
79
|
+
* The outcome of the latest manifest read or command to settle: the failure it met, or null
|
|
80
|
+
* once one succeeds, and null while none has settled since the current map was configured. A
|
|
81
|
+
* failure is the `Error` the map rejected or threw with, or, for a failure that is no `Error`,
|
|
82
|
+
* a `MountayaElementsRejectionError` that names what failed and holds the value as its `cause`.
|
|
83
|
+
*/
|
|
84
|
+
readonly error: Error | null;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* LayersSelectionEngine is the terrain, overlay and enrichment selection behind a layers picker:
|
|
88
|
+
* it reads the manifest, holds what the user asked for, and drives the map's slots by the
|
|
89
|
+
* catalogue's composition rules.
|
|
90
|
+
*
|
|
91
|
+
* - **Classic overlays are exclusive.** Slope, snow depth and avalanche risk each repaint the same
|
|
92
|
+
* ground, so selecting one replaces the last, and a second press on the selected one clears it.
|
|
93
|
+
* - **Enrichment overlays stack.** Hillshade under a slope overlay under an itinerary is a
|
|
94
|
+
* legitimate composition, so each toggles on its own.
|
|
95
|
+
* - **One instant is pinned, or none.** The map draws the classic overlay the server stamps for
|
|
96
|
+
* the instant pinned last, and the pin stands through every other command.
|
|
97
|
+
*
|
|
98
|
+
* Which category is which is {@link isEnrichmentCategory}'s answer, read once per manifest.
|
|
99
|
+
*
|
|
100
|
+
* The selection is never mirrored into the map or back. The map is the source of truth for what
|
|
101
|
+
* is drawn and this engine for what was asked for, so a command the map refuses keeps its
|
|
102
|
+
* selection and reports the refusal as the snapshot's `error`: the two disagree honestly rather
|
|
103
|
+
* than a picker snapping back with no explanation. A command drives the map at once whether or
|
|
104
|
+
* not anything subscribes. Nothing here throws: a map that throws rather than rejects, on a
|
|
105
|
+
* command or on the manifest read, is reported through `error` the same way.
|
|
106
|
+
*
|
|
107
|
+
* Every listener is told of every change. One that throws stops neither the engine nor the
|
|
108
|
+
* listeners after it, and its error is no outcome of a command: it is thrown again on a
|
|
109
|
+
* microtask, as the program's own uncaught error, and never reaches `error`.
|
|
110
|
+
*
|
|
111
|
+
* The lifecycle is the listeners, as for every engine here. Constructing one reads nothing; the
|
|
112
|
+
* first subscriber reads the manifest and states the terrain the map reports it shows, without
|
|
113
|
+
* asking the map to switch to it; the last unsubscribe parks, and an answer landing while parked
|
|
114
|
+
* reaches no snapshot. A resume joins the read already made, so React's StrictMode, which
|
|
115
|
+
* subscribes, unsubscribes and subscribes again, costs one read. A failed read is not kept: the
|
|
116
|
+
* next resume asks again, and so does the same map handed to
|
|
117
|
+
* {@link LayersSelectionEngine.configure} again.
|
|
118
|
+
* {@link LayersSelectionEngine.dispose} is the latch, for an owner that is not a component.
|
|
119
|
+
*
|
|
120
|
+
* A replaced map starts a fresh selection: it draws nothing the previous one did, so an overlay
|
|
121
|
+
* still marked selected would read as drawn, and the next press on it would clear rather than
|
|
122
|
+
* draw. A manifest or a refusal owed to an earlier selection never lands, even when a later
|
|
123
|
+
* replacement brings the same map back.
|
|
124
|
+
*
|
|
125
|
+
* Nothing here keeps time, so the engine takes no clock and no debounce.
|
|
126
|
+
*
|
|
127
|
+
* @example
|
|
128
|
+
* ```ts
|
|
129
|
+
* import {
|
|
130
|
+
* LayersSelectionEngine,
|
|
131
|
+
* type LayersSelectionSnapshot,
|
|
132
|
+
* type LayersSelectionTarget,
|
|
133
|
+
* } from "@mountaya/elements/layers";
|
|
134
|
+
*
|
|
135
|
+
* declare const map: LayersSelectionTarget;
|
|
136
|
+
* declare const render: (snapshot: LayersSelectionSnapshot) => void;
|
|
137
|
+
*
|
|
138
|
+
* const layers = new LayersSelectionEngine({ map });
|
|
139
|
+
* const release = layers.subscribe(() => render(layers.getSnapshot()));
|
|
140
|
+
*
|
|
141
|
+
* layers.setOverlay("slopes");
|
|
142
|
+
* layers.toggleEnrichment("hillshade");
|
|
143
|
+
* release();
|
|
144
|
+
* ```
|
|
145
|
+
*/
|
|
146
|
+
declare class LayersSelectionEngine {
|
|
147
|
+
private map;
|
|
148
|
+
private snapshot;
|
|
149
|
+
private readonly listeners;
|
|
150
|
+
/**
|
|
151
|
+
* The manifest read made for the current map, kept so a resume joins it rather than reading
|
|
152
|
+
* twice. Cleared when it fails and when the map is replaced.
|
|
153
|
+
*/
|
|
154
|
+
private manifestRead;
|
|
155
|
+
/**
|
|
156
|
+
* The token of the resume whose read may still land. A park or a replaced map clears it, which
|
|
157
|
+
* is what keeps an answer nobody is waiting for out of the snapshot.
|
|
158
|
+
*/
|
|
159
|
+
private watching;
|
|
160
|
+
/**
|
|
161
|
+
* The token of the selection a command is issued under. Every fresh selection replaces it, so a
|
|
162
|
+
* refusal owed to an earlier one is told apart even when the same map comes back.
|
|
163
|
+
*/
|
|
164
|
+
private selection;
|
|
165
|
+
/** Whether nobody is watching. A parked engine reads nothing. */
|
|
166
|
+
private parked;
|
|
167
|
+
private disposed;
|
|
168
|
+
/**
|
|
169
|
+
* Constructing one holds the map and does nothing else. A binding constructs during a render
|
|
170
|
+
* its framework is free to throw away, and a constructor that read the manifest would leave the
|
|
171
|
+
* discarded copy reading. Omitted options mean no map.
|
|
172
|
+
*/
|
|
173
|
+
constructor(options?: LayersSelectionEngineOptions);
|
|
174
|
+
/** getSnapshot returns the current selection, by reference and stable between changes. */
|
|
175
|
+
getSnapshot(): LayersSelectionSnapshot;
|
|
176
|
+
/**
|
|
177
|
+
* subscribe registers a listener for every change of the snapshot, and returns its own
|
|
178
|
+
* unsubscribe.
|
|
179
|
+
*
|
|
180
|
+
* The first listener resumes the engine and the last one leaving parks it, the one lifecycle a
|
|
181
|
+
* component can express correctly: React tears an effect down and sets it up again with the same
|
|
182
|
+
* object under StrictMode, so a latch here would leave a live picker bound to a dead engine. A
|
|
183
|
+
* binding hands its framework a STABLE `subscribe`; a fresh closure per render parks and resumes
|
|
184
|
+
* on every render.
|
|
185
|
+
*/
|
|
186
|
+
subscribe(listener: () => void): () => void;
|
|
187
|
+
/**
|
|
188
|
+
* configure replaces the map the selection drives.
|
|
189
|
+
*
|
|
190
|
+
* The map it drives already changes nothing, except that, while anything subscribes, it is asked
|
|
191
|
+
* for its manifest again where its read failed: handing the map again is how a failed read is
|
|
192
|
+
* retried, and the failure stays the snapshot's `error` until the new read settles. A binding
|
|
193
|
+
* that hands the map on every render retries a failed read on each one. A different map, null
|
|
194
|
+
* included, starts a fresh selection and, while anything subscribes, reads its manifest.
|
|
195
|
+
*/
|
|
196
|
+
configure(options: LayersSelectionEngineOptions): void;
|
|
197
|
+
/**
|
|
198
|
+
* setTerrain selects the terrain with this slug and switches the map's base to it. The map is
|
|
199
|
+
* asked even for the terrain already selected, which is how a switch it refused is retried.
|
|
200
|
+
*/
|
|
201
|
+
setTerrain(slug: string): void;
|
|
202
|
+
/**
|
|
203
|
+
* setOverlay selects the classic overlay with this slug, replacing the one selected before, and
|
|
204
|
+
* draws it. Passing the slug already selected clears it, which is what a second press means;
|
|
205
|
+
* null clears whatever is selected.
|
|
206
|
+
*/
|
|
207
|
+
setOverlay(slug: string | null): void;
|
|
208
|
+
/**
|
|
209
|
+
* toggleEnrichment turns the enrichment overlay with this slug on when it is off and off when it
|
|
210
|
+
* is on, leaving every other overlay as it is.
|
|
211
|
+
*/
|
|
212
|
+
toggleEnrichment(slug: string): void;
|
|
213
|
+
/**
|
|
214
|
+
* setInstant pins the instant the map draws the time-aware overlays for, and asks the map for it
|
|
215
|
+
* at once; null pins none, which is the clock's reading. An Invalid Date names no instant and
|
|
216
|
+
* pins none.
|
|
217
|
+
*
|
|
218
|
+
* The map is asked even for the instant already pinned, which is how a pin it refused is
|
|
219
|
+
* retried, and the pin stands through every other command until the map is replaced. Without a
|
|
220
|
+
* map the pin is held and drives nothing, so a selection with no map is a store of the time a
|
|
221
|
+
* host drives its own map from.
|
|
222
|
+
*/
|
|
223
|
+
setInstant(instant: Date | null): void;
|
|
224
|
+
/**
|
|
225
|
+
* dispose drops every listener and every answer still to land, for good.
|
|
226
|
+
*
|
|
227
|
+
* Idempotent, and every call after it is a no-op rather than an error: an owner torn down
|
|
228
|
+
* mid-press should not have to guard the calls it already queued.
|
|
229
|
+
*/
|
|
230
|
+
dispose(): void;
|
|
231
|
+
/**
|
|
232
|
+
* resume reads the current map's manifest when the snapshot does not hold it yet, joining the
|
|
233
|
+
* read already made for this map when there is one.
|
|
234
|
+
*/
|
|
235
|
+
private resume;
|
|
236
|
+
/**
|
|
237
|
+
* drive runs one command against the current map and reports its outcome: its failure, whether
|
|
238
|
+
* the map rejects or throws, and its success by clearing the failure an earlier command
|
|
239
|
+
* reported. An outcome owed to an earlier selection describes a drawing the current one never
|
|
240
|
+
* asked for, so it is dropped, the same map brought back included.
|
|
241
|
+
*/
|
|
242
|
+
private drive;
|
|
243
|
+
/**
|
|
244
|
+
* commit publishes a snapshot and tells every listener, whatever one of them does: the first
|
|
245
|
+
* fault a listener throws is surfaced once they have all been told ({@link notifyListeners}),
|
|
246
|
+
* so no caller here has to decide what a listener's exception does to a command or to a read.
|
|
247
|
+
*/
|
|
248
|
+
private commit;
|
|
249
|
+
}
|
|
250
|
+
/** The readout a map holds open: the point it was pressed at, and the terrain read there. */
|
|
251
|
+
interface ReadoutOpen {
|
|
252
|
+
/** The point, `[longitude, latitude]`. */
|
|
253
|
+
readonly position: readonly [number, number];
|
|
254
|
+
/** The camera's zoom when it opened, which decides the rows it states. */
|
|
255
|
+
readonly zoom: number;
|
|
256
|
+
/** The terrain read off the elevation tiles, or `null` until every tile it needs answered. */
|
|
257
|
+
readonly terrain: TerrainReading | null;
|
|
258
|
+
}
|
|
259
|
+
/** What the engine reads the terrain through: the map's elevation source and its tiles. */
|
|
260
|
+
interface ReadoutEngineOptions {
|
|
261
|
+
/**
|
|
262
|
+
* The elevation source the terrain is read off, as the map read it, or `null` where the map
|
|
263
|
+
* reads none. Asked once a readout opens at the detail zoom.
|
|
264
|
+
*/
|
|
265
|
+
readonly source: () => Promise<ElevationSource | null>;
|
|
266
|
+
/**
|
|
267
|
+
* Reads one elevation tile, decoded into its pixels, through the client's tile transport and
|
|
268
|
+
* under the credential the map draws its base map with. The signal aborts once the readout it
|
|
269
|
+
* was asked for closes or moves.
|
|
270
|
+
*/
|
|
271
|
+
readonly readTile: (tile: Pick<ElevationTile, "x" | "y" | "z">, signal: AbortSignal) => Promise<ElevationTile>;
|
|
272
|
+
}
|
|
273
|
+
/**
|
|
274
|
+
* ReadoutEngine holds the readout a right-click or a long press opens on a map, and reads the
|
|
275
|
+
* terrain it states.
|
|
276
|
+
*
|
|
277
|
+
* {@link ReadoutEngine.open} opens it at a point, in place of one already open: at once, with no
|
|
278
|
+
* terrain, and at the detail zoom, 13 and above, it reads the elevation tiles the terrain at the
|
|
279
|
+
* point needs, at the source's deepest zoom. The terrain joins it once every tile has answered; a
|
|
280
|
+
* tile that fails leaves it without terrain, and an answer to a readout since closed or replaced
|
|
281
|
+
* lands nowhere. Below the detail zoom nothing is read. A camera move or a tap closes it, which the
|
|
282
|
+
* binding tells {@link ReadoutEngine.close}; a host that turned the readout off opens none.
|
|
283
|
+
*/
|
|
284
|
+
declare class ReadoutEngine {
|
|
285
|
+
private readonly options;
|
|
286
|
+
private readonly listeners;
|
|
287
|
+
private snapshot;
|
|
288
|
+
/** The reads of the readout open, aborted once it closes or moves. */
|
|
289
|
+
private reads;
|
|
290
|
+
constructor(options: ReadoutEngineOptions);
|
|
291
|
+
/** getSnapshot answers the readout open, by reference and stable between changes, or `null`. */
|
|
292
|
+
getSnapshot(): ReadoutOpen | null;
|
|
293
|
+
/** subscribe registers a listener for every change, and returns its own unsubscribe. */
|
|
294
|
+
subscribe(listener: () => void): () => void;
|
|
295
|
+
/**
|
|
296
|
+
* open opens the readout at a point, in place of one already open, and at the detail zoom reads
|
|
297
|
+
* the terrain there.
|
|
298
|
+
*
|
|
299
|
+
* @param position The point pressed, `[longitude, latitude]`.
|
|
300
|
+
* @param zoom The camera's zoom.
|
|
301
|
+
*/
|
|
302
|
+
open(position: readonly [number, number], zoom: number): void;
|
|
303
|
+
/** close closes the readout, on a camera move or a tap. An answer still on its way lands nowhere. */
|
|
304
|
+
close(): void;
|
|
305
|
+
/** destroy closes the readout and lets go of every listener. */
|
|
306
|
+
destroy(): void;
|
|
307
|
+
private readTerrain;
|
|
308
|
+
private set;
|
|
309
|
+
}
|
|
310
|
+
/**
|
|
311
|
+
* How Data API results are painted.
|
|
312
|
+
*
|
|
313
|
+
* Paint constants only (no MapLibre types), so this sits beside `zones.ts` and `pois.ts`
|
|
314
|
+
* and stays usable from a worker or a server render. The expressions that consume these
|
|
315
|
+
* live at the renderer boundary, in `compose/`.
|
|
316
|
+
*
|
|
317
|
+
* The three treatments here each encode a rule an integrator would otherwise guess at:
|
|
318
|
+
* isochrone bands are a *sequence* and must read as one; a suggestion set has one chosen
|
|
319
|
+
* itinerary and several alternatives that must not compete with it; and a matrix connector's
|
|
320
|
+
* whole job is to show relative cost.
|
|
321
|
+
*/
|
|
322
|
+
/**
|
|
323
|
+
* ISOCHRONE_RAMP is the sequential scale isochrone bands are filled from, nearest first.
|
|
324
|
+
*
|
|
325
|
+
* **Not `zoneLevelColors`**, even though isochrones band at the ZONE rank. Those colours are
|
|
326
|
+
* *semantic* (danger, info, resolved, warning), and reusing them would paint a 15-minute
|
|
327
|
+
* reachability band "danger red" for no reason, which reads as an alert rather than a
|
|
328
|
+
* measurement.
|
|
329
|
+
*
|
|
330
|
+
* Ordered light-to-dark so the nearest band is the palest: a reader's eye goes to the dark
|
|
331
|
+
* edge, which is the limit of reach and the thing actually being asked about. A handful of
|
|
332
|
+
* stops, because a request for more bands than that produces contours no one can tell apart:
|
|
333
|
+
* past the last stop the ramp cycles rather than inventing colours, which is visibly wrong at
|
|
334
|
+
* a glance instead of subtly wrong.
|
|
335
|
+
*/
|
|
336
|
+
declare const ISOCHRONE_RAMP: readonly ["#c5f6fa", "#99e9f2", "#66d9e8", "#3bc9db", "#22b8cf", "#15aabf"];
|
|
337
|
+
/** The fill opacity of an isochrone band. Low, because bands overlap by construction. */
|
|
338
|
+
declare const ISOCHRONE_FILL_OPACITY = 0.35;
|
|
339
|
+
/** The outline of an isochrone band, so adjacent bands stay distinguishable when stacked. */
|
|
340
|
+
declare const ISOCHRONE_LINE_COLOR = "#0b7285";
|
|
341
|
+
/** The width of an isochrone band's outline, in pixels. */
|
|
342
|
+
declare const ISOCHRONE_LINE_WIDTH = 1;
|
|
343
|
+
/**
|
|
344
|
+
* isochroneColor picks a band's fill from its position in the requested sequence.
|
|
345
|
+
*
|
|
346
|
+
* Keyed on INDEX rather than on the `value` itself, and that is deliberate: a range of
|
|
347
|
+
* `[900, 1800, 2700]` and one of `[60, 120, 180]` are both three bands and should look
|
|
348
|
+
* identical, because the question ("how far in three steps") is the same. Colouring by
|
|
349
|
+
* absolute value would make a short walk and a long drive incomparable.
|
|
350
|
+
*/
|
|
351
|
+
declare const isochroneColor: (index: number) => string;
|
|
352
|
+
/**
|
|
353
|
+
* The suggestion treatment: one chosen itinerary drawn solid, the rest dashed and dimmed.
|
|
354
|
+
*
|
|
355
|
+
* The dash and the dimming are the ITINERARY ones, aliased rather than restated. A suggested
|
|
356
|
+
* alternative and an unconfirmed draft are the same claim (this line is provisional), and a
|
|
357
|
+
* reader who learns the treatment on one surface must not meet a different one on the next.
|
|
358
|
+
* They keep their own names because a caller reaching for the suggestion treatment should
|
|
359
|
+
* not have to know it originates in the itinerary contract.
|
|
360
|
+
*/
|
|
361
|
+
declare const SUGGESTION_CHOSEN_COLOR = "#2b8a3e";
|
|
362
|
+
/** The colour of a suggestion the reader has not chosen. */
|
|
363
|
+
declare const SUGGESTION_ALTERNATIVE_COLOR = "#868e96";
|
|
364
|
+
/** The opacity an alternative suggestion paints at, the provisional itinerary's. */
|
|
365
|
+
declare const SUGGESTION_ALTERNATIVE_OPACITY = 0.6;
|
|
366
|
+
/** The dash an alternative suggestion paints in, the provisional itinerary's. */
|
|
367
|
+
declare const SUGGESTION_ALTERNATIVE_DASHARRAY: readonly [2, 2];
|
|
368
|
+
/** The directions result line. Distinct from an itinerary's, which is saved rather than computed. */
|
|
369
|
+
declare const DIRECTIONS_LINE_COLOR = "#1c7ed6";
|
|
370
|
+
/**
|
|
371
|
+
* The matrix connector scale.
|
|
372
|
+
*
|
|
373
|
+
* A connector's only job is relative cost, so width carries it: the cheapest pair in the
|
|
374
|
+
* grid draws at the minimum and the dearest at the maximum, interpolated between. Absolute
|
|
375
|
+
* widths would say nothing: one matrix's "far" is another's "next door".
|
|
376
|
+
*/
|
|
377
|
+
declare const MATRIX_LINE_COLOR = "#7048e8";
|
|
378
|
+
/** The width of the cheapest connector of a matrix, in pixels. */
|
|
379
|
+
declare const MATRIX_LINE_MIN_WIDTH = 1;
|
|
380
|
+
/** The width of the dearest connector of a matrix, in pixels. */
|
|
381
|
+
declare const MATRIX_LINE_MAX_WIDTH = 6;
|
|
382
|
+
/** The opacity a matrix connector paints at. */
|
|
383
|
+
declare const MATRIX_LINE_OPACITY = 0.55;
|
|
384
|
+
/**
|
|
385
|
+
* matrixLineWidth scales one cell's cost onto the connector width range.
|
|
386
|
+
*
|
|
387
|
+
* A degenerate grid, every pair identical or a single pair, has no spread to scale against,
|
|
388
|
+
* so it draws at the minimum rather than dividing by zero and painting NaN, which MapLibre
|
|
389
|
+
* renders as nothing at all. All three arguments are checked for finiteness, not just the
|
|
390
|
+
* value: an infinite bound divides infinity by infinity, which is NaN, and a clamp cannot
|
|
391
|
+
* rescue a NaN, since Math.min and Math.max both propagate it.
|
|
392
|
+
*
|
|
393
|
+
* The result is clamped rather than trusted to land in range. The renderer hands this the
|
|
394
|
+
* grid's own extrema, so its interpolation cannot overshoot, but a published helper is called
|
|
395
|
+
* with whatever the integrator has: a cost from outside the grid it was scaled against
|
|
396
|
+
* extrapolates, and the two ends of the scale stop meaning what the legend says they mean.
|
|
397
|
+
* Below the minimum it runs down through zero, which `line-width` is not specified to take
|
|
398
|
+
* at all.
|
|
399
|
+
*
|
|
400
|
+
* @param value The cell's cost.
|
|
401
|
+
* @param min The cheapest cost of the grid.
|
|
402
|
+
* @param max The dearest cost of the grid.
|
|
403
|
+
* @returns The connector's width in pixels, from {@link MATRIX_LINE_MIN_WIDTH} to
|
|
404
|
+
* {@link MATRIX_LINE_MAX_WIDTH}.
|
|
405
|
+
*/
|
|
406
|
+
declare const matrixLineWidth: (value: number, min: number, max: number) => number;
|
|
407
|
+
/** The place and POI result markers. Circles, so they never collide with the sprite catalogue. */
|
|
408
|
+
declare const RESULT_POINT_RADIUS = 6;
|
|
409
|
+
/** The colour of a result marker's outline. */
|
|
410
|
+
declare const RESULT_POINT_STROKE_COLOR = "#ffffff";
|
|
411
|
+
/** The width of a result marker's outline, in pixels. */
|
|
412
|
+
declare const RESULT_POINT_STROKE_WIDTH = 2;
|
|
413
|
+
/** The fill of a geocoded place's marker. */
|
|
414
|
+
declare const PLACE_POINT_COLOR = "#f59f00";
|
|
415
|
+
/** The fill of a point of interest's marker. */
|
|
416
|
+
declare const POI_RESULT_POINT_COLOR = "#1c7ed6";
|
|
417
|
+
/**
|
|
418
|
+
* ENRICHMENT_CATEGORY_SLUG is the slug of the layers catalogue's category whose overlays STACK
|
|
419
|
+
* rather than replace one another: hillshade, points of interest and the like, drawn over a
|
|
420
|
+
* classic overlay rather than in place of it.
|
|
421
|
+
*
|
|
422
|
+
* It is the catalogue's own key for the distinction, and every surface that composes overlays
|
|
423
|
+
* reads it through {@link isEnrichmentCategory}.
|
|
424
|
+
*/
|
|
425
|
+
declare const ENRICHMENT_CATEGORY_SLUG = "enrichment";
|
|
426
|
+
/**
|
|
427
|
+
* POIS_OVERLAY_SLUG is the slug of the points-of-interest overlay, an enrichment of its own kind.
|
|
428
|
+
*
|
|
429
|
+
* It toggles as any enrichment does, but a host drives it through the points-of-interest picker
|
|
430
|
+
* (or from a place picker of its own) rather than through a switch beside the hillshade, so the
|
|
431
|
+
* layers picker lists no switch for it. Named here so a surface leaves it out without spelling the
|
|
432
|
+
* slug.
|
|
433
|
+
*/
|
|
434
|
+
declare const POIS_OVERLAY_SLUG = "pois";
|
|
435
|
+
/**
|
|
436
|
+
* isEnrichmentCategory reports whether a layers catalogue category holds overlays that stack.
|
|
437
|
+
*
|
|
438
|
+
* Only the category keyed {@link ENRICHMENT_CATEGORY_SLUG} does. Every other category is classic,
|
|
439
|
+
* a new one included, and that is the safer default: a new classic overlay replacing the one
|
|
440
|
+
* drawn before it is correct, where a new one stacking would paint over it. The slug is compared
|
|
441
|
+
* exactly, as the catalogue writes it.
|
|
442
|
+
*/
|
|
443
|
+
declare const isEnrichmentCategory: (category: {
|
|
444
|
+
readonly slug: string;
|
|
445
|
+
}) => boolean;
|
|
446
|
+
/** The property keys the converters stamp, so layer expressions and tests agree on them. */
|
|
447
|
+
declare const analysisProps: {
|
|
448
|
+
readonly COLOR: "mtyaColor";
|
|
449
|
+
readonly INDEX: "mtyaIndex";
|
|
450
|
+
readonly KIND: "mtyaKind";
|
|
451
|
+
readonly WIDTH: "mtyaWidth";
|
|
452
|
+
};
|
|
453
|
+
/**
|
|
454
|
+
* isochronesToGeoJson draws each band as a polygon, palest nearest.
|
|
455
|
+
*
|
|
456
|
+
* Bands are emitted in the order the API returned them, which is the order they were
|
|
457
|
+
* requested in, and since they nest by construction, that order is also back-to-front.
|
|
458
|
+
* Reversing or sorting here would put the largest band on top and hide every one inside it.
|
|
459
|
+
*/
|
|
460
|
+
declare const isochronesToGeoJson: (result: IsochronesResult) => FeatureCollection;
|
|
461
|
+
/** directionsToGeoJson draws each returned route, with its metrics on the feature. */
|
|
462
|
+
declare const directionsToGeoJson: (result: DirectionsResult) => FeatureCollection;
|
|
463
|
+
/**
|
|
464
|
+
* suggestionsToGeoJson draws the candidate set, one itinerary chosen and the rest alternatives.
|
|
465
|
+
*
|
|
466
|
+
* The first itinerary is chosen by default because the API returns them best-first. `chosen`
|
|
467
|
+
* overrides that, so an application whose user picked a different candidate redraws by
|
|
468
|
+
* index rather than by reordering the result it was given.
|
|
469
|
+
*
|
|
470
|
+
* @param result The suggestions the Data API answered.
|
|
471
|
+
* @param chosen The index of the chosen itinerary. Defaults to 0, the API's best.
|
|
472
|
+
*/
|
|
473
|
+
declare const suggestionsToGeoJson: (result: SuggestionsResult, chosen?: number) => FeatureCollection;
|
|
474
|
+
/**
|
|
475
|
+
* placesToGeoJson draws geocode hits as points, labelled.
|
|
476
|
+
*
|
|
477
|
+
* A place whose point names no place is still a feature, with no geometry, so every place keeps
|
|
478
|
+
* its feature and its `mtyaIndex`. A renderer draws nothing for it.
|
|
479
|
+
*/
|
|
480
|
+
declare const placesToGeoJson: (result: GeocodeResult) => FeatureCollection<Point | null>;
|
|
481
|
+
/**
|
|
482
|
+
* poisToGeoJson draws POI query hits as points.
|
|
483
|
+
*
|
|
484
|
+
* A POI whose point names no place is still a feature, with no geometry, as
|
|
485
|
+
* {@link placesToGeoJson} draws a place.
|
|
486
|
+
*/
|
|
487
|
+
declare const poisToGeoJson: (result: PoisResult) => FeatureCollection<Point | null>;
|
|
488
|
+
/**
|
|
489
|
+
* matrixToGeoJson synthesises what the matrix result does not contain.
|
|
490
|
+
*
|
|
491
|
+
* A matrix answers grids of numbers and no geometry at all, so this is the one converter
|
|
492
|
+
* that invents rather than translates: a straight connector per solved pair, plus a point
|
|
493
|
+
* per location. The connectors are **not itineraries** (they are the straight line between two
|
|
494
|
+
* places, weighted by what the router said travelling between them costs), and the
|
|
495
|
+
* `mtyaKind` of "matrix-connector" says so to anything reading the features back.
|
|
496
|
+
*
|
|
497
|
+
* Three cases are handled because all three are ordinary:
|
|
498
|
+
*
|
|
499
|
+
* - A cell the router could not solve arrives as `null` and is skipped, rather than drawn
|
|
500
|
+
* at width NaN, which MapLibre renders as nothing while logging nothing. A cell that is no
|
|
501
|
+
* finite number is unsolved the same way.
|
|
502
|
+
* - The diagonal (a location to itself) is skipped; it is always zero and draws as a dot.
|
|
503
|
+
* - `sources` and `destinations` subset the grid, so row `i` is `locations[sources[i]]`
|
|
504
|
+
* rather than `locations[i]`. Ignoring that draws every connector from the wrong place,
|
|
505
|
+
* plausibly enough that it survives review.
|
|
506
|
+
*
|
|
507
|
+
* A metric this release does not know names no grid, so it draws no connector and the locations
|
|
508
|
+
* still draw. A location that names no place is a feature with no geometry, keeping its index.
|
|
509
|
+
*/
|
|
510
|
+
declare const matrixToGeoJson: (input: Pick<DataSchema.MatrixInput, "locations" | "metrics" | "sources" | "destinations">, result: MatrixResult) => FeatureCollection<LineString | Point | null>;
|
|
511
|
+
/** HoveredItinerary is what a pointer is over: a leg, a place, both or neither. */
|
|
512
|
+
interface HoveredItinerary {
|
|
513
|
+
/** The id of the leg under the pointer, or null where it is over none. */
|
|
514
|
+
readonly segmentId: string | null;
|
|
515
|
+
/** The id of the place under the pointer, or null where it is over none. */
|
|
516
|
+
readonly waypointId: string | null;
|
|
517
|
+
}
|
|
518
|
+
/** The part of a feature the read takes: its properties. */
|
|
519
|
+
interface HoverFeature {
|
|
520
|
+
readonly properties?: Readonly<Record<string, unknown>> | null | undefined;
|
|
521
|
+
}
|
|
522
|
+
/**
|
|
523
|
+
* hoveredItinerary reads what a pointer is over from the features under it, topmost first: the
|
|
524
|
+
* first leg and the first place they name.
|
|
525
|
+
*
|
|
526
|
+
* Each is read from the feature's properties, `segment_id` and `waypoint_id`, as a string that is
|
|
527
|
+
* not empty, and never from the feature's own id: the itinerary's vector tiles leave that unset, so
|
|
528
|
+
* a read of it would find nothing under the pointer, ever. A feature naming no leg, or naming one
|
|
529
|
+
* by a value that is no id, gives way to the next, and a feature naming both answers both: a place
|
|
530
|
+
* standing on its own leg is one answer to two questions.
|
|
531
|
+
*
|
|
532
|
+
* @param features The features under the pointer, topmost first.
|
|
533
|
+
* @returns The leg and the place, each null where no feature names one.
|
|
534
|
+
*
|
|
535
|
+
* @example
|
|
536
|
+
* ```ts
|
|
537
|
+
* import { hoveredItinerary } from "@mountaya/elements/layers";
|
|
538
|
+
*
|
|
539
|
+
* hoveredItinerary([
|
|
540
|
+
* { properties: { waypoint_id: "hut" } },
|
|
541
|
+
* { properties: { segment_id: "climb" } },
|
|
542
|
+
* ]); // { segmentId: "climb", waypointId: "hut" }
|
|
543
|
+
* ```
|
|
544
|
+
*/
|
|
545
|
+
declare const hoveredItinerary: (features: readonly HoverFeature[]) => HoveredItinerary;
|
|
546
|
+
/**
|
|
547
|
+
* The itinerary tile contract: source-layer names, and the paint the platform strokes
|
|
548
|
+
* itineraries with.
|
|
549
|
+
*
|
|
550
|
+
* A tile layer's `id` in the `/v1/tile-layers` manifest is unstable and per-source-prefixed, so
|
|
551
|
+
* it is not something to match on. The `source_layer` is the stable contract, and it is
|
|
552
|
+
* what a caller scoping `queryRenderedFeatures` or a click handler to itinerary geometry
|
|
553
|
+
* should use.
|
|
554
|
+
*
|
|
555
|
+
* The paint constants exist so an itinerary you draw yourself (a preview, a proposed
|
|
556
|
+
* alternative, an itinerary not yet saved) looks like the itineraries the platform serves. Two
|
|
557
|
+
* renders of the same line stroked differently read as a bug.
|
|
558
|
+
*/
|
|
559
|
+
/**
|
|
560
|
+
* The source-layer names the itinerary vector tiles emit: routed segment geometry, solid
|
|
561
|
+
* and dashed sharing one source-layer, and waypoints.
|
|
562
|
+
*/
|
|
563
|
+
declare const ITINERARY_LINE_SOURCE_LAYER = "itinerary_lines";
|
|
564
|
+
/** The source-layer the itinerary tiles carry waypoints and the derived endpoints in. */
|
|
565
|
+
declare const ITINERARY_POINT_SOURCE_LAYER = "itinerary_points";
|
|
566
|
+
/**
|
|
567
|
+
* The source-layer the itinerary tiles carry restricted stretches in: one line feature per
|
|
568
|
+
* stretch of a segment that follows a way restricting who may pass, carrying `segment_id`,
|
|
569
|
+
* `itinerary_id` and `kind` (a member of `ROAD_ACCESS_KINDS` from `@mountaya/elements/data`).
|
|
570
|
+
* The tiles carry it from zoom 9, the zoom they start drawing waypoints at, and no specification
|
|
571
|
+
* declares a layer for it, so a map draws it with layers of its own.
|
|
572
|
+
*/
|
|
573
|
+
declare const ITINERARY_RESTRICTION_SOURCE_LAYER = "itinerary_restrictions";
|
|
574
|
+
/**
|
|
575
|
+
* ITINERARY_ENDPOINT_ICONS are the icon names carried by the derived start and end rows.
|
|
576
|
+
*
|
|
577
|
+
* Those two rows carry their SEGMENT's colour, while every other row in the same points
|
|
578
|
+
* source-layer carries a waypoint's own colour, and one `icon-image` expression covers
|
|
579
|
+
* both, so the icon name is the only thing separating them. Recolouring segments means
|
|
580
|
+
* matching these two names, or the recolour reaches an author's waypoint pins too.
|
|
581
|
+
*/
|
|
582
|
+
declare const ITINERARY_ENDPOINT_ICONS: readonly ["flag-start", "flag-end"];
|
|
583
|
+
/**
|
|
584
|
+
* ITINERARY_CASING_LAYER_SUFFIX ends the layer id of the white outline drawn beneath the
|
|
585
|
+
* itinerary lines.
|
|
586
|
+
*
|
|
587
|
+
* The casing shares the `itinerary_lines` source-layer with the lines it sits under, so
|
|
588
|
+
* `source_layer` cannot tell them apart and the id is the only thing that can. That
|
|
589
|
+
* distinction is load-bearing rather than cosmetic: see {@link isItineraryCasingLayer}.
|
|
590
|
+
*/
|
|
591
|
+
declare const ITINERARY_CASING_LAYER_SUFFIX = "-casing";
|
|
592
|
+
/**
|
|
593
|
+
* ITINERARY_LINE_WIDTH_STOPS is the zoom-to-width ramp every itinerary line is stroked at,
|
|
594
|
+
* and ITINERARY_CASING_WIDTH_STOPS the ramp of the white outline beneath it.
|
|
595
|
+
*
|
|
596
|
+
* Each casing width is two pixels larger, so the halo reads as a constant one-pixel border
|
|
597
|
+
* on either side at every zoom rather than as a fraction of the stroke. Both are flat
|
|
598
|
+
* `zoom, width, …` pairs: the tail a MapLibre `["interpolate", ["linear"], ["zoom"], …]`
|
|
599
|
+
* expression takes. The stops are the datum; the expression is assembly.
|
|
600
|
+
*/
|
|
601
|
+
declare const ITINERARY_LINE_WIDTH_STOPS: readonly [7, 2, 10, 2, 13, 3, 16, 5];
|
|
602
|
+
/** The zoom-to-width ramp of the outline beneath an itinerary line. */
|
|
603
|
+
declare const ITINERARY_CASING_WIDTH_STOPS: readonly [7, 4, 10, 4, 13, 5, 16, 7];
|
|
604
|
+
/**
|
|
605
|
+
* ITINERARY_CASING_COLOR and ITINERARY_CASING_OPACITY paint that outline. Not quite
|
|
606
|
+
* opaque, so a dense stack of switchbacks does not turn into a white mass.
|
|
607
|
+
*/
|
|
608
|
+
declare const ITINERARY_CASING_COLOR = "#ffffff";
|
|
609
|
+
/** The opacity the outline beneath an itinerary line paints at. */
|
|
610
|
+
declare const ITINERARY_CASING_OPACITY = 0.9;
|
|
611
|
+
/**
|
|
612
|
+
* itineraryLineLayout is the layout every itinerary line layer shares.
|
|
613
|
+
*
|
|
614
|
+
* Round caps and joins are what make a routed polyline read as a drawn line. MapLibre's
|
|
615
|
+
* default butt cap notches every segment boundary, and its mitre join throws a spike off
|
|
616
|
+
* every switchback, which on mountain terrain is most of the itinerary.
|
|
617
|
+
*/
|
|
618
|
+
declare const itineraryLineLayout: {
|
|
619
|
+
readonly "line-cap": "round";
|
|
620
|
+
readonly "line-join": "round";
|
|
621
|
+
};
|
|
622
|
+
/**
|
|
623
|
+
* ITINERARY_LINE_DASHARRAY is the pattern a provisional itinerary line paints in. The pair
|
|
624
|
+
* is measured in line widths, so `[2, 2]` is a one-to-one dash at any stroke.
|
|
625
|
+
*/
|
|
626
|
+
declare const ITINERARY_LINE_DASHARRAY: readonly [2, 2];
|
|
627
|
+
/**
|
|
628
|
+
* ITINERARY_DASHED_OPACITY is what a provisional line paints at.
|
|
629
|
+
*
|
|
630
|
+
* High enough to follow, low enough that the eye settles on the solid itinerary beside it: a
|
|
631
|
+
* comparison cue rather than a second answer.
|
|
632
|
+
*/
|
|
633
|
+
declare const ITINERARY_DASHED_OPACITY = 0.6;
|
|
634
|
+
/**
|
|
635
|
+
* isItineraryCasingLayer reports whether a manifest tile layer is the casing rather than an
|
|
636
|
+
* itinerary line.
|
|
637
|
+
*
|
|
638
|
+
* The casing takes part in exactly two of the paint folds a renderer applies, and must be
|
|
639
|
+
* held out of the rest:
|
|
640
|
+
*
|
|
641
|
+
* - **Opacity and width: yes.** It is the same stroke as the line above it, so dimming,
|
|
642
|
+
* hover-thickening or excluding an itinerary has to move both, or the halo detaches from what
|
|
643
|
+
* it is haloing.
|
|
644
|
+
* - **Colour: no.** Its whole job is to be the one thing on the map that is NOT the
|
|
645
|
+
* itinerary's colour. Tinting it to the segment colour makes it invisible.
|
|
646
|
+
* - **Dash: no.** `line-dasharray` is measured in line widths and the casing is wider by
|
|
647
|
+
* definition, so a dash copied onto it runs long and drifts out of phase with the line's.
|
|
648
|
+
* - **Direction companions: no.** Flow lines and chevrons are generated per itinerary line
|
|
649
|
+
* layer; generating a second set from the casing doubles every arrow on the itinerary.
|
|
650
|
+
*/
|
|
651
|
+
declare const isItineraryCasingLayer: (layer: {
|
|
652
|
+
id: string;
|
|
653
|
+
}) => boolean;
|
|
654
|
+
/**
|
|
655
|
+
* RoadAccessHostLayer is what the restricted-stretch layers read of the tile layers they are
|
|
656
|
+
* placed beside: a layer's id, the source-layer it draws and its kind.
|
|
657
|
+
*/
|
|
658
|
+
interface RoadAccessHostLayer {
|
|
659
|
+
readonly id: string;
|
|
660
|
+
readonly source_layer: string;
|
|
661
|
+
readonly type: string;
|
|
662
|
+
}
|
|
663
|
+
/**
|
|
664
|
+
* roadAccessIconLayerIdOf answers the id of the layer a source's restricted-stretch icons are
|
|
665
|
+
* drawn on, or null for a source that draws no itinerary line and so no restricted stretch.
|
|
666
|
+
*
|
|
667
|
+
* A source's restricted stretches are drawn by the map that mounts it rather than declared by
|
|
668
|
+
* its specification, so this is how a surface reads a click or a hover on their icons: the id is
|
|
669
|
+
* the one the map gave the layer.
|
|
670
|
+
*
|
|
671
|
+
* @example
|
|
672
|
+
* ```ts
|
|
673
|
+
* import type { TileSchema } from "@mountaya/client";
|
|
674
|
+
* import { roadAccessIconLayerIdOf } from "@mountaya/elements/layers";
|
|
675
|
+
*
|
|
676
|
+
* declare const sources: TileSchema.TileSource[];
|
|
677
|
+
* const iconLayerIds = sources.flatMap((source) => roadAccessIconLayerIdOf(source) ?? []);
|
|
678
|
+
* ```
|
|
679
|
+
*/
|
|
680
|
+
declare const roadAccessIconLayerIdOf: (source: {
|
|
681
|
+
readonly layers: readonly RoadAccessHostLayer[];
|
|
682
|
+
}) => string | null;
|
|
683
|
+
/**
|
|
684
|
+
* The choice a section's rows make: `terrain`, one base map among the catalogue's terrains;
|
|
685
|
+
* `overlay`, one classic overlay among every classic category's at once; `enrichment`, each
|
|
686
|
+
* enrichment on or off by itself.
|
|
687
|
+
*/
|
|
688
|
+
type LayersPanelChoice = "enrichment" | "overlay" | "terrain";
|
|
689
|
+
/** One entry a layers picker lists: a terrain or an overlay. */
|
|
690
|
+
interface LayersPanelRow {
|
|
691
|
+
/** The entry's slug, which a press hands on. */
|
|
692
|
+
readonly slug: string;
|
|
693
|
+
/** The entry's name in the reader's language, else its English name, else its slug. */
|
|
694
|
+
readonly label: string;
|
|
695
|
+
/** Whether the selection holds the entry. */
|
|
696
|
+
readonly checked: boolean;
|
|
697
|
+
/**
|
|
698
|
+
* What the row shows beside its label: its lock where the entry is out of the viewer's reach,
|
|
699
|
+
* whether or not the selection holds it, a tick where the selection holds it, and nothing
|
|
700
|
+
* otherwise.
|
|
701
|
+
*/
|
|
702
|
+
readonly mark: "lock" | "tick" | null;
|
|
703
|
+
}
|
|
704
|
+
/** One classic category the overlays' category switch offers. */
|
|
705
|
+
interface LayersPanelCategory {
|
|
706
|
+
/** The category's slug, which the reader's pick names. */
|
|
707
|
+
readonly slug: string;
|
|
708
|
+
/** The category's name in the reader's language, else its English name, else its slug. */
|
|
709
|
+
readonly name: string;
|
|
710
|
+
}
|
|
711
|
+
/**
|
|
712
|
+
* One section of a layers picker, by the choice it makes, in the order a picker lists them: the
|
|
713
|
+
* terrains as picture cards, the enrichments as switches, the classic overlays as picture cards
|
|
714
|
+
* one category at a time, and the time.
|
|
715
|
+
*
|
|
716
|
+
* A section is headed by a word of the elements' `layers` section (`terrain`, `enrichment`,
|
|
717
|
+
* `overlays`, `time`) and states the catalogue category it lists as `category`: the enrichment
|
|
718
|
+
* category's slug for the enrichments, the category the picker opens on for the overlays, and
|
|
719
|
+
* none for the terrains and the time. Its rows are in the catalogue's order.
|
|
720
|
+
*/
|
|
721
|
+
type LayersPanelSection = {
|
|
722
|
+
/** The terrains, one base map among them. */
|
|
723
|
+
readonly choice: "terrain";
|
|
724
|
+
readonly heading: {
|
|
725
|
+
readonly word: "terrain";
|
|
726
|
+
};
|
|
727
|
+
readonly category: null;
|
|
728
|
+
readonly rows: readonly LayersPanelRow[];
|
|
729
|
+
} | {
|
|
730
|
+
/** Every enrichment, each on or off by itself. */
|
|
731
|
+
readonly choice: "enrichment";
|
|
732
|
+
readonly heading: {
|
|
733
|
+
readonly word: "enrichment";
|
|
734
|
+
};
|
|
735
|
+
readonly category: string;
|
|
736
|
+
readonly rows: readonly LayersPanelRow[];
|
|
737
|
+
} | {
|
|
738
|
+
/** One classic overlay among every classic category's, shown one category at a time. */
|
|
739
|
+
readonly choice: "overlay";
|
|
740
|
+
readonly heading: {
|
|
741
|
+
readonly word: "overlays";
|
|
742
|
+
};
|
|
743
|
+
/** The category the picker opens on, whose overlays are the rows. */
|
|
744
|
+
readonly category: string;
|
|
745
|
+
/**
|
|
746
|
+
* Every classic category holding an overlay, in the catalogue's order. A picker draws a
|
|
747
|
+
* switch between them where it lists two or more.
|
|
748
|
+
*/
|
|
749
|
+
readonly categories: readonly LayersPanelCategory[];
|
|
750
|
+
readonly rows: readonly LayersPanelRow[];
|
|
751
|
+
} | {
|
|
752
|
+
/** The time, which a slider chooses and no row lists. */
|
|
753
|
+
readonly choice: "time";
|
|
754
|
+
readonly heading: {
|
|
755
|
+
readonly word: "time";
|
|
756
|
+
};
|
|
757
|
+
readonly category: null;
|
|
758
|
+
readonly rows: readonly LayersPanelRow[];
|
|
759
|
+
};
|
|
760
|
+
/** What a layers picker lists: the catalogue, what the selection holds, and how a row reads. */
|
|
761
|
+
interface LayersPanelInput {
|
|
762
|
+
/** The layers catalogue, or null until it has been read. */
|
|
763
|
+
readonly catalogue: Pick<RestSchema.Layers, "overlays" | "terrains"> | null;
|
|
764
|
+
/** The terrain, the classic overlay and the enrichments the selection holds. */
|
|
765
|
+
readonly selection: {
|
|
766
|
+
readonly enrichments: readonly string[];
|
|
767
|
+
readonly overlay: string | null;
|
|
768
|
+
readonly terrain: string | null;
|
|
769
|
+
};
|
|
770
|
+
/** The language the rows and the categories are named in. */
|
|
771
|
+
readonly language: string;
|
|
772
|
+
/**
|
|
773
|
+
* Whether an entry is out of the viewer's reach, so its row shows its lock. No entry is, where
|
|
774
|
+
* this is omitted.
|
|
775
|
+
*/
|
|
776
|
+
readonly isLocked?: ((slug: string) => boolean) | undefined;
|
|
777
|
+
/**
|
|
778
|
+
* The classic category the reader last picked in the overlays' category switch, which a picker
|
|
779
|
+
* holds as its own state. None is picked where this is omitted, and a pick that names no
|
|
780
|
+
* category on offer is none.
|
|
781
|
+
*/
|
|
782
|
+
readonly picked?: string | null | undefined;
|
|
783
|
+
/** Whether the host offers the time, so the picker lists its section. Omitted, it does not. */
|
|
784
|
+
readonly offersTime?: boolean | undefined;
|
|
785
|
+
}
|
|
786
|
+
/**
|
|
787
|
+
* What a press on a row asks for: the selection's command for the row's choice, with the row's
|
|
788
|
+
* slug, or, for a locked row, the report that the entry was pressed.
|
|
789
|
+
*/
|
|
790
|
+
type LayersPanelPress = {
|
|
791
|
+
readonly command: LayersPanelChoice;
|
|
792
|
+
readonly slug: string;
|
|
793
|
+
} | {
|
|
794
|
+
readonly locked: string;
|
|
795
|
+
};
|
|
796
|
+
/**
|
|
797
|
+
* layersPanelSections lists what a layers picker offers, as the map studio's layers panel lists
|
|
798
|
+
* it, up to four sections in this order:
|
|
799
|
+
*
|
|
800
|
+
* 1. **The terrains**, as picture cards in one choice. The section stands while the catalogue is
|
|
801
|
+
* still to be read, with no row.
|
|
802
|
+
* 2. **The enrichments**, as switches: the overlays of every enrichment category, in the
|
|
803
|
+
* catalogue's order, the points of interest left out, since their own picker drives them.
|
|
804
|
+
* The section stands where it lists a row.
|
|
805
|
+
* 3. **The classic overlays**, as picture cards in one choice across every classic category,
|
|
806
|
+
* shown one category at a time. `categories` lists each classic category holding an overlay,
|
|
807
|
+
* and the rows are the overlays of the one the picker opens on: the reader's `picked` category
|
|
808
|
+
* where it is listed, else the first listed category holding the selected overlay, else the
|
|
809
|
+
* first listed. The section stands where it lists a category.
|
|
810
|
+
* 4. **The time**, with no row, where the host offers it (`offersTime`).
|
|
811
|
+
*
|
|
812
|
+
* The split between the kinds is the catalogue's own, never a preference: base maps replace one
|
|
813
|
+
* another, classic overlays replace one another across categories, since two of them repaint the
|
|
814
|
+
* same ground, and enrichments stack ({@link isEnrichmentCategory}). A category is named as a row
|
|
815
|
+
* is labelled.
|
|
816
|
+
*
|
|
817
|
+
* @example
|
|
818
|
+
* ```ts
|
|
819
|
+
* import { layersPanelSections } from "@mountaya/elements/layers";
|
|
820
|
+
*
|
|
821
|
+
* const sections = layersPanelSections({
|
|
822
|
+
* catalogue: null,
|
|
823
|
+
* language: "fr",
|
|
824
|
+
* offersTime: true,
|
|
825
|
+
* picked: null,
|
|
826
|
+
* selection: { enrichments: [], overlay: null, terrain: null },
|
|
827
|
+
* });
|
|
828
|
+
* ```
|
|
829
|
+
*/
|
|
830
|
+
declare const layersPanelSections: ({ catalogue, isLocked, language, offersTime, picked, selection }: LayersPanelInput) => readonly LayersPanelSection[];
|
|
831
|
+
/**
|
|
832
|
+
* layersPanelPress answers what a press on a row of a layers picker asks for: the report of the
|
|
833
|
+
* entry where the row shows its lock, which selects nothing, and otherwise the command of the
|
|
834
|
+
* row's choice, which the selection carries out.
|
|
835
|
+
*
|
|
836
|
+
* @param choice The choice of the section the row stands in.
|
|
837
|
+
* @param row The row pressed.
|
|
838
|
+
*/
|
|
839
|
+
declare const layersPanelPress: (choice: LayersPanelChoice, row: Pick<LayersPanelRow, "mark" | "slug">) => LayersPanelPress;
|
|
840
|
+
/**
|
|
841
|
+
* overlayInstant answers the moment a map's time-dependent surfaces show: the tiles a server
|
|
842
|
+
* stamps with an instant, the light a hillshade is drawn under, and the line a surface states the
|
|
843
|
+
* moment on.
|
|
844
|
+
*
|
|
845
|
+
* A pinned instant is itself, to the millisecond, whatever the clock reads: behind the pin, ahead
|
|
846
|
+
* of it, and under a clock that reads none. With none pinned it is the start of the minute the
|
|
847
|
+
* clock's reading falls in, the reading floored to a whole minute from the epoch, so a reading
|
|
848
|
+
* before the epoch falls in the minute before it. Every surface that reads it therefore shows one
|
|
849
|
+
* moment, and moves when the minute does.
|
|
850
|
+
*
|
|
851
|
+
* An Invalid Date names no instant and is read as none pinned, as a pin restored from a link
|
|
852
|
+
* that names no moment is.
|
|
853
|
+
*
|
|
854
|
+
* It keeps no time and reads no clock: the caller hands over the clock's reading, and asks again
|
|
855
|
+
* when the pin changes or the minute turns.
|
|
856
|
+
*
|
|
857
|
+
* @param pinned The instant a reader pinned, the layers selection's `instant`, or null with none
|
|
858
|
+
* pinned.
|
|
859
|
+
* @param nowMs The clock's reading, in epoch milliseconds.
|
|
860
|
+
* @returns The instant to show, a `Date` of the caller's own. Null with none pinned under a clock
|
|
861
|
+
* that reads no instant (`NaN`, an infinity, or a reading past the instants a `Date` holds):
|
|
862
|
+
* there is no moment to show, and a surface draws nothing for it.
|
|
863
|
+
*
|
|
864
|
+
* @example
|
|
865
|
+
* ```ts
|
|
866
|
+
* import { overlayInstant } from "@mountaya/elements/layers";
|
|
867
|
+
*
|
|
868
|
+
* const minuteStart = Date.UTC(2026, 2, 14, 12, 0);
|
|
869
|
+
*
|
|
870
|
+
* overlayInstant(new Date("2026-03-14T09:26:53.900Z"), minuteStart); // the pinned instant
|
|
871
|
+
* overlayInstant(null, minuteStart + 59_999); // the start of that minute
|
|
872
|
+
* overlayInstant(null, Number.NaN); // null: the clock reads no instant
|
|
873
|
+
* ```
|
|
874
|
+
*/
|
|
875
|
+
declare const overlayInstant: (pinned: Date | null, nowMs: number) => Date | null;
|
|
876
|
+
/**
|
|
877
|
+
* OverlayKind is how an overlay of the layers manifest is drawn: a `classic` overlay replaces the
|
|
878
|
+
* one drawn before it, an `enrichment` stacks over it. {@link isEnrichmentCategory} decides which
|
|
879
|
+
* a category holds.
|
|
880
|
+
*/
|
|
881
|
+
type OverlayKind = "classic" | "enrichment";
|
|
882
|
+
/**
|
|
883
|
+
* findOverlay answers the layers manifest's own entry for an overlay, by its slug.
|
|
884
|
+
*
|
|
885
|
+
* The categories are read in the manifest's order, and the first overlay that carries the slug
|
|
886
|
+
* is the answer. A map draws a classic overlay and an enrichment through two calls, so a caller
|
|
887
|
+
* that knows which it draws names the kind, and an overlay of the other kind is no answer.
|
|
888
|
+
*
|
|
889
|
+
* @param layers The layers manifest, already read.
|
|
890
|
+
* @param slug The overlay's slug, as the manifest spells it.
|
|
891
|
+
* @param kind The kind of overlay asked for. Omitted, an overlay of either kind.
|
|
892
|
+
* @returns The manifest's entry, or null where it holds no overlay of that kind under the slug.
|
|
893
|
+
*
|
|
894
|
+
* @example
|
|
895
|
+
* ```ts
|
|
896
|
+
* import { findOverlay } from "@mountaya/elements/layers";
|
|
897
|
+
* import type { RestSchema } from "@mountaya/client";
|
|
898
|
+
*
|
|
899
|
+
* declare const layers: RestSchema.Layers;
|
|
900
|
+
*
|
|
901
|
+
* const hillshade = findOverlay(layers, "hillshade", "enrichment");
|
|
902
|
+
* ```
|
|
903
|
+
*/
|
|
904
|
+
declare const findOverlay: (layers: Pick<RestSchema.Layers, "overlays">, slug: string, kind?: OverlayKind | undefined) => RestSchema.Overlay | null;
|
|
905
|
+
/** One row a points-of-interest picker offers: a drawn manifest key, or a curated group of them. */
|
|
906
|
+
interface PoiPanelRow {
|
|
907
|
+
/** The manifest key, or the group's id. */
|
|
908
|
+
readonly id: string;
|
|
909
|
+
/** A group's own label, a key's from the labels handed in, else the key itself. */
|
|
910
|
+
readonly label: string;
|
|
911
|
+
/** The glyph role a group names to draw beside its label, where it names one. */
|
|
912
|
+
readonly glyph: string | undefined;
|
|
913
|
+
/** The drawn keys the row's toggle drives, and none that is not drawn. */
|
|
914
|
+
readonly keys: readonly string[];
|
|
915
|
+
/** Whether the row is on: while any key it drives is shown. */
|
|
916
|
+
readonly visible: boolean;
|
|
917
|
+
}
|
|
918
|
+
/** What a points-of-interest picker reads: what the map draws and shows, and how it is curated. */
|
|
919
|
+
interface PoiPanelRowsInput {
|
|
920
|
+
/** The manifest keys drawn at the points-of-interest rank, in the order drawn. */
|
|
921
|
+
readonly drawn: readonly string[];
|
|
922
|
+
/** Whether a drawn key is shown, as the map answers it. */
|
|
923
|
+
readonly isKeyVisible: (key: string) => boolean;
|
|
924
|
+
/** Restricts the rows to these keys, in this order. Every drawn key, where omitted. */
|
|
925
|
+
readonly keys?: readonly string[] | undefined;
|
|
926
|
+
/** Curated groups, a row each, in this order. They supersede `keys`. */
|
|
927
|
+
readonly groups?: readonly {
|
|
928
|
+
readonly id: string;
|
|
929
|
+
readonly label: string;
|
|
930
|
+
readonly keys: readonly string[];
|
|
931
|
+
readonly glyph?: string | undefined;
|
|
932
|
+
}[] | undefined;
|
|
933
|
+
/**
|
|
934
|
+
* The ids of the groups an application holds on, where it holds that state itself: a group row
|
|
935
|
+
* then reads it rather than the map.
|
|
936
|
+
*/
|
|
937
|
+
readonly activeGroups?: readonly string[] | undefined;
|
|
938
|
+
/** A label per manifest key, for a row of a key. A key with no entry is labelled by itself. */
|
|
939
|
+
readonly labels?: Readonly<Record<string, string>> | undefined;
|
|
940
|
+
}
|
|
941
|
+
/** The rows a points-of-interest picker offers, and its master row. */
|
|
942
|
+
interface PoiPanelRows {
|
|
943
|
+
/** The rows, in order. None where nothing is drawn, and the picker then shows nothing. */
|
|
944
|
+
readonly rows: readonly PoiPanelRow[];
|
|
945
|
+
/** Whether the master row, which turns the whole overlay on and off, is on: while any row is. */
|
|
946
|
+
readonly anyVisible: boolean;
|
|
947
|
+
}
|
|
948
|
+
/**
|
|
949
|
+
* poiPanelRows resolves the rows a points-of-interest picker offers and whether each is on.
|
|
950
|
+
*
|
|
951
|
+
* A row is offered only for what is drawn. A curated key whose overlay is not drawn would render
|
|
952
|
+
* a toggle that reports success and changes nothing. A group survives on any of its keys being
|
|
953
|
+
* drawn and then drives the drawn ones alone, where the alternative drops a whole concept
|
|
954
|
+
* because one of the layers behind it is absent, which is the manifest's business and not the
|
|
955
|
+
* reader's. The master row reads the rows rather than a flag of its own, so it can never say the
|
|
956
|
+
* overlay is off while a row under it is on.
|
|
957
|
+
*
|
|
958
|
+
* @example
|
|
959
|
+
* ```ts
|
|
960
|
+
* import { poiPanelRows } from "@mountaya/elements/layers";
|
|
961
|
+
*
|
|
962
|
+
* const { anyVisible, rows } = poiPanelRows({
|
|
963
|
+
* drawn: ["spring", "parking"],
|
|
964
|
+
* groups: [{ id: "water", keys: ["spring", "fountain"], label: "Water" }],
|
|
965
|
+
* isKeyVisible: () => true,
|
|
966
|
+
* });
|
|
967
|
+
* ```
|
|
968
|
+
*/
|
|
969
|
+
declare const poiPanelRows: ({ activeGroups, drawn, groups, isKeyVisible, keys, labels }: PoiPanelRowsInput) => PoiPanelRows;
|
|
970
|
+
/**
|
|
971
|
+
* poiPanelNoteZoom answers the zoom below which a points-of-interest picker says the overlay draws
|
|
972
|
+
* nothing: the overlay's floor zoom, and no zoom at all where it states none or one that is no
|
|
973
|
+
* number, so the note is never raised there.
|
|
974
|
+
*
|
|
975
|
+
* The note is what the picker says while the camera stands below it, never at it.
|
|
976
|
+
*
|
|
977
|
+
* @param minZoom The zoom below which the overlay draws nothing.
|
|
978
|
+
*/
|
|
979
|
+
declare const poiPanelNoteZoom: (minZoom: number | undefined) => number;
|
|
980
|
+
type PoiCategory = DataSchema.PoiCategory;
|
|
981
|
+
/**
|
|
982
|
+
* omtCategoryToPoiEnum resolves an OpenMapTiles tile category string to the API's
|
|
983
|
+
* `PoiCategory`, or null when the category is outside the mapped vocabulary.
|
|
984
|
+
*
|
|
985
|
+
* Null rather than a guess: a caller turning a map click into an API call should decline
|
|
986
|
+
* rather than send a category the user did not point at. The input's ASCII capitals are folded
|
|
987
|
+
* first, so a `Restaurant` from a style variant still resolves, and nothing else is: a Kelvin
|
|
988
|
+
* sign is no `k`.
|
|
989
|
+
*/
|
|
990
|
+
declare const omtCategoryToPoiEnum: (category: string) => PoiCategory | null;
|
|
991
|
+
/**
|
|
992
|
+
* PoiCategoryStyle is the glyph name and feature colour one POI category renders with.
|
|
993
|
+
*/
|
|
994
|
+
interface PoiCategoryStyle {
|
|
995
|
+
/** The feature colour, as a CSS hex colour. */
|
|
996
|
+
readonly color: string;
|
|
997
|
+
/** The glyph name the category is drawn with. */
|
|
998
|
+
readonly icon: string;
|
|
999
|
+
}
|
|
1000
|
+
/**
|
|
1001
|
+
* poiCategoryStyles maps every `PoiCategory` to the icon and colour it is drawn in.
|
|
1002
|
+
*
|
|
1003
|
+
* The categories the POI tile overlay also renders mirror the platform's own tile styling
|
|
1004
|
+
* exactly, which is what makes a search-result marker sit on top of the tile-rendered POI
|
|
1005
|
+
* at the zooms where both are visible instead of beside it in a different colour. The
|
|
1006
|
+
* search-only categories (returnable by search, absent from the tile overlay) use
|
|
1007
|
+
* palette-aligned colours and category-appropriate glyphs.
|
|
1008
|
+
*
|
|
1009
|
+
* Exhaustive over the enum with no fallback, so a category added to the API surfaces here
|
|
1010
|
+
* as a compile error rather than an unstyled marker.
|
|
1011
|
+
*
|
|
1012
|
+
* The `icon` values name glyphs, and whether a given set carries one is a property of that
|
|
1013
|
+
* set: see {@link IconProvider}. A provider missing a glyph is a marker to answer with
|
|
1014
|
+
* your own default, not an error.
|
|
1015
|
+
*/
|
|
1016
|
+
declare const poiCategoryStyles: Readonly<Record<PoiCategory, PoiCategoryStyle>>;
|
|
1017
|
+
/**
|
|
1018
|
+
* The eighth of the compass an aspect faces, as `aspectCardinal` names it. Written here rather
|
|
1019
|
+
* than imported, so the readout's declarations name no module of the renderer's chunk.
|
|
1020
|
+
*/
|
|
1021
|
+
type ReadoutCardinal = "E" | "N" | "NE" | "NW" | "S" | "SE" | "SW" | "W";
|
|
1022
|
+
/** The measure a classic overlay's band is written in, by its slug. */
|
|
1023
|
+
type ReadoutMeasure = "distance" | "humidity" | "snowfall" | "speed" | "temperature";
|
|
1024
|
+
/** What the map holds at the point a readout opens on. */
|
|
1025
|
+
interface ReadoutInput {
|
|
1026
|
+
/** The point, `[longitude, latitude]`. */
|
|
1027
|
+
readonly position: readonly [number, number];
|
|
1028
|
+
/** The camera's zoom when the readout opened. */
|
|
1029
|
+
readonly zoom: number;
|
|
1030
|
+
/** The terrain read off the elevation tiles, or `null` where the map holds no reading. */
|
|
1031
|
+
readonly terrain: {
|
|
1032
|
+
readonly elevation: number | null;
|
|
1033
|
+
readonly slope: number | null;
|
|
1034
|
+
readonly aspect: number | null;
|
|
1035
|
+
} | null;
|
|
1036
|
+
/** The topmost point of interest drawn there: its name and the category its tile states. */
|
|
1037
|
+
readonly poi: {
|
|
1038
|
+
readonly name: string;
|
|
1039
|
+
readonly category: string;
|
|
1040
|
+
} | null;
|
|
1041
|
+
/** The topmost zone drawn there, its window's bounds in Unix seconds as its tile states them. */
|
|
1042
|
+
readonly zone: {
|
|
1043
|
+
readonly name: string;
|
|
1044
|
+
readonly description: string;
|
|
1045
|
+
readonly level: string;
|
|
1046
|
+
readonly startAt: number | null;
|
|
1047
|
+
readonly endAt: number | null;
|
|
1048
|
+
} | null;
|
|
1049
|
+
/** The classic overlay the map draws: its slug, its name, and whether its tiles are vector. */
|
|
1050
|
+
readonly overlay: {
|
|
1051
|
+
readonly slug: string;
|
|
1052
|
+
readonly name: string;
|
|
1053
|
+
readonly vector: boolean;
|
|
1054
|
+
} | null;
|
|
1055
|
+
/** The band of the first of the overlay's features at the point stating one. */
|
|
1056
|
+
readonly band: {
|
|
1057
|
+
readonly min: number | null;
|
|
1058
|
+
readonly max: number | null;
|
|
1059
|
+
} | null;
|
|
1060
|
+
/** The moment the map shows, in epoch milliseconds, or `null`. */
|
|
1061
|
+
readonly instant: number | null;
|
|
1062
|
+
}
|
|
1063
|
+
/** A terrain reading of the readout. */
|
|
1064
|
+
type ReadoutReading = {
|
|
1065
|
+
readonly reading: "altitude";
|
|
1066
|
+
readonly value: number;
|
|
1067
|
+
readonly word: "readout.altitude";
|
|
1068
|
+
} | {
|
|
1069
|
+
readonly reading: "slope";
|
|
1070
|
+
readonly value: number;
|
|
1071
|
+
readonly color: string;
|
|
1072
|
+
readonly word: "readout.slope";
|
|
1073
|
+
} | {
|
|
1074
|
+
readonly reading: "aspect";
|
|
1075
|
+
readonly value: number;
|
|
1076
|
+
readonly cardinal: ReadoutCardinal | null;
|
|
1077
|
+
readonly cardinalWord: `readout.aspects.${ReadoutCardinal}` | null;
|
|
1078
|
+
readonly word: "readout.aspect";
|
|
1079
|
+
};
|
|
1080
|
+
/** A row of the readout, in the order the readout states them. */
|
|
1081
|
+
type ReadoutRow = {
|
|
1082
|
+
readonly row: "poi";
|
|
1083
|
+
readonly name: string | null;
|
|
1084
|
+
readonly category: DataSchema.PoiCategory | null;
|
|
1085
|
+
readonly label: string;
|
|
1086
|
+
} | {
|
|
1087
|
+
readonly row: "band";
|
|
1088
|
+
readonly overlay: string;
|
|
1089
|
+
readonly measure: ReadoutMeasure;
|
|
1090
|
+
readonly pace: "per-time" | null;
|
|
1091
|
+
readonly values: readonly number[];
|
|
1092
|
+
readonly word: "readout.overlayRange" | null;
|
|
1093
|
+
readonly time: {
|
|
1094
|
+
readonly moment: number;
|
|
1095
|
+
readonly word: "readout.overlayTime";
|
|
1096
|
+
} | null;
|
|
1097
|
+
} | {
|
|
1098
|
+
readonly row: "terrain";
|
|
1099
|
+
readonly readings: readonly ReadoutReading[];
|
|
1100
|
+
} | {
|
|
1101
|
+
readonly row: "instant";
|
|
1102
|
+
readonly moment: number;
|
|
1103
|
+
readonly word: "readout.overlayTime";
|
|
1104
|
+
} | {
|
|
1105
|
+
readonly row: "coordinates";
|
|
1106
|
+
readonly text: string;
|
|
1107
|
+
readonly copy: string;
|
|
1108
|
+
readonly word: "readout.coordinates";
|
|
1109
|
+
} | {
|
|
1110
|
+
readonly row: "zoom-in";
|
|
1111
|
+
readonly word: "readout.zoomInForDetails";
|
|
1112
|
+
} | {
|
|
1113
|
+
readonly row: "zone";
|
|
1114
|
+
readonly name: string | null;
|
|
1115
|
+
readonly description: string | null;
|
|
1116
|
+
readonly level: string;
|
|
1117
|
+
readonly levelWord: `readout.zoneLevels.${RestSchema.ZoneLevel}` | null;
|
|
1118
|
+
readonly color: string;
|
|
1119
|
+
readonly window: {
|
|
1120
|
+
readonly start: number | null;
|
|
1121
|
+
readonly end: number | null;
|
|
1122
|
+
readonly word: "readout.zoneWindowFrom" | "readout.zoneWindowRange" | "readout.zoneWindowUntil";
|
|
1123
|
+
} | null;
|
|
1124
|
+
readonly word: "readout.zone";
|
|
1125
|
+
};
|
|
1126
|
+
/**
|
|
1127
|
+
* The word a category is read as: the resolver's, else its English title. Answered by the host,
|
|
1128
|
+
* as a search result words its category.
|
|
1129
|
+
*/
|
|
1130
|
+
type ReadoutCategoryLabel = (category: DataSchema.PoiCategory) => string | null | undefined;
|
|
1131
|
+
/**
|
|
1132
|
+
* readoutRows answers what a map's readout states at a point, each row only where the map holds
|
|
1133
|
+
* it, in this order: at the detail zoom, 13 and above, the point of interest; at any zoom, the
|
|
1134
|
+
* band the classic overlay draws, for a vector overlay the readout's table names; at the detail
|
|
1135
|
+
* zoom, the terrain's altitude, slope and aspect; the moment alone, for a vector overlay whose band
|
|
1136
|
+
* is not stated; the coordinates, always; below the detail zoom, an invitation to zoom in; and at
|
|
1137
|
+
* the detail zoom, the zone.
|
|
1138
|
+
*
|
|
1139
|
+
* A row holds no place link, no waypoint action and no street-level view: those are the editor's
|
|
1140
|
+
* and the embed page's own.
|
|
1141
|
+
*
|
|
1142
|
+
* @param input What the map holds at the point.
|
|
1143
|
+
* @param categoryLabel The reader's word for a point of interest's category; without it, or for a
|
|
1144
|
+
* category it has no word for, the category's English title.
|
|
1145
|
+
* @returns The rows, in order.
|
|
1146
|
+
*/
|
|
1147
|
+
declare const readoutRows: (input: ReadoutInput, categoryLabel?: ReadoutCategoryLabel) => readonly ReadoutRow[];
|
|
1148
|
+
/**
|
|
1149
|
+
* STREETVIEW_MIN_ZOOM is the lowest zoom a Street View panorama is aimed from.
|
|
1150
|
+
*
|
|
1151
|
+
* Below it the coverage raster `MountayaMap.setStreetviewCoverage` draws is too coarse to tell a
|
|
1152
|
+
* road that holds imagery from the one beside it, so a pegman control is inert there, and a
|
|
1153
|
+
* surface that offers anything at a precise point of the map (a panorama, a place's details)
|
|
1154
|
+
* offers it from this zoom up.
|
|
1155
|
+
*
|
|
1156
|
+
* @example
|
|
1157
|
+
* ```ts
|
|
1158
|
+
* import { STREETVIEW_MIN_ZOOM } from "@mountaya/elements/layers";
|
|
1159
|
+
*
|
|
1160
|
+
* const aimable = (zoom: number): boolean => zoom >= STREETVIEW_MIN_ZOOM;
|
|
1161
|
+
* ```
|
|
1162
|
+
*/
|
|
1163
|
+
declare const STREETVIEW_MIN_ZOOM = 13;
|
|
1164
|
+
/** TimestampedSource is one tile source, and the tile addresses that ask it for an instant. */
|
|
1165
|
+
interface TimestampedSource {
|
|
1166
|
+
/** The source's id in the layers catalogue, which a map draws it under. */
|
|
1167
|
+
readonly sourceId: string;
|
|
1168
|
+
/** The source's tile address templates, each carrying the instant as `timestamp`. */
|
|
1169
|
+
readonly tiles: string[];
|
|
1170
|
+
}
|
|
1171
|
+
/**
|
|
1172
|
+
* timestampedSources answers the tile sources a map asks again for an instant: those of the
|
|
1173
|
+
* selected classic overlay, where the catalogue says the server resolves its time
|
|
1174
|
+
* (`capabilities.server.timestamp`), each with tile addresses that carry the instant as their
|
|
1175
|
+
* `timestamp` parameter, in UTC to the millisecond.
|
|
1176
|
+
*
|
|
1177
|
+
* The overlay is looked up among the catalogue's classic categories alone, every category but the
|
|
1178
|
+
* one keyed `enrichment`: an enrichment is never stamped. None is answered with no overlay
|
|
1179
|
+
* selected, for a slug no classic category holds, for an overlay the server does not stamp, and
|
|
1180
|
+
* for an `instant` that names no moment (an Invalid Date), which has no spelling to stamp an
|
|
1181
|
+
* address with.
|
|
1182
|
+
*
|
|
1183
|
+
* Each address keeps every other part as written: an existing `timestamp` is replaced where it
|
|
1184
|
+
* stands, a repeated one and every empty pair are dropped, and an address with no scheme is kept
|
|
1185
|
+
* as it is. A caller swaps each source's tiles in place, so the overlay asks again with no remove
|
|
1186
|
+
* and add.
|
|
1187
|
+
*
|
|
1188
|
+
* @param catalogue The layers catalogue.
|
|
1189
|
+
* @param overlay The slug of the classic overlay a layers selection holds, or null.
|
|
1190
|
+
* @param instant The instant to ask for, as `overlayInstant` answers it.
|
|
1191
|
+
*
|
|
1192
|
+
* @example
|
|
1193
|
+
* ```ts
|
|
1194
|
+
* import { timestampedSources } from "@mountaya/elements/layers";
|
|
1195
|
+
* import type { RestSchema } from "@mountaya/client";
|
|
1196
|
+
*
|
|
1197
|
+
* declare const catalogue: RestSchema.Layers;
|
|
1198
|
+
*
|
|
1199
|
+
* const sources = timestampedSources(catalogue, "snow-depth", new Date("2026-03-14T09:00:00Z"));
|
|
1200
|
+
* ```
|
|
1201
|
+
*/
|
|
1202
|
+
declare const timestampedSources: (catalogue: Pick<RestSchema.Layers, "overlays">, overlay: string | null, instant: Date) => TimestampedSource[];
|
|
1203
|
+
/**
|
|
1204
|
+
* TIME_WINDOW_PAST_HOURS is how far before the clock's reading a time slider's track reaches, in
|
|
1205
|
+
* hours.
|
|
1206
|
+
*
|
|
1207
|
+
* The Tile API draws an overlay it stamps for an instant from three days back. The track stops an
|
|
1208
|
+
* hour short of that on purpose: a request leaves at one instant and is checked against the
|
|
1209
|
+
* server's clock at a later one, so an instant a full 72 hours back would already be past the
|
|
1210
|
+
* limit when it arrives.
|
|
1211
|
+
*/
|
|
1212
|
+
declare const TIME_WINDOW_PAST_HOURS = 71;
|
|
1213
|
+
/**
|
|
1214
|
+
* TIME_WINDOW_FUTURE_HOURS is how far after the clock's reading a time slider's track reaches, in
|
|
1215
|
+
* hours: the six days ahead the Tile API draws a stamped overlay for.
|
|
1216
|
+
*/
|
|
1217
|
+
declare const TIME_WINDOW_FUTURE_HOURS = 144;
|
|
1218
|
+
/**
|
|
1219
|
+
* TimeSliderWindow is the track of a time slider, one stop an hour, laid out around one clock
|
|
1220
|
+
* reading.
|
|
1221
|
+
*
|
|
1222
|
+
* A stop is a whole number of hours from the track's start: stop 0 is the earliest instant the
|
|
1223
|
+
* time-aware overlays hold, {@link TimeSliderWindow.nowValue} the stop of the clock's reading and
|
|
1224
|
+
* {@link TimeSliderWindow.maxValue} the last.
|
|
1225
|
+
*
|
|
1226
|
+
* A track has an instant at every stop or at none, and {@link TimeSliderWindow.startMs} says
|
|
1227
|
+
* which: {@link timeSliderWindow} states when a track has none.
|
|
1228
|
+
*/
|
|
1229
|
+
interface TimeSliderWindow {
|
|
1230
|
+
/**
|
|
1231
|
+
* dateAt answers the instant a stop stands for: the track's start plus the stop's hours.
|
|
1232
|
+
*
|
|
1233
|
+
* It answers null on a track of no instant, and for a value that stands for none: one that is
|
|
1234
|
+
* not a number, or one so far off the track that a `Date` cannot hold its instant. What it
|
|
1235
|
+
* answers is therefore always safe to format and to send.
|
|
1236
|
+
*/
|
|
1237
|
+
readonly dateAt: (value: number) => Date | null;
|
|
1238
|
+
/** The track's last stop: its whole length, in hours. */
|
|
1239
|
+
readonly maxValue: number;
|
|
1240
|
+
/** The stop that stands for the clock's reading. */
|
|
1241
|
+
readonly nowValue: number;
|
|
1242
|
+
/**
|
|
1243
|
+
* The instant stop 0 stands for, in epoch milliseconds, or null on a track of no instant.
|
|
1244
|
+
*/
|
|
1245
|
+
readonly startMs: number | null;
|
|
1246
|
+
/**
|
|
1247
|
+
* valueAt answers the stop an instant is placed at: its nearest stop, a half hour going to the
|
|
1248
|
+
* later one, and the nearest end for an instant off the track, so a pin the track has moved
|
|
1249
|
+
* past still places a thumb.
|
|
1250
|
+
*
|
|
1251
|
+
* No pin is placed at {@link TimeSliderWindow.nowValue}, and so is an Invalid Date, which names
|
|
1252
|
+
* no instant, and every instant on a track of no instant.
|
|
1253
|
+
*/
|
|
1254
|
+
readonly valueAt: (instant: Date | null) => number;
|
|
1255
|
+
}
|
|
1256
|
+
/**
|
|
1257
|
+
* timeSliderWindow lays a time slider's track out around `nowMs`, the clock's reading in epoch
|
|
1258
|
+
* milliseconds, at one stop an hour, from {@link TIME_WINDOW_PAST_HOURS} before it to
|
|
1259
|
+
* {@link TIME_WINDOW_FUTURE_HOURS} after it.
|
|
1260
|
+
*
|
|
1261
|
+
* It reads no clock: the caller hands over the reading, so a host that pins or replays time moves
|
|
1262
|
+
* the track with it.
|
|
1263
|
+
*
|
|
1264
|
+
* **A reading that is no instant.** A clock that reads `NaN`, an infinite number, or one so far
|
|
1265
|
+
* out that an end of the track falls past the instants a `Date` holds (8.64e15 milliseconds from
|
|
1266
|
+
* the epoch) lays out a track of no instant. Its stops are hours and its length is no clock's, so
|
|
1267
|
+
* {@link TimeSliderWindow.maxValue} and {@link TimeSliderWindow.nowValue} are what they always
|
|
1268
|
+
* are; {@link TimeSliderWindow.startMs} is null, {@link TimeSliderWindow.dateAt} answers null for
|
|
1269
|
+
* every stop and {@link TimeSliderWindow.valueAt} places every instant at `nowValue`. A slider
|
|
1270
|
+
* reads that as a track with nothing to place and nothing to pin.
|
|
1271
|
+
*
|
|
1272
|
+
* @example
|
|
1273
|
+
* ```ts
|
|
1274
|
+
* import { timeSliderWindow } from "@mountaya/elements/layers";
|
|
1275
|
+
*
|
|
1276
|
+
* declare const pinned: Date | null;
|
|
1277
|
+
*
|
|
1278
|
+
* const track = timeSliderWindow(Date.now());
|
|
1279
|
+
* const thumb = track.valueAt(pinned);
|
|
1280
|
+
* const sixHoursLater = track.dateAt(thumb + 6);
|
|
1281
|
+
* ```
|
|
1282
|
+
*/
|
|
1283
|
+
declare const timeSliderWindow: (nowMs: number) => TimeSliderWindow;
|
|
1284
|
+
/** The words of the elements' `layers` section a tick of a time slider is labelled with. */
|
|
1285
|
+
type TickWord = "timeMinus2d" | "timeNow" | "timePlus2d" | "timePlus5d";
|
|
1286
|
+
/** TimeSliderTick is one tick of a time slider's track. */
|
|
1287
|
+
interface TimeSliderTick {
|
|
1288
|
+
/** The stop the tick stands at. */
|
|
1289
|
+
readonly value: number;
|
|
1290
|
+
/** The word of the elements' `layers` section the tick is labelled with, or null for none. */
|
|
1291
|
+
readonly word: TickWord | null;
|
|
1292
|
+
}
|
|
1293
|
+
/**
|
|
1294
|
+
* timeSliderTicks answers the ticks of a time slider: one at the stop of the clock's reading and
|
|
1295
|
+
* one at every whole day either side of it, as far as the track runs, in the track's order. A
|
|
1296
|
+
* tick of a labelled day carries its word, `timeMinus2d`, `timeNow`, `timePlus2d` or
|
|
1297
|
+
* `timePlus5d`, and every other tick none.
|
|
1298
|
+
*
|
|
1299
|
+
* The ticks are the same for every reading, since the track's stops are hours and its length is
|
|
1300
|
+
* no clock's: a track of no instant ticks as any other.
|
|
1301
|
+
*
|
|
1302
|
+
* @param timeWindow The track, as `timeSliderWindow` lays it out.
|
|
1303
|
+
*
|
|
1304
|
+
* @example
|
|
1305
|
+
* ```ts
|
|
1306
|
+
* import { timeSliderTicks, timeSliderWindow } from "@mountaya/elements/layers";
|
|
1307
|
+
*
|
|
1308
|
+
* const ticks = timeSliderTicks(timeSliderWindow(Date.now()));
|
|
1309
|
+
* ```
|
|
1310
|
+
*/
|
|
1311
|
+
declare const timeSliderTicks: (timeWindow: Pick<TimeSliderWindow, "maxValue" | "nowValue">) => readonly TimeSliderTick[];
|
|
1312
|
+
/**
|
|
1313
|
+
* timeSliderRelease answers what a release of a time slider's thumb on a stop commits: the
|
|
1314
|
+
* instant the stop stands for as the pin, or no pin on the stop of the clock's reading, so every
|
|
1315
|
+
* surface that reads the time follows the clock again rather than holding the moment it read at
|
|
1316
|
+
* the release.
|
|
1317
|
+
*
|
|
1318
|
+
* A track of no instant commits nothing: a stop of it names no time to show.
|
|
1319
|
+
*
|
|
1320
|
+
* @param timeWindow The track, as `timeSliderWindow` lays it out.
|
|
1321
|
+
* @param value The stop the thumb is let go on.
|
|
1322
|
+
* @returns `{ pin }`, the instant to pin or null for none, which a binding hands to the layers
|
|
1323
|
+
* selection's `setInstant`; or null where the release commits nothing.
|
|
1324
|
+
*
|
|
1325
|
+
* @example
|
|
1326
|
+
* ```ts
|
|
1327
|
+
* import { type LayersSelectionEngine, timeSliderRelease, timeSliderWindow } from "@mountaya/elements/layers";
|
|
1328
|
+
*
|
|
1329
|
+
* declare const selection: LayersSelectionEngine;
|
|
1330
|
+
* declare const value: number;
|
|
1331
|
+
*
|
|
1332
|
+
* const released = timeSliderRelease(timeSliderWindow(Date.now()), value);
|
|
1333
|
+
* if (released !== null) {
|
|
1334
|
+
* selection.setInstant(released.pin);
|
|
1335
|
+
* }
|
|
1336
|
+
* ```
|
|
1337
|
+
*/
|
|
1338
|
+
declare const timeSliderRelease: (timeWindow: Pick<TimeSliderWindow, "dateAt" | "nowValue">, value: number) => {
|
|
1339
|
+
readonly pin: Date | null;
|
|
1340
|
+
} | null;
|
|
1341
|
+
/**
|
|
1342
|
+
* TimeSliderReadout is what a time slider's thumb reads at a stop: the instant it stands for, and
|
|
1343
|
+
* its offset from the stop of the clock's reading as a word of the elements' `layers` section with
|
|
1344
|
+
* its count.
|
|
1345
|
+
*
|
|
1346
|
+
* The word is `timeNow`, with no count, at the stop of the clock's reading, and otherwise a counted
|
|
1347
|
+
* word, `timeHoursAhead` or `timeHoursAgo` under a day and `timeDaysAhead` or `timeDaysAgo` from a
|
|
1348
|
+
* day on, with the whole hours or days as its count, never below one.
|
|
1349
|
+
*/
|
|
1350
|
+
type TimeSliderReadout = {
|
|
1351
|
+
/** The instant the stop stands for, or null for a stop of a track of no instant. */
|
|
1352
|
+
readonly instant: Date | null;
|
|
1353
|
+
/** The word the stop of the clock's reading reads. */
|
|
1354
|
+
readonly word: "timeNow";
|
|
1355
|
+
/** No count: the word counts nothing. */
|
|
1356
|
+
readonly count: null;
|
|
1357
|
+
} | {
|
|
1358
|
+
/** The instant the stop stands for, or null for a stop of a track of no instant. */
|
|
1359
|
+
readonly instant: Date | null;
|
|
1360
|
+
/** The counted word the offset reads, ahead of the clock's reading or behind it. */
|
|
1361
|
+
readonly word: "timeDaysAgo" | "timeDaysAhead" | "timeHoursAgo" | "timeHoursAhead";
|
|
1362
|
+
/** The whole hours or days of the offset, never below one. */
|
|
1363
|
+
readonly count: number;
|
|
1364
|
+
};
|
|
1365
|
+
/**
|
|
1366
|
+
* timeSliderReadout answers what a time slider's thumb reads at a stop: the instant the stop
|
|
1367
|
+
* stands for, and its offset from the stop of the clock's reading, in hours.
|
|
1368
|
+
*
|
|
1369
|
+
* No offset reads `timeNow`. An offset under a day reads its whole hours, and one of a day or
|
|
1370
|
+
* more its whole days, truncated toward the clock's reading, so 47 hours ahead reads one day
|
|
1371
|
+
* ahead: a day here is 24 stops, never a calendar day, which is why the words are counted ones
|
|
1372
|
+
* ("in 1 day") and never a platform's relative words ("tomorrow"). A stop of a track of no instant
|
|
1373
|
+
* reads its offset alone.
|
|
1374
|
+
*
|
|
1375
|
+
* A binding writes the tooltip as the instant through the locale services (the reader's weekday,
|
|
1376
|
+
* day, month, hour and minute in the device's time zone), then ` · `, then the offset's word.
|
|
1377
|
+
*
|
|
1378
|
+
* @param timeWindow The track, as `timeSliderWindow` lays it out.
|
|
1379
|
+
* @param value The stop the thumb stands at.
|
|
1380
|
+
*
|
|
1381
|
+
* @example
|
|
1382
|
+
* ```ts
|
|
1383
|
+
* import { timeSliderReadout, timeSliderWindow } from "@mountaya/elements/layers";
|
|
1384
|
+
* import { elementsStrings } from "@mountaya/elements/i18n";
|
|
1385
|
+
*
|
|
1386
|
+
* const readout = timeSliderReadout(timeSliderWindow(Date.now()), 77);
|
|
1387
|
+
* const words = elementsStrings.en.layers;
|
|
1388
|
+
* const said = readout.word === "timeNow" ? words.timeNow : words[readout.word](readout.count);
|
|
1389
|
+
* ```
|
|
1390
|
+
*/
|
|
1391
|
+
declare const timeSliderReadout: (timeWindow: Pick<TimeSliderWindow, "dateAt" | "nowValue">, value: number) => TimeSliderReadout;
|
|
1392
|
+
/**
|
|
1393
|
+
* The source-layer the zone vector tiles emit: `fills` carries the polygon every zone mode
|
|
1394
|
+
* draws. A manifest may style it more than once (an area and its outline), and every one of
|
|
1395
|
+
* those layers names this source-layer.
|
|
1396
|
+
*/
|
|
1397
|
+
declare const ZONE_FILL_SOURCE_LAYER = "fills";
|
|
1398
|
+
/**
|
|
1399
|
+
* zoneLevelColors maps each zone severity level to the hex colour its tile geometry
|
|
1400
|
+
* paints in.
|
|
1401
|
+
*
|
|
1402
|
+
* The platform bakes the same mapping into the tile layer paint, so this is what a live
|
|
1403
|
+
* draft, a legend swatch, or a zone you render yourself must use to match the served
|
|
1404
|
+
* tiles. A divergence paints a persisted zone and an unsaved one of the same level in two
|
|
1405
|
+
* different colours.
|
|
1406
|
+
*
|
|
1407
|
+
* Typed as `Record<ZoneLevel, string>` against the published enum, so a level added to the
|
|
1408
|
+
* contract surfaces here as a compile error rather than a silently missing colour. Note the
|
|
1409
|
+
* resolved level is spelled `resolved`, not `success`.
|
|
1410
|
+
*/
|
|
1411
|
+
declare const zoneLevelColors: Readonly<Record<RestSchema.ZoneLevel, string>>;
|
|
1412
|
+
/**
|
|
1413
|
+
* ZONE_DEFAULT_COLOR is what a data-driven `match` on `level` should coalesce to for a
|
|
1414
|
+
* feature whose level is unset or outside the known set. It is its own constant so the
|
|
1415
|
+
* fallback reads as a deliberate choice rather than a copy of the info hex.
|
|
1416
|
+
*/
|
|
1417
|
+
declare const ZONE_DEFAULT_COLOR: string;
|
|
1418
|
+
/**
|
|
1419
|
+
* PaintedLayers is the part of a tile specification this module reads: every source, and the
|
|
1420
|
+
* zoom window each of its layers declares. A `/v1/tile-layers` overlay and a Tile API specification
|
|
1421
|
+
* both have it, which is why the argument names the shape rather than either type.
|
|
1422
|
+
*/
|
|
1423
|
+
interface PaintedLayers {
|
|
1424
|
+
readonly layers: ReadonlyArray<{
|
|
1425
|
+
readonly zoom_max: number;
|
|
1426
|
+
readonly zoom_min: number;
|
|
1427
|
+
}>;
|
|
1428
|
+
}
|
|
1429
|
+
/**
|
|
1430
|
+
* paintZoomRange is the zoom window a specification PAINTS across, which is its layers' and not
|
|
1431
|
+
* its sources'.
|
|
1432
|
+
*
|
|
1433
|
+
* A source's `zoom_min` and `zoom_max` say where its tiles are served. Past a source's `zoom_max`
|
|
1434
|
+
* the map overzooms the deepest tile it holds, and a layer drawing from that source keeps
|
|
1435
|
+
* painting to its own `zoom_max`: a points-of-interest source served to zoom 15 carries layers
|
|
1436
|
+
* drawn to 22, as terrain served to 14 does. So the window runs from the lowest `zoom_min` to the
|
|
1437
|
+
* highest `zoom_max` across every layer of every source. A source's own `zoom_max` belongs where
|
|
1438
|
+
* the renderer reads it, as that source's `maxzoom`, and it bounds nothing here.
|
|
1439
|
+
*
|
|
1440
|
+
* `null` for sources that hold no layer: nothing paints at any zoom, so a camera eased into the
|
|
1441
|
+
* window would have nowhere to go.
|
|
1442
|
+
*/
|
|
1443
|
+
declare const paintZoomRange: (sources: readonly PaintedLayers[]) => {
|
|
1444
|
+
readonly maxzoom: number;
|
|
1445
|
+
readonly minzoom: number;
|
|
1446
|
+
} | null;
|
|
1447
|
+
/**
|
|
1448
|
+
* zoomIntoRange answers the zoom a camera moves to so that a window of zooms paints, or null where
|
|
1449
|
+
* it stays where it is.
|
|
1450
|
+
*
|
|
1451
|
+
* A layer outside its zoom window paints nothing and reports nothing, so a camera below the window
|
|
1452
|
+
* moves up to its floor and one above it down to its ceiling: the nearer edge, the shortest move
|
|
1453
|
+
* that shows the content. A camera inside the window, its edges included, stays, and so does any
|
|
1454
|
+
* camera before a window with an end that is no finite number or a floor above its ceiling, which
|
|
1455
|
+
* no move satisfies.
|
|
1456
|
+
*
|
|
1457
|
+
* @param zoom The camera's zoom.
|
|
1458
|
+
* @param window The zoom window a specification paints across ({@link paintZoomRange}), or one a
|
|
1459
|
+
* layer states.
|
|
1460
|
+
* @returns The zoom to move to, or null to stay.
|
|
1461
|
+
*
|
|
1462
|
+
* @example
|
|
1463
|
+
* ```ts
|
|
1464
|
+
* import { zoomIntoRange } from "@mountaya/elements/layers";
|
|
1465
|
+
*
|
|
1466
|
+
* zoomIntoRange(6, { maxzoom: 14, minzoom: 10 }); // 10
|
|
1467
|
+
* zoomIntoRange(12, { maxzoom: 14, minzoom: 10 }); // null
|
|
1468
|
+
* ```
|
|
1469
|
+
*/
|
|
1470
|
+
declare const zoomIntoRange: (zoom: number, window: {
|
|
1471
|
+
readonly maxzoom: number;
|
|
1472
|
+
readonly minzoom: number;
|
|
1473
|
+
}) => number | null;
|
|
1474
|
+
export { ITINERARY_POINT_SOURCE_LAYER as $, PoiPanelRowsInput as A, SUGGESTION_ALTERNATIVE_COLOR as At, LayersPanelRow as B, LayersSelectionEngineOptions as Bt, ReadoutRow as C, MATRIX_LINE_MIN_WIDTH as Ct, poiCategoryStyles as D, RESULT_POINT_RADIUS as Dt, omtCategoryToPoiEnum as E, POI_RESULT_POINT_COLOR as Et, overlayInstant as F, matrixLineWidth as Ft, ITINERARY_CASING_LAYER_SUFFIX as G, layersPanelPress as H, LayersSelectionTarget as Ht, LayersPanelCategory as I, ReadoutEngine as It, ITINERARY_DASHED_OPACITY as J, ITINERARY_CASING_OPACITY as K, LayersPanelChoice as L, ReadoutEngineOptions as Lt, poiPanelRows as M, SUGGESTION_ALTERNATIVE_OPACITY as Mt, OverlayKind as N, SUGGESTION_CHOSEN_COLOR as Nt, PoiPanelRow as O, RESULT_POINT_STROKE_COLOR as Ot, findOverlay as P, isochroneColor as Pt, ITINERARY_LINE_WIDTH_STOPS as Q, LayersPanelInput as R, ReadoutOpen as Rt, ReadoutReading as S, MATRIX_LINE_MAX_WIDTH as St, PoiCategoryStyle as T, PLACE_POINT_COLOR as Tt, layersPanelSections as U, LayersPanelSection as V, LayersSelectionSnapshot as Vt, ITINERARY_CASING_COLOR as W, ITINERARY_LINE_DASHARRAY as X, ITINERARY_ENDPOINT_ICONS as Y, ITINERARY_LINE_SOURCE_LAYER as Z, timestampedSources as _, ISOCHRONE_FILL_OPACITY as _t, ZONE_FILL_SOURCE_LAYER as a, hoveredItinerary as at, ReadoutInput as b, ISOCHRONE_RAMP as bt, TimeSliderTick as c, isochronesToGeoJson as ct, timeSliderTicks as d, poisToGeoJson as dt, ITINERARY_RESTRICTION_SOURCE_LAYER as et, TIME_WINDOW_FUTURE_HOURS as f, suggestionsToGeoJson as ft, TimestampedSource as g, DIRECTIONS_LINE_COLOR as gt, timeSliderWindow as h, isEnrichmentCategory as ht, ZONE_DEFAULT_COLOR as i, HoveredItinerary as it, poiPanelNoteZoom as j, SUGGESTION_ALTERNATIVE_DASHARRAY as jt, PoiPanelRows as k, RESULT_POINT_STROKE_WIDTH as kt, timeSliderReadout as l, matrixToGeoJson as lt, TimeSliderWindow as m, POIS_OVERLAY_SLUG as mt, paintZoomRange as n, itineraryLineLayout as nt, zoneLevelColors as o, analysisProps as ot, TIME_WINDOW_PAST_HOURS as p, ENRICHMENT_CATEGORY_SLUG as pt, ITINERARY_CASING_WIDTH_STOPS as q, zoomIntoRange as r, roadAccessIconLayerIdOf as rt, TimeSliderReadout as s, directionsToGeoJson as st, PaintedLayers as t, isItineraryCasingLayer as tt, timeSliderRelease as u, placesToGeoJson as ut, STREETVIEW_MIN_ZOOM as v, ISOCHRONE_LINE_COLOR as vt, readoutRows as w, MATRIX_LINE_OPACITY as wt, ReadoutMeasure as x, MATRIX_LINE_COLOR as xt, ReadoutCategoryLabel as y, ISOCHRONE_LINE_WIDTH as yt, LayersPanelPress as z, LayersSelectionEngine as zt };
|
|
1475
|
+
//# sourceMappingURL=chunk-B0YROiZh.d.cts.map
|