@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
|
@@ -1,14 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { useCaptureResultLabels, PhaseAnnouncement, ConfidenceBadge, MatchRow, NoteBlock } from './chunk-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { Button } from './chunk-
|
|
1
|
+
import { DescriptionList } from './chunk-PFLNFIVB.js';
|
|
2
|
+
import { Stepper } from './chunk-HP6ST2OW.js';
|
|
3
|
+
import { useCaptureResultLabels, BusyWrap, PhaseAnnouncement, ConfidenceBadge, MatchRow, NoteBlock } from './chunk-SZLI34TA.js';
|
|
4
|
+
import { IconTile } from './chunk-XBXUBBJZ.js';
|
|
5
|
+
import { Card, CardHeader, CardTitle, CardContent, CardFooter } from './chunk-PWFRDRGS.js';
|
|
6
|
+
import { PlaceholderFeed } from './chunk-RJA3RXO3.js';
|
|
7
|
+
import { decorativeProps, useAnalyzerCopy, GuidanceChip, camInk } from './chunk-OCHPK5YV.js';
|
|
8
|
+
import { measureBox } from './chunk-AQ5FIG74.js';
|
|
9
|
+
import { Button } from './chunk-5DTKORLI.js';
|
|
10
|
+
import { Badge } from './chunk-LGNTP5XA.js';
|
|
11
|
+
import { Skeleton } from './chunk-YJ5PXOX3.js';
|
|
12
|
+
import { Input } from './chunk-KXLDK6HB.js';
|
|
10
13
|
import { useLoamLocale } from './chunk-APCWFOZW.js';
|
|
11
|
-
import { Icon } from './chunk-
|
|
14
|
+
import { Icon } from './chunk-PCEFCOLN.js';
|
|
12
15
|
import { useReducedMotion, useResolvedMotion, springConfig, motionTiming } from './chunk-J64KGCGX.js';
|
|
13
16
|
import * as React5 from 'react';
|
|
14
17
|
import { Animated, View, Text, Pressable, Platform, findNodeHandle, AccessibilityInfo, PanResponder, ScrollView, Easing } from 'react-native';
|
|
@@ -18,13 +21,24 @@ import { localizeProfile, profile, pipelineFrom, estimateRange, failure, failure
|
|
|
18
21
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
19
22
|
import { money } from '@btndprojects/loam-pay';
|
|
20
23
|
|
|
21
|
-
function ScanSweep({
|
|
24
|
+
function ScanSweep({
|
|
25
|
+
active = true,
|
|
26
|
+
tone = "good",
|
|
27
|
+
size = "md",
|
|
28
|
+
label: labelProp,
|
|
29
|
+
motion,
|
|
30
|
+
loading = false
|
|
31
|
+
}) {
|
|
22
32
|
const theme = useLoamTheme("capture-result");
|
|
33
|
+
const t = useCaptureResultLabels();
|
|
34
|
+
const label = labelProp ?? (loading ? t.analysing : void 0);
|
|
23
35
|
const reduced = useReducedMotion();
|
|
24
36
|
const { styles } = useStyles(analysisSheet);
|
|
25
37
|
const [band, setBand] = React5.useState(0);
|
|
26
38
|
const phase = React5.useRef(new Animated.Value(0)).current;
|
|
27
|
-
const
|
|
39
|
+
const level = useResolvedMotion(motion, "capture-result");
|
|
40
|
+
const still = reduced || theme.reduceMotion || level !== "full" || loading;
|
|
41
|
+
const hue = theme.color[tone === "info" ? "info" : tone === "accent" ? "accent" : tone];
|
|
28
42
|
React5.useEffect(() => {
|
|
29
43
|
if (!active || still || band === 0) {
|
|
30
44
|
phase.setValue(0);
|
|
@@ -46,21 +60,29 @@ function ScanSweep({ active = true }) {
|
|
|
46
60
|
return /* @__PURE__ */ jsx(
|
|
47
61
|
View,
|
|
48
62
|
{
|
|
49
|
-
accessible: false,
|
|
63
|
+
accessible: label ? true : false,
|
|
64
|
+
role: label ? "img" : void 0,
|
|
65
|
+
accessibilityLabel: label,
|
|
50
66
|
testID: "loam-scan-sweep",
|
|
67
|
+
accessibilityState: loading ? { busy: true } : void 0,
|
|
68
|
+
"aria-busy": loading || void 0,
|
|
51
69
|
style: styles.sweepRoot,
|
|
52
|
-
...decorativeProps(),
|
|
70
|
+
...label ? null : decorativeProps(),
|
|
53
71
|
children: /* @__PURE__ */ jsx(
|
|
54
72
|
Animated.View,
|
|
55
73
|
{
|
|
56
74
|
testID: still ? "loam-scan-sweep-static" : "loam-scan-sweep-band",
|
|
57
75
|
onLayout,
|
|
58
|
-
style: [
|
|
76
|
+
style: [
|
|
77
|
+
styles.sweepBand,
|
|
78
|
+
size === "sm" ? styles.sweepSm : size === "lg" ? styles.sweepLg : null,
|
|
79
|
+
{ transform: [{ translateY }] }
|
|
80
|
+
],
|
|
59
81
|
children: /* @__PURE__ */ jsxs(Svg, { width: "100%", height: "100%", children: [
|
|
60
82
|
/* @__PURE__ */ jsx(Defs, { children: /* @__PURE__ */ jsxs(LinearGradient, { id: "loam-cam-sweep", x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
|
61
|
-
/* @__PURE__ */ jsx(Stop, { offset: "0", stopColor:
|
|
62
|
-
/* @__PURE__ */ jsx(Stop, { offset: "0.5", stopColor:
|
|
63
|
-
/* @__PURE__ */ jsx(Stop, { offset: "1", stopColor:
|
|
83
|
+
/* @__PURE__ */ jsx(Stop, { offset: "0", stopColor: hue, stopOpacity: theme.opacity[0] }),
|
|
84
|
+
/* @__PURE__ */ jsx(Stop, { offset: "0.5", stopColor: hue, stopOpacity: theme.opacity[100] }),
|
|
85
|
+
/* @__PURE__ */ jsx(Stop, { offset: "1", stopColor: hue, stopOpacity: theme.opacity[0] })
|
|
64
86
|
] }) }),
|
|
65
87
|
/* @__PURE__ */ jsx(Rect, { x: "0", y: "0", width: "100%", height: "100%", fill: "url(#loam-cam-sweep)" })
|
|
66
88
|
] })
|
|
@@ -71,13 +93,14 @@ function ScanSweep({ active = true }) {
|
|
|
71
93
|
}
|
|
72
94
|
function StageBadge({ where, copy }) {
|
|
73
95
|
const words = useAnalyzerCopy(copy);
|
|
74
|
-
const locale = useLoamLocale();
|
|
75
96
|
const privacy = where === "device" ? words.pipeline.device : words.pipeline.server;
|
|
76
|
-
return /* @__PURE__ */ jsx(View, { accessible: false, importantForAccessibility: "no-hide-descendants", ...decorativeProps(), children: /* @__PURE__ */ jsx(Badge, { variant: where === "device" ? "good" : "neutral", size: "sm", children: privacy
|
|
97
|
+
return /* @__PURE__ */ jsx(View, { accessible: false, importantForAccessibility: "no-hide-descendants", ...decorativeProps(), children: /* @__PURE__ */ jsx(Badge, { variant: where === "device" ? "good" : "neutral", size: "sm", children: privacy }) });
|
|
77
98
|
}
|
|
78
|
-
function DoneCheck() {
|
|
99
|
+
function DoneCheck({ motion }) {
|
|
79
100
|
const theme = useLoamTheme("capture-result");
|
|
80
|
-
const
|
|
101
|
+
const reducedOs = useReducedMotion();
|
|
102
|
+
const lvl = useResolvedMotion(motion, "capture-result");
|
|
103
|
+
const reduced = reducedOs || lvl !== "full";
|
|
81
104
|
const v = React5.useRef(new Animated.Value(0)).current;
|
|
82
105
|
React5.useEffect(() => {
|
|
83
106
|
if (reduced) {
|
|
@@ -101,10 +124,13 @@ function DoneCheck() {
|
|
|
101
124
|
}
|
|
102
125
|
);
|
|
103
126
|
}
|
|
104
|
-
function StageDot({
|
|
127
|
+
function StageDot({
|
|
128
|
+
status,
|
|
129
|
+
motion
|
|
130
|
+
}) {
|
|
105
131
|
const theme = useLoamTheme("capture-result");
|
|
106
132
|
const { styles } = useStyles(analysisSheet, { status });
|
|
107
|
-
if (status === "done") return /* @__PURE__ */ jsx(DoneCheck, {});
|
|
133
|
+
if (status === "done") return /* @__PURE__ */ jsx(DoneCheck, { motion });
|
|
108
134
|
if (status === "failed") {
|
|
109
135
|
return /* @__PURE__ */ jsx(Icon, { name: "alert-circle", size: theme.icon.sm, color: theme.color.danger });
|
|
110
136
|
}
|
|
@@ -114,7 +140,8 @@ function StageRow({
|
|
|
114
140
|
stage,
|
|
115
141
|
status = "pending",
|
|
116
142
|
labels,
|
|
117
|
-
copy
|
|
143
|
+
copy,
|
|
144
|
+
motion
|
|
118
145
|
}) {
|
|
119
146
|
const t = useCaptureResultLabels(labels);
|
|
120
147
|
const words = useAnalyzerCopy(copy);
|
|
@@ -128,7 +155,7 @@ function StageRow({
|
|
|
128
155
|
testID: `loam-stage-${status}`,
|
|
129
156
|
style: styles.stageRow,
|
|
130
157
|
children: [
|
|
131
|
-
/* @__PURE__ */ jsx(StageDot, { status }),
|
|
158
|
+
/* @__PURE__ */ jsx(StageDot, { status, motion }),
|
|
132
159
|
/* @__PURE__ */ jsx(Text, { style: styles.stageLabel, children: stage.label }),
|
|
133
160
|
/* @__PURE__ */ jsx(StageBadge, { where: stage.where, copy })
|
|
134
161
|
]
|
|
@@ -147,9 +174,15 @@ function AnalysisProgress({
|
|
|
147
174
|
footer: footerProp,
|
|
148
175
|
announce = true,
|
|
149
176
|
labels,
|
|
150
|
-
copy
|
|
177
|
+
copy,
|
|
178
|
+
tone,
|
|
179
|
+
size = "md",
|
|
180
|
+
variant = "elevated",
|
|
181
|
+
loading = false,
|
|
182
|
+
motion
|
|
151
183
|
}) {
|
|
152
184
|
const { styles } = useStyles(analysisSheet);
|
|
185
|
+
const theme = useLoamTheme("capture-result");
|
|
153
186
|
const t = useCaptureResultLabels(labels);
|
|
154
187
|
const words = useAnalyzerCopy(copy);
|
|
155
188
|
const footer = footerProp === void 0 ? words.pipeline.footer : footerProp;
|
|
@@ -158,24 +191,45 @@ function AnalysisProgress({
|
|
|
158
191
|
const heading = title ?? defaultTitle(p, t);
|
|
159
192
|
const active = pipeline.index >= 0 ? pipeline.stages[pipeline.index] : void 0;
|
|
160
193
|
const message = announce ? active ? words.pipeline.stageAria(active.stage.label, words.pipeline[active.stage.where]) : heading : null;
|
|
161
|
-
return /* @__PURE__ */
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
{
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
194
|
+
return /* @__PURE__ */ jsx(BusyWrap, { busy: loading, children: /* @__PURE__ */ jsxs(
|
|
195
|
+
Card,
|
|
196
|
+
{
|
|
197
|
+
variant,
|
|
198
|
+
style: [
|
|
199
|
+
styles.card,
|
|
200
|
+
tone ? { borderColor: theme.edge[tone], borderWidth: theme.borderWidth.base } : null
|
|
201
|
+
],
|
|
202
|
+
children: [
|
|
203
|
+
/* @__PURE__ */ jsx(PhaseAnnouncement, { message }),
|
|
204
|
+
/* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsx(CardTitle, { children: /* @__PURE__ */ jsx(
|
|
205
|
+
Text,
|
|
206
|
+
{
|
|
207
|
+
accessibilityRole: "header",
|
|
208
|
+
style: [
|
|
209
|
+
styles.heading,
|
|
210
|
+
size === "sm" ? styles.headingSm : size === "lg" ? styles.headingLg : null
|
|
211
|
+
],
|
|
212
|
+
children: heading
|
|
213
|
+
}
|
|
214
|
+
) }) }),
|
|
215
|
+
/* @__PURE__ */ jsxs(CardContent, { children: [
|
|
216
|
+
loading ? /* @__PURE__ */ jsx(View, { testID: "loam-analysis-loading", style: styles.stageList, children: [0, 1, 2].map((i) => /* @__PURE__ */ jsx(Skeleton, { variant: "text" }, i)) }) : pipeline.stages.length > 0 ? /* @__PURE__ */ jsx(View, { role: "list", style: styles.stageList, children: pipeline.stages.map((s) => /* @__PURE__ */ jsx(
|
|
217
|
+
StageRow,
|
|
218
|
+
{
|
|
219
|
+
stage: s.stage,
|
|
220
|
+
status: s.status,
|
|
221
|
+
labels,
|
|
222
|
+
copy,
|
|
223
|
+
motion
|
|
224
|
+
},
|
|
225
|
+
s.stage.label
|
|
226
|
+
)) }) : /* @__PURE__ */ jsx(Text, { style: styles.noPipeline, children: words.pipeline.noPipeline(p.label) }),
|
|
227
|
+
footer ? /* @__PURE__ */ jsx(Text, { style: styles.footer, children: footer }) : null
|
|
228
|
+
] }),
|
|
229
|
+
onCancel && pipeline.cancellable ? /* @__PURE__ */ jsx(CardFooter, { children: /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "lg", onPress: onCancel, children: cancelLabel ?? t.cancel }) }) : null
|
|
230
|
+
]
|
|
231
|
+
}
|
|
232
|
+
) });
|
|
179
233
|
}
|
|
180
234
|
var analysisSheet = createStyleSheet((theme) => ({
|
|
181
235
|
sweepRoot: {
|
|
@@ -194,10 +248,14 @@ var analysisSheet = createStyleSheet((theme) => ({
|
|
|
194
248
|
top: theme.space[0],
|
|
195
249
|
height: "25%"
|
|
196
250
|
},
|
|
251
|
+
sweepSm: { height: "15%" },
|
|
252
|
+
sweepLg: { height: "40%" },
|
|
197
253
|
card: {
|
|
198
254
|
width: "100%",
|
|
199
255
|
maxWidth: theme.panel.lg
|
|
200
256
|
},
|
|
257
|
+
headingSm: { fontSize: theme.type.headline.fontSize },
|
|
258
|
+
headingLg: { fontSize: theme.type.title2.fontSize },
|
|
201
259
|
heading: {
|
|
202
260
|
fontFamily: theme.font.sans,
|
|
203
261
|
fontSize: theme.type.title3.fontSize,
|
|
@@ -211,7 +269,7 @@ var analysisSheet = createStyleSheet((theme) => ({
|
|
|
211
269
|
flexDirection: "row",
|
|
212
270
|
alignItems: "center",
|
|
213
271
|
gap: theme.space[12],
|
|
214
|
-
|
|
272
|
+
minHeight: theme.ctl.lg
|
|
215
273
|
},
|
|
216
274
|
dot: {
|
|
217
275
|
flexGrow: 0,
|
|
@@ -237,10 +295,10 @@ var analysisSheet = createStyleSheet((theme) => ({
|
|
|
237
295
|
flexShrink: 1,
|
|
238
296
|
flexBasis: theme.space[0],
|
|
239
297
|
fontFamily: theme.font.sans,
|
|
240
|
-
fontSize: theme.fontSize[
|
|
298
|
+
fontSize: theme.fontSize[14],
|
|
241
299
|
variants: {
|
|
242
300
|
status: {
|
|
243
|
-
pending: { color: theme.color.
|
|
301
|
+
pending: { color: theme.color.text2 },
|
|
244
302
|
active: { color: theme.color.text, fontWeight: theme.fontWeight.semibold },
|
|
245
303
|
done: { color: theme.color.text },
|
|
246
304
|
failed: { color: theme.color.text }
|
|
@@ -257,7 +315,7 @@ var analysisSheet = createStyleSheet((theme) => ({
|
|
|
257
315
|
fontFamily: theme.font.sans,
|
|
258
316
|
fontSize: theme.fontSize[12],
|
|
259
317
|
lineHeight: theme.fontSize[12] * theme.lineHeight.relaxed,
|
|
260
|
-
color: theme.color.
|
|
318
|
+
color: theme.color.text2
|
|
261
319
|
}
|
|
262
320
|
}));
|
|
263
321
|
function Money({
|
|
@@ -354,7 +412,7 @@ function PanelsResult({
|
|
|
354
412
|
return /* @__PURE__ */ jsxs(View, { style: styles.finding, children: [
|
|
355
413
|
/* @__PURE__ */ jsxs(View, { style: styles.findingTop, children: [
|
|
356
414
|
/* @__PURE__ */ jsx(Text, { style: styles.findingPanel, children: f.panel }),
|
|
357
|
-
/* @__PURE__ */ jsx(Badge, { variant: SEVERITY_VARIANT[f.severity], children: words.result.severity[f.severity] })
|
|
415
|
+
/* @__PURE__ */ jsx(Badge, { variant: SEVERITY_VARIANT[f.severity], size: "sm", children: words.result.severity[f.severity] })
|
|
358
416
|
] }),
|
|
359
417
|
/* @__PURE__ */ jsxs(View, { style: styles.findingBottom, children: [
|
|
360
418
|
/* @__PURE__ */ jsx(Text, { style: styles.findingDamage, children: f.damage }),
|
|
@@ -386,7 +444,7 @@ function FieldRow({
|
|
|
386
444
|
/* @__PURE__ */ jsx(View, { style: styles.fieldInput, children: /* @__PURE__ */ jsx(
|
|
387
445
|
Input,
|
|
388
446
|
{
|
|
389
|
-
size: "
|
|
447
|
+
size: "md",
|
|
390
448
|
value: field.value,
|
|
391
449
|
editable: !!onChange,
|
|
392
450
|
accessibilityLabel: flagged ? `${field.key}, ${words.result.fieldFlag}` : field.key,
|
|
@@ -513,8 +571,8 @@ var bodySheet = createStyleSheet((theme) => ({
|
|
|
513
571
|
},
|
|
514
572
|
mono: {
|
|
515
573
|
fontFamily: theme.font.mono,
|
|
516
|
-
fontSize: theme.fontSize[
|
|
517
|
-
color: theme.color.
|
|
574
|
+
fontSize: theme.fontSize[12],
|
|
575
|
+
color: theme.color.text2
|
|
518
576
|
},
|
|
519
577
|
overline: {
|
|
520
578
|
fontFamily: theme.font.sans,
|
|
@@ -538,7 +596,7 @@ var bodySheet = createStyleSheet((theme) => ({
|
|
|
538
596
|
fontFamily: theme.font.sans,
|
|
539
597
|
fontSize: theme.fontSize[12],
|
|
540
598
|
lineHeight: theme.fontSize[12] * theme.lineHeight.relaxed,
|
|
541
|
-
color: theme.color.
|
|
599
|
+
color: theme.color.text2
|
|
542
600
|
},
|
|
543
601
|
money: {
|
|
544
602
|
fontFamily: theme.font.sans,
|
|
@@ -546,7 +604,7 @@ var bodySheet = createStyleSheet((theme) => ({
|
|
|
546
604
|
color: theme.color.text,
|
|
547
605
|
variants: {
|
|
548
606
|
emphasis: {
|
|
549
|
-
true: { fontSize: theme.fontSize[20], fontWeight: theme.fontWeight.
|
|
607
|
+
true: { fontSize: theme.fontSize[20], fontWeight: theme.fontWeight.semibold },
|
|
550
608
|
false: { fontSize: theme.fontSize[13] }
|
|
551
609
|
}
|
|
552
610
|
}
|
|
@@ -657,6 +715,7 @@ var bodySheet = createStyleSheet((theme) => ({
|
|
|
657
715
|
gap: theme.space[12]
|
|
658
716
|
}
|
|
659
717
|
}));
|
|
718
|
+
var NOOP = () => void 0;
|
|
660
719
|
function FailureCard({
|
|
661
720
|
failure: failure$1 = "low_confidence",
|
|
662
721
|
alternates = [],
|
|
@@ -667,46 +726,80 @@ function FailureCard({
|
|
|
667
726
|
manualLabel: manualProp,
|
|
668
727
|
announce = true,
|
|
669
728
|
labels,
|
|
670
|
-
copy
|
|
729
|
+
copy,
|
|
730
|
+
tone = "danger",
|
|
731
|
+
variant = "elevated",
|
|
732
|
+
elevation = "default",
|
|
733
|
+
padding = "md",
|
|
734
|
+
loading = false,
|
|
735
|
+
interactive = false,
|
|
736
|
+
onPress,
|
|
737
|
+
accessibilityLabel
|
|
671
738
|
}) {
|
|
672
739
|
const t = useCaptureResultLabels(labels);
|
|
673
740
|
const words = useAnalyzerCopy(copy);
|
|
674
741
|
const locale = useLoamLocale();
|
|
675
742
|
const alternatesLabel = alternatesProp ?? t.closestWeGot;
|
|
676
743
|
const manualLabel = manualProp ?? words.failure.enterManually;
|
|
677
|
-
const theme = useLoamTheme("capture-result");
|
|
678
744
|
const { styles } = useStyles(failureSheet);
|
|
745
|
+
const theme = useLoamTheme("capture-result");
|
|
679
746
|
const base = failure(failure$1);
|
|
680
747
|
const resolved = { ...base, ...words.failures[base.id] };
|
|
681
748
|
const body = failureBody(resolved.id, words);
|
|
682
749
|
const showAlternates = resolved.id === "low_confidence" && alternates.length > 0;
|
|
683
|
-
return /* @__PURE__ */
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
/* @__PURE__ */ jsx(
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
750
|
+
return /* @__PURE__ */ jsx(BusyWrap, { busy: loading, children: /* @__PURE__ */ jsxs(
|
|
751
|
+
Card,
|
|
752
|
+
{
|
|
753
|
+
variant,
|
|
754
|
+
onPress: interactive ? onPress ?? NOOP : void 0,
|
|
755
|
+
accessibilityLabel: interactive ? accessibilityLabel ?? resolved.label : void 0,
|
|
756
|
+
style: [
|
|
757
|
+
styles.card,
|
|
758
|
+
elevation === "flat" ? styles.flat : elevation === "raised" ? styles.raised : null,
|
|
759
|
+
padding === "lg" ? styles.padLg : null,
|
|
760
|
+
tone !== "danger" ? { borderColor: theme.edge[tone], borderWidth: theme.borderWidth.base } : null
|
|
761
|
+
],
|
|
762
|
+
children: [
|
|
763
|
+
/* @__PURE__ */ jsx(PhaseAnnouncement, { message: announce ? `${resolved.label}. ${body}` : null }),
|
|
764
|
+
/* @__PURE__ */ jsxs(CardHeader, { children: [
|
|
765
|
+
/* @__PURE__ */ jsx(View, { accessible: false, ...decorativeProps(), children: /* @__PURE__ */ jsx(IconTile, { icon: "alert-triangle", tone, size: "lg" }) }),
|
|
766
|
+
/* @__PURE__ */ jsx(CardTitle, { children: /* @__PURE__ */ jsx(Text, { accessibilityRole: "header", style: styles.heading, children: resolved.label }) }),
|
|
767
|
+
/* @__PURE__ */ jsx(Text, { style: styles.body, children: body })
|
|
768
|
+
] }),
|
|
769
|
+
/* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsxs(
|
|
770
|
+
View,
|
|
771
|
+
{
|
|
772
|
+
style: [
|
|
773
|
+
styles.stack,
|
|
774
|
+
padding === "sm" ? styles.stackSm : padding === "lg" ? styles.stackLg : null
|
|
775
|
+
],
|
|
776
|
+
children: [
|
|
777
|
+
/* @__PURE__ */ jsx(NoteBlock, { title: words.failure.offerPrefix, description: resolved.offer }),
|
|
778
|
+
showAlternates ? /* @__PURE__ */ jsxs(View, { style: styles.group, children: [
|
|
779
|
+
/* @__PURE__ */ jsx(Text, { style: styles.overline, children: alternatesLabel.toLocaleUpperCase(locale) }),
|
|
780
|
+
/* @__PURE__ */ jsx(View, { style: styles.list, children: alternates.map((m) => /* @__PURE__ */ jsx(MatchRow, { match: m, onPick: onPickAlternate, labels }, m.name)) })
|
|
781
|
+
] }) : null
|
|
782
|
+
]
|
|
783
|
+
}
|
|
784
|
+
) }),
|
|
785
|
+
/* @__PURE__ */ jsx(CardFooter, { children: /* @__PURE__ */ jsxs(View, { style: styles.actions, children: [
|
|
786
|
+
/* @__PURE__ */ jsx(View, { style: styles.actionSlot, children: /* @__PURE__ */ jsx(Button, { variant: "outline", size: "lg", fullWidth: true, onPress: onManualEntry, children: manualLabel }) }),
|
|
787
|
+
/* @__PURE__ */ jsx(View, { style: styles.actionSlot, children: /* @__PURE__ */ jsx(Button, { variant: "primary", size: "lg", fullWidth: true, loading, onPress: onRetake, children: failurePrimaryLabel(resolved.id, words) }) })
|
|
788
|
+
] }) })
|
|
789
|
+
]
|
|
790
|
+
}
|
|
791
|
+
) });
|
|
704
792
|
}
|
|
705
793
|
var failureSheet = createStyleSheet((theme) => ({
|
|
706
794
|
card: {
|
|
707
795
|
width: "100%",
|
|
708
796
|
maxWidth: theme.panel.lg
|
|
709
797
|
},
|
|
798
|
+
flat: { shadowOpacity: 0, elevation: 0 },
|
|
799
|
+
raised: { ...theme.shadow.lg },
|
|
800
|
+
padLg: { padding: theme.space.s2 },
|
|
801
|
+
stackSm: { gap: theme.space[8] },
|
|
802
|
+
stackLg: { gap: theme.space[16] },
|
|
710
803
|
headRow: {
|
|
711
804
|
flexDirection: "row",
|
|
712
805
|
alignItems: "flex-start",
|
|
@@ -793,7 +886,11 @@ function CapturePreview({
|
|
|
793
886
|
copy,
|
|
794
887
|
tracking,
|
|
795
888
|
announce = true,
|
|
796
|
-
|
|
889
|
+
size = "md",
|
|
890
|
+
motion,
|
|
891
|
+
children,
|
|
892
|
+
tone,
|
|
893
|
+
loading = false
|
|
797
894
|
}) {
|
|
798
895
|
const theme = useLoamTheme("capture-result");
|
|
799
896
|
const { styles } = useStyles(reviewSheet);
|
|
@@ -801,22 +898,34 @@ function CapturePreview({
|
|
|
801
898
|
const words = useAnalyzerCopy(copy);
|
|
802
899
|
const pill = pillProp === void 0 ? words.capturedPill : pillProp;
|
|
803
900
|
const stop = SCRIM[scrim];
|
|
804
|
-
return /* @__PURE__ */ jsxs(
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
901
|
+
return /* @__PURE__ */ jsxs(
|
|
902
|
+
View,
|
|
903
|
+
{
|
|
904
|
+
testID: `loam-capture-preview-${scrim}`,
|
|
905
|
+
"aria-busy": loading || void 0,
|
|
906
|
+
style: [
|
|
907
|
+
styles.frozen,
|
|
908
|
+
tone ? { borderColor: theme.edge[tone], borderWidth: theme.borderWidth.thick } : null
|
|
909
|
+
],
|
|
910
|
+
children: [
|
|
911
|
+
/* @__PURE__ */ jsx(PhaseAnnouncement, { message: announce && pill ? pill : null }),
|
|
912
|
+
preview ?? /* @__PURE__ */ jsx(PlaceholderFeed, { label: label ?? t.frozenFrame, drift: false }),
|
|
913
|
+
stop ? /* @__PURE__ */ jsx(
|
|
914
|
+
View,
|
|
915
|
+
{
|
|
916
|
+
accessible: false,
|
|
917
|
+
testID: `loam-capture-scrim-${scrim}`,
|
|
918
|
+
style: [styles.scrim, { backgroundColor: theme.black[stop] }],
|
|
919
|
+
...decorativeProps()
|
|
920
|
+
}
|
|
921
|
+
) : null,
|
|
922
|
+
loading ? /* @__PURE__ */ jsx(View, { testID: "loam-capture-loading", style: styles.loadingPlate, children: /* @__PURE__ */ jsx(Skeleton, { variant: "rect", motion }) }) : null,
|
|
923
|
+
tracking,
|
|
924
|
+
pill ? /* @__PURE__ */ jsx(View, { style: [styles.pillRow, size === "lg" ? styles.pillRowLg : null], children: /* @__PURE__ */ jsx(GuidanceChip, { text: pill, size: size === "sm" ? "sm" : "md", motion }) }) : null,
|
|
925
|
+
children
|
|
926
|
+
]
|
|
927
|
+
}
|
|
928
|
+
);
|
|
820
929
|
}
|
|
821
930
|
function RetakeBar({
|
|
822
931
|
analyse = true,
|
|
@@ -824,25 +933,51 @@ function RetakeBar({
|
|
|
824
933
|
acceptLabel,
|
|
825
934
|
labels,
|
|
826
935
|
onRetake,
|
|
827
|
-
onAccept
|
|
936
|
+
onAccept,
|
|
937
|
+
size = "lg",
|
|
938
|
+
density = "standard",
|
|
939
|
+
orientation = "horizontal",
|
|
940
|
+
variant = "glass",
|
|
941
|
+
tone,
|
|
942
|
+
loading = false
|
|
828
943
|
}) {
|
|
829
944
|
const t = useCaptureResultLabels(labels);
|
|
830
945
|
const retakeLabel = retakeProp ?? t.retake;
|
|
831
946
|
const theme = useLoamTheme("capture-result");
|
|
832
947
|
const { styles } = useStyles(reviewSheet);
|
|
833
|
-
return /* @__PURE__ */ jsxs(
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
948
|
+
return /* @__PURE__ */ jsxs(
|
|
949
|
+
View,
|
|
950
|
+
{
|
|
951
|
+
testID: "loam-retake-bar",
|
|
952
|
+
"aria-busy": loading || void 0,
|
|
953
|
+
style: [
|
|
954
|
+
styles.retakeBar,
|
|
955
|
+
orientation === "vertical" ? styles.barVertical : null,
|
|
956
|
+
density === "compact" ? styles.barCompact : density === "comfortable" ? styles.barSpacious : null
|
|
957
|
+
],
|
|
958
|
+
children: [
|
|
959
|
+
variant === "solid" ? /* @__PURE__ */ jsx(View, { style: [styles.retakeSlot, orientation === "vertical" ? styles.fullWidth : null], children: /* @__PURE__ */ jsx(Button, { variant: "outline", size, fullWidth: true, disabled: loading, onPress: onRetake, children: retakeLabel }) }) : /* @__PURE__ */ jsx(
|
|
960
|
+
Pressable,
|
|
961
|
+
{
|
|
962
|
+
accessibilityRole: "button",
|
|
963
|
+
accessibilityLabel: retakeLabel,
|
|
964
|
+
accessibilityState: { disabled: loading },
|
|
965
|
+
disabled: loading,
|
|
966
|
+
style: [
|
|
967
|
+
styles.retakeSlot,
|
|
968
|
+
styles.glassAction,
|
|
969
|
+
{ height: theme.ctl[size] },
|
|
970
|
+
tone ? { borderColor: theme.edge[tone] } : null,
|
|
971
|
+
orientation === "vertical" ? styles.fullWidth : null
|
|
972
|
+
],
|
|
973
|
+
onPress: onRetake,
|
|
974
|
+
children: /* @__PURE__ */ jsx(Text, { style: [styles.glassActionLabel, { color: camInk(theme) }], children: retakeLabel })
|
|
975
|
+
}
|
|
976
|
+
),
|
|
977
|
+
/* @__PURE__ */ jsx(View, { style: [styles.acceptSlot, orientation === "vertical" ? styles.fullWidth : null], children: /* @__PURE__ */ jsx(Button, { variant: "primary", size, fullWidth: true, loading, onPress: onAccept, children: acceptLabel ?? (analyse ? t.analyse : t.usePhoto) }) })
|
|
978
|
+
]
|
|
979
|
+
}
|
|
980
|
+
);
|
|
846
981
|
}
|
|
847
982
|
var FROZEN_PHASES = [
|
|
848
983
|
"captured",
|
|
@@ -868,6 +1003,14 @@ var reviewSheet = createStyleSheet((theme) => ({
|
|
|
868
1003
|
left: theme.space[0],
|
|
869
1004
|
right: theme.space[0]
|
|
870
1005
|
},
|
|
1006
|
+
loadingPlate: {
|
|
1007
|
+
pointerEvents: "none",
|
|
1008
|
+
position: "absolute",
|
|
1009
|
+
top: theme.space[0],
|
|
1010
|
+
bottom: theme.space[0],
|
|
1011
|
+
left: theme.space[0],
|
|
1012
|
+
right: theme.space[0]
|
|
1013
|
+
},
|
|
871
1014
|
pillRow: {
|
|
872
1015
|
pointerEvents: "box-none",
|
|
873
1016
|
position: "absolute",
|
|
@@ -877,6 +1020,7 @@ var reviewSheet = createStyleSheet((theme) => ({
|
|
|
877
1020
|
alignItems: "center",
|
|
878
1021
|
padding: theme.space[8]
|
|
879
1022
|
},
|
|
1023
|
+
pillRowLg: { padding: theme.space[16] },
|
|
880
1024
|
retakeBar: {
|
|
881
1025
|
width: "100%",
|
|
882
1026
|
flexDirection: "row",
|
|
@@ -884,6 +1028,10 @@ var reviewSheet = createStyleSheet((theme) => ({
|
|
|
884
1028
|
alignItems: "center",
|
|
885
1029
|
gap: theme.space[8]
|
|
886
1030
|
},
|
|
1031
|
+
barVertical: { flexDirection: "column", alignItems: "stretch" },
|
|
1032
|
+
barCompact: { gap: theme.space[4] },
|
|
1033
|
+
barSpacious: { gap: theme.space[16] },
|
|
1034
|
+
fullWidth: { width: "100%", flexGrow: 0 },
|
|
887
1035
|
// Floored at their labels' widths and the bar wraps, so no label breaks
|
|
888
1036
|
// inside its button; when both fit, accept keeps the 2:1 share.
|
|
889
1037
|
retakeSlot: {
|
|
@@ -907,8 +1055,9 @@ var reviewSheet = createStyleSheet((theme) => ({
|
|
|
907
1055
|
borderColor: theme.white.a5
|
|
908
1056
|
},
|
|
909
1057
|
glassActionLabel: {
|
|
910
|
-
|
|
911
|
-
|
|
1058
|
+
// The lg tier's label role, so this plate reads beside the Button (R12).
|
|
1059
|
+
...theme.ctl.label.lg,
|
|
1060
|
+
fontFamily: theme.font.sans
|
|
912
1061
|
}
|
|
913
1062
|
}));
|
|
914
1063
|
function ResultCard({
|
|
@@ -920,35 +1069,103 @@ function ResultCard({
|
|
|
920
1069
|
onPickAlternate,
|
|
921
1070
|
onQuantityChange,
|
|
922
1071
|
labels,
|
|
923
|
-
copy
|
|
1072
|
+
copy,
|
|
1073
|
+
tone,
|
|
1074
|
+
variant = "plain",
|
|
1075
|
+
elevation = "default",
|
|
1076
|
+
padding,
|
|
1077
|
+
loading = false,
|
|
1078
|
+
interactive = false,
|
|
1079
|
+
onPress,
|
|
1080
|
+
accessibilityLabel
|
|
924
1081
|
}) {
|
|
925
1082
|
const stamp = typeof profileProp === "string" ? profileProp : profileProp ? profileProp.id : void 0;
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
1083
|
+
const { styles } = useStyles(cardSheet);
|
|
1084
|
+
const theme = useLoamTheme("capture-result");
|
|
1085
|
+
return /* @__PURE__ */ jsxs(
|
|
1086
|
+
View,
|
|
1087
|
+
{
|
|
1088
|
+
testID: stamp ? `loam-result-profile-${stamp}` : void 0,
|
|
1089
|
+
"aria-busy": loading || void 0,
|
|
1090
|
+
"data-interactive": interactive || void 0,
|
|
1091
|
+
style: [
|
|
1092
|
+
interactive ? styles.rel : null,
|
|
1093
|
+
variant !== "plain" ? styles.panel : null,
|
|
1094
|
+
variant === "filled" ? styles.filled : null,
|
|
1095
|
+
elevation === "raised" ? styles.raised : null,
|
|
1096
|
+
padding === "sm" ? styles.padSm : padding === "md" ? styles.padMd : padding === "lg" ? styles.padLg : null,
|
|
1097
|
+
tone ? {
|
|
1098
|
+
borderColor: theme.edge[tone],
|
|
1099
|
+
borderWidth: theme.borderWidth.base,
|
|
1100
|
+
borderRadius: theme.radius.lg
|
|
1101
|
+
} : null
|
|
1102
|
+
],
|
|
1103
|
+
children: [
|
|
1104
|
+
interactive ? /* @__PURE__ */ jsx(
|
|
1105
|
+
Pressable,
|
|
1106
|
+
{
|
|
1107
|
+
accessibilityRole: "button",
|
|
1108
|
+
accessibilityLabel: accessibilityLabel ?? stamp ?? result.kind,
|
|
1109
|
+
testID: "loam-result-press",
|
|
1110
|
+
onPress,
|
|
1111
|
+
style: ({ pressed }) => [styles.pressLayer, pressed ? styles.pressed : null]
|
|
1112
|
+
}
|
|
1113
|
+
) : null,
|
|
1114
|
+
loading ? /* @__PURE__ */ jsxs(View, { testID: "loam-result-loading", style: styles.loading, children: [
|
|
1115
|
+
/* @__PURE__ */ jsx(Skeleton, { variant: "text" }),
|
|
1116
|
+
/* @__PURE__ */ jsx(Skeleton, { variant: "text" }),
|
|
1117
|
+
/* @__PURE__ */ jsx(Skeleton, { variant: "rect", height: theme.space[48] })
|
|
1118
|
+
] }) : null,
|
|
1119
|
+
loading ? null : result.kind === "species" ? /* @__PURE__ */ jsx(
|
|
1120
|
+
SpeciesResult,
|
|
1121
|
+
{
|
|
1122
|
+
result,
|
|
1123
|
+
onPickAlternate,
|
|
1124
|
+
labels,
|
|
1125
|
+
copy
|
|
1126
|
+
}
|
|
1127
|
+
) : null,
|
|
1128
|
+
!loading && result.kind === "panels" ? /* @__PURE__ */ jsx(PanelsResult, { result, currency, labels, copy }) : null,
|
|
1129
|
+
!loading && result.kind === "fields" ? /* @__PURE__ */ jsx(FieldsResult, { result, onFieldChange, labels, copy }) : null,
|
|
1130
|
+
!loading && result.kind === "code" ? /* @__PURE__ */ jsx(
|
|
1131
|
+
CodeResult,
|
|
1132
|
+
{
|
|
1133
|
+
result,
|
|
1134
|
+
currency,
|
|
1135
|
+
quantity,
|
|
1136
|
+
onQuantityChange,
|
|
1137
|
+
labels,
|
|
1138
|
+
copy
|
|
1139
|
+
}
|
|
1140
|
+
) : null,
|
|
1141
|
+
!loading && result.kind === "verdict" ? /* @__PURE__ */ jsx(VerdictResult, { result, labels, copy }) : null
|
|
1142
|
+
]
|
|
1143
|
+
}
|
|
1144
|
+
);
|
|
951
1145
|
}
|
|
1146
|
+
var cardSheet = createStyleSheet((theme) => ({
|
|
1147
|
+
panel: {
|
|
1148
|
+
borderRadius: theme.radius.lg,
|
|
1149
|
+
borderWidth: theme.borderWidth.base,
|
|
1150
|
+
borderColor: theme.color.border
|
|
1151
|
+
},
|
|
1152
|
+
filled: { backgroundColor: theme.color.surface },
|
|
1153
|
+
raised: { ...theme.shadow.lg },
|
|
1154
|
+
padSm: { padding: theme.space[8] },
|
|
1155
|
+
padMd: { padding: theme.space[12] },
|
|
1156
|
+
padLg: { padding: theme.space[16] },
|
|
1157
|
+
loading: { gap: theme.space[8] },
|
|
1158
|
+
rel: { position: "relative" },
|
|
1159
|
+
pressLayer: {
|
|
1160
|
+
position: "absolute",
|
|
1161
|
+
top: theme.space[0],
|
|
1162
|
+
bottom: theme.space[0],
|
|
1163
|
+
left: theme.space[0],
|
|
1164
|
+
right: theme.space[0],
|
|
1165
|
+
borderRadius: theme.radius.lg
|
|
1166
|
+
},
|
|
1167
|
+
pressed: { backgroundColor: theme.color.border, opacity: theme.opacity[38] }
|
|
1168
|
+
}));
|
|
952
1169
|
function ResultSheet({
|
|
953
1170
|
title: titleProp,
|
|
954
1171
|
primaryLabel: primaryProp,
|
|
@@ -959,9 +1176,15 @@ function ResultSheet({
|
|
|
959
1176
|
onKeep,
|
|
960
1177
|
onDismiss,
|
|
961
1178
|
autoFocus = true,
|
|
962
|
-
maxHeight
|
|
1179
|
+
maxHeight: maxHeightProp,
|
|
1180
|
+
tone,
|
|
1181
|
+
size = "md",
|
|
1182
|
+
presentation = "overlay",
|
|
1183
|
+
side = "bottom",
|
|
1184
|
+
loading = false,
|
|
963
1185
|
dismissRatio = 0.3,
|
|
964
1186
|
grabberLabel: grabberProp,
|
|
1187
|
+
morphFrom,
|
|
965
1188
|
children
|
|
966
1189
|
}) {
|
|
967
1190
|
const t = useCaptureResultLabels(labels);
|
|
@@ -975,9 +1198,11 @@ function ResultSheet({
|
|
|
975
1198
|
const panel = React5.useRef(null);
|
|
976
1199
|
const height = React5.useRef(0);
|
|
977
1200
|
const offset = React5.useRef(new Animated.Value(0)).current;
|
|
1201
|
+
const maxHeight = maxHeightProp ?? (size === "sm" ? "60%" : size === "lg" ? "94%" : "82%");
|
|
978
1202
|
const level = useResolvedMotion(void 0, "capture-result");
|
|
979
1203
|
const enter = React5.useRef(new Animated.Value(0)).current;
|
|
980
1204
|
const [sheetH, setSheetH] = React5.useState(600);
|
|
1205
|
+
const [startDy, setStartDy] = React5.useState(null);
|
|
981
1206
|
const entered = React5.useRef(false);
|
|
982
1207
|
const themeRef = React5.useRef(theme);
|
|
983
1208
|
themeRef.current = theme;
|
|
@@ -985,6 +1210,9 @@ function ResultSheet({
|
|
|
985
1210
|
levelRef.current = level;
|
|
986
1211
|
const dismiss = React5.useRef(onDismiss);
|
|
987
1212
|
dismiss.current = onDismiss;
|
|
1213
|
+
const dir = side === "top" ? -1 : 1;
|
|
1214
|
+
const dirRef = React5.useRef(dir);
|
|
1215
|
+
dirRef.current = dir;
|
|
988
1216
|
const ratio = React5.useRef(dismissRatio);
|
|
989
1217
|
ratio.current = dismissRatio;
|
|
990
1218
|
React5.useLayoutEffect(() => {
|
|
@@ -1002,17 +1230,20 @@ function ResultSheet({
|
|
|
1002
1230
|
onMoveShouldSetPanResponder: (_e, g) => Math.abs(g.dy) > 2,
|
|
1003
1231
|
onPanResponderMove: (_e, g) => {
|
|
1004
1232
|
if (!dismiss.current) return;
|
|
1005
|
-
offset.setValue(Math.max(0, g.dy));
|
|
1233
|
+
offset.setValue(dirRef.current * Math.max(0, dirRef.current * g.dy));
|
|
1006
1234
|
},
|
|
1007
1235
|
onPanResponderRelease: (_e, g) => {
|
|
1008
|
-
if (dismiss.current && height.current > 0 && Math.max(0, g.dy) > height.current * ratio.current) {
|
|
1236
|
+
if (dismiss.current && height.current > 0 && Math.max(0, dirRef.current * g.dy) > height.current * ratio.current) {
|
|
1009
1237
|
offset.setValue(0);
|
|
1010
1238
|
dismiss.current();
|
|
1011
1239
|
return;
|
|
1012
1240
|
}
|
|
1013
1241
|
if (levelRef.current === "full") {
|
|
1014
1242
|
Animated.spring(offset, {
|
|
1015
|
-
...springConfig(themeRef.current, "ds", {
|
|
1243
|
+
...springConfig(themeRef.current, "ds", {
|
|
1244
|
+
velocity: dirRef.current * g.vy,
|
|
1245
|
+
thrown: true
|
|
1246
|
+
}),
|
|
1016
1247
|
toValue: 0,
|
|
1017
1248
|
useNativeDriver: true
|
|
1018
1249
|
}).start();
|
|
@@ -1023,6 +1254,19 @@ function ResultSheet({
|
|
|
1023
1254
|
onPanResponderTerminate: () => offset.setValue(0)
|
|
1024
1255
|
})
|
|
1025
1256
|
).current;
|
|
1257
|
+
const grabber = onDismiss ? /* @__PURE__ */ jsx(
|
|
1258
|
+
Pressable,
|
|
1259
|
+
{
|
|
1260
|
+
accessibilityRole: "button",
|
|
1261
|
+
accessibilityLabel: grabberLabel,
|
|
1262
|
+
testID: "loam-result-grabber",
|
|
1263
|
+
hitSlop: { top: grabberSlop, bottom: grabberSlop },
|
|
1264
|
+
style: styles.grabberHit,
|
|
1265
|
+
onPress: onDismiss,
|
|
1266
|
+
...pan.panHandlers,
|
|
1267
|
+
children: /* @__PURE__ */ jsx(View, { accessible: false, style: styles.grabber })
|
|
1268
|
+
}
|
|
1269
|
+
) : /* @__PURE__ */ jsx(View, { accessible: false, style: styles.grabberHit, children: /* @__PURE__ */ jsx(View, { style: styles.grabber }) });
|
|
1026
1270
|
return /* @__PURE__ */ jsxs(
|
|
1027
1271
|
Animated.View,
|
|
1028
1272
|
{
|
|
@@ -1031,59 +1275,73 @@ function ResultSheet({
|
|
|
1031
1275
|
accessibilityViewIsModal: true,
|
|
1032
1276
|
accessibilityLabel: title,
|
|
1033
1277
|
testID: "loam-result-sheet",
|
|
1278
|
+
"aria-busy": loading || void 0,
|
|
1034
1279
|
onLayout: (e) => {
|
|
1035
1280
|
height.current = e.nativeEvent.layout.height;
|
|
1036
1281
|
if (entered.current) return;
|
|
1037
1282
|
entered.current = true;
|
|
1038
1283
|
setSheetH(height.current);
|
|
1039
|
-
|
|
1040
|
-
|
|
1284
|
+
const rise = () => {
|
|
1285
|
+
if (level === "none") enter.setValue(1);
|
|
1286
|
+
else if (level === "reduced")
|
|
1287
|
+
Animated.timing(enter, {
|
|
1288
|
+
...motionTiming(level),
|
|
1289
|
+
toValue: 1,
|
|
1290
|
+
useNativeDriver: true
|
|
1291
|
+
}).start();
|
|
1292
|
+
else
|
|
1293
|
+
Animated.spring(enter, {
|
|
1294
|
+
...springConfig(theme, "ds"),
|
|
1295
|
+
toValue: 1,
|
|
1296
|
+
useNativeDriver: true
|
|
1297
|
+
}).start();
|
|
1298
|
+
};
|
|
1299
|
+
const node = panel.current;
|
|
1300
|
+
if (!morphFrom?.current || level !== "full" || !node || side === "top") return rise();
|
|
1301
|
+
void Promise.all([measureBox(morphFrom.current), measureBox(node)]).then(([src, dst]) => {
|
|
1302
|
+
if (!src || !dst) return rise();
|
|
1303
|
+
setStartDy(src.y - (dst.y - height.current));
|
|
1041
1304
|
Animated.timing(enter, {
|
|
1042
|
-
...motionTiming(level),
|
|
1043
|
-
toValue: 1,
|
|
1044
|
-
useNativeDriver: true
|
|
1045
|
-
}).start();
|
|
1046
|
-
else
|
|
1047
|
-
Animated.spring(enter, {
|
|
1048
|
-
...springConfig(theme, "ds"),
|
|
1049
1305
|
toValue: 1,
|
|
1306
|
+
duration: theme.motion.expand.duration,
|
|
1307
|
+
easing: Easing.bezier(...theme.motion.expand.easing),
|
|
1050
1308
|
useNativeDriver: true
|
|
1051
1309
|
}).start();
|
|
1310
|
+
});
|
|
1052
1311
|
},
|
|
1053
1312
|
style: [
|
|
1054
1313
|
styles.sheet,
|
|
1314
|
+
side === "top" ? styles.sheetTop : null,
|
|
1315
|
+
presentation === "inline" ? styles.inline : null,
|
|
1316
|
+
tone ? side === "top" ? { borderBottomColor: theme.edge[tone] } : { borderTopColor: theme.edge[tone] } : null,
|
|
1055
1317
|
{
|
|
1056
1318
|
maxHeight,
|
|
1057
|
-
opacity: level
|
|
1319
|
+
opacity: level !== "full" ? enter : startDy === null ? 1 : enter.interpolate({
|
|
1320
|
+
inputRange: [0, 0.3],
|
|
1321
|
+
outputRange: [0, 1],
|
|
1322
|
+
extrapolate: "clamp"
|
|
1323
|
+
}),
|
|
1058
1324
|
transform: [
|
|
1059
1325
|
{ translateY: offset },
|
|
1060
1326
|
...level === "full" ? [
|
|
1061
1327
|
{
|
|
1062
|
-
translateY: enter.interpolate({
|
|
1328
|
+
translateY: enter.interpolate({
|
|
1329
|
+
inputRange: [0, 1],
|
|
1330
|
+
outputRange: [startDy ?? dir * sheetH, 0]
|
|
1331
|
+
})
|
|
1063
1332
|
}
|
|
1064
1333
|
] : []
|
|
1065
1334
|
]
|
|
1066
1335
|
}
|
|
1067
1336
|
],
|
|
1068
1337
|
children: [
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
{
|
|
1072
|
-
accessibilityRole: "button",
|
|
1073
|
-
accessibilityLabel: grabberLabel,
|
|
1074
|
-
testID: "loam-result-grabber",
|
|
1075
|
-
hitSlop: { top: grabberSlop, bottom: grabberSlop },
|
|
1076
|
-
style: styles.grabberHit,
|
|
1077
|
-
onPress: onDismiss,
|
|
1078
|
-
...pan.panHandlers,
|
|
1079
|
-
children: /* @__PURE__ */ jsx(View, { accessible: false, style: styles.grabber })
|
|
1080
|
-
}
|
|
1081
|
-
) : /* @__PURE__ */ jsx(View, { accessible: false, style: styles.grabberHit, children: /* @__PURE__ */ jsx(View, { style: styles.grabber }) }),
|
|
1082
|
-
/* @__PURE__ */ jsx(ScrollView, { style: styles.body, contentContainerStyle: styles.bodyContent, children }),
|
|
1338
|
+
side === "top" ? null : grabber,
|
|
1339
|
+
/* @__PURE__ */ jsx(ScrollView, { style: styles.body, contentContainerStyle: styles.bodyContent, focusable: true, children }),
|
|
1083
1340
|
/* @__PURE__ */ jsxs(View, { style: styles.actions, children: [
|
|
1084
1341
|
/* @__PURE__ */ jsx(View, { style: styles.secondarySlot, children: /* @__PURE__ */ jsx(Button, { variant: "outline", size: "lg", fullWidth: true, onPress: onScanAnother, children: scanAnotherLabel }) }),
|
|
1085
|
-
/* @__PURE__ */ jsx(View, { style: styles.primarySlot, children: /* @__PURE__ */ jsx(Button, { variant: "primary", size: "lg", fullWidth: true, onPress: onKeep, children: primaryLabel }) })
|
|
1086
|
-
] })
|
|
1342
|
+
/* @__PURE__ */ jsx(View, { style: styles.primarySlot, children: /* @__PURE__ */ jsx(Button, { variant: "primary", size: "lg", fullWidth: true, loading, onPress: onKeep, children: primaryLabel }) })
|
|
1343
|
+
] }),
|
|
1344
|
+
side === "top" ? grabber : null
|
|
1087
1345
|
]
|
|
1088
1346
|
}
|
|
1089
1347
|
);
|
|
@@ -1104,6 +1362,18 @@ var sheetSheet = createStyleSheet((theme) => ({
|
|
|
1104
1362
|
backgroundColor: theme.color.surface,
|
|
1105
1363
|
...theme.shadow.lg
|
|
1106
1364
|
},
|
|
1365
|
+
inline: { position: "relative", zIndex: theme.z.base },
|
|
1366
|
+
sheetTop: {
|
|
1367
|
+
bottom: "auto",
|
|
1368
|
+
top: theme.space[0],
|
|
1369
|
+
borderTopLeftRadius: 0,
|
|
1370
|
+
borderTopRightRadius: 0,
|
|
1371
|
+
borderBottomLeftRadius: theme.radius.xl,
|
|
1372
|
+
borderBottomRightRadius: theme.radius.xl,
|
|
1373
|
+
borderTopWidth: 0,
|
|
1374
|
+
borderBottomWidth: theme.borderWidth.base,
|
|
1375
|
+
borderBottomColor: theme.color.border
|
|
1376
|
+
},
|
|
1107
1377
|
grabberHit: {
|
|
1108
1378
|
width: "100%",
|
|
1109
1379
|
height: theme.space[24],
|
|
@@ -1121,7 +1391,8 @@ var sheetSheet = createStyleSheet((theme) => ({
|
|
|
1121
1391
|
body: {
|
|
1122
1392
|
flexGrow: 1,
|
|
1123
1393
|
flexShrink: 1,
|
|
1124
|
-
|
|
1394
|
+
// Content-sized up to the sheet's maxHeight, then it scrolls (a zero basis collapses the body in an auto-height sheet).
|
|
1395
|
+
flexBasis: "auto"
|
|
1125
1396
|
},
|
|
1126
1397
|
bodyContent: {
|
|
1127
1398
|
paddingHorizontal: theme.space[16],
|