@btndprojects/loam-ui-native 0.1.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 +7 -3
- package/dist/adaptive/index.js +16 -2
- package/dist/address-block/index.js +23 -0
- package/dist/alert/index.js +8 -2
- package/dist/analyzer/index.js +17 -6
- package/dist/announcement/index.js +18 -5
- package/dist/appearance-picker/index.js +15 -0
- package/dist/audio-player/index.js +29 -3
- package/dist/avatar/index.js +5 -2
- package/dist/avatar-group/index.js +9 -3
- package/dist/badge/index.js +10 -4
- package/dist/banner/index.js +6 -2
- package/dist/board/index.js +18 -6
- package/dist/button/index.js +9 -3
- package/dist/camera-permission/index.js +23 -12
- package/dist/capture-result/index.js +30 -17
- package/dist/card/index.js +10 -3
- package/dist/card-form/index.js +19 -9
- package/dist/carousel/index.js +6 -2
- package/dist/chart/index.js +18 -5
- package/dist/charts/index.js +21 -6
- package/dist/chat/index.js +41 -0
- package/dist/checkbox/index.js +9 -5
- package/dist/checklist/index.js +20 -8
- package/dist/checkout/index.js +30 -12
- package/dist/chip/index.js +11 -5
- package/dist/chunk-2BZD3NAP.js +1110 -0
- package/dist/chunk-2YKVID2V.js +35 -0
- package/dist/{chunk-JUAMLEHX.js → chunk-36DA3IPO.js} +137 -37
- package/dist/chunk-3A56MIAN.js +599 -0
- package/dist/chunk-3SCKCWF5.js +298 -0
- package/dist/chunk-3TZNDHKO.js +187 -0
- package/dist/chunk-43K3BLXV.js +9 -0
- package/dist/chunk-46ZJIQ2Z.js +208 -0
- package/dist/chunk-4CZMQDQL.js +192 -0
- package/dist/chunk-5DTKORLI.js +255 -0
- package/dist/{chunk-LOE5YNN3.js → chunk-5J4WFXFA.js} +68 -24
- package/dist/chunk-5KJ7TEQ6.js +305 -0
- package/dist/chunk-5NU33TXK.js +529 -0
- package/dist/chunk-5Z5ZYMOJ.js +1 -0
- package/dist/chunk-6KSUS7DF.js +690 -0
- package/dist/chunk-6RV6UW2J.js +349 -0
- package/dist/chunk-6RZM7RP2.js +520 -0
- package/dist/{chunk-4BXMXBJO.js → chunk-75BDCC7K.js} +24 -11
- package/dist/{chunk-PZXZJBMP.js → chunk-7CGJBQUA.js} +357 -32
- package/dist/{chunk-CJ5EOYZE.js → chunk-7IVF6JLJ.js} +24 -7
- package/dist/chunk-7IWCGXYA.js +143 -0
- package/dist/chunk-7LM4ASFH.js +172 -0
- package/dist/chunk-7MCEJFWV.js +341 -0
- package/dist/chunk-7NGMUVNU.js +245 -0
- package/dist/chunk-7PBSIXT7.js +355 -0
- package/dist/chunk-7QOYGENL.js +443 -0
- package/dist/{chunk-H6NIOQHK.js → chunk-A7SWYDE5.js} +66 -15
- package/dist/chunk-ADHPJALR.js +3051 -0
- package/dist/chunk-ALJYZLNQ.js +509 -0
- package/dist/chunk-APCWFOZW.js +28 -0
- package/dist/chunk-AQ5FIG74.js +419 -0
- package/dist/chunk-AWKQIE5I.js +139 -0
- package/dist/chunk-B2MMZZQB.js +426 -0
- package/dist/{chunk-ZVFE5QGU.js → chunk-B7JZ3N5G.js} +174 -97
- package/dist/chunk-BL37SW6G.js +1314 -0
- package/dist/chunk-BTRMA7GC.js +21 -0
- package/dist/chunk-C7IUWIUZ.js +643 -0
- package/dist/chunk-CA3DUVYD.js +10 -0
- package/dist/{chunk-S7F6XLTK.js → chunk-CBCJSO2B.js} +213 -54
- package/dist/chunk-CHPX4MFI.js +239 -0
- package/dist/chunk-CLGAMIOT.js +648 -0
- package/dist/chunk-CUE7VML6.js +1141 -0
- package/dist/chunk-CVU6S2E5.js +1587 -0
- package/dist/{chunk-AZRX6SAC.js → chunk-CXPQMA6Z.js} +112 -37
- package/dist/chunk-D2LN4I7I.js +581 -0
- package/dist/{chunk-UWFLYMAR.js → chunk-D34LNBO5.js} +635 -238
- package/dist/chunk-D4BCQICM.js +765 -0
- 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-BEDBFJND.js → chunk-ESGUHNB2.js} +119 -43
- package/dist/{chunk-Q72LJOVE.js → chunk-F2KNBPKY.js} +74 -18
- package/dist/{chunk-O7AE6DAF.js → chunk-G7H3NX3G.js} +57 -24
- package/dist/chunk-GM7YIPB7.js +1052 -0
- package/dist/chunk-GVQQG435.js +581 -0
- package/dist/chunk-HE43OMEL.js +1056 -0
- package/dist/chunk-HHOMFQ7R.js +2535 -0
- package/dist/chunk-HJFFOOJ4.js +1 -0
- package/dist/chunk-HNAKS4Z3.js +207 -0
- package/dist/chunk-HP6ST2OW.js +352 -0
- package/dist/chunk-HW3OWDTU.js +1 -0
- package/dist/{chunk-3ENTMPQY.js → chunk-HZDB44K4.js} +102 -52
- package/dist/chunk-I2KLQ2HA.js +19 -0
- package/dist/chunk-I6CUP2LW.js +1155 -0
- package/dist/chunk-ICV4Y2WY.js +27 -0
- package/dist/chunk-IHSIENOE.js +3950 -0
- package/dist/{chunk-CUMUNPXY.js → chunk-IMMALLRU.js} +68 -32
- package/dist/chunk-J64KGCGX.js +55 -0
- package/dist/{chunk-IVNRBPGC.js → chunk-JA6TK7H2.js} +255 -84
- package/dist/{chunk-OOPPQH27.js → chunk-JAVZ5JPV.js} +83 -29
- package/dist/chunk-JCMTP3E4.js +1251 -0
- package/dist/{chunk-U7TFM2JA.js → chunk-JCXFFK64.js} +75 -18
- package/dist/chunk-JWCVBFDU.js +236 -0
- 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-KHZDNQQD.js +171 -0
- package/dist/chunk-KL4GDV4V.js +131 -0
- package/dist/chunk-KNILMM4H.js +225 -0
- package/dist/chunk-KRBUZV45.js +25 -0
- package/dist/{chunk-ITTYJZWX.js → chunk-KXLDK6HB.js} +161 -45
- package/dist/chunk-KZ3X7TSL.js +196 -0
- package/dist/chunk-L2WMOA2V.js +474 -0
- package/dist/chunk-L4D5LHCH.js +109 -0
- package/dist/chunk-LAUJPLDB.js +853 -0
- package/dist/{chunk-SBMNWWBV.js → chunk-LGNTP5XA.js} +89 -17
- package/dist/chunk-LUZFCCSD.js +271 -0
- package/dist/{chunk-HPPW424V.js → chunk-LXJCP4PL.js} +129 -37
- package/dist/chunk-MCOZJWPU.js +731 -0
- package/dist/chunk-MG4SKWLL.js +2587 -0
- package/dist/chunk-MPEPTSER.js +414 -0
- package/dist/chunk-MWPJ4YGP.js +1 -0
- package/dist/{chunk-TKQYWZ5V.js → chunk-N7AX4OA4.js} +108 -41
- package/dist/chunk-NHSLM6SE.js +523 -0
- package/dist/chunk-NNCOFLNE.js +24 -0
- package/dist/{chunk-J7Q7VCVC.js → chunk-NNJLVA7M.js} +54 -15
- package/dist/chunk-NZG75DGA.js +282 -0
- 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-YF4NSSMT.js → chunk-ONKQUJWD.js} +220 -65
- package/dist/chunk-OVTK7A6T.js +615 -0
- package/dist/chunk-PCEFCOLN.js +120 -0
- package/dist/chunk-PFLNFIVB.js +186 -0
- package/dist/chunk-PHSZY37H.js +300 -0
- package/dist/chunk-PJLTKDVY.js +18 -0
- package/dist/{chunk-4YIP3CWS.js → chunk-PK7BN3MI.js} +89 -19
- package/dist/{chunk-KMI5ML5I.js → chunk-PWFRDRGS.js} +155 -29
- package/dist/chunk-PYPMD46W.js +707 -0
- package/dist/chunk-Q6CCHDI7.js +331 -0
- package/dist/chunk-QFA5WS2A.js +750 -0
- package/dist/chunk-QJMMM4RC.js +124 -0
- package/dist/chunk-QNZII37O.js +10 -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-YC6WORFL.js → chunk-RAESDNU5.js} +228 -102
- 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-LAECSR4H.js → chunk-RJA3RXO3.js} +75 -60
- package/dist/chunk-RJYRJ3LD.js +1 -0
- package/dist/chunk-RMA3NOY4.js +599 -0
- package/dist/{chunk-DM5QUKKO.js → chunk-RSWKKAHK.js} +160 -66
- package/dist/chunk-RVOIIX3V.js +204 -0
- package/dist/chunk-SA2RRBGT.js +1077 -0
- package/dist/chunk-SG3J4R45.js +1428 -0
- package/dist/chunk-SPUK7JD4.js +238 -0
- package/dist/chunk-SWXV2K5N.js +434 -0
- package/dist/chunk-SYJEPXP6.js +1303 -0
- package/dist/{chunk-N32RGOA5.js → chunk-SZLI34TA.js} +93 -28
- package/dist/{chunk-4GBOGOTV.js → chunk-T77WJA74.js} +143 -18
- 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-CYRBHQQZ.js → chunk-TUL5RUIA.js} +201 -59
- package/dist/{chunk-4ZAHCY44.js → chunk-TYOSA7JG.js} +74 -38
- package/dist/chunk-TYQTMMEV.js +1 -0
- package/dist/chunk-TZO6YDS7.js +346 -0
- package/dist/chunk-U3ETF22F.js +328 -0
- package/dist/chunk-U6BYHD2N.js +213 -0
- package/dist/{chunk-WSW6ZFAQ.js → chunk-UF6EJXPQ.js} +20 -5
- package/dist/chunk-UNNQIPGK.js +792 -0
- package/dist/chunk-UQEN55EY.js +1 -0
- package/dist/chunk-UQVO6AJV.js +171 -0
- package/dist/chunk-VFDQAAIW.js +351 -0
- package/dist/chunk-VIUE3VQT.js +1 -0
- package/dist/chunk-VJLSSSGC.js +438 -0
- package/dist/chunk-VLMT6KYT.js +350 -0
- package/dist/chunk-VMHGBUGS.js +35 -0
- package/dist/{chunk-7O2FMUPT.js → chunk-VQKPBYW6.js} +400 -139
- package/dist/{chunk-EJBDRVIH.js → chunk-VSSTWLC5.js} +61 -16
- package/dist/chunk-VZYYZRPN.js +1992 -0
- package/dist/chunk-W23G6JLF.js +37 -0
- package/dist/chunk-WAIJCD2V.js +480 -0
- package/dist/chunk-WFMQ3WKM.js +378 -0
- package/dist/chunk-WJ2KDRMY.js +66 -0
- package/dist/chunk-WKFZJO54.js +437 -0
- package/dist/{chunk-SYNOJOQO.js → chunk-WVVD3XOV.js} +189 -93
- 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-35OFI3JG.js → chunk-Y3XKKO5K.js} +258 -123
- package/dist/chunk-Y4QNMBLO.js +533 -0
- package/dist/chunk-Y5H4CTKO.js +1 -0
- package/dist/chunk-YBQIN75A.js +403 -0
- package/dist/chunk-YJ5PXOX3.js +158 -0
- package/dist/{chunk-AWJOCGFZ.js → chunk-YLRSRUPS.js} +81 -55
- package/dist/chunk-YM6MPJ4A.js +1 -0
- package/dist/chunk-YV7KZENV.js +200 -0
- package/dist/chunk-Z7I4ZSO6.js +316 -0
- package/dist/chunk-ZIRMWD2B.js +555 -0
- package/dist/chunk-ZPMG3FWU.js +75 -0
- package/dist/{chunk-QWCMU5B2.js → chunk-ZTXMK2G7.js} +289 -115
- package/dist/chunk-ZVJCWXAL.js +541 -0
- package/dist/{chunk-P23EQNRQ.js → chunk-ZYQ23DPT.js} +215 -49
- package/dist/coachmark/index.js +10 -3
- package/dist/code-block/index.js +6 -3
- package/dist/color-field/index.js +15 -5
- package/dist/color-picker/index.js +23 -0
- package/dist/commerce/index.js +31 -17
- package/dist/confirm/index.js +31 -0
- package/dist/connection-card/index.js +34 -0
- package/dist/connectivity/index.js +6 -2
- package/dist/context-menu/index.js +13 -3
- package/dist/copy-button/index.js +5 -2
- package/dist/data-grid/index.js +35 -17
- package/dist/date-range-picker/index.js +22 -9
- package/dist/description-list/index.js +6 -1
- package/dist/device-frame/index.js +30 -0
- package/dist/dialog/index.js +10 -2
- package/dist/divider/index.js +2 -0
- package/dist/empty-state/index.js +15 -2
- package/dist/error-summary/index.js +9 -2
- package/dist/fab/index.js +7 -2
- package/dist/file-manager/index.js +44 -0
- package/dist/file-upload/index.js +16 -7
- package/dist/filter-bar/index.js +14 -7
- package/dist/flow-run/index.js +23 -13
- package/dist/form/index.js +32 -3
- package/dist/gallery/index.js +8 -2
- package/dist/hold-to-confirm/index.js +6 -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 +30789 -12332
- package/dist/index.js +424 -135
- package/dist/infinite-list/index.js +6 -2
- package/dist/inline-edit/index.js +8 -5
- package/dist/input/index.js +7 -4
- package/dist/interactions/index.js +5 -1
- package/dist/invoice/index.js +22 -9
- package/dist/job-row/index.js +22 -0
- package/dist/json-inspector/index.js +20 -0
- package/dist/kbd/index.js +5 -1
- package/dist/keyboard/index.js +9 -2
- package/dist/level-meter/index.js +9 -0
- package/dist/list-row/index.js +14 -4
- package/dist/log-viewer/index.js +11 -2
- package/dist/map-view/index.js +16 -3
- package/dist/markdown/index.js +12 -6
- package/dist/metric/index.js +10 -4
- package/dist/metric-strip/index.js +12 -0
- package/dist/money/index.js +16 -3
- package/dist/nav-drawer/index.js +8 -2
- package/dist/nav-header/index.js +15 -0
- package/dist/navigation/index.js +32 -2
- package/dist/notification-center/index.js +28 -12
- package/dist/number-roll/index.js +7 -2
- package/dist/onboarding-pager/index.js +22 -0
- package/dist/one-handed/index.js +5 -3
- package/dist/os-surfaces/index.js +9 -3
- package/dist/otp/index.js +9 -5
- package/dist/page-header/index.js +3 -1
- package/dist/pagination/index.js +8 -0
- package/dist/payment-method/index.js +21 -11
- package/dist/payment-status/index.js +26 -15
- package/dist/permission/index.js +21 -2
- package/dist/picker/index.js +22 -6
- package/dist/progress/index.js +11 -3
- package/dist/provenance/index.js +16 -0
- package/dist/pull-to-refresh/index.js +4 -2
- package/dist/qr-code/index.js +16 -0
- package/dist/query-builder/index.js +30 -0
- package/dist/radio-group/index.js +9 -5
- package/dist/rating/index.js +10 -2
- package/dist/receivables/index.js +35 -17
- package/dist/recording-indicator/index.js +21 -0
- package/dist/refund/index.js +28 -15
- package/dist/repeatable-rows/index.js +19 -0
- package/dist/save-status/index.js +7 -3
- package/dist/screen/index.js +3 -0
- package/dist/scroll-area/index.js +3 -1
- package/dist/search-field/index.js +13 -0
- package/dist/secret-field/index.js +19 -0
- package/dist/section-header/index.js +4 -0
- package/dist/segmented-control/index.js +4 -3
- package/dist/sheet/index.js +11 -3
- package/dist/shortcuts-sheet/index.js +2 -0
- package/dist/sign-in-screen/index.js +25 -0
- package/dist/skeleton/index.js +5 -1
- package/dist/slider/index.js +5 -2
- package/dist/sortable/index.js +8 -0
- package/dist/spinner/index.js +4 -1
- package/dist/split-button/index.js +21 -6
- package/dist/spotlight/index.js +9 -1
- package/dist/stack/index.js +2 -0
- package/dist/stage-timeline/index.js +8 -3
- package/dist/status-dot/index.js +8 -2
- package/dist/stepper/index.js +11 -4
- package/dist/streaming-text/index.js +4 -2
- package/dist/survey/index.js +29 -16
- package/dist/switch/index.js +9 -3
- package/dist/system-state/index.js +15 -4
- package/dist/tab-bar/index.js +13 -2
- package/dist/tabs/index.js +12 -2
- package/dist/tags-input/index.js +13 -0
- package/dist/text/index.js +4 -0
- package/dist/textarea/index.js +8 -5
- package/dist/thinking/index.js +6 -1
- package/dist/tile-rail/index.js +10 -0
- package/dist/time-field/index.js +20 -0
- package/dist/time-range-control/index.js +36 -0
- package/dist/timeline/index.js +4 -2
- package/dist/toast/index.js +6 -2
- package/dist/toolbar/index.js +5 -2
- package/dist/tour/index.js +15 -10
- package/dist/transcript/index.js +28 -0
- package/dist/truncation-notice/index.js +5 -2
- package/dist/update-notice/index.js +19 -9
- package/dist/video-player/index.js +29 -2
- package/dist/viewfinder/index.js +15 -5
- package/dist/widget/index.js +14 -4
- package/dist/wizard/index.js +10 -4
- package/package.json +13 -12
- package/dist/chunk-223Q2T2Q.js +0 -229
- package/dist/chunk-2A5NIQAK.js +0 -254
- package/dist/chunk-2GK6PHGE.js +0 -363
- package/dist/chunk-2ZZ7TDJ4.js +0 -324
- package/dist/chunk-3ARE4TES.js +0 -195
- package/dist/chunk-3NMD74ZU.js +0 -4
- package/dist/chunk-3WPW4KUN.js +0 -182
- package/dist/chunk-423B7SPN.js +0 -993
- package/dist/chunk-47FWHGUN.js +0 -394
- package/dist/chunk-4DS5ZWVC.js +0 -83
- package/dist/chunk-4SZYY6AN.js +0 -99
- package/dist/chunk-4YQOR7JM.js +0 -204
- package/dist/chunk-52X2VYTD.js +0 -228
- package/dist/chunk-5YNTNN5A.js +0 -177
- package/dist/chunk-6HT2LP62.js +0 -504
- package/dist/chunk-6N33LFQA.js +0 -35
- package/dist/chunk-6X6PQ443.js +0 -432
- package/dist/chunk-7CFF4HXS.js +0 -126
- package/dist/chunk-AI4DWZCD.js +0 -162
- package/dist/chunk-BTTFCMKG.js +0 -166
- package/dist/chunk-BV3B2HYZ.js +0 -1635
- package/dist/chunk-C2NTXVWM.js +0 -98
- package/dist/chunk-CDRZHT42.js +0 -424
- package/dist/chunk-DHWADYZX.js +0 -144
- package/dist/chunk-F5XNPWS7.js +0 -1024
- package/dist/chunk-FMYDDECK.js +0 -1521
- package/dist/chunk-GDKZTW34.js +0 -395
- package/dist/chunk-GL7B2DOW.js +0 -134
- package/dist/chunk-GNNJ4GCC.js +0 -471
- package/dist/chunk-HET4LLMX.js +0 -129
- package/dist/chunk-HZ6CNMAF.js +0 -870
- package/dist/chunk-IIQTAY3J.js +0 -715
- package/dist/chunk-JNH2TYIN.js +0 -96
- package/dist/chunk-JNY4ZHAR.js +0 -634
- package/dist/chunk-JXJB2X6M.js +0 -131
- package/dist/chunk-LRJNDEIA.js +0 -302
- package/dist/chunk-LSS54GLJ.js +0 -116
- package/dist/chunk-LZLHELAG.js +0 -137
- package/dist/chunk-MOUJOP55.js +0 -425
- package/dist/chunk-NKB7BZYK.js +0 -167
- package/dist/chunk-NQYBUO3K.js +0 -1795
- package/dist/chunk-O4AEHWII.js +0 -464
- package/dist/chunk-OETCUXQP.js +0 -134
- package/dist/chunk-OPXFZ4Y5.js +0 -204
- package/dist/chunk-PJXUJYS6.js +0 -248
- package/dist/chunk-PUPM2YGF.js +0 -376
- package/dist/chunk-QCDXZBC5.js +0 -247
- package/dist/chunk-QDYDBCFP.js +0 -197
- package/dist/chunk-QJJ6MADV.js +0 -274
- package/dist/chunk-QKXCPTFS.js +0 -349
- package/dist/chunk-RIBDXGUG.js +0 -108
- package/dist/chunk-RJQOOHT2.js +0 -214
- package/dist/chunk-RNGLIHFA.js +0 -191
- package/dist/chunk-RQ3HASCC.js +0 -6
- package/dist/chunk-RSOJT5YW.js +0 -124
- package/dist/chunk-RUZHTGKB.js +0 -237
- package/dist/chunk-RW6ZL2FQ.js +0 -284
- package/dist/chunk-TKVFVF5D.js +0 -95
- package/dist/chunk-TOXAGRDQ.js +0 -144
- package/dist/chunk-TUTI5HOZ.js +0 -112
- package/dist/chunk-UC2WGUP3.js +0 -627
- package/dist/chunk-UYG5L34B.js +0 -87
- package/dist/chunk-VBOXAEPI.js +0 -336
- package/dist/chunk-VCDBXW5H.js +0 -188
- package/dist/chunk-VEAYTRPX.js +0 -414
- package/dist/chunk-VQHPQEUH.js +0 -273
- package/dist/chunk-VXDZFJGP.js +0 -874
- package/dist/chunk-XNUVB5OL.js +0 -375
- package/dist/chunk-XOSCY2CW.js +0 -242
- package/dist/chunk-XXXEFXY5.js +0 -99
- package/dist/chunk-YDGVJETP.js +0 -60
- package/dist/chunk-YG3ZJHGU.js +0 -223
- package/dist/chunk-YTFKPRUK.js +0 -845
- package/dist/chunk-Z7H7VSFZ.js +0 -323
- package/dist/header/index.js +0 -5
- package/dist/search-bar/index.js +0 -5
- /package/dist/{chunk-3ECPOSKO.js → chunk-3BKLBYPK.js} +0 -0
- /package/dist/{chunk-JRLTGLN4.js → chunk-3UG6JUCV.js} +0 -0
- /package/dist/{chunk-RTIKSY6A.js → chunk-4QCR3K2J.js} +0 -0
- /package/dist/{chunk-VFCUIDRT.js → chunk-5WWRTEPS.js} +0 -0
package/dist/chunk-423B7SPN.js
DELETED
|
@@ -1,993 +0,0 @@
|
|
|
1
|
-
import { Stepper } from './chunk-VQHPQEUH.js';
|
|
2
|
-
import { DescriptionList } from './chunk-TUTI5HOZ.js';
|
|
3
|
-
import { Input } from './chunk-ITTYJZWX.js';
|
|
4
|
-
import { PhaseAnnouncement, ConfidenceBadge, MatchRow, NoteBlock } from './chunk-N32RGOA5.js';
|
|
5
|
-
import { Badge } from './chunk-SBMNWWBV.js';
|
|
6
|
-
import { Card, CardHeader, CardTitle, CardContent, CardFooter } from './chunk-KMI5ML5I.js';
|
|
7
|
-
import { PlaceholderFeed } from './chunk-LAECSR4H.js';
|
|
8
|
-
import { decorativeProps, GuidanceChip, camInk } from './chunk-RW6ZL2FQ.js';
|
|
9
|
-
import { Button } from './chunk-3ARE4TES.js';
|
|
10
|
-
import { useReducedMotion } from './chunk-6N33LFQA.js';
|
|
11
|
-
import { Icon } from './chunk-TKVFVF5D.js';
|
|
12
|
-
import * as React5 from 'react';
|
|
13
|
-
import { Animated, View, Text, Pressable, Platform, findNodeHandle, AccessibilityInfo, PanResponder, ScrollView, Easing } from 'react-native';
|
|
14
|
-
import Svg, { Defs, LinearGradient, Stop, Rect } from 'react-native-svg';
|
|
15
|
-
import { createStyleSheet, useLoamTheme, useStyles } from '@btndprojects/loam-theme-native';
|
|
16
|
-
import { STAGE_PRIVACY, profile, pipelineFrom, PIPELINE_FOOTER, RESULT_NOTES, estimateRange, failure, failureBody, FAILURE_OFFER_PREFIX, FAILURE_SECONDARY_LABEL, failurePrimaryLabel, CAPTURED_PILL, resultPrimaryLabel, fieldFlagged, FIELD_FLAG_COPY } from '@btndprojects/loam-analyzer';
|
|
17
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
18
|
-
import { money } from '@btndprojects/loam-pay';
|
|
19
|
-
|
|
20
|
-
function ScanSweep({ active = true }) {
|
|
21
|
-
const theme = useLoamTheme();
|
|
22
|
-
const reduced = useReducedMotion();
|
|
23
|
-
const { styles } = useStyles(analysisSheet);
|
|
24
|
-
const [band, setBand] = React5.useState(0);
|
|
25
|
-
const phase = React5.useRef(new Animated.Value(0)).current;
|
|
26
|
-
const still = reduced || theme.reduceMotion;
|
|
27
|
-
React5.useEffect(() => {
|
|
28
|
-
if (!active || still || band === 0) {
|
|
29
|
-
phase.setValue(0);
|
|
30
|
-
return;
|
|
31
|
-
}
|
|
32
|
-
const leg = (to) => Animated.timing(phase, {
|
|
33
|
-
toValue: to,
|
|
34
|
-
duration: theme.loop.spin * 2,
|
|
35
|
-
easing: Easing.bezier(...theme.easing.inOut),
|
|
36
|
-
useNativeDriver: true
|
|
37
|
-
});
|
|
38
|
-
const loop = Animated.loop(Animated.sequence([leg(1), leg(0)]));
|
|
39
|
-
loop.start();
|
|
40
|
-
return () => loop.stop();
|
|
41
|
-
}, [active, still, band, phase, theme.loop.spin, theme.easing.inOut]);
|
|
42
|
-
if (!active) return null;
|
|
43
|
-
const onLayout = (e) => setBand(e.nativeEvent.layout.height);
|
|
44
|
-
const translateY = still ? band : phase.interpolate({ inputRange: [0, 1], outputRange: [-band, band * 4] });
|
|
45
|
-
return /* @__PURE__ */ jsx(View, { accessible: false, testID: "loam-scan-sweep", style: styles.sweepRoot, ...decorativeProps(), children: /* @__PURE__ */ jsx(
|
|
46
|
-
Animated.View,
|
|
47
|
-
{
|
|
48
|
-
testID: still ? "loam-scan-sweep-static" : "loam-scan-sweep-band",
|
|
49
|
-
onLayout,
|
|
50
|
-
style: [styles.sweepBand, { transform: [{ translateY }] }],
|
|
51
|
-
children: /* @__PURE__ */ jsxs(Svg, { width: "100%", height: "100%", children: [
|
|
52
|
-
/* @__PURE__ */ jsx(Defs, { children: /* @__PURE__ */ jsxs(LinearGradient, { id: "loam-cam-sweep", x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
|
53
|
-
/* @__PURE__ */ jsx(Stop, { offset: "0", stopColor: theme.color.good, stopOpacity: theme.opacity[0] }),
|
|
54
|
-
/* @__PURE__ */ jsx(Stop, { offset: "0.5", stopColor: theme.color.good, stopOpacity: theme.opacity[100] }),
|
|
55
|
-
/* @__PURE__ */ jsx(Stop, { offset: "1", stopColor: theme.color.good, stopOpacity: theme.opacity[0] })
|
|
56
|
-
] }) }),
|
|
57
|
-
/* @__PURE__ */ jsx(Rect, { x: "0", y: "0", width: "100%", height: "100%", fill: "url(#loam-cam-sweep)" })
|
|
58
|
-
] })
|
|
59
|
-
}
|
|
60
|
-
) });
|
|
61
|
-
}
|
|
62
|
-
function StageBadge({ where }) {
|
|
63
|
-
const privacy = STAGE_PRIVACY[where];
|
|
64
|
-
return /* @__PURE__ */ jsx(View, { accessible: false, importantForAccessibility: "no-hide-descendants", ...decorativeProps(), children: /* @__PURE__ */ jsx(Badge, { variant: where === "device" ? "good" : "neutral", size: "sm", children: privacy.badge.toUpperCase() }) });
|
|
65
|
-
}
|
|
66
|
-
function StageDot({ status }) {
|
|
67
|
-
const theme = useLoamTheme();
|
|
68
|
-
const { styles } = useStyles(analysisSheet, { status });
|
|
69
|
-
if (status === "done") {
|
|
70
|
-
return /* @__PURE__ */ jsx(Icon, { name: "check-circle", size: theme.icon.sm, color: theme.color.good });
|
|
71
|
-
}
|
|
72
|
-
if (status === "failed") {
|
|
73
|
-
return /* @__PURE__ */ jsx(Icon, { name: "alert-circle", size: theme.icon.sm, color: theme.color.danger });
|
|
74
|
-
}
|
|
75
|
-
return /* @__PURE__ */ jsx(View, { accessible: false, style: styles.dot });
|
|
76
|
-
}
|
|
77
|
-
function StageRow({ stage, status = "pending" }) {
|
|
78
|
-
const { styles } = useStyles(analysisSheet, { status });
|
|
79
|
-
return /* @__PURE__ */ jsxs(
|
|
80
|
-
View,
|
|
81
|
-
{
|
|
82
|
-
role: "listitem",
|
|
83
|
-
accessible: true,
|
|
84
|
-
accessibilityLabel: `${stage.label}, ${status}, runs on ${stage.where}`,
|
|
85
|
-
testID: `loam-stage-${status}`,
|
|
86
|
-
style: styles.stageRow,
|
|
87
|
-
children: [
|
|
88
|
-
/* @__PURE__ */ jsx(StageDot, { status }),
|
|
89
|
-
/* @__PURE__ */ jsx(Text, { style: styles.stageLabel, children: stage.label }),
|
|
90
|
-
/* @__PURE__ */ jsx(StageBadge, { where: stage.where })
|
|
91
|
-
]
|
|
92
|
-
}
|
|
93
|
-
);
|
|
94
|
-
}
|
|
95
|
-
function defaultTitle(p) {
|
|
96
|
-
return p.id === "car" ? "Reading six angles" : "Analysing";
|
|
97
|
-
}
|
|
98
|
-
function AnalysisProgress({
|
|
99
|
-
profile: profileProp,
|
|
100
|
-
index = 0,
|
|
101
|
-
title,
|
|
102
|
-
cancelLabel = "Cancel",
|
|
103
|
-
onCancel,
|
|
104
|
-
footer = PIPELINE_FOOTER,
|
|
105
|
-
announce = true
|
|
106
|
-
}) {
|
|
107
|
-
const { styles } = useStyles(analysisSheet);
|
|
108
|
-
const p = profile(profileProp);
|
|
109
|
-
const pipeline = pipelineFrom(p, index);
|
|
110
|
-
const heading = title ?? defaultTitle(p);
|
|
111
|
-
const active = pipeline.index >= 0 ? pipeline.stages[pipeline.index] : void 0;
|
|
112
|
-
const message = announce ? active ? `${active.stage.label}, runs on ${active.stage.where}` : heading : null;
|
|
113
|
-
return /* @__PURE__ */ jsxs(Card, { variant: "elevated", style: styles.card, children: [
|
|
114
|
-
/* @__PURE__ */ jsx(PhaseAnnouncement, { message }),
|
|
115
|
-
/* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsx(CardTitle, { children: /* @__PURE__ */ jsx(Text, { accessibilityRole: "header", style: styles.heading, children: heading }) }) }),
|
|
116
|
-
/* @__PURE__ */ jsxs(CardContent, { children: [
|
|
117
|
-
pipeline.stages.length > 0 ? /* @__PURE__ */ jsx(View, { role: "list", style: styles.stageList, children: pipeline.stages.map((s) => /* @__PURE__ */ jsx(StageRow, { stage: s.stage, status: s.status }, s.stage.label)) }) : /* @__PURE__ */ jsx(Text, { style: styles.noPipeline, children: `${p.label} runs no analysis pipeline \u2014 the capture is kept as it is.` }),
|
|
118
|
-
footer ? /* @__PURE__ */ jsx(Text, { style: styles.footer, children: footer }) : null
|
|
119
|
-
] }),
|
|
120
|
-
onCancel && pipeline.cancellable ? /* @__PURE__ */ jsx(CardFooter, { children: /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", onPress: onCancel, children: cancelLabel }) }) : null
|
|
121
|
-
] });
|
|
122
|
-
}
|
|
123
|
-
var analysisSheet = createStyleSheet((theme) => ({
|
|
124
|
-
sweepRoot: {
|
|
125
|
-
pointerEvents: "none",
|
|
126
|
-
position: "absolute",
|
|
127
|
-
top: theme.space[0],
|
|
128
|
-
bottom: theme.space[0],
|
|
129
|
-
left: theme.space[0],
|
|
130
|
-
right: theme.space[0],
|
|
131
|
-
overflow: "hidden"
|
|
132
|
-
},
|
|
133
|
-
sweepBand: {
|
|
134
|
-
position: "absolute",
|
|
135
|
-
left: theme.space[0],
|
|
136
|
-
right: theme.space[0],
|
|
137
|
-
top: theme.space[0],
|
|
138
|
-
height: "25%"
|
|
139
|
-
},
|
|
140
|
-
card: {
|
|
141
|
-
width: "100%",
|
|
142
|
-
maxWidth: theme.panel.lg
|
|
143
|
-
},
|
|
144
|
-
heading: {
|
|
145
|
-
fontFamily: theme.font.sans,
|
|
146
|
-
fontSize: theme.type.title3.fontSize,
|
|
147
|
-
fontWeight: theme.fontWeight.semibold,
|
|
148
|
-
color: theme.color.text
|
|
149
|
-
},
|
|
150
|
-
stageList: {
|
|
151
|
-
flexDirection: "column"
|
|
152
|
-
},
|
|
153
|
-
stageRow: {
|
|
154
|
-
flexDirection: "row",
|
|
155
|
-
alignItems: "center",
|
|
156
|
-
gap: theme.space[12],
|
|
157
|
-
paddingVertical: theme.space[6]
|
|
158
|
-
},
|
|
159
|
-
dot: {
|
|
160
|
-
flexGrow: 0,
|
|
161
|
-
flexShrink: 0,
|
|
162
|
-
width: theme.space[10],
|
|
163
|
-
height: theme.space[10],
|
|
164
|
-
borderRadius: theme.radius.full,
|
|
165
|
-
variants: {
|
|
166
|
-
status: {
|
|
167
|
-
pending: {
|
|
168
|
-
backgroundColor: theme.color.surface3,
|
|
169
|
-
borderWidth: theme.borderWidth.strong,
|
|
170
|
-
borderColor: theme.color.borderStrong
|
|
171
|
-
},
|
|
172
|
-
active: { backgroundColor: theme.color.accent },
|
|
173
|
-
done: {},
|
|
174
|
-
failed: {}
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
},
|
|
178
|
-
stageLabel: {
|
|
179
|
-
flexGrow: 1,
|
|
180
|
-
flexShrink: 1,
|
|
181
|
-
flexBasis: theme.space[0],
|
|
182
|
-
fontFamily: theme.font.sans,
|
|
183
|
-
fontSize: theme.fontSize[13],
|
|
184
|
-
variants: {
|
|
185
|
-
status: {
|
|
186
|
-
pending: { color: theme.color.text3 },
|
|
187
|
-
active: { color: theme.color.text, fontWeight: theme.fontWeight.semibold },
|
|
188
|
-
done: { color: theme.color.text },
|
|
189
|
-
failed: { color: theme.color.text }
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
},
|
|
193
|
-
noPipeline: {
|
|
194
|
-
fontFamily: theme.font.sans,
|
|
195
|
-
fontSize: theme.fontSize[13],
|
|
196
|
-
color: theme.color.text2
|
|
197
|
-
},
|
|
198
|
-
footer: {
|
|
199
|
-
marginTop: theme.space[12],
|
|
200
|
-
fontFamily: theme.font.sans,
|
|
201
|
-
fontSize: theme.fontSize[12],
|
|
202
|
-
lineHeight: theme.fontSize[12] * theme.lineHeight.relaxed,
|
|
203
|
-
color: theme.color.text3
|
|
204
|
-
}
|
|
205
|
-
}));
|
|
206
|
-
function Money({
|
|
207
|
-
minor,
|
|
208
|
-
currency,
|
|
209
|
-
emphasis = false
|
|
210
|
-
}) {
|
|
211
|
-
const { styles } = useStyles(bodySheet, { emphasis });
|
|
212
|
-
return /* @__PURE__ */ jsx(Text, { numberOfLines: 1, style: styles.money, children: money(minor, currency) });
|
|
213
|
-
}
|
|
214
|
-
function ResultNote({ children }) {
|
|
215
|
-
const { styles } = useStyles(bodySheet);
|
|
216
|
-
return /* @__PURE__ */ jsx(Text, { style: styles.note, children });
|
|
217
|
-
}
|
|
218
|
-
function Body({
|
|
219
|
-
kind,
|
|
220
|
-
children
|
|
221
|
-
}) {
|
|
222
|
-
const { styles } = useStyles(bodySheet);
|
|
223
|
-
return /* @__PURE__ */ jsx(View, { testID: `loam-result-${kind}`, style: styles.body, children });
|
|
224
|
-
}
|
|
225
|
-
function SpeciesResult({
|
|
226
|
-
result,
|
|
227
|
-
onPickAlternate,
|
|
228
|
-
alternatesLabel = "Or possibly"
|
|
229
|
-
}) {
|
|
230
|
-
const { styles } = useStyles(bodySheet);
|
|
231
|
-
const { top, alternates, facts } = result;
|
|
232
|
-
return /* @__PURE__ */ jsxs(Body, { kind: "species", children: [
|
|
233
|
-
/* @__PURE__ */ jsxs(View, { style: styles.headRow, children: [
|
|
234
|
-
/* @__PURE__ */ jsxs(View, { style: styles.headText, children: [
|
|
235
|
-
/* @__PURE__ */ jsx(Text, { accessibilityRole: "header", style: styles.heading, children: top.common }),
|
|
236
|
-
/* @__PURE__ */ jsxs(Text, { style: styles.subheading, children: [
|
|
237
|
-
/* @__PURE__ */ jsx(Text, { style: styles.italic, children: top.name }),
|
|
238
|
-
top.family ? ` \xB7 ${top.family}` : ""
|
|
239
|
-
] })
|
|
240
|
-
] }),
|
|
241
|
-
/* @__PURE__ */ jsx(ConfidenceBadge, { value: top.confidence, size: "md" })
|
|
242
|
-
] }),
|
|
243
|
-
alternates.length > 0 ? /* @__PURE__ */ jsxs(View, { style: styles.group, children: [
|
|
244
|
-
/* @__PURE__ */ jsx(Text, { style: styles.overline, children: alternatesLabel.toUpperCase() }),
|
|
245
|
-
/* @__PURE__ */ jsx(View, { style: styles.list, children: alternates.map((m) => /* @__PURE__ */ jsx(MatchRow, { match: m, onPick: onPickAlternate }, m.name)) })
|
|
246
|
-
] }) : null,
|
|
247
|
-
facts.length > 0 ? /* @__PURE__ */ jsx(
|
|
248
|
-
DescriptionList,
|
|
249
|
-
{
|
|
250
|
-
layout: "inline",
|
|
251
|
-
density: "compact",
|
|
252
|
-
dividers: true,
|
|
253
|
-
items: facts.map(([term, description]) => ({ term, description }))
|
|
254
|
-
}
|
|
255
|
-
) : null,
|
|
256
|
-
/* @__PURE__ */ jsx(ResultNote, { children: RESULT_NOTES.species })
|
|
257
|
-
] });
|
|
258
|
-
}
|
|
259
|
-
var SEVERITY = {
|
|
260
|
-
none: { variant: "good", label: "no damage" },
|
|
261
|
-
minor: { variant: "info", label: "minor" },
|
|
262
|
-
moderate: { variant: "warn", label: "moderate" }
|
|
263
|
-
};
|
|
264
|
-
function PanelsResult({
|
|
265
|
-
result,
|
|
266
|
-
currency = "HUF",
|
|
267
|
-
estimateLabel = "Estimate"
|
|
268
|
-
}) {
|
|
269
|
-
const { styles } = useStyles(bodySheet);
|
|
270
|
-
const { vehicle, findings } = result;
|
|
271
|
-
const [low, high] = estimateRange(findings);
|
|
272
|
-
return /* @__PURE__ */ jsxs(Body, { kind: "panels", children: [
|
|
273
|
-
/* @__PURE__ */ jsxs(View, { style: styles.group, children: [
|
|
274
|
-
/* @__PURE__ */ jsx(Text, { accessibilityRole: "header", style: styles.heading, children: `${vehicle.year} ${vehicle.make} ${vehicle.model}` }),
|
|
275
|
-
/* @__PURE__ */ jsx(Text, { style: styles.subheading, children: `${vehicle.plate} \xB7 ${vehicle.colour}` }),
|
|
276
|
-
/* @__PURE__ */ jsx(Text, { style: styles.mono, children: vehicle.vin })
|
|
277
|
-
] }),
|
|
278
|
-
/* @__PURE__ */ jsxs(View, { testID: "loam-estimate", style: styles.estimate, children: [
|
|
279
|
-
/* @__PURE__ */ jsx(Text, { style: styles.overline, children: estimateLabel.toUpperCase() }),
|
|
280
|
-
/* @__PURE__ */ jsxs(View, { style: styles.estimateRow, children: [
|
|
281
|
-
/* @__PURE__ */ jsx(Money, { minor: low, currency, emphasis: true }),
|
|
282
|
-
/* @__PURE__ */ jsx(Text, { style: styles.dash, children: "\u2013" }),
|
|
283
|
-
/* @__PURE__ */ jsx(Money, { minor: high, currency, emphasis: true })
|
|
284
|
-
] })
|
|
285
|
-
] }),
|
|
286
|
-
/* @__PURE__ */ jsx(View, { style: styles.list, children: findings.map((f) => {
|
|
287
|
-
const sev = SEVERITY[f.severity];
|
|
288
|
-
return /* @__PURE__ */ jsxs(View, { style: styles.finding, children: [
|
|
289
|
-
/* @__PURE__ */ jsxs(View, { style: styles.findingTop, children: [
|
|
290
|
-
/* @__PURE__ */ jsx(Text, { style: styles.findingPanel, children: f.panel }),
|
|
291
|
-
/* @__PURE__ */ jsx(Badge, { variant: sev.variant, children: sev.label })
|
|
292
|
-
] }),
|
|
293
|
-
/* @__PURE__ */ jsxs(View, { style: styles.findingBottom, children: [
|
|
294
|
-
/* @__PURE__ */ jsx(Text, { style: styles.findingDamage, children: f.damage }),
|
|
295
|
-
/* @__PURE__ */ jsxs(View, { style: styles.findingMeta, children: [
|
|
296
|
-
/* @__PURE__ */ jsx(Money, { minor: f.cost, currency }),
|
|
297
|
-
/* @__PURE__ */ jsx(ConfidenceBadge, { value: f.confidence })
|
|
298
|
-
] })
|
|
299
|
-
] })
|
|
300
|
-
] }, f.panel);
|
|
301
|
-
}) }),
|
|
302
|
-
/* @__PURE__ */ jsx(ResultNote, { children: RESULT_NOTES.panels })
|
|
303
|
-
] });
|
|
304
|
-
}
|
|
305
|
-
function FieldRow({
|
|
306
|
-
field,
|
|
307
|
-
onChange
|
|
308
|
-
}) {
|
|
309
|
-
const theme = useLoamTheme();
|
|
310
|
-
const { styles } = useStyles(bodySheet, { flagged: fieldFlagged(field) });
|
|
311
|
-
const flagged = fieldFlagged(field);
|
|
312
|
-
return /* @__PURE__ */ jsxs(View, { style: styles.group, children: [
|
|
313
|
-
/* @__PURE__ */ jsxs(View, { style: styles.fieldHead, children: [
|
|
314
|
-
/* @__PURE__ */ jsx(Text, { style: styles.fieldLabel, children: field.key }),
|
|
315
|
-
/* @__PURE__ */ jsx(ConfidenceBadge, { value: field.confidence })
|
|
316
|
-
] }),
|
|
317
|
-
/* @__PURE__ */ jsx(View, { style: styles.fieldInput, children: /* @__PURE__ */ jsx(
|
|
318
|
-
Input,
|
|
319
|
-
{
|
|
320
|
-
size: "sm",
|
|
321
|
-
value: field.value,
|
|
322
|
-
editable: !!onChange,
|
|
323
|
-
accessibilityLabel: flagged ? `${field.key}, ${FIELD_FLAG_COPY}` : field.key,
|
|
324
|
-
accessibilityHint: flagged ? FIELD_FLAG_COPY : void 0,
|
|
325
|
-
onChangeText: (next) => onChange?.(field.key, next)
|
|
326
|
-
}
|
|
327
|
-
) }),
|
|
328
|
-
flagged ? /* @__PURE__ */ jsxs(View, { style: styles.flagChip, children: [
|
|
329
|
-
/* @__PURE__ */ jsx(Icon, { name: "alert-triangle", size: theme.icon.xs, color: theme.color.warnOnSoft }),
|
|
330
|
-
/* @__PURE__ */ jsx(Text, { style: styles.flagText, children: FIELD_FLAG_COPY })
|
|
331
|
-
] }) : null
|
|
332
|
-
] });
|
|
333
|
-
}
|
|
334
|
-
function FieldsResult({ result, onFieldChange }) {
|
|
335
|
-
const { styles } = useStyles(bodySheet);
|
|
336
|
-
return /* @__PURE__ */ jsxs(Body, { kind: "fields", children: [
|
|
337
|
-
/* @__PURE__ */ jsx(Text, { accessibilityRole: "header", style: styles.heading, children: result.doc }),
|
|
338
|
-
/* @__PURE__ */ jsx(View, { style: styles.fieldList, children: result.fields.map((f) => /* @__PURE__ */ jsx(FieldRow, { field: f, onChange: onFieldChange }, f.key)) }),
|
|
339
|
-
/* @__PURE__ */ jsx(ResultNote, { children: RESULT_NOTES.fields })
|
|
340
|
-
] });
|
|
341
|
-
}
|
|
342
|
-
function CodeResult({
|
|
343
|
-
result,
|
|
344
|
-
currency = "HUF",
|
|
345
|
-
quantity = 1,
|
|
346
|
-
onQuantityChange,
|
|
347
|
-
quantityLabel = "Quantity"
|
|
348
|
-
}) {
|
|
349
|
-
const { styles } = useStyles(bodySheet);
|
|
350
|
-
const { product, format, value } = result;
|
|
351
|
-
const mono = [format, value, product?.sku].filter(Boolean).join(" \xB7 ");
|
|
352
|
-
return /* @__PURE__ */ jsxs(Body, { kind: "code", children: [
|
|
353
|
-
/* @__PURE__ */ jsxs(View, { style: styles.group, children: [
|
|
354
|
-
/* @__PURE__ */ jsx(Text, { accessibilityRole: "header", style: styles.heading, children: product ? product.name : value }),
|
|
355
|
-
/* @__PURE__ */ jsx(Text, { style: styles.subheading, children: product ? product.stock : "No product matched this code." })
|
|
356
|
-
] }),
|
|
357
|
-
product ? /* @__PURE__ */ jsx(Money, { minor: product.price, currency, emphasis: true }) : null,
|
|
358
|
-
onQuantityChange ? /* @__PURE__ */ jsxs(View, { style: styles.quantityRow, children: [
|
|
359
|
-
/* @__PURE__ */ jsx(
|
|
360
|
-
Text,
|
|
361
|
-
{
|
|
362
|
-
accessible: false,
|
|
363
|
-
importantForAccessibility: "no-hide-descendants",
|
|
364
|
-
style: styles.fieldLabel,
|
|
365
|
-
children: quantityLabel
|
|
366
|
-
}
|
|
367
|
-
),
|
|
368
|
-
/* @__PURE__ */ jsx(
|
|
369
|
-
Stepper,
|
|
370
|
-
{
|
|
371
|
-
value: quantity,
|
|
372
|
-
min: 1,
|
|
373
|
-
accessibilityLabel: quantityLabel,
|
|
374
|
-
onValueChange: onQuantityChange
|
|
375
|
-
}
|
|
376
|
-
)
|
|
377
|
-
] }) : null,
|
|
378
|
-
/* @__PURE__ */ jsx(Text, { style: styles.mono, children: mono }),
|
|
379
|
-
/* @__PURE__ */ jsx(ResultNote, { children: RESULT_NOTES.code })
|
|
380
|
-
] });
|
|
381
|
-
}
|
|
382
|
-
function VerdictResult({ result }) {
|
|
383
|
-
const { styles } = useStyles(bodySheet);
|
|
384
|
-
return /* @__PURE__ */ jsxs(Body, { kind: "verdict", children: [
|
|
385
|
-
/* @__PURE__ */ jsxs(View, { style: styles.headRow, children: [
|
|
386
|
-
/* @__PURE__ */ jsx(Text, { accessibilityRole: "header", style: styles.heading, children: result.outcome }),
|
|
387
|
-
/* @__PURE__ */ jsx(ConfidenceBadge, { value: result.confidence, size: "md", icon: true })
|
|
388
|
-
] }),
|
|
389
|
-
/* @__PURE__ */ jsx(
|
|
390
|
-
DescriptionList,
|
|
391
|
-
{
|
|
392
|
-
layout: "stacked",
|
|
393
|
-
density: "compact",
|
|
394
|
-
dividers: true,
|
|
395
|
-
items: result.lines.map(([term, description]) => ({ term, description }))
|
|
396
|
-
}
|
|
397
|
-
),
|
|
398
|
-
/* @__PURE__ */ jsx(ResultNote, { children: RESULT_NOTES.verdict })
|
|
399
|
-
] });
|
|
400
|
-
}
|
|
401
|
-
var bodySheet = createStyleSheet((theme) => ({
|
|
402
|
-
body: {
|
|
403
|
-
flexDirection: "column",
|
|
404
|
-
gap: theme.space[16]
|
|
405
|
-
},
|
|
406
|
-
headRow: {
|
|
407
|
-
flexDirection: "row",
|
|
408
|
-
alignItems: "flex-start",
|
|
409
|
-
justifyContent: "space-between",
|
|
410
|
-
gap: theme.space[12]
|
|
411
|
-
},
|
|
412
|
-
headText: {
|
|
413
|
-
flexGrow: 1,
|
|
414
|
-
flexShrink: 1,
|
|
415
|
-
flexBasis: theme.space[0],
|
|
416
|
-
flexDirection: "column",
|
|
417
|
-
gap: theme.space[4]
|
|
418
|
-
},
|
|
419
|
-
heading: {
|
|
420
|
-
fontFamily: theme.font.sans,
|
|
421
|
-
fontSize: theme.type.title3.fontSize,
|
|
422
|
-
fontWeight: theme.fontWeight.semibold,
|
|
423
|
-
color: theme.color.text
|
|
424
|
-
},
|
|
425
|
-
subheading: {
|
|
426
|
-
fontFamily: theme.font.sans,
|
|
427
|
-
fontSize: theme.fontSize[13],
|
|
428
|
-
color: theme.color.text2
|
|
429
|
-
},
|
|
430
|
-
italic: {
|
|
431
|
-
fontStyle: "italic"
|
|
432
|
-
},
|
|
433
|
-
mono: {
|
|
434
|
-
fontFamily: theme.font.mono,
|
|
435
|
-
fontSize: theme.fontSize[11],
|
|
436
|
-
color: theme.color.text3
|
|
437
|
-
},
|
|
438
|
-
overline: {
|
|
439
|
-
fontFamily: theme.font.sans,
|
|
440
|
-
fontSize: theme.fontSize[10],
|
|
441
|
-
letterSpacing: theme.tracking.caps,
|
|
442
|
-
color: theme.color.text3
|
|
443
|
-
},
|
|
444
|
-
group: {
|
|
445
|
-
flexDirection: "column",
|
|
446
|
-
gap: theme.space[6]
|
|
447
|
-
},
|
|
448
|
-
list: {
|
|
449
|
-
flexDirection: "column",
|
|
450
|
-
gap: theme.space[6]
|
|
451
|
-
},
|
|
452
|
-
fieldList: {
|
|
453
|
-
flexDirection: "column",
|
|
454
|
-
gap: theme.space[12]
|
|
455
|
-
},
|
|
456
|
-
note: {
|
|
457
|
-
fontFamily: theme.font.sans,
|
|
458
|
-
fontSize: theme.fontSize[12],
|
|
459
|
-
lineHeight: theme.fontSize[12] * theme.lineHeight.relaxed,
|
|
460
|
-
color: theme.color.text3
|
|
461
|
-
},
|
|
462
|
-
money: {
|
|
463
|
-
fontFamily: theme.font.sans,
|
|
464
|
-
fontVariant: ["tabular-nums"],
|
|
465
|
-
color: theme.color.text,
|
|
466
|
-
variants: {
|
|
467
|
-
emphasis: {
|
|
468
|
-
true: { fontSize: theme.fontSize[20], fontWeight: theme.fontWeight.bold },
|
|
469
|
-
false: { fontSize: theme.fontSize[13] }
|
|
470
|
-
}
|
|
471
|
-
}
|
|
472
|
-
},
|
|
473
|
-
estimate: {
|
|
474
|
-
flexDirection: "column",
|
|
475
|
-
gap: theme.space[4],
|
|
476
|
-
padding: theme.space[8],
|
|
477
|
-
borderRadius: theme.radius.md,
|
|
478
|
-
backgroundColor: theme.color.surface2,
|
|
479
|
-
borderWidth: theme.borderWidth.base,
|
|
480
|
-
borderColor: theme.color.border
|
|
481
|
-
},
|
|
482
|
-
estimateRow: {
|
|
483
|
-
flexDirection: "row",
|
|
484
|
-
alignItems: "baseline",
|
|
485
|
-
flexWrap: "wrap",
|
|
486
|
-
gap: theme.space[6]
|
|
487
|
-
},
|
|
488
|
-
dash: {
|
|
489
|
-
fontFamily: theme.font.sans,
|
|
490
|
-
fontSize: theme.fontSize[15],
|
|
491
|
-
color: theme.color.text3
|
|
492
|
-
},
|
|
493
|
-
finding: {
|
|
494
|
-
flexDirection: "column",
|
|
495
|
-
gap: theme.space[6],
|
|
496
|
-
paddingVertical: theme.space[12],
|
|
497
|
-
borderBottomWidth: theme.borderWidth.base,
|
|
498
|
-
borderBottomColor: theme.color.border
|
|
499
|
-
},
|
|
500
|
-
findingTop: {
|
|
501
|
-
flexDirection: "row",
|
|
502
|
-
alignItems: "flex-start",
|
|
503
|
-
justifyContent: "space-between",
|
|
504
|
-
gap: theme.space[12]
|
|
505
|
-
},
|
|
506
|
-
findingPanel: {
|
|
507
|
-
flexShrink: 1,
|
|
508
|
-
fontFamily: theme.font.sans,
|
|
509
|
-
fontSize: theme.fontSize[13],
|
|
510
|
-
fontWeight: theme.fontWeight.semibold,
|
|
511
|
-
color: theme.color.text
|
|
512
|
-
},
|
|
513
|
-
findingBottom: {
|
|
514
|
-
flexDirection: "row",
|
|
515
|
-
alignItems: "center",
|
|
516
|
-
justifyContent: "space-between",
|
|
517
|
-
gap: theme.space[12]
|
|
518
|
-
},
|
|
519
|
-
findingDamage: {
|
|
520
|
-
flexShrink: 1,
|
|
521
|
-
fontFamily: theme.font.sans,
|
|
522
|
-
fontSize: theme.fontSize[13],
|
|
523
|
-
color: theme.color.text2
|
|
524
|
-
},
|
|
525
|
-
findingMeta: {
|
|
526
|
-
flexGrow: 0,
|
|
527
|
-
flexShrink: 0,
|
|
528
|
-
flexDirection: "row",
|
|
529
|
-
alignItems: "center",
|
|
530
|
-
gap: theme.space[8]
|
|
531
|
-
},
|
|
532
|
-
fieldHead: {
|
|
533
|
-
flexDirection: "row",
|
|
534
|
-
alignItems: "baseline",
|
|
535
|
-
justifyContent: "space-between",
|
|
536
|
-
gap: theme.space[8]
|
|
537
|
-
},
|
|
538
|
-
fieldLabel: {
|
|
539
|
-
fontFamily: theme.font.sans,
|
|
540
|
-
fontSize: theme.fontSize[12],
|
|
541
|
-
fontWeight: theme.fontWeight.semibold,
|
|
542
|
-
color: theme.color.text2
|
|
543
|
-
},
|
|
544
|
-
// A warn *edge*, not a warn fill: the value stays on the field surface its
|
|
545
|
-
// ink was measured against, and the flag says the rest in words.
|
|
546
|
-
fieldInput: {
|
|
547
|
-
borderRadius: theme.ctl.r.sm,
|
|
548
|
-
variants: {
|
|
549
|
-
flagged: {
|
|
550
|
-
true: { borderWidth: theme.borderWidth.base, borderColor: theme.color.warn },
|
|
551
|
-
false: {}
|
|
552
|
-
}
|
|
553
|
-
}
|
|
554
|
-
},
|
|
555
|
-
flagChip: {
|
|
556
|
-
alignSelf: "flex-start",
|
|
557
|
-
flexDirection: "row",
|
|
558
|
-
alignItems: "center",
|
|
559
|
-
gap: theme.space[4],
|
|
560
|
-
paddingHorizontal: theme.space[8],
|
|
561
|
-
paddingVertical: theme.space[2],
|
|
562
|
-
borderRadius: theme.radius.full,
|
|
563
|
-
backgroundColor: theme.color.warnSoft,
|
|
564
|
-
borderWidth: theme.borderWidth.base,
|
|
565
|
-
borderColor: theme.edge.warn
|
|
566
|
-
},
|
|
567
|
-
flagText: {
|
|
568
|
-
fontFamily: theme.font.sans,
|
|
569
|
-
fontSize: theme.fontSize[12],
|
|
570
|
-
color: theme.color.warnOnSoft
|
|
571
|
-
},
|
|
572
|
-
quantityRow: {
|
|
573
|
-
flexDirection: "row",
|
|
574
|
-
alignItems: "center",
|
|
575
|
-
justifyContent: "space-between",
|
|
576
|
-
gap: theme.space[12]
|
|
577
|
-
}
|
|
578
|
-
}));
|
|
579
|
-
function FailureCard({
|
|
580
|
-
failure: failure$1 = "low_confidence",
|
|
581
|
-
alternates = [],
|
|
582
|
-
onRetake,
|
|
583
|
-
onManualEntry,
|
|
584
|
-
onPickAlternate,
|
|
585
|
-
alternatesLabel = "The closest we got",
|
|
586
|
-
manualLabel = FAILURE_SECONDARY_LABEL,
|
|
587
|
-
announce = true
|
|
588
|
-
}) {
|
|
589
|
-
const theme = useLoamTheme();
|
|
590
|
-
const { styles } = useStyles(failureSheet);
|
|
591
|
-
const resolved = failure(failure$1);
|
|
592
|
-
const body = failureBody(resolved.id);
|
|
593
|
-
const showAlternates = resolved.id === "low_confidence" && alternates.length > 0;
|
|
594
|
-
return /* @__PURE__ */ jsxs(Card, { variant: "elevated", style: styles.card, children: [
|
|
595
|
-
/* @__PURE__ */ jsx(PhaseAnnouncement, { message: announce ? `${resolved.label}. ${body}` : null }),
|
|
596
|
-
/* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsxs(View, { style: styles.headRow, children: [
|
|
597
|
-
/* @__PURE__ */ jsx(View, { accessible: false, style: styles.toneMark, ...decorativeProps(), children: /* @__PURE__ */ jsx(Icon, { name: "alert-triangle", size: theme.icon.sm, color: theme.color.warnOnSoft }) }),
|
|
598
|
-
/* @__PURE__ */ jsxs(View, { style: styles.headText, children: [
|
|
599
|
-
/* @__PURE__ */ jsx(CardTitle, { children: /* @__PURE__ */ jsx(Text, { accessibilityRole: "header", style: styles.heading, children: resolved.label }) }),
|
|
600
|
-
/* @__PURE__ */ jsx(Text, { style: styles.body, children: body })
|
|
601
|
-
] })
|
|
602
|
-
] }) }),
|
|
603
|
-
/* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsxs(View, { style: styles.stack, children: [
|
|
604
|
-
/* @__PURE__ */ jsx(NoteBlock, { title: FAILURE_OFFER_PREFIX, description: resolved.offer }),
|
|
605
|
-
showAlternates ? /* @__PURE__ */ jsxs(View, { style: styles.group, children: [
|
|
606
|
-
/* @__PURE__ */ jsx(Text, { style: styles.overline, children: alternatesLabel.toUpperCase() }),
|
|
607
|
-
/* @__PURE__ */ jsx(View, { style: styles.list, children: alternates.map((m) => /* @__PURE__ */ jsx(MatchRow, { match: m, onPick: onPickAlternate }, m.name)) })
|
|
608
|
-
] }) : null
|
|
609
|
-
] }) }),
|
|
610
|
-
/* @__PURE__ */ jsx(CardFooter, { children: /* @__PURE__ */ jsxs(View, { style: styles.actions, children: [
|
|
611
|
-
/* @__PURE__ */ jsx(View, { style: styles.actionSlot, children: /* @__PURE__ */ jsx(Button, { variant: "outline", size: "lg", fullWidth: true, onPress: onManualEntry, children: manualLabel }) }),
|
|
612
|
-
/* @__PURE__ */ jsx(View, { style: styles.actionSlot, children: /* @__PURE__ */ jsx(Button, { variant: "primary", size: "lg", fullWidth: true, onPress: onRetake, children: failurePrimaryLabel(resolved.id) }) })
|
|
613
|
-
] }) })
|
|
614
|
-
] });
|
|
615
|
-
}
|
|
616
|
-
var failureSheet = createStyleSheet((theme) => ({
|
|
617
|
-
card: {
|
|
618
|
-
width: "100%",
|
|
619
|
-
maxWidth: theme.panel.lg
|
|
620
|
-
},
|
|
621
|
-
headRow: {
|
|
622
|
-
flexDirection: "row",
|
|
623
|
-
alignItems: "flex-start",
|
|
624
|
-
gap: theme.space[12]
|
|
625
|
-
},
|
|
626
|
-
toneMark: {
|
|
627
|
-
flexGrow: 0,
|
|
628
|
-
flexShrink: 0,
|
|
629
|
-
width: theme.space[32],
|
|
630
|
-
height: theme.space[32],
|
|
631
|
-
alignItems: "center",
|
|
632
|
-
justifyContent: "center",
|
|
633
|
-
borderRadius: theme.radius.full,
|
|
634
|
-
backgroundColor: theme.color.warnSoft,
|
|
635
|
-
borderWidth: theme.borderWidth.base,
|
|
636
|
-
borderColor: theme.edge.warn
|
|
637
|
-
},
|
|
638
|
-
headText: {
|
|
639
|
-
flexGrow: 1,
|
|
640
|
-
flexShrink: 1,
|
|
641
|
-
flexBasis: theme.space[0],
|
|
642
|
-
flexDirection: "column",
|
|
643
|
-
gap: theme.space[4]
|
|
644
|
-
},
|
|
645
|
-
heading: {
|
|
646
|
-
fontFamily: theme.font.sans,
|
|
647
|
-
fontSize: theme.type.title3.fontSize,
|
|
648
|
-
fontWeight: theme.fontWeight.semibold,
|
|
649
|
-
color: theme.color.text
|
|
650
|
-
},
|
|
651
|
-
body: {
|
|
652
|
-
fontFamily: theme.font.sans,
|
|
653
|
-
fontSize: theme.fontSize[15],
|
|
654
|
-
lineHeight: theme.fontSize[15] * theme.lineHeight.relaxed,
|
|
655
|
-
color: theme.color.text2
|
|
656
|
-
},
|
|
657
|
-
stack: {
|
|
658
|
-
flexDirection: "column",
|
|
659
|
-
gap: theme.space[12]
|
|
660
|
-
},
|
|
661
|
-
group: {
|
|
662
|
-
flexDirection: "column",
|
|
663
|
-
gap: theme.space[6]
|
|
664
|
-
},
|
|
665
|
-
list: {
|
|
666
|
-
flexDirection: "column",
|
|
667
|
-
gap: theme.space[6]
|
|
668
|
-
},
|
|
669
|
-
overline: {
|
|
670
|
-
fontFamily: theme.font.sans,
|
|
671
|
-
fontSize: theme.fontSize[10],
|
|
672
|
-
letterSpacing: theme.tracking.caps,
|
|
673
|
-
color: theme.color.text3
|
|
674
|
-
},
|
|
675
|
-
// Shared row when both labels fit, a full-width stack when they do not —
|
|
676
|
-
// never a label broken across two lines inside its own button.
|
|
677
|
-
actions: {
|
|
678
|
-
flexDirection: "row",
|
|
679
|
-
flexWrap: "wrap",
|
|
680
|
-
alignItems: "center",
|
|
681
|
-
gap: theme.space[8],
|
|
682
|
-
width: "100%"
|
|
683
|
-
},
|
|
684
|
-
actionSlot: {
|
|
685
|
-
flexGrow: 1,
|
|
686
|
-
flexShrink: 0,
|
|
687
|
-
flexBasis: "auto"
|
|
688
|
-
}
|
|
689
|
-
}));
|
|
690
|
-
var SCRIM = {
|
|
691
|
-
captured: "a6",
|
|
692
|
-
done: "a7",
|
|
693
|
-
result: "a8",
|
|
694
|
-
analysing: "a10",
|
|
695
|
-
failure: "a11",
|
|
696
|
-
none: null
|
|
697
|
-
};
|
|
698
|
-
function CapturePreview({
|
|
699
|
-
preview,
|
|
700
|
-
label = "frozen frame \xB7 placeholder",
|
|
701
|
-
scrim = "captured",
|
|
702
|
-
pill = CAPTURED_PILL,
|
|
703
|
-
tracking,
|
|
704
|
-
announce = true,
|
|
705
|
-
children
|
|
706
|
-
}) {
|
|
707
|
-
const theme = useLoamTheme();
|
|
708
|
-
const { styles } = useStyles(reviewSheet);
|
|
709
|
-
const stop = SCRIM[scrim];
|
|
710
|
-
return /* @__PURE__ */ jsxs(View, { testID: `loam-capture-preview-${scrim}`, style: styles.frozen, children: [
|
|
711
|
-
/* @__PURE__ */ jsx(PhaseAnnouncement, { message: announce && pill ? pill : null }),
|
|
712
|
-
preview ?? /* @__PURE__ */ jsx(PlaceholderFeed, { label, drift: false }),
|
|
713
|
-
stop ? /* @__PURE__ */ jsx(
|
|
714
|
-
View,
|
|
715
|
-
{
|
|
716
|
-
accessible: false,
|
|
717
|
-
testID: `loam-capture-scrim-${scrim}`,
|
|
718
|
-
style: [styles.scrim, { backgroundColor: theme.black[stop] }],
|
|
719
|
-
...decorativeProps()
|
|
720
|
-
}
|
|
721
|
-
) : null,
|
|
722
|
-
tracking,
|
|
723
|
-
pill ? /* @__PURE__ */ jsx(View, { style: styles.pillRow, children: /* @__PURE__ */ jsx(GuidanceChip, { text: pill }) }) : null,
|
|
724
|
-
children
|
|
725
|
-
] });
|
|
726
|
-
}
|
|
727
|
-
function RetakeBar({
|
|
728
|
-
analyse = true,
|
|
729
|
-
retakeLabel = "Retake",
|
|
730
|
-
acceptLabel,
|
|
731
|
-
onRetake,
|
|
732
|
-
onAccept
|
|
733
|
-
}) {
|
|
734
|
-
const theme = useLoamTheme();
|
|
735
|
-
const { styles } = useStyles(reviewSheet);
|
|
736
|
-
return /* @__PURE__ */ jsxs(View, { testID: "loam-retake-bar", style: styles.retakeBar, children: [
|
|
737
|
-
/* @__PURE__ */ jsx(
|
|
738
|
-
Pressable,
|
|
739
|
-
{
|
|
740
|
-
accessibilityRole: "button",
|
|
741
|
-
accessibilityLabel: retakeLabel,
|
|
742
|
-
style: [styles.retakeSlot, styles.glassAction],
|
|
743
|
-
onPress: onRetake,
|
|
744
|
-
children: /* @__PURE__ */ jsx(Text, { style: [styles.glassActionLabel, { color: camInk(theme) }], children: retakeLabel })
|
|
745
|
-
}
|
|
746
|
-
),
|
|
747
|
-
/* @__PURE__ */ jsx(View, { style: styles.acceptSlot, children: /* @__PURE__ */ jsx(Button, { variant: "primary", size: "lg", fullWidth: true, onPress: onAccept, children: acceptLabel ?? (analyse ? "Analyse" : "Use photo") }) })
|
|
748
|
-
] });
|
|
749
|
-
}
|
|
750
|
-
var FROZEN_PHASES = [
|
|
751
|
-
"captured",
|
|
752
|
-
"analysing",
|
|
753
|
-
"result",
|
|
754
|
-
"failure",
|
|
755
|
-
"done"
|
|
756
|
-
];
|
|
757
|
-
var reviewSheet = createStyleSheet((theme) => ({
|
|
758
|
-
frozen: {
|
|
759
|
-
position: "absolute",
|
|
760
|
-
top: theme.space[0],
|
|
761
|
-
bottom: theme.space[0],
|
|
762
|
-
left: theme.space[0],
|
|
763
|
-
right: theme.space[0],
|
|
764
|
-
overflow: "hidden"
|
|
765
|
-
},
|
|
766
|
-
scrim: {
|
|
767
|
-
pointerEvents: "none",
|
|
768
|
-
position: "absolute",
|
|
769
|
-
top: theme.space[0],
|
|
770
|
-
bottom: theme.space[0],
|
|
771
|
-
left: theme.space[0],
|
|
772
|
-
right: theme.space[0]
|
|
773
|
-
},
|
|
774
|
-
pillRow: {
|
|
775
|
-
pointerEvents: "box-none",
|
|
776
|
-
position: "absolute",
|
|
777
|
-
top: theme.space[0],
|
|
778
|
-
left: theme.space[0],
|
|
779
|
-
right: theme.space[0],
|
|
780
|
-
alignItems: "center",
|
|
781
|
-
padding: theme.space[8]
|
|
782
|
-
},
|
|
783
|
-
retakeBar: {
|
|
784
|
-
width: "100%",
|
|
785
|
-
flexDirection: "row",
|
|
786
|
-
flexWrap: "wrap",
|
|
787
|
-
alignItems: "center",
|
|
788
|
-
gap: theme.space[8]
|
|
789
|
-
},
|
|
790
|
-
// Floored at their labels' widths and the bar wraps, so no label breaks
|
|
791
|
-
// inside its button; when both fit, accept keeps the 2:1 share.
|
|
792
|
-
retakeSlot: {
|
|
793
|
-
flexGrow: 1,
|
|
794
|
-
flexShrink: 0,
|
|
795
|
-
flexBasis: "auto"
|
|
796
|
-
},
|
|
797
|
-
acceptSlot: {
|
|
798
|
-
flexGrow: 2,
|
|
799
|
-
flexShrink: 0,
|
|
800
|
-
flexBasis: "auto"
|
|
801
|
-
},
|
|
802
|
-
glassAction: {
|
|
803
|
-
height: theme.ctl.lg,
|
|
804
|
-
alignItems: "center",
|
|
805
|
-
justifyContent: "center",
|
|
806
|
-
paddingHorizontal: theme.ctl.px.lg,
|
|
807
|
-
borderRadius: theme.ctl.r.lg,
|
|
808
|
-
backgroundColor: theme.black.a12,
|
|
809
|
-
borderWidth: theme.borderWidth.base,
|
|
810
|
-
borderColor: theme.white.a5
|
|
811
|
-
},
|
|
812
|
-
glassActionLabel: {
|
|
813
|
-
fontFamily: theme.font.sans,
|
|
814
|
-
fontSize: theme.ctl.fs.lg
|
|
815
|
-
}
|
|
816
|
-
}));
|
|
817
|
-
function ResultCard({
|
|
818
|
-
result,
|
|
819
|
-
profile: profileProp,
|
|
820
|
-
currency = "HUF",
|
|
821
|
-
quantity = 1,
|
|
822
|
-
onFieldChange,
|
|
823
|
-
onPickAlternate,
|
|
824
|
-
onQuantityChange
|
|
825
|
-
}) {
|
|
826
|
-
const stamp = typeof profileProp === "string" ? profileProp : profileProp ? profileProp.id : void 0;
|
|
827
|
-
return /* @__PURE__ */ jsxs(View, { testID: stamp ? `loam-result-profile-${stamp}` : void 0, children: [
|
|
828
|
-
result.kind === "species" ? /* @__PURE__ */ jsx(SpeciesResult, { result, onPickAlternate }) : null,
|
|
829
|
-
result.kind === "panels" ? /* @__PURE__ */ jsx(PanelsResult, { result, currency }) : null,
|
|
830
|
-
result.kind === "fields" ? /* @__PURE__ */ jsx(FieldsResult, { result, onFieldChange }) : null,
|
|
831
|
-
result.kind === "code" ? /* @__PURE__ */ jsx(
|
|
832
|
-
CodeResult,
|
|
833
|
-
{
|
|
834
|
-
result,
|
|
835
|
-
currency,
|
|
836
|
-
quantity,
|
|
837
|
-
onQuantityChange
|
|
838
|
-
}
|
|
839
|
-
) : null,
|
|
840
|
-
result.kind === "verdict" ? /* @__PURE__ */ jsx(VerdictResult, { result }) : null
|
|
841
|
-
] });
|
|
842
|
-
}
|
|
843
|
-
function ResultSheet({
|
|
844
|
-
title = "Result",
|
|
845
|
-
primaryLabel = resultPrimaryLabel("plant"),
|
|
846
|
-
scanAnotherLabel = "Scan another",
|
|
847
|
-
onScanAnother,
|
|
848
|
-
onKeep,
|
|
849
|
-
onDismiss,
|
|
850
|
-
autoFocus = true,
|
|
851
|
-
maxHeight = "82%",
|
|
852
|
-
dismissRatio = 0.3,
|
|
853
|
-
grabberLabel = "Dismiss result",
|
|
854
|
-
children
|
|
855
|
-
}) {
|
|
856
|
-
const theme = useLoamTheme();
|
|
857
|
-
const { styles } = useStyles(sheetSheet);
|
|
858
|
-
const panel = React5.useRef(null);
|
|
859
|
-
const height = React5.useRef(0);
|
|
860
|
-
const offset = React5.useRef(new Animated.Value(0)).current;
|
|
861
|
-
const dismiss = React5.useRef(onDismiss);
|
|
862
|
-
dismiss.current = onDismiss;
|
|
863
|
-
const ratio = React5.useRef(dismissRatio);
|
|
864
|
-
ratio.current = dismissRatio;
|
|
865
|
-
React5.useLayoutEffect(() => {
|
|
866
|
-
if (!autoFocus) return;
|
|
867
|
-
const node = panel.current;
|
|
868
|
-
if (!node || Platform.OS === "web") return;
|
|
869
|
-
const tag = findNodeHandle(node);
|
|
870
|
-
if (tag !== null) AccessibilityInfo.setAccessibilityFocus(tag);
|
|
871
|
-
}, [autoFocus]);
|
|
872
|
-
const grabberSlop = Math.max(0, (theme.hit.lg - theme.space[24]) / 2);
|
|
873
|
-
const pan = React5.useRef(
|
|
874
|
-
// eslint-disable-next-line loam/no-pan-responder
|
|
875
|
-
PanResponder.create({
|
|
876
|
-
onStartShouldSetPanResponder: () => true,
|
|
877
|
-
onMoveShouldSetPanResponder: (_e, g) => Math.abs(g.dy) > 2,
|
|
878
|
-
onPanResponderMove: (_e, g) => {
|
|
879
|
-
if (!dismiss.current) return;
|
|
880
|
-
offset.setValue(Math.max(0, g.dy));
|
|
881
|
-
},
|
|
882
|
-
onPanResponderRelease: (_e, g) => {
|
|
883
|
-
offset.setValue(0);
|
|
884
|
-
if (!dismiss.current) return;
|
|
885
|
-
if (height.current > 0 && Math.max(0, g.dy) > height.current * ratio.current) {
|
|
886
|
-
dismiss.current();
|
|
887
|
-
}
|
|
888
|
-
},
|
|
889
|
-
onPanResponderTerminate: () => offset.setValue(0)
|
|
890
|
-
})
|
|
891
|
-
).current;
|
|
892
|
-
return /* @__PURE__ */ jsxs(
|
|
893
|
-
Animated.View,
|
|
894
|
-
{
|
|
895
|
-
ref: panel,
|
|
896
|
-
role: "dialog",
|
|
897
|
-
accessibilityViewIsModal: true,
|
|
898
|
-
accessibilityLabel: title,
|
|
899
|
-
testID: "loam-result-sheet",
|
|
900
|
-
onLayout: (e) => {
|
|
901
|
-
height.current = e.nativeEvent.layout.height;
|
|
902
|
-
},
|
|
903
|
-
style: [styles.sheet, { maxHeight, transform: [{ translateY: offset }] }],
|
|
904
|
-
children: [
|
|
905
|
-
onDismiss ? /* @__PURE__ */ jsx(
|
|
906
|
-
Pressable,
|
|
907
|
-
{
|
|
908
|
-
accessibilityRole: "button",
|
|
909
|
-
accessibilityLabel: grabberLabel,
|
|
910
|
-
testID: "loam-result-grabber",
|
|
911
|
-
hitSlop: { top: grabberSlop, bottom: grabberSlop },
|
|
912
|
-
style: styles.grabberHit,
|
|
913
|
-
onPress: onDismiss,
|
|
914
|
-
...pan.panHandlers,
|
|
915
|
-
children: /* @__PURE__ */ jsx(View, { accessible: false, style: styles.grabber })
|
|
916
|
-
}
|
|
917
|
-
) : /* @__PURE__ */ jsx(View, { accessible: false, style: styles.grabberHit, children: /* @__PURE__ */ jsx(View, { style: styles.grabber }) }),
|
|
918
|
-
/* @__PURE__ */ jsx(ScrollView, { style: styles.body, contentContainerStyle: styles.bodyContent, children }),
|
|
919
|
-
/* @__PURE__ */ jsxs(View, { style: styles.actions, children: [
|
|
920
|
-
/* @__PURE__ */ jsx(View, { style: styles.secondarySlot, children: /* @__PURE__ */ jsx(Button, { variant: "outline", size: "lg", fullWidth: true, onPress: onScanAnother, children: scanAnotherLabel }) }),
|
|
921
|
-
/* @__PURE__ */ jsx(View, { style: styles.primarySlot, children: /* @__PURE__ */ jsx(Button, { variant: "primary", size: "lg", fullWidth: true, onPress: onKeep, children: primaryLabel }) })
|
|
922
|
-
] })
|
|
923
|
-
]
|
|
924
|
-
}
|
|
925
|
-
);
|
|
926
|
-
}
|
|
927
|
-
var sheetSheet = createStyleSheet((theme) => ({
|
|
928
|
-
sheet: {
|
|
929
|
-
position: "absolute",
|
|
930
|
-
left: theme.space[0],
|
|
931
|
-
right: theme.space[0],
|
|
932
|
-
bottom: theme.space[0],
|
|
933
|
-
zIndex: theme.z.modal,
|
|
934
|
-
flexDirection: "column",
|
|
935
|
-
overflow: "hidden",
|
|
936
|
-
borderTopLeftRadius: theme.radius.xl,
|
|
937
|
-
borderTopRightRadius: theme.radius.xl,
|
|
938
|
-
borderTopWidth: theme.borderWidth.base,
|
|
939
|
-
borderTopColor: theme.color.border,
|
|
940
|
-
backgroundColor: theme.color.surface,
|
|
941
|
-
...theme.shadow.lg
|
|
942
|
-
},
|
|
943
|
-
grabberHit: {
|
|
944
|
-
width: "100%",
|
|
945
|
-
height: theme.space[24],
|
|
946
|
-
flexGrow: 0,
|
|
947
|
-
flexShrink: 0,
|
|
948
|
-
alignItems: "center",
|
|
949
|
-
justifyContent: "center"
|
|
950
|
-
},
|
|
951
|
-
grabber: {
|
|
952
|
-
width: theme.space[36],
|
|
953
|
-
height: theme.layout.sheetGrabber,
|
|
954
|
-
borderRadius: theme.radius.full,
|
|
955
|
-
backgroundColor: theme.color.text3
|
|
956
|
-
},
|
|
957
|
-
body: {
|
|
958
|
-
flexGrow: 1,
|
|
959
|
-
flexShrink: 1,
|
|
960
|
-
flexBasis: theme.space[0]
|
|
961
|
-
},
|
|
962
|
-
bodyContent: {
|
|
963
|
-
paddingHorizontal: theme.space[16],
|
|
964
|
-
paddingBottom: theme.space[12]
|
|
965
|
-
},
|
|
966
|
-
actions: {
|
|
967
|
-
flexGrow: 0,
|
|
968
|
-
flexShrink: 0,
|
|
969
|
-
flexDirection: "row",
|
|
970
|
-
flexWrap: "wrap",
|
|
971
|
-
alignItems: "center",
|
|
972
|
-
gap: theme.space[8],
|
|
973
|
-
paddingHorizontal: theme.space[16],
|
|
974
|
-
paddingVertical: theme.space[12],
|
|
975
|
-
borderTopWidth: theme.borderWidth.base,
|
|
976
|
-
borderTopColor: theme.color.border
|
|
977
|
-
},
|
|
978
|
-
// Both slots are floored at their own label's width and the row wraps, so a
|
|
979
|
-
// label never breaks inside its button ("Save to collection" did at 140pt);
|
|
980
|
-
// when both fit, the primary still takes two thirds of the spare width.
|
|
981
|
-
secondarySlot: {
|
|
982
|
-
flexGrow: 1,
|
|
983
|
-
flexShrink: 0,
|
|
984
|
-
flexBasis: "auto"
|
|
985
|
-
},
|
|
986
|
-
primarySlot: {
|
|
987
|
-
flexGrow: 2,
|
|
988
|
-
flexShrink: 0,
|
|
989
|
-
flexBasis: "auto"
|
|
990
|
-
}
|
|
991
|
-
}));
|
|
992
|
-
|
|
993
|
-
export { AnalysisProgress, CapturePreview, CodeResult, FROZEN_PHASES, FailureCard, FieldsResult, PanelsResult, ResultCard, ResultSheet, RetakeBar, ScanSweep, SpeciesResult, StageBadge, StageRow, VerdictResult };
|