@btndprojects/loam-ui-native 0.2.1 → 0.3.1
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/dist/accordion/index.js +4 -2
- package/dist/adaptive/index.js +12 -2
- package/dist/address-block/index.js +23 -0
- package/dist/alert/index.js +5 -2
- package/dist/analyzer/index.js +13 -5
- package/dist/announcement/index.js +15 -5
- package/dist/appearance-picker/index.js +15 -0
- package/dist/audio-player/index.js +26 -2
- package/dist/avatar/index.js +2 -2
- package/dist/avatar-group/index.js +5 -3
- package/dist/badge/index.js +6 -3
- package/dist/banner/index.js +3 -2
- package/dist/board/index.js +13 -6
- package/dist/button/index.js +6 -3
- package/dist/camera-permission/index.js +19 -11
- package/dist/capture-result/index.js +26 -16
- package/dist/card/index.js +7 -3
- package/dist/card-form/index.js +15 -9
- package/dist/carousel/index.js +3 -1
- package/dist/chart/index.js +15 -5
- package/dist/charts/index.js +18 -5
- package/dist/chat/index.js +35 -10
- package/dist/checkbox/index.js +6 -4
- package/dist/checklist/index.js +16 -7
- package/dist/checkout/index.js +25 -12
- package/dist/chip/index.js +7 -4
- package/dist/chunk-2BZD3NAP.js +1110 -0
- package/dist/chunk-2YKVID2V.js +35 -0
- package/dist/{chunk-H7DWSL4O.js → chunk-36DA3IPO.js} +115 -27
- package/dist/chunk-3A56MIAN.js +599 -0
- package/dist/{chunk-AEB7KCHQ.js → chunk-3SCKCWF5.js} +39 -28
- package/dist/chunk-3TZNDHKO.js +187 -0
- package/dist/chunk-43K3BLXV.js +9 -0
- package/dist/chunk-46ZJIQ2Z.js +208 -0
- package/dist/{chunk-PMMTGBBS.js → chunk-4CZMQDQL.js} +75 -22
- package/dist/chunk-4QCR3K2J.js +1 -0
- package/dist/{chunk-E2E3I5W2.js → chunk-5DTKORLI.js} +54 -45
- package/dist/{chunk-5VFZRGVD.js → chunk-5J4WFXFA.js} +32 -15
- package/dist/{chunk-JBMLWFSJ.js → chunk-5KJ7TEQ6.js} +83 -48
- package/dist/chunk-5NU33TXK.js +529 -0
- package/dist/chunk-6KSUS7DF.js +690 -0
- package/dist/{chunk-3WEZCGHX.js → chunk-6RV6UW2J.js} +140 -56
- package/dist/chunk-6RZM7RP2.js +520 -0
- package/dist/{chunk-JJLPBRVZ.js → chunk-75BDCC7K.js} +2 -0
- package/dist/{chunk-U5NLHYV6.js → chunk-7CGJBQUA.js} +333 -22
- package/dist/{chunk-I4FHVKEC.js → chunk-7IVF6JLJ.js} +16 -5
- package/dist/chunk-7IWCGXYA.js +143 -0
- package/dist/chunk-7LM4ASFH.js +172 -0
- package/dist/chunk-7MCEJFWV.js +341 -0
- package/dist/{chunk-2SY63FCH.js → chunk-7NGMUVNU.js} +66 -30
- package/dist/chunk-7PBSIXT7.js +355 -0
- package/dist/chunk-7QOYGENL.js +443 -0
- package/dist/{chunk-TDMG26JI.js → chunk-A7SWYDE5.js} +40 -9
- package/dist/chunk-ADHPJALR.js +3051 -0
- package/dist/{chunk-ZLTO5VQI.js → chunk-ALJYZLNQ.js} +131 -61
- package/dist/{chunk-GDKVKNR2.js → chunk-AQ5FIG74.js} +110 -30
- package/dist/chunk-B2MMZZQB.js +426 -0
- package/dist/{chunk-QYPE5JX3.js → chunk-B7JZ3N5G.js} +142 -105
- package/dist/{chunk-QHTVYA65.js → chunk-BL37SW6G.js} +388 -102
- package/dist/chunk-BTRMA7GC.js +21 -0
- package/dist/{chunk-FUMHAAF3.js → chunk-C7IUWIUZ.js} +243 -92
- package/dist/chunk-CA3DUVYD.js +10 -0
- package/dist/{chunk-FYWNRX4F.js → chunk-CBCJSO2B.js} +143 -13
- package/dist/chunk-CHPX4MFI.js +239 -0
- package/dist/chunk-CLGAMIOT.js +648 -0
- package/dist/chunk-CUE7VML6.js +1141 -0
- package/dist/{chunk-D5N5QWI7.js → chunk-CVU6S2E5.js} +497 -235
- package/dist/{chunk-U23FYWME.js → chunk-CXPQMA6Z.js} +101 -34
- package/dist/{chunk-36EC2T6P.js → chunk-D2LN4I7I.js} +1 -1
- package/dist/{chunk-TLCIR6RG.js → chunk-D34LNBO5.js} +411 -155
- package/dist/{chunk-FV6HMP7W.js → chunk-D4BCQICM.js} +207 -65
- package/dist/chunk-EABKIIA4.js +1 -0
- package/dist/chunk-EICSYRAG.js +341 -0
- package/dist/chunk-EMWAJMAS.js +83 -0
- package/dist/chunk-EOLZWRV6.js +149 -0
- package/dist/chunk-EOQVTGB6.js +350 -0
- package/dist/{chunk-ZVATDZOM.js → chunk-ESGUHNB2.js} +106 -28
- package/dist/{chunk-46MMSDGL.js → chunk-F2KNBPKY.js} +104 -73
- package/dist/{chunk-KQZ3GLHR.js → chunk-G7H3NX3G.js} +40 -17
- package/dist/{chunk-3QMEOFW5.js → chunk-GM7YIPB7.js} +421 -207
- package/dist/{chunk-QHAITQIF.js → chunk-GVQQG435.js} +256 -86
- package/dist/chunk-HE43OMEL.js +1056 -0
- package/dist/{chunk-XIDTBCBA.js → chunk-HHOMFQ7R.js} +1049 -207
- package/dist/chunk-HNAKS4Z3.js +207 -0
- package/dist/chunk-HP6ST2OW.js +352 -0
- package/dist/chunk-HW3OWDTU.js +1 -0
- package/dist/{chunk-QP3KMOVF.js → chunk-HZDB44K4.js} +24 -14
- package/dist/chunk-I6CUP2LW.js +1155 -0
- package/dist/chunk-ICV4Y2WY.js +27 -0
- package/dist/chunk-IHSIENOE.js +3950 -0
- package/dist/{chunk-T5LTPKX6.js → chunk-IMMALLRU.js} +53 -25
- package/dist/{chunk-C4GTDLRC.js → chunk-JA6TK7H2.js} +154 -67
- package/dist/{chunk-EVOIGUBI.js → chunk-JAVZ5JPV.js} +43 -13
- package/dist/{chunk-CPTOADB2.js → chunk-JCMTP3E4.js} +527 -201
- package/dist/{chunk-OJQUBQWA.js → chunk-JCXFFK64.js} +73 -16
- package/dist/{chunk-V2OEB75Z.js → chunk-JWCVBFDU.js} +75 -35
- package/dist/chunk-JXRTD5RI.js +414 -0
- package/dist/chunk-JYIUZUIQ.js +1567 -0
- package/dist/chunk-K3TK3GIV.js +219 -0
- package/dist/chunk-KEVZIHM2.js +1511 -0
- package/dist/{chunk-VAOAKWUK.js → chunk-KHZDNQQD.js} +42 -8
- package/dist/chunk-KL4GDV4V.js +131 -0
- package/dist/{chunk-Q6NKEPRE.js → chunk-KNILMM4H.js} +73 -28
- package/dist/chunk-KRBUZV45.js +25 -0
- package/dist/{chunk-7BUIKDD6.js → chunk-KXLDK6HB.js} +91 -30
- package/dist/chunk-KZ3X7TSL.js +196 -0
- package/dist/{chunk-5UTRIXQ6.js → chunk-L2WMOA2V.js} +187 -43
- package/dist/chunk-L4D5LHCH.js +109 -0
- package/dist/{chunk-W63AJTM7.js → chunk-LAUJPLDB.js} +236 -71
- package/dist/{chunk-TN2ZNJUI.js → chunk-LGNTP5XA.js} +47 -13
- package/dist/chunk-LUZFCCSD.js +271 -0
- package/dist/{chunk-XTORZWRF.js → chunk-LXJCP4PL.js} +111 -30
- package/dist/chunk-MCOZJWPU.js +731 -0
- package/dist/{chunk-SATMR6SG.js → chunk-MG4SKWLL.js} +780 -142
- package/dist/{chunk-JUYWSSKW.js → chunk-MPEPTSER.js} +95 -16
- package/dist/chunk-MWPJ4YGP.js +1 -0
- package/dist/{chunk-LUMVGO2K.js → chunk-N7AX4OA4.js} +80 -29
- package/dist/chunk-NHSLM6SE.js +523 -0
- package/dist/{chunk-IT6FUXXG.js → chunk-NNJLVA7M.js} +43 -11
- package/dist/{chunk-TQVAIKFD.js → chunk-NZG75DGA.js} +102 -62
- package/dist/chunk-O76QXRBV.js +431 -0
- package/dist/chunk-OANH27AK.js +223 -0
- package/dist/chunk-OCHPK5YV.js +609 -0
- package/dist/chunk-OMHVEVX4.js +436 -0
- package/dist/{chunk-SWS5JQIF.js → chunk-ONKQUJWD.js} +187 -60
- package/dist/chunk-OVTK7A6T.js +615 -0
- package/dist/{chunk-UXGIW7OK.js → chunk-PCEFCOLN.js} +5 -1
- package/dist/{chunk-QIKT7LIB.js → chunk-PFLNFIVB.js} +91 -23
- package/dist/chunk-PHSZY37H.js +300 -0
- package/dist/chunk-PJLTKDVY.js +18 -0
- package/dist/{chunk-SHHY5OMK.js → chunk-PK7BN3MI.js} +83 -15
- package/dist/{chunk-YXOAPXMU.js → chunk-PWFRDRGS.js} +101 -14
- package/dist/{chunk-TY4MTKQJ.js → chunk-PYPMD46W.js} +332 -66
- package/dist/chunk-Q6CCHDI7.js +331 -0
- package/dist/chunk-QFA5WS2A.js +750 -0
- package/dist/chunk-QJMMM4RC.js +124 -0
- package/dist/chunk-QYWEVAM6.js +407 -0
- package/dist/chunk-R5T4VZ7Z.js +126 -0
- package/dist/chunk-R77HFLZD.js +1 -0
- package/dist/{chunk-LMPHCVJJ.js → chunk-RAESDNU5.js} +162 -68
- package/dist/chunk-RBYQUXNL.js +1 -0
- package/dist/chunk-RCM3DT5E.js +1 -0
- package/dist/chunk-RGNY56L7.js +282 -0
- package/dist/chunk-RIK6UX2K.js +344 -0
- package/dist/{chunk-5LAAAXFP.js → chunk-RJA3RXO3.js} +63 -54
- package/dist/chunk-RJYRJ3LD.js +1 -0
- package/dist/chunk-RMA3NOY4.js +599 -0
- package/dist/{chunk-VDPK5CY4.js → chunk-RSWKKAHK.js} +143 -61
- package/dist/{chunk-B7N4ASYE.js → chunk-RVOIIX3V.js} +17 -45
- package/dist/chunk-SA2RRBGT.js +1077 -0
- package/dist/{chunk-7OVVSVEZ.js → chunk-SG3J4R45.js} +440 -169
- package/dist/chunk-SPUK7JD4.js +238 -0
- package/dist/chunk-SWXV2K5N.js +434 -0
- package/dist/chunk-SYJEPXP6.js +1303 -0
- package/dist/{chunk-LKFC4CS7.js → chunk-SZLI34TA.js} +18 -9
- package/dist/{chunk-NBEF4EPJ.js → chunk-T77WJA74.js} +131 -16
- package/dist/chunk-TDWWVJA4.js +630 -0
- package/dist/chunk-TFHI5XDR.js +610 -0
- package/dist/chunk-TH4PW2WU.js +17 -0
- package/dist/chunk-TTQ24HQX.js +12 -0
- package/dist/chunk-TUACVJNG.js +12 -0
- package/dist/{chunk-F5B3UINI.js → chunk-TUL5RUIA.js} +171 -62
- package/dist/{chunk-C6APNDVA.js → chunk-TYOSA7JG.js} +63 -34
- package/dist/chunk-TYQTMMEV.js +1 -0
- package/dist/{chunk-DW3L54DQ.js → chunk-TZO6YDS7.js} +53 -12
- package/dist/{chunk-67IZZ2MJ.js → chunk-U3ETF22F.js} +75 -30
- package/dist/{chunk-EDCBJV7J.js → chunk-U6BYHD2N.js} +87 -31
- package/dist/{chunk-ENP3BMZU.js → chunk-UF6EJXPQ.js} +16 -1
- package/dist/{chunk-IPUNJMAQ.js → chunk-UNNQIPGK.js} +304 -68
- package/dist/chunk-UQVO6AJV.js +171 -0
- package/dist/{chunk-FZGAAOKS.js → chunk-VFDQAAIW.js} +138 -32
- package/dist/chunk-VIUE3VQT.js +1 -0
- package/dist/{chunk-5RENVKBQ.js → chunk-VJLSSSGC.js} +126 -30
- package/dist/chunk-VLMT6KYT.js +350 -0
- package/dist/chunk-VMHGBUGS.js +35 -0
- package/dist/{chunk-4IZXHVFJ.js → chunk-VQKPBYW6.js} +228 -172
- package/dist/{chunk-G6UESEVN.js → chunk-VSSTWLC5.js} +49 -11
- package/dist/{chunk-TRGFFU6A.js → chunk-VZYYZRPN.js} +866 -330
- package/dist/{chunk-JLC6PM5S.js → chunk-WAIJCD2V.js} +128 -54
- package/dist/chunk-WFMQ3WKM.js +378 -0
- package/dist/chunk-WJ2KDRMY.js +66 -0
- package/dist/chunk-WKFZJO54.js +437 -0
- package/dist/{chunk-QEYFDRHR.js → chunk-WVVD3XOV.js} +146 -84
- package/dist/chunk-XAIWMSLB.js +1 -0
- package/dist/chunk-XBXUBBJZ.js +98 -0
- package/dist/chunk-XCU7MYBJ.js +1 -0
- package/dist/chunk-XHE4PGCI.js +717 -0
- package/dist/chunk-XRSJ32M3.js +331 -0
- package/dist/chunk-XTCVOEAW.js +1 -0
- package/dist/chunk-XWGXVQF6.js +58 -0
- package/dist/{chunk-MKSNFG7H.js → chunk-Y3XKKO5K.js} +191 -109
- package/dist/chunk-Y4QNMBLO.js +533 -0
- package/dist/chunk-Y5H4CTKO.js +1 -0
- package/dist/chunk-YBQIN75A.js +403 -0
- package/dist/{chunk-PNF3NKB5.js → chunk-YJ5PXOX3.js} +28 -11
- package/dist/{chunk-M656FYNH.js → chunk-YLRSRUPS.js} +63 -49
- package/dist/chunk-YM6MPJ4A.js +1 -0
- package/dist/chunk-YV7KZENV.js +200 -0
- package/dist/chunk-Z7I4ZSO6.js +316 -0
- package/dist/{chunk-EY4DD67D.js → chunk-ZIRMWD2B.js} +199 -126
- package/dist/chunk-ZPMG3FWU.js +75 -0
- package/dist/{chunk-QRUMA22E.js → chunk-ZTXMK2G7.js} +92 -43
- package/dist/{chunk-2OLKPG4E.js → chunk-ZVJCWXAL.js} +189 -87
- package/dist/{chunk-YAAHPATV.js → chunk-ZYQ23DPT.js} +49 -34
- package/dist/coachmark/index.js +7 -3
- package/dist/code-block/index.js +4 -3
- package/dist/color-field/index.js +12 -4
- package/dist/color-picker/index.js +23 -0
- package/dist/commerce/index.js +27 -16
- package/dist/confirm/index.js +31 -0
- package/dist/connection-card/index.js +34 -0
- package/dist/connectivity/index.js +3 -2
- package/dist/context-menu/index.js +10 -2
- package/dist/copy-button/index.js +3 -2
- package/dist/data-grid/index.js +30 -17
- package/dist/date-range-picker/index.js +19 -9
- package/dist/description-list/index.js +4 -1
- package/dist/device-frame/index.js +30 -0
- package/dist/dialog/index.js +8 -2
- package/dist/divider/index.js +2 -0
- package/dist/empty-state/index.js +13 -2
- package/dist/error-summary/index.js +7 -2
- package/dist/fab/index.js +4 -2
- package/dist/file-manager/index.js +33 -17
- package/dist/file-upload/index.js +12 -6
- package/dist/filter-bar/index.js +10 -6
- package/dist/flow-run/index.js +19 -12
- package/dist/form/index.js +30 -3
- package/dist/gallery/index.js +5 -2
- package/dist/hold-to-confirm/index.js +4 -2
- package/dist/hover-card/index.js +18 -0
- package/dist/icon-tile/index.js +10 -0
- package/dist/image/index.js +9 -0
- package/dist/index.d.ts +29826 -17941
- package/dist/index.js +197 -141
- package/dist/infinite-list/index.js +4 -2
- package/dist/inline-edit/index.js +5 -4
- package/dist/input/index.js +4 -3
- package/dist/interactions/index.js +4 -1
- package/dist/invoice/index.js +18 -9
- package/dist/job-row/index.js +22 -0
- package/dist/json-inspector/index.js +20 -0
- package/dist/kbd/index.js +2 -2
- package/dist/keyboard/index.js +7 -2
- package/dist/level-meter/index.js +9 -0
- package/dist/list-row/index.js +11 -3
- package/dist/log-viewer/index.js +9 -2
- package/dist/map-view/index.js +13 -2
- package/dist/markdown/index.js +8 -5
- package/dist/metric/index.js +6 -3
- package/dist/metric-strip/index.js +12 -0
- package/dist/money/index.js +11 -4
- package/dist/nav-drawer/index.js +6 -2
- package/dist/nav-header/index.js +10 -4
- package/dist/navigation/index.js +29 -2
- package/dist/notification-center/index.js +24 -10
- package/dist/number-roll/index.js +3 -1
- package/dist/onboarding-pager/index.js +22 -0
- package/dist/one-handed/index.js +2 -2
- package/dist/os-surfaces/index.js +6 -3
- package/dist/otp/index.js +5 -4
- package/dist/page-header/index.js +2 -1
- package/dist/pagination/index.js +4 -2
- package/dist/payment-method/index.js +17 -11
- package/dist/payment-status/index.js +22 -14
- package/dist/permission/index.js +18 -2
- package/dist/picker/index.js +17 -6
- package/dist/progress/index.js +7 -2
- package/dist/provenance/index.js +16 -0
- package/dist/pull-to-refresh/index.js +2 -2
- package/dist/qr-code/index.js +16 -0
- package/dist/query-builder/index.js +30 -0
- package/dist/radio-group/index.js +6 -4
- package/dist/rating/index.js +7 -2
- package/dist/receivables/index.js +31 -18
- package/dist/recording-indicator/index.js +21 -0
- package/dist/refund/index.js +24 -15
- package/dist/repeatable-rows/index.js +19 -0
- package/dist/save-status/index.js +5 -3
- package/dist/screen/index.js +3 -0
- package/dist/scroll-area/index.js +1 -1
- package/dist/search-field/index.js +8 -3
- package/dist/secret-field/index.js +19 -0
- package/dist/section-header/index.js +4 -0
- package/dist/segmented-control/index.js +2 -2
- package/dist/sheet/index.js +9 -3
- package/dist/shortcuts-sheet/index.js +2 -0
- package/dist/sign-in-screen/index.js +25 -0
- package/dist/skeleton/index.js +3 -1
- package/dist/slider/index.js +2 -1
- package/dist/sortable/index.js +4 -3
- package/dist/spinner/index.js +2 -1
- package/dist/split-button/index.js +17 -5
- package/dist/spotlight/index.js +7 -1
- package/dist/stack/index.js +2 -0
- package/dist/stage-timeline/index.js +6 -3
- package/dist/status-dot/index.js +6 -2
- package/dist/stepper/index.js +7 -3
- package/dist/streaming-text/index.js +2 -1
- package/dist/survey/index.js +24 -14
- package/dist/switch/index.js +6 -2
- package/dist/system-state/index.js +12 -4
- package/dist/tab-bar/index.js +10 -2
- package/dist/tabs/index.js +10 -2
- package/dist/tags-input/index.js +8 -5
- package/dist/text/index.js +4 -0
- package/dist/textarea/index.js +5 -4
- package/dist/thinking/index.js +4 -1
- package/dist/tile-rail/index.js +10 -0
- package/dist/time-field/index.js +15 -7
- package/dist/time-range-control/index.js +26 -12
- package/dist/timeline/index.js +2 -2
- package/dist/toast/index.js +4 -2
- package/dist/toolbar/index.js +3 -2
- package/dist/tour/index.js +12 -10
- package/dist/transcript/index.js +28 -0
- package/dist/truncation-notice/index.js +2 -2
- package/dist/update-notice/index.js +15 -8
- package/dist/video-player/index.js +26 -2
- package/dist/viewfinder/index.js +12 -4
- package/dist/widget/index.js +11 -4
- package/dist/wizard/index.js +7 -4
- package/package.json +13 -13
- package/dist/chunk-2PKYGLQ6.js +0 -268
- package/dist/chunk-2SWKL3AJ.js +0 -466
- package/dist/chunk-2TXERVVA.js +0 -1081
- package/dist/chunk-3DUWIYV5.js +0 -437
- package/dist/chunk-3NMD74ZU.js +0 -4
- package/dist/chunk-4DS5ZWVC.js +0 -83
- package/dist/chunk-6YAQBXB3.js +0 -93
- package/dist/chunk-74FLKD24.js +0 -237
- package/dist/chunk-CMTVNF3D.js +0 -104
- package/dist/chunk-DN7MNQIP.js +0 -799
- package/dist/chunk-DVGBZ3TX.js +0 -455
- package/dist/chunk-F3H33DQX.js +0 -300
- package/dist/chunk-FAJI7BSC.js +0 -443
- package/dist/chunk-G3AFC24V.js +0 -60
- package/dist/chunk-HJLPZA4X.js +0 -369
- package/dist/chunk-HYEOQWT7.js +0 -647
- package/dist/chunk-IDM7JJMO.js +0 -110
- package/dist/chunk-IVKMZ7BB.js +0 -326
- package/dist/chunk-IXKWIFWZ.js +0 -334
- package/dist/chunk-JV5YOTOB.js +0 -164
- package/dist/chunk-KFJGFLMW.js +0 -158
- package/dist/chunk-LQP4KEXZ.js +0 -214
- package/dist/chunk-NTQ2F3AU.js +0 -257
- package/dist/chunk-O5V4TG3V.js +0 -329
- package/dist/chunk-OWAMM2DK.js +0 -280
- package/dist/chunk-PID3NJB7.js +0 -405
- package/dist/chunk-QDZGFXQD.js +0 -176
- package/dist/chunk-QPWDDJJ4.js +0 -385
- package/dist/chunk-ROCUG24E.js +0 -416
- package/dist/chunk-RU3ZPNL6.js +0 -1986
- package/dist/chunk-RXSCIO6W.js +0 -153
- package/dist/chunk-SKWO3SZF.js +0 -2284
- package/dist/chunk-UQGBTPXH.js +0 -218
- package/dist/chunk-UYGDJWMN.js +0 -273
- package/dist/chunk-W74TXYFB.js +0 -107
- package/dist/chunk-WRDSPUE7.js +0 -417
- package/dist/chunk-XBZGDDMR.js +0 -105
- package/dist/chunk-XN4KG3P4.js +0 -1040
- package/dist/chunk-XQXMLMH3.js +0 -211
- package/dist/chunk-ZECZOOSB.js +0 -245
- /package/dist/{chunk-VFCUIDRT.js → chunk-3BKLBYPK.js} +0 -0
- /package/dist/{chunk-GEIGMWNF.js → chunk-QNZII37O.js} +0 -0
|
@@ -0,0 +1,1077 @@
|
|
|
1
|
+
import { Chip } from './chunk-7NGMUVNU.js';
|
|
2
|
+
import { Button } from './chunk-5DTKORLI.js';
|
|
3
|
+
import { Input } from './chunk-KXLDK6HB.js';
|
|
4
|
+
import { useLabels } from './chunk-APCWFOZW.js';
|
|
5
|
+
import { Icon } from './chunk-PCEFCOLN.js';
|
|
6
|
+
import { useResolvedMotion } from './chunk-J64KGCGX.js';
|
|
7
|
+
import * as React from 'react';
|
|
8
|
+
import { Animated, PanResponder, Platform, BackHandler, Pressable, View, Text, ScrollView, Easing, ActivityIndicator } from 'react-native';
|
|
9
|
+
import { createStyleSheet, useStyles, useLoamTheme } from '@btndprojects/loam-theme-native';
|
|
10
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
11
|
+
|
|
12
|
+
var SPEC = {
|
|
13
|
+
/** Attribution inset from the trailing edge. */
|
|
14
|
+
attributionEnd: 8,
|
|
15
|
+
/** Attribution inset from the bottom when no card or sheet covers the map. */
|
|
16
|
+
attributionBottom: 8,
|
|
17
|
+
/** Gap between the attribution and the card or sheet it clears. */
|
|
18
|
+
attributionGap: 8,
|
|
19
|
+
/** Attribution size. */
|
|
20
|
+
attributionSize: 11,
|
|
21
|
+
/** Gap between the card's thumbnail, copy and action. */
|
|
22
|
+
cardGap: 12,
|
|
23
|
+
/** Pin edge, idle and active. */
|
|
24
|
+
pinIdle: 30,
|
|
25
|
+
pinActive: 36,
|
|
26
|
+
/** Thumbnail edge. */
|
|
27
|
+
thumb: 36,
|
|
28
|
+
/** Place-name size. */
|
|
29
|
+
nameSize: 14,
|
|
30
|
+
/** Place-meta size. */
|
|
31
|
+
metaSize: 13,
|
|
32
|
+
/** Pin tail half-diagonal. */
|
|
33
|
+
tail: 4,
|
|
34
|
+
/** Height of a one-line place card before it has been measured. */
|
|
35
|
+
cardEstimate: 70,
|
|
36
|
+
/** User dot edge. */
|
|
37
|
+
userDot: 16,
|
|
38
|
+
/** Room the banners and pill leave for the control stack: 44 + 12 inset + 8. */
|
|
39
|
+
controlsEnd: 64,
|
|
40
|
+
/** Result row height. */
|
|
41
|
+
resultRow: 56,
|
|
42
|
+
/** Clearance below the search + filter row. */
|
|
43
|
+
topRowClear: 112,
|
|
44
|
+
controlsClear: 112,
|
|
45
|
+
/** Base-layer grid pitch — vertical then horizontal, from `buildMapScreen`. */
|
|
46
|
+
gridX: 48,
|
|
47
|
+
gridY: 64,
|
|
48
|
+
/** Grid-line thickness. */
|
|
49
|
+
gridW: 4
|
|
50
|
+
};
|
|
51
|
+
var ZOOM = {
|
|
52
|
+
min: 1,
|
|
53
|
+
max: 3,
|
|
54
|
+
/** Multiplier per press of the zoom-in / zoom-out control. */
|
|
55
|
+
step: 1.5,
|
|
56
|
+
/**
|
|
57
|
+
* Wheel delta that doubles (or halves) the zoom, via `exp(-delta / decay)`.
|
|
58
|
+
* A trackpad pinch reaches the browser as a wheel event too.
|
|
59
|
+
*/
|
|
60
|
+
decay: 320
|
|
61
|
+
};
|
|
62
|
+
function clamp(value, min, max) {
|
|
63
|
+
return Math.min(max, Math.max(min, value));
|
|
64
|
+
}
|
|
65
|
+
function touchDistance(e) {
|
|
66
|
+
const touches = e.nativeEvent.touches;
|
|
67
|
+
const a = touches[0];
|
|
68
|
+
const b = touches[1];
|
|
69
|
+
if (!a || !b) return 0;
|
|
70
|
+
return Math.hypot(a.pageX - b.pageX, a.pageY - b.pageY);
|
|
71
|
+
}
|
|
72
|
+
var DEFAULT_LABELS = {
|
|
73
|
+
zoomIn: "Zoom in",
|
|
74
|
+
zoomOut: "Zoom out",
|
|
75
|
+
recenter: "Recenter",
|
|
76
|
+
attribution: "\xA9 map data",
|
|
77
|
+
placeAction: (action, name) => `${action}, ${name}`,
|
|
78
|
+
search: "Search places",
|
|
79
|
+
filters: "Filters",
|
|
80
|
+
searchArea: "Search this area",
|
|
81
|
+
locate: "Show my location",
|
|
82
|
+
loading: "Loading map",
|
|
83
|
+
error: "Map couldn\u2019t load",
|
|
84
|
+
offline: "Offline. Showing the saved map.",
|
|
85
|
+
locationOff: "Location is off.",
|
|
86
|
+
locating: "Finding your location",
|
|
87
|
+
empty: "No places match these filters",
|
|
88
|
+
retry: "Retry",
|
|
89
|
+
clearFilters: "Clear filters",
|
|
90
|
+
layers: "Map type",
|
|
91
|
+
fullscreen: "Enter fullscreen",
|
|
92
|
+
exitFullscreen: "Exit fullscreen",
|
|
93
|
+
turnOn: "Turn on",
|
|
94
|
+
placesCount: (n) => `${n} ${n === 1 ? "place" : "places"}`,
|
|
95
|
+
scale: (label) => `Scale, ${label}`
|
|
96
|
+
};
|
|
97
|
+
var MAP_SIZE_STEP = { sm: 160, md: 224, lg: 256 };
|
|
98
|
+
function BaseLayer({ width, height }) {
|
|
99
|
+
const { styles } = useStyles(sheet);
|
|
100
|
+
const columns = width > 0 ? Math.floor((width - SPEC.gridW) / SPEC.gridX) : 6;
|
|
101
|
+
const rows = height > 0 ? Math.floor((height - SPEC.gridW) / SPEC.gridY) : 6;
|
|
102
|
+
return /* @__PURE__ */ jsxs(View, { style: styles.base, children: [
|
|
103
|
+
Array.from({ length: columns }, (_, i) => /* @__PURE__ */ jsx(View, { style: [styles.gridV, { left: (i + 1) * SPEC.gridX }] }, `v${i}`)),
|
|
104
|
+
Array.from({ length: rows }, (_, i) => /* @__PURE__ */ jsx(View, { style: [styles.gridH, { top: (i + 1) * SPEC.gridY }] }, `h${i}`)),
|
|
105
|
+
/* @__PURE__ */ jsx(View, { style: styles.river }),
|
|
106
|
+
/* @__PURE__ */ jsx(View, { style: styles.park })
|
|
107
|
+
] });
|
|
108
|
+
}
|
|
109
|
+
function MapView({
|
|
110
|
+
pins = [],
|
|
111
|
+
activePinId,
|
|
112
|
+
onSelectPin,
|
|
113
|
+
place,
|
|
114
|
+
results = [],
|
|
115
|
+
onSelectResult,
|
|
116
|
+
searchValue,
|
|
117
|
+
onSearchChange,
|
|
118
|
+
filters,
|
|
119
|
+
onFilterToggle,
|
|
120
|
+
searchAreaOffered,
|
|
121
|
+
onSearchArea,
|
|
122
|
+
onLocate,
|
|
123
|
+
layers,
|
|
124
|
+
layer,
|
|
125
|
+
onLayerChange,
|
|
126
|
+
scaleLabel,
|
|
127
|
+
fullscreen,
|
|
128
|
+
onFullscreen,
|
|
129
|
+
onDismiss,
|
|
130
|
+
userLocation,
|
|
131
|
+
status,
|
|
132
|
+
onRetry,
|
|
133
|
+
onClearFilters,
|
|
134
|
+
attribution: attributionProp,
|
|
135
|
+
labels: labelsProp,
|
|
136
|
+
onZoomIn,
|
|
137
|
+
zoomControls: zoomControlsMode = "pointer",
|
|
138
|
+
onZoomOut,
|
|
139
|
+
onRecenter,
|
|
140
|
+
pannable = true,
|
|
141
|
+
zoomable = true,
|
|
142
|
+
minZoom = ZOOM.min,
|
|
143
|
+
maxZoom = ZOOM.max,
|
|
144
|
+
motion = "full",
|
|
145
|
+
size,
|
|
146
|
+
children
|
|
147
|
+
}) {
|
|
148
|
+
const labels = useLabels("mapView", DEFAULT_LABELS, labelsProp);
|
|
149
|
+
const attribution = attributionProp ?? labels.attribution;
|
|
150
|
+
const { styles } = useStyles(sheet);
|
|
151
|
+
const theme = useLoamTheme("map-view");
|
|
152
|
+
const animateZoom = useResolvedMotion(motion, "map-view") === "full";
|
|
153
|
+
const animateZoomRef = React.useRef(animateZoom);
|
|
154
|
+
animateZoomRef.current = animateZoom;
|
|
155
|
+
const [viewport, setViewport] = React.useState({ width: 0, height: 0 });
|
|
156
|
+
const viewportRef = React.useRef(viewport);
|
|
157
|
+
const onRootLayout = (e) => {
|
|
158
|
+
const { width, height } = e.nativeEvent.layout;
|
|
159
|
+
viewportRef.current = { width, height };
|
|
160
|
+
setViewport(
|
|
161
|
+
(prev) => prev.width === width && prev.height === height ? prev : { width, height }
|
|
162
|
+
);
|
|
163
|
+
};
|
|
164
|
+
const pan = React.useRef(new Animated.ValueXY({ x: 0, y: 0 })).current;
|
|
165
|
+
const scale = React.useRef(new Animated.Value(1)).current;
|
|
166
|
+
const offset = React.useRef({ x: 0, y: 0 });
|
|
167
|
+
const gestureStart = React.useRef({ x: 0, y: 0 });
|
|
168
|
+
const zoom = React.useRef(1);
|
|
169
|
+
const pinch = React.useRef(null);
|
|
170
|
+
const bounds = () => {
|
|
171
|
+
const { width, height } = viewportRef.current;
|
|
172
|
+
return {
|
|
173
|
+
x: Math.max(0, (width * zoom.current - width) / 2),
|
|
174
|
+
y: Math.max(0, (height * zoom.current - height) / 2)
|
|
175
|
+
};
|
|
176
|
+
};
|
|
177
|
+
const panTo = (x, y) => {
|
|
178
|
+
const max = bounds();
|
|
179
|
+
const next = { x: clamp(x, -max.x, max.x), y: clamp(y, -max.y, max.y) };
|
|
180
|
+
offset.current = next;
|
|
181
|
+
pan.setValue(next);
|
|
182
|
+
};
|
|
183
|
+
const zoomTo = (next, animate) => {
|
|
184
|
+
zoom.current = clamp(next, minZoom, maxZoom);
|
|
185
|
+
if (animate && animateZoomRef.current) {
|
|
186
|
+
Animated.timing(scale, {
|
|
187
|
+
toValue: zoom.current,
|
|
188
|
+
duration: theme.motion.expand.duration,
|
|
189
|
+
easing: Easing.bezier(...theme.motion.expand.easing),
|
|
190
|
+
// The pan on the same layer is gesture-driven, so this transform stays
|
|
191
|
+
// on the JS driver too — the two cannot mix drivers on one node.
|
|
192
|
+
useNativeDriver: false
|
|
193
|
+
}).start();
|
|
194
|
+
} else {
|
|
195
|
+
scale.setValue(zoom.current);
|
|
196
|
+
}
|
|
197
|
+
panTo(offset.current.x, offset.current.y);
|
|
198
|
+
};
|
|
199
|
+
const responder = React.useMemo(
|
|
200
|
+
() => PanResponder.create({
|
|
201
|
+
// Never claim the touch on start: a tap belongs to the pin (or the card)
|
|
202
|
+
// underneath. Only a real drag takes over.
|
|
203
|
+
onStartShouldSetPanResponder: () => false,
|
|
204
|
+
onMoveShouldSetPanResponder: (e, g) => pannable && (Math.abs(g.dx) > 2 || Math.abs(g.dy) > 2) || zoomable && e.nativeEvent.touches.length > 1,
|
|
205
|
+
onPanResponderGrant: () => {
|
|
206
|
+
gestureStart.current = { ...offset.current };
|
|
207
|
+
pinch.current = null;
|
|
208
|
+
},
|
|
209
|
+
onPanResponderMove: (e, g) => {
|
|
210
|
+
const distance = zoomable ? touchDistance(e) : 0;
|
|
211
|
+
if (distance > 0) {
|
|
212
|
+
pinch.current ??= { distance, zoom: zoom.current };
|
|
213
|
+
zoomTo(pinch.current.zoom * distance / pinch.current.distance, false);
|
|
214
|
+
return;
|
|
215
|
+
}
|
|
216
|
+
if (!pannable) return;
|
|
217
|
+
panTo(gestureStart.current.x + g.dx, gestureStart.current.y + g.dy);
|
|
218
|
+
},
|
|
219
|
+
onPanResponderRelease: () => {
|
|
220
|
+
pinch.current = null;
|
|
221
|
+
},
|
|
222
|
+
onPanResponderTerminate: () => {
|
|
223
|
+
pinch.current = null;
|
|
224
|
+
}
|
|
225
|
+
}),
|
|
226
|
+
// `panTo`/`zoomTo` read refs, so the responder never needs rebuilding for them.
|
|
227
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
228
|
+
[pannable, zoomable, minZoom, maxZoom]
|
|
229
|
+
);
|
|
230
|
+
const rootRef = React.useRef(null);
|
|
231
|
+
React.useEffect(() => {
|
|
232
|
+
if (!zoomable) return;
|
|
233
|
+
const node = rootRef.current;
|
|
234
|
+
if (!node?.addEventListener || !node.removeEventListener) return;
|
|
235
|
+
const onWheel = (e) => {
|
|
236
|
+
const wheel = e;
|
|
237
|
+
wheel.preventDefault?.();
|
|
238
|
+
zoomTo(zoom.current * Math.exp(-wheel.deltaY / ZOOM.decay), false);
|
|
239
|
+
};
|
|
240
|
+
node.addEventListener("wheel", onWheel, { passive: false });
|
|
241
|
+
return () => node.removeEventListener?.("wheel", onWheel);
|
|
242
|
+
}, [zoomable, minZoom, maxZoom]);
|
|
243
|
+
const [layersOpen, setLayersOpen] = React.useState(false);
|
|
244
|
+
const dismissible = Boolean(onDismiss) && (activePinId !== void 0 || place !== void 0);
|
|
245
|
+
const onDismissRef = React.useRef(onDismiss);
|
|
246
|
+
onDismissRef.current = onDismiss;
|
|
247
|
+
React.useEffect(() => {
|
|
248
|
+
if (Platform.OS !== "android" || !dismissible) return;
|
|
249
|
+
const sub = BackHandler.addEventListener("hardwareBackPress", () => {
|
|
250
|
+
onDismissRef.current?.();
|
|
251
|
+
return true;
|
|
252
|
+
});
|
|
253
|
+
return () => sub.remove();
|
|
254
|
+
}, [dismissible]);
|
|
255
|
+
const recenter = () => {
|
|
256
|
+
zoomTo(minZoom, true);
|
|
257
|
+
panTo(0, 0);
|
|
258
|
+
onRecenter?.();
|
|
259
|
+
};
|
|
260
|
+
const marks = React.useMemo(() => {
|
|
261
|
+
const m = /* @__PURE__ */ new Map();
|
|
262
|
+
const order = results.length > 0 ? results.map((r) => r.id) : pins.map((p) => p.id);
|
|
263
|
+
order.forEach((id, i) => m.set(id, String.fromCharCode(65 + i % 26)));
|
|
264
|
+
return m;
|
|
265
|
+
}, [pins, results]);
|
|
266
|
+
const [coverHeight, setCoverHeight] = React.useState(0);
|
|
267
|
+
const showSheet = results.length > 0 && !place;
|
|
268
|
+
const covered = place ? coverHeight || SPEC.cardEstimate : showSheet ? coverHeight || results.length * SPEC.resultRow : 0;
|
|
269
|
+
const attributionBottom = covered > 0 ? covered + theme.space[10] + SPEC.attributionGap : SPEC.attributionBottom;
|
|
270
|
+
const onCoverLayout = (e) => setCoverHeight(e.nativeEvent.layout.height);
|
|
271
|
+
const hasTopRow = onSearchChange !== void 0 || (filters?.length ?? 0) > 0;
|
|
272
|
+
const counterScale = Animated.divide(1, scale);
|
|
273
|
+
const zoomControls = [
|
|
274
|
+
{
|
|
275
|
+
icon: "plus",
|
|
276
|
+
label: labels.zoomIn,
|
|
277
|
+
handler: onZoomIn,
|
|
278
|
+
onPress: () => {
|
|
279
|
+
zoomTo(zoom.current * ZOOM.step, true);
|
|
280
|
+
onZoomIn?.();
|
|
281
|
+
}
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
icon: "minus",
|
|
285
|
+
label: labels.zoomOut,
|
|
286
|
+
handler: onZoomOut,
|
|
287
|
+
onPress: () => {
|
|
288
|
+
zoomTo(zoom.current / ZOOM.step, true);
|
|
289
|
+
onZoomOut?.();
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
].filter(
|
|
293
|
+
(c) => c.handler && (zoomControlsMode === "always" || zoomControlsMode === "pointer" && Platform.OS === "web")
|
|
294
|
+
);
|
|
295
|
+
const hasLayers = (layers?.length ?? 0) > 1;
|
|
296
|
+
const locateOn = userLocation !== void 0;
|
|
297
|
+
const control = (icon, label, onPress, pressed, grouped) => /* @__PURE__ */ jsx(
|
|
298
|
+
Pressable,
|
|
299
|
+
{
|
|
300
|
+
accessibilityRole: "button",
|
|
301
|
+
accessibilityLabel: label,
|
|
302
|
+
"aria-pressed": pressed,
|
|
303
|
+
onPress,
|
|
304
|
+
style: [styles.control, !grouped && styles.groupSolo, pressed && styles.controlOn],
|
|
305
|
+
children: /* @__PURE__ */ jsx(
|
|
306
|
+
Icon,
|
|
307
|
+
{
|
|
308
|
+
name: icon,
|
|
309
|
+
size: theme.icon.sm,
|
|
310
|
+
color: pressed ? theme.color.accentStrong : theme.color.text
|
|
311
|
+
}
|
|
312
|
+
)
|
|
313
|
+
},
|
|
314
|
+
label
|
|
315
|
+
);
|
|
316
|
+
const pinNodes = pins.map((pin) => {
|
|
317
|
+
const active = pin.id === activePinId;
|
|
318
|
+
const size2 = active ? SPEC.pinActive : SPEC.pinIdle;
|
|
319
|
+
const mark = results.length > 0 ? marks.get(pin.id) : void 0;
|
|
320
|
+
const cluster = (pin.count ?? 0) > 1;
|
|
321
|
+
return /* @__PURE__ */ jsx(
|
|
322
|
+
Animated.View,
|
|
323
|
+
{
|
|
324
|
+
style: [
|
|
325
|
+
styles.pinAnchor,
|
|
326
|
+
{
|
|
327
|
+
left: `${pin.x}%`,
|
|
328
|
+
top: `${pin.y}%`,
|
|
329
|
+
width: cluster ? void 0 : size2,
|
|
330
|
+
minWidth: cluster ? theme.ctl.md : void 0,
|
|
331
|
+
height: cluster ? theme.ctl.md : size2,
|
|
332
|
+
marginLeft: cluster ? -theme.ctl.md / 2 : -size2 / 2,
|
|
333
|
+
marginTop: cluster ? -theme.ctl.md / 2 : -size2,
|
|
334
|
+
// Screen-sized at every zoom: undo the layer's scale about the tail.
|
|
335
|
+
transform: [
|
|
336
|
+
{ translateY: size2 / 2 },
|
|
337
|
+
{ scale: counterScale },
|
|
338
|
+
{ translateY: -size2 / 2 }
|
|
339
|
+
]
|
|
340
|
+
}
|
|
341
|
+
],
|
|
342
|
+
children: /* @__PURE__ */ jsxs(
|
|
343
|
+
Pressable,
|
|
344
|
+
{
|
|
345
|
+
accessibilityRole: "button",
|
|
346
|
+
accessibilityLabel: pin.label,
|
|
347
|
+
"aria-pressed": active,
|
|
348
|
+
onPress: onSelectPin ? () => onSelectPin(pin.id) : void 0,
|
|
349
|
+
hitSlop: Math.max(0, (theme.hit.md - size2) / 2),
|
|
350
|
+
style: [
|
|
351
|
+
styles.pin,
|
|
352
|
+
cluster ? styles.pinCluster : active ? styles.pinActive : pin.visited ? styles.pinVisited : styles.pinIdle
|
|
353
|
+
],
|
|
354
|
+
children: [
|
|
355
|
+
cluster ? null : /* @__PURE__ */ jsx(
|
|
356
|
+
View,
|
|
357
|
+
{
|
|
358
|
+
style: [
|
|
359
|
+
styles.tail,
|
|
360
|
+
active ? styles.tailActive : pin.visited ? styles.tailVisited : styles.tailIdle
|
|
361
|
+
]
|
|
362
|
+
}
|
|
363
|
+
),
|
|
364
|
+
cluster ? /* @__PURE__ */ jsx(Text, { style: styles.clusterCount, children: pin.count }) : mark ? /* @__PURE__ */ jsx(Text, { style: [styles.mark, active && styles.markActive], children: mark }) : /* @__PURE__ */ jsx(
|
|
365
|
+
Icon,
|
|
366
|
+
{
|
|
367
|
+
name: pin.icon ?? "map-pin",
|
|
368
|
+
size: theme.icon.sm,
|
|
369
|
+
color: active ? theme.color.accentInk : theme.color.text
|
|
370
|
+
}
|
|
371
|
+
)
|
|
372
|
+
]
|
|
373
|
+
}
|
|
374
|
+
)
|
|
375
|
+
},
|
|
376
|
+
pin.id
|
|
377
|
+
);
|
|
378
|
+
});
|
|
379
|
+
const message = (text, action) => /* @__PURE__ */ jsxs(View, { style: styles.statusBox, accessibilityRole: "alert", children: [
|
|
380
|
+
/* @__PURE__ */ jsx(Text, { style: styles.statusText, children: text }),
|
|
381
|
+
action?.onPress ? /* @__PURE__ */ jsx(Button, { variant: "outline", size: "lg", onPress: action.onPress, children: action.label }) : null
|
|
382
|
+
] });
|
|
383
|
+
const pill = (text) => /* @__PURE__ */ jsxs(View, { style: styles.statusPill, accessibilityRole: "progressbar", accessibilityLabel: text, children: [
|
|
384
|
+
/* @__PURE__ */ jsx(
|
|
385
|
+
ActivityIndicator,
|
|
386
|
+
{
|
|
387
|
+
size: "small",
|
|
388
|
+
color: theme.color.text2,
|
|
389
|
+
"aria-hidden": true,
|
|
390
|
+
importantForAccessibility: "no-hide-descendants"
|
|
391
|
+
}
|
|
392
|
+
),
|
|
393
|
+
/* @__PURE__ */ jsx(Text, { style: styles.statusPillText, children: text })
|
|
394
|
+
] });
|
|
395
|
+
const banner = (tone, icon, text, action) => /* @__PURE__ */ jsxs(
|
|
396
|
+
View,
|
|
397
|
+
{
|
|
398
|
+
accessibilityRole: "alert",
|
|
399
|
+
style: [styles.banner, tone === "warn" ? styles.bannerWarn : styles.bannerInfo],
|
|
400
|
+
children: [
|
|
401
|
+
/* @__PURE__ */ jsx(
|
|
402
|
+
Icon,
|
|
403
|
+
{
|
|
404
|
+
name: icon,
|
|
405
|
+
size: theme.icon.sm,
|
|
406
|
+
color: tone === "warn" ? theme.color.warnOnSoft : theme.color.infoOnSoft
|
|
407
|
+
}
|
|
408
|
+
),
|
|
409
|
+
/* @__PURE__ */ jsx(
|
|
410
|
+
Text,
|
|
411
|
+
{
|
|
412
|
+
style: [
|
|
413
|
+
styles.bannerText,
|
|
414
|
+
{ color: tone === "warn" ? theme.color.warnOnSoft : theme.color.infoOnSoft }
|
|
415
|
+
],
|
|
416
|
+
children: text
|
|
417
|
+
}
|
|
418
|
+
),
|
|
419
|
+
action?.onPress ? /* @__PURE__ */ jsx(Pressable, { accessibilityRole: "button", onPress: action.onPress, hitSlop: theme.space[8], children: /* @__PURE__ */ jsx(Text, { style: [styles.bannerAction, { color: theme.color.infoOnSoft }], children: action.label }) }) : null
|
|
420
|
+
]
|
|
421
|
+
}
|
|
422
|
+
);
|
|
423
|
+
return /* @__PURE__ */ jsxs(
|
|
424
|
+
View,
|
|
425
|
+
{
|
|
426
|
+
ref: rootRef,
|
|
427
|
+
testID: "map-root",
|
|
428
|
+
style: [styles.root, size ? { flex: 0, height: theme.space[MAP_SIZE_STEP[size]] } : null],
|
|
429
|
+
onLayout: onRootLayout,
|
|
430
|
+
children: [
|
|
431
|
+
/* @__PURE__ */ jsxs(
|
|
432
|
+
Animated.View,
|
|
433
|
+
{
|
|
434
|
+
testID: "map-pan-layer",
|
|
435
|
+
style: [
|
|
436
|
+
styles.world,
|
|
437
|
+
{ transform: [{ translateX: pan.x }, { translateY: pan.y }, { scale }] }
|
|
438
|
+
],
|
|
439
|
+
...responder.panHandlers,
|
|
440
|
+
children: [
|
|
441
|
+
children ?? /* @__PURE__ */ jsx(BaseLayer, { width: viewport.width, height: viewport.height }),
|
|
442
|
+
userLocation ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
443
|
+
/* @__PURE__ */ jsx(
|
|
444
|
+
View,
|
|
445
|
+
{
|
|
446
|
+
pointerEvents: "none",
|
|
447
|
+
style: [
|
|
448
|
+
styles.halo,
|
|
449
|
+
{
|
|
450
|
+
left: `${userLocation.x}%`,
|
|
451
|
+
top: `${userLocation.y}%`,
|
|
452
|
+
width: viewport.width * ((userLocation.accuracy ?? 6) / 50),
|
|
453
|
+
height: viewport.width * ((userLocation.accuracy ?? 6) / 50),
|
|
454
|
+
marginLeft: -(viewport.width * ((userLocation.accuracy ?? 6) / 100)),
|
|
455
|
+
marginTop: -(viewport.width * ((userLocation.accuracy ?? 6) / 100))
|
|
456
|
+
}
|
|
457
|
+
]
|
|
458
|
+
}
|
|
459
|
+
),
|
|
460
|
+
/* @__PURE__ */ jsx(
|
|
461
|
+
Animated.View,
|
|
462
|
+
{
|
|
463
|
+
pointerEvents: "none",
|
|
464
|
+
style: [
|
|
465
|
+
styles.userDot,
|
|
466
|
+
{
|
|
467
|
+
left: `${userLocation.x}%`,
|
|
468
|
+
top: `${userLocation.y}%`,
|
|
469
|
+
transform: [{ scale: counterScale }]
|
|
470
|
+
}
|
|
471
|
+
]
|
|
472
|
+
}
|
|
473
|
+
)
|
|
474
|
+
] }) : null,
|
|
475
|
+
pinNodes
|
|
476
|
+
]
|
|
477
|
+
}
|
|
478
|
+
),
|
|
479
|
+
hasTopRow ? (
|
|
480
|
+
// Search and filters ride the top edge.
|
|
481
|
+
/* @__PURE__ */ jsxs(View, { style: styles.topRow, children: [
|
|
482
|
+
onSearchChange ? /* @__PURE__ */ jsx(
|
|
483
|
+
Input,
|
|
484
|
+
{
|
|
485
|
+
leadingIcon: "search",
|
|
486
|
+
placeholder: labels.search,
|
|
487
|
+
accessibilityLabel: labels.search,
|
|
488
|
+
value: searchValue ?? "",
|
|
489
|
+
onChangeText: onSearchChange,
|
|
490
|
+
size: "lg",
|
|
491
|
+
containerStyle: styles.search
|
|
492
|
+
}
|
|
493
|
+
) : null,
|
|
494
|
+
filters?.length ? /* @__PURE__ */ jsx(
|
|
495
|
+
View,
|
|
496
|
+
{
|
|
497
|
+
accessibilityRole: "toolbar",
|
|
498
|
+
accessibilityLabel: labels.filters,
|
|
499
|
+
style: styles.chips,
|
|
500
|
+
children: filters.map((f) => /* @__PURE__ */ jsx(
|
|
501
|
+
Chip,
|
|
502
|
+
{
|
|
503
|
+
variant: "filter",
|
|
504
|
+
size: "lg",
|
|
505
|
+
selected: f.selected,
|
|
506
|
+
onSelectedChange: (s) => onFilterToggle?.(f.id, s),
|
|
507
|
+
children: f.label
|
|
508
|
+
},
|
|
509
|
+
f.id
|
|
510
|
+
))
|
|
511
|
+
}
|
|
512
|
+
) : null
|
|
513
|
+
] })
|
|
514
|
+
) : null,
|
|
515
|
+
searchAreaOffered ? /* @__PURE__ */ jsx(View, { style: [styles.areaOffer, hasTopRow && styles.areaOfferLow], children: /* @__PURE__ */ jsx(Button, { variant: "outline", size: "md", leadingIcon: "search", onPress: onSearchArea, children: labels.searchArea }) }) : null,
|
|
516
|
+
status ? /* @__PURE__ */ jsx(
|
|
517
|
+
View,
|
|
518
|
+
{
|
|
519
|
+
pointerEvents: "box-none",
|
|
520
|
+
style: [
|
|
521
|
+
styles.overlay,
|
|
522
|
+
status === "loading" || status === "locating" || status === "location-off" || status === "offline" ? styles.overlayTop : null
|
|
523
|
+
],
|
|
524
|
+
children: status === "loading" ? pill(labels.loading) : status === "locating" ? pill(labels.locating) : status === "location-off" ? banner(
|
|
525
|
+
"info",
|
|
526
|
+
"info",
|
|
527
|
+
labels.locationOff,
|
|
528
|
+
onLocate ? { label: labels.turnOn, onPress: onLocate } : void 0
|
|
529
|
+
) : status === "offline" ? banner("warn", "wifi-off", labels.offline) : status === "empty" ? message(
|
|
530
|
+
labels.empty,
|
|
531
|
+
onClearFilters ? { label: labels.clearFilters, onPress: onClearFilters } : void 0
|
|
532
|
+
) : message(
|
|
533
|
+
labels.error,
|
|
534
|
+
onRetry ? { label: labels.retry, onPress: onRetry } : void 0
|
|
535
|
+
)
|
|
536
|
+
}
|
|
537
|
+
) : null,
|
|
538
|
+
zoomControls.length > 0 || onRecenter || onLocate || onFullscreen || hasLayers ? /* @__PURE__ */ jsxs(View, { style: [styles.controls, hasTopRow && styles.controlsLow], children: [
|
|
539
|
+
onFullscreen ? control(
|
|
540
|
+
fullscreen ? "minimize" : "maximize",
|
|
541
|
+
fullscreen ? labels.exitFullscreen : labels.fullscreen,
|
|
542
|
+
onFullscreen,
|
|
543
|
+
fullscreen ?? false
|
|
544
|
+
) : null,
|
|
545
|
+
zoomControls.length > 0 ? (
|
|
546
|
+
// Grouped by function: the zoom pair is one 44 group.
|
|
547
|
+
/* @__PURE__ */ jsx(View, { style: styles.group, children: zoomControls.map((c, i) => /* @__PURE__ */ jsxs(React.Fragment, { children: [
|
|
548
|
+
i > 0 ? /* @__PURE__ */ jsx(View, { style: styles.groupDivider }) : null,
|
|
549
|
+
control(c.icon, c.label, c.onPress, void 0, true)
|
|
550
|
+
] }, c.label)) })
|
|
551
|
+
) : null,
|
|
552
|
+
onRecenter ? control("rotate-ccw", labels.recenter, recenter) : null,
|
|
553
|
+
onLocate ? control("navigation", labels.locate, onLocate, locateOn) : null,
|
|
554
|
+
hasLayers ? control("layers", labels.layers, () => setLayersOpen((o) => !o), layersOpen) : null,
|
|
555
|
+
hasLayers && layersOpen ? /* @__PURE__ */ jsx(
|
|
556
|
+
View,
|
|
557
|
+
{
|
|
558
|
+
accessibilityRole: "menu",
|
|
559
|
+
accessibilityLabel: labels.layers,
|
|
560
|
+
style: styles.layerMenu,
|
|
561
|
+
children: layers?.map((l) => /* @__PURE__ */ jsx(
|
|
562
|
+
Pressable,
|
|
563
|
+
{
|
|
564
|
+
accessibilityRole: "menuitem",
|
|
565
|
+
accessibilityLabel: l.label,
|
|
566
|
+
"aria-checked": l.id === layer,
|
|
567
|
+
onPress: () => {
|
|
568
|
+
onLayerChange?.(l.id);
|
|
569
|
+
setLayersOpen(false);
|
|
570
|
+
},
|
|
571
|
+
style: [styles.layerItem, l.id === layer && styles.layerItemOn],
|
|
572
|
+
children: /* @__PURE__ */ jsx(Text, { style: [styles.layerText, l.id === layer && styles.layerTextOn], children: l.label })
|
|
573
|
+
},
|
|
574
|
+
l.id
|
|
575
|
+
))
|
|
576
|
+
}
|
|
577
|
+
) : null
|
|
578
|
+
] }) : null,
|
|
579
|
+
scaleLabel ? /* @__PURE__ */ jsxs(
|
|
580
|
+
View,
|
|
581
|
+
{
|
|
582
|
+
accessibilityRole: "image",
|
|
583
|
+
accessibilityLabel: labels.scale(scaleLabel),
|
|
584
|
+
pointerEvents: "none",
|
|
585
|
+
style: [styles.scale, { bottom: attributionBottom }],
|
|
586
|
+
children: [
|
|
587
|
+
/* @__PURE__ */ jsx(Text, { style: styles.scaleText, children: scaleLabel }),
|
|
588
|
+
/* @__PURE__ */ jsx(View, { style: styles.scaleBar })
|
|
589
|
+
]
|
|
590
|
+
}
|
|
591
|
+
) : null,
|
|
592
|
+
/* @__PURE__ */ jsx(Text, { style: [styles.attribution, { bottom: attributionBottom }], children: attribution }),
|
|
593
|
+
place ? /* @__PURE__ */ jsxs(
|
|
594
|
+
View,
|
|
595
|
+
{
|
|
596
|
+
style: [styles.card, place.secondaryActions?.length ? styles.cardStacked : null],
|
|
597
|
+
onLayout: onCoverLayout,
|
|
598
|
+
children: [
|
|
599
|
+
/* @__PURE__ */ jsxs(View, { style: styles.cardHead, children: [
|
|
600
|
+
/* @__PURE__ */ jsx(View, { style: styles.cardThumb }),
|
|
601
|
+
/* @__PURE__ */ jsxs(View, { style: styles.cardText, children: [
|
|
602
|
+
/* @__PURE__ */ jsx(Text, { style: styles.cardName, numberOfLines: 1, ellipsizeMode: "tail", children: place.name }),
|
|
603
|
+
place.meta ? /* @__PURE__ */ jsx(Text, { style: styles.cardMeta, numberOfLines: 1, ellipsizeMode: "tail", children: place.meta }) : null
|
|
604
|
+
] }),
|
|
605
|
+
place.actionLabel && !place.secondaryActions?.length ? /* @__PURE__ */ jsx(
|
|
606
|
+
Button,
|
|
607
|
+
{
|
|
608
|
+
variant: "primary",
|
|
609
|
+
size: "lg",
|
|
610
|
+
accessibilityLabel: labels.placeAction(place.actionLabel, place.name),
|
|
611
|
+
onPress: place.onAction,
|
|
612
|
+
children: place.actionLabel
|
|
613
|
+
}
|
|
614
|
+
) : null
|
|
615
|
+
] }),
|
|
616
|
+
place.secondaryActions?.length ? /* @__PURE__ */ jsxs(View, { style: styles.cardActions, children: [
|
|
617
|
+
place.actionLabel ? /* @__PURE__ */ jsx(
|
|
618
|
+
Button,
|
|
619
|
+
{
|
|
620
|
+
variant: "primary",
|
|
621
|
+
size: "lg",
|
|
622
|
+
accessibilityLabel: labels.placeAction(place.actionLabel, place.name),
|
|
623
|
+
onPress: place.onAction,
|
|
624
|
+
children: place.actionLabel
|
|
625
|
+
}
|
|
626
|
+
) : null,
|
|
627
|
+
place.secondaryActions.map((a) => /* @__PURE__ */ jsx(
|
|
628
|
+
Button,
|
|
629
|
+
{
|
|
630
|
+
variant: "outline",
|
|
631
|
+
size: "lg",
|
|
632
|
+
leadingIcon: a.icon,
|
|
633
|
+
onPress: a.onPress,
|
|
634
|
+
children: a.label
|
|
635
|
+
},
|
|
636
|
+
a.label
|
|
637
|
+
))
|
|
638
|
+
] }) : null
|
|
639
|
+
]
|
|
640
|
+
}
|
|
641
|
+
) : null,
|
|
642
|
+
showSheet ? /* @__PURE__ */ jsxs(View, { style: styles.resultSheet, onLayout: onCoverLayout, accessibilityRole: "list", children: [
|
|
643
|
+
/* @__PURE__ */ jsx(Text, { style: styles.sheetHeader, children: labels.placesCount(results.length) }),
|
|
644
|
+
/* @__PURE__ */ jsx(ScrollView, { style: styles.sheetScroll, children: results.map((r) => {
|
|
645
|
+
const active = r.id === activePinId;
|
|
646
|
+
return /* @__PURE__ */ jsx(View, { role: "listitem", children: /* @__PURE__ */ jsxs(
|
|
647
|
+
Pressable,
|
|
648
|
+
{
|
|
649
|
+
accessibilityRole: "button",
|
|
650
|
+
"aria-pressed": active,
|
|
651
|
+
accessibilityLabel: r.meta ? `${r.name}, ${r.meta}` : r.name,
|
|
652
|
+
onPress: onSelectResult ? () => onSelectResult(r.id) : void 0,
|
|
653
|
+
style: [styles.resultRow, active && styles.resultRowActive],
|
|
654
|
+
children: [
|
|
655
|
+
/* @__PURE__ */ jsx(View, { style: [styles.resultMark, active && styles.resultMarkActive], children: /* @__PURE__ */ jsx(Text, { style: [styles.mark, active && styles.markActive], children: marks.get(r.id) }) }),
|
|
656
|
+
/* @__PURE__ */ jsxs(View, { style: styles.cardText, children: [
|
|
657
|
+
/* @__PURE__ */ jsx(
|
|
658
|
+
Text,
|
|
659
|
+
{
|
|
660
|
+
style: [styles.cardName, r.closed && styles.cardClosed],
|
|
661
|
+
numberOfLines: 1,
|
|
662
|
+
children: r.name
|
|
663
|
+
}
|
|
664
|
+
),
|
|
665
|
+
r.meta ? /* @__PURE__ */ jsx(
|
|
666
|
+
Text,
|
|
667
|
+
{
|
|
668
|
+
style: [styles.cardMeta, r.closed && styles.cardClosed],
|
|
669
|
+
numberOfLines: 1,
|
|
670
|
+
children: r.meta
|
|
671
|
+
}
|
|
672
|
+
) : null
|
|
673
|
+
] }),
|
|
674
|
+
r.rating ? /* @__PURE__ */ jsxs(View, { style: styles.rating, children: [
|
|
675
|
+
/* @__PURE__ */ jsx(Text, { style: styles.ratingText, children: r.rating }),
|
|
676
|
+
/* @__PURE__ */ jsx(Icon, { name: "star", size: theme.icon.xs, color: theme.color.text2 })
|
|
677
|
+
] }) : null
|
|
678
|
+
]
|
|
679
|
+
}
|
|
680
|
+
) }, r.id);
|
|
681
|
+
}) })
|
|
682
|
+
] }) : null
|
|
683
|
+
]
|
|
684
|
+
}
|
|
685
|
+
);
|
|
686
|
+
}
|
|
687
|
+
var sheet = createStyleSheet((theme) => ({
|
|
688
|
+
root: { flex: 1, backgroundColor: theme.color.surface2, overflow: "hidden" },
|
|
689
|
+
// The panning layer is the viewport. Travel comes from the zoom scaling it up,
|
|
690
|
+
// so nothing is laid out beyond the map's own edges at rest.
|
|
691
|
+
world: { position: "absolute", left: 0, right: 0, top: 0, bottom: 0 },
|
|
692
|
+
base: { position: "absolute", left: 0, right: 0, top: 0, bottom: 0 },
|
|
693
|
+
gridV: {
|
|
694
|
+
position: "absolute",
|
|
695
|
+
top: 0,
|
|
696
|
+
bottom: 0,
|
|
697
|
+
width: SPEC.gridW,
|
|
698
|
+
backgroundColor: theme.color.surface3
|
|
699
|
+
},
|
|
700
|
+
gridH: {
|
|
701
|
+
position: "absolute",
|
|
702
|
+
left: 0,
|
|
703
|
+
right: 0,
|
|
704
|
+
height: SPEC.gridW,
|
|
705
|
+
backgroundColor: theme.color.surface3
|
|
706
|
+
},
|
|
707
|
+
// Edge to edge: the -12° rotation pulls the ends ~1dp inside the map, which is
|
|
708
|
+
// cheaper than the 30% of extra width it would take to bleed past them.
|
|
709
|
+
//
|
|
710
|
+
// loam-contrast-ignore — the river and the park are base-layer texture, not
|
|
711
|
+
// information: they exist so the muted palette reads as a map. Every pin,
|
|
712
|
+
// route and label that *does* mean something is drawn over them with its own
|
|
713
|
+
// edge, and outlining a decorative river under high contrast would read as a
|
|
714
|
+
// defect rather than as help.
|
|
715
|
+
river: {
|
|
716
|
+
position: "absolute",
|
|
717
|
+
left: 0,
|
|
718
|
+
right: 0,
|
|
719
|
+
top: "30%",
|
|
720
|
+
height: theme.space[26],
|
|
721
|
+
backgroundColor: theme.color.infoSoft,
|
|
722
|
+
transform: [{ rotate: "-12deg" }]
|
|
723
|
+
},
|
|
724
|
+
// loam-contrast-ignore — decorative, as the river above.
|
|
725
|
+
park: {
|
|
726
|
+
position: "absolute",
|
|
727
|
+
left: "8%",
|
|
728
|
+
top: "8%",
|
|
729
|
+
width: "44%",
|
|
730
|
+
height: "22%",
|
|
731
|
+
borderRadius: theme.radius.md,
|
|
732
|
+
backgroundColor: theme.color.goodSoft
|
|
733
|
+
},
|
|
734
|
+
// The pin anchor is positioned at the pin's tail; the counter-scale keeps the
|
|
735
|
+
// marker screen-sized while the layer zooms.
|
|
736
|
+
pinAnchor: { position: "absolute" },
|
|
737
|
+
pin: {
|
|
738
|
+
width: "100%",
|
|
739
|
+
height: "100%",
|
|
740
|
+
alignItems: "center",
|
|
741
|
+
justifyContent: "center",
|
|
742
|
+
borderRadius: theme.radius.full,
|
|
743
|
+
borderWidth: theme.borderWidth.heavy,
|
|
744
|
+
...theme.shadow.md
|
|
745
|
+
},
|
|
746
|
+
// The raw accent stays: border and fill are the same colour, so this pin has
|
|
747
|
+
// no independent edge to measure — the glyph inside rides `accentInk`.
|
|
748
|
+
pinActive: {
|
|
749
|
+
backgroundColor: theme.color.accent,
|
|
750
|
+
borderColor: theme.color.accent
|
|
751
|
+
},
|
|
752
|
+
pinIdle: {
|
|
753
|
+
backgroundColor: theme.color.surface,
|
|
754
|
+
borderColor: theme.color.borderStrong
|
|
755
|
+
},
|
|
756
|
+
pinVisited: {
|
|
757
|
+
backgroundColor: theme.color.surface3,
|
|
758
|
+
borderColor: theme.color.borderStrong
|
|
759
|
+
},
|
|
760
|
+
pinCluster: {
|
|
761
|
+
width: "auto",
|
|
762
|
+
minWidth: theme.ctl.md,
|
|
763
|
+
paddingHorizontal: theme.space[6],
|
|
764
|
+
backgroundColor: theme.color.accentSoft,
|
|
765
|
+
borderColor: theme.color.accentStrong
|
|
766
|
+
},
|
|
767
|
+
clusterCount: {
|
|
768
|
+
fontFamily: theme.font.mono,
|
|
769
|
+
fontWeight: theme.fontWeight.semibold,
|
|
770
|
+
fontSize: theme.fontSize[12],
|
|
771
|
+
color: theme.color.text
|
|
772
|
+
},
|
|
773
|
+
tail: {
|
|
774
|
+
position: "absolute",
|
|
775
|
+
bottom: -4,
|
|
776
|
+
width: SPEC.tail * 2,
|
|
777
|
+
height: SPEC.tail * 2,
|
|
778
|
+
transform: [{ rotate: "45deg" }],
|
|
779
|
+
zIndex: -1
|
|
780
|
+
},
|
|
781
|
+
tailActive: { backgroundColor: theme.color.accent },
|
|
782
|
+
tailIdle: { backgroundColor: theme.color.borderStrong },
|
|
783
|
+
tailVisited: { backgroundColor: theme.color.surface3 },
|
|
784
|
+
mark: {
|
|
785
|
+
fontFamily: theme.font.sans,
|
|
786
|
+
fontWeight: theme.fontWeight.semibold,
|
|
787
|
+
fontSize: theme.fontSize[13],
|
|
788
|
+
color: theme.color.text
|
|
789
|
+
},
|
|
790
|
+
markActive: { color: theme.color.accentInk },
|
|
791
|
+
// loam-contrast-ignore — the halo is a decorative accuracy wash; the dot
|
|
792
|
+
// inside it carries the meaning with its own edge.
|
|
793
|
+
halo: {
|
|
794
|
+
position: "absolute",
|
|
795
|
+
borderRadius: theme.radius.full,
|
|
796
|
+
backgroundColor: theme.color.accentSoft
|
|
797
|
+
},
|
|
798
|
+
userDot: {
|
|
799
|
+
position: "absolute",
|
|
800
|
+
width: SPEC.userDot,
|
|
801
|
+
height: SPEC.userDot,
|
|
802
|
+
marginLeft: -16 / 2,
|
|
803
|
+
marginTop: -16 / 2,
|
|
804
|
+
borderRadius: theme.radius.full,
|
|
805
|
+
backgroundColor: theme.color.accent,
|
|
806
|
+
// The design's 3px ring has no token: 2 × `borderWidth.thick` (1.5) is exact.
|
|
807
|
+
borderWidth: theme.borderWidth.thick * 2,
|
|
808
|
+
borderColor: theme.color.surface
|
|
809
|
+
},
|
|
810
|
+
topRow: {
|
|
811
|
+
position: "absolute",
|
|
812
|
+
left: theme.space[12],
|
|
813
|
+
right: theme.space[12],
|
|
814
|
+
top: theme.space[12],
|
|
815
|
+
gap: theme.space[8]
|
|
816
|
+
},
|
|
817
|
+
search: { width: "100%" },
|
|
818
|
+
chips: { flexDirection: "row", flexWrap: "wrap", gap: theme.space[6] },
|
|
819
|
+
areaOffer: {
|
|
820
|
+
position: "absolute",
|
|
821
|
+
alignSelf: "center",
|
|
822
|
+
left: 0,
|
|
823
|
+
right: 0,
|
|
824
|
+
top: theme.space[10],
|
|
825
|
+
alignItems: "center"
|
|
826
|
+
},
|
|
827
|
+
areaOfferLow: { top: SPEC.topRowClear },
|
|
828
|
+
overlay: {
|
|
829
|
+
position: "absolute",
|
|
830
|
+
left: 0,
|
|
831
|
+
right: 0,
|
|
832
|
+
top: 0,
|
|
833
|
+
bottom: 0,
|
|
834
|
+
alignItems: "center",
|
|
835
|
+
justifyContent: "center",
|
|
836
|
+
padding: theme.space[16]
|
|
837
|
+
},
|
|
838
|
+
overlayTop: {
|
|
839
|
+
justifyContent: "flex-start",
|
|
840
|
+
paddingTop: theme.space[12],
|
|
841
|
+
paddingLeft: theme.space[12],
|
|
842
|
+
paddingRight: SPEC.controlsEnd
|
|
843
|
+
},
|
|
844
|
+
statusPill: {
|
|
845
|
+
flexDirection: "row",
|
|
846
|
+
alignItems: "center",
|
|
847
|
+
gap: theme.space[8],
|
|
848
|
+
height: theme.ctl.sm,
|
|
849
|
+
paddingHorizontal: theme.space[12],
|
|
850
|
+
borderRadius: theme.radius.full,
|
|
851
|
+
borderWidth: theme.borderWidth.base,
|
|
852
|
+
borderColor: theme.color.border,
|
|
853
|
+
backgroundColor: theme.color.surface,
|
|
854
|
+
...theme.shadow.md
|
|
855
|
+
},
|
|
856
|
+
statusPillText: {
|
|
857
|
+
fontFamily: theme.font.sans,
|
|
858
|
+
fontSize: theme.fontSize[13],
|
|
859
|
+
fontWeight: theme.fontWeight.medium,
|
|
860
|
+
color: theme.color.text
|
|
861
|
+
},
|
|
862
|
+
banner: {
|
|
863
|
+
alignSelf: "stretch",
|
|
864
|
+
flexDirection: "row",
|
|
865
|
+
alignItems: "center",
|
|
866
|
+
gap: theme.space[8],
|
|
867
|
+
paddingVertical: theme.space[8],
|
|
868
|
+
paddingHorizontal: theme.space[12],
|
|
869
|
+
borderRadius: theme.radius.sm,
|
|
870
|
+
borderWidth: theme.borderWidth.thin,
|
|
871
|
+
...theme.shadow.sm
|
|
872
|
+
},
|
|
873
|
+
bannerWarn: { backgroundColor: theme.color.warnSoft, borderColor: theme.edge.warn },
|
|
874
|
+
bannerInfo: { backgroundColor: theme.color.infoSoft, borderColor: theme.edge.info },
|
|
875
|
+
bannerText: { flex: 1, fontFamily: theme.font.sans, fontSize: theme.fontSize[13] },
|
|
876
|
+
bannerAction: {
|
|
877
|
+
fontFamily: theme.font.sans,
|
|
878
|
+
fontSize: theme.fontSize[12],
|
|
879
|
+
fontWeight: theme.fontWeight.semibold,
|
|
880
|
+
textDecorationLine: "underline"
|
|
881
|
+
},
|
|
882
|
+
statusBox: {
|
|
883
|
+
alignItems: "center",
|
|
884
|
+
gap: theme.space[12],
|
|
885
|
+
padding: theme.space[16],
|
|
886
|
+
borderRadius: theme.radius.lg,
|
|
887
|
+
borderWidth: theme.borderWidth.base,
|
|
888
|
+
borderColor: theme.color.border,
|
|
889
|
+
backgroundColor: theme.color.surface,
|
|
890
|
+
...theme.shadow.md
|
|
891
|
+
},
|
|
892
|
+
statusText: {
|
|
893
|
+
fontFamily: theme.font.sans,
|
|
894
|
+
fontSize: theme.fontSize[14],
|
|
895
|
+
color: theme.color.text,
|
|
896
|
+
textAlign: "center"
|
|
897
|
+
},
|
|
898
|
+
controls: {
|
|
899
|
+
position: "absolute",
|
|
900
|
+
right: theme.space[10],
|
|
901
|
+
top: theme.space[10],
|
|
902
|
+
gap: theme.space[8]
|
|
903
|
+
},
|
|
904
|
+
controlsLow: { top: SPEC.controlsClear },
|
|
905
|
+
// Every single control is its own group, as the zoom pair is.
|
|
906
|
+
groupSolo: {
|
|
907
|
+
borderWidth: theme.borderWidth.base,
|
|
908
|
+
borderColor: theme.color.border,
|
|
909
|
+
...theme.shadow.sm
|
|
910
|
+
},
|
|
911
|
+
controlOn: { backgroundColor: theme.state.selected },
|
|
912
|
+
group: {
|
|
913
|
+
borderRadius: theme.radius.md,
|
|
914
|
+
borderWidth: theme.borderWidth.base,
|
|
915
|
+
borderColor: theme.color.border,
|
|
916
|
+
backgroundColor: theme.color.surface,
|
|
917
|
+
overflow: "hidden",
|
|
918
|
+
...theme.shadow.sm
|
|
919
|
+
},
|
|
920
|
+
groupDivider: { height: theme.borderWidth.base, backgroundColor: theme.color.border },
|
|
921
|
+
// 44: the touch tier, r12 — the whole control is the target.
|
|
922
|
+
control: {
|
|
923
|
+
width: theme.tapMin,
|
|
924
|
+
height: theme.tapMin,
|
|
925
|
+
borderRadius: theme.radius.md,
|
|
926
|
+
alignItems: "center",
|
|
927
|
+
justifyContent: "center",
|
|
928
|
+
backgroundColor: theme.color.surface
|
|
929
|
+
},
|
|
930
|
+
// The layers menu opens beneath the control stack, trailing-aligned.
|
|
931
|
+
layerMenu: {
|
|
932
|
+
alignSelf: "flex-end",
|
|
933
|
+
minWidth: theme.space[36],
|
|
934
|
+
padding: theme.space[4],
|
|
935
|
+
borderRadius: theme.radius.md,
|
|
936
|
+
borderWidth: theme.borderWidth.base,
|
|
937
|
+
borderColor: theme.color.border,
|
|
938
|
+
backgroundColor: theme.color.surface,
|
|
939
|
+
...theme.shadow.md
|
|
940
|
+
},
|
|
941
|
+
layerItem: {
|
|
942
|
+
minHeight: theme.tapMin,
|
|
943
|
+
justifyContent: "center",
|
|
944
|
+
paddingHorizontal: theme.space[12],
|
|
945
|
+
borderRadius: theme.radius.sm
|
|
946
|
+
},
|
|
947
|
+
layerItemOn: { backgroundColor: theme.state.selected },
|
|
948
|
+
layerText: { fontFamily: theme.font.sans, fontSize: theme.fontSize[14], color: theme.color.text },
|
|
949
|
+
layerTextOn: { fontWeight: theme.fontWeight.semibold },
|
|
950
|
+
// Scale bar: a plate on the leading edge, sharing the attribution's baseline.
|
|
951
|
+
scale: {
|
|
952
|
+
position: "absolute",
|
|
953
|
+
left: SPEC.attributionEnd,
|
|
954
|
+
gap: theme.space[2],
|
|
955
|
+
paddingHorizontal: theme.space[6],
|
|
956
|
+
paddingVertical: theme.space[2],
|
|
957
|
+
borderRadius: theme.radius.xs,
|
|
958
|
+
backgroundColor: theme.color.surface
|
|
959
|
+
},
|
|
960
|
+
scaleText: {
|
|
961
|
+
fontFamily: theme.font.mono,
|
|
962
|
+
fontSize: SPEC.attributionSize,
|
|
963
|
+
color: theme.color.text2
|
|
964
|
+
},
|
|
965
|
+
scaleBar: {
|
|
966
|
+
width: theme.space[56],
|
|
967
|
+
height: theme.space[6],
|
|
968
|
+
borderColor: theme.color.text2,
|
|
969
|
+
borderLeftWidth: theme.borderWidth.base,
|
|
970
|
+
borderRightWidth: theme.borderWidth.base,
|
|
971
|
+
borderBottomWidth: theme.borderWidth.base
|
|
972
|
+
},
|
|
973
|
+
// A measured offset clears the card or sheet; 11 on a plate so it stays legible.
|
|
974
|
+
attribution: {
|
|
975
|
+
position: "absolute",
|
|
976
|
+
right: SPEC.attributionEnd,
|
|
977
|
+
paddingHorizontal: theme.space[6],
|
|
978
|
+
paddingVertical: theme.space[2],
|
|
979
|
+
borderRadius: theme.radius.xs,
|
|
980
|
+
backgroundColor: theme.color.surface,
|
|
981
|
+
fontFamily: theme.font.mono,
|
|
982
|
+
fontSize: SPEC.attributionSize,
|
|
983
|
+
color: theme.color.text2
|
|
984
|
+
},
|
|
985
|
+
card: {
|
|
986
|
+
position: "absolute",
|
|
987
|
+
left: theme.space[10],
|
|
988
|
+
right: theme.space[10],
|
|
989
|
+
bottom: theme.space[10],
|
|
990
|
+
flexDirection: "row",
|
|
991
|
+
alignItems: "center",
|
|
992
|
+
gap: SPEC.cardGap,
|
|
993
|
+
padding: theme.space[12],
|
|
994
|
+
borderRadius: theme.radius.md,
|
|
995
|
+
borderWidth: theme.borderWidth.base,
|
|
996
|
+
borderColor: theme.color.border,
|
|
997
|
+
backgroundColor: theme.color.surface,
|
|
998
|
+
...theme.shadow.md
|
|
999
|
+
},
|
|
1000
|
+
cardStacked: { flexDirection: "column", alignItems: "stretch" },
|
|
1001
|
+
cardHead: { flexDirection: "row", alignItems: "center", gap: SPEC.cardGap },
|
|
1002
|
+
cardActions: { flexDirection: "row", flexWrap: "wrap", gap: theme.space[8] },
|
|
1003
|
+
rating: { flexDirection: "row", alignItems: "center", gap: theme.space[4] },
|
|
1004
|
+
ratingText: {
|
|
1005
|
+
fontFamily: theme.font.mono,
|
|
1006
|
+
fontSize: theme.fontSize[12],
|
|
1007
|
+
color: theme.color.text2
|
|
1008
|
+
},
|
|
1009
|
+
cardThumb: {
|
|
1010
|
+
width: SPEC.thumb,
|
|
1011
|
+
height: SPEC.thumb,
|
|
1012
|
+
borderRadius: theme.radius.md,
|
|
1013
|
+
backgroundColor: theme.color.surface3
|
|
1014
|
+
},
|
|
1015
|
+
// `minWidth: 0` lets a long place name truncate instead of shoving the action out.
|
|
1016
|
+
cardText: { flex: 1, minWidth: 0, gap: theme.space[2] },
|
|
1017
|
+
cardName: {
|
|
1018
|
+
fontFamily: theme.font.sans,
|
|
1019
|
+
fontWeight: theme.fontWeight.semibold,
|
|
1020
|
+
fontSize: SPEC.nameSize,
|
|
1021
|
+
lineHeight: SPEC.nameSize * theme.lineHeight.snug,
|
|
1022
|
+
color: theme.color.text
|
|
1023
|
+
},
|
|
1024
|
+
cardClosed: { color: theme.color.text3 },
|
|
1025
|
+
cardMeta: {
|
|
1026
|
+
fontFamily: theme.font.sans,
|
|
1027
|
+
fontSize: SPEC.metaSize,
|
|
1028
|
+
color: theme.color.text2
|
|
1029
|
+
},
|
|
1030
|
+
resultSheet: {
|
|
1031
|
+
position: "absolute",
|
|
1032
|
+
left: 0,
|
|
1033
|
+
right: 0,
|
|
1034
|
+
bottom: 0,
|
|
1035
|
+
paddingVertical: theme.space[8],
|
|
1036
|
+
borderTopLeftRadius: theme.radius.lg,
|
|
1037
|
+
borderTopRightRadius: theme.radius.lg,
|
|
1038
|
+
borderWidth: theme.borderWidth.base,
|
|
1039
|
+
borderColor: theme.color.border,
|
|
1040
|
+
backgroundColor: theme.color.surface,
|
|
1041
|
+
...theme.shadow.lg
|
|
1042
|
+
},
|
|
1043
|
+
sheetHeader: {
|
|
1044
|
+
paddingHorizontal: theme.space[16],
|
|
1045
|
+
paddingVertical: theme.space[8],
|
|
1046
|
+
fontFamily: theme.font.sans,
|
|
1047
|
+
fontWeight: theme.fontWeight.semibold,
|
|
1048
|
+
fontSize: theme.fontSize[14],
|
|
1049
|
+
color: theme.color.text
|
|
1050
|
+
},
|
|
1051
|
+
// Two rows (56 + 2 + 2 margin each) show; a third peeks only when scrolled.
|
|
1052
|
+
sheetScroll: { maxHeight: (SPEC.resultRow + theme.space[4]) * 2 },
|
|
1053
|
+
resultRow: {
|
|
1054
|
+
minHeight: SPEC.resultRow,
|
|
1055
|
+
flexDirection: "row",
|
|
1056
|
+
alignItems: "center",
|
|
1057
|
+
gap: SPEC.cardGap,
|
|
1058
|
+
paddingHorizontal: theme.space[12],
|
|
1059
|
+
marginHorizontal: theme.space[8],
|
|
1060
|
+
marginVertical: theme.space[2],
|
|
1061
|
+
borderRadius: theme.radius.sm
|
|
1062
|
+
},
|
|
1063
|
+
resultRowActive: { backgroundColor: theme.state.selected },
|
|
1064
|
+
resultMark: {
|
|
1065
|
+
width: SPEC.pinIdle,
|
|
1066
|
+
height: SPEC.pinIdle,
|
|
1067
|
+
alignItems: "center",
|
|
1068
|
+
justifyContent: "center",
|
|
1069
|
+
borderRadius: theme.radius.full,
|
|
1070
|
+
borderWidth: theme.borderWidth.heavy,
|
|
1071
|
+
borderColor: theme.color.borderStrong,
|
|
1072
|
+
backgroundColor: theme.color.surface
|
|
1073
|
+
},
|
|
1074
|
+
resultMarkActive: { backgroundColor: theme.color.accent, borderColor: theme.color.accent }
|
|
1075
|
+
}));
|
|
1076
|
+
|
|
1077
|
+
export { MapView };
|